@qooxdoo/framework 7.0.0-beta.5 → 7.0.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1562) hide show
  1. package/CHANGELOG.md +3 -6
  2. package/Manifest.json +1 -1
  3. package/README.md +9 -3
  4. package/lib/compiler/compile-info.json +50 -48
  5. package/lib/compiler/index.js +6948 -4175
  6. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -1
  7. package/lib/resource/qx/tool/loadsass.js +16 -13
  8. package/lib/resource/qx/tool/schema/compile-1-0-0.json +13 -13
  9. package/lib/resource/qx/tool/website/build/assets/bluebird.min.js +4593 -9
  10. package/lib/resource/qx/tool/website/build/assets/buttons.js +391 -1
  11. package/lib/resource/qx/tool/website/build/assets/fontawesome-all.js +8963 -1
  12. package/lib/resource/qx/tool/website/build/assets/jquery.js +5452 -3
  13. package/lib/resource/qx/tool/website/build/diagnostics/dependson.js +31 -31
  14. package/lib/resource/qx/tool/website/build/diagnostics/requiredby.js +32 -36
  15. package/lib/resource/qx/tool/website/build/scripts/serve.js +87 -66
  16. package/lib/resource/qx/tool/website/src/assets/bluebird.min.js +4593 -9
  17. package/lib/resource/qx/tool/website/src/assets/buttons.js +391 -1
  18. package/lib/resource/qx/tool/website/src/assets/fontawesome-all.js +8963 -1
  19. package/lib/resource/qx/tool/website/src/assets/jquery.js +5452 -3
  20. package/lib/resource/qx/tool/website/src/diagnostics/dependson.js +31 -31
  21. package/lib/resource/qx/tool/website/src/diagnostics/requiredby.js +32 -36
  22. package/lib/resource/qx/tool/website/src/scripts/serve.js +87 -66
  23. package/npm-shrinkwrap.json +7293 -0
  24. package/package.json +19 -4
  25. package/source/class/q.js +4 -2
  26. package/source/class/qx/Annotation.js +48 -57
  27. package/source/class/qx/Bootstrap.js +206 -207
  28. package/source/class/qx/Class.js +602 -504
  29. package/source/class/qx/Interface.js +169 -137
  30. package/source/class/qx/Mixin.js +156 -120
  31. package/source/class/qx/Part.js +48 -77
  32. package/source/class/qx/Promise.js +5891 -4655
  33. package/source/class/qx/Theme.js +200 -134
  34. package/source/class/qx/__init__.js +8 -8
  35. package/source/class/qx/application/AbstractGui.js +20 -32
  36. package/source/class/qx/application/Basic.js +9 -18
  37. package/source/class/qx/application/IApplication.js +6 -10
  38. package/source/class/qx/application/Inline.js +4 -7
  39. package/source/class/qx/application/Mobile.js +22 -45
  40. package/source/class/qx/application/Native.js +8 -19
  41. package/source/class/qx/application/Routing.js +88 -114
  42. package/source/class/qx/application/Standalone.js +4 -9
  43. package/source/class/qx/application/__init__.js +1 -1
  44. package/source/class/qx/bom/AnimationFrame.js +26 -25
  45. package/source/class/qx/bom/Blocker.js +92 -100
  46. package/source/class/qx/bom/Cookie.js +18 -22
  47. package/source/class/qx/bom/Document.js +24 -31
  48. package/source/class/qx/bom/Element.js +65 -51
  49. package/source/class/qx/bom/Event.js +68 -78
  50. package/source/class/qx/bom/FileReader.js +110 -115
  51. package/source/class/qx/bom/Font.js +82 -122
  52. package/source/class/qx/bom/FullScreen.js +32 -41
  53. package/source/class/qx/bom/GeoLocation.js +39 -44
  54. package/source/class/qx/bom/HashHistory.js +58 -64
  55. package/source/class/qx/bom/History.js +61 -89
  56. package/source/class/qx/bom/Html.js +75 -71
  57. package/source/class/qx/bom/IdleCallback.js +20 -23
  58. package/source/class/qx/bom/Iframe.js +37 -69
  59. package/source/class/qx/bom/IframeHistory.js +83 -88
  60. package/source/class/qx/bom/Input.js +50 -66
  61. package/source/class/qx/bom/Label.js +65 -86
  62. package/source/class/qx/bom/Lifecycle.js +7 -9
  63. package/source/class/qx/bom/MediaQuery.js +324 -307
  64. package/source/class/qx/bom/NativeHistory.js +51 -46
  65. package/source/class/qx/bom/Notification.js +41 -47
  66. package/source/class/qx/bom/PageVisibility.js +19 -25
  67. package/source/class/qx/bom/Range.js +20 -30
  68. package/source/class/qx/bom/Selection.js +163 -172
  69. package/source/class/qx/bom/Selector.js +2401 -2181
  70. package/source/class/qx/bom/Shortcut.js +103 -129
  71. package/source/class/qx/bom/Storage.js +9 -8
  72. package/source/class/qx/bom/String.js +285 -290
  73. package/source/class/qx/bom/Style.js +30 -31
  74. package/source/class/qx/bom/Stylesheet.js +36 -60
  75. package/source/class/qx/bom/Template.js +730 -657
  76. package/source/class/qx/bom/Viewport.js +40 -46
  77. package/source/class/qx/bom/Vml.js +43 -28
  78. package/source/class/qx/bom/WebWorker.js +61 -50
  79. package/source/class/qx/bom/Window.js +88 -105
  80. package/source/class/qx/bom/__init__.js +11 -11
  81. package/source/class/qx/bom/client/Browser.js +45 -47
  82. package/source/class/qx/bom/client/Css.js +85 -85
  83. package/source/class/qx/bom/client/CssAnimation.js +41 -49
  84. package/source/class/qx/bom/client/CssTransform.js +21 -29
  85. package/source/class/qx/bom/client/CssTransition.js +9 -12
  86. package/source/class/qx/bom/client/Device.js +45 -45
  87. package/source/class/qx/bom/client/EcmaScript.js +153 -96
  88. package/source/class/qx/bom/client/Engine.js +38 -35
  89. package/source/class/qx/bom/client/Event.js +75 -63
  90. package/source/class/qx/bom/client/Html.js +97 -97
  91. package/source/class/qx/bom/client/Idle.js +4 -6
  92. package/source/class/qx/bom/client/Locale.js +15 -15
  93. package/source/class/qx/bom/client/OperatingSystem.js +89 -106
  94. package/source/class/qx/bom/client/Pdfjs.js +1364 -1067
  95. package/source/class/qx/bom/client/PhoneGap.js +6 -9
  96. package/source/class/qx/bom/client/Plugin.js +93 -97
  97. package/source/class/qx/bom/client/Runtime.js +14 -12
  98. package/source/class/qx/bom/client/Scroll.js +20 -16
  99. package/source/class/qx/bom/client/Stylesheet.js +44 -32
  100. package/source/class/qx/bom/client/Transport.js +38 -41
  101. package/source/class/qx/bom/client/Xml.js +39 -41
  102. package/source/class/qx/bom/client/__init__.js +4 -4
  103. package/source/class/qx/bom/element/Animation.js +15 -12
  104. package/source/class/qx/bom/element/AnimationCss.js +95 -64
  105. package/source/class/qx/bom/element/AnimationHandle.js +22 -29
  106. package/source/class/qx/bom/element/AnimationJs.js +94 -71
  107. package/source/class/qx/bom/element/Attribute.js +119 -134
  108. package/source/class/qx/bom/element/Background.js +35 -35
  109. package/source/class/qx/bom/element/BoxSizing.js +43 -44
  110. package/source/class/qx/bom/element/Class.js +50 -72
  111. package/source/class/qx/bom/element/Clip.js +36 -60
  112. package/source/class/qx/bom/element/Cursor.js +13 -20
  113. package/source/class/qx/bom/element/Dataset.js +33 -31
  114. package/source/class/qx/bom/element/Decoration.js +178 -168
  115. package/source/class/qx/bom/element/Dimension.js +78 -60
  116. package/source/class/qx/bom/element/Location.js +87 -94
  117. package/source/class/qx/bom/element/Opacity.js +42 -44
  118. package/source/class/qx/bom/element/Scroll.js +78 -88
  119. package/source/class/qx/bom/element/Style.js +61 -101
  120. package/source/class/qx/bom/element/Transform.js +38 -56
  121. package/source/class/qx/bom/element/__init__.js +4 -4
  122. package/source/class/qx/bom/media/Abstract.js +136 -143
  123. package/source/class/qx/bom/media/Audio.js +7 -12
  124. package/source/class/qx/bom/media/Video.js +15 -27
  125. package/source/class/qx/bom/request/IRequest.js +18 -21
  126. package/source/class/qx/bom/request/Jsonp.js +34 -39
  127. package/source/class/qx/bom/request/Script.js +94 -90
  128. package/source/class/qx/bom/request/SimpleXhr.js +111 -79
  129. package/source/class/qx/bom/request/Xhr.js +196 -143
  130. package/source/class/qx/bom/request/__init__.js +1 -1
  131. package/source/class/qx/bom/rest/Resource.js +269 -203
  132. package/source/class/qx/bom/storage/Memory.js +18 -29
  133. package/source/class/qx/bom/storage/UserData.js +28 -35
  134. package/source/class/qx/bom/storage/Web.js +19 -30
  135. package/source/class/qx/bom/webfonts/Manager.js +199 -130
  136. package/source/class/qx/bom/webfonts/Validator.js +84 -118
  137. package/source/class/qx/bom/webfonts/WebFont.js +24 -28
  138. package/source/class/qx/bom/webfonts/__init__.js +1 -1
  139. package/source/class/qx/core/Aspect.js +15 -22
  140. package/source/class/qx/core/Assert.js +391 -333
  141. package/source/class/qx/core/AssertionError.js +6 -15
  142. package/source/class/qx/core/BaseInit.js +25 -28
  143. package/source/class/qx/core/Environment.js +72 -86
  144. package/source/class/qx/core/GlobalError.js +12 -20
  145. package/source/class/qx/core/IDisposable.js +6 -9
  146. package/source/class/qx/core/Id.js +25 -15
  147. package/source/class/qx/core/Init.js +20 -20
  148. package/source/class/qx/core/MAssert.js +54 -97
  149. package/source/class/qx/core/MBindTo.js +10 -14
  150. package/source/class/qx/core/MEvent.js +76 -65
  151. package/source/class/qx/core/MLogging.js +9 -18
  152. package/source/class/qx/core/MObjectId.js +104 -65
  153. package/source/class/qx/core/MProperty.js +18 -34
  154. package/source/class/qx/core/Object.js +93 -122
  155. package/source/class/qx/core/ObjectRegistry.js +58 -81
  156. package/source/class/qx/core/Property.js +974 -780
  157. package/source/class/qx/core/ValidationError.js +3 -4
  158. package/source/class/qx/core/WindowError.js +13 -24
  159. package/source/class/qx/core/Wrapper.js +8 -9
  160. package/source/class/qx/data/Array.js +178 -191
  161. package/source/class/qx/data/Conversion.js +11 -18
  162. package/source/class/qx/data/IListData.js +11 -20
  163. package/source/class/qx/data/MBinding.js +31 -26
  164. package/source/class/qx/data/SingleValueBinding.js +491 -225
  165. package/source/class/qx/data/__init__.js +1 -1
  166. package/source/class/qx/data/controller/CheckedList.js +82 -54
  167. package/source/class/qx/data/controller/Form.js +81 -69
  168. package/source/class/qx/data/controller/IControllerDelegate.js +7 -12
  169. package/source/class/qx/data/controller/ISelection.js +6 -10
  170. package/source/class/qx/data/controller/List.js +151 -167
  171. package/source/class/qx/data/controller/MSelection.js +53 -72
  172. package/source/class/qx/data/controller/Object.js +106 -77
  173. package/source/class/qx/data/controller/Tree.js +164 -142
  174. package/source/class/qx/data/controller/__init__.js +1 -1
  175. package/source/class/qx/data/controller/website/List.js +34 -43
  176. package/source/class/qx/data/controller/website/__init__.js +2 -2
  177. package/source/class/qx/data/marshal/IMarshaler.js +4 -7
  178. package/source/class/qx/data/marshal/IMarshalerDelegate.js +10 -18
  179. package/source/class/qx/data/marshal/Json.js +112 -85
  180. package/source/class/qx/data/marshal/MEventBubbling.js +44 -42
  181. package/source/class/qx/data/marshal/__init__.js +1 -1
  182. package/source/class/qx/data/store/IStoreDelegate.js +6 -9
  183. package/source/class/qx/data/store/Json.js +71 -85
  184. package/source/class/qx/data/store/Jsonp.js +19 -25
  185. package/source/class/qx/data/store/Offline.js +21 -29
  186. package/source/class/qx/data/store/Rest.js +25 -23
  187. package/source/class/qx/data/store/__init__.js +1 -1
  188. package/source/class/qx/dev/Debug.js +105 -124
  189. package/source/class/qx/dev/FakeServer.js +68 -65
  190. package/source/class/qx/dev/ObjectSummary.js +33 -39
  191. package/source/class/qx/dev/Profile.js +62 -63
  192. package/source/class/qx/dev/StackTrace.js +64 -70
  193. package/source/class/qx/dev/Tokenizer.js +114 -126
  194. package/source/class/qx/dev/unit/AbstractTestSuite.js +17 -31
  195. package/source/class/qx/dev/unit/AsyncWrapper.js +22 -26
  196. package/source/class/qx/dev/unit/JsUnitTestResult.js +9 -21
  197. package/source/class/qx/dev/unit/MMeasure.js +46 -37
  198. package/source/class/qx/dev/unit/MMock.js +236 -240
  199. package/source/class/qx/dev/unit/MRequirements.js +53 -79
  200. package/source/class/qx/dev/unit/MRequirementsBasic.js +24 -19
  201. package/source/class/qx/dev/unit/MTestLoader.js +52 -57
  202. package/source/class/qx/dev/unit/MeasurementResult.js +18 -22
  203. package/source/class/qx/dev/unit/RequirementError.js +8 -17
  204. package/source/class/qx/dev/unit/Sinon.js +18826 -4613
  205. package/source/class/qx/dev/unit/TestCase.js +40 -51
  206. package/source/class/qx/dev/unit/TestClass.js +22 -23
  207. package/source/class/qx/dev/unit/TestFunction.js +28 -48
  208. package/source/class/qx/dev/unit/TestLoader.js +11 -14
  209. package/source/class/qx/dev/unit/TestLoaderBasic.js +3 -6
  210. package/source/class/qx/dev/unit/TestLoaderInline.js +8 -14
  211. package/source/class/qx/dev/unit/TestLoaderMobile.js +8 -14
  212. package/source/class/qx/dev/unit/TestLoaderNative.js +7 -13
  213. package/source/class/qx/dev/unit/TestResult.js +140 -118
  214. package/source/class/qx/dev/unit/TestSuite.js +46 -55
  215. package/source/class/qx/dom/Element.js +29 -74
  216. package/source/class/qx/dom/Hierarchy.js +60 -95
  217. package/source/class/qx/dom/Node.js +54 -81
  218. package/source/class/qx/dom/__init__.js +9 -9
  219. package/source/class/qx/event/AcceleratingTimer.js +28 -46
  220. package/source/class/qx/event/Emitter.js +54 -49
  221. package/source/class/qx/event/GlobalError.js +22 -38
  222. package/source/class/qx/event/IEventDispatcher.js +4 -9
  223. package/source/class/qx/event/IEventHandler.js +7 -13
  224. package/source/class/qx/event/Idle.js +32 -47
  225. package/source/class/qx/event/Manager.js +222 -237
  226. package/source/class/qx/event/Messaging.js +55 -48
  227. package/source/class/qx/event/Pool.js +5 -8
  228. package/source/class/qx/event/Registration.js +128 -118
  229. package/source/class/qx/event/Timer.js +50 -96
  230. package/source/class/qx/event/Utils.js +41 -28
  231. package/source/class/qx/event/dispatch/AbstractBubbling.js +133 -93
  232. package/source/class/qx/event/dispatch/Direct.js +46 -51
  233. package/source/class/qx/event/dispatch/DomBubbling.js +8 -15
  234. package/source/class/qx/event/dispatch/MouseCapture.js +74 -91
  235. package/source/class/qx/event/handler/Appear.js +40 -77
  236. package/source/class/qx/event/handler/Application.js +100 -126
  237. package/source/class/qx/event/handler/Capture.js +15 -37
  238. package/source/class/qx/event/handler/DragDrop.js +342 -228
  239. package/source/class/qx/event/handler/Element.js +45 -72
  240. package/source/class/qx/event/handler/ElementResize.js +35 -70
  241. package/source/class/qx/event/handler/Focus.js +908 -637
  242. package/source/class/qx/event/handler/Gesture.js +144 -93
  243. package/source/class/qx/event/handler/GestureCore.js +214 -163
  244. package/source/class/qx/event/handler/Iframe.js +21 -35
  245. package/source/class/qx/event/handler/Input.js +332 -209
  246. package/source/class/qx/event/handler/Keyboard.js +325 -270
  247. package/source/class/qx/event/handler/Mouse.js +212 -173
  248. package/source/class/qx/event/handler/Object.js +13 -31
  249. package/source/class/qx/event/handler/Offline.js +52 -67
  250. package/source/class/qx/event/handler/Orientation.js +56 -62
  251. package/source/class/qx/event/handler/OrientationCore.js +33 -43
  252. package/source/class/qx/event/handler/Pointer.js +84 -72
  253. package/source/class/qx/event/handler/PointerCore.js +183 -105
  254. package/source/class/qx/event/handler/Touch.js +43 -59
  255. package/source/class/qx/event/handler/TouchCore.js +159 -120
  256. package/source/class/qx/event/handler/Transition.js +91 -100
  257. package/source/class/qx/event/handler/UserAction.js +18 -42
  258. package/source/class/qx/event/handler/Video.js +12 -12
  259. package/source/class/qx/event/handler/Window.js +53 -69
  260. package/source/class/qx/event/message/Bus.js +109 -128
  261. package/source/class/qx/event/message/Message.js +14 -29
  262. package/source/class/qx/event/type/Data.js +11 -22
  263. package/source/class/qx/event/type/Dom.js +37 -52
  264. package/source/class/qx/event/type/Drag.js +37 -56
  265. package/source/class/qx/event/type/Event.js +80 -104
  266. package/source/class/qx/event/type/Focus.js +5 -8
  267. package/source/class/qx/event/type/GeoPosition.js +32 -41
  268. package/source/class/qx/event/type/KeyInput.js +9 -19
  269. package/source/class/qx/event/type/KeySequence.js +10 -21
  270. package/source/class/qx/event/type/Mouse.js +69 -72
  271. package/source/class/qx/event/type/MouseWheel.js +5 -9
  272. package/source/class/qx/event/type/Native.js +16 -27
  273. package/source/class/qx/event/type/Orientation.js +18 -30
  274. package/source/class/qx/event/type/Pinch.js +21 -27
  275. package/source/class/qx/event/type/Pointer.js +38 -41
  276. package/source/class/qx/event/type/Rest.js +7 -10
  277. package/source/class/qx/event/type/Roll.js +49 -58
  278. package/source/class/qx/event/type/Rotate.js +21 -27
  279. package/source/class/qx/event/type/Swipe.js +75 -86
  280. package/source/class/qx/event/type/Tap.js +2 -4
  281. package/source/class/qx/event/type/Touch.js +262 -286
  282. package/source/class/qx/event/type/Track.js +23 -28
  283. package/source/class/qx/event/type/dom/Custom.js +24 -20
  284. package/source/class/qx/event/type/dom/Pointer.js +86 -60
  285. package/source/class/qx/event/util/Keyboard.js +94 -106
  286. package/source/class/qx/html/Blocker.js +17 -18
  287. package/source/class/qx/html/Canvas.js +13 -29
  288. package/source/class/qx/html/Element.js +372 -497
  289. package/source/class/qx/html/Factory.js +31 -26
  290. package/source/class/qx/html/Iframe.js +35 -69
  291. package/source/class/qx/html/Image.js +43 -55
  292. package/source/class/qx/html/Input.js +44 -57
  293. package/source/class/qx/html/Jsx.js +49 -41
  294. package/source/class/qx/html/JsxRef.js +3 -5
  295. package/source/class/qx/html/Label.js +20 -32
  296. package/source/class/qx/html/Node.js +362 -422
  297. package/source/class/qx/html/Root.js +7 -16
  298. package/source/class/qx/html/Text.js +34 -27
  299. package/source/class/qx/io/ImageLoader.js +66 -90
  300. package/source/class/qx/io/PartLoader.js +17 -30
  301. package/source/class/qx/io/__init__.js +5 -3
  302. package/source/class/qx/io/exception/Cancel.js +33 -0
  303. package/source/class/qx/io/exception/Exception.js +37 -0
  304. package/source/class/qx/io/exception/Protocol.js +25 -0
  305. package/source/class/qx/io/exception/Transport.js +38 -0
  306. package/source/class/qx/io/exception/__init__.js +4 -0
  307. package/source/class/qx/io/graphql/Client.js +122 -0
  308. package/source/class/qx/io/graphql/__init__.js +9 -0
  309. package/source/class/qx/io/graphql/protocol/Message.js +65 -0
  310. package/source/class/qx/io/graphql/protocol/Request.js +93 -0
  311. package/source/class/qx/io/graphql/protocol/Response.js +63 -0
  312. package/source/class/qx/io/graphql/protocol/__init__.js +6 -0
  313. package/source/class/qx/io/jsonrpc/Client.js +355 -0
  314. package/source/class/qx/io/jsonrpc/__init__.js +15 -0
  315. package/source/class/qx/io/jsonrpc/protocol/Batch.js +103 -0
  316. package/source/class/qx/io/jsonrpc/protocol/Error.js +65 -0
  317. package/source/class/qx/io/jsonrpc/protocol/Message.js +48 -0
  318. package/source/class/qx/io/jsonrpc/protocol/Notification.js +47 -0
  319. package/source/class/qx/io/jsonrpc/protocol/Parser.js +105 -0
  320. package/source/class/qx/io/jsonrpc/protocol/Request.js +94 -0
  321. package/source/class/qx/io/jsonrpc/protocol/Result.js +49 -0
  322. package/source/class/qx/io/jsonrpc/protocol/__init__.js +5 -0
  323. package/source/class/qx/io/part/ClosurePart.js +16 -35
  324. package/source/class/qx/io/part/Package.js +35 -63
  325. package/source/class/qx/io/part/Part.js +29 -53
  326. package/source/class/qx/io/part/__init__.js +4 -4
  327. package/source/class/qx/io/request/AbstractRequest.js +268 -201
  328. package/source/class/qx/io/request/Jsonp.js +16 -19
  329. package/source/class/qx/io/request/Xhr.js +38 -37
  330. package/source/class/qx/io/request/__init__.js +1 -1
  331. package/source/class/qx/io/request/authentication/Basic.js +7 -13
  332. package/source/class/qx/io/request/authentication/Bearer.js +46 -0
  333. package/source/class/qx/io/request/authentication/IAuthentication.js +3 -6
  334. package/source/class/qx/io/request/authentication/__init__.js +1 -1
  335. package/source/class/qx/io/rest/Resource.js +122 -90
  336. package/source/class/qx/io/transport/AbstractClient.js +121 -0
  337. package/source/class/qx/io/transport/AbstractTransport.js +40 -0
  338. package/source/class/qx/io/transport/Fetch.js +98 -0
  339. package/source/class/qx/io/transport/ITransport.js +42 -0
  340. package/source/class/qx/io/transport/PostMessage.js +54 -0
  341. package/source/class/qx/io/transport/Websocket.js +97 -0
  342. package/source/class/qx/io/transport/Xhr.js +138 -0
  343. package/source/class/qx/io/transport/__init__.js +18 -0
  344. package/source/class/qx/lang/Array.js +133 -170
  345. package/source/class/qx/lang/Function.js +101 -104
  346. package/source/class/qx/lang/Json.js +1041 -774
  347. package/source/class/qx/lang/Number.js +11 -16
  348. package/source/class/qx/lang/Object.js +129 -100
  349. package/source/class/qx/lang/String.js +86 -94
  350. package/source/class/qx/lang/Type.js +44 -65
  351. package/source/class/qx/lang/normalize/Array.js +39 -49
  352. package/source/class/qx/lang/normalize/Date.js +50 -32
  353. package/source/class/qx/lang/normalize/Error.js +4 -7
  354. package/source/class/qx/lang/normalize/Function.js +11 -19
  355. package/source/class/qx/lang/normalize/Number.js +3 -5
  356. package/source/class/qx/lang/normalize/Object.js +17 -18
  357. package/source/class/qx/lang/normalize/String.js +39 -40
  358. package/source/class/qx/locale/Date.js +175 -178
  359. package/source/class/qx/locale/Key.js +13 -11
  360. package/source/class/qx/locale/LocalizedString.js +18 -15
  361. package/source/class/qx/locale/MTranslation.js +22 -23
  362. package/source/class/qx/locale/Manager.js +62 -100
  363. package/source/class/qx/locale/Number.js +20 -12
  364. package/source/class/qx/locale/String.js +26 -15
  365. package/source/class/qx/log/Logger.js +128 -180
  366. package/source/class/qx/log/__init__.js +3 -3
  367. package/source/class/qx/log/appender/Console.js +100 -111
  368. package/source/class/qx/log/appender/Element.js +25 -39
  369. package/source/class/qx/log/appender/Formatter.js +117 -66
  370. package/source/class/qx/log/appender/Native.js +4 -10
  371. package/source/class/qx/log/appender/NodeConsole.js +20 -28
  372. package/source/class/qx/log/appender/PhoneGap.js +5 -13
  373. package/source/class/qx/log/appender/RhinoConsole.js +12 -23
  374. package/source/class/qx/log/appender/RhinoFile.js +19 -26
  375. package/source/class/qx/log/appender/RingBuffer.js +10 -19
  376. package/source/class/qx/log/appender/Util.js +11 -9
  377. package/source/class/qx/module/Animation.js +73 -63
  378. package/source/class/qx/module/Attribute.js +27 -46
  379. package/source/class/qx/module/Blocker.js +33 -41
  380. package/source/class/qx/module/Cookie.js +6 -10
  381. package/source/class/qx/module/Css.js +82 -97
  382. package/source/class/qx/module/Dataset.js +12 -24
  383. package/source/class/qx/module/Environment.js +4 -6
  384. package/source/class/qx/module/Event.js +124 -127
  385. package/source/class/qx/module/Io.js +5 -9
  386. package/source/class/qx/module/Manipulating.js +98 -117
  387. package/source/class/qx/module/MatchMedia.js +50 -24
  388. package/source/class/qx/module/Messaging.js +6 -10
  389. package/source/class/qx/module/Placeholder.js +54 -44
  390. package/source/class/qx/module/Placement.js +33 -33
  391. package/source/class/qx/module/Rest.js +3 -4
  392. package/source/class/qx/module/Storage.js +34 -48
  393. package/source/class/qx/module/Template.js +6 -9
  394. package/source/class/qx/module/TextSelection.js +13 -21
  395. package/source/class/qx/module/Transform.js +28 -45
  396. package/source/class/qx/module/Traversing.js +160 -154
  397. package/source/class/qx/module/__init__.js +1 -1
  398. package/source/class/qx/module/dev/FakeServer.js +19 -25
  399. package/source/class/qx/module/event/GestureHandler.js +25 -13
  400. package/source/class/qx/module/event/Keyboard.js +42 -31
  401. package/source/class/qx/module/event/Mouse.js +48 -46
  402. package/source/class/qx/module/event/Native.js +18 -30
  403. package/source/class/qx/module/event/Orientation.js +11 -18
  404. package/source/class/qx/module/event/OrientationHandler.js +19 -17
  405. package/source/class/qx/module/event/Pinch.js +13 -14
  406. package/source/class/qx/module/event/Pointer.js +22 -22
  407. package/source/class/qx/module/event/PointerHandler.js +14 -11
  408. package/source/class/qx/module/event/Rotate.js +13 -14
  409. package/source/class/qx/module/event/Swipe.js +18 -24
  410. package/source/class/qx/module/event/Tap.js +25 -25
  411. package/source/class/qx/module/event/Touch.js +4 -7
  412. package/source/class/qx/module/event/TouchHandler.js +16 -16
  413. package/source/class/qx/module/event/Track.js +13 -14
  414. package/source/class/qx/module/util/Array.js +30 -41
  415. package/source/class/qx/module/util/Function.js +1 -2
  416. package/source/class/qx/module/util/Object.js +8 -11
  417. package/source/class/qx/module/util/String.js +10 -18
  418. package/source/class/qx/module/util/Type.js +3 -4
  419. package/source/class/qx/test/Annotation.js +195 -89
  420. package/source/class/qx/test/Bootstrap.js +98 -124
  421. package/source/class/qx/test/Browser.js +8 -11
  422. package/source/class/qx/test/Class.js +164 -198
  423. package/source/class/qx/test/Dom.js +10 -28
  424. package/source/class/qx/test/EditDistance.js +16 -16
  425. package/source/class/qx/test/Interface.js +380 -383
  426. package/source/class/qx/test/MAppearance.js +10 -14
  427. package/source/class/qx/test/MDecoration.js +1 -3
  428. package/source/class/qx/test/Mixin.js +418 -173
  429. package/source/class/qx/test/Promise.js +422 -333
  430. package/source/class/qx/test/Theme.js +204 -179
  431. package/source/class/qx/test/Xml.js +155 -84
  432. package/source/class/qx/test/application/Routing.js +45 -44
  433. package/source/class/qx/test/bom/AnimationFrame.js +23 -21
  434. package/source/class/qx/test/bom/Attribute.js +66 -47
  435. package/source/class/qx/test/bom/Basic.js +52 -27
  436. package/source/class/qx/test/bom/Blocker.js +100 -70
  437. package/source/class/qx/test/bom/Class.js +19 -34
  438. package/source/class/qx/test/bom/Cookie.js +49 -28
  439. package/source/class/qx/test/bom/Dataset.js +12 -24
  440. package/source/class/qx/test/bom/Element.js +55 -47
  441. package/source/class/qx/test/bom/Event.js +68 -45
  442. package/source/class/qx/test/bom/FileReader.js +6 -12
  443. package/source/class/qx/test/bom/Font.js +256 -118
  444. package/source/class/qx/test/bom/GeoLocation.js +82 -64
  445. package/source/class/qx/test/bom/History.js +63 -84
  446. package/source/class/qx/test/bom/IdleCallback.js +51 -38
  447. package/source/class/qx/test/bom/Iframe.js +14 -18
  448. package/source/class/qx/test/bom/Label.js +74 -105
  449. package/source/class/qx/test/bom/Location.js +70 -99
  450. package/source/class/qx/test/bom/PageVisibility.js +13 -16
  451. package/source/class/qx/test/bom/Selector.js +16 -16
  452. package/source/class/qx/test/bom/String.js +19 -15
  453. package/source/class/qx/test/bom/Stylesheet.js +39 -48
  454. package/source/class/qx/test/bom/Template.js +49 -57
  455. package/source/class/qx/test/bom/Viewport.js +7 -11
  456. package/source/class/qx/test/bom/WebWorker.js +49 -37
  457. package/source/class/qx/test/bom/Window.js +6 -12
  458. package/source/class/qx/test/bom/client/Css.js +26 -19
  459. package/source/class/qx/test/bom/client/Device.js +29 -18
  460. package/source/class/qx/test/bom/client/OperatingSystem.js +17 -20
  461. package/source/class/qx/test/bom/client/Pdfjs.js +15 -13
  462. package/source/class/qx/test/bom/element/AnimationHandle.js +20 -17
  463. package/source/class/qx/test/bom/element/AnimationJs.js +48 -31
  464. package/source/class/qx/test/bom/element/Background.js +93 -46
  465. package/source/class/qx/test/bom/element/BoxSizing.js +66 -61
  466. package/source/class/qx/test/bom/element/Class.js +33 -58
  467. package/source/class/qx/test/bom/element/Dimension.js +58 -37
  468. package/source/class/qx/test/bom/element/Style.js +87 -83
  469. package/source/class/qx/test/bom/element/Transform.js +209 -86
  470. package/source/class/qx/test/bom/media/Audio.js +18 -14
  471. package/source/class/qx/test/bom/media/MediaTestCase.js +61 -66
  472. package/source/class/qx/test/bom/media/Video.js +39 -28
  473. package/source/class/qx/test/bom/request/Jsonp.js +60 -57
  474. package/source/class/qx/test/bom/request/Script.js +150 -138
  475. package/source/class/qx/test/bom/request/SimpleXhr.js +206 -134
  476. package/source/class/qx/test/bom/request/Xhr.js +179 -132
  477. package/source/class/qx/test/bom/request/XhrWithRemote.js +206 -160
  478. package/source/class/qx/test/bom/rest/Resource.js +345 -281
  479. package/source/class/qx/test/bom/rest/ResourceWithRemote.js +74 -57
  480. package/source/class/qx/test/bom/storage/Local.js +3 -4
  481. package/source/class/qx/test/bom/storage/Session.js +3 -4
  482. package/source/class/qx/test/bom/storage/WebStorageTestCase.js +28 -27
  483. package/source/class/qx/test/bom/webfonts/Abstract.js +8 -10
  484. package/source/class/qx/test/bom/webfonts/Manager.js +127 -80
  485. package/source/class/qx/test/bom/webfonts/Validator.js +36 -30
  486. package/source/class/qx/test/compiler/ClassFile.js +29 -11
  487. package/source/class/qx/test/compiler/jsdoc/Parser.js +122 -96
  488. package/source/class/qx/test/core/Assert.js +151 -86
  489. package/source/class/qx/test/core/Environment.js +162 -123
  490. package/source/class/qx/test/core/EventEmitterDummy.js +7 -8
  491. package/source/class/qx/test/core/InheritanceDummy.js +23 -33
  492. package/source/class/qx/test/core/MemoryManagement.js +13 -5
  493. package/source/class/qx/test/core/Object.js +106 -112
  494. package/source/class/qx/test/core/ObjectId.js +7 -6
  495. package/source/class/qx/test/core/Property.js +483 -387
  496. package/source/class/qx/test/core/PropertyHelper.js +49 -64
  497. package/source/class/qx/test/core/Target.js +9 -13
  498. package/source/class/qx/test/core/Validation.js +409 -136
  499. package/source/class/qx/test/data/DataArray.js +1059 -394
  500. package/source/class/qx/test/data/DataArrayWithChangeBubble.js +315 -172
  501. package/source/class/qx/test/data/__init__.js +4 -4
  502. package/source/class/qx/test/data/controller/Form.js +141 -99
  503. package/source/class/qx/test/data/controller/FormWithArrayAndModel.js +66 -51
  504. package/source/class/qx/test/data/controller/List.js +644 -336
  505. package/source/class/qx/test/data/controller/ListReverse.js +64 -63
  506. package/source/class/qx/test/data/controller/ListWithObjects.js +305 -149
  507. package/source/class/qx/test/data/controller/Object.js +252 -94
  508. package/source/class/qx/test/data/controller/Tree.js +1219 -383
  509. package/source/class/qx/test/data/controller/__init__.js +4 -4
  510. package/source/class/qx/test/data/marshal/Json.js +832 -447
  511. package/source/class/qx/test/data/marshal/__init__.js +4 -4
  512. package/source/class/qx/test/data/singlevalue/Array.js +383 -144
  513. package/source/class/qx/test/data/singlevalue/Deep.js +361 -175
  514. package/source/class/qx/test/data/singlevalue/Resolve.js +51 -29
  515. package/source/class/qx/test/data/singlevalue/Simple.js +530 -208
  516. package/source/class/qx/test/data/singlevalue/TextFieldDummy.js +32 -28
  517. package/source/class/qx/test/data/singlevalue/__init__.js +4 -4
  518. package/source/class/qx/test/data/store/Json.js +574 -313
  519. package/source/class/qx/test/data/store/Jsonp.js +103 -77
  520. package/source/class/qx/test/data/store/Offline.js +127 -110
  521. package/source/class/qx/test/data/store/Rest.js +58 -52
  522. package/source/class/qx/test/data/store/RestWithRemote.js +36 -30
  523. package/source/class/qx/test/data/store/__init__.js +4 -4
  524. package/source/class/qx/test/dev/Debug.js +9 -13
  525. package/source/class/qx/test/dev/StackTrace.js +51 -42
  526. package/source/class/qx/test/dev/unit/Requirements.js +36 -49
  527. package/source/class/qx/test/dev/unit/Sinon.js +85 -73
  528. package/source/class/qx/test/dev/unit/TestCase.js +12 -17
  529. package/source/class/qx/test/dom/Element.js +17 -12
  530. package/source/class/qx/test/dom/Hierarchy.js +53 -38
  531. package/source/class/qx/test/dom/Node.js +97 -43
  532. package/source/class/qx/test/event/Bubbling.js +258 -88
  533. package/source/class/qx/test/event/Emitter.js +38 -39
  534. package/source/class/qx/test/event/GlobalError.js +59 -87
  535. package/source/class/qx/test/event/GlobalEventMonitors.js +22 -25
  536. package/source/class/qx/test/event/Messaging.js +66 -49
  537. package/source/class/qx/test/event/MockBubblingHandler.js +10 -15
  538. package/source/class/qx/test/event/MockHandler.js +14 -33
  539. package/source/class/qx/test/event/Registration.js +38 -32
  540. package/source/class/qx/test/event/Timer.js +61 -39
  541. package/source/class/qx/test/event/Utils.js +164 -123
  542. package/source/class/qx/test/event/dispatch/MouseCapture.js +61 -51
  543. package/source/class/qx/test/event/dispatch/MouseEventOnDocument.js +22 -23
  544. package/source/class/qx/test/event/dispatch/TestingHandler.js +8 -10
  545. package/source/class/qx/test/event/dispatch/TestingWindow.js +9 -13
  546. package/source/class/qx/test/event/dispatch/__init__.js +4 -4
  547. package/source/class/qx/test/event/handler/Offline.js +7 -8
  548. package/source/class/qx/test/event/message/Bus.js +112 -72
  549. package/source/class/qx/test/event/message/__init__.js +4 -4
  550. package/source/class/qx/test/event/type/Dom.js +12 -11
  551. package/source/class/qx/test/event/type/Event.js +7 -16
  552. package/source/class/qx/test/event/type/Mouse.js +12 -11
  553. package/source/class/qx/test/event/type/Native.js +12 -11
  554. package/source/class/qx/test/event/type/__init__.js +4 -4
  555. package/source/class/qx/test/event/util/Keyboard.js +4 -3
  556. package/source/class/qx/test/html/Element.js +538 -239
  557. package/source/class/qx/test/html/Iframe.js +85 -73
  558. package/source/class/qx/test/html/jsx/TestJsx.js +15 -4
  559. package/source/class/qx/test/html/jsx/TestJsxBrowser.js +37 -19
  560. package/source/class/qx/test/html/jsx/TestWidget.js +26 -26
  561. package/source/class/qx/test/io/ImageLoader.js +256 -160
  562. package/source/class/qx/test/io/MAssert.js +46 -0
  563. package/source/class/qx/test/io/MRemoteTest.js +9 -11
  564. package/source/class/qx/test/io/__init__.js +4 -4
  565. package/source/class/qx/test/io/graphql/Client.js +190 -0
  566. package/source/class/qx/test/io/graphql/ClientFetch.js +34 -0
  567. package/source/class/qx/test/io/graphql/Request.js +41 -0
  568. package/source/class/qx/test/io/jsonrpc/Client.js +333 -0
  569. package/source/class/qx/test/io/jsonrpc/Protocol.js +108 -0
  570. package/source/class/qx/test/io/request/Jsonp.js +23 -20
  571. package/source/class/qx/test/io/request/JsonpWithRemote.js +25 -22
  572. package/source/class/qx/test/io/request/MRequest.js +137 -114
  573. package/source/class/qx/test/io/request/Xhr.js +367 -209
  574. package/source/class/qx/test/io/request/XhrWithRemote.js +133 -100
  575. package/source/class/qx/test/io/rest/Resource.js +325 -270
  576. package/source/class/qx/test/io/rest/ResourceWithRemote.js +75 -58
  577. package/source/class/qx/test/io/transport/PostMessage.js +56 -0
  578. package/source/class/qx/test/io/transport/Websocket.js +64 -0
  579. package/source/class/qx/test/lang/Array.js +79 -105
  580. package/source/class/qx/test/lang/Function.js +64 -53
  581. package/source/class/qx/test/lang/Json.js +51 -79
  582. package/source/class/qx/test/lang/Number.js +4 -6
  583. package/source/class/qx/test/lang/Object.js +143 -133
  584. package/source/class/qx/test/lang/String.js +151 -95
  585. package/source/class/qx/test/lang/Type.js +34 -44
  586. package/source/class/qx/test/lang/Webkit.js +8 -13
  587. package/source/class/qx/test/lang/normalize/Array.js +121 -68
  588. package/source/class/qx/test/lang/normalize/Date.js +232 -49
  589. package/source/class/qx/test/lang/normalize/Error.js +5 -8
  590. package/source/class/qx/test/lang/normalize/Function.js +7 -13
  591. package/source/class/qx/test/lang/normalize/Object.js +22 -29
  592. package/source/class/qx/test/lang/normalize/String.js +19 -28
  593. package/source/class/qx/test/locale/Date.js +91 -43
  594. package/source/class/qx/test/locale/Locale.js +52 -32
  595. package/source/class/qx/test/locale/LocalizedString.js +12 -12
  596. package/source/class/qx/test/log/DeprecationMethodOverriding.js +52 -31
  597. package/source/class/qx/test/log/Filters.js +6 -3
  598. package/source/class/qx/test/log/Formatter.js +13 -7
  599. package/source/class/qx/test/log/Logger.js +19 -29
  600. package/source/class/qx/test/log/RingBuffer.js +14 -25
  601. package/source/class/qx/test/log/__init__.js +4 -4
  602. package/source/class/qx/test/log/fixture/ClassA.js +22 -22
  603. package/source/class/qx/test/log/fixture/ClassB1.js +7 -9
  604. package/source/class/qx/test/log/fixture/ClassB2.js +5 -7
  605. package/source/class/qx/test/log/fixture/ClassC1.js +5 -7
  606. package/source/class/qx/test/log/fixture/ClassC2.js +7 -9
  607. package/source/class/qx/test/mobile/LocaleSwitch.js +29 -36
  608. package/source/class/qx/test/mobile/MobileTestCase.js +39 -49
  609. package/source/class/qx/test/mobile/basic/Atom.js +129 -53
  610. package/source/class/qx/test/mobile/basic/Image.js +41 -31
  611. package/source/class/qx/test/mobile/basic/Label.js +6 -10
  612. package/source/class/qx/test/mobile/container/Carousel.js +41 -45
  613. package/source/class/qx/test/mobile/container/Composite.js +48 -65
  614. package/source/class/qx/test/mobile/container/Drawer.js +42 -29
  615. package/source/class/qx/test/mobile/container/Navigation.js +14 -20
  616. package/source/class/qx/test/mobile/container/Scroll.js +23 -19
  617. package/source/class/qx/test/mobile/core/Widget.js +150 -86
  618. package/source/class/qx/test/mobile/dialog/Menu.js +47 -26
  619. package/source/class/qx/test/mobile/dialog/Popup.js +30 -19
  620. package/source/class/qx/test/mobile/embed/Html.js +5 -8
  621. package/source/class/qx/test/mobile/form/Button.js +15 -13
  622. package/source/class/qx/test/mobile/form/CheckBox.js +21 -17
  623. package/source/class/qx/test/mobile/form/Form.js +37 -24
  624. package/source/class/qx/test/mobile/form/Group.js +5 -9
  625. package/source/class/qx/test/mobile/form/Label.js +11 -13
  626. package/source/class/qx/test/mobile/form/NumberField.js +49 -45
  627. package/source/class/qx/test/mobile/form/RadioButton.js +30 -19
  628. package/source/class/qx/test/mobile/form/SelectBox.js +39 -25
  629. package/source/class/qx/test/mobile/form/SingleRenderer.js +31 -27
  630. package/source/class/qx/test/mobile/form/Slider.js +55 -35
  631. package/source/class/qx/test/mobile/form/TextArea.js +34 -24
  632. package/source/class/qx/test/mobile/form/TextField.js +34 -24
  633. package/source/class/qx/test/mobile/form/ToggleButton.js +10 -14
  634. package/source/class/qx/test/mobile/layout/Card.js +21 -17
  635. package/source/class/qx/test/mobile/layout/HBox.js +25 -20
  636. package/source/class/qx/test/mobile/layout/VBox.js +25 -21
  637. package/source/class/qx/test/mobile/list/List.js +114 -83
  638. package/source/class/qx/test/mobile/navigationbar/NavigationBar.js +5 -9
  639. package/source/class/qx/test/mobile/page/Manager.js +7 -13
  640. package/source/class/qx/test/mobile/page/NavigationPage.js +7 -17
  641. package/source/class/qx/test/mobile/page/Page.js +101 -68
  642. package/source/class/qx/test/mobile/tabbar/TabBar.js +11 -21
  643. package/source/class/qx/test/mobile/toolbar/Toolbar.js +16 -16
  644. package/source/class/qx/test/performance/BaseCall.js +31 -36
  645. package/source/class/qx/test/performance/Event.js +60 -53
  646. package/source/class/qx/test/performance/Object.js +16 -22
  647. package/source/class/qx/test/performance/Property.js +20 -22
  648. package/source/class/qx/test/performance/data/Marshaling.js +25 -30
  649. package/source/class/qx/test/performance/decorator/AbstractDecorator.js +22 -34
  650. package/source/class/qx/test/performance/decorator/Background.js +4 -6
  651. package/source/class/qx/test/performance/decorator/BackgroundScale.js +6 -8
  652. package/source/class/qx/test/performance/decorator/Single.js +4 -6
  653. package/source/class/qx/test/performance/element/Element.js +50 -67
  654. package/source/class/qx/test/performance/widget/AbstractWidget.js +31 -44
  655. package/source/class/qx/test/performance/widget/Button.js +5 -7
  656. package/source/class/qx/test/performance/widget/Label.js +5 -7
  657. package/source/class/qx/test/performance/widget/RichLabel.js +6 -8
  658. package/source/class/qx/test/performance/widget/Widget.js +5 -7
  659. package/source/class/qx/test/performance/widget/WidgetWithDecorator.js +7 -9
  660. package/source/class/qx/test/performance/widget/WidgetWithSingle.js +9 -11
  661. package/source/class/qx/test/renderer/Color.js +22 -49
  662. package/source/class/qx/test/testclasses/BaseClassBoth.js +11 -8
  663. package/source/class/qx/test/testclasses/BaseClassIncluded.js +5 -6
  664. package/source/class/qx/test/testclasses/BaseClassPatched.js +15 -8
  665. package/source/class/qx/test/testclasses/DerivedClassBoth.js +7 -7
  666. package/source/class/qx/test/testclasses/DerivedClassIncluded.js +7 -7
  667. package/source/class/qx/test/testclasses/DerivedClassPatched.js +7 -7
  668. package/source/class/qx/test/testclasses/MMixinOne.js +4 -4
  669. package/source/class/qx/test/testclasses/MMixinTwo.js +2 -2
  670. package/source/class/qx/test/testclasses/RootClass.js +8 -8
  671. package/source/class/qx/test/theme/__init__.js +4 -4
  672. package/source/class/qx/test/theme/manager/Color.js +52 -66
  673. package/source/class/qx/test/theme/manager/Decoration.js +177 -154
  674. package/source/class/qx/test/theme/manager/Font.js +68 -39
  675. package/source/class/qx/test/theme/manager/Icon.js +46 -43
  676. package/source/class/qx/test/theme/manager/Meta.js +121 -110
  677. package/source/class/qx/test/theme/manager/__init__.js +4 -4
  678. package/source/class/qx/test/theme/manager/mock/Appearance.js +17 -23
  679. package/source/class/qx/test/theme/manager/mock/Color.js +7 -9
  680. package/source/class/qx/test/theme/manager/mock/Decoration.js +7 -10
  681. package/source/class/qx/test/theme/manager/mock/Font.js +6 -10
  682. package/source/class/qx/test/theme/simple/Appearance.js +268 -210
  683. package/source/class/qx/test/tool/utils/Utils.js +10 -8
  684. package/source/class/qx/test/toolchain/PrivateOptimization.js +20 -13
  685. package/source/class/qx/test/toolchain/TestRunner.js +12 -12
  686. package/source/class/qx/test/toolchain/VariantOptimization.js +37 -26
  687. package/source/class/qx/test/toolchain/__init__.js +4 -4
  688. package/source/class/qx/test/type/Array.js +8 -12
  689. package/source/class/qx/test/type/BaseArray.js +58 -78
  690. package/source/class/qx/test/type/BaseString.js +27 -65
  691. package/source/class/qx/test/type/__init__.js +4 -4
  692. package/source/class/qx/test/ui/BackgroundColor.js +20 -21
  693. package/source/class/qx/test/ui/ChildrenHandling.js +136 -81
  694. package/source/class/qx/test/ui/Destroy.js +310 -248
  695. package/source/class/qx/test/ui/Focus.js +40 -87
  696. package/source/class/qx/test/ui/Insets.js +14 -18
  697. package/source/class/qx/test/ui/LayoutTestCase.js +99 -92
  698. package/source/class/qx/test/ui/LocaleSwitch.js +37 -41
  699. package/source/class/qx/test/ui/RadioItems.js +11 -22
  700. package/source/class/qx/test/ui/Widget.js +13 -17
  701. package/source/class/qx/test/ui/Window.js +26 -39
  702. package/source/class/qx/test/ui/basic/Atom.js +37 -25
  703. package/source/class/qx/test/ui/basic/Image.js +179 -138
  704. package/source/class/qx/test/ui/basic/Label.js +147 -65
  705. package/source/class/qx/test/ui/basic/__init__.js +4 -4
  706. package/source/class/qx/test/ui/command/Command.js +105 -69
  707. package/source/class/qx/test/ui/command/Group.js +24 -21
  708. package/source/class/qx/test/ui/command/GroupManager.js +7 -12
  709. package/source/class/qx/test/ui/container/Stack.js +26 -36
  710. package/source/class/qx/test/ui/core/AbstractScrollArea.js +84 -67
  711. package/source/class/qx/test/ui/core/Appearance.js +53 -54
  712. package/source/class/qx/test/ui/core/Blocker.js +80 -44
  713. package/source/class/qx/test/ui/core/DragDropScrolling.js +69 -55
  714. package/source/class/qx/test/ui/core/Placement.js +22 -34
  715. package/source/class/qx/test/ui/core/Queues.js +28 -39
  716. package/source/class/qx/test/ui/core/SizeHint.js +32 -76
  717. package/source/class/qx/test/ui/core/SizeHintX.js +8 -15
  718. package/source/class/qx/test/ui/core/SizeHintY.js +8 -15
  719. package/source/class/qx/test/ui/core/Spacer.js +11 -18
  720. package/source/class/qx/test/ui/core/Widget.js +117 -112
  721. package/source/class/qx/test/ui/core/__init__.js +4 -4
  722. package/source/class/qx/test/ui/decoration/LinearGradient.js +18 -14
  723. package/source/class/qx/test/ui/embed/Iframe.js +70 -66
  724. package/source/class/qx/test/ui/embed/__init__.js +4 -4
  725. package/source/class/qx/test/ui/form/AbstractSelectBox.js +11 -16
  726. package/source/class/qx/test/ui/form/AbstractVirtualBox.js +12 -19
  727. package/source/class/qx/test/ui/form/BooleanFormat.js +40 -25
  728. package/source/class/qx/test/ui/form/Color.js +29 -19
  729. package/source/class/qx/test/ui/form/ComboBox.js +39 -25
  730. package/source/class/qx/test/ui/form/Date.js +34 -21
  731. package/source/class/qx/test/ui/form/DateField.js +16 -19
  732. package/source/class/qx/test/ui/form/Executable.js +98 -68
  733. package/source/class/qx/test/ui/form/Field.js +65 -54
  734. package/source/class/qx/test/ui/form/Form.js +211 -123
  735. package/source/class/qx/test/ui/form/FormManager.js +72 -100
  736. package/source/class/qx/test/ui/form/FormValidator.js +549 -399
  737. package/source/class/qx/test/ui/form/Label.js +87 -65
  738. package/source/class/qx/test/ui/form/List.js +19 -19
  739. package/source/class/qx/test/ui/form/MenuButton.js +26 -20
  740. package/source/class/qx/test/ui/form/ModelProperty.js +40 -36
  741. package/source/class/qx/test/ui/form/ModelSelection.js +39 -84
  742. package/source/class/qx/test/ui/form/NumberFormat.js +30 -19
  743. package/source/class/qx/test/ui/form/Placeholder.js +147 -87
  744. package/source/class/qx/test/ui/form/RadioButtonGroup.js +31 -26
  745. package/source/class/qx/test/ui/form/RadioGroup.js +58 -54
  746. package/source/class/qx/test/ui/form/Range.js +63 -28
  747. package/source/class/qx/test/ui/form/Renderer.js +39 -33
  748. package/source/class/qx/test/ui/form/Resetter.js +21 -35
  749. package/source/class/qx/test/ui/form/Slider.js +37 -21
  750. package/source/class/qx/test/ui/form/Spinner.js +9 -5
  751. package/source/class/qx/test/ui/form/SplitButton.js +7 -11
  752. package/source/class/qx/test/ui/form/StringFormat.js +60 -30
  753. package/source/class/qx/test/ui/form/TextArea.js +59 -41
  754. package/source/class/qx/test/ui/form/TextField.js +14 -16
  755. package/source/class/qx/test/ui/form/ToggleButton.js +20 -24
  756. package/source/class/qx/test/ui/form/VirtualSelectBox.js +66 -40
  757. package/source/class/qx/test/ui/form/__init__.js +4 -4
  758. package/source/class/qx/test/ui/form/virtual/VirtualComboBox.js +58 -60
  759. package/source/class/qx/test/ui/form/virtual/VirtualDropDownList.js +120 -110
  760. package/source/class/qx/test/ui/form/virtual/VirtualSelectBox.js +43 -27
  761. package/source/class/qx/test/ui/groupbox/CheckGroupBox.js +13 -18
  762. package/source/class/qx/test/ui/indicator/ProgressBar.js +73 -48
  763. package/source/class/qx/test/ui/layout/Box.js +23 -22
  764. package/source/class/qx/test/ui/layout/Flow.js +233 -153
  765. package/source/class/qx/test/ui/layout/Grid.js +88 -101
  766. package/source/class/qx/test/ui/layout/LayoutItem.js +57 -83
  767. package/source/class/qx/test/ui/layout/LayoutRoot.js +7 -11
  768. package/source/class/qx/test/ui/layout/Util.js +30 -31
  769. package/source/class/qx/test/ui/layout/__init__.js +4 -4
  770. package/source/class/qx/test/ui/list/AbstractListTest.js +13 -21
  771. package/source/class/qx/test/ui/list/Group.js +191 -114
  772. package/source/class/qx/test/ui/list/List.js +189 -132
  773. package/source/class/qx/test/ui/list/MAssert.js +14 -9
  774. package/source/class/qx/test/ui/list/ObjectGroup.js +131 -109
  775. package/source/class/qx/test/ui/list/core/MultiSelection.js +58 -44
  776. package/source/class/qx/test/ui/list/core/SingleSelection.js +43 -43
  777. package/source/class/qx/test/ui/list/fixture/GroupMock.js +6 -9
  778. package/source/class/qx/test/ui/list/fixture/ItemMock.js +9 -13
  779. package/source/class/qx/test/ui/root/Inline.js +22 -20
  780. package/source/class/qx/test/ui/selection/AbstractMultiSelectonTest.js +188 -105
  781. package/source/class/qx/test/ui/selection/AbstractSingleSelectonTest.js +173 -125
  782. package/source/class/qx/test/ui/selection/ListMultiSelection.js +19 -21
  783. package/source/class/qx/test/ui/selection/ListSingleSelection.js +19 -21
  784. package/source/class/qx/test/ui/selection/RadioGroup.js +41 -29
  785. package/source/class/qx/test/ui/selection/SelectBox.js +11 -17
  786. package/source/class/qx/test/ui/selection/Stack.js +22 -27
  787. package/source/class/qx/test/ui/selection/TabView.js +35 -26
  788. package/source/class/qx/test/ui/selection/TreeMultiSelection.js +14 -19
  789. package/source/class/qx/test/ui/selection/TreeSingleSelection.js +20 -24
  790. package/source/class/qx/test/ui/selection/__init__.js +4 -4
  791. package/source/class/qx/test/ui/table/Dispose.js +46 -46
  792. package/source/class/qx/test/ui/table/Table.js +74 -69
  793. package/source/class/qx/test/ui/table/__init__.js +4 -4
  794. package/source/class/qx/test/ui/table/celleditor/AbstractField.js +14 -28
  795. package/source/class/qx/test/ui/table/celleditor/ComboBox.js +11 -18
  796. package/source/class/qx/test/ui/table/celleditor/PasswordField.js +6 -10
  797. package/source/class/qx/test/ui/table/celleditor/SelectBox.js +16 -32
  798. package/source/class/qx/test/ui/table/celleditor/TextField.js +6 -9
  799. package/source/class/qx/test/ui/table/celleditor/__init__.js +4 -4
  800. package/source/class/qx/test/ui/table/columnmodel/Basic.js +130 -129
  801. package/source/class/qx/test/ui/table/model/Filtered.js +51 -36
  802. package/source/class/qx/test/ui/table/model/Simple.js +43 -45
  803. package/source/class/qx/test/ui/table/selection/Model.js +70 -22
  804. package/source/class/qx/test/ui/toolbar/OverflowHandling.js +145 -123
  805. package/source/class/qx/test/ui/toolbar/ToolBar.js +20 -30
  806. package/source/class/qx/test/ui/tree/Tree.js +63 -42
  807. package/source/class/qx/test/ui/tree/TreeFolder.js +44 -46
  808. package/source/class/qx/test/ui/tree/virtual/AbstractTreeTest.js +61 -96
  809. package/source/class/qx/test/ui/tree/virtual/MultiSelection.js +68 -39
  810. package/source/class/qx/test/ui/tree/virtual/OneSelection.js +82 -42
  811. package/source/class/qx/test/ui/tree/virtual/OpenCloseController.js +80 -101
  812. package/source/class/qx/test/ui/tree/virtual/SingleSelection.js +40 -32
  813. package/source/class/qx/test/ui/tree/virtual/Sorting.js +46 -47
  814. package/source/class/qx/test/ui/tree/virtual/Tree.js +267 -191
  815. package/source/class/qx/test/ui/tree/virtual/TreeItem.js +60 -63
  816. package/source/class/qx/test/ui/tree/virtual/UtilTest.js +65 -50
  817. package/source/class/qx/test/ui/tree/virtual/WidgetProvider.js +127 -132
  818. package/source/class/qx/test/ui/virtual/Axis.js +210 -193
  819. package/source/class/qx/test/ui/virtual/Pane.js +287 -190
  820. package/source/class/qx/test/ui/virtual/PaneUpdate.js +71 -77
  821. package/source/class/qx/test/ui/virtual/PointerEventMock.js +10 -13
  822. package/source/class/qx/test/ui/virtual/Scroller.js +29 -39
  823. package/source/class/qx/test/ui/virtual/__init__.js +4 -4
  824. package/source/class/qx/test/ui/virtual/cell/WidgetCell.js +39 -40
  825. package/source/class/qx/test/ui/virtual/layer/CellSpanManager.js +157 -127
  826. package/source/class/qx/test/ui/virtual/layer/Column.js +6 -10
  827. package/source/class/qx/test/ui/virtual/layer/GridLines.js +6 -10
  828. package/source/class/qx/test/ui/virtual/layer/GridLinesHorizontal.js +6 -9
  829. package/source/class/qx/test/ui/virtual/layer/GridLinesVertical.js +6 -9
  830. package/source/class/qx/test/ui/virtual/layer/HtmlCell.js +12 -19
  831. package/source/class/qx/test/ui/virtual/layer/HtmlCellSpan.js +13 -21
  832. package/source/class/qx/test/ui/virtual/layer/LayerMock.js +31 -43
  833. package/source/class/qx/test/ui/virtual/layer/LayerSimple.js +26 -26
  834. package/source/class/qx/test/ui/virtual/layer/LayerTestCase.js +52 -50
  835. package/source/class/qx/test/ui/virtual/layer/Row.js +6 -10
  836. package/source/class/qx/test/ui/virtual/layer/WidgetCell.js +45 -52
  837. package/source/class/qx/test/ui/virtual/layer/WidgetCellSpan.js +71 -48
  838. package/source/class/qx/test/ui/virtual/layer/__init__.js +4 -4
  839. package/source/class/qx/test/ui/virtual/performance/AbstractLayerTest.js +84 -68
  840. package/source/class/qx/test/ui/virtual/performance/DomCell.js +6 -9
  841. package/source/class/qx/test/ui/virtual/performance/DomPoolCell.js +6 -9
  842. package/source/class/qx/test/ui/virtual/performance/HtmlDivCell.js +7 -11
  843. package/source/class/qx/test/ui/virtual/performance/HtmlDivRelative.js +6 -9
  844. package/source/class/qx/test/ui/virtual/performance/HtmlTableCell.js +8 -13
  845. package/source/class/qx/test/ui/virtual/performance/HtmlTableCellNaive.js +8 -13
  846. package/source/class/qx/test/ui/virtual/performance/HtmlTableCssCell.js +8 -19
  847. package/source/class/qx/test/ui/virtual/performance/WidgetCell.js +10 -15
  848. package/source/class/qx/test/ui/virtual/performance/__init__.js +4 -4
  849. package/source/class/qx/test/ui/virtual/performance/layer/DomCell.js +24 -18
  850. package/source/class/qx/test/ui/virtual/performance/layer/DomPoolCell.js +28 -26
  851. package/source/class/qx/test/ui/virtual/performance/layer/HtmlDivRelative.js +13 -17
  852. package/source/class/qx/test/ui/virtual/performance/layer/HtmlTableCell.js +29 -28
  853. package/source/class/qx/test/ui/virtual/performance/layer/HtmlTableCellNaive.js +22 -24
  854. package/source/class/qx/test/ui/virtual/performance/layer/HtmlTableCssCell.js +32 -47
  855. package/source/class/qx/test/ui/virtual/performance/layer/__init__.js +4 -4
  856. package/source/class/qx/test/ui/window/Desktop.js +21 -12
  857. package/source/class/qx/test/util/Base64.js +10 -13
  858. package/source/class/qx/test/util/ColorUtil.js +121 -54
  859. package/source/class/qx/test/util/DateFormat.js +569 -299
  860. package/source/class/qx/test/util/DateMock.js +16 -19
  861. package/source/class/qx/test/util/DeferredCall.js +12 -13
  862. package/source/class/qx/test/util/Delegate.js +28 -26
  863. package/source/class/qx/test/util/DisposeUtil.js +32 -14
  864. package/source/class/qx/test/util/DynamicScriptLoader.js +99 -64
  865. package/source/class/qx/test/util/Fsm.js +16 -18
  866. package/source/class/qx/test/util/Function.js +23 -19
  867. package/source/class/qx/test/util/LibraryManager.js +15 -22
  868. package/source/class/qx/test/util/NumberFormat.js +53 -64
  869. package/source/class/qx/test/util/PropertyUtil.js +35 -35
  870. package/source/class/qx/test/util/Request.js +26 -18
  871. package/source/class/qx/test/util/ResourceManager.js +50 -35
  872. package/source/class/qx/test/util/ResponseParser.js +45 -35
  873. package/source/class/qx/test/util/RingBuffer.js +15 -28
  874. package/source/class/qx/test/util/Serializer.js +210 -153
  875. package/source/class/qx/test/util/StringBuilder.js +7 -13
  876. package/source/class/qx/test/util/StringSplit.js +114 -69
  877. package/source/class/qx/test/util/Uri.js +74 -78
  878. package/source/class/qx/test/util/Validate.js +95 -64
  879. package/source/class/qx/test/util/placement/BestFitAxis.js +17 -26
  880. package/source/class/qx/test/util/placement/DirectAxis.js +8 -11
  881. package/source/class/qx/test/util/placement/KeepAlignAxis.js +17 -26
  882. package/source/class/qx/test/util/placement/Placement.js +607 -244
  883. package/source/class/qx/test/util/placement/__init__.js +4 -4
  884. package/source/class/qx/theme/Classic.js +9 -11
  885. package/source/class/qx/theme/Indigo.js +9 -11
  886. package/source/class/qx/theme/Modern.js +9 -11
  887. package/source/class/qx/theme/Simple.js +9 -11
  888. package/source/class/qx/theme/TangibleDark.js +1 -1
  889. package/source/class/qx/theme/TangibleLight.js +1 -1
  890. package/source/class/qx/theme/__init__.js +4 -4
  891. package/source/class/qx/theme/classic/Appearance.js +995 -1336
  892. package/source/class/qx/theme/classic/Color.js +83 -83
  893. package/source/class/qx/theme/classic/Decoration.js +318 -299
  894. package/source/class/qx/theme/classic/Font.js +38 -25
  895. package/source/class/qx/theme/icon/Oxygen.js +4 -5
  896. package/source/class/qx/theme/icon/Tango.js +4 -5
  897. package/source/class/qx/theme/indigo/Appearance.js +66 -85
  898. package/source/class/qx/theme/indigo/Color.js +65 -66
  899. package/source/class/qx/theme/indigo/Decoration.js +31 -45
  900. package/source/class/qx/theme/indigo/Font.js +20 -29
  901. package/source/class/qx/theme/manager/Appearance.js +58 -91
  902. package/source/class/qx/theme/manager/Color.js +20 -41
  903. package/source/class/qx/theme/manager/Decoration.js +72 -100
  904. package/source/class/qx/theme/manager/Font.js +51 -67
  905. package/source/class/qx/theme/manager/Icon.js +13 -27
  906. package/source/class/qx/theme/manager/Meta.js +27 -44
  907. package/source/class/qx/theme/modern/Appearance.js +1049 -1440
  908. package/source/class/qx/theme/modern/Color.js +155 -166
  909. package/source/class/qx/theme/modern/Decoration.js +471 -598
  910. package/source/class/qx/theme/modern/Font.js +59 -52
  911. package/source/class/qx/theme/simple/Appearance.js +936 -1207
  912. package/source/class/qx/theme/simple/Color.js +62 -62
  913. package/source/class/qx/theme/simple/Decoration.js +456 -678
  914. package/source/class/qx/theme/simple/Font.js +18 -25
  915. package/source/class/qx/theme/simple/Image.js +49 -52
  916. package/source/class/qx/theme/tangible/Appearance.js +1575 -1743
  917. package/source/class/qx/theme/tangible/ColorDark.js +5 -5
  918. package/source/class/qx/theme/tangible/ColorEngine.js +38 -35
  919. package/source/class/qx/theme/tangible/ColorLight.js +7 -7
  920. package/source/class/qx/theme/tangible/Decoration.js +1108 -1300
  921. package/source/class/qx/theme/tangible/Font.js +66 -70
  922. package/source/class/qx/theme/tangible/Image.js +44 -48
  923. package/source/class/qx/tool/cli/Application.js +5 -5
  924. package/source/class/qx/tool/cli/Cli.js +103 -52
  925. package/source/class/qx/tool/cli/ConfigDb.js +18 -15
  926. package/source/class/qx/tool/cli/LibraryApplication.js +1 -1
  927. package/source/class/qx/tool/cli/Watch.js +174 -102
  928. package/source/class/qx/tool/cli/api/AbstractApi.js +17 -18
  929. package/source/class/qx/tool/cli/api/CompilerApi.js +15 -8
  930. package/source/class/qx/tool/cli/api/LibraryApi.js +4 -6
  931. package/source/class/qx/tool/cli/api/Test.js +12 -9
  932. package/source/class/qx/tool/cli/commands/Add.js +12 -15
  933. package/source/class/qx/tool/cli/commands/Clean.js +10 -9
  934. package/source/class/qx/tool/cli/commands/Command.js +18 -13
  935. package/source/class/qx/tool/cli/commands/Compile.js +633 -267
  936. package/source/class/qx/tool/cli/commands/Config.js +75 -42
  937. package/source/class/qx/tool/cli/commands/Create.js +108 -59
  938. package/source/class/qx/tool/cli/commands/Deploy.js +138 -86
  939. package/source/class/qx/tool/cli/commands/Es6ify.js +118 -0
  940. package/source/class/qx/tool/cli/commands/Lint.js +75 -34
  941. package/source/class/qx/tool/cli/commands/Migrate.js +13 -7
  942. package/source/class/qx/tool/cli/commands/Package.js +67 -45
  943. package/source/class/qx/tool/cli/commands/Pkg.js +21 -18
  944. package/source/class/qx/tool/cli/commands/Run.js +57 -37
  945. package/source/class/qx/tool/cli/commands/Serve.js +62 -37
  946. package/source/class/qx/tool/cli/commands/Test.js +40 -18
  947. package/source/class/qx/tool/cli/commands/add/Class.js +66 -28
  948. package/source/class/qx/tool/cli/commands/add/Script.js +54 -27
  949. package/source/class/qx/tool/cli/commands/package/Install.js +265 -103
  950. package/source/class/qx/tool/cli/commands/package/List.js +199 -75
  951. package/source/class/qx/tool/cli/commands/package/Migrate.js +7 -3
  952. package/source/class/qx/tool/cli/commands/package/Publish.js +220 -114
  953. package/source/class/qx/tool/cli/commands/package/Remove.js +40 -17
  954. package/source/class/qx/tool/cli/commands/package/Update.js +115 -48
  955. package/source/class/qx/tool/cli/commands/package/Upgrade.js +41 -20
  956. package/source/class/qx/tool/compiler/Analyser.js +427 -222
  957. package/source/class/qx/tool/compiler/ClassFile.js +831 -401
  958. package/source/class/qx/tool/compiler/Console.js +136 -87
  959. package/source/class/qx/tool/compiler/Es6ify.js +404 -0
  960. package/source/class/qx/tool/compiler/Preprocess.js +28 -25
  961. package/source/class/qx/tool/compiler/app/Application.js +149 -72
  962. package/source/class/qx/tool/compiler/app/Cldr.js +506 -106
  963. package/source/class/qx/tool/compiler/app/Library.js +62 -27
  964. package/source/class/qx/tool/compiler/app/Part.js +10 -12
  965. package/source/class/qx/tool/compiler/app/Translation.js +189 -162
  966. package/source/class/qx/tool/compiler/app/WebFont.js +215 -161
  967. package/source/class/qx/tool/compiler/jsdoc/ChildControlParser.js +3 -3
  968. package/source/class/qx/tool/compiler/jsdoc/CommandParser.js +8 -9
  969. package/source/class/qx/tool/compiler/jsdoc/ParamParser.js +7 -6
  970. package/source/class/qx/tool/compiler/jsdoc/Parser.js +27 -18
  971. package/source/class/qx/tool/compiler/jsdoc/ReturnParser.js +3 -3
  972. package/source/class/qx/tool/compiler/jsdoc/ThrowsParser.js +4 -4
  973. package/source/class/qx/tool/compiler/makers/AbstractAppMaker.js +5 -6
  974. package/source/class/qx/tool/compiler/makers/AppMaker.js +40 -19
  975. package/source/class/qx/tool/compiler/makers/Maker.js +29 -21
  976. package/source/class/qx/tool/compiler/resources/AbstractMatcher.js +8 -8
  977. package/source/class/qx/tool/compiler/resources/Asset.js +123 -61
  978. package/source/class/qx/tool/compiler/resources/ImageLoader.js +18 -8
  979. package/source/class/qx/tool/compiler/resources/Manager.js +156 -93
  980. package/source/class/qx/tool/compiler/resources/MetaLoader.js +5 -3
  981. package/source/class/qx/tool/compiler/resources/ResourceConverter.js +8 -8
  982. package/source/class/qx/tool/compiler/resources/ResourceLoader.js +8 -9
  983. package/source/class/qx/tool/compiler/resources/ScssConverter.js +54 -18
  984. package/source/class/qx/tool/compiler/resources/ScssFile.js +157 -80
  985. package/source/class/qx/tool/compiler/resources/ScssIncludeConverter.js +3 -3
  986. package/source/class/qx/tool/compiler/targets/BuildTarget.js +23 -13
  987. package/source/class/qx/tool/compiler/targets/SourceCodeCopier.js +29 -9
  988. package/source/class/qx/tool/compiler/targets/SourceTarget.js +2 -2
  989. package/source/class/qx/tool/compiler/targets/Target.js +292 -187
  990. package/source/class/qx/tool/compiler/targets/TypeScriptWriter.js +163 -103
  991. package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +48 -23
  992. package/source/class/qx/tool/compiler/targets/meta/ApplicationMeta.js +75 -62
  993. package/source/class/qx/tool/compiler/targets/meta/BootJs.js +49 -29
  994. package/source/class/qx/tool/compiler/targets/meta/Javascript.js +6 -7
  995. package/source/class/qx/tool/compiler/targets/meta/Package.js +54 -51
  996. package/source/class/qx/tool/compiler/targets/meta/PackageJavascript.js +41 -21
  997. package/source/class/qx/tool/compiler/targets/meta/Part.js +9 -10
  998. package/source/class/qx/tool/compiler/targets/meta/PolyfillJs.js +18 -5
  999. package/source/class/qx/tool/compiler/targets/meta/Uglify.js +54 -21
  1000. package/source/class/qx/tool/config/Abstract.js +61 -25
  1001. package/source/class/qx/tool/config/Compile.js +3 -2
  1002. package/source/class/qx/tool/config/Lockfile.js +3 -2
  1003. package/source/class/qx/tool/config/Manifest.js +3 -2
  1004. package/source/class/qx/tool/config/Registry.js +4 -3
  1005. package/source/class/qx/tool/config/Utils.js +88 -37
  1006. package/source/class/qx/tool/migration/BaseMigration.js +67 -25
  1007. package/source/class/qx/tool/migration/M6_0_0.js +96 -46
  1008. package/source/class/qx/tool/migration/M7_0_0.js +12 -6
  1009. package/source/class/qx/tool/migration/Runner.js +28 -14
  1010. package/source/class/qx/tool/utils/IndexedArray.js +15 -18
  1011. package/source/class/qx/tool/utils/Json.js +35 -14
  1012. package/source/class/qx/tool/utils/LogManager.js +50 -26
  1013. package/source/class/qx/tool/utils/Logger.js +11 -12
  1014. package/source/class/qx/tool/utils/Promisify.js +45 -49
  1015. package/source/class/qx/tool/utils/Utils.js +63 -48
  1016. package/source/class/qx/tool/utils/Values.js +4 -7
  1017. package/source/class/qx/tool/utils/Website.js +82 -29
  1018. package/source/class/qx/tool/utils/files/FindFiles.js +37 -33
  1019. package/source/class/qx/tool/utils/files/Utils.js +74 -54
  1020. package/source/class/qx/tool/utils/json/Parser.js +163 -54
  1021. package/source/class/qx/tool/utils/json/Stringify.js +87 -72
  1022. package/source/class/qx/tool/utils/json/Tokenizer.js +64 -39
  1023. package/source/class/qx/tool/utils/json/Writer.js +20 -21
  1024. package/source/class/qx/type/Array.js +19 -41
  1025. package/source/class/qx/type/BaseArray.js +136 -151
  1026. package/source/class/qx/type/BaseError.js +17 -34
  1027. package/source/class/qx/type/BaseString.js +104 -121
  1028. package/source/class/qx/type/__init__.js +3 -3
  1029. package/source/class/qx/ui/basic/Atom.js +75 -109
  1030. package/source/class/qx/ui/basic/Image.js +283 -319
  1031. package/source/class/qx/ui/basic/Label.js +161 -208
  1032. package/source/class/qx/ui/command/Command.js +51 -86
  1033. package/source/class/qx/ui/command/Group.js +43 -50
  1034. package/source/class/qx/ui/command/GroupManager.js +50 -53
  1035. package/source/class/qx/ui/container/Composite.js +15 -29
  1036. package/source/class/qx/ui/container/Resizer.js +7 -11
  1037. package/source/class/qx/ui/container/Scroll.js +10 -21
  1038. package/source/class/qx/ui/container/SlideBar.js +76 -119
  1039. package/source/class/qx/ui/container/Stack.js +27 -54
  1040. package/source/class/qx/ui/control/ColorPopup.js +109 -130
  1041. package/source/class/qx/ui/control/ColorSelector.js +334 -301
  1042. package/source/class/qx/ui/control/DateChooser.js +143 -177
  1043. package/source/class/qx/ui/core/Blocker.js +91 -127
  1044. package/source/class/qx/ui/core/ColumnData.js +16 -34
  1045. package/source/class/qx/ui/core/DragDropCursor.js +17 -30
  1046. package/source/class/qx/ui/core/DragDropScrolling.js +8 -14
  1047. package/source/class/qx/ui/core/EventHandler.js +108 -132
  1048. package/source/class/qx/ui/core/FocusHandler.js +78 -127
  1049. package/source/class/qx/ui/core/IMultiSelection.js +5 -9
  1050. package/source/class/qx/ui/core/ISingleSelection.js +10 -16
  1051. package/source/class/qx/ui/core/ISingleSelectionProvider.js +4 -6
  1052. package/source/class/qx/ui/core/LayoutItem.js +190 -306
  1053. package/source/class/qx/ui/core/MBlocker.js +22 -38
  1054. package/source/class/qx/ui/core/MChildrenHandling.js +14 -29
  1055. package/source/class/qx/ui/core/MContentPadding.js +50 -69
  1056. package/source/class/qx/ui/core/MDragDropScrolling.js +82 -80
  1057. package/source/class/qx/ui/core/MExecutable.js +27 -52
  1058. package/source/class/qx/ui/core/MLayoutHandling.js +6 -14
  1059. package/source/class/qx/ui/core/MMovable.js +64 -80
  1060. package/source/class/qx/ui/core/MMultiSelectionHandling.js +68 -87
  1061. package/source/class/qx/ui/core/MNativeOverflow.js +16 -26
  1062. package/source/class/qx/ui/core/MPlacement.js +171 -170
  1063. package/source/class/qx/ui/core/MRemoteChildrenHandling.js +14 -27
  1064. package/source/class/qx/ui/core/MRemoteLayoutHandling.js +4 -7
  1065. package/source/class/qx/ui/core/MResizable.js +142 -175
  1066. package/source/class/qx/ui/core/MSingleSelectionHandling.js +40 -45
  1067. package/source/class/qx/ui/core/SingleSelectionManager.js +41 -60
  1068. package/source/class/qx/ui/core/Spacer.js +12 -22
  1069. package/source/class/qx/ui/core/Widget.js +628 -983
  1070. package/source/class/qx/ui/core/queue/Appearance.js +15 -24
  1071. package/source/class/qx/ui/core/queue/Dispose.js +7 -16
  1072. package/source/class/qx/ui/core/queue/Layout.js +44 -71
  1073. package/source/class/qx/ui/core/queue/Manager.js +140 -133
  1074. package/source/class/qx/ui/core/queue/Visibility.js +21 -39
  1075. package/source/class/qx/ui/core/queue/Widget.js +15 -26
  1076. package/source/class/qx/ui/core/scroll/AbstractScrollArea.js +124 -162
  1077. package/source/class/qx/ui/core/scroll/IScrollBar.js +13 -24
  1078. package/source/class/qx/ui/core/scroll/MRoll.js +14 -19
  1079. package/source/class/qx/ui/core/scroll/MScrollBarFactory.js +3 -6
  1080. package/source/class/qx/ui/core/scroll/MWheelHandling.js +10 -12
  1081. package/source/class/qx/ui/core/scroll/NativeScrollBar.js +101 -125
  1082. package/source/class/qx/ui/core/scroll/ScrollBar.js +86 -130
  1083. package/source/class/qx/ui/core/scroll/ScrollPane.js +95 -134
  1084. package/source/class/qx/ui/core/scroll/ScrollSlider.js +13 -19
  1085. package/source/class/qx/ui/core/scroll/__init__.js +4 -4
  1086. package/source/class/qx/ui/core/selection/Abstract.js +255 -456
  1087. package/source/class/qx/ui/core/selection/ScrollArea.js +35 -73
  1088. package/source/class/qx/ui/core/selection/Widget.js +57 -120
  1089. package/source/class/qx/ui/decoration/Abstract.js +11 -20
  1090. package/source/class/qx/ui/decoration/Decorator.js +56 -55
  1091. package/source/class/qx/ui/decoration/IDecorator.js +5 -11
  1092. package/source/class/qx/ui/decoration/MBackgroundColor.js +13 -20
  1093. package/source/class/qx/ui/decoration/MBackgroundImage.js +82 -77
  1094. package/source/class/qx/ui/decoration/MBorderImage.js +72 -94
  1095. package/source/class/qx/ui/decoration/MBorderRadius.js +35 -38
  1096. package/source/class/qx/ui/decoration/MBoxShadow.js +61 -55
  1097. package/source/class/qx/ui/decoration/MDoubleBorder.js +157 -155
  1098. package/source/class/qx/ui/decoration/MLinearBackgroundGradient.js +169 -89
  1099. package/source/class/qx/ui/decoration/MSingleBorder.js +138 -124
  1100. package/source/class/qx/ui/decoration/MTransition.js +46 -42
  1101. package/source/class/qx/ui/decoration/__init__.js +2 -2
  1102. package/source/class/qx/ui/embed/AbstractIframe.js +37 -55
  1103. package/source/class/qx/ui/embed/Canvas.js +34 -66
  1104. package/source/class/qx/ui/embed/Html.js +46 -70
  1105. package/source/class/qx/ui/embed/Iframe.js +178 -158
  1106. package/source/class/qx/ui/embed/ThemedIframe.js +91 -135
  1107. package/source/class/qx/ui/form/AbstractField.js +262 -303
  1108. package/source/class/qx/ui/form/AbstractSelectBox.js +65 -87
  1109. package/source/class/qx/ui/form/Button.js +35 -73
  1110. package/source/class/qx/ui/form/CheckBox.js +26 -48
  1111. package/source/class/qx/ui/form/CheckedList.js +41 -25
  1112. package/source/class/qx/ui/form/CheckedSelectBox.js +97 -62
  1113. package/source/class/qx/ui/form/ComboBox.js +98 -121
  1114. package/source/class/qx/ui/form/DateField.js +140 -181
  1115. package/source/class/qx/ui/form/Form.js +50 -69
  1116. package/source/class/qx/ui/form/HoverButton.js +37 -54
  1117. package/source/class/qx/ui/form/IArrayForm.js +8 -16
  1118. package/source/class/qx/ui/form/IBooleanForm.js +8 -16
  1119. package/source/class/qx/ui/form/IColorForm.js +8 -16
  1120. package/source/class/qx/ui/form/IDateForm.js +8 -16
  1121. package/source/class/qx/ui/form/IExecutable.js +7 -14
  1122. package/source/class/qx/ui/form/IField.js +7 -14
  1123. package/source/class/qx/ui/form/IForm.js +17 -32
  1124. package/source/class/qx/ui/form/IListItem.js +1 -4
  1125. package/source/class/qx/ui/form/IModel.js +7 -15
  1126. package/source/class/qx/ui/form/IModelForm.js +8 -16
  1127. package/source/class/qx/ui/form/IModelSelection.js +4 -8
  1128. package/source/class/qx/ui/form/INumberForm.js +8 -15
  1129. package/source/class/qx/ui/form/IRadioItem.js +8 -17
  1130. package/source/class/qx/ui/form/IRange.js +10 -20
  1131. package/source/class/qx/ui/form/IStringForm.js +8 -16
  1132. package/source/class/qx/ui/form/List.js +82 -122
  1133. package/source/class/qx/ui/form/ListItem.js +21 -38
  1134. package/source/class/qx/ui/form/MForm.js +35 -41
  1135. package/source/class/qx/ui/form/MModelProperty.js +9 -14
  1136. package/source/class/qx/ui/form/MModelSelection.js +30 -32
  1137. package/source/class/qx/ui/form/MenuButton.js +50 -77
  1138. package/source/class/qx/ui/form/PasswordField.js +4 -6
  1139. package/source/class/qx/ui/form/RadioButton.js +36 -72
  1140. package/source/class/qx/ui/form/RadioButtonGroup.js +67 -82
  1141. package/source/class/qx/ui/form/RadioGroup.js +92 -127
  1142. package/source/class/qx/ui/form/RepeatButton.js +57 -106
  1143. package/source/class/qx/ui/form/Resetter.js +19 -29
  1144. package/source/class/qx/ui/form/SelectBox.js +62 -105
  1145. package/source/class/qx/ui/form/Slider.js +202 -269
  1146. package/source/class/qx/ui/form/Spinner.js +173 -217
  1147. package/source/class/qx/ui/form/SplitButton.js +73 -115
  1148. package/source/class/qx/ui/form/Tag.js +7 -8
  1149. package/source/class/qx/ui/form/TextArea.js +147 -153
  1150. package/source/class/qx/ui/form/TextField.js +37 -46
  1151. package/source/class/qx/ui/form/ToggleButton.js +54 -90
  1152. package/source/class/qx/ui/form/VirtualComboBox.js +73 -113
  1153. package/source/class/qx/ui/form/VirtualSelectBox.js +264 -274
  1154. package/source/class/qx/ui/form/core/AbstractVirtualBox.js +117 -157
  1155. package/source/class/qx/ui/form/core/VirtualDropDownList.js +101 -144
  1156. package/source/class/qx/ui/form/renderer/AbstractRenderer.js +48 -55
  1157. package/source/class/qx/ui/form/renderer/Double.js +25 -34
  1158. package/source/class/qx/ui/form/renderer/IFormRenderer.js +4 -8
  1159. package/source/class/qx/ui/form/renderer/Single.js +25 -35
  1160. package/source/class/qx/ui/form/renderer/SinglePlaceholder.js +12 -11
  1161. package/source/class/qx/ui/form/renderer/__init__.js +5 -5
  1162. package/source/class/qx/ui/form/validation/AsyncValidator.js +13 -19
  1163. package/source/class/qx/ui/form/validation/Manager.js +74 -108
  1164. package/source/class/qx/ui/form/validation/__init__.js +6 -6
  1165. package/source/class/qx/ui/groupbox/CheckGroupBox.js +30 -47
  1166. package/source/class/qx/ui/groupbox/GroupBox.js +36 -75
  1167. package/source/class/qx/ui/groupbox/RadioGroupBox.js +29 -59
  1168. package/source/class/qx/ui/groupbox/__init__.js +3 -3
  1169. package/source/class/qx/ui/indicator/ProgressBar.js +29 -46
  1170. package/source/class/qx/ui/layout/Abstract.js +28 -53
  1171. package/source/class/qx/ui/layout/Atom.js +95 -111
  1172. package/source/class/qx/ui/layout/Basic.js +29 -30
  1173. package/source/class/qx/ui/layout/Canvas.js +62 -99
  1174. package/source/class/qx/ui/layout/Dock.js +266 -250
  1175. package/source/class/qx/ui/layout/Flow.js +50 -76
  1176. package/source/class/qx/ui/layout/Grid.js +268 -343
  1177. package/source/class/qx/ui/layout/Grow.js +26 -32
  1178. package/source/class/qx/ui/layout/HBox.js +137 -153
  1179. package/source/class/qx/ui/layout/LineSizeIterator.js +19 -28
  1180. package/source/class/qx/ui/layout/Util.js +91 -120
  1181. package/source/class/qx/ui/layout/VBox.js +125 -147
  1182. package/source/class/qx/ui/list/List.js +148 -262
  1183. package/source/class/qx/ui/list/core/IListDelegate.js +13 -26
  1184. package/source/class/qx/ui/list/core/MWidgetController.js +51 -78
  1185. package/source/class/qx/ui/list/provider/IListProvider.js +15 -28
  1186. package/source/class/qx/ui/list/provider/WidgetProvider.js +52 -84
  1187. package/source/class/qx/ui/menu/AbstractButton.js +126 -131
  1188. package/source/class/qx/ui/menu/Button.js +11 -25
  1189. package/source/class/qx/ui/menu/ButtonLayout.js +49 -37
  1190. package/source/class/qx/ui/menu/CheckBox.js +21 -46
  1191. package/source/class/qx/ui/menu/Layout.js +45 -51
  1192. package/source/class/qx/ui/menu/Manager.js +131 -209
  1193. package/source/class/qx/ui/menu/Menu.js +180 -265
  1194. package/source/class/qx/ui/menu/MenuSlideBar.js +13 -20
  1195. package/source/class/qx/ui/menu/RadioButton.js +29 -51
  1196. package/source/class/qx/ui/menu/Separator.js +9 -16
  1197. package/source/class/qx/ui/menubar/Button.js +23 -41
  1198. package/source/class/qx/ui/menubar/MenuBar.js +9 -13
  1199. package/source/class/qx/ui/mobile/__init__.js +5 -5
  1200. package/source/class/qx/ui/mobile/basic/Atom.js +79 -101
  1201. package/source/class/qx/ui/mobile/basic/Image.js +80 -86
  1202. package/source/class/qx/ui/mobile/basic/Label.js +38 -54
  1203. package/source/class/qx/ui/mobile/container/Carousel.js +281 -188
  1204. package/source/class/qx/ui/mobile/container/Collapsible.js +57 -77
  1205. package/source/class/qx/ui/mobile/container/Composite.js +9 -13
  1206. package/source/class/qx/ui/mobile/container/Drawer.js +167 -164
  1207. package/source/class/qx/ui/mobile/container/INavigation.js +6 -10
  1208. package/source/class/qx/ui/mobile/container/IScrollDelegate.js +4 -6
  1209. package/source/class/qx/ui/mobile/container/MIScroll.js +108 -100
  1210. package/source/class/qx/ui/mobile/container/MNativeScroll.js +118 -102
  1211. package/source/class/qx/ui/mobile/container/MScrollHandling.js +8 -7
  1212. package/source/class/qx/ui/mobile/container/Navigation.js +46 -65
  1213. package/source/class/qx/ui/mobile/container/Scroll.js +140 -151
  1214. package/source/class/qx/ui/mobile/control/Picker.js +125 -112
  1215. package/source/class/qx/ui/mobile/core/Blocker.js +62 -71
  1216. package/source/class/qx/ui/mobile/core/DomUpdatedHandler.js +24 -60
  1217. package/source/class/qx/ui/mobile/core/EventHandler.js +158 -138
  1218. package/source/class/qx/ui/mobile/core/MChildrenHandling.js +14 -30
  1219. package/source/class/qx/ui/mobile/core/MLayoutHandling.js +6 -14
  1220. package/source/class/qx/ui/mobile/core/MResize.js +16 -30
  1221. package/source/class/qx/ui/mobile/core/Root.js +90 -80
  1222. package/source/class/qx/ui/mobile/core/Widget.js +351 -479
  1223. package/source/class/qx/ui/mobile/dialog/BusyIndicator.js +31 -46
  1224. package/source/class/qx/ui/mobile/dialog/Manager.js +127 -89
  1225. package/source/class/qx/ui/mobile/dialog/Menu.js +111 -122
  1226. package/source/class/qx/ui/mobile/dialog/Popup.js +202 -194
  1227. package/source/class/qx/ui/mobile/embed/Canvas.js +12 -25
  1228. package/source/class/qx/ui/mobile/embed/Html.js +13 -27
  1229. package/source/class/qx/ui/mobile/form/Button.js +12 -18
  1230. package/source/class/qx/ui/mobile/form/CheckBox.js +20 -35
  1231. package/source/class/qx/ui/mobile/form/Form.js +31 -51
  1232. package/source/class/qx/ui/mobile/form/Group.js +18 -30
  1233. package/source/class/qx/ui/mobile/form/Input.js +30 -35
  1234. package/source/class/qx/ui/mobile/form/Label.js +76 -79
  1235. package/source/class/qx/ui/mobile/form/MState.js +20 -27
  1236. package/source/class/qx/ui/mobile/form/MText.js +27 -47
  1237. package/source/class/qx/ui/mobile/form/MValue.js +66 -94
  1238. package/source/class/qx/ui/mobile/form/NumberField.js +30 -47
  1239. package/source/class/qx/ui/mobile/form/PasswordField.js +8 -14
  1240. package/source/class/qx/ui/mobile/form/RadioButton.js +25 -46
  1241. package/source/class/qx/ui/mobile/form/RadioGroup.js +2 -4
  1242. package/source/class/qx/ui/mobile/form/Row.js +14 -29
  1243. package/source/class/qx/ui/mobile/form/SelectBox.js +77 -104
  1244. package/source/class/qx/ui/mobile/form/Slider.js +116 -144
  1245. package/source/class/qx/ui/mobile/form/TextArea.js +26 -39
  1246. package/source/class/qx/ui/mobile/form/TextField.js +18 -28
  1247. package/source/class/qx/ui/mobile/form/Title.js +11 -19
  1248. package/source/class/qx/ui/mobile/form/ToggleButton.js +35 -58
  1249. package/source/class/qx/ui/mobile/form/__init__.js +1 -1
  1250. package/source/class/qx/ui/mobile/form/renderer/AbstractRenderer.js +24 -31
  1251. package/source/class/qx/ui/mobile/form/renderer/Single.js +59 -85
  1252. package/source/class/qx/ui/mobile/form/renderer/SinglePlaceholder.js +8 -16
  1253. package/source/class/qx/ui/mobile/layout/Abstract.js +48 -85
  1254. package/source/class/qx/ui/mobile/layout/AbstractBox.js +93 -125
  1255. package/source/class/qx/ui/mobile/layout/Card.js +133 -116
  1256. package/source/class/qx/ui/mobile/layout/CardAnimation.js +95 -72
  1257. package/source/class/qx/ui/mobile/layout/HBox.js +9 -12
  1258. package/source/class/qx/ui/mobile/layout/VBox.js +9 -12
  1259. package/source/class/qx/ui/mobile/list/IListDelegate.js +5 -9
  1260. package/source/class/qx/ui/mobile/list/List.js +172 -183
  1261. package/source/class/qx/ui/mobile/list/provider/Provider.js +58 -65
  1262. package/source/class/qx/ui/mobile/list/renderer/Abstract.js +54 -82
  1263. package/source/class/qx/ui/mobile/list/renderer/Default.js +39 -55
  1264. package/source/class/qx/ui/mobile/list/renderer/group/Abstract.js +20 -33
  1265. package/source/class/qx/ui/mobile/list/renderer/group/Default.js +29 -45
  1266. package/source/class/qx/ui/mobile/navigationbar/BackButton.js +11 -15
  1267. package/source/class/qx/ui/mobile/navigationbar/Button.js +11 -15
  1268. package/source/class/qx/ui/mobile/navigationbar/NavigationBar.js +23 -29
  1269. package/source/class/qx/ui/mobile/navigationbar/Title.js +12 -20
  1270. package/source/class/qx/ui/mobile/page/Manager.js +195 -169
  1271. package/source/class/qx/ui/mobile/page/NavigationPage.js +132 -196
  1272. package/source/class/qx/ui/mobile/page/Page.js +109 -148
  1273. package/source/class/qx/ui/mobile/tabbar/TabBar.js +41 -62
  1274. package/source/class/qx/ui/mobile/tabbar/TabButton.js +19 -28
  1275. package/source/class/qx/ui/mobile/toolbar/Button.js +7 -11
  1276. package/source/class/qx/ui/mobile/toolbar/Separator.js +11 -15
  1277. package/source/class/qx/ui/mobile/toolbar/ToolBar.js +30 -39
  1278. package/source/class/qx/ui/popup/Manager.js +41 -53
  1279. package/source/class/qx/ui/popup/Popup.js +22 -47
  1280. package/source/class/qx/ui/popup/__init__.js +32 -32
  1281. package/source/class/qx/ui/progressive/Progressive.js +96 -137
  1282. package/source/class/qx/ui/progressive/State.js +12 -19
  1283. package/source/class/qx/ui/progressive/headfoot/Abstract.js +10 -15
  1284. package/source/class/qx/ui/progressive/headfoot/Null.js +4 -7
  1285. package/source/class/qx/ui/progressive/headfoot/Progress.js +67 -69
  1286. package/source/class/qx/ui/progressive/headfoot/TableHeading.js +42 -54
  1287. package/source/class/qx/ui/progressive/model/Abstract.js +8 -15
  1288. package/source/class/qx/ui/progressive/model/Default.js +17 -29
  1289. package/source/class/qx/ui/progressive/renderer/Abstract.js +6 -11
  1290. package/source/class/qx/ui/progressive/renderer/FunctionCaller.js +4 -7
  1291. package/source/class/qx/ui/progressive/renderer/table/Row.js +215 -242
  1292. package/source/class/qx/ui/progressive/renderer/table/Widths.js +32 -47
  1293. package/source/class/qx/ui/progressive/renderer/table/cell/Abstract.js +17 -24
  1294. package/source/class/qx/ui/progressive/renderer/table/cell/Boolean.js +68 -79
  1295. package/source/class/qx/ui/progressive/renderer/table/cell/Conditional.js +146 -199
  1296. package/source/class/qx/ui/progressive/renderer/table/cell/Default.js +14 -32
  1297. package/source/class/qx/ui/progressive/renderer/table/cell/Html.js +2 -3
  1298. package/source/class/qx/ui/progressive/renderer/table/cell/Icon.js +38 -53
  1299. package/source/class/qx/ui/progressive/renderer/table/cell/Image.js +20 -42
  1300. package/source/class/qx/ui/progressive/renderer/table/cell/String.js +6 -12
  1301. package/source/class/qx/ui/progressive/structure/Abstract.js +14 -26
  1302. package/source/class/qx/ui/progressive/structure/Default.js +20 -40
  1303. package/source/class/qx/ui/root/Abstract.js +73 -90
  1304. package/source/class/qx/ui/root/Application.js +57 -61
  1305. package/source/class/qx/ui/root/Inline.js +78 -64
  1306. package/source/class/qx/ui/root/Page.js +25 -46
  1307. package/source/class/qx/ui/splitpane/Blocker.js +20 -30
  1308. package/source/class/qx/ui/splitpane/HLayout.js +53 -49
  1309. package/source/class/qx/ui/splitpane/Pane.js +112 -150
  1310. package/source/class/qx/ui/splitpane/Slider.js +9 -15
  1311. package/source/class/qx/ui/splitpane/Splitter.js +27 -46
  1312. package/source/class/qx/ui/splitpane/VLayout.js +53 -49
  1313. package/source/class/qx/ui/style/Stylesheet.js +12 -19
  1314. package/source/class/qx/ui/table/ICellEditorFactory.js +4 -8
  1315. package/source/class/qx/ui/table/ICellRenderer.js +3 -7
  1316. package/source/class/qx/ui/table/IColumnMenuButton.js +6 -11
  1317. package/source/class/qx/ui/table/IColumnMenuItem.js +5 -8
  1318. package/source/class/qx/ui/table/IHeaderRenderer.js +4 -8
  1319. package/source/class/qx/ui/table/IRowRenderer.js +6 -12
  1320. package/source/class/qx/ui/table/ITableModel.js +23 -41
  1321. package/source/class/qx/ui/table/MTableContextMenu.js +25 -28
  1322. package/source/class/qx/ui/table/Table.js +556 -748
  1323. package/source/class/qx/ui/table/celleditor/AbstractField.js +16 -26
  1324. package/source/class/qx/ui/table/celleditor/CheckBox.js +15 -16
  1325. package/source/class/qx/ui/table/celleditor/ComboBox.js +24 -34
  1326. package/source/class/qx/ui/table/celleditor/Dynamic.js +25 -32
  1327. package/source/class/qx/ui/table/celleditor/PasswordField.js +4 -8
  1328. package/source/class/qx/ui/table/celleditor/SelectBox.js +29 -38
  1329. package/source/class/qx/ui/table/celleditor/TextField.js +9 -14
  1330. package/source/class/qx/ui/table/cellrenderer/Abstract.js +78 -73
  1331. package/source/class/qx/ui/table/cellrenderer/AbstractImage.js +65 -84
  1332. package/source/class/qx/ui/table/cellrenderer/Boolean.js +36 -50
  1333. package/source/class/qx/ui/table/cellrenderer/Conditional.js +74 -63
  1334. package/source/class/qx/ui/table/cellrenderer/Date.js +12 -22
  1335. package/source/class/qx/ui/table/cellrenderer/Debug.js +9 -9
  1336. package/source/class/qx/ui/table/cellrenderer/Default.js +30 -52
  1337. package/source/class/qx/ui/table/cellrenderer/Dynamic.js +13 -24
  1338. package/source/class/qx/ui/table/cellrenderer/Html.js +6 -8
  1339. package/source/class/qx/ui/table/cellrenderer/Image.js +13 -26
  1340. package/source/class/qx/ui/table/cellrenderer/Number.js +13 -24
  1341. package/source/class/qx/ui/table/cellrenderer/Password.js +8 -11
  1342. package/source/class/qx/ui/table/cellrenderer/Replace.js +27 -42
  1343. package/source/class/qx/ui/table/cellrenderer/String.js +5 -7
  1344. package/source/class/qx/ui/table/columnmenu/Button.js +19 -29
  1345. package/source/class/qx/ui/table/columnmenu/MenuItem.js +11 -19
  1346. package/source/class/qx/ui/table/columnmenu/__init__.js +4 -4
  1347. package/source/class/qx/ui/table/columnmenu/grid/__init__.js +4 -4
  1348. package/source/class/qx/ui/table/columnmenu/simple/__init__.js +4 -4
  1349. package/source/class/qx/ui/table/columnmodel/Basic.js +193 -215
  1350. package/source/class/qx/ui/table/columnmodel/Resize.js +65 -111
  1351. package/source/class/qx/ui/table/columnmodel/resizebehavior/Abstract.js +17 -24
  1352. package/source/class/qx/ui/table/columnmodel/resizebehavior/Default.js +66 -117
  1353. package/source/class/qx/ui/table/headerrenderer/Default.js +25 -46
  1354. package/source/class/qx/ui/table/headerrenderer/HeaderCell.js +36 -51
  1355. package/source/class/qx/ui/table/headerrenderer/Icon.js +11 -27
  1356. package/source/class/qx/ui/table/model/Abstract.js +52 -62
  1357. package/source/class/qx/ui/table/model/Filtered.js +121 -153
  1358. package/source/class/qx/ui/table/model/Remote.js +166 -271
  1359. package/source/class/qx/ui/table/model/Simple.js +215 -250
  1360. package/source/class/qx/ui/table/pane/CellEvent.js +25 -32
  1361. package/source/class/qx/ui/table/pane/Clipper.js +8 -12
  1362. package/source/class/qx/ui/table/pane/FocusIndicator.js +42 -48
  1363. package/source/class/qx/ui/table/pane/Header.js +45 -86
  1364. package/source/class/qx/ui/table/pane/Model.js +80 -97
  1365. package/source/class/qx/ui/table/pane/Pane.js +129 -189
  1366. package/source/class/qx/ui/table/pane/Scroller.js +542 -659
  1367. package/source/class/qx/ui/table/rowrenderer/Default.js +75 -86
  1368. package/source/class/qx/ui/table/selection/Manager.js +23 -57
  1369. package/source/class/qx/ui/table/selection/Model.js +89 -179
  1370. package/source/class/qx/ui/tabview/Page.js +48 -79
  1371. package/source/class/qx/ui/tabview/TabButton.js +45 -72
  1372. package/source/class/qx/ui/tabview/TabView.js +94 -141
  1373. package/source/class/qx/ui/toolbar/Button.js +13 -18
  1374. package/source/class/qx/ui/toolbar/CheckBox.js +13 -17
  1375. package/source/class/qx/ui/toolbar/MenuButton.js +18 -34
  1376. package/source/class/qx/ui/toolbar/Part.js +42 -64
  1377. package/source/class/qx/ui/toolbar/PartContainer.js +19 -28
  1378. package/source/class/qx/ui/toolbar/RadioButton.js +12 -19
  1379. package/source/class/qx/ui/toolbar/Separator.js +15 -25
  1380. package/source/class/qx/ui/toolbar/SplitButton.js +19 -28
  1381. package/source/class/qx/ui/toolbar/ToolBar.js +182 -232
  1382. package/source/class/qx/ui/tooltip/Manager.js +125 -123
  1383. package/source/class/qx/ui/tooltip/ToolTip.js +49 -79
  1384. package/source/class/qx/ui/tooltip/__init__.js +23 -23
  1385. package/source/class/qx/ui/tree/Tree.js +95 -148
  1386. package/source/class/qx/ui/tree/TreeFile.js +8 -15
  1387. package/source/class/qx/ui/tree/TreeFolder.js +8 -15
  1388. package/source/class/qx/ui/tree/VirtualTree.js +207 -333
  1389. package/source/class/qx/ui/tree/VirtualTreeItem.js +30 -45
  1390. package/source/class/qx/ui/tree/__init__.js +50 -50
  1391. package/source/class/qx/ui/tree/core/AbstractItem.js +98 -152
  1392. package/source/class/qx/ui/tree/core/AbstractTreeItem.js +83 -137
  1393. package/source/class/qx/ui/tree/core/FolderOpenButton.js +15 -34
  1394. package/source/class/qx/ui/tree/core/IVirtualTree.js +13 -33
  1395. package/source/class/qx/ui/tree/core/IVirtualTreeDelegate.js +9 -16
  1396. package/source/class/qx/ui/tree/core/MWidgetController.js +58 -69
  1397. package/source/class/qx/ui/tree/core/OpenCloseController.js +29 -35
  1398. package/source/class/qx/ui/tree/core/Util.js +12 -16
  1399. package/source/class/qx/ui/tree/provider/IVirtualTreeProvider.js +10 -23
  1400. package/source/class/qx/ui/tree/provider/WidgetProvider.js +39 -67
  1401. package/source/class/qx/ui/tree/selection/SelectionManager.js +27 -41
  1402. package/source/class/qx/ui/treevirtual/DefaultDataCellRenderer.js +2 -3
  1403. package/source/class/qx/ui/treevirtual/MFamily.js +26 -63
  1404. package/source/class/qx/ui/treevirtual/MNode.js +43 -103
  1405. package/source/class/qx/ui/treevirtual/MTreePrimitive.js +41 -52
  1406. package/source/class/qx/ui/treevirtual/SelectionManager.js +44 -58
  1407. package/source/class/qx/ui/treevirtual/SimpleTreeDataCellRenderer.js +172 -229
  1408. package/source/class/qx/ui/treevirtual/SimpleTreeDataModel.js +256 -367
  1409. package/source/class/qx/ui/treevirtual/SimpleTreeDataRowRenderer.js +8 -18
  1410. package/source/class/qx/ui/treevirtual/TreeVirtual.js +155 -250
  1411. package/source/class/qx/ui/treevirtual/celleditor/NodeEditor.js +10 -16
  1412. package/source/class/qx/ui/treevirtual/pane/Scroller.js +14 -11
  1413. package/source/class/qx/ui/virtual/__init__.js +4 -4
  1414. package/source/class/qx/ui/virtual/behavior/Prefetch.js +71 -86
  1415. package/source/class/qx/ui/virtual/cell/Abstract.js +18 -27
  1416. package/source/class/qx/ui/virtual/cell/AbstractImage.js +42 -51
  1417. package/source/class/qx/ui/virtual/cell/AbstractWidget.js +25 -49
  1418. package/source/class/qx/ui/virtual/cell/Boolean.js +31 -44
  1419. package/source/class/qx/ui/virtual/cell/Cell.js +143 -183
  1420. package/source/class/qx/ui/virtual/cell/CellStylesheet.js +31 -38
  1421. package/source/class/qx/ui/virtual/cell/Date.js +15 -24
  1422. package/source/class/qx/ui/virtual/cell/Html.js +9 -20
  1423. package/source/class/qx/ui/virtual/cell/ICell.js +4 -6
  1424. package/source/class/qx/ui/virtual/cell/IWidgetCell.js +7 -12
  1425. package/source/class/qx/ui/virtual/cell/IWidgetCellDelegate.js +4 -6
  1426. package/source/class/qx/ui/virtual/cell/Image.js +8 -14
  1427. package/source/class/qx/ui/virtual/cell/Number.js +14 -23
  1428. package/source/class/qx/ui/virtual/cell/String.js +11 -20
  1429. package/source/class/qx/ui/virtual/cell/WidgetCell.js +13 -16
  1430. package/source/class/qx/ui/virtual/cell/__init__.js +4 -4
  1431. package/source/class/qx/ui/virtual/core/Axis.js +75 -103
  1432. package/source/class/qx/ui/virtual/core/CellEvent.js +23 -31
  1433. package/source/class/qx/ui/virtual/core/IHtmlCellProvider.js +4 -6
  1434. package/source/class/qx/ui/virtual/core/ILayer.js +5 -15
  1435. package/source/class/qx/ui/virtual/core/IWidgetCellProvider.js +5 -7
  1436. package/source/class/qx/ui/virtual/core/Pane.js +199 -242
  1437. package/source/class/qx/ui/virtual/core/Scroller.js +25 -43
  1438. package/source/class/qx/ui/virtual/layer/Abstract.js +44 -83
  1439. package/source/class/qx/ui/virtual/layer/AbstractBackground.js +47 -68
  1440. package/source/class/qx/ui/virtual/layer/CellSpanManager.js +74 -96
  1441. package/source/class/qx/ui/virtual/layer/Column.js +26 -36
  1442. package/source/class/qx/ui/virtual/layer/GridLines.js +43 -70
  1443. package/source/class/qx/ui/virtual/layer/HtmlCell.js +34 -32
  1444. package/source/class/qx/ui/virtual/layer/HtmlCellSpan.js +54 -56
  1445. package/source/class/qx/ui/virtual/layer/Row.js +28 -36
  1446. package/source/class/qx/ui/virtual/layer/WidgetCell.js +87 -123
  1447. package/source/class/qx/ui/virtual/layer/WidgetCellSpan.js +123 -124
  1448. package/source/class/qx/ui/virtual/selection/Abstract.js +26 -54
  1449. package/source/class/qx/ui/virtual/selection/CellLines.js +11 -21
  1450. package/source/class/qx/ui/virtual/selection/CellRectangle.js +45 -73
  1451. package/source/class/qx/ui/virtual/selection/Column.js +16 -35
  1452. package/source/class/qx/ui/virtual/selection/ISelectionDelegate.js +5 -9
  1453. package/source/class/qx/ui/virtual/selection/MModel.js +84 -122
  1454. package/source/class/qx/ui/virtual/selection/Row.js +29 -61
  1455. package/source/class/qx/ui/website/Accordion.js +39 -42
  1456. package/source/class/qx/ui/website/Button.js +17 -25
  1457. package/source/class/qx/ui/website/Calendar.js +243 -172
  1458. package/source/class/qx/ui/website/Carousel.js +169 -155
  1459. package/source/class/qx/ui/website/DatePicker.js +99 -85
  1460. package/source/class/qx/ui/website/Rating.js +35 -53
  1461. package/source/class/qx/ui/website/Slider.js +174 -153
  1462. package/source/class/qx/ui/website/Table.js +482 -456
  1463. package/source/class/qx/ui/website/Tabs.js +225 -180
  1464. package/source/class/qx/ui/website/Widget.js +39 -52
  1465. package/source/class/qx/ui/window/Desktop.js +14 -12
  1466. package/source/class/qx/ui/window/IDesktop.js +8 -10
  1467. package/source/class/qx/ui/window/IWindowManager.js +7 -9
  1468. package/source/class/qx/ui/window/MDesktop.js +34 -62
  1469. package/source/class/qx/ui/window/Manager.js +31 -57
  1470. package/source/class/qx/ui/window/Window.js +250 -351
  1471. package/source/class/qx/util/AliasManager.js +23 -42
  1472. package/source/class/qx/util/Animation.js +248 -191
  1473. package/source/class/qx/util/Base64.js +144 -89
  1474. package/source/class/qx/util/ColorUtil.js +253 -287
  1475. package/source/class/qx/util/DeferredCall.js +21 -30
  1476. package/source/class/qx/util/DeferredCallManager.js +23 -44
  1477. package/source/class/qx/util/Delegate.js +4 -10
  1478. package/source/class/qx/util/DisposeUtil.js +76 -70
  1479. package/source/class/qx/util/DynamicScriptLoader.js +83 -66
  1480. package/source/class/qx/util/EditDistance.js +64 -58
  1481. package/source/class/qx/util/ExtendedColor.js +157 -163
  1482. package/source/class/qx/util/Function.js +8 -8
  1483. package/source/class/qx/util/LibraryManager.js +11 -18
  1484. package/source/class/qx/util/OOUtil.js +17 -36
  1485. package/source/class/qx/util/ObjectPool.js +19 -45
  1486. package/source/class/qx/util/Permutation.js +9 -16
  1487. package/source/class/qx/util/PropertyUtil.js +58 -70
  1488. package/source/class/qx/util/Request.js +27 -16
  1489. package/source/class/qx/util/ResourceManager.js +103 -104
  1490. package/source/class/qx/util/ResponseParser.js +14 -21
  1491. package/source/class/qx/util/RingBuffer.js +46 -48
  1492. package/source/class/qx/util/Serializer.js +103 -68
  1493. package/source/class/qx/util/StringBuilder.js +11 -22
  1494. package/source/class/qx/util/StringEscape.js +15 -29
  1495. package/source/class/qx/util/StringSplit.js +18 -21
  1496. package/source/class/qx/util/TimerManager.js +61 -70
  1497. package/source/class/qx/util/Uri.js +42 -30
  1498. package/source/class/qx/util/Uuid.js +50 -35
  1499. package/source/class/qx/util/Validate.js +88 -73
  1500. package/source/class/qx/util/ValueManager.js +17 -29
  1501. package/source/class/qx/util/Wheel.js +22 -16
  1502. package/source/class/qx/util/format/DateFormat.js +853 -763
  1503. package/source/class/qx/util/format/IFormat.js +4 -8
  1504. package/source/class/qx/util/format/NumberFormat.js +84 -91
  1505. package/source/class/qx/util/fsm/FiniteStateMachine.js +323 -382
  1506. package/source/class/qx/util/fsm/State.js +210 -249
  1507. package/source/class/qx/util/fsm/Transition.js +138 -160
  1508. package/source/class/qx/util/placement/AbstractAxis.js +12 -14
  1509. package/source/class/qx/util/placement/BestFitAxis.js +5 -8
  1510. package/source/class/qx/util/placement/DirectAxis.js +5 -7
  1511. package/source/class/qx/util/placement/KeepAlignAxis.js +8 -14
  1512. package/source/class/qx/util/placement/Placement.js +39 -56
  1513. package/source/class/qx/util/placement/__init__.js +4 -4
  1514. package/source/class/qx/xml/Document.js +21 -34
  1515. package/source/class/qx/xml/Element.js +90 -73
  1516. package/source/class/qx/xml/String.js +15 -21
  1517. package/source/class/qxWeb.js +102 -69
  1518. package/source/resource/qx/mobile/js/iscroll.js +1328 -982
  1519. package/source/resource/qx/mobile/js/iscroll.min.js +1081 -1
  1520. package/source/resource/qx/test/dynamicscriptloader/first.js +1 -1
  1521. package/source/resource/qx/test/dynamicscriptloader/second.js +1 -1
  1522. package/source/resource/qx/test/dynamicscriptloader/third.js +1 -1
  1523. package/source/resource/qx/test/script.js +1 -1
  1524. package/source/resource/qx/test/webworker.js +2 -2
  1525. package/source/resource/qx/tool/loadsass.js +16 -13
  1526. package/source/resource/qx/tool/schema/compile-1-0-0.json +13 -13
  1527. package/source/resource/qx/tool/website/build/assets/bluebird.min.js +4593 -9
  1528. package/source/resource/qx/tool/website/build/assets/buttons.js +391 -1
  1529. package/source/resource/qx/tool/website/build/assets/fontawesome-all.js +8963 -1
  1530. package/source/resource/qx/tool/website/build/assets/jquery.js +5452 -3
  1531. package/source/resource/qx/tool/website/build/diagnostics/dependson.js +31 -31
  1532. package/source/resource/qx/tool/website/build/diagnostics/requiredby.js +32 -36
  1533. package/source/resource/qx/tool/website/build/scripts/serve.js +87 -66
  1534. package/source/resource/qx/tool/website/src/assets/bluebird.min.js +4593 -9
  1535. package/source/resource/qx/tool/website/src/assets/buttons.js +391 -1
  1536. package/source/resource/qx/tool/website/src/assets/fontawesome-all.js +8963 -1
  1537. package/source/resource/qx/tool/website/src/assets/jquery.js +5452 -3
  1538. package/source/resource/qx/tool/website/src/diagnostics/dependson.js +31 -31
  1539. package/source/resource/qx/tool/website/src/diagnostics/requiredby.js +32 -36
  1540. package/source/resource/qx/tool/website/src/scripts/serve.js +87 -66
  1541. package/source/translation/hr.po +297 -0
  1542. package/lib/resource/qx/static/blank.gif +0 -0
  1543. package/source/class/qx/io/remote/Exchange.js +0 -1063
  1544. package/source/class/qx/io/remote/Request.js +0 -1021
  1545. package/source/class/qx/io/remote/RequestQueue.js +0 -521
  1546. package/source/class/qx/io/remote/Response.js +0 -137
  1547. package/source/class/qx/io/remote/Rpc.js +0 -1075
  1548. package/source/class/qx/io/remote/RpcError.js +0 -198
  1549. package/source/class/qx/io/remote/__init__.js +0 -88
  1550. package/source/class/qx/io/remote/transport/Abstract.js +0 -513
  1551. package/source/class/qx/io/remote/transport/Iframe.js +0 -652
  1552. package/source/class/qx/io/remote/transport/Script.js +0 -475
  1553. package/source/class/qx/io/remote/transport/XmlHttp.js +0 -1019
  1554. package/source/class/qx/io/remote/transport/__init__.js +0 -3
  1555. package/source/class/qx/test/io/remote/AbstractRequest.js +0 -150
  1556. package/source/class/qx/test/io/remote/RequestIframe.js +0 -105
  1557. package/source/class/qx/test/io/remote/RequestXhr.js +0 -151
  1558. package/source/class/qx/test/io/remote/Rpc.js +0 -205
  1559. package/source/class/qx/test/io/remote/__init__.js +0 -4
  1560. package/source/class/qx/test/io/remote/transport/Iframe.js +0 -67
  1561. package/source/class/qx/test/io/remote/transport/XmlHttp.js +0 -133
  1562. package/source/class/qx/test/io/remote/transport/__init__.js +0 -4
@@ -153,7 +153,6 @@ qx.Bootstrap.define("qx.bom.Selector", {
153
153
  }
154
154
  });
155
155
 
156
-
157
156
  /**
158
157
  * Below is the original Sizzle code. Snapshot date is mentioned in the head of
159
158
  * this file.
@@ -170,2201 +169,2422 @@ qx.Bootstrap.define("qx.bom.Selector", {
170
169
  *
171
170
  * Date: 2016-01-04
172
171
  */
173
- (function( window ) {
174
-
175
- var i,
176
- support,
177
- Expr,
178
- getText,
179
- isXML,
180
- tokenize,
181
- compile,
182
- select,
183
- outermostContext,
184
- sortInput,
185
- hasDuplicate,
186
-
187
- // Local document vars
188
- setDocument,
189
- document,
190
- docElem,
191
- documentIsHTML,
192
- rbuggyQSA,
193
- rbuggyMatches,
194
- matches,
195
- contains,
196
-
197
- // Instance-specific data
198
- expando = "sizzle" + 1 * new Date(),
199
- preferredDoc = window.document,
200
- dirruns = 0,
201
- done = 0,
202
- classCache = createCache(),
203
- tokenCache = createCache(),
204
- compilerCache = createCache(),
205
- sortOrder = function( a, b ) {
206
- if ( a === b ) {
207
- hasDuplicate = true;
208
- }
209
- return 0;
210
- },
211
-
212
- // Instance methods
213
- hasOwn = ({}).hasOwnProperty,
214
- arr = [],
215
- pop = arr.pop,
216
- push_native = arr.push,
217
- push = arr.push,
218
- slice = arr.slice,
219
- // Use a stripped-down indexOf as it's faster than native
220
- // https://jsperf.com/thor-indexof-vs-for/5
221
- indexOf = function( list, elem ) {
222
- var i = 0,
223
- len = list.length;
224
- for ( ; i < len; i++ ) {
225
- if ( list[i] === elem ) {
226
- return i;
227
- }
228
- }
229
- return -1;
230
- },
231
-
232
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
233
-
234
- // Regular expressions
235
-
236
- // http://www.w3.org/TR/css3-selectors/#whitespace
237
- whitespace = "[\\x20\\t\\r\\n\\f]",
238
-
239
- // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
240
- identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
241
-
242
- // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
243
- attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
244
- // Operator (capture 2)
245
- "*([*^$|!~]?=)" + whitespace +
246
- // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
247
- "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
248
- "*\\]",
249
-
250
- pseudos = ":(" + identifier + ")(?:\\((" +
251
- // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
252
- // 1. quoted (capture 3; capture 4 or capture 5)
253
- "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
254
- // 2. simple (capture 6)
255
- "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
256
- // 3. anything else (capture 2)
257
- ".*" +
258
- ")\\)|)",
259
-
260
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
261
- rwhitespace = new RegExp( whitespace + "+", "g" ),
262
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
263
-
264
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
265
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
266
-
267
- rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
268
-
269
- rpseudo = new RegExp( pseudos ),
270
- ridentifier = new RegExp( "^" + identifier + "$" ),
271
-
272
- matchExpr = {
273
- "ID": new RegExp( "^#(" + identifier + ")" ),
274
- "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
275
- "TAG": new RegExp( "^(" + identifier + "|[*])" ),
276
- "ATTR": new RegExp( "^" + attributes ),
277
- "PSEUDO": new RegExp( "^" + pseudos ),
278
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
279
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
280
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
281
- "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
282
- // For use in libraries implementing .is()
283
- // We use this for POS matching in `select`
284
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
285
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
286
- },
287
-
288
- rinputs = /^(?:input|select|textarea|button)$/i,
289
- rheader = /^h\d$/i,
290
-
291
- rnative = /^[^{]+\{\s*\[native \w/,
292
-
293
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
294
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
295
-
296
- rsibling = /[+~]/,
297
-
298
- // CSS escapes
299
- // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
300
- runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
301
- funescape = function( _, escaped, escapedWhitespace ) {
302
- var high = "0x" + escaped - 0x10000;
303
- // NaN means non-codepoint
304
- // Support: Firefox<24
305
- // Workaround erroneous numeric interpretation of +"0x"
306
- /* eslint-disable-next-line no-self-compare */
307
- return high !== high || escapedWhitespace ?
308
- escaped :
309
- high < 0 ?
310
- // BMP codepoint
311
- String.fromCharCode( high + 0x10000 ) :
312
- // Supplemental Plane codepoint (surrogate pair)
313
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
314
- },
315
-
316
- // CSS string/identifier serialization
317
- // https://drafts.csswg.org/cssom/#common-serializing-idioms
318
- /* eslint-disable-next-line no-control-regex */
319
- rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,
320
- fcssescape = function( ch, asCodePoint ) {
321
- if ( asCodePoint ) {
322
-
323
- // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
324
- if ( ch === "\0" ) {
325
- return "\uFFFD";
326
- }
327
-
328
- // Control characters and (dependent upon position) numbers get escaped as code points
329
- return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
330
- }
331
-
332
- // Other potentially-special ASCII characters get backslash-escaped
333
- return "\\" + ch;
334
- },
335
-
336
- // Used for iframes
337
- // See setDocument()
338
- // Removing the function wrapper causes a "Permission Denied"
339
- // error in IE
340
- unloadHandler = function() {
341
- setDocument();
342
- },
343
-
344
- disabledAncestor = addCombinator(
345
- function( elem ) {
346
- return elem.disabled === true;
347
- },
348
- { dir: "parentNode", next: "legend" }
349
- );
350
-
351
- // Optimize for push.apply( _, NodeList )
352
- try {
353
- push.apply(
354
- (arr = slice.call( preferredDoc.childNodes )),
355
- preferredDoc.childNodes
356
- );
357
- // Support: Android<4.0
358
- // Detect silently failing push.apply
359
- arr[ preferredDoc.childNodes.length ].nodeType;
360
- } catch ( e ) {
361
- push = { apply: arr.length ?
362
-
363
- // Leverage slice if possible
364
- function( target, els ) {
365
- push_native.apply( target, slice.call(els) );
366
- } :
367
-
368
- // Support: IE<9
369
- // Otherwise append directly
370
- function( target, els ) {
371
- var j = target.length,
372
- i = 0;
373
- // Can't trust NodeList.length
374
- while ( (target[j++] = els[i++]) ) {}
375
- target.length = j - 1;
376
- }
377
- };
378
- }
379
-
380
- function Sizzle( selector, context, results, seed ) {
381
- var m, i, elem, nid, match, groups, newSelector,
382
- newContext = context && context.ownerDocument,
383
-
384
- // nodeType defaults to 9, since context defaults to document
385
- nodeType = context ? context.nodeType : 9;
386
-
387
- results = results || [];
388
-
389
- // Return early from calls with invalid selector or context
390
- if ( typeof selector !== "string" || !selector ||
391
- nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
392
-
393
- return results;
394
- }
395
-
396
- // Try to shortcut find operations (as opposed to filters) in HTML documents
397
- if ( !seed ) {
398
-
399
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
400
- setDocument( context );
401
- }
402
- context = context || document;
403
-
404
- if ( documentIsHTML ) {
405
-
406
- // If the selector is sufficiently simple, try using a "get*By*" DOM method
407
- // (excepting DocumentFragment context, where the methods don't exist)
408
- if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
409
-
410
- // ID selector
411
- if ( (m = match[1]) ) {
412
-
413
- // Document context
414
- if ( nodeType === 9 ) {
415
- if ( (elem = context.getElementById( m )) ) {
416
-
417
- // Support: IE, Opera, Webkit
418
- // TODO: identify versions
419
- // getElementById can match elements by name instead of ID
420
- if ( elem.id === m ) {
421
- results.push( elem );
422
- return results;
423
- }
424
- } else {
425
- return results;
426
- }
427
-
428
- // Element context
429
- } else {
430
-
431
- // Support: IE, Opera, Webkit
432
- // TODO: identify versions
433
- // getElementById can match elements by name instead of ID
434
- if ( newContext && (elem = newContext.getElementById( m )) &&
435
- contains( context, elem ) &&
436
- elem.id === m ) {
437
-
438
- results.push( elem );
439
- return results;
440
- }
441
- }
442
-
443
- // Type selector
444
- } else if ( match[2] ) {
445
- push.apply( results, context.getElementsByTagName( selector ) );
446
- return results;
447
-
448
- // Class selector
449
- } else if ( (m = match[3]) && support.getElementsByClassName &&
450
- context.getElementsByClassName ) {
451
-
452
- push.apply( results, context.getElementsByClassName( m ) );
453
- return results;
454
- }
455
- }
456
-
457
- // Take advantage of querySelectorAll
458
- if ( support.qsa &&
459
- !compilerCache[ selector + " " ] &&
460
- (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
461
-
462
- if ( nodeType !== 1 ) {
463
- newContext = context;
464
- newSelector = selector;
465
-
466
- // qSA looks outside Element context, which is not what we want
467
- // Thanks to Andrew Dupont for this workaround technique
468
- // Support: IE <=8
469
- // Exclude object elements
470
- } else if ( context.nodeName.toLowerCase() !== "object" ) {
471
-
472
- // Capture the context ID, setting it first if necessary
473
- if ( (nid = context.getAttribute( "id" )) ) {
474
- nid = nid.replace( rcssescape, fcssescape );
475
- } else {
476
- context.setAttribute( "id", (nid = expando) );
477
- }
478
-
479
- // Prefix every selector in the list
480
- groups = tokenize( selector );
481
- i = groups.length;
482
- while ( i-- ) {
483
- groups[i] = "#" + nid + " " + toSelector( groups[i] );
484
- }
485
- newSelector = groups.join( "," );
486
-
487
- // Expand context for sibling selectors
488
- newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
489
- context;
490
- }
491
-
492
- if ( newSelector ) {
493
- try {
494
- push.apply( results,
495
- newContext.querySelectorAll( newSelector )
496
- );
497
- return results;
498
- } catch ( qsaError ) {
499
- } finally {
500
- if ( nid === expando ) {
501
- context.removeAttribute( "id" );
502
- }
503
- }
504
- }
505
- }
506
- }
507
- }
508
-
509
- // All others
510
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
511
- }
172
+ (function (window) {
173
+ var i,
174
+ support,
175
+ Expr,
176
+ getText,
177
+ isXML,
178
+ tokenize,
179
+ compile,
180
+ select,
181
+ outermostContext,
182
+ sortInput,
183
+ hasDuplicate,
184
+ // Local document vars
185
+ setDocument,
186
+ document,
187
+ docElem,
188
+ documentIsHTML,
189
+ rbuggyQSA,
190
+ rbuggyMatches,
191
+ matches,
192
+ contains,
193
+ // Instance-specific data
194
+ expando = "sizzle" + 1 * new Date(),
195
+ preferredDoc = window.document,
196
+ dirruns = 0,
197
+ done = 0,
198
+ classCache = createCache(),
199
+ tokenCache = createCache(),
200
+ compilerCache = createCache(),
201
+ sortOrder = function (a, b) {
202
+ if (a === b) {
203
+ hasDuplicate = true;
204
+ }
205
+ return 0;
206
+ },
207
+ // Instance methods
208
+ hasOwn = {}.hasOwnProperty,
209
+ arr = [],
210
+ pop = arr.pop,
211
+ push_native = arr.push,
212
+ push = arr.push,
213
+ slice = arr.slice,
214
+ // Use a stripped-down indexOf as it's faster than native
215
+ // https://jsperf.com/thor-indexof-vs-for/5
216
+ indexOf = function (list, elem) {
217
+ var i = 0,
218
+ len = list.length;
219
+ for (; i < len; i++) {
220
+ if (list[i] === elem) {
221
+ return i;
222
+ }
223
+ }
224
+ return -1;
225
+ },
226
+ booleans =
227
+ "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
228
+ // Regular expressions
229
+
230
+ // http://www.w3.org/TR/css3-selectors/#whitespace
231
+ whitespace = "[\\x20\\t\\r\\n\\f]",
232
+ // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
233
+ identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
234
+ // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
235
+ attributes =
236
+ "\\[" +
237
+ whitespace +
238
+ "*(" +
239
+ identifier +
240
+ ")(?:" +
241
+ whitespace +
242
+ // Operator (capture 2)
243
+ "*([*^$|!~]?=)" +
244
+ whitespace +
245
+ // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
246
+ "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" +
247
+ identifier +
248
+ "))|)" +
249
+ whitespace +
250
+ "*\\]",
251
+ pseudos =
252
+ ":(" +
253
+ identifier +
254
+ ")(?:\\((" +
255
+ // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
256
+ // 1. quoted (capture 3; capture 4 or capture 5)
257
+ "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
258
+ // 2. simple (capture 6)
259
+ "((?:\\\\.|[^\\\\()[\\]]|" +
260
+ attributes +
261
+ ")*)|" +
262
+ // 3. anything else (capture 2)
263
+ ".*" +
264
+ ")\\)|)",
265
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
266
+ rwhitespace = new RegExp(whitespace + "+", "g"),
267
+ rtrim = new RegExp(
268
+ "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
269
+ "g"
270
+ ),
271
+ rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"),
272
+ rcombinators = new RegExp(
273
+ "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"
274
+ ),
275
+ rattributeQuotes = new RegExp(
276
+ "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]",
277
+ "g"
278
+ ),
279
+ rpseudo = new RegExp(pseudos),
280
+ ridentifier = new RegExp("^" + identifier + "$"),
281
+ matchExpr = {
282
+ ID: new RegExp("^#(" + identifier + ")"),
283
+ CLASS: new RegExp("^\\.(" + identifier + ")"),
284
+ TAG: new RegExp("^(" + identifier + "|[*])"),
285
+ ATTR: new RegExp("^" + attributes),
286
+ PSEUDO: new RegExp("^" + pseudos),
287
+ CHILD: new RegExp(
288
+ "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
289
+ whitespace +
290
+ "*(even|odd|(([+-]|)(\\d*)n|)" +
291
+ whitespace +
292
+ "*(?:([+-]|)" +
293
+ whitespace +
294
+ "*(\\d+)|))" +
295
+ whitespace +
296
+ "*\\)|)",
297
+ "i"
298
+ ),
299
+
300
+ bool: new RegExp("^(?:" + booleans + ")$", "i"),
301
+ // For use in libraries implementing .is()
302
+ // We use this for POS matching in `select`
303
+ needsContext: new RegExp(
304
+ "^" +
305
+ whitespace +
306
+ "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
307
+ whitespace +
308
+ "*((?:-\\d)?\\d*)" +
309
+ whitespace +
310
+ "*\\)|)(?=[^-]|$)",
311
+ "i"
312
+ )
313
+ },
314
+ rinputs = /^(?:input|select|textarea|button)$/i,
315
+ rheader = /^h\d$/i,
316
+ rnative = /^[^{]+\{\s*\[native \w/,
317
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
318
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
319
+ rsibling = /[+~]/,
320
+ // CSS escapes
321
+ // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
322
+ runescape = new RegExp(
323
+ "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)",
324
+ "ig"
325
+ ),
326
+ funescape = function (_, escaped, escapedWhitespace) {
327
+ var high = "0x" + escaped - 0x10000;
328
+ // NaN means non-codepoint
329
+ // Support: Firefox<24
330
+ // Workaround erroneous numeric interpretation of +"0x"
331
+ /* eslint-disable-next-line no-self-compare */
332
+ return high !== high || escapedWhitespace
333
+ ? escaped
334
+ : high < 0
335
+ ? // BMP codepoint
336
+ String.fromCharCode(high + 0x10000)
337
+ : // Supplemental Plane codepoint (surrogate pair)
338
+ String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00);
339
+ },
340
+ // CSS string/identifier serialization
341
+ // https://drafts.csswg.org/cssom/#common-serializing-idioms
342
+ /* eslint-disable-next-line no-control-regex */
343
+ rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,
344
+ fcssescape = function (ch, asCodePoint) {
345
+ if (asCodePoint) {
346
+ // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
347
+ if (ch === "\0") {
348
+ return "\uFFFD";
349
+ }
350
+
351
+ // Control characters and (dependent upon position) numbers get escaped as code points
352
+ return (
353
+ ch.slice(0, -1) +
354
+ "\\" +
355
+ ch.charCodeAt(ch.length - 1).toString(16) +
356
+ " "
357
+ );
358
+ }
359
+
360
+ // Other potentially-special ASCII characters get backslash-escaped
361
+ return "\\" + ch;
362
+ },
363
+ // Used for iframes
364
+ // See setDocument()
365
+ // Removing the function wrapper causes a "Permission Denied"
366
+ // error in IE
367
+ unloadHandler = function () {
368
+ setDocument();
369
+ },
370
+ disabledAncestor = addCombinator(
371
+ function (elem) {
372
+ return elem.disabled === true;
373
+ },
374
+ { dir: "parentNode", next: "legend" }
375
+ );
376
+
377
+ // Optimize for push.apply( _, NodeList )
378
+ try {
379
+ push.apply(
380
+ (arr = slice.call(preferredDoc.childNodes)),
381
+ preferredDoc.childNodes
382
+ );
383
+
384
+ // Support: Android<4.0
385
+ // Detect silently failing push.apply
386
+ arr[preferredDoc.childNodes.length].nodeType;
387
+ } catch (e) {
388
+ push = {
389
+ apply: arr.length
390
+ ? // Leverage slice if possible
391
+ function (target, els) {
392
+ push_native.apply(target, slice.call(els));
393
+ }
394
+ : // Support: IE<9
395
+ // Otherwise append directly
396
+ function (target, els) {
397
+ var j = target.length,
398
+ i = 0;
399
+ // Can't trust NodeList.length
400
+ while ((target[j++] = els[i++])) {}
401
+ target.length = j - 1;
402
+ }
403
+ };
404
+ }
512
405
 
513
- /**
514
- * Create key-value caches of limited size
515
- * @return {function} Returns the Object data after storing it on itself with
516
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
517
- * deleting the oldest entry
518
- */
519
- function createCache() {
520
- var keys = [];
521
-
522
- function cache( key, value ) {
523
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
524
- if ( keys.push( key + " " ) > Expr.cacheLength ) {
525
- // Only keep the most recent entries
526
- delete cache[ keys.shift() ];
527
- }
528
- return (cache[ key + " " ] = value);
529
- }
530
- return cache;
531
- }
406
+ function Sizzle(selector, context, results, seed) {
407
+ var m,
408
+ i,
409
+ elem,
410
+ nid,
411
+ match,
412
+ groups,
413
+ newSelector,
414
+ newContext = context && context.ownerDocument,
415
+ // nodeType defaults to 9, since context defaults to document
416
+ nodeType = context ? context.nodeType : 9;
417
+
418
+ results = results || [];
419
+
420
+ // Return early from calls with invalid selector or context
421
+ if (
422
+ typeof selector !== "string" ||
423
+ !selector ||
424
+ (nodeType !== 1 && nodeType !== 9 && nodeType !== 11)
425
+ ) {
426
+ return results;
427
+ }
428
+
429
+ // Try to shortcut find operations (as opposed to filters) in HTML documents
430
+ if (!seed) {
431
+ if (
432
+ (context ? context.ownerDocument || context : preferredDoc) !== document
433
+ ) {
434
+ setDocument(context);
435
+ }
436
+ context = context || document;
437
+
438
+ if (documentIsHTML) {
439
+ // If the selector is sufficiently simple, try using a "get*By*" DOM method
440
+ // (excepting DocumentFragment context, where the methods don't exist)
441
+ if (nodeType !== 11 && (match = rquickExpr.exec(selector))) {
442
+ // ID selector
443
+ if ((m = match[1])) {
444
+ // Document context
445
+ if (nodeType === 9) {
446
+ if ((elem = context.getElementById(m))) {
447
+ // Support: IE, Opera, Webkit
448
+ // TODO: identify versions
449
+ // getElementById can match elements by name instead of ID
450
+ if (elem.id === m) {
451
+ results.push(elem);
452
+ return results;
453
+ }
454
+ } else {
455
+ return results;
456
+ }
457
+
458
+ // Element context
459
+ } else {
460
+ // Support: IE, Opera, Webkit
461
+ // TODO: identify versions
462
+ // getElementById can match elements by name instead of ID
463
+ if (
464
+ newContext &&
465
+ (elem = newContext.getElementById(m)) &&
466
+ contains(context, elem) &&
467
+ elem.id === m
468
+ ) {
469
+ results.push(elem);
470
+ return results;
471
+ }
472
+ }
473
+
474
+ // Type selector
475
+ } else if (match[2]) {
476
+ push.apply(results, context.getElementsByTagName(selector));
477
+ return results;
478
+
479
+ // Class selector
480
+ } else if (
481
+ (m = match[3]) &&
482
+ support.getElementsByClassName &&
483
+ context.getElementsByClassName
484
+ ) {
485
+ push.apply(results, context.getElementsByClassName(m));
486
+ return results;
487
+ }
488
+ }
489
+
490
+ // Take advantage of querySelectorAll
491
+ if (
492
+ support.qsa &&
493
+ !compilerCache[selector + " "] &&
494
+ (!rbuggyQSA || !rbuggyQSA.test(selector))
495
+ ) {
496
+ if (nodeType !== 1) {
497
+ newContext = context;
498
+ newSelector = selector;
499
+
500
+ // qSA looks outside Element context, which is not what we want
501
+ // Thanks to Andrew Dupont for this workaround technique
502
+ // Support: IE <=8
503
+ // Exclude object elements
504
+ } else if (context.nodeName.toLowerCase() !== "object") {
505
+ // Capture the context ID, setting it first if necessary
506
+ if ((nid = context.getAttribute("id"))) {
507
+ nid = nid.replace(rcssescape, fcssescape);
508
+ } else {
509
+ context.setAttribute("id", (nid = expando));
510
+ }
511
+
512
+ // Prefix every selector in the list
513
+ groups = tokenize(selector);
514
+ i = groups.length;
515
+ while (i--) {
516
+ groups[i] = "#" + nid + " " + toSelector(groups[i]);
517
+ }
518
+ newSelector = groups.join(",");
519
+
520
+ // Expand context for sibling selectors
521
+ newContext =
522
+ (rsibling.test(selector) && testContext(context.parentNode)) ||
523
+ context;
524
+ }
525
+
526
+ if (newSelector) {
527
+ try {
528
+ push.apply(results, newContext.querySelectorAll(newSelector));
529
+
530
+ return results;
531
+ } catch (qsaError) {
532
+ } finally {
533
+ if (nid === expando) {
534
+ context.removeAttribute("id");
535
+ }
536
+ }
537
+ }
538
+ }
539
+ }
540
+ }
541
+
542
+ // All others
543
+ return select(selector.replace(rtrim, "$1"), context, results, seed);
544
+ }
532
545
 
533
- /**
534
- * Mark a function for special use by Sizzle
535
- * @param fn {Function} The function to mark
536
- */
537
- function markFunction( fn ) {
538
- fn[ expando ] = true;
539
- return fn;
540
- }
546
+ /**
547
+ * Create key-value caches of limited size
548
+ * @return {function} Returns the Object data after storing it on itself with
549
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
550
+ * deleting the oldest entry
551
+ */
552
+ function createCache() {
553
+ var keys = [];
554
+
555
+ function cache(key, value) {
556
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
557
+ if (keys.push(key + " ") > Expr.cacheLength) {
558
+ // Only keep the most recent entries
559
+ delete cache[keys.shift()];
560
+ }
561
+ return (cache[key + " "] = value);
562
+ }
563
+ return cache;
564
+ }
541
565
 
542
- /**
543
- * Support testing using an element
544
- * @param fn {Function} Passed the created element and returns a boolean result
545
- */
546
- function assert( fn ) {
547
- var el = document.createElement("fieldset");
548
-
549
- try {
550
- return !!fn( el );
551
- } catch (e) {
552
- return false;
553
- } finally {
554
- // Remove from its parent by default
555
- if ( el.parentNode ) {
556
- el.parentNode.removeChild( el );
557
- }
558
- // release memory in IE
559
- el = null;
560
- }
561
- }
566
+ /**
567
+ * Mark a function for special use by Sizzle
568
+ * @param fn {Function} The function to mark
569
+ */
570
+ function markFunction(fn) {
571
+ fn[expando] = true;
572
+ return fn;
573
+ }
562
574
 
563
- /**
564
- * Adds the same handler for all of the specified attrs
565
- * @param attrs {String} Pipe-separated list of attributes
566
- * @param handler {Function} The method that will be applied
567
- */
568
- function addHandle( attrs, handler ) {
569
- var arr = attrs.split("|"),
570
- i = arr.length;
575
+ /**
576
+ * Support testing using an element
577
+ * @param fn {Function} Passed the created element and returns a boolean result
578
+ */
579
+ function assert(fn) {
580
+ var el = document.createElement("fieldset");
581
+
582
+ try {
583
+ return !!fn(el);
584
+ } catch (e) {
585
+ return false;
586
+ } finally {
587
+ // Remove from its parent by default
588
+ if (el.parentNode) {
589
+ el.parentNode.removeChild(el);
590
+ }
591
+ // release memory in IE
592
+ el = null;
593
+ }
594
+ }
571
595
 
572
- while ( i-- ) {
573
- Expr.attrHandle[ arr[i] ] = handler;
574
- }
575
- }
596
+ /**
597
+ * Adds the same handler for all of the specified attrs
598
+ * @param attrs {String} Pipe-separated list of attributes
599
+ * @param handler {Function} The method that will be applied
600
+ */
601
+ function addHandle(attrs, handler) {
602
+ var arr = attrs.split("|"),
603
+ i = arr.length;
604
+
605
+ while (i--) {
606
+ Expr.attrHandle[arr[i]] = handler;
607
+ }
608
+ }
576
609
 
577
- /**
578
- * Checks document order of two siblings
579
- * @param a {Element}
580
- * @param b {Element}
581
- * @return {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
582
- */
583
- function siblingCheck( a, b ) {
584
- var cur = b && a,
585
- diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
586
- a.sourceIndex - b.sourceIndex;
587
-
588
- // Use IE sourceIndex if available on both nodes
589
- if ( diff ) {
590
- return diff;
591
- }
592
-
593
- // Check if b follows a
594
- if ( cur ) {
595
- while ( (cur = cur.nextSibling) ) {
596
- if ( cur === b ) {
597
- return -1;
598
- }
599
- }
600
- }
601
-
602
- return a ? 1 : -1;
603
- }
610
+ /**
611
+ * Checks document order of two siblings
612
+ * @param a {Element}
613
+ * @param b {Element}
614
+ * @return {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
615
+ */
616
+ function siblingCheck(a, b) {
617
+ var cur = b && a,
618
+ diff =
619
+ cur &&
620
+ a.nodeType === 1 &&
621
+ b.nodeType === 1 &&
622
+ a.sourceIndex - b.sourceIndex;
623
+
624
+ // Use IE sourceIndex if available on both nodes
625
+ if (diff) {
626
+ return diff;
627
+ }
628
+
629
+ // Check if b follows a
630
+ if (cur) {
631
+ while ((cur = cur.nextSibling)) {
632
+ if (cur === b) {
633
+ return -1;
634
+ }
635
+ }
636
+ }
637
+
638
+ return a ? 1 : -1;
639
+ }
604
640
 
605
- /**
606
- * Returns a function to use in pseudos for input types
607
- * @param type {String}
608
- */
609
- function createInputPseudo( type ) {
610
- return function( elem ) {
611
- var name = elem.nodeName.toLowerCase();
612
- return name === "input" && elem.type === type;
613
- };
614
- }
641
+ /**
642
+ * Returns a function to use in pseudos for input types
643
+ * @param type {String}
644
+ */
645
+ function createInputPseudo(type) {
646
+ return function (elem) {
647
+ var name = elem.nodeName.toLowerCase();
648
+ return name === "input" && elem.type === type;
649
+ };
650
+ }
615
651
 
616
- /**
617
- * Returns a function to use in pseudos for buttons
618
- * @param type {String}
619
- */
620
- function createButtonPseudo( type ) {
621
- return function( elem ) {
622
- var name = elem.nodeName.toLowerCase();
623
- return (name === "input" || name === "button") && elem.type === type;
624
- };
625
- }
652
+ /**
653
+ * Returns a function to use in pseudos for buttons
654
+ * @param type {String}
655
+ */
656
+ function createButtonPseudo(type) {
657
+ return function (elem) {
658
+ var name = elem.nodeName.toLowerCase();
659
+ return (name === "input" || name === "button") && elem.type === type;
660
+ };
661
+ }
626
662
 
627
- /**
628
- * Returns a function to use in pseudos for :enabled/:disabled
629
- * @param disabled {Boolean} true for :disabled; false for :enabled
630
- */
631
- function createDisabledPseudo( disabled ) {
632
- // Known :disabled false positives:
633
- // IE: *[disabled]:not(button, input, select, textarea, optgroup, option, menuitem, fieldset)
634
- // not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
635
- return function( elem ) {
636
-
637
- // Check form elements and option elements for explicit disabling
638
- return "label" in elem && elem.disabled === disabled ||
639
- "form" in elem && elem.disabled === disabled ||
640
-
641
- // Check non-disabled form elements for fieldset[disabled] ancestors
642
- "form" in elem && elem.disabled === false && (
643
- // Support: IE6-11+
644
- // Ancestry is covered for us
645
- elem.isDisabled === disabled ||
646
-
647
- // Otherwise, assume any non-<option> under fieldset[disabled] is disabled
648
- /* jshint -W018 */
649
- elem.isDisabled !== !disabled &&
650
- ("label" in elem || !disabledAncestor( elem )) !== disabled
651
- );
652
- };
653
- }
663
+ /**
664
+ * Returns a function to use in pseudos for :enabled/:disabled
665
+ * @param disabled {Boolean} true for :disabled; false for :enabled
666
+ */
667
+ function createDisabledPseudo(disabled) {
668
+ // Known :disabled false positives:
669
+ // IE: *[disabled]:not(button, input, select, textarea, optgroup, option, menuitem, fieldset)
670
+ // not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
671
+ return function (elem) {
672
+ // Check form elements and option elements for explicit disabling
673
+ return (
674
+ ("label" in elem && elem.disabled === disabled) ||
675
+ ("form" in elem && elem.disabled === disabled) ||
676
+ // Check non-disabled form elements for fieldset[disabled] ancestors
677
+ ("form" in elem &&
678
+ elem.disabled === false &&
679
+ // Support: IE6-11+
680
+ // Ancestry is covered for us
681
+ (elem.isDisabled === disabled ||
682
+ // Otherwise, assume any non-<option> under fieldset[disabled] is disabled
683
+ /* jshint -W018 */
684
+ (elem.isDisabled !== !disabled &&
685
+ ("label" in elem || !disabledAncestor(elem)) !== disabled)))
686
+ );
687
+ };
688
+ }
654
689
 
655
- /**
656
- * Returns a function to use in pseudos for positionals
657
- * @param fn {Function}
658
- */
659
- function createPositionalPseudo( fn ) {
660
- return markFunction(function( argument ) {
661
- argument = +argument;
662
- return markFunction(function( seed, matches ) {
663
- var j,
664
- matchIndexes = fn( [], seed.length, argument ),
665
- i = matchIndexes.length;
666
-
667
- // Match elements found at the specified indexes
668
- while ( i-- ) {
669
- if ( seed[ (j = matchIndexes[i]) ] ) {
670
- seed[j] = !(matches[j] = seed[j]);
671
- }
672
- }
673
- });
674
- });
675
- }
690
+ /**
691
+ * Returns a function to use in pseudos for positionals
692
+ * @param fn {Function}
693
+ */
694
+ function createPositionalPseudo(fn) {
695
+ return markFunction(function (argument) {
696
+ argument = +argument;
697
+ return markFunction(function (seed, matches) {
698
+ var j,
699
+ matchIndexes = fn([], seed.length, argument),
700
+ i = matchIndexes.length;
701
+
702
+ // Match elements found at the specified indexes
703
+ while (i--) {
704
+ if (seed[(j = matchIndexes[i])]) {
705
+ seed[j] = !(matches[j] = seed[j]);
706
+ }
707
+ }
708
+ });
709
+ });
710
+ }
676
711
 
677
- /**
678
- * Checks a node for validity as a Sizzle context
679
- * @param context {Element|Object}
680
- * @return {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
681
- */
682
- function testContext( context ) {
683
- return context && typeof context.getElementsByTagName !== "undefined" && context;
684
- }
712
+ /**
713
+ * Checks a node for validity as a Sizzle context
714
+ * @param context {Element|Object}
715
+ * @return {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
716
+ */
717
+ function testContext(context) {
718
+ return (
719
+ context && typeof context.getElementsByTagName !== "undefined" && context
720
+ );
721
+ }
685
722
 
686
- // Expose support vars for convenience
687
- support = Sizzle.support = {};
723
+ // Expose support vars for convenience
724
+ support = Sizzle.support = {};
725
+
726
+ /**
727
+ * Detects XML nodes
728
+ * @param elem {Element|Object} An element or a document
729
+ * @return {Boolean} True iff elem is a non-HTML XML node
730
+ */
731
+ isXML = Sizzle.isXML = function (elem) {
732
+ // documentElement is verified for cases where it doesn't yet exist
733
+ // (such as loading iframes in IE - #4833)
734
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
735
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
736
+ };
737
+
738
+ /**
739
+ * Sets document-related variables once based on the current document
740
+ * @param doc {Element|Object} An element or document object to use to set the document
741
+ * @return {Object} Returns the current document
742
+ */
743
+ setDocument = Sizzle.setDocument = function (node) {
744
+ var hasCompare,
745
+ subWindow,
746
+ doc = node ? node.ownerDocument || node : preferredDoc;
747
+
748
+ // Return early if doc is invalid or already selected
749
+ if (doc === document || doc.nodeType !== 9 || !doc.documentElement) {
750
+ return document;
751
+ }
752
+
753
+ // Update global variables
754
+ document = doc;
755
+ docElem = document.documentElement;
756
+ documentIsHTML = !isXML(document);
757
+
758
+ // Support: IE 9-11, Edge
759
+ // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
760
+ if (
761
+ preferredDoc !== document &&
762
+ (subWindow = document.defaultView) &&
763
+ subWindow.top !== subWindow
764
+ ) {
765
+ // Support: IE 11, Edge
766
+ if (subWindow.addEventListener) {
767
+ subWindow.addEventListener("unload", unloadHandler, false);
768
+
769
+ // Support: IE 9 - 10 only
770
+ } else if (subWindow.attachEvent) {
771
+ subWindow.attachEvent("onunload", unloadHandler);
772
+ }
773
+ }
774
+
775
+ /* Attributes
776
+ ---------------------------------------------------------------------- */
777
+
778
+ // Support: IE<8
779
+ // Verify that getAttribute really returns attributes and not properties
780
+ // (excepting IE8 booleans)
781
+ support.attributes = assert(function (el) {
782
+ el.className = "i";
783
+ return !el.getAttribute("className");
784
+ });
785
+
786
+ /* getElement(s)By*
787
+ ---------------------------------------------------------------------- */
788
+
789
+ // Check if getElementsByTagName("*") returns only elements
790
+ support.getElementsByTagName = assert(function (el) {
791
+ el.appendChild(document.createComment(""));
792
+ return !el.getElementsByTagName("*").length;
793
+ });
794
+
795
+ // Support: IE<9
796
+ support.getElementsByClassName = rnative.test(
797
+ document.getElementsByClassName
798
+ );
799
+
800
+ // Support: IE<10
801
+ // Check if getElementById returns elements by name
802
+ // The broken getElementById methods don't pick up programmatically-set names,
803
+ // so use a roundabout getElementsByName test
804
+ support.getById = assert(function (el) {
805
+ docElem.appendChild(el).id = expando;
806
+ return (
807
+ !document.getElementsByName ||
808
+ !document.getElementsByName(expando).length
809
+ );
810
+ });
811
+
812
+ // ID find and filter
813
+ if (support.getById) {
814
+ Expr.find["ID"] = function (id, context) {
815
+ if (typeof context.getElementById !== "undefined" && documentIsHTML) {
816
+ var m = context.getElementById(id);
817
+ return m ? [m] : [];
818
+ }
819
+ };
820
+ Expr.filter["ID"] = function (id) {
821
+ var attrId = id.replace(runescape, funescape);
822
+ return function (elem) {
823
+ return elem.getAttribute("id") === attrId;
824
+ };
825
+ };
826
+ } else {
827
+ // Support: IE6/7
828
+ // getElementById is not reliable as a find shortcut
829
+ delete Expr.find["ID"];
830
+
831
+ Expr.filter["ID"] = function (id) {
832
+ var attrId = id.replace(runescape, funescape);
833
+ return function (elem) {
834
+ var node =
835
+ typeof elem.getAttributeNode !== "undefined" &&
836
+ elem.getAttributeNode("id");
837
+ return node && node.value === attrId;
838
+ };
839
+ };
840
+ }
841
+
842
+ // Tag
843
+ Expr.find["TAG"] = support.getElementsByTagName
844
+ ? function (tag, context) {
845
+ if (typeof context.getElementsByTagName !== "undefined") {
846
+ return context.getElementsByTagName(tag);
847
+
848
+ // DocumentFragment nodes don't have gEBTN
849
+ } else if (support.qsa) {
850
+ return context.querySelectorAll(tag);
851
+ }
852
+ }
853
+ : function (tag, context) {
854
+ var elem,
855
+ tmp = [],
856
+ i = 0,
857
+ // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
858
+ results = context.getElementsByTagName(tag);
859
+
860
+ // Filter out possible comments
861
+ if (tag === "*") {
862
+ while ((elem = results[i++])) {
863
+ if (elem.nodeType === 1) {
864
+ tmp.push(elem);
865
+ }
866
+ }
867
+
868
+ return tmp;
869
+ }
870
+ return results;
871
+ };
872
+
873
+ // Class
874
+ Expr.find["CLASS"] =
875
+ support.getElementsByClassName &&
876
+ function (className, context) {
877
+ if (
878
+ typeof context.getElementsByClassName !== "undefined" &&
879
+ documentIsHTML
880
+ ) {
881
+ return context.getElementsByClassName(className);
882
+ }
883
+ };
884
+
885
+ /* QSA/matchesSelector
886
+ ---------------------------------------------------------------------- */
887
+
888
+ // QSA and matchesSelector support
889
+
890
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
891
+ rbuggyMatches = [];
892
+
893
+ // qSa(:focus) reports false when true (Chrome 21)
894
+ // We allow this because of a bug in IE8/9 that throws an error
895
+ // whenever `document.activeElement` is accessed on an iframe
896
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
897
+ // See https://bugs.jquery.com/ticket/13378
898
+ rbuggyQSA = [];
899
+
900
+ if ((support.qsa = rnative.test(document.querySelectorAll))) {
901
+ // Build QSA regex
902
+ // Regex strategy adopted from Diego Perini
903
+ assert(function (el) {
904
+ // Select is set to empty string on purpose
905
+ // This is to test IE's treatment of not explicitly
906
+ // setting a boolean content attribute,
907
+ // since its presence should be enough
908
+ // https://bugs.jquery.com/ticket/12359
909
+ docElem.appendChild(el).innerHTML =
910
+ "<a id='" +
911
+ expando +
912
+ "'></a>" +
913
+ "<select id='" +
914
+ expando +
915
+ "-\r\\' msallowcapture=''>" +
916
+ "<option selected=''></option></select>";
917
+
918
+ // Support: IE8, Opera 11-12.16
919
+ // Nothing should be selected when empty strings follow ^= or $= or *=
920
+ // The test attribute must be unknown in Opera but "safe" for WinRT
921
+ // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
922
+ if (el.querySelectorAll("[msallowcapture^='']").length) {
923
+ rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")");
924
+ }
925
+
926
+ // Support: IE8
927
+ // Boolean attributes and "value" are not treated correctly
928
+ if (!el.querySelectorAll("[selected]").length) {
929
+ rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
930
+ }
931
+
932
+ // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
933
+ if (!el.querySelectorAll("[id~=" + expando + "-]").length) {
934
+ rbuggyQSA.push("~=");
935
+ }
936
+
937
+ // Webkit/Opera - :checked should return selected option elements
938
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
939
+ // IE8 throws error here and will not see later tests
940
+ if (!el.querySelectorAll(":checked").length) {
941
+ rbuggyQSA.push(":checked");
942
+ }
943
+
944
+ // Support: Safari 8+, iOS 8+
945
+ // https://bugs.webkit.org/show_bug.cgi?id=136851
946
+ // In-page `selector#id sibling-combinator selector` fails
947
+ if (!el.querySelectorAll("a#" + expando + "+*").length) {
948
+ rbuggyQSA.push(".#.+[+~]");
949
+ }
950
+ });
951
+
952
+ assert(function (el) {
953
+ el.innerHTML =
954
+ "<a href='' disabled='disabled'></a>" +
955
+ "<select disabled='disabled'><option/></select>";
956
+
957
+ // Support: Windows 8 Native Apps
958
+ // The type and name attributes are restricted during .innerHTML assignment
959
+ var input = document.createElement("input");
960
+ input.setAttribute("type", "hidden");
961
+ el.appendChild(input).setAttribute("name", "D");
962
+
963
+ // Support: IE8
964
+ // Enforce case-sensitivity of name attribute
965
+ if (el.querySelectorAll("[name=d]").length) {
966
+ rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?=");
967
+ }
968
+
969
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
970
+ // IE8 throws error here and will not see later tests
971
+ if (el.querySelectorAll(":enabled").length !== 2) {
972
+ rbuggyQSA.push(":enabled", ":disabled");
973
+ }
974
+
975
+ // Support: IE9-11+
976
+ // IE's :disabled selector does not pick up the children of disabled fieldsets
977
+ docElem.appendChild(el).disabled = true;
978
+ if (el.querySelectorAll(":disabled").length !== 2) {
979
+ rbuggyQSA.push(":enabled", ":disabled");
980
+ }
981
+
982
+ // Opera 10-11 does not throw on post-comma invalid pseudos
983
+ el.querySelectorAll("*,:x");
984
+ rbuggyQSA.push(",.*:");
985
+ });
986
+ }
987
+
988
+ if (
989
+ (support.matchesSelector = rnative.test(
990
+ (matches =
991
+ docElem.matches ||
992
+ docElem.webkitMatchesSelector ||
993
+ docElem.mozMatchesSelector ||
994
+ docElem.oMatchesSelector ||
995
+ docElem.msMatchesSelector)
996
+ ))
997
+ ) {
998
+ assert(function (el) {
999
+ // Check to see if it's possible to do matchesSelector
1000
+ // on a disconnected node (IE 9)
1001
+ support.disconnectedMatch = matches.call(el, "*");
1002
+
1003
+ // This should fail with an exception
1004
+ // Gecko does not error, returns false instead
1005
+ matches.call(el, "[s!='']:x");
1006
+ rbuggyMatches.push("!=", pseudos);
1007
+ });
1008
+ }
1009
+
1010
+ rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
1011
+ rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|"));
1012
+
1013
+ /* Contains
1014
+ ---------------------------------------------------------------------- */
1015
+ hasCompare = rnative.test(docElem.compareDocumentPosition);
1016
+
1017
+ // Element contains another
1018
+ // Purposefully self-exclusive
1019
+ // As in, an element does not contain itself
1020
+ contains =
1021
+ hasCompare || rnative.test(docElem.contains)
1022
+ ? function (a, b) {
1023
+ var adown = a.nodeType === 9 ? a.documentElement : a,
1024
+ bup = b && b.parentNode;
1025
+ return (
1026
+ a === bup ||
1027
+ !!(
1028
+ bup &&
1029
+ bup.nodeType === 1 &&
1030
+ (adown.contains
1031
+ ? adown.contains(bup)
1032
+ : a.compareDocumentPosition &&
1033
+ a.compareDocumentPosition(bup) & 16)
1034
+ )
1035
+ );
1036
+ }
1037
+ : function (a, b) {
1038
+ if (b) {
1039
+ while ((b = b.parentNode)) {
1040
+ if (b === a) {
1041
+ return true;
1042
+ }
1043
+ }
1044
+ }
1045
+ return false;
1046
+ };
1047
+
1048
+ /* Sorting
1049
+ ---------------------------------------------------------------------- */
1050
+
1051
+ // Document order sorting
1052
+ sortOrder = hasCompare
1053
+ ? function (a, b) {
1054
+ // Flag for duplicate removal
1055
+ if (a === b) {
1056
+ hasDuplicate = true;
1057
+ return 0;
1058
+ }
1059
+
1060
+ // Sort on method existence if only one input has compareDocumentPosition
1061
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
1062
+ if (compare) {
1063
+ return compare;
1064
+ }
1065
+
1066
+ // Calculate position if both inputs belong to the same document
1067
+ compare =
1068
+ (a.ownerDocument || a) === (b.ownerDocument || b)
1069
+ ? a.compareDocumentPosition(b)
1070
+ : // Otherwise we know they are disconnected
1071
+ 1;
1072
+
1073
+ // Disconnected nodes
1074
+ if (
1075
+ compare & 1 ||
1076
+ (!support.sortDetached && b.compareDocumentPosition(a) === compare)
1077
+ ) {
1078
+ // Choose the first element that is related to our preferred document
1079
+ if (
1080
+ a === document ||
1081
+ (a.ownerDocument === preferredDoc && contains(preferredDoc, a))
1082
+ ) {
1083
+ return -1;
1084
+ }
1085
+ if (
1086
+ b === document ||
1087
+ (b.ownerDocument === preferredDoc && contains(preferredDoc, b))
1088
+ ) {
1089
+ return 1;
1090
+ }
1091
+
1092
+ // Maintain original order
1093
+ return sortInput
1094
+ ? indexOf(sortInput, a) - indexOf(sortInput, b)
1095
+ : 0;
1096
+ }
1097
+
1098
+ return compare & 4 ? -1 : 1;
1099
+ }
1100
+ : function (a, b) {
1101
+ // Exit early if the nodes are identical
1102
+ if (a === b) {
1103
+ hasDuplicate = true;
1104
+ return 0;
1105
+ }
1106
+
1107
+ var cur,
1108
+ i = 0,
1109
+ aup = a.parentNode,
1110
+ bup = b.parentNode,
1111
+ ap = [a],
1112
+ bp = [b];
1113
+
1114
+ // Parentless nodes are either documents or disconnected
1115
+ if (!aup || !bup) {
1116
+ return a === document
1117
+ ? -1
1118
+ : b === document
1119
+ ? 1
1120
+ : aup
1121
+ ? -1
1122
+ : bup
1123
+ ? 1
1124
+ : sortInput
1125
+ ? indexOf(sortInput, a) - indexOf(sortInput, b)
1126
+ : 0;
1127
+
1128
+ // If the nodes are siblings, we can do a quick check
1129
+ } else if (aup === bup) {
1130
+ return siblingCheck(a, b);
1131
+ }
1132
+
1133
+ // Otherwise we need full lists of their ancestors for comparison
1134
+ cur = a;
1135
+ while ((cur = cur.parentNode)) {
1136
+ ap.unshift(cur);
1137
+ }
1138
+ cur = b;
1139
+ while ((cur = cur.parentNode)) {
1140
+ bp.unshift(cur);
1141
+ }
1142
+
1143
+ // Walk down the tree looking for a discrepancy
1144
+ while (ap[i] === bp[i]) {
1145
+ i++;
1146
+ }
1147
+
1148
+ return i
1149
+ ? // Do a sibling check if the nodes have a common ancestor
1150
+ siblingCheck(ap[i], bp[i])
1151
+ : // Otherwise nodes in our document sort first
1152
+ ap[i] === preferredDoc
1153
+ ? -1
1154
+ : bp[i] === preferredDoc
1155
+ ? 1
1156
+ : 0;
1157
+ };
1158
+
1159
+ return document;
1160
+ };
1161
+
1162
+ Sizzle.matches = function (expr, elements) {
1163
+ return Sizzle(expr, null, null, elements);
1164
+ };
1165
+
1166
+ Sizzle.matchesSelector = function (elem, expr) {
1167
+ // Set document vars if needed
1168
+ if ((elem.ownerDocument || elem) !== document) {
1169
+ setDocument(elem);
1170
+ }
1171
+
1172
+ // Make sure that attribute selectors are quoted
1173
+ expr = expr.replace(rattributeQuotes, "='$1']");
1174
+
1175
+ if (
1176
+ support.matchesSelector &&
1177
+ documentIsHTML &&
1178
+ !compilerCache[expr + " "] &&
1179
+ (!rbuggyMatches || !rbuggyMatches.test(expr)) &&
1180
+ (!rbuggyQSA || !rbuggyQSA.test(expr))
1181
+ ) {
1182
+ try {
1183
+ var ret = matches.call(elem, expr);
1184
+
1185
+ // IE 9's matchesSelector returns false on disconnected nodes
1186
+ if (
1187
+ ret ||
1188
+ support.disconnectedMatch ||
1189
+ // As well, disconnected nodes are said to be in a document
1190
+ // fragment in IE 9
1191
+ (elem.document && elem.document.nodeType !== 11)
1192
+ ) {
1193
+ return ret;
1194
+ }
1195
+ } catch (e) {}
1196
+ }
1197
+
1198
+ return Sizzle(expr, document, null, [elem]).length > 0;
1199
+ };
1200
+
1201
+ Sizzle.contains = function (context, elem) {
1202
+ // Set document vars if needed
1203
+ if ((context.ownerDocument || context) !== document) {
1204
+ setDocument(context);
1205
+ }
1206
+ return contains(context, elem);
1207
+ };
1208
+
1209
+ Sizzle.attr = function (elem, name) {
1210
+ // Set document vars if needed
1211
+ if ((elem.ownerDocument || elem) !== document) {
1212
+ setDocument(elem);
1213
+ }
1214
+
1215
+ var fn = Expr.attrHandle[name.toLowerCase()],
1216
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
1217
+ val =
1218
+ fn && hasOwn.call(Expr.attrHandle, name.toLowerCase())
1219
+ ? fn(elem, name, !documentIsHTML)
1220
+ : undefined;
1221
+
1222
+ return val !== undefined
1223
+ ? val
1224
+ : support.attributes || !documentIsHTML
1225
+ ? elem.getAttribute(name)
1226
+ : (val = elem.getAttributeNode(name)) && val.specified
1227
+ ? val.value
1228
+ : null;
1229
+ };
1230
+
1231
+ Sizzle.escape = function (sel) {
1232
+ return (sel + "").replace(rcssescape, fcssescape);
1233
+ };
1234
+
1235
+ Sizzle.error = function (msg) {
1236
+ throw new Error("Syntax error, unrecognized expression: " + msg);
1237
+ };
1238
+
1239
+ /**
1240
+ * Document sorting and removing duplicates
1241
+ * @param results {ArrayLike}
1242
+ */
1243
+ Sizzle.uniqueSort = function (results) {
1244
+ var elem,
1245
+ duplicates = [],
1246
+ j = 0,
1247
+ i = 0;
1248
+
1249
+ // Unless we *know* we can detect duplicates, assume their presence
1250
+ hasDuplicate = !support.detectDuplicates;
1251
+ sortInput = !support.sortStable && results.slice(0);
1252
+ results.sort(sortOrder);
1253
+
1254
+ if (hasDuplicate) {
1255
+ while ((elem = results[i++])) {
1256
+ if (elem === results[i]) {
1257
+ j = duplicates.push(i);
1258
+ }
1259
+ }
1260
+ while (j--) {
1261
+ results.splice(duplicates[j], 1);
1262
+ }
1263
+ }
1264
+
1265
+ // Clear input after sorting to release objects
1266
+ // See https://github.com/jquery/sizzle/pull/225
1267
+ sortInput = null;
1268
+
1269
+ return results;
1270
+ };
1271
+
1272
+ /**
1273
+ * Utility function for retrieving the text value of an array of DOM nodes
1274
+ * @param elem {Array|Element}
1275
+ */
1276
+ getText = Sizzle.getText = function (elem) {
1277
+ var node,
1278
+ ret = "",
1279
+ i = 0,
1280
+ nodeType = elem.nodeType;
1281
+
1282
+ if (!nodeType) {
1283
+ // If no nodeType, this is expected to be an array
1284
+ while ((node = elem[i++])) {
1285
+ // Do not traverse comment nodes
1286
+ ret += getText(node);
1287
+ }
1288
+ } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
1289
+ // Use textContent for elements
1290
+ // innerText usage removed for consistency of new lines (jQuery #11153)
1291
+ if (typeof elem.textContent === "string") {
1292
+ return elem.textContent;
1293
+ } else {
1294
+ // Traverse its children
1295
+ for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
1296
+ ret += getText(elem);
1297
+ }
1298
+ }
1299
+ } else if (nodeType === 3 || nodeType === 4) {
1300
+ return elem.nodeValue;
1301
+ }
1302
+ // Do not include comment or processing instruction nodes
1303
+
1304
+ return ret;
1305
+ };
1306
+
1307
+ Expr = Sizzle.selectors = {
1308
+ // Can be adjusted by the user
1309
+ cacheLength: 50,
1310
+
1311
+ createPseudo: markFunction,
1312
+
1313
+ match: matchExpr,
1314
+
1315
+ attrHandle: {},
1316
+
1317
+ find: {},
1318
+
1319
+ relative: {
1320
+ ">": { dir: "parentNode", first: true },
1321
+ " ": { dir: "parentNode" },
1322
+ "+": { dir: "previousSibling", first: true },
1323
+ "~": { dir: "previousSibling" }
1324
+ },
1325
+
1326
+ preFilter: {
1327
+ ATTR(match) {
1328
+ match[1] = match[1].replace(runescape, funescape);
1329
+
1330
+ // Move the given value to match[3] whether quoted or unquoted
1331
+ match[3] = (match[3] || match[4] || match[5] || "").replace(
1332
+ runescape,
1333
+ funescape
1334
+ );
1335
+
1336
+ if (match[2] === "~=") {
1337
+ match[3] = " " + match[3] + " ";
1338
+ }
1339
+
1340
+ return match.slice(0, 4);
1341
+ },
1342
+
1343
+ CHILD(match) {
1344
+ /* matches from matchExpr["CHILD"]
1345
+ 1 type (only|nth|...)
1346
+ 2 what (child|of-type)
1347
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
1348
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
1349
+ 5 sign of xn-component
1350
+ 6 x of xn-component
1351
+ 7 sign of y-component
1352
+ 8 y of y-component
1353
+ */
1354
+ match[1] = match[1].toLowerCase();
1355
+
1356
+ if (match[1].slice(0, 3) === "nth") {
1357
+ // nth-* requires argument
1358
+ if (!match[3]) {
1359
+ Sizzle.error(match[0]);
1360
+ }
1361
+
1362
+ // numeric x and y parameters for Expr.filter.CHILD
1363
+ // remember that false/true cast respectively to 0/1
1364
+ match[4] = +(match[4]
1365
+ ? match[5] + (match[6] || 1)
1366
+ : 2 * (match[3] === "even" || match[3] === "odd"));
1367
+ match[5] = +(match[7] + match[8] || match[3] === "odd");
1368
+
1369
+ // other types prohibit arguments
1370
+ } else if (match[3]) {
1371
+ Sizzle.error(match[0]);
1372
+ }
1373
+
1374
+ return match;
1375
+ },
1376
+
1377
+ PSEUDO(match) {
1378
+ var excess,
1379
+ unquoted = !match[6] && match[2];
1380
+
1381
+ if (matchExpr["CHILD"].test(match[0])) {
1382
+ return null;
1383
+ }
1384
+
1385
+ // Accept quoted arguments as-is
1386
+ if (match[3]) {
1387
+ match[2] = match[4] || match[5] || "";
1388
+
1389
+ // Strip excess characters from unquoted arguments
1390
+ } else if (
1391
+ unquoted &&
1392
+ rpseudo.test(unquoted) &&
1393
+ // Get excess from tokenize (recursively)
1394
+ (excess = tokenize(unquoted, true)) &&
1395
+ // advance to the next closing parenthesis
1396
+ (excess =
1397
+ unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)
1398
+ ) {
1399
+ // excess is a negative index
1400
+ match[0] = match[0].slice(0, excess);
1401
+ match[2] = unquoted.slice(0, excess);
1402
+ }
1403
+
1404
+ // Return only captures needed by the pseudo filter method (type and argument)
1405
+ return match.slice(0, 3);
1406
+ }
1407
+ },
1408
+
1409
+ filter: {
1410
+ TAG(nodeNameSelector) {
1411
+ var nodeName = nodeNameSelector
1412
+ .replace(runescape, funescape)
1413
+ .toLowerCase();
1414
+ return nodeNameSelector === "*"
1415
+ ? function () {
1416
+ return true;
1417
+ }
1418
+ : function (elem) {
1419
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
1420
+ };
1421
+ },
1422
+
1423
+ CLASS(className) {
1424
+ var pattern = classCache[className + " "];
1425
+
1426
+ return (
1427
+ pattern ||
1428
+ ((pattern = new RegExp(
1429
+ "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)"
1430
+ )) &&
1431
+ classCache(className, function (elem) {
1432
+ return pattern.test(
1433
+ (typeof elem.className === "string" && elem.className) ||
1434
+ (typeof elem.getAttribute !== "undefined" &&
1435
+ elem.getAttribute("class")) ||
1436
+ ""
1437
+ );
1438
+ }))
1439
+ );
1440
+ },
1441
+
1442
+ ATTR(name, operator, check) {
1443
+ return function (elem) {
1444
+ var result = Sizzle.attr(elem, name);
1445
+
1446
+ if (result == null) {
1447
+ return operator === "!=";
1448
+ }
1449
+ if (!operator) {
1450
+ return true;
1451
+ }
1452
+
1453
+ result += "";
1454
+
1455
+ return operator === "="
1456
+ ? result === check
1457
+ : operator === "!="
1458
+ ? result !== check
1459
+ : operator === "^="
1460
+ ? check && result.indexOf(check) === 0
1461
+ : operator === "*="
1462
+ ? check && result.indexOf(check) > -1
1463
+ : operator === "$="
1464
+ ? check && result.slice(-check.length) === check
1465
+ : operator === "~="
1466
+ ? (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1
1467
+ : operator === "|="
1468
+ ? result === check ||
1469
+ result.slice(0, check.length + 1) === check + "-"
1470
+ : false;
1471
+ };
1472
+ },
1473
+
1474
+ CHILD(type, what, argument, first, last) {
1475
+ var simple = type.slice(0, 3) !== "nth",
1476
+ forward = type.slice(-4) !== "last",
1477
+ ofType = what === "of-type";
1478
+
1479
+ return first === 1 && last === 0
1480
+ ? // Shortcut for :nth-*(n)
1481
+ function (elem) {
1482
+ return !!elem.parentNode;
1483
+ }
1484
+ : function (elem, context, xml) {
1485
+ var cache,
1486
+ uniqueCache,
1487
+ outerCache,
1488
+ node,
1489
+ nodeIndex,
1490
+ start,
1491
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
1492
+ parent = elem.parentNode,
1493
+ name = ofType && elem.nodeName.toLowerCase(),
1494
+ useCache = !xml && !ofType,
1495
+ diff = false;
1496
+
1497
+ if (parent) {
1498
+ // :(first|last|only)-(child|of-type)
1499
+ if (simple) {
1500
+ while (dir) {
1501
+ node = elem;
1502
+ while ((node = node[dir])) {
1503
+ if (
1504
+ ofType
1505
+ ? node.nodeName.toLowerCase() === name
1506
+ : node.nodeType === 1
1507
+ ) {
1508
+ return false;
1509
+ }
1510
+ }
1511
+ // Reverse direction for :only-* (if we haven't yet done so)
1512
+ start = dir = type === "only" && !start && "nextSibling";
1513
+ }
1514
+ return true;
1515
+ }
1516
+
1517
+ start = [forward ? parent.firstChild : parent.lastChild];
1518
+
1519
+ // non-xml :nth-child(...) stores cache data on `parent`
1520
+ if (forward && useCache) {
1521
+ // Seek `elem` from a previously-cached index
1522
+
1523
+ // ...in a gzip-friendly way
1524
+ node = parent;
1525
+ outerCache = node[expando] || (node[expando] = {});
1526
+
1527
+ // Support: IE <9 only
1528
+ // Defend against cloned attroperties (jQuery gh-1709)
1529
+ uniqueCache =
1530
+ outerCache[node.uniqueID] ||
1531
+ (outerCache[node.uniqueID] = {});
1532
+
1533
+ cache = uniqueCache[type] || [];
1534
+ nodeIndex = cache[0] === dirruns && cache[1];
1535
+ diff = nodeIndex && cache[2];
1536
+ node = nodeIndex && parent.childNodes[nodeIndex];
1537
+
1538
+ while (
1539
+ (node =
1540
+ (++nodeIndex && node && node[dir]) ||
1541
+ // Fallback to seeking `elem` from the start
1542
+ (diff = nodeIndex = 0) ||
1543
+ start.pop())
1544
+ ) {
1545
+ // When found, cache indexes on `parent` and break
1546
+ if (node.nodeType === 1 && ++diff && node === elem) {
1547
+ uniqueCache[type] = [dirruns, nodeIndex, diff];
1548
+ break;
1549
+ }
1550
+ }
1551
+ } else {
1552
+ // Use previously-cached element index if available
1553
+ if (useCache) {
1554
+ // ...in a gzip-friendly way
1555
+ node = elem;
1556
+ outerCache = node[expando] || (node[expando] = {});
1557
+
1558
+ // Support: IE <9 only
1559
+ // Defend against cloned attroperties (jQuery gh-1709)
1560
+ uniqueCache =
1561
+ outerCache[node.uniqueID] ||
1562
+ (outerCache[node.uniqueID] = {});
1563
+
1564
+ cache = uniqueCache[type] || [];
1565
+ nodeIndex = cache[0] === dirruns && cache[1];
1566
+ diff = nodeIndex;
1567
+ }
1568
+
1569
+ // xml :nth-child(...)
1570
+ // or :nth-last-child(...) or :nth(-last)?-of-type(...)
1571
+ if (diff === false) {
1572
+ // Use the same loop as above to seek `elem` from the start
1573
+ while (
1574
+ (node =
1575
+ (++nodeIndex && node && node[dir]) ||
1576
+ (diff = nodeIndex = 0) ||
1577
+ start.pop())
1578
+ ) {
1579
+ if (
1580
+ (ofType
1581
+ ? node.nodeName.toLowerCase() === name
1582
+ : node.nodeType === 1) &&
1583
+ ++diff
1584
+ ) {
1585
+ // Cache the index of each encountered element
1586
+ if (useCache) {
1587
+ outerCache = node[expando] || (node[expando] = {});
1588
+
1589
+ // Support: IE <9 only
1590
+ // Defend against cloned attroperties (jQuery gh-1709)
1591
+ uniqueCache =
1592
+ outerCache[node.uniqueID] ||
1593
+ (outerCache[node.uniqueID] = {});
1594
+
1595
+ uniqueCache[type] = [dirruns, diff];
1596
+ }
1597
+
1598
+ if (node === elem) {
1599
+ break;
1600
+ }
1601
+ }
1602
+ }
1603
+ }
1604
+ }
1605
+
1606
+ // Incorporate the offset, then check against cycle size
1607
+ diff -= last;
1608
+ return (
1609
+ diff === first || (diff % first === 0 && diff / first >= 0)
1610
+ );
1611
+ }
1612
+ };
1613
+ },
1614
+
1615
+ PSEUDO(pseudo, argument) {
1616
+ // pseudo-class names are case-insensitive
1617
+ // http://www.w3.org/TR/selectors/#pseudo-classes
1618
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
1619
+ // Remember that setFilters inherits from pseudos
1620
+ var args,
1621
+ fn =
1622
+ Expr.pseudos[pseudo] ||
1623
+ Expr.setFilters[pseudo.toLowerCase()] ||
1624
+ Sizzle.error("unsupported pseudo: " + pseudo);
1625
+
1626
+ // The user may use createPseudo to indicate that
1627
+ // arguments are needed to create the filter function
1628
+ // just as Sizzle does
1629
+ if (fn[expando]) {
1630
+ return fn(argument);
1631
+ }
1632
+
1633
+ // But maintain support for old signatures
1634
+ if (fn.length > 1) {
1635
+ args = [pseudo, pseudo, "", argument];
1636
+ return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())
1637
+ ? markFunction(function (seed, matches) {
1638
+ var idx,
1639
+ matched = fn(seed, argument),
1640
+ i = matched.length;
1641
+ while (i--) {
1642
+ idx = indexOf(seed, matched[i]);
1643
+ seed[idx] = !(matches[idx] = matched[i]);
1644
+ }
1645
+ })
1646
+ : function (elem) {
1647
+ return fn(elem, 0, args);
1648
+ };
1649
+ }
1650
+
1651
+ return fn;
1652
+ }
1653
+ },
1654
+
1655
+ pseudos: {
1656
+ // Potentially complex pseudos
1657
+ not: markFunction(function (selector) {
1658
+ // Trim the selector passed to compile
1659
+ // to avoid treating leading and trailing
1660
+ // spaces as combinators
1661
+ var input = [],
1662
+ results = [],
1663
+ matcher = compile(selector.replace(rtrim, "$1"));
1664
+
1665
+ return matcher[expando]
1666
+ ? markFunction(function (seed, matches, context, xml) {
1667
+ var elem,
1668
+ unmatched = matcher(seed, null, xml, []),
1669
+ i = seed.length;
1670
+
1671
+ // Match elements unmatched by `matcher`
1672
+ while (i--) {
1673
+ if ((elem = unmatched[i])) {
1674
+ seed[i] = !(matches[i] = elem);
1675
+ }
1676
+ }
1677
+ })
1678
+ : function (elem, context, xml) {
1679
+ input[0] = elem;
1680
+ matcher(input, null, xml, results);
1681
+ // Don't keep the element (issue #299)
1682
+ input[0] = null;
1683
+ return !results.pop();
1684
+ };
1685
+ }),
1686
+
1687
+ has: markFunction(function (selector) {
1688
+ return function (elem) {
1689
+ return Sizzle(selector, elem).length > 0;
1690
+ };
1691
+ }),
1692
+
1693
+ contains: markFunction(function (text) {
1694
+ text = text.replace(runescape, funescape);
1695
+ return function (elem) {
1696
+ return (
1697
+ (elem.textContent || elem.innerText || getText(elem)).indexOf(
1698
+ text
1699
+ ) > -1
1700
+ );
1701
+ };
1702
+ }),
1703
+
1704
+ // "Whether an element is represented by a :lang() selector
1705
+ // is based solely on the element's language value
1706
+ // being equal to the identifier C,
1707
+ // or beginning with the identifier C immediately followed by "-".
1708
+ // The matching of C against the element's language value is performed case-insensitively.
1709
+ // The identifier C does not have to be a valid language name."
1710
+ // http://www.w3.org/TR/selectors/#lang-pseudo
1711
+ lang: markFunction(function (lang) {
1712
+ // lang value must be a valid identifier
1713
+ if (!ridentifier.test(lang || "")) {
1714
+ Sizzle.error("unsupported lang: " + lang);
1715
+ }
1716
+ lang = lang.replace(runescape, funescape).toLowerCase();
1717
+ return function (elem) {
1718
+ var elemLang;
1719
+ do {
1720
+ if (
1721
+ (elemLang = documentIsHTML
1722
+ ? elem.lang
1723
+ : elem.getAttribute("xml:lang") || elem.getAttribute("lang"))
1724
+ ) {
1725
+ elemLang = elemLang.toLowerCase();
1726
+ return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
1727
+ }
1728
+ } while ((elem = elem.parentNode) && elem.nodeType === 1);
1729
+ return false;
1730
+ };
1731
+ }),
1732
+
1733
+ // Miscellaneous
1734
+ target(elem) {
1735
+ var hash = window.location && window.location.hash;
1736
+ return hash && hash.slice(1) === elem.id;
1737
+ },
1738
+
1739
+ root(elem) {
1740
+ return elem === docElem;
1741
+ },
1742
+
1743
+ focus(elem) {
1744
+ return (
1745
+ elem === document.activeElement &&
1746
+ (!document.hasFocus || document.hasFocus()) &&
1747
+ !!(elem.type || elem.href || ~elem.tabIndex)
1748
+ );
1749
+ },
1750
+
1751
+ // Boolean properties
1752
+ enabled: createDisabledPseudo(false),
1753
+ disabled: createDisabledPseudo(true),
1754
+
1755
+ checked(elem) {
1756
+ // In CSS3, :checked should return both checked and selected elements
1757
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1758
+ var nodeName = elem.nodeName.toLowerCase();
1759
+ return (
1760
+ (nodeName === "input" && !!elem.checked) ||
1761
+ (nodeName === "option" && !!elem.selected)
1762
+ );
1763
+ },
1764
+
1765
+ selected(elem) {
1766
+ // Accessing this property makes selected-by-default
1767
+ // options in Safari work properly
1768
+ if (elem.parentNode) {
1769
+ elem.parentNode.selectedIndex;
1770
+ }
1771
+
1772
+ return elem.selected === true;
1773
+ },
1774
+
1775
+ // Contents
1776
+ empty(elem) {
1777
+ // http://www.w3.org/TR/selectors/#empty-pseudo
1778
+ // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
1779
+ // but not by others (comment: 8; processing instruction: 7; etc.)
1780
+ // nodeType < 6 works because attributes (2) do not appear as children
1781
+ for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
1782
+ if (elem.nodeType < 6) {
1783
+ return false;
1784
+ }
1785
+ }
1786
+ return true;
1787
+ },
1788
+
1789
+ parent(elem) {
1790
+ return !Expr.pseudos["empty"](elem);
1791
+ },
1792
+
1793
+ // Element/input types
1794
+ header(elem) {
1795
+ return rheader.test(elem.nodeName);
1796
+ },
1797
+
1798
+ input(elem) {
1799
+ return rinputs.test(elem.nodeName);
1800
+ },
1801
+
1802
+ button(elem) {
1803
+ var name = elem.nodeName.toLowerCase();
1804
+ return (
1805
+ (name === "input" && elem.type === "button") || name === "button"
1806
+ );
1807
+ },
1808
+
1809
+ text(elem) {
1810
+ var attr;
1811
+ return (
1812
+ elem.nodeName.toLowerCase() === "input" &&
1813
+ elem.type === "text" &&
1814
+ // Support: IE<8
1815
+ // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
1816
+ ((attr = elem.getAttribute("type")) == null ||
1817
+ attr.toLowerCase() === "text")
1818
+ );
1819
+ },
1820
+
1821
+ // Position-in-collection
1822
+ first: createPositionalPseudo(function () {
1823
+ return [0];
1824
+ }),
1825
+
1826
+ last: createPositionalPseudo(function (matchIndexes, length) {
1827
+ return [length - 1];
1828
+ }),
1829
+
1830
+ eq: createPositionalPseudo(function (matchIndexes, length, argument) {
1831
+ return [argument < 0 ? argument + length : argument];
1832
+ }),
1833
+
1834
+ even: createPositionalPseudo(function (matchIndexes, length) {
1835
+ var i = 0;
1836
+ for (; i < length; i += 2) {
1837
+ matchIndexes.push(i);
1838
+ }
1839
+ return matchIndexes;
1840
+ }),
1841
+
1842
+ odd: createPositionalPseudo(function (matchIndexes, length) {
1843
+ var i = 1;
1844
+ for (; i < length; i += 2) {
1845
+ matchIndexes.push(i);
1846
+ }
1847
+ return matchIndexes;
1848
+ }),
1849
+
1850
+ lt: createPositionalPseudo(function (matchIndexes, length, argument) {
1851
+ var i = argument < 0 ? argument + length : argument;
1852
+ for (; --i >= 0; ) {
1853
+ matchIndexes.push(i);
1854
+ }
1855
+ return matchIndexes;
1856
+ }),
1857
+
1858
+ gt: createPositionalPseudo(function (matchIndexes, length, argument) {
1859
+ var i = argument < 0 ? argument + length : argument;
1860
+ for (; ++i < length; ) {
1861
+ matchIndexes.push(i);
1862
+ }
1863
+ return matchIndexes;
1864
+ })
1865
+ }
1866
+ };
1867
+
1868
+ Expr.pseudos["nth"] = Expr.pseudos["eq"];
1869
+
1870
+ // Add button/input type pseudos
1871
+ for (i in {
1872
+ radio: true,
1873
+ checkbox: true,
1874
+ file: true,
1875
+ password: true,
1876
+ image: true
1877
+ }) {
1878
+ Expr.pseudos[i] = createInputPseudo(i);
1879
+ }
1880
+ for (i in { submit: true, reset: true }) {
1881
+ Expr.pseudos[i] = createButtonPseudo(i);
1882
+ }
688
1883
 
689
- /**
690
- * Detects XML nodes
691
- * @param elem {Element|Object} An element or a document
692
- * @return {Boolean} True iff elem is a non-HTML XML node
693
- */
694
- isXML = Sizzle.isXML = function( elem ) {
695
- // documentElement is verified for cases where it doesn't yet exist
696
- // (such as loading iframes in IE - #4833)
697
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
698
- return documentElement ? documentElement.nodeName !== "HTML" : false;
699
- };
1884
+ // Easy API for creating new setFilters
1885
+ function setFilters() {}
1886
+ setFilters.prototype = Expr.filters = Expr.pseudos;
1887
+ Expr.setFilters = new setFilters();
1888
+
1889
+ tokenize = Sizzle.tokenize = function (selector, parseOnly) {
1890
+ var matched,
1891
+ match,
1892
+ tokens,
1893
+ type,
1894
+ soFar,
1895
+ groups,
1896
+ preFilters,
1897
+ cached = tokenCache[selector + " "];
1898
+
1899
+ if (cached) {
1900
+ return parseOnly ? 0 : cached.slice(0);
1901
+ }
1902
+
1903
+ soFar = selector;
1904
+ groups = [];
1905
+ preFilters = Expr.preFilter;
1906
+
1907
+ while (soFar) {
1908
+ // Comma and first run
1909
+ if (!matched || (match = rcomma.exec(soFar))) {
1910
+ if (match) {
1911
+ // Don't consume trailing commas as valid
1912
+ soFar = soFar.slice(match[0].length) || soFar;
1913
+ }
1914
+ groups.push((tokens = []));
1915
+ }
1916
+
1917
+ matched = false;
1918
+
1919
+ // Combinators
1920
+ if ((match = rcombinators.exec(soFar))) {
1921
+ matched = match.shift();
1922
+ tokens.push({
1923
+ value: matched,
1924
+ // Cast descendant combinators to space
1925
+ type: match[0].replace(rtrim, " ")
1926
+ });
1927
+
1928
+ soFar = soFar.slice(matched.length);
1929
+ }
1930
+
1931
+ // Filters
1932
+ for (type in Expr.filter) {
1933
+ if (
1934
+ (match = matchExpr[type].exec(soFar)) &&
1935
+ (!preFilters[type] || (match = preFilters[type](match)))
1936
+ ) {
1937
+ matched = match.shift();
1938
+ tokens.push({
1939
+ value: matched,
1940
+ type: type,
1941
+ matches: match
1942
+ });
1943
+
1944
+ soFar = soFar.slice(matched.length);
1945
+ }
1946
+ }
1947
+
1948
+ if (!matched) {
1949
+ break;
1950
+ }
1951
+ }
1952
+
1953
+ // Return the length of the invalid excess
1954
+ // if we're just parsing
1955
+ // Otherwise, throw an error or return tokens
1956
+ return parseOnly
1957
+ ? soFar.length
1958
+ : soFar
1959
+ ? Sizzle.error(selector)
1960
+ : // Cache the tokens
1961
+ tokenCache(selector, groups).slice(0);
1962
+ };
1963
+
1964
+ function toSelector(tokens) {
1965
+ var i = 0,
1966
+ len = tokens.length,
1967
+ selector = "";
1968
+ for (; i < len; i++) {
1969
+ selector += tokens[i].value;
1970
+ }
1971
+ return selector;
1972
+ }
700
1973
 
701
- /**
702
- * Sets document-related variables once based on the current document
703
- * @param doc {Element|Object} An element or document object to use to set the document
704
- * @return {Object} Returns the current document
705
- */
706
- setDocument = Sizzle.setDocument = function( node ) {
707
- var hasCompare, subWindow,
708
- doc = node ? node.ownerDocument || node : preferredDoc;
709
-
710
- // Return early if doc is invalid or already selected
711
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
712
- return document;
713
- }
714
-
715
- // Update global variables
716
- document = doc;
717
- docElem = document.documentElement;
718
- documentIsHTML = !isXML( document );
719
-
720
- // Support: IE 9-11, Edge
721
- // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
722
- if ( preferredDoc !== document &&
723
- (subWindow = document.defaultView) && subWindow.top !== subWindow ) {
724
-
725
- // Support: IE 11, Edge
726
- if ( subWindow.addEventListener ) {
727
- subWindow.addEventListener( "unload", unloadHandler, false );
728
-
729
- // Support: IE 9 - 10 only
730
- } else if ( subWindow.attachEvent ) {
731
- subWindow.attachEvent( "onunload", unloadHandler );
732
- }
733
- }
734
-
735
- /* Attributes
736
- ---------------------------------------------------------------------- */
737
-
738
- // Support: IE<8
739
- // Verify that getAttribute really returns attributes and not properties
740
- // (excepting IE8 booleans)
741
- support.attributes = assert(function( el ) {
742
- el.className = "i";
743
- return !el.getAttribute("className");
744
- });
745
-
746
- /* getElement(s)By*
747
- ---------------------------------------------------------------------- */
748
-
749
- // Check if getElementsByTagName("*") returns only elements
750
- support.getElementsByTagName = assert(function( el ) {
751
- el.appendChild( document.createComment("") );
752
- return !el.getElementsByTagName("*").length;
753
- });
754
-
755
- // Support: IE<9
756
- support.getElementsByClassName = rnative.test( document.getElementsByClassName );
757
-
758
- // Support: IE<10
759
- // Check if getElementById returns elements by name
760
- // The broken getElementById methods don't pick up programmatically-set names,
761
- // so use a roundabout getElementsByName test
762
- support.getById = assert(function( el ) {
763
- docElem.appendChild( el ).id = expando;
764
- return !document.getElementsByName || !document.getElementsByName( expando ).length;
765
- });
766
-
767
- // ID find and filter
768
- if ( support.getById ) {
769
- Expr.find["ID"] = function( id, context ) {
770
- if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
771
- var m = context.getElementById( id );
772
- return m ? [ m ] : [];
773
- }
774
- };
775
- Expr.filter["ID"] = function( id ) {
776
- var attrId = id.replace( runescape, funescape );
777
- return function( elem ) {
778
- return elem.getAttribute("id") === attrId;
779
- };
780
- };
781
- } else {
782
- // Support: IE6/7
783
- // getElementById is not reliable as a find shortcut
784
- delete Expr.find["ID"];
785
-
786
- Expr.filter["ID"] = function( id ) {
787
- var attrId = id.replace( runescape, funescape );
788
- return function( elem ) {
789
- var node = typeof elem.getAttributeNode !== "undefined" &&
790
- elem.getAttributeNode("id");
791
- return node && node.value === attrId;
792
- };
793
- };
794
- }
795
-
796
- // Tag
797
- Expr.find["TAG"] = support.getElementsByTagName ?
798
- function( tag, context ) {
799
- if ( typeof context.getElementsByTagName !== "undefined" ) {
800
- return context.getElementsByTagName( tag );
801
-
802
- // DocumentFragment nodes don't have gEBTN
803
- } else if ( support.qsa ) {
804
- return context.querySelectorAll( tag );
805
- }
806
- } :
807
-
808
- function( tag, context ) {
809
- var elem,
810
- tmp = [],
811
- i = 0,
812
- // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
813
- results = context.getElementsByTagName( tag );
814
-
815
- // Filter out possible comments
816
- if ( tag === "*" ) {
817
- while ( (elem = results[i++]) ) {
818
- if ( elem.nodeType === 1 ) {
819
- tmp.push( elem );
820
- }
821
- }
822
-
823
- return tmp;
824
- }
825
- return results;
826
- };
827
-
828
- // Class
829
- Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
830
- if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
831
- return context.getElementsByClassName( className );
832
- }
833
- };
834
-
835
- /* QSA/matchesSelector
836
- ---------------------------------------------------------------------- */
837
-
838
- // QSA and matchesSelector support
839
-
840
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
841
- rbuggyMatches = [];
842
-
843
- // qSa(:focus) reports false when true (Chrome 21)
844
- // We allow this because of a bug in IE8/9 that throws an error
845
- // whenever `document.activeElement` is accessed on an iframe
846
- // So, we allow :focus to pass through QSA all the time to avoid the IE error
847
- // See https://bugs.jquery.com/ticket/13378
848
- rbuggyQSA = [];
849
-
850
- if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
851
- // Build QSA regex
852
- // Regex strategy adopted from Diego Perini
853
- assert(function( el ) {
854
- // Select is set to empty string on purpose
855
- // This is to test IE's treatment of not explicitly
856
- // setting a boolean content attribute,
857
- // since its presence should be enough
858
- // https://bugs.jquery.com/ticket/12359
859
- docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
860
- "<select id='" + expando + "-\r\\' msallowcapture=''>" +
861
- "<option selected=''></option></select>";
862
-
863
- // Support: IE8, Opera 11-12.16
864
- // Nothing should be selected when empty strings follow ^= or $= or *=
865
- // The test attribute must be unknown in Opera but "safe" for WinRT
866
- // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
867
- if ( el.querySelectorAll("[msallowcapture^='']").length ) {
868
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
869
- }
870
-
871
- // Support: IE8
872
- // Boolean attributes and "value" are not treated correctly
873
- if ( !el.querySelectorAll("[selected]").length ) {
874
- rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
875
- }
876
-
877
- // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
878
- if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
879
- rbuggyQSA.push("~=");
880
- }
881
-
882
- // Webkit/Opera - :checked should return selected option elements
883
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
884
- // IE8 throws error here and will not see later tests
885
- if ( !el.querySelectorAll(":checked").length ) {
886
- rbuggyQSA.push(":checked");
887
- }
888
-
889
- // Support: Safari 8+, iOS 8+
890
- // https://bugs.webkit.org/show_bug.cgi?id=136851
891
- // In-page `selector#id sibling-combinator selector` fails
892
- if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
893
- rbuggyQSA.push(".#.+[+~]");
894
- }
895
- });
896
-
897
- assert(function( el ) {
898
- el.innerHTML = "<a href='' disabled='disabled'></a>" +
899
- "<select disabled='disabled'><option/></select>";
900
-
901
- // Support: Windows 8 Native Apps
902
- // The type and name attributes are restricted during .innerHTML assignment
903
- var input = document.createElement("input");
904
- input.setAttribute( "type", "hidden" );
905
- el.appendChild( input ).setAttribute( "name", "D" );
906
-
907
- // Support: IE8
908
- // Enforce case-sensitivity of name attribute
909
- if ( el.querySelectorAll("[name=d]").length ) {
910
- rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
911
- }
912
-
913
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
914
- // IE8 throws error here and will not see later tests
915
- if ( el.querySelectorAll(":enabled").length !== 2 ) {
916
- rbuggyQSA.push( ":enabled", ":disabled" );
917
- }
918
-
919
- // Support: IE9-11+
920
- // IE's :disabled selector does not pick up the children of disabled fieldsets
921
- docElem.appendChild( el ).disabled = true;
922
- if ( el.querySelectorAll(":disabled").length !== 2 ) {
923
- rbuggyQSA.push( ":enabled", ":disabled" );
924
- }
925
-
926
- // Opera 10-11 does not throw on post-comma invalid pseudos
927
- el.querySelectorAll("*,:x");
928
- rbuggyQSA.push(",.*:");
929
- });
930
- }
931
-
932
- if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
933
- docElem.webkitMatchesSelector ||
934
- docElem.mozMatchesSelector ||
935
- docElem.oMatchesSelector ||
936
- docElem.msMatchesSelector) )) ) {
937
-
938
- assert(function( el ) {
939
- // Check to see if it's possible to do matchesSelector
940
- // on a disconnected node (IE 9)
941
- support.disconnectedMatch = matches.call( el, "*" );
942
-
943
- // This should fail with an exception
944
- // Gecko does not error, returns false instead
945
- matches.call( el, "[s!='']:x" );
946
- rbuggyMatches.push( "!=", pseudos );
947
- });
948
- }
949
-
950
- rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
951
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
952
-
953
- /* Contains
954
- ---------------------------------------------------------------------- */
955
- hasCompare = rnative.test( docElem.compareDocumentPosition );
956
-
957
- // Element contains another
958
- // Purposefully self-exclusive
959
- // As in, an element does not contain itself
960
- contains = hasCompare || rnative.test( docElem.contains ) ?
961
- function( a, b ) {
962
- var adown = a.nodeType === 9 ? a.documentElement : a,
963
- bup = b && b.parentNode;
964
- return a === bup || !!( bup && bup.nodeType === 1 && (
965
- adown.contains ?
966
- adown.contains( bup ) :
967
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
968
- ));
969
- } :
970
- function( a, b ) {
971
- if ( b ) {
972
- while ( (b = b.parentNode) ) {
973
- if ( b === a ) {
974
- return true;
975
- }
976
- }
977
- }
978
- return false;
979
- };
980
-
981
- /* Sorting
982
- ---------------------------------------------------------------------- */
983
-
984
- // Document order sorting
985
- sortOrder = hasCompare ?
986
- function( a, b ) {
987
-
988
- // Flag for duplicate removal
989
- if ( a === b ) {
990
- hasDuplicate = true;
991
- return 0;
992
- }
993
-
994
- // Sort on method existence if only one input has compareDocumentPosition
995
- var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
996
- if ( compare ) {
997
- return compare;
998
- }
999
-
1000
- // Calculate position if both inputs belong to the same document
1001
- compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
1002
- a.compareDocumentPosition( b ) :
1003
-
1004
- // Otherwise we know they are disconnected
1005
- 1;
1006
-
1007
- // Disconnected nodes
1008
- if ( compare & 1 ||
1009
- (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
1010
-
1011
- // Choose the first element that is related to our preferred document
1012
- if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
1013
- return -1;
1014
- }
1015
- if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
1016
- return 1;
1017
- }
1018
-
1019
- // Maintain original order
1020
- return sortInput ?
1021
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
1022
- 0;
1023
- }
1024
-
1025
- return compare & 4 ? -1 : 1;
1026
- } :
1027
- function( a, b ) {
1028
- // Exit early if the nodes are identical
1029
- if ( a === b ) {
1030
- hasDuplicate = true;
1031
- return 0;
1032
- }
1033
-
1034
- var cur,
1035
- i = 0,
1036
- aup = a.parentNode,
1037
- bup = b.parentNode,
1038
- ap = [ a ],
1039
- bp = [ b ];
1040
-
1041
- // Parentless nodes are either documents or disconnected
1042
- if ( !aup || !bup ) {
1043
- return a === document ? -1 :
1044
- b === document ? 1 :
1045
- aup ? -1 :
1046
- bup ? 1 :
1047
- sortInput ?
1048
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
1049
- 0;
1050
-
1051
- // If the nodes are siblings, we can do a quick check
1052
- } else if ( aup === bup ) {
1053
- return siblingCheck( a, b );
1054
- }
1055
-
1056
- // Otherwise we need full lists of their ancestors for comparison
1057
- cur = a;
1058
- while ( (cur = cur.parentNode) ) {
1059
- ap.unshift( cur );
1060
- }
1061
- cur = b;
1062
- while ( (cur = cur.parentNode) ) {
1063
- bp.unshift( cur );
1064
- }
1065
-
1066
- // Walk down the tree looking for a discrepancy
1067
- while ( ap[i] === bp[i] ) {
1068
- i++;
1069
- }
1070
-
1071
- return i ?
1072
- // Do a sibling check if the nodes have a common ancestor
1073
- siblingCheck( ap[i], bp[i] ) :
1074
-
1075
- // Otherwise nodes in our document sort first
1076
- ap[i] === preferredDoc ? -1 :
1077
- bp[i] === preferredDoc ? 1 :
1078
- 0;
1079
- };
1080
-
1081
- return document;
1082
- };
1083
-
1084
- Sizzle.matches = function( expr, elements ) {
1085
- return Sizzle( expr, null, null, elements );
1086
- };
1087
-
1088
- Sizzle.matchesSelector = function( elem, expr ) {
1089
- // Set document vars if needed
1090
- if ( ( elem.ownerDocument || elem ) !== document ) {
1091
- setDocument( elem );
1092
- }
1093
-
1094
- // Make sure that attribute selectors are quoted
1095
- expr = expr.replace( rattributeQuotes, "='$1']" );
1096
-
1097
- if ( support.matchesSelector && documentIsHTML &&
1098
- !compilerCache[ expr + " " ] &&
1099
- ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
1100
- ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
1101
-
1102
- try {
1103
- var ret = matches.call( elem, expr );
1104
-
1105
- // IE 9's matchesSelector returns false on disconnected nodes
1106
- if ( ret || support.disconnectedMatch ||
1107
- // As well, disconnected nodes are said to be in a document
1108
- // fragment in IE 9
1109
- elem.document && elem.document.nodeType !== 11 ) {
1110
- return ret;
1111
- }
1112
- } catch (e) {}
1113
- }
1114
-
1115
- return Sizzle( expr, document, null, [ elem ] ).length > 0;
1116
- };
1117
-
1118
- Sizzle.contains = function( context, elem ) {
1119
- // Set document vars if needed
1120
- if ( ( context.ownerDocument || context ) !== document ) {
1121
- setDocument( context );
1122
- }
1123
- return contains( context, elem );
1124
- };
1125
-
1126
- Sizzle.attr = function( elem, name ) {
1127
- // Set document vars if needed
1128
- if ( ( elem.ownerDocument || elem ) !== document ) {
1129
- setDocument( elem );
1130
- }
1131
-
1132
- var fn = Expr.attrHandle[ name.toLowerCase() ],
1133
- // Don't get fooled by Object.prototype properties (jQuery #13807)
1134
- val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
1135
- fn( elem, name, !documentIsHTML ) :
1136
- undefined;
1137
-
1138
- return val !== undefined ?
1139
- val :
1140
- support.attributes || !documentIsHTML ?
1141
- elem.getAttribute( name ) :
1142
- (val = elem.getAttributeNode(name)) && val.specified ?
1143
- val.value :
1144
- null;
1145
- };
1146
-
1147
- Sizzle.escape = function( sel ) {
1148
- return (sel + "").replace( rcssescape, fcssescape );
1149
- };
1150
-
1151
- Sizzle.error = function( msg ) {
1152
- throw new Error( "Syntax error, unrecognized expression: " + msg );
1153
- };
1974
+ function addCombinator(matcher, combinator, base) {
1975
+ var dir = combinator.dir,
1976
+ skip = combinator.next,
1977
+ key = skip || dir,
1978
+ checkNonElements = base && key === "parentNode",
1979
+ doneName = done++;
1980
+
1981
+ return combinator.first
1982
+ ? // Check against closest ancestor/preceding element
1983
+ function (elem, context, xml) {
1984
+ while ((elem = elem[dir])) {
1985
+ if (elem.nodeType === 1 || checkNonElements) {
1986
+ return matcher(elem, context, xml);
1987
+ }
1988
+ }
1989
+ }
1990
+ : // Check against all ancestor/preceding elements
1991
+ function (elem, context, xml) {
1992
+ var oldCache,
1993
+ uniqueCache,
1994
+ outerCache,
1995
+ newCache = [dirruns, doneName];
1996
+
1997
+ // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
1998
+ if (xml) {
1999
+ while ((elem = elem[dir])) {
2000
+ if (elem.nodeType === 1 || checkNonElements) {
2001
+ if (matcher(elem, context, xml)) {
2002
+ return true;
2003
+ }
2004
+ }
2005
+ }
2006
+ } else {
2007
+ while ((elem = elem[dir])) {
2008
+ if (elem.nodeType === 1 || checkNonElements) {
2009
+ outerCache = elem[expando] || (elem[expando] = {});
2010
+
2011
+ // Support: IE <9 only
2012
+ // Defend against cloned attroperties (jQuery gh-1709)
2013
+ uniqueCache =
2014
+ outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {});
2015
+
2016
+ if (skip && skip === elem.nodeName.toLowerCase()) {
2017
+ elem = elem[dir] || elem;
2018
+ } else if (
2019
+ (oldCache = uniqueCache[key]) &&
2020
+ oldCache[0] === dirruns &&
2021
+ oldCache[1] === doneName
2022
+ ) {
2023
+ // Assign to newCache so results back-propagate to previous elements
2024
+ return (newCache[2] = oldCache[2]);
2025
+ } else {
2026
+ // Reuse newcache so results back-propagate to previous elements
2027
+ uniqueCache[key] = newCache;
2028
+
2029
+ // A match means we're done; a fail means we have to keep checking
2030
+ if ((newCache[2] = matcher(elem, context, xml))) {
2031
+ return true;
2032
+ }
2033
+ }
2034
+ }
2035
+ }
2036
+ }
2037
+ };
2038
+ }
1154
2039
 
1155
- /**
1156
- * Document sorting and removing duplicates
1157
- * @param results {ArrayLike}
1158
- */
1159
- Sizzle.uniqueSort = function( results ) {
1160
- var elem,
1161
- duplicates = [],
1162
- j = 0,
1163
- i = 0;
1164
-
1165
- // Unless we *know* we can detect duplicates, assume their presence
1166
- hasDuplicate = !support.detectDuplicates;
1167
- sortInput = !support.sortStable && results.slice( 0 );
1168
- results.sort( sortOrder );
1169
-
1170
- if ( hasDuplicate ) {
1171
- while ( (elem = results[i++]) ) {
1172
- if ( elem === results[ i ] ) {
1173
- j = duplicates.push( i );
1174
- }
1175
- }
1176
- while ( j-- ) {
1177
- results.splice( duplicates[ j ], 1 );
1178
- }
1179
- }
1180
-
1181
- // Clear input after sorting to release objects
1182
- // See https://github.com/jquery/sizzle/pull/225
1183
- sortInput = null;
1184
-
1185
- return results;
1186
- };
2040
+ function elementMatcher(matchers) {
2041
+ return matchers.length > 1
2042
+ ? function (elem, context, xml) {
2043
+ var i = matchers.length;
2044
+ while (i--) {
2045
+ if (!matchers[i](elem, context, xml)) {
2046
+ return false;
2047
+ }
2048
+ }
2049
+ return true;
2050
+ }
2051
+ : matchers[0];
2052
+ }
1187
2053
 
1188
- /**
1189
- * Utility function for retrieving the text value of an array of DOM nodes
1190
- * @param elem {Array|Element}
1191
- */
1192
- getText = Sizzle.getText = function( elem ) {
1193
- var node,
1194
- ret = "",
1195
- i = 0,
1196
- nodeType = elem.nodeType;
1197
-
1198
- if ( !nodeType ) {
1199
- // If no nodeType, this is expected to be an array
1200
- while ( (node = elem[i++]) ) {
1201
- // Do not traverse comment nodes
1202
- ret += getText( node );
1203
- }
1204
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
1205
- // Use textContent for elements
1206
- // innerText usage removed for consistency of new lines (jQuery #11153)
1207
- if ( typeof elem.textContent === "string" ) {
1208
- return elem.textContent;
1209
- } else {
1210
- // Traverse its children
1211
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
1212
- ret += getText( elem );
1213
- }
1214
- }
1215
- } else if ( nodeType === 3 || nodeType === 4 ) {
1216
- return elem.nodeValue;
1217
- }
1218
- // Do not include comment or processing instruction nodes
1219
-
1220
- return ret;
1221
- };
1222
-
1223
- Expr = Sizzle.selectors = {
1224
-
1225
- // Can be adjusted by the user
1226
- cacheLength: 50,
1227
-
1228
- createPseudo: markFunction,
1229
-
1230
- match: matchExpr,
1231
-
1232
- attrHandle: {},
1233
-
1234
- find: {},
1235
-
1236
- relative: {
1237
- ">": { dir: "parentNode", first: true },
1238
- " ": { dir: "parentNode" },
1239
- "+": { dir: "previousSibling", first: true },
1240
- "~": { dir: "previousSibling" }
1241
- },
1242
-
1243
- preFilter: {
1244
- "ATTR": function( match ) {
1245
- match[1] = match[1].replace( runescape, funescape );
1246
-
1247
- // Move the given value to match[3] whether quoted or unquoted
1248
- match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
1249
-
1250
- if ( match[2] === "~=" ) {
1251
- match[3] = " " + match[3] + " ";
1252
- }
1253
-
1254
- return match.slice( 0, 4 );
1255
- },
1256
-
1257
- "CHILD": function( match ) {
1258
- /* matches from matchExpr["CHILD"]
1259
- 1 type (only|nth|...)
1260
- 2 what (child|of-type)
1261
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
1262
- 4 xn-component of xn+y argument ([+-]?\d*n|)
1263
- 5 sign of xn-component
1264
- 6 x of xn-component
1265
- 7 sign of y-component
1266
- 8 y of y-component
1267
- */
1268
- match[1] = match[1].toLowerCase();
1269
-
1270
- if ( match[1].slice( 0, 3 ) === "nth" ) {
1271
- // nth-* requires argument
1272
- if ( !match[3] ) {
1273
- Sizzle.error( match[0] );
1274
- }
1275
-
1276
- // numeric x and y parameters for Expr.filter.CHILD
1277
- // remember that false/true cast respectively to 0/1
1278
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
1279
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
1280
-
1281
- // other types prohibit arguments
1282
- } else if ( match[3] ) {
1283
- Sizzle.error( match[0] );
1284
- }
1285
-
1286
- return match;
1287
- },
1288
-
1289
- "PSEUDO": function( match ) {
1290
- var excess,
1291
- unquoted = !match[6] && match[2];
1292
-
1293
- if ( matchExpr["CHILD"].test( match[0] ) ) {
1294
- return null;
1295
- }
1296
-
1297
- // Accept quoted arguments as-is
1298
- if ( match[3] ) {
1299
- match[2] = match[4] || match[5] || "";
1300
-
1301
- // Strip excess characters from unquoted arguments
1302
- } else if ( unquoted && rpseudo.test( unquoted ) &&
1303
- // Get excess from tokenize (recursively)
1304
- (excess = tokenize( unquoted, true )) &&
1305
- // advance to the next closing parenthesis
1306
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
1307
-
1308
- // excess is a negative index
1309
- match[0] = match[0].slice( 0, excess );
1310
- match[2] = unquoted.slice( 0, excess );
1311
- }
1312
-
1313
- // Return only captures needed by the pseudo filter method (type and argument)
1314
- return match.slice( 0, 3 );
1315
- }
1316
- },
1317
-
1318
- filter: {
1319
-
1320
- "TAG": function( nodeNameSelector ) {
1321
- var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
1322
- return nodeNameSelector === "*" ?
1323
- function() { return true; } :
1324
- function( elem ) {
1325
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
1326
- };
1327
- },
1328
-
1329
- "CLASS": function( className ) {
1330
- var pattern = classCache[ className + " " ];
1331
-
1332
- return pattern ||
1333
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
1334
- classCache( className, function( elem ) {
1335
- return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
1336
- });
1337
- },
1338
-
1339
- "ATTR": function( name, operator, check ) {
1340
- return function( elem ) {
1341
- var result = Sizzle.attr( elem, name );
1342
-
1343
- if ( result == null ) {
1344
- return operator === "!=";
1345
- }
1346
- if ( !operator ) {
1347
- return true;
1348
- }
1349
-
1350
- result += "";
1351
-
1352
- return operator === "=" ? result === check :
1353
- operator === "!=" ? result !== check :
1354
- operator === "^=" ? check && result.indexOf( check ) === 0 :
1355
- operator === "*=" ? check && result.indexOf( check ) > -1 :
1356
- operator === "$=" ? check && result.slice( -check.length ) === check :
1357
- operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
1358
- operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
1359
- false;
1360
- };
1361
- },
1362
-
1363
- "CHILD": function( type, what, argument, first, last ) {
1364
- var simple = type.slice( 0, 3 ) !== "nth",
1365
- forward = type.slice( -4 ) !== "last",
1366
- ofType = what === "of-type";
1367
-
1368
- return first === 1 && last === 0 ?
1369
-
1370
- // Shortcut for :nth-*(n)
1371
- function( elem ) {
1372
- return !!elem.parentNode;
1373
- } :
1374
-
1375
- function( elem, context, xml ) {
1376
- var cache, uniqueCache, outerCache, node, nodeIndex, start,
1377
- dir = simple !== forward ? "nextSibling" : "previousSibling",
1378
- parent = elem.parentNode,
1379
- name = ofType && elem.nodeName.toLowerCase(),
1380
- useCache = !xml && !ofType,
1381
- diff = false;
1382
-
1383
- if ( parent ) {
1384
-
1385
- // :(first|last|only)-(child|of-type)
1386
- if ( simple ) {
1387
- while ( dir ) {
1388
- node = elem;
1389
- while ( (node = node[ dir ]) ) {
1390
- if ( ofType ?
1391
- node.nodeName.toLowerCase() === name :
1392
- node.nodeType === 1 ) {
1393
-
1394
- return false;
1395
- }
1396
- }
1397
- // Reverse direction for :only-* (if we haven't yet done so)
1398
- start = dir = type === "only" && !start && "nextSibling";
1399
- }
1400
- return true;
1401
- }
1402
-
1403
- start = [ forward ? parent.firstChild : parent.lastChild ];
1404
-
1405
- // non-xml :nth-child(...) stores cache data on `parent`
1406
- if ( forward && useCache ) {
1407
-
1408
- // Seek `elem` from a previously-cached index
1409
-
1410
- // ...in a gzip-friendly way
1411
- node = parent;
1412
- outerCache = node[ expando ] || (node[ expando ] = {});
1413
-
1414
- // Support: IE <9 only
1415
- // Defend against cloned attroperties (jQuery gh-1709)
1416
- uniqueCache = outerCache[ node.uniqueID ] ||
1417
- (outerCache[ node.uniqueID ] = {});
1418
-
1419
- cache = uniqueCache[ type ] || [];
1420
- nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
1421
- diff = nodeIndex && cache[ 2 ];
1422
- node = nodeIndex && parent.childNodes[ nodeIndex ];
1423
-
1424
- while ( (node = ++nodeIndex && node && node[ dir ] ||
1425
-
1426
- // Fallback to seeking `elem` from the start
1427
- (diff = nodeIndex = 0) || start.pop()) ) {
1428
-
1429
- // When found, cache indexes on `parent` and break
1430
- if ( node.nodeType === 1 && ++diff && node === elem ) {
1431
- uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
1432
- break;
1433
- }
1434
- }
1435
-
1436
- } else {
1437
- // Use previously-cached element index if available
1438
- if ( useCache ) {
1439
- // ...in a gzip-friendly way
1440
- node = elem;
1441
- outerCache = node[ expando ] || (node[ expando ] = {});
1442
-
1443
- // Support: IE <9 only
1444
- // Defend against cloned attroperties (jQuery gh-1709)
1445
- uniqueCache = outerCache[ node.uniqueID ] ||
1446
- (outerCache[ node.uniqueID ] = {});
1447
-
1448
- cache = uniqueCache[ type ] || [];
1449
- nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
1450
- diff = nodeIndex;
1451
- }
1452
-
1453
- // xml :nth-child(...)
1454
- // or :nth-last-child(...) or :nth(-last)?-of-type(...)
1455
- if ( diff === false ) {
1456
- // Use the same loop as above to seek `elem` from the start
1457
- while ( (node = ++nodeIndex && node && node[ dir ] ||
1458
- (diff = nodeIndex = 0) || start.pop()) ) {
1459
-
1460
- if ( ( ofType ?
1461
- node.nodeName.toLowerCase() === name :
1462
- node.nodeType === 1 ) &&
1463
- ++diff ) {
1464
-
1465
- // Cache the index of each encountered element
1466
- if ( useCache ) {
1467
- outerCache = node[ expando ] || (node[ expando ] = {});
1468
-
1469
- // Support: IE <9 only
1470
- // Defend against cloned attroperties (jQuery gh-1709)
1471
- uniqueCache = outerCache[ node.uniqueID ] ||
1472
- (outerCache[ node.uniqueID ] = {});
1473
-
1474
- uniqueCache[ type ] = [ dirruns, diff ];
1475
- }
1476
-
1477
- if ( node === elem ) {
1478
- break;
1479
- }
1480
- }
1481
- }
1482
- }
1483
- }
1484
-
1485
- // Incorporate the offset, then check against cycle size
1486
- diff -= last;
1487
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
1488
- }
1489
- };
1490
- },
1491
-
1492
- "PSEUDO": function( pseudo, argument ) {
1493
- // pseudo-class names are case-insensitive
1494
- // http://www.w3.org/TR/selectors/#pseudo-classes
1495
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
1496
- // Remember that setFilters inherits from pseudos
1497
- var args,
1498
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
1499
- Sizzle.error( "unsupported pseudo: " + pseudo );
1500
-
1501
- // The user may use createPseudo to indicate that
1502
- // arguments are needed to create the filter function
1503
- // just as Sizzle does
1504
- if ( fn[ expando ] ) {
1505
- return fn( argument );
1506
- }
1507
-
1508
- // But maintain support for old signatures
1509
- if ( fn.length > 1 ) {
1510
- args = [ pseudo, pseudo, "", argument ];
1511
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
1512
- markFunction(function( seed, matches ) {
1513
- var idx,
1514
- matched = fn( seed, argument ),
1515
- i = matched.length;
1516
- while ( i-- ) {
1517
- idx = indexOf( seed, matched[i] );
1518
- seed[ idx ] = !( matches[ idx ] = matched[i] );
1519
- }
1520
- }) :
1521
- function( elem ) {
1522
- return fn( elem, 0, args );
1523
- };
1524
- }
1525
-
1526
- return fn;
1527
- }
1528
- },
1529
-
1530
- pseudos: {
1531
- // Potentially complex pseudos
1532
- "not": markFunction(function( selector ) {
1533
- // Trim the selector passed to compile
1534
- // to avoid treating leading and trailing
1535
- // spaces as combinators
1536
- var input = [],
1537
- results = [],
1538
- matcher = compile( selector.replace( rtrim, "$1" ) );
1539
-
1540
- return matcher[ expando ] ?
1541
- markFunction(function( seed, matches, context, xml ) {
1542
- var elem,
1543
- unmatched = matcher( seed, null, xml, [] ),
1544
- i = seed.length;
1545
-
1546
- // Match elements unmatched by `matcher`
1547
- while ( i-- ) {
1548
- if ( (elem = unmatched[i]) ) {
1549
- seed[i] = !(matches[i] = elem);
1550
- }
1551
- }
1552
- }) :
1553
- function( elem, context, xml ) {
1554
- input[0] = elem;
1555
- matcher( input, null, xml, results );
1556
- // Don't keep the element (issue #299)
1557
- input[0] = null;
1558
- return !results.pop();
1559
- };
1560
- }),
1561
-
1562
- "has": markFunction(function( selector ) {
1563
- return function( elem ) {
1564
- return Sizzle( selector, elem ).length > 0;
1565
- };
1566
- }),
1567
-
1568
- "contains": markFunction(function( text ) {
1569
- text = text.replace( runescape, funescape );
1570
- return function( elem ) {
1571
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
1572
- };
1573
- }),
1574
-
1575
- // "Whether an element is represented by a :lang() selector
1576
- // is based solely on the element's language value
1577
- // being equal to the identifier C,
1578
- // or beginning with the identifier C immediately followed by "-".
1579
- // The matching of C against the element's language value is performed case-insensitively.
1580
- // The identifier C does not have to be a valid language name."
1581
- // http://www.w3.org/TR/selectors/#lang-pseudo
1582
- "lang": markFunction( function( lang ) {
1583
- // lang value must be a valid identifier
1584
- if ( !ridentifier.test(lang || "") ) {
1585
- Sizzle.error( "unsupported lang: " + lang );
1586
- }
1587
- lang = lang.replace( runescape, funescape ).toLowerCase();
1588
- return function( elem ) {
1589
- var elemLang;
1590
- do {
1591
- if ( (elemLang = documentIsHTML ?
1592
- elem.lang :
1593
- elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
1594
-
1595
- elemLang = elemLang.toLowerCase();
1596
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
1597
- }
1598
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
1599
- return false;
1600
- };
1601
- }),
1602
-
1603
- // Miscellaneous
1604
- "target": function( elem ) {
1605
- var hash = window.location && window.location.hash;
1606
- return hash && hash.slice( 1 ) === elem.id;
1607
- },
1608
-
1609
- "root": function( elem ) {
1610
- return elem === docElem;
1611
- },
1612
-
1613
- "focus": function( elem ) {
1614
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
1615
- },
1616
-
1617
- // Boolean properties
1618
- "enabled": createDisabledPseudo( false ),
1619
- "disabled": createDisabledPseudo( true ),
1620
-
1621
- "checked": function( elem ) {
1622
- // In CSS3, :checked should return both checked and selected elements
1623
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1624
- var nodeName = elem.nodeName.toLowerCase();
1625
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
1626
- },
1627
-
1628
- "selected": function( elem ) {
1629
- // Accessing this property makes selected-by-default
1630
- // options in Safari work properly
1631
- if ( elem.parentNode ) {
1632
- elem.parentNode.selectedIndex;
1633
- }
1634
-
1635
- return elem.selected === true;
1636
- },
1637
-
1638
- // Contents
1639
- "empty": function( elem ) {
1640
- // http://www.w3.org/TR/selectors/#empty-pseudo
1641
- // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
1642
- // but not by others (comment: 8; processing instruction: 7; etc.)
1643
- // nodeType < 6 works because attributes (2) do not appear as children
1644
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
1645
- if ( elem.nodeType < 6 ) {
1646
- return false;
1647
- }
1648
- }
1649
- return true;
1650
- },
1651
-
1652
- "parent": function( elem ) {
1653
- return !Expr.pseudos["empty"]( elem );
1654
- },
1655
-
1656
- // Element/input types
1657
- "header": function( elem ) {
1658
- return rheader.test( elem.nodeName );
1659
- },
1660
-
1661
- "input": function( elem ) {
1662
- return rinputs.test( elem.nodeName );
1663
- },
1664
-
1665
- "button": function( elem ) {
1666
- var name = elem.nodeName.toLowerCase();
1667
- return name === "input" && elem.type === "button" || name === "button";
1668
- },
1669
-
1670
- "text": function( elem ) {
1671
- var attr;
1672
- return elem.nodeName.toLowerCase() === "input" &&
1673
- elem.type === "text" &&
1674
-
1675
- // Support: IE<8
1676
- // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
1677
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
1678
- },
1679
-
1680
- // Position-in-collection
1681
- "first": createPositionalPseudo(function() {
1682
- return [ 0 ];
1683
- }),
1684
-
1685
- "last": createPositionalPseudo(function( matchIndexes, length ) {
1686
- return [ length - 1 ];
1687
- }),
1688
-
1689
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
1690
- return [ argument < 0 ? argument + length : argument ];
1691
- }),
1692
-
1693
- "even": createPositionalPseudo(function( matchIndexes, length ) {
1694
- var i = 0;
1695
- for ( ; i < length; i += 2 ) {
1696
- matchIndexes.push( i );
1697
- }
1698
- return matchIndexes;
1699
- }),
1700
-
1701
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
1702
- var i = 1;
1703
- for ( ; i < length; i += 2 ) {
1704
- matchIndexes.push( i );
1705
- }
1706
- return matchIndexes;
1707
- }),
1708
-
1709
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
1710
- var i = argument < 0 ? argument + length : argument;
1711
- for ( ; --i >= 0; ) {
1712
- matchIndexes.push( i );
1713
- }
1714
- return matchIndexes;
1715
- }),
1716
-
1717
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
1718
- var i = argument < 0 ? argument + length : argument;
1719
- for ( ; ++i < length; ) {
1720
- matchIndexes.push( i );
1721
- }
1722
- return matchIndexes;
1723
- })
1724
- }
1725
- };
1726
-
1727
- Expr.pseudos["nth"] = Expr.pseudos["eq"];
1728
-
1729
- // Add button/input type pseudos
1730
- for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
1731
- Expr.pseudos[ i ] = createInputPseudo( i );
1732
- }
1733
- for ( i in { submit: true, reset: true } ) {
1734
- Expr.pseudos[ i ] = createButtonPseudo( i );
1735
- }
1736
-
1737
- // Easy API for creating new setFilters
1738
- function setFilters() {}
1739
- setFilters.prototype = Expr.filters = Expr.pseudos;
1740
- Expr.setFilters = new setFilters();
1741
-
1742
- tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
1743
- var matched, match, tokens, type,
1744
- soFar, groups, preFilters,
1745
- cached = tokenCache[ selector + " " ];
1746
-
1747
- if ( cached ) {
1748
- return parseOnly ? 0 : cached.slice( 0 );
1749
- }
1750
-
1751
- soFar = selector;
1752
- groups = [];
1753
- preFilters = Expr.preFilter;
1754
-
1755
- while ( soFar ) {
1756
-
1757
- // Comma and first run
1758
- if ( !matched || (match = rcomma.exec( soFar )) ) {
1759
- if ( match ) {
1760
- // Don't consume trailing commas as valid
1761
- soFar = soFar.slice( match[0].length ) || soFar;
1762
- }
1763
- groups.push( (tokens = []) );
1764
- }
1765
-
1766
- matched = false;
1767
-
1768
- // Combinators
1769
- if ( (match = rcombinators.exec( soFar )) ) {
1770
- matched = match.shift();
1771
- tokens.push({
1772
- value: matched,
1773
- // Cast descendant combinators to space
1774
- type: match[0].replace( rtrim, " " )
1775
- });
1776
- soFar = soFar.slice( matched.length );
1777
- }
1778
-
1779
- // Filters
1780
- for ( type in Expr.filter ) {
1781
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
1782
- (match = preFilters[ type ]( match ))) ) {
1783
- matched = match.shift();
1784
- tokens.push({
1785
- value: matched,
1786
- type: type,
1787
- matches: match
1788
- });
1789
- soFar = soFar.slice( matched.length );
1790
- }
1791
- }
1792
-
1793
- if ( !matched ) {
1794
- break;
1795
- }
1796
- }
1797
-
1798
- // Return the length of the invalid excess
1799
- // if we're just parsing
1800
- // Otherwise, throw an error or return tokens
1801
- return parseOnly ?
1802
- soFar.length :
1803
- soFar ?
1804
- Sizzle.error( selector ) :
1805
- // Cache the tokens
1806
- tokenCache( selector, groups ).slice( 0 );
1807
- };
1808
-
1809
- function toSelector( tokens ) {
1810
- var i = 0,
1811
- len = tokens.length,
1812
- selector = "";
1813
- for ( ; i < len; i++ ) {
1814
- selector += tokens[i].value;
1815
- }
1816
- return selector;
1817
- }
1818
-
1819
- function addCombinator( matcher, combinator, base ) {
1820
- var dir = combinator.dir,
1821
- skip = combinator.next,
1822
- key = skip || dir,
1823
- checkNonElements = base && key === "parentNode",
1824
- doneName = done++;
1825
-
1826
- return combinator.first ?
1827
- // Check against closest ancestor/preceding element
1828
- function( elem, context, xml ) {
1829
- while ( (elem = elem[ dir ]) ) {
1830
- if ( elem.nodeType === 1 || checkNonElements ) {
1831
- return matcher( elem, context, xml );
1832
- }
1833
- }
1834
- } :
1835
-
1836
- // Check against all ancestor/preceding elements
1837
- function( elem, context, xml ) {
1838
- var oldCache, uniqueCache, outerCache,
1839
- newCache = [ dirruns, doneName ];
1840
-
1841
- // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
1842
- if ( xml ) {
1843
- while ( (elem = elem[ dir ]) ) {
1844
- if ( elem.nodeType === 1 || checkNonElements ) {
1845
- if ( matcher( elem, context, xml ) ) {
1846
- return true;
1847
- }
1848
- }
1849
- }
1850
- } else {
1851
- while ( (elem = elem[ dir ]) ) {
1852
- if ( elem.nodeType === 1 || checkNonElements ) {
1853
- outerCache = elem[ expando ] || (elem[ expando ] = {});
1854
-
1855
- // Support: IE <9 only
1856
- // Defend against cloned attroperties (jQuery gh-1709)
1857
- uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
1858
-
1859
- if ( skip && skip === elem.nodeName.toLowerCase() ) {
1860
- elem = elem[ dir ] || elem;
1861
- } else if ( (oldCache = uniqueCache[ key ]) &&
1862
- oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
1863
-
1864
- // Assign to newCache so results back-propagate to previous elements
1865
- return (newCache[ 2 ] = oldCache[ 2 ]);
1866
- } else {
1867
- // Reuse newcache so results back-propagate to previous elements
1868
- uniqueCache[ key ] = newCache;
1869
-
1870
- // A match means we're done; a fail means we have to keep checking
1871
- if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
1872
- return true;
1873
- }
1874
- }
1875
- }
1876
- }
1877
- }
1878
- };
1879
- }
1880
-
1881
- function elementMatcher( matchers ) {
1882
- return matchers.length > 1 ?
1883
- function( elem, context, xml ) {
1884
- var i = matchers.length;
1885
- while ( i-- ) {
1886
- if ( !matchers[i]( elem, context, xml ) ) {
1887
- return false;
1888
- }
1889
- }
1890
- return true;
1891
- } :
1892
- matchers[0];
1893
- }
1894
-
1895
- function multipleContexts( selector, contexts, results ) {
1896
- var i = 0,
1897
- len = contexts.length;
1898
- for ( ; i < len; i++ ) {
1899
- Sizzle( selector, contexts[i], results );
1900
- }
1901
- return results;
1902
- }
1903
-
1904
- function condense( unmatched, map, filter, context, xml ) {
1905
- var elem,
1906
- newUnmatched = [],
1907
- i = 0,
1908
- len = unmatched.length,
1909
- mapped = map != null;
1910
-
1911
- for ( ; i < len; i++ ) {
1912
- if ( (elem = unmatched[i]) ) {
1913
- if ( !filter || filter( elem, context, xml ) ) {
1914
- newUnmatched.push( elem );
1915
- if ( mapped ) {
1916
- map.push( i );
1917
- }
1918
- }
1919
- }
1920
- }
1921
-
1922
- return newUnmatched;
1923
- }
1924
-
1925
- function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
1926
- if ( postFilter && !postFilter[ expando ] ) {
1927
- postFilter = setMatcher( postFilter );
1928
- }
1929
- if ( postFinder && !postFinder[ expando ] ) {
1930
- postFinder = setMatcher( postFinder, postSelector );
1931
- }
1932
- return markFunction(function( seed, results, context, xml ) {
1933
- var temp, i, elem,
1934
- preMap = [],
1935
- postMap = [],
1936
- preexisting = results.length,
1937
-
1938
- // Get initial elements from seed or context
1939
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
1940
-
1941
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
1942
- matcherIn = preFilter && ( seed || !selector ) ?
1943
- condense( elems, preMap, preFilter, context, xml ) :
1944
- elems,
1945
-
1946
- matcherOut = matcher ?
1947
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
1948
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
1949
-
1950
- // ...intermediate processing is necessary
1951
- [] :
1952
-
1953
- // ...otherwise use results directly
1954
- results :
1955
- matcherIn;
1956
-
1957
- // Find primary matches
1958
- if ( matcher ) {
1959
- matcher( matcherIn, matcherOut, context, xml );
1960
- }
1961
-
1962
- // Apply postFilter
1963
- if ( postFilter ) {
1964
- temp = condense( matcherOut, postMap );
1965
- postFilter( temp, [], context, xml );
1966
-
1967
- // Un-match failing elements by moving them back to matcherIn
1968
- i = temp.length;
1969
- while ( i-- ) {
1970
- if ( (elem = temp[i]) ) {
1971
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
1972
- }
1973
- }
1974
- }
1975
-
1976
- if ( seed ) {
1977
- if ( postFinder || preFilter ) {
1978
- if ( postFinder ) {
1979
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
1980
- temp = [];
1981
- i = matcherOut.length;
1982
- while ( i-- ) {
1983
- if ( (elem = matcherOut[i]) ) {
1984
- // Restore matcherIn since elem is not yet a final match
1985
- temp.push( (matcherIn[i] = elem) );
1986
- }
1987
- }
1988
- postFinder( null, (matcherOut = []), temp, xml );
1989
- }
1990
-
1991
- // Move matched elements from seed to results to keep them synchronized
1992
- i = matcherOut.length;
1993
- while ( i-- ) {
1994
- if ( (elem = matcherOut[i]) &&
1995
- (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
1996
-
1997
- seed[temp] = !(results[temp] = elem);
1998
- }
1999
- }
2000
- }
2001
-
2002
- // Add elements to results, through postFinder if defined
2003
- } else {
2004
- matcherOut = condense(
2005
- matcherOut === results ?
2006
- matcherOut.splice( preexisting, matcherOut.length ) :
2007
- matcherOut
2008
- );
2009
- if ( postFinder ) {
2010
- postFinder( null, results, matcherOut, xml );
2011
- } else {
2012
- push.apply( results, matcherOut );
2013
- }
2014
- }
2015
- });
2016
- }
2017
-
2018
- function matcherFromTokens( tokens ) {
2019
- var checkContext, matcher, j,
2020
- len = tokens.length,
2021
- leadingRelative = Expr.relative[ tokens[0].type ],
2022
- implicitRelative = leadingRelative || Expr.relative[" "],
2023
- i = leadingRelative ? 1 : 0,
2024
-
2025
- // The foundational matcher ensures that elements are reachable from top-level context(s)
2026
- matchContext = addCombinator( function( elem ) {
2027
- return elem === checkContext;
2028
- }, implicitRelative, true ),
2029
- matchAnyContext = addCombinator( function( elem ) {
2030
- return indexOf( checkContext, elem ) > -1;
2031
- }, implicitRelative, true ),
2032
- matchers = [ function( elem, context, xml ) {
2033
- var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
2034
- (checkContext = context).nodeType ?
2035
- matchContext( elem, context, xml ) :
2036
- matchAnyContext( elem, context, xml ) );
2037
- // Avoid hanging onto element (issue #299)
2038
- checkContext = null;
2039
- return ret;
2040
- } ];
2041
-
2042
- for ( ; i < len; i++ ) {
2043
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
2044
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
2045
- } else {
2046
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
2047
-
2048
- // Return special upon seeing a positional matcher
2049
- if ( matcher[ expando ] ) {
2050
- // Find the next relative operator (if any) for proper handling
2051
- j = ++i;
2052
- for ( ; j < len; j++ ) {
2053
- if ( Expr.relative[ tokens[j].type ] ) {
2054
- break;
2055
- }
2056
- }
2057
- return setMatcher(
2058
- i > 1 && elementMatcher( matchers ),
2059
- i > 1 && toSelector(
2060
- // If the preceding token was a descendant combinator, insert an implicit any-element `*`
2061
- tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
2062
- ).replace( rtrim, "$1" ),
2063
- matcher,
2064
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
2065
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
2066
- j < len && toSelector( tokens )
2067
- );
2068
- }
2069
- matchers.push( matcher );
2070
- }
2071
- }
2072
-
2073
- return elementMatcher( matchers );
2074
- }
2075
-
2076
- function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
2077
- var bySet = setMatchers.length > 0,
2078
- byElement = elementMatchers.length > 0,
2079
- superMatcher = function( seed, context, xml, results, outermost ) {
2080
- var elem, j, matcher,
2081
- matchedCount = 0,
2082
- i = "0",
2083
- unmatched = seed && [],
2084
- setMatched = [],
2085
- contextBackup = outermostContext,
2086
- // We must always have either seed elements or outermost context
2087
- elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
2088
- // Use integer dirruns iff this is the outermost matcher
2089
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
2090
- len = elems.length;
2091
-
2092
- if ( outermost ) {
2093
- outermostContext = context === document || context || outermost;
2094
- }
2095
-
2096
- // Add elements passing elementMatchers directly to results
2097
- // Support: IE<9, Safari
2098
- // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
2099
- for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
2100
- if ( byElement && elem ) {
2101
- j = 0;
2102
- if ( !context && elem.ownerDocument !== document ) {
2103
- setDocument( elem );
2104
- xml = !documentIsHTML;
2105
- }
2106
- while ( (matcher = elementMatchers[j++]) ) {
2107
- if ( matcher( elem, context || document, xml) ) {
2108
- results.push( elem );
2109
- break;
2110
- }
2111
- }
2112
- if ( outermost ) {
2113
- dirruns = dirrunsUnique;
2114
- }
2115
- }
2116
-
2117
- // Track unmatched elements for set filters
2118
- if ( bySet ) {
2119
- // They will have gone through all possible matchers
2120
- if ( (elem = !matcher && elem) ) {
2121
- matchedCount--;
2122
- }
2123
-
2124
- // Lengthen the array for every element, matched or not
2125
- if ( seed ) {
2126
- unmatched.push( elem );
2127
- }
2128
- }
2129
- }
2130
-
2131
- // `i` is now the count of elements visited above, and adding it to `matchedCount`
2132
- // makes the latter nonnegative.
2133
- matchedCount += i;
2134
-
2135
- // Apply set filters to unmatched elements
2136
- // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
2137
- // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
2138
- // no element matchers and no seed.
2139
- // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
2140
- // case, which will result in a "00" `matchedCount` that differs from `i` but is also
2141
- // numerically zero.
2142
- if ( bySet && i !== matchedCount ) {
2143
- j = 0;
2144
- while ( (matcher = setMatchers[j++]) ) {
2145
- matcher( unmatched, setMatched, context, xml );
2146
- }
2147
-
2148
- if ( seed ) {
2149
- // Reintegrate element matches to eliminate the need for sorting
2150
- if ( matchedCount > 0 ) {
2151
- while ( i-- ) {
2152
- if ( !(unmatched[i] || setMatched[i]) ) {
2153
- setMatched[i] = pop.call( results );
2154
- }
2155
- }
2156
- }
2157
-
2158
- // Discard index placeholder values to get only actual matches
2159
- setMatched = condense( setMatched );
2160
- }
2161
-
2162
- // Add matches to results
2163
- push.apply( results, setMatched );
2164
-
2165
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
2166
- if ( outermost && !seed && setMatched.length > 0 &&
2167
- ( matchedCount + setMatchers.length ) > 1 ) {
2168
-
2169
- Sizzle.uniqueSort( results );
2170
- }
2171
- }
2172
-
2173
- // Override manipulation of globals by nested matchers
2174
- if ( outermost ) {
2175
- dirruns = dirrunsUnique;
2176
- outermostContext = contextBackup;
2177
- }
2178
-
2179
- return unmatched;
2180
- };
2181
-
2182
- return bySet ?
2183
- markFunction( superMatcher ) :
2184
- superMatcher;
2185
- }
2186
-
2187
- compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
2188
- var i,
2189
- setMatchers = [],
2190
- elementMatchers = [],
2191
- cached = compilerCache[ selector + " " ];
2192
-
2193
- if ( !cached ) {
2194
- // Generate a function of recursive functions that can be used to check each element
2195
- if ( !match ) {
2196
- match = tokenize( selector );
2197
- }
2198
- i = match.length;
2199
- while ( i-- ) {
2200
- cached = matcherFromTokens( match[i] );
2201
- if ( cached[ expando ] ) {
2202
- setMatchers.push( cached );
2203
- } else {
2204
- elementMatchers.push( cached );
2205
- }
2206
- }
2207
-
2208
- // Cache the compiled function
2209
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
2210
-
2211
- // Save selector and tokenization
2212
- cached.selector = selector;
2213
- }
2214
- return cached;
2215
- };
2054
+ function multipleContexts(selector, contexts, results) {
2055
+ var i = 0,
2056
+ len = contexts.length;
2057
+ for (; i < len; i++) {
2058
+ Sizzle(selector, contexts[i], results);
2059
+ }
2060
+ return results;
2061
+ }
2216
2062
 
2217
- /**
2218
- * A low-level selection function that works with Sizzle's compiled
2219
- * selector functions
2220
- * @param selector {String|Function} A selector or a pre-compiled
2221
- * selector function built with Sizzle.compile
2222
- * @param context {Element}
2223
- * @param results {Array}
2224
- * @param seed {Array} A set of elements to match against
2225
- */
2226
- select = Sizzle.select = function( selector, context, results, seed ) {
2227
- var i, tokens, token, type, find,
2228
- compiled = typeof selector === "function" && selector,
2229
- match = !seed && tokenize( (selector = compiled.selector || selector) );
2230
-
2231
- results = results || [];
2232
-
2233
- // Try to minimize operations if there is only one selector in the list and no seed
2234
- // (the latter of which guarantees us context)
2235
- if ( match.length === 1 ) {
2236
-
2237
- // Reduce context if the leading compound selector is an ID
2238
- tokens = match[0] = match[0].slice( 0 );
2239
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
2240
- support.getById && context.nodeType === 9 && documentIsHTML &&
2241
- Expr.relative[ tokens[1].type ] ) {
2242
-
2243
- context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
2244
- if ( !context ) {
2245
- return results;
2246
-
2247
- // Precompiled matchers will still verify ancestry, so step up a level
2248
- } else if ( compiled ) {
2249
- context = context.parentNode;
2250
- }
2251
-
2252
- selector = selector.slice( tokens.shift().value.length );
2253
- }
2254
-
2255
- // Fetch a seed set for right-to-left matching
2256
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
2257
- while ( i-- ) {
2258
- token = tokens[i];
2259
-
2260
- // Abort if we hit a combinator
2261
- if ( Expr.relative[ (type = token.type) ] ) {
2262
- break;
2263
- }
2264
- if ( (find = Expr.find[ type ]) ) {
2265
- // Search, expanding context for leading sibling combinators
2266
- if ( (seed = find(
2267
- token.matches[0].replace( runescape, funescape ),
2268
- rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
2269
- )) ) {
2270
-
2271
- // If seed is empty or no tokens remain, we can return early
2272
- tokens.splice( i, 1 );
2273
- selector = seed.length && toSelector( tokens );
2274
- if ( !selector ) {
2275
- push.apply( results, seed );
2276
- return results;
2277
- }
2278
-
2279
- break;
2280
- }
2281
- }
2282
- }
2283
- }
2284
-
2285
- // Compile and execute a filtering function if one is not provided
2286
- // Provide `match` to avoid retokenization if we modified the selector above
2287
- ( compiled || compile( selector, match ) )(
2288
- seed,
2289
- context,
2290
- !documentIsHTML,
2291
- results,
2292
- !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
2293
- );
2294
- return results;
2295
- };
2296
-
2297
- // One-time assignments
2298
-
2299
- // Sort stability
2300
- support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
2301
-
2302
- // Support: Chrome 14-35+
2303
- // Always assume duplicates if they aren't passed to the comparison function
2304
- support.detectDuplicates = !!hasDuplicate;
2305
-
2306
- // Initialize against the default document
2307
- setDocument();
2308
-
2309
- // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
2310
- // Detached nodes confoundingly follow *each other*
2311
- support.sortDetached = assert(function( el ) {
2312
- // Should return 1, but returns 4 (following)
2313
- return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
2314
- });
2063
+ function condense(unmatched, map, filter, context, xml) {
2064
+ var elem,
2065
+ newUnmatched = [],
2066
+ i = 0,
2067
+ len = unmatched.length,
2068
+ mapped = map != null;
2069
+
2070
+ for (; i < len; i++) {
2071
+ if ((elem = unmatched[i])) {
2072
+ if (!filter || filter(elem, context, xml)) {
2073
+ newUnmatched.push(elem);
2074
+ if (mapped) {
2075
+ map.push(i);
2076
+ }
2077
+ }
2078
+ }
2079
+ }
2080
+
2081
+ return newUnmatched;
2082
+ }
2083
+
2084
+ function setMatcher(
2085
+ preFilter,
2086
+ selector,
2087
+ matcher,
2088
+ postFilter,
2089
+ postFinder,
2090
+ postSelector
2091
+ ) {
2092
+ if (postFilter && !postFilter[expando]) {
2093
+ postFilter = setMatcher(postFilter);
2094
+ }
2095
+ if (postFinder && !postFinder[expando]) {
2096
+ postFinder = setMatcher(postFinder, postSelector);
2097
+ }
2098
+ return markFunction(function (seed, results, context, xml) {
2099
+ var temp,
2100
+ i,
2101
+ elem,
2102
+ preMap = [],
2103
+ postMap = [],
2104
+ preexisting = results.length,
2105
+ // Get initial elements from seed or context
2106
+ elems =
2107
+ seed ||
2108
+ multipleContexts(
2109
+ selector || "*",
2110
+ context.nodeType ? [context] : context,
2111
+ []
2112
+ ),
2113
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
2114
+ matcherIn =
2115
+ preFilter && (seed || !selector)
2116
+ ? condense(elems, preMap, preFilter, context, xml)
2117
+ : elems,
2118
+ matcherOut = matcher
2119
+ ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
2120
+ postFinder || (seed ? preFilter : preexisting || postFilter)
2121
+ ? // ...intermediate processing is necessary
2122
+ []
2123
+ : // ...otherwise use results directly
2124
+ results
2125
+ : matcherIn;
2126
+
2127
+ // Find primary matches
2128
+ if (matcher) {
2129
+ matcher(matcherIn, matcherOut, context, xml);
2130
+ }
2131
+
2132
+ // Apply postFilter
2133
+ if (postFilter) {
2134
+ temp = condense(matcherOut, postMap);
2135
+ postFilter(temp, [], context, xml);
2136
+
2137
+ // Un-match failing elements by moving them back to matcherIn
2138
+ i = temp.length;
2139
+ while (i--) {
2140
+ if ((elem = temp[i])) {
2141
+ matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
2142
+ }
2143
+ }
2144
+ }
2145
+
2146
+ if (seed) {
2147
+ if (postFinder || preFilter) {
2148
+ if (postFinder) {
2149
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
2150
+ temp = [];
2151
+ i = matcherOut.length;
2152
+ while (i--) {
2153
+ if ((elem = matcherOut[i])) {
2154
+ // Restore matcherIn since elem is not yet a final match
2155
+ temp.push((matcherIn[i] = elem));
2156
+ }
2157
+ }
2158
+ postFinder(null, (matcherOut = []), temp, xml);
2159
+ }
2160
+
2161
+ // Move matched elements from seed to results to keep them synchronized
2162
+ i = matcherOut.length;
2163
+ while (i--) {
2164
+ if (
2165
+ (elem = matcherOut[i]) &&
2166
+ (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1
2167
+ ) {
2168
+ seed[temp] = !(results[temp] = elem);
2169
+ }
2170
+ }
2171
+ }
2172
+
2173
+ // Add elements to results, through postFinder if defined
2174
+ } else {
2175
+ matcherOut = condense(
2176
+ matcherOut === results
2177
+ ? matcherOut.splice(preexisting, matcherOut.length)
2178
+ : matcherOut
2179
+ );
2180
+
2181
+ if (postFinder) {
2182
+ postFinder(null, results, matcherOut, xml);
2183
+ } else {
2184
+ push.apply(results, matcherOut);
2185
+ }
2186
+ }
2187
+ });
2188
+ }
2189
+
2190
+ function matcherFromTokens(tokens) {
2191
+ var checkContext,
2192
+ matcher,
2193
+ j,
2194
+ len = tokens.length,
2195
+ leadingRelative = Expr.relative[tokens[0].type],
2196
+ implicitRelative = leadingRelative || Expr.relative[" "],
2197
+ i = leadingRelative ? 1 : 0,
2198
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
2199
+ matchContext = addCombinator(
2200
+ function (elem) {
2201
+ return elem === checkContext;
2202
+ },
2203
+ implicitRelative,
2204
+ true
2205
+ ),
2206
+ matchAnyContext = addCombinator(
2207
+ function (elem) {
2208
+ return indexOf(checkContext, elem) > -1;
2209
+ },
2210
+ implicitRelative,
2211
+ true
2212
+ ),
2213
+ matchers = [
2214
+ function (elem, context, xml) {
2215
+ var ret =
2216
+ (!leadingRelative && (xml || context !== outermostContext)) ||
2217
+ ((checkContext = context).nodeType
2218
+ ? matchContext(elem, context, xml)
2219
+ : matchAnyContext(elem, context, xml));
2220
+ // Avoid hanging onto element (issue #299)
2221
+ checkContext = null;
2222
+ return ret;
2223
+ }
2224
+ ];
2225
+
2226
+ for (; i < len; i++) {
2227
+ if ((matcher = Expr.relative[tokens[i].type])) {
2228
+ matchers = [addCombinator(elementMatcher(matchers), matcher)];
2229
+ } else {
2230
+ matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);
2231
+
2232
+ // Return special upon seeing a positional matcher
2233
+ if (matcher[expando]) {
2234
+ // Find the next relative operator (if any) for proper handling
2235
+ j = ++i;
2236
+ for (; j < len; j++) {
2237
+ if (Expr.relative[tokens[j].type]) {
2238
+ break;
2239
+ }
2240
+ }
2241
+ return setMatcher(
2242
+ i > 1 && elementMatcher(matchers),
2243
+ i > 1 &&
2244
+ toSelector(
2245
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
2246
+ tokens
2247
+ .slice(0, i - 1)
2248
+ .concat({ value: tokens[i - 2].type === " " ? "*" : "" })
2249
+ ).replace(rtrim, "$1"),
2250
+ matcher,
2251
+ i < j && matcherFromTokens(tokens.slice(i, j)),
2252
+ j < len && matcherFromTokens((tokens = tokens.slice(j))),
2253
+ j < len && toSelector(tokens)
2254
+ );
2255
+ }
2256
+ matchers.push(matcher);
2257
+ }
2258
+ }
2259
+
2260
+ return elementMatcher(matchers);
2261
+ }
2262
+
2263
+ function matcherFromGroupMatchers(elementMatchers, setMatchers) {
2264
+ var bySet = setMatchers.length > 0,
2265
+ byElement = elementMatchers.length > 0,
2266
+ superMatcher = function (seed, context, xml, results, outermost) {
2267
+ var elem,
2268
+ j,
2269
+ matcher,
2270
+ matchedCount = 0,
2271
+ i = "0",
2272
+ unmatched = seed && [],
2273
+ setMatched = [],
2274
+ contextBackup = outermostContext,
2275
+ // We must always have either seed elements or outermost context
2276
+ elems = seed || (byElement && Expr.find["TAG"]("*", outermost)),
2277
+ // Use integer dirruns iff this is the outermost matcher
2278
+ dirrunsUnique = (dirruns +=
2279
+ contextBackup == null ? 1 : Math.random() || 0.1),
2280
+ len = elems.length;
2281
+
2282
+ if (outermost) {
2283
+ outermostContext = context === document || context || outermost;
2284
+ }
2285
+
2286
+ // Add elements passing elementMatchers directly to results
2287
+ // Support: IE<9, Safari
2288
+ // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
2289
+ for (; i !== len && (elem = elems[i]) != null; i++) {
2290
+ if (byElement && elem) {
2291
+ j = 0;
2292
+ if (!context && elem.ownerDocument !== document) {
2293
+ setDocument(elem);
2294
+ xml = !documentIsHTML;
2295
+ }
2296
+ while ((matcher = elementMatchers[j++])) {
2297
+ if (matcher(elem, context || document, xml)) {
2298
+ results.push(elem);
2299
+ break;
2300
+ }
2301
+ }
2302
+ if (outermost) {
2303
+ dirruns = dirrunsUnique;
2304
+ }
2305
+ }
2306
+
2307
+ // Track unmatched elements for set filters
2308
+ if (bySet) {
2309
+ // They will have gone through all possible matchers
2310
+ if ((elem = !matcher && elem)) {
2311
+ matchedCount--;
2312
+ }
2313
+
2314
+ // Lengthen the array for every element, matched or not
2315
+ if (seed) {
2316
+ unmatched.push(elem);
2317
+ }
2318
+ }
2319
+ }
2320
+
2321
+ // `i` is now the count of elements visited above, and adding it to `matchedCount`
2322
+ // makes the latter nonnegative.
2323
+ matchedCount += i;
2324
+
2325
+ // Apply set filters to unmatched elements
2326
+ // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
2327
+ // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
2328
+ // no element matchers and no seed.
2329
+ // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
2330
+ // case, which will result in a "00" `matchedCount` that differs from `i` but is also
2331
+ // numerically zero.
2332
+ if (bySet && i !== matchedCount) {
2333
+ j = 0;
2334
+ while ((matcher = setMatchers[j++])) {
2335
+ matcher(unmatched, setMatched, context, xml);
2336
+ }
2337
+
2338
+ if (seed) {
2339
+ // Reintegrate element matches to eliminate the need for sorting
2340
+ if (matchedCount > 0) {
2341
+ while (i--) {
2342
+ if (!(unmatched[i] || setMatched[i])) {
2343
+ setMatched[i] = pop.call(results);
2344
+ }
2345
+ }
2346
+ }
2347
+
2348
+ // Discard index placeholder values to get only actual matches
2349
+ setMatched = condense(setMatched);
2350
+ }
2351
+
2352
+ // Add matches to results
2353
+ push.apply(results, setMatched);
2354
+
2355
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
2356
+ if (
2357
+ outermost &&
2358
+ !seed &&
2359
+ setMatched.length > 0 &&
2360
+ matchedCount + setMatchers.length > 1
2361
+ ) {
2362
+ Sizzle.uniqueSort(results);
2363
+ }
2364
+ }
2365
+
2366
+ // Override manipulation of globals by nested matchers
2367
+ if (outermost) {
2368
+ dirruns = dirrunsUnique;
2369
+ outermostContext = contextBackup;
2370
+ }
2371
+
2372
+ return unmatched;
2373
+ };
2374
+
2375
+ return bySet ? markFunction(superMatcher) : superMatcher;
2376
+ }
2377
+
2378
+ compile = Sizzle.compile = function (
2379
+ selector,
2380
+ match /* Internal Use Only */
2381
+ ) {
2382
+ var i,
2383
+ setMatchers = [],
2384
+ elementMatchers = [],
2385
+ cached = compilerCache[selector + " "];
2386
+
2387
+ if (!cached) {
2388
+ // Generate a function of recursive functions that can be used to check each element
2389
+ if (!match) {
2390
+ match = tokenize(selector);
2391
+ }
2392
+ i = match.length;
2393
+ while (i--) {
2394
+ cached = matcherFromTokens(match[i]);
2395
+ if (cached[expando]) {
2396
+ setMatchers.push(cached);
2397
+ } else {
2398
+ elementMatchers.push(cached);
2399
+ }
2400
+ }
2401
+
2402
+ // Cache the compiled function
2403
+ cached = compilerCache(
2404
+ selector,
2405
+ matcherFromGroupMatchers(elementMatchers, setMatchers)
2406
+ );
2407
+
2408
+ // Save selector and tokenization
2409
+ cached.selector = selector;
2410
+ }
2411
+ return cached;
2412
+ };
2413
+
2414
+ /**
2415
+ * A low-level selection function that works with Sizzle's compiled
2416
+ * selector functions
2417
+ * @param selector {String|Function} A selector or a pre-compiled
2418
+ * selector function built with Sizzle.compile
2419
+ * @param context {Element}
2420
+ * @param results {Array}
2421
+ * @param seed {Array} A set of elements to match against
2422
+ */
2423
+ select = Sizzle.select = function (selector, context, results, seed) {
2424
+ var i,
2425
+ tokens,
2426
+ token,
2427
+ type,
2428
+ find,
2429
+ compiled = typeof selector === "function" && selector,
2430
+ match = !seed && tokenize((selector = compiled.selector || selector));
2431
+
2432
+ results = results || [];
2433
+
2434
+ // Try to minimize operations if there is only one selector in the list and no seed
2435
+ // (the latter of which guarantees us context)
2436
+ if (match.length === 1) {
2437
+ // Reduce context if the leading compound selector is an ID
2438
+ tokens = match[0] = match[0].slice(0);
2439
+ if (
2440
+ tokens.length > 2 &&
2441
+ (token = tokens[0]).type === "ID" &&
2442
+ support.getById &&
2443
+ context.nodeType === 9 &&
2444
+ documentIsHTML &&
2445
+ Expr.relative[tokens[1].type]
2446
+ ) {
2447
+ context = (Expr.find["ID"](
2448
+ token.matches[0].replace(runescape, funescape),
2449
+ context
2450
+ ) || [])[0];
2451
+ if (!context) {
2452
+ return results;
2453
+
2454
+ // Precompiled matchers will still verify ancestry, so step up a level
2455
+ } else if (compiled) {
2456
+ context = context.parentNode;
2457
+ }
2458
+
2459
+ selector = selector.slice(tokens.shift().value.length);
2460
+ }
2461
+
2462
+ // Fetch a seed set for right-to-left matching
2463
+ i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length;
2464
+ while (i--) {
2465
+ token = tokens[i];
2466
+
2467
+ // Abort if we hit a combinator
2468
+ if (Expr.relative[(type = token.type)]) {
2469
+ break;
2470
+ }
2471
+ if ((find = Expr.find[type])) {
2472
+ // Search, expanding context for leading sibling combinators
2473
+ if (
2474
+ (seed = find(
2475
+ token.matches[0].replace(runescape, funescape),
2476
+ (rsibling.test(tokens[0].type) &&
2477
+ testContext(context.parentNode)) ||
2478
+ context
2479
+ ))
2480
+ ) {
2481
+ // If seed is empty or no tokens remain, we can return early
2482
+ tokens.splice(i, 1);
2483
+ selector = seed.length && toSelector(tokens);
2484
+ if (!selector) {
2485
+ push.apply(results, seed);
2486
+ return results;
2487
+ }
2488
+
2489
+ break;
2490
+ }
2491
+ }
2492
+ }
2493
+ }
2494
+
2495
+ // Compile and execute a filtering function if one is not provided
2496
+ // Provide `match` to avoid retokenization if we modified the selector above
2497
+ (compiled || compile(selector, match))(
2498
+ seed,
2499
+ context,
2500
+ !documentIsHTML,
2501
+ results,
2502
+ !context ||
2503
+ (rsibling.test(selector) && testContext(context.parentNode)) ||
2504
+ context
2505
+ );
2506
+
2507
+ return results;
2508
+ };
2509
+
2510
+ // One-time assignments
2511
+
2512
+ // Sort stability
2513
+ support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
2514
+
2515
+ // Support: Chrome 14-35+
2516
+ // Always assume duplicates if they aren't passed to the comparison function
2517
+ support.detectDuplicates = !!hasDuplicate;
2518
+
2519
+ // Initialize against the default document
2520
+ setDocument();
2521
+
2522
+ // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
2523
+ // Detached nodes confoundingly follow *each other*
2524
+ support.sortDetached = assert(function (el) {
2525
+ // Should return 1, but returns 4 (following)
2526
+ return el.compareDocumentPosition(document.createElement("fieldset")) & 1;
2527
+ });
2528
+
2529
+ // Support: IE<8
2530
+ // Prevent attribute/property "interpolation"
2531
+ // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
2532
+ if (
2533
+ !assert(function (el) {
2534
+ el.innerHTML = "<a href='#'></a>";
2535
+ return el.firstChild.getAttribute("href") === "#";
2536
+ })
2537
+ ) {
2538
+ addHandle("type|href|height|width", function (elem, name, isXML) {
2539
+ if (!isXML) {
2540
+ return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2);
2541
+ }
2542
+ });
2543
+ }
2544
+
2545
+ // Support: IE<9
2546
+ // Use defaultValue in place of getAttribute("value")
2547
+ if (
2548
+ !support.attributes ||
2549
+ !assert(function (el) {
2550
+ el.innerHTML = "<input/>";
2551
+ el.firstChild.setAttribute("value", "");
2552
+ return el.firstChild.getAttribute("value") === "";
2553
+ })
2554
+ ) {
2555
+ addHandle("value", function (elem, name, isXML) {
2556
+ if (!isXML && elem.nodeName.toLowerCase() === "input") {
2557
+ return elem.defaultValue;
2558
+ }
2559
+ });
2560
+ }
2561
+
2562
+ // Support: IE<9
2563
+ // Use getAttributeNode to fetch booleans when getAttribute lies
2564
+ if (
2565
+ !assert(function (el) {
2566
+ return el.getAttribute("disabled") == null;
2567
+ })
2568
+ ) {
2569
+ addHandle(booleans, function (elem, name, isXML) {
2570
+ var val;
2571
+ if (!isXML) {
2572
+ return elem[name] === true
2573
+ ? name.toLowerCase()
2574
+ : (val = elem.getAttributeNode(name)) && val.specified
2575
+ ? val.value
2576
+ : null;
2577
+ }
2578
+ });
2579
+ }
2580
+
2581
+ // EXPOSE qooxdoo variant
2582
+ qx.bom.Selector.query = function (selector, context) {
2583
+ return Sizzle(selector, context);
2584
+ };
2315
2585
 
2316
- // Support: IE<8
2317
- // Prevent attribute/property "interpolation"
2318
- // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
2319
- if ( !assert(function( el ) {
2320
- el.innerHTML = "<a href='#'></a>";
2321
- return el.firstChild.getAttribute("href") === "#" ;
2322
- }) ) {
2323
- addHandle( "type|href|height|width", function( elem, name, isXML ) {
2324
- if ( !isXML ) {
2325
- return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
2326
- }
2327
- });
2328
- }
2329
-
2330
- // Support: IE<9
2331
- // Use defaultValue in place of getAttribute("value")
2332
- if ( !support.attributes || !assert(function( el ) {
2333
- el.innerHTML = "<input/>";
2334
- el.firstChild.setAttribute( "value", "" );
2335
- return el.firstChild.getAttribute( "value" ) === "";
2336
- }) ) {
2337
- addHandle( "value", function( elem, name, isXML ) {
2338
- if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
2339
- return elem.defaultValue;
2340
- }
2341
- });
2342
- }
2343
-
2344
- // Support: IE<9
2345
- // Use getAttributeNode to fetch booleans when getAttribute lies
2346
- if ( !assert(function( el ) {
2347
- return el.getAttribute("disabled") == null;
2348
- }) ) {
2349
- addHandle( booleans, function( elem, name, isXML ) {
2350
- var val;
2351
- if ( !isXML ) {
2352
- return elem[ name ] === true ? name.toLowerCase() :
2353
- (val = elem.getAttributeNode( name )) && val.specified ?
2354
- val.value :
2355
- null;
2356
- }
2357
- });
2358
- }
2359
-
2360
- // EXPOSE qooxdoo variant
2361
- qx.bom.Selector.query = function(selector, context) {
2362
- return Sizzle(selector, context);
2363
- };
2364
-
2365
- qx.bom.Selector.matches = function(selector, set) {
2366
- return Sizzle(selector, null, null, set);
2367
- };
2368
- // EXPOSE qooxdoo variant
2369
-
2370
- })( window );
2586
+ qx.bom.Selector.matches = function (selector, set) {
2587
+ return Sizzle(selector, null, null, set);
2588
+ };
2589
+ // EXPOSE qooxdoo variant
2590
+ })(window);