@macallumharvey/first-test-wet 1.0.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. package/dist/WetButton.d.ts +9 -0
  2. package/dist/WetModal.d.ts +6 -0
  3. package/dist/first-test-wet.cjs.development.js +26 -0
  4. package/dist/first-test-wet.cjs.development.js.map +1 -1
  5. package/dist/first-test-wet.cjs.production.min.js +1 -1
  6. package/dist/first-test-wet.cjs.production.min.js.map +1 -1
  7. package/dist/first-test-wet.esm.js +26 -1
  8. package/dist/first-test-wet.esm.js.map +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/package.json +1 -1
  11. package/src/WetButton.tsx +19 -0
  12. package/src/WetModal.tsx +26 -0
  13. package/src/index.tsx +2 -2
  14. package/src/theme-wet-boew/assets/favicon-mobile.png +0 -0
  15. package/src/theme-wet-boew/assets/favicon.ico +0 -0
  16. package/src/theme-wet-boew/assets/logo.png +0 -0
  17. package/src/theme-wet-boew/assets/logo.svg +14 -0
  18. package/src/theme-wet-boew/css/ie8-theme.css +17370 -0
  19. package/src/theme-wet-boew/css/ie8-theme.min.css +193 -0
  20. package/src/theme-wet-boew/css/ie8-wet-boew.css +12 -0
  21. package/src/theme-wet-boew/css/ie8-wet-boew.min.css +7 -0
  22. package/src/theme-wet-boew/css/theme.css +11357 -0
  23. package/src/theme-wet-boew/css/theme.min.css +6 -0
  24. package/src/theme-wet-boew/css/wet-boew.css +12 -0
  25. package/src/theme-wet-boew/css/wet-boew.min.css +6 -0
  26. package/src/theme-wet-boew/payload.json +66 -0
  27. package/src/wet-boew/assets/cloud-popup-relative.png +0 -0
  28. package/src/wet-boew/assets/fd-slider-sprite.png +0 -0
  29. package/src/wet-boew/assets/loading.png +0 -0
  30. package/src/wet-boew/assets/mediacontrols.html +32 -0
  31. package/src/wet-boew/assets/sprites_share.png +0 -0
  32. package/src/wet-boew/assets/zoom-minus-mini.png +0 -0
  33. package/src/wet-boew/assets/zoom-plus-mini.png +0 -0
  34. package/src/wet-boew/assets/zoom-world-mini.png +0 -0
  35. package/src/wet-boew/css/noscript.css +112 -0
  36. package/src/wet-boew/css/noscript.min.css +6 -0
  37. package/src/wet-boew/css/polyfills/datalist.css +32 -0
  38. package/src/wet-boew/css/polyfills/datalist.min.css +1 -0
  39. package/src/wet-boew/css/polyfills/datepicker.css +47 -0
  40. package/src/wet-boew/css/polyfills/datepicker.min.css +1 -0
  41. package/src/wet-boew/css/polyfills/details.css +28 -0
  42. package/src/wet-boew/css/polyfills/details.min.css +1 -0
  43. package/src/wet-boew/css/polyfills/mathml.css +16 -0
  44. package/src/wet-boew/css/polyfills/mathml.min.css +1 -0
  45. package/src/wet-boew/css/polyfills/meter.css +24 -0
  46. package/src/wet-boew/css/polyfills/meter.min.css +1 -0
  47. package/src/wet-boew/css/polyfills/progress.css +8 -0
  48. package/src/wet-boew/css/polyfills/progress.min.css +1 -0
  49. package/src/wet-boew/css/polyfills/slider.css +229 -0
  50. package/src/wet-boew/css/polyfills/slider.min.css +1 -0
  51. package/src/wet-boew/fonts/glyphicons-halflings-regular.eot +0 -0
  52. package/src/wet-boew/fonts/glyphicons-halflings-regular.svg +288 -0
  53. package/src/wet-boew/fonts/glyphicons-halflings-regular.ttf +0 -0
  54. package/src/wet-boew/fonts/glyphicons-halflings-regular.woff +0 -0
  55. package/src/wet-boew/fonts/glyphicons-halflings-regular.woff2 +0 -0
  56. package/src/wet-boew/js/MathJax/mml-chtml.js +1 -0
  57. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
  58. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
  59. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
  60. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
  61. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
  62. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
  63. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
  64. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
  65. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
  66. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
  67. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
  68. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
  69. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
  70. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
  71. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
  72. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
  73. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
  74. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
  75. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
  76. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
  77. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
  78. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
  79. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
  80. package/src/wet-boew/js/deps/additional-methods.js +1512 -0
  81. package/src/wet-boew/js/deps/additional-methods.min.js +9 -0
  82. package/src/wet-boew/js/deps/geomap-lib.js +3758 -0
  83. package/src/wet-boew/js/deps/geomap-lib.min.js +1 -0
  84. package/src/wet-boew/js/deps/jquery.dataTables.js +15345 -0
  85. package/src/wet-boew/js/deps/jquery.dataTables.min.js +4 -0
  86. package/src/wet-boew/js/deps/jquery.flot.canvas.js +345 -0
  87. package/src/wet-boew/js/deps/jquery.flot.canvas.min.js +1 -0
  88. package/src/wet-boew/js/deps/jquery.flot.js +3168 -0
  89. package/src/wet-boew/js/deps/jquery.flot.min.js +1 -0
  90. package/src/wet-boew/js/deps/jquery.flot.orderBars.js +282 -0
  91. package/src/wet-boew/js/deps/jquery.flot.orderBars.min.js +1 -0
  92. package/src/wet-boew/js/deps/jquery.flot.pie.js +820 -0
  93. package/src/wet-boew/js/deps/jquery.flot.pie.min.js +1 -0
  94. package/src/wet-boew/js/deps/jquery.magnific-popup.js +2061 -0
  95. package/src/wet-boew/js/deps/jquery.magnific-popup.min.js +4 -0
  96. package/src/wet-boew/js/deps/jquery.validate.js +1661 -0
  97. package/src/wet-boew/js/deps/jquery.validate.min.js +9 -0
  98. package/src/wet-boew/js/deps/json-patch.js +315 -0
  99. package/src/wet-boew/js/deps/json-patch.min.js +1 -0
  100. package/src/wet-boew/js/deps/jsonpointer.js +349 -0
  101. package/src/wet-boew/js/deps/jsonpointer.min.js +1 -0
  102. package/src/wet-boew/js/deps/lang-apollo.js +53 -0
  103. package/src/wet-boew/js/deps/lang-apollo.min.js +1 -0
  104. package/src/wet-boew/js/deps/lang-basic.js +49 -0
  105. package/src/wet-boew/js/deps/lang-basic.min.js +1 -0
  106. package/src/wet-boew/js/deps/lang-clj.js +64 -0
  107. package/src/wet-boew/js/deps/lang-clj.min.js +1 -0
  108. package/src/wet-boew/js/deps/lang-css.js +160 -0
  109. package/src/wet-boew/js/deps/lang-css.min.js +1 -0
  110. package/src/wet-boew/js/deps/lang-dart.js +92 -0
  111. package/src/wet-boew/js/deps/lang-dart.min.js +1 -0
  112. package/src/wet-boew/js/deps/lang-erlang.js +94 -0
  113. package/src/wet-boew/js/deps/lang-erlang.min.js +1 -0
  114. package/src/wet-boew/js/deps/lang-go.js +59 -0
  115. package/src/wet-boew/js/deps/lang-go.min.js +1 -0
  116. package/src/wet-boew/js/deps/lang-hs.js +102 -0
  117. package/src/wet-boew/js/deps/lang-hs.min.js +1 -0
  118. package/src/wet-boew/js/deps/lang-lasso.js +67 -0
  119. package/src/wet-boew/js/deps/lang-lasso.min.js +1 -0
  120. package/src/wet-boew/js/deps/lang-lisp.js +95 -0
  121. package/src/wet-boew/js/deps/lang-lisp.min.js +1 -0
  122. package/src/wet-boew/js/deps/lang-llvm.js +63 -0
  123. package/src/wet-boew/js/deps/lang-llvm.min.js +1 -0
  124. package/src/wet-boew/js/deps/lang-logtalk.js +50 -0
  125. package/src/wet-boew/js/deps/lang-logtalk.min.js +1 -0
  126. package/src/wet-boew/js/deps/lang-lua.js +60 -0
  127. package/src/wet-boew/js/deps/lang-lua.min.js +1 -0
  128. package/src/wet-boew/js/deps/lang-matlab.js +183 -0
  129. package/src/wet-boew/js/deps/lang-matlab.min.js +1 -0
  130. package/src/wet-boew/js/deps/lang-ml.js +57 -0
  131. package/src/wet-boew/js/deps/lang-ml.min.js +1 -0
  132. package/src/wet-boew/js/deps/lang-mumps.js +140 -0
  133. package/src/wet-boew/js/deps/lang-mumps.min.js +1 -0
  134. package/src/wet-boew/js/deps/lang-n.js +67 -0
  135. package/src/wet-boew/js/deps/lang-n.min.js +1 -0
  136. package/src/wet-boew/js/deps/lang-pascal.js +49 -0
  137. package/src/wet-boew/js/deps/lang-pascal.min.js +1 -0
  138. package/src/wet-boew/js/deps/lang-proto.js +37 -0
  139. package/src/wet-boew/js/deps/lang-proto.min.js +1 -0
  140. package/src/wet-boew/js/deps/lang-r.js +59 -0
  141. package/src/wet-boew/js/deps/lang-r.min.js +1 -0
  142. package/src/wet-boew/js/deps/lang-rd.js +50 -0
  143. package/src/wet-boew/js/deps/lang-rd.min.js +1 -0
  144. package/src/wet-boew/js/deps/lang-rust.js +81 -0
  145. package/src/wet-boew/js/deps/lang-rust.min.js +1 -0
  146. package/src/wet-boew/js/deps/lang-scala.js +56 -0
  147. package/src/wet-boew/js/deps/lang-scala.min.js +1 -0
  148. package/src/wet-boew/js/deps/lang-sql.js +59 -0
  149. package/src/wet-boew/js/deps/lang-sql.min.js +1 -0
  150. package/src/wet-boew/js/deps/lang-swift.js +60 -0
  151. package/src/wet-boew/js/deps/lang-swift.min.js +1 -0
  152. package/src/wet-boew/js/deps/lang-tcl.js +63 -0
  153. package/src/wet-boew/js/deps/lang-tcl.min.js +1 -0
  154. package/src/wet-boew/js/deps/lang-tex.js +49 -0
  155. package/src/wet-boew/js/deps/lang-tex.min.js +1 -0
  156. package/src/wet-boew/js/deps/lang-vb.js +67 -0
  157. package/src/wet-boew/js/deps/lang-vb.min.js +1 -0
  158. package/src/wet-boew/js/deps/lang-vhdl.js +51 -0
  159. package/src/wet-boew/js/deps/lang-vhdl.min.js +1 -0
  160. package/src/wet-boew/js/deps/lang-wiki.js +55 -0
  161. package/src/wet-boew/js/deps/lang-wiki.min.js +1 -0
  162. package/src/wet-boew/js/deps/lang-xq.js +71 -0
  163. package/src/wet-boew/js/deps/lang-xq.min.js +1 -0
  164. package/src/wet-boew/js/deps/lang-yaml.js +45 -0
  165. package/src/wet-boew/js/deps/lang-yaml.min.js +1 -0
  166. package/src/wet-boew/js/deps/ol.js +1008 -0
  167. package/src/wet-boew/js/deps/ol.min.js +1 -0
  168. package/src/wet-boew/js/deps/prettify.js +1742 -0
  169. package/src/wet-boew/js/deps/prettify.min.js +1 -0
  170. package/src/wet-boew/js/deps/proj4.js +3 -0
  171. package/src/wet-boew/js/deps/proj4.min.js +1 -0
  172. package/src/wet-boew/js/deps/run_prettify.js +1998 -0
  173. package/src/wet-boew/js/deps/run_prettify.min.js +1 -0
  174. package/src/wet-boew/js/deps/tableparser.js +2216 -0
  175. package/src/wet-boew/js/deps/tableparser.min.js +1 -0
  176. package/src/wet-boew/js/deps/unorm.js +452 -0
  177. package/src/wet-boew/js/deps/unorm.min.js +1 -0
  178. package/src/wet-boew/js/i18n/af.js +246 -0
  179. package/src/wet-boew/js/i18n/af.min.js +7 -0
  180. package/src/wet-boew/js/i18n/ar.js +285 -0
  181. package/src/wet-boew/js/i18n/ar.min.js +7 -0
  182. package/src/wet-boew/js/i18n/bg.js +285 -0
  183. package/src/wet-boew/js/i18n/bg.min.js +7 -0
  184. package/src/wet-boew/js/i18n/cs.js +286 -0
  185. package/src/wet-boew/js/i18n/cs.min.js +7 -0
  186. package/src/wet-boew/js/i18n/de.js +355 -0
  187. package/src/wet-boew/js/i18n/de.min.js +7 -0
  188. package/src/wet-boew/js/i18n/el.js +285 -0
  189. package/src/wet-boew/js/i18n/el.min.js +7 -0
  190. package/src/wet-boew/js/i18n/en.js +246 -0
  191. package/src/wet-boew/js/i18n/en.min.js +7 -0
  192. package/src/wet-boew/js/i18n/es.js +288 -0
  193. package/src/wet-boew/js/i18n/es.min.js +7 -0
  194. package/src/wet-boew/js/i18n/et.js +283 -0
  195. package/src/wet-boew/js/i18n/et.min.js +7 -0
  196. package/src/wet-boew/js/i18n/fr.js +314 -0
  197. package/src/wet-boew/js/i18n/fr.min.js +7 -0
  198. package/src/wet-boew/js/i18n/hi.js +246 -0
  199. package/src/wet-boew/js/i18n/hi.min.js +7 -0
  200. package/src/wet-boew/js/i18n/hu.js +285 -0
  201. package/src/wet-boew/js/i18n/hu.min.js +7 -0
  202. package/src/wet-boew/js/i18n/hy.js +246 -0
  203. package/src/wet-boew/js/i18n/hy.min.js +7 -0
  204. package/src/wet-boew/js/i18n/id.js +284 -0
  205. package/src/wet-boew/js/i18n/id.min.js +7 -0
  206. package/src/wet-boew/js/i18n/is.js +283 -0
  207. package/src/wet-boew/js/i18n/is.min.js +7 -0
  208. package/src/wet-boew/js/i18n/it.js +312 -0
  209. package/src/wet-boew/js/i18n/it.min.js +7 -0
  210. package/src/wet-boew/js/i18n/iu.js +246 -0
  211. package/src/wet-boew/js/i18n/iu.min.js +7 -0
  212. package/src/wet-boew/js/i18n/ja.js +286 -0
  213. package/src/wet-boew/js/i18n/ja.min.js +7 -0
  214. package/src/wet-boew/js/i18n/ko.js +285 -0
  215. package/src/wet-boew/js/i18n/ko.min.js +7 -0
  216. package/src/wet-boew/js/i18n/lt.js +285 -0
  217. package/src/wet-boew/js/i18n/lt.min.js +7 -0
  218. package/src/wet-boew/js/i18n/lv.js +285 -0
  219. package/src/wet-boew/js/i18n/lv.min.js +7 -0
  220. package/src/wet-boew/js/i18n/nl.js +319 -0
  221. package/src/wet-boew/js/i18n/nl.min.js +7 -0
  222. package/src/wet-boew/js/i18n/pl.js +288 -0
  223. package/src/wet-boew/js/i18n/pl.min.js +7 -0
  224. package/src/wet-boew/js/i18n/pt-BR.js +246 -0
  225. package/src/wet-boew/js/i18n/pt-BR.min.js +7 -0
  226. package/src/wet-boew/js/i18n/pt.js +271 -0
  227. package/src/wet-boew/js/i18n/pt.min.js +7 -0
  228. package/src/wet-boew/js/i18n/ru.js +285 -0
  229. package/src/wet-boew/js/i18n/ru.min.js +7 -0
  230. package/src/wet-boew/js/i18n/sk.js +283 -0
  231. package/src/wet-boew/js/i18n/sk.min.js +7 -0
  232. package/src/wet-boew/js/i18n/sq.js +246 -0
  233. package/src/wet-boew/js/i18n/sq.min.js +7 -0
  234. package/src/wet-boew/js/i18n/th.js +285 -0
  235. package/src/wet-boew/js/i18n/th.min.js +7 -0
  236. package/src/wet-boew/js/i18n/tr.js +287 -0
  237. package/src/wet-boew/js/i18n/tr.min.js +7 -0
  238. package/src/wet-boew/js/i18n/uk.js +285 -0
  239. package/src/wet-boew/js/i18n/uk.min.js +7 -0
  240. package/src/wet-boew/js/i18n/vi.js +285 -0
  241. package/src/wet-boew/js/i18n/vi.min.js +7 -0
  242. package/src/wet-boew/js/i18n/zh-Hans.js +246 -0
  243. package/src/wet-boew/js/i18n/zh-Hans.min.js +7 -0
  244. package/src/wet-boew/js/i18n/zh.js +286 -0
  245. package/src/wet-boew/js/i18n/zh.min.js +7 -0
  246. package/src/wet-boew/js/ie8-wet-boew.js +3992 -0
  247. package/src/wet-boew/js/ie8-wet-boew.min.js +7 -0
  248. package/src/wet-boew/js/ie8-wet-boew2.js +15294 -0
  249. package/src/wet-boew/js/ie8-wet-boew2.min.js +7 -0
  250. package/src/wet-boew/js/jquery/2.2.4/jquery.js +9814 -0
  251. package/src/wet-boew/js/jquery/2.2.4/jquery.min.js +4 -0
  252. package/src/wet-boew/js/jquery/2.2.4/jquery.min.map +1 -0
  253. package/src/wet-boew/js/polyfills/datalist.js +423 -0
  254. package/src/wet-boew/js/polyfills/datalist.min.js +8 -0
  255. package/src/wet-boew/js/polyfills/datalist.min.js.map +1 -0
  256. package/src/wet-boew/js/polyfills/datalist_dynamic.js +50 -0
  257. package/src/wet-boew/js/polyfills/datalist_dynamic.min.js +8 -0
  258. package/src/wet-boew/js/polyfills/datalist_dynamic.min.js.map +1 -0
  259. package/src/wet-boew/js/polyfills/datepicker.js +338 -0
  260. package/src/wet-boew/js/polyfills/datepicker.min.js +8 -0
  261. package/src/wet-boew/js/polyfills/datepicker.min.js.map +1 -0
  262. package/src/wet-boew/js/polyfills/details.js +126 -0
  263. package/src/wet-boew/js/polyfills/details.min.js +8 -0
  264. package/src/wet-boew/js/polyfills/details.min.js.map +1 -0
  265. package/src/wet-boew/js/polyfills/jawsariafixes.js +47 -0
  266. package/src/wet-boew/js/polyfills/jawsariafixes.min.js +16 -0
  267. package/src/wet-boew/js/polyfills/jawsariafixes.min.js.map +1 -0
  268. package/src/wet-boew/js/polyfills/meter.js +140 -0
  269. package/src/wet-boew/js/polyfills/meter.min.js +8 -0
  270. package/src/wet-boew/js/polyfills/meter.min.js.map +1 -0
  271. package/src/wet-boew/js/polyfills/mobile.js +783 -0
  272. package/src/wet-boew/js/polyfills/mobile.min.js +8 -0
  273. package/src/wet-boew/js/polyfills/mobile.min.js.map +1 -0
  274. package/src/wet-boew/js/polyfills/progress.js +107 -0
  275. package/src/wet-boew/js/polyfills/progress.min.js +8 -0
  276. package/src/wet-boew/js/polyfills/progress.min.js.map +1 -0
  277. package/src/wet-boew/js/polyfills/slider.js +1343 -0
  278. package/src/wet-boew/js/polyfills/slider.min.js +9 -0
  279. package/src/wet-boew/js/polyfills/slider.min.js.map +1 -0
  280. package/src/wet-boew/js/polyfills/slider_wrapper.js +73 -0
  281. package/src/wet-boew/js/polyfills/slider_wrapper.min.js +8 -0
  282. package/src/wet-boew/js/polyfills/slider_wrapper.min.js.map +1 -0
  283. package/src/wet-boew/js/polyfills/svg.js +29 -0
  284. package/src/wet-boew/js/polyfills/svg.min.js +8 -0
  285. package/src/wet-boew/js/polyfills/svg.min.js.map +1 -0
  286. package/src/wet-boew/js/polyfills/test.js +603 -0
  287. package/src/wet-boew/js/polyfills/test.min.js +8 -0
  288. package/src/wet-boew/js/polyfills/test.min.js.map +1 -0
  289. package/src/wet-boew/js/wet-boew.js +17714 -0
  290. package/src/wet-boew/js/wet-boew.min.js +9 -0
  291. package/src/wet-boew/js/wet-boew.min.js.map +1 -0
  292. package/src/wet-boew/payload.json +1722 -0
@@ -0,0 +1,783 @@
1
+ /*
2
+ * jQuery Mobile v1.3.2
3
+ * https://jquerymobile.com
4
+ *
5
+ * Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors
6
+ * Released under the MIT license.
7
+ * https://jquery.org/license
8
+ *
9
+ */
10
+
11
+ (function ( root, doc, factory ) {
12
+ if ( typeof define === "function" && define.amd ) {
13
+ // AMD. Register as an anonymous module.
14
+ define( [ "jquery" ], function ( $ ) {
15
+ factory( $, root, doc );
16
+ return $.mobile;
17
+ });
18
+ } else {
19
+ // Browser globals
20
+ factory( root.jQuery, root, doc );
21
+ }
22
+ }( this, document, function ( jQuery, window, document, undefined ) {
23
+
24
+ // throttled resize event
25
+ (function( $ ) {
26
+ $.event.special.throttledresize = {
27
+ setup: function() {
28
+ $( this ).bind( "resize", handler );
29
+ },
30
+ teardown: function() {
31
+ $( this ).unbind( "resize", handler );
32
+ }
33
+ };
34
+
35
+ var throttle = 250,
36
+ handler = function() {
37
+ curr = ( new Date() ).getTime();
38
+ diff = curr - lastCall;
39
+
40
+ if ( diff >= throttle ) {
41
+
42
+ lastCall = curr;
43
+ $( this ).trigger( "throttledresize" );
44
+
45
+ } else {
46
+
47
+ if ( heldCall ) {
48
+ clearTimeout( heldCall );
49
+ }
50
+
51
+ // Promise a held call will still execute
52
+ heldCall = setTimeout( handler, throttle - diff );
53
+ }
54
+ },
55
+ lastCall = 0,
56
+ heldCall,
57
+ curr,
58
+ diff;
59
+ })( jQuery );
60
+ // This plugin is an experiment for abstracting away the touch and mouse
61
+ // events so that developers don't have to worry about which method of input
62
+ // the device their document is loaded on supports.
63
+ //
64
+ // The idea here is to allow the developer to register listeners for the
65
+ // basic mouse events, such as mousedown, mousemove, mouseup, and click,
66
+ // and the plugin will take care of registering the correct listeners
67
+ // behind the scenes to invoke the listener at the fastest possible time
68
+ // for that device, while still retaining the order of event firing in
69
+ // the traditional mouse environment, should multiple handlers be registered
70
+ // on the same element for different events.
71
+ //
72
+ // The current version exposes the following virtual events to jQuery bind methods:
73
+ // "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel"
74
+
75
+ (function( $, window, document, undefined ) {
76
+
77
+ var dataPropertyName = "virtualMouseBindings",
78
+ touchTargetPropertyName = "virtualTouchID",
79
+ virtualEventNames = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split( " " ),
80
+ touchEventProps = "clientX clientY pageX pageY screenX screenY".split( " " ),
81
+ mouseHookProps = $.event.mouseHooks ? $.event.mouseHooks.props : [],
82
+ mouseEventProps = $.event.props.concat( mouseHookProps ),
83
+ activeDocHandlers = {},
84
+ resetTimerID = 0,
85
+ startX = 0,
86
+ startY = 0,
87
+ didScroll = false,
88
+ clickBlockList = [],
89
+ blockMouseTriggers = false,
90
+ blockTouchTriggers = false,
91
+ eventCaptureSupported = "addEventListener" in document,
92
+ $document = $( document ),
93
+ nextTouchID = 1,
94
+ lastTouchID = 0, threshold;
95
+
96
+ $.vmouse = {
97
+ moveDistanceThreshold: 10,
98
+ clickDistanceThreshold: 10,
99
+ resetTimerDuration: 1500
100
+ };
101
+
102
+ function getNativeEvent( event ) {
103
+
104
+ while ( event && typeof event.originalEvent !== "undefined" ) {
105
+ event = event.originalEvent;
106
+ }
107
+ return event;
108
+ }
109
+
110
+ function createVirtualEvent( event, eventType ) {
111
+
112
+ var t = event.type,
113
+ oe, props, ne, prop, ct, touch, i, j, len;
114
+
115
+ event = $.Event( event );
116
+ event.type = eventType;
117
+
118
+ oe = event.originalEvent;
119
+ props = $.event.props;
120
+
121
+ // addresses separation of $.event.props in to $.event.mouseHook.props and Issue 3280
122
+ // https://github.com/jquery/jquery-mobile/issues/3280
123
+ if ( t.search( /^(mouse|click)/ ) > -1 ) {
124
+ props = mouseEventProps;
125
+ }
126
+
127
+ // copy original event properties over to the new event
128
+ // this would happen if we could call $.event.fix instead of $.Event
129
+ // but we don't have a way to force an event to be fixed multiple times
130
+ if ( oe ) {
131
+ for ( i = props.length, prop; i; ) {
132
+ prop = props[ --i ];
133
+ event[ prop ] = oe[ prop ];
134
+ }
135
+ }
136
+
137
+ // make sure that if the mouse and click virtual events are generated
138
+ // without a .which one is defined
139
+ if ( t.search(/mouse(down|up)|click/) > -1 && !event.which ) {
140
+ event.which = 1;
141
+ }
142
+
143
+ if ( t.search(/^touch/) !== -1 ) {
144
+ ne = getNativeEvent( oe );
145
+ t = ne.touches;
146
+ ct = ne.changedTouches;
147
+ touch = ( t && t.length ) ? t[0] : ( ( ct && ct.length ) ? ct[ 0 ] : undefined );
148
+
149
+ if ( touch ) {
150
+ for ( j = 0, len = touchEventProps.length; j < len; j++) {
151
+ prop = touchEventProps[ j ];
152
+ event[ prop ] = touch[ prop ];
153
+ }
154
+ }
155
+ }
156
+
157
+ return event;
158
+ }
159
+
160
+ function getVirtualBindingFlags( element ) {
161
+
162
+ var flags = {},
163
+ b, k;
164
+
165
+ while ( element ) {
166
+
167
+ b = $.data( element, dataPropertyName );
168
+
169
+ for ( k in b ) {
170
+ if ( b[ k ] ) {
171
+ flags[ k ] = flags.hasVirtualBinding = true;
172
+ }
173
+ }
174
+ element = element.parentNode;
175
+ }
176
+ return flags;
177
+ }
178
+
179
+ function getClosestElementWithVirtualBinding( element, eventType ) {
180
+ var b;
181
+ while ( element ) {
182
+
183
+ b = $.data( element, dataPropertyName );
184
+
185
+ if ( b && ( !eventType || b[ eventType ] ) ) {
186
+ return element;
187
+ }
188
+ element = element.parentNode;
189
+ }
190
+ return null;
191
+ }
192
+
193
+ function enableTouchBindings() {
194
+ blockTouchTriggers = false;
195
+ }
196
+
197
+ function disableTouchBindings() {
198
+ blockTouchTriggers = true;
199
+ }
200
+
201
+ function enableMouseBindings() {
202
+ lastTouchID = 0;
203
+ clickBlockList.length = 0;
204
+ blockMouseTriggers = false;
205
+
206
+ // When mouse bindings are enabled, our
207
+ // touch bindings are disabled.
208
+ disableTouchBindings();
209
+ }
210
+
211
+ function disableMouseBindings() {
212
+ // When mouse bindings are disabled, our
213
+ // touch bindings are enabled.
214
+ enableTouchBindings();
215
+ }
216
+
217
+ function startResetTimer() {
218
+ clearResetTimer();
219
+ resetTimerID = setTimeout( function() {
220
+ resetTimerID = 0;
221
+ enableMouseBindings();
222
+ }, $.vmouse.resetTimerDuration );
223
+ }
224
+
225
+ function clearResetTimer() {
226
+ if ( resetTimerID ) {
227
+ clearTimeout( resetTimerID );
228
+ resetTimerID = 0;
229
+ }
230
+ }
231
+
232
+ function triggerVirtualEvent( eventType, event, flags ) {
233
+ var ve;
234
+
235
+ if ( ( flags && flags[ eventType ] ) ||
236
+ ( !flags && getClosestElementWithVirtualBinding( event.target, eventType ) ) ) {
237
+
238
+ ve = createVirtualEvent( event, eventType );
239
+
240
+ $( event.target).trigger( ve );
241
+ }
242
+
243
+ return ve;
244
+ }
245
+
246
+ function mouseEventCallback( event ) {
247
+ var touchID = $.data( event.target, touchTargetPropertyName );
248
+
249
+ if ( !blockMouseTriggers && ( !lastTouchID || lastTouchID !== touchID ) ) {
250
+ var ve = triggerVirtualEvent( "v" + event.type, event );
251
+ if ( ve ) {
252
+ if ( ve.isDefaultPrevented() ) {
253
+ event.preventDefault();
254
+ }
255
+ if ( ve.isPropagationStopped() ) {
256
+ event.stopPropagation();
257
+ }
258
+ if ( ve.isImmediatePropagationStopped() ) {
259
+ event.stopImmediatePropagation();
260
+ }
261
+ }
262
+ }
263
+ }
264
+
265
+ function handleTouchStart( event ) {
266
+
267
+ var touches = getNativeEvent( event ).touches,
268
+ target, flags;
269
+
270
+ if ( touches && touches.length === 1 ) {
271
+
272
+ target = event.target;
273
+ flags = getVirtualBindingFlags( target );
274
+
275
+ if ( flags.hasVirtualBinding ) {
276
+
277
+ lastTouchID = nextTouchID++;
278
+ $.data( target, touchTargetPropertyName, lastTouchID );
279
+
280
+ clearResetTimer();
281
+
282
+ disableMouseBindings();
283
+ didScroll = false;
284
+
285
+ var t = getNativeEvent( event ).touches[ 0 ];
286
+ startX = t.pageX;
287
+ startY = t.pageY;
288
+
289
+ triggerVirtualEvent( "vmouseover", event, flags );
290
+ triggerVirtualEvent( "vmousedown", event, flags );
291
+ }
292
+ }
293
+ }
294
+
295
+ function handleScroll( event ) {
296
+ if ( blockTouchTriggers ) {
297
+ return;
298
+ }
299
+
300
+ if ( !didScroll ) {
301
+ triggerVirtualEvent( "vmousecancel", event, getVirtualBindingFlags( event.target ) );
302
+ }
303
+
304
+ didScroll = true;
305
+ startResetTimer();
306
+ }
307
+
308
+ function handleTouchMove( event ) {
309
+ if ( blockTouchTriggers ) {
310
+ return;
311
+ }
312
+
313
+ var t = getNativeEvent( event ).touches[ 0 ],
314
+ didCancel = didScroll,
315
+ moveThreshold = $.vmouse.moveDistanceThreshold,
316
+ flags = getVirtualBindingFlags( event.target );
317
+
318
+ didScroll = didScroll ||
319
+ ( Math.abs( t.pageX - startX ) > moveThreshold ||
320
+ Math.abs( t.pageY - startY ) > moveThreshold );
321
+
322
+
323
+ if ( didScroll && !didCancel ) {
324
+ triggerVirtualEvent( "vmousecancel", event, flags );
325
+ }
326
+
327
+ triggerVirtualEvent( "vmousemove", event, flags );
328
+ startResetTimer();
329
+ }
330
+
331
+ function handleTouchEnd( event ) {
332
+ if ( blockTouchTriggers ) {
333
+ return;
334
+ }
335
+
336
+ disableTouchBindings();
337
+
338
+ var flags = getVirtualBindingFlags( event.target ),
339
+ t;
340
+ triggerVirtualEvent( "vmouseup", event, flags );
341
+
342
+ if ( !didScroll ) {
343
+ var ve = triggerVirtualEvent( "vclick", event, flags );
344
+ if ( ve && ve.isDefaultPrevented() ) {
345
+ // The target of the mouse events that follow the touchend
346
+ // event don't necessarily match the target used during the
347
+ // touch. This means we need to rely on coordinates for blocking
348
+ // any click that is generated.
349
+ t = getNativeEvent( event ).changedTouches[ 0 ];
350
+ clickBlockList.push({
351
+ touchID: lastTouchID,
352
+ x: t.clientX,
353
+ y: t.clientY
354
+ });
355
+
356
+ // Prevent any mouse events that follow from triggering
357
+ // virtual event notifications.
358
+ blockMouseTriggers = true;
359
+ }
360
+ }
361
+ triggerVirtualEvent( "vmouseout", event, flags);
362
+ didScroll = false;
363
+
364
+ startResetTimer();
365
+ }
366
+
367
+ function hasVirtualBindings( ele ) {
368
+ var bindings = $.data( ele, dataPropertyName ),
369
+ k;
370
+
371
+ if ( bindings ) {
372
+ for ( k in bindings ) {
373
+ if ( bindings[ k ] ) {
374
+ return true;
375
+ }
376
+ }
377
+ }
378
+ return false;
379
+ }
380
+
381
+ function dummyMouseHandler() {}
382
+
383
+ function getSpecialEventObject( eventType ) {
384
+ var realType = eventType.substr( 1 );
385
+
386
+ return {
387
+ setup: function( data, namespace ) {
388
+ // If this is the first virtual mouse binding for this element,
389
+ // add a bindings object to its data.
390
+
391
+ if ( !hasVirtualBindings( this ) ) {
392
+ $.data( this, dataPropertyName, {} );
393
+ }
394
+
395
+ // If setup is called, we know it is the first binding for this
396
+ // eventType, so initialize the count for the eventType to zero.
397
+ var bindings = $.data( this, dataPropertyName );
398
+ bindings[ eventType ] = true;
399
+
400
+ // If this is the first virtual mouse event for this type,
401
+ // register a global handler on the document.
402
+
403
+ activeDocHandlers[ eventType ] = ( activeDocHandlers[ eventType ] || 0 ) + 1;
404
+
405
+ if ( activeDocHandlers[ eventType ] === 1 ) {
406
+ $document.bind( realType, mouseEventCallback );
407
+ }
408
+
409
+ // Some browsers, like Opera Mini, won't dispatch mouse/click events
410
+ // for elements unless they actually have handlers registered on them.
411
+ // To get around this, we register dummy handlers on the elements.
412
+
413
+ $( this ).bind( realType, dummyMouseHandler );
414
+
415
+ // For now, if event capture is not supported, we rely on mouse handlers.
416
+ if ( eventCaptureSupported ) {
417
+ // If this is the first virtual mouse binding for the document,
418
+ // register our touchstart handler on the document.
419
+
420
+ activeDocHandlers[ "touchstart" ] = ( activeDocHandlers[ "touchstart" ] || 0) + 1;
421
+
422
+ if ( activeDocHandlers[ "touchstart" ] === 1 ) {
423
+ $document.bind( "touchstart", handleTouchStart )
424
+ .bind( "touchend", handleTouchEnd )
425
+
426
+ // On touch platforms, touching the screen and then dragging your finger
427
+ // causes the window content to scroll after some distance threshold is
428
+ // exceeded. On these platforms, a scroll prevents a click event from being
429
+ // dispatched, and on some platforms, even the touchend is suppressed. To
430
+ // mimic the suppression of the click event, we need to watch for a scroll
431
+ // event. Unfortunately, some platforms like iOS don't dispatch scroll
432
+ // events until *AFTER* the user lifts their finger (touchend). This means
433
+ // we need to watch both scroll and touchmove events to figure out whether
434
+ // or not a scroll happenens before the touchend event is fired.
435
+
436
+ .bind( "touchmove", handleTouchMove )
437
+ .bind( "scroll", handleScroll );
438
+ }
439
+ }
440
+ },
441
+
442
+ teardown: function( data, namespace ) {
443
+ // If this is the last virtual binding for this eventType,
444
+ // remove its global handler from the document.
445
+
446
+ --activeDocHandlers[ eventType ];
447
+
448
+ if ( !activeDocHandlers[ eventType ] ) {
449
+ $document.unbind( realType, mouseEventCallback );
450
+ }
451
+
452
+ if ( eventCaptureSupported ) {
453
+ // If this is the last virtual mouse binding in existence,
454
+ // remove our document touchstart listener.
455
+
456
+ --activeDocHandlers[ "touchstart" ];
457
+
458
+ if ( !activeDocHandlers[ "touchstart" ] ) {
459
+ $document.unbind( "touchstart", handleTouchStart )
460
+ .unbind( "touchmove", handleTouchMove )
461
+ .unbind( "touchend", handleTouchEnd )
462
+ .unbind( "scroll", handleScroll );
463
+ }
464
+ }
465
+
466
+ var $this = $( this ),
467
+ bindings = $.data( this, dataPropertyName );
468
+
469
+ // teardown may be called when an element was
470
+ // removed from the DOM. If this is the case,
471
+ // jQuery core may have already stripped the element
472
+ // of any data bindings so we need to check it before
473
+ // using it.
474
+ if ( bindings ) {
475
+ bindings[ eventType ] = false;
476
+ }
477
+
478
+ // Unregister the dummy event handler.
479
+
480
+ $this.unbind( realType, dummyMouseHandler );
481
+
482
+ // If this is the last virtual mouse binding on the
483
+ // element, remove the binding data from the element.
484
+
485
+ if ( !hasVirtualBindings( this ) ) {
486
+ $this.removeData( dataPropertyName );
487
+ }
488
+ }
489
+ };
490
+ }
491
+
492
+ // Expose our custom events to the jQuery bind/unbind mechanism.
493
+
494
+ for ( var i = 0; i < virtualEventNames.length; i++ ) {
495
+ $.event.special[ virtualEventNames[ i ] ] = getSpecialEventObject( virtualEventNames[ i ] );
496
+ }
497
+
498
+ // Add a capture click handler to block clicks.
499
+ // Note that we require event capture support for this so if the device
500
+ // doesn't support it, we punt for now and rely solely on mouse events.
501
+ if ( eventCaptureSupported ) {
502
+ document.addEventListener( "click", function( e ) {
503
+ var cnt = clickBlockList.length,
504
+ target = e.target,
505
+ x, y, ele, i, o, touchID;
506
+
507
+ if ( cnt ) {
508
+ x = e.clientX;
509
+ y = e.clientY;
510
+ threshold = $.vmouse.clickDistanceThreshold;
511
+
512
+ // The idea here is to run through the clickBlockList to see if
513
+ // the current click event is in the proximity of one of our
514
+ // vclick events that had preventDefault() called on it. If we find
515
+ // one, then we block the click.
516
+ //
517
+ // Why do we have to rely on proximity?
518
+ //
519
+ // Because the target of the touch event that triggered the vclick
520
+ // can be different from the target of the click event synthesized
521
+ // by the browser. The target of a mouse/click event that is syntehsized
522
+ // from a touch event seems to be implementation specific. For example,
523
+ // some browsers will fire mouse/click events for a link that is near
524
+ // a touch event, even though the target of the touchstart/touchend event
525
+ // says the user touched outside the link. Also, it seems that with most
526
+ // browsers, the target of the mouse/click event is not calculated until the
527
+ // time it is dispatched, so if you replace an element that you touched
528
+ // with another element, the target of the mouse/click will be the new
529
+ // element underneath that point.
530
+ //
531
+ // Aside from proximity, we also check to see if the target and any
532
+ // of its ancestors were the ones that blocked a click. This is necessary
533
+ // because of the strange mouse/click target calculation done in the
534
+ // Android 2.1 browser, where if you click on an element, and there is a
535
+ // mouse/click handler on one of its ancestors, the target will be the
536
+ // innermost child of the touched element, even if that child is no where
537
+ // near the point of touch.
538
+
539
+ ele = target;
540
+
541
+ while ( ele ) {
542
+ for ( i = 0; i < cnt; i++ ) {
543
+ o = clickBlockList[ i ];
544
+ touchID = 0;
545
+
546
+ if ( ( ele === target && Math.abs( o.x - x ) < threshold && Math.abs( o.y - y ) < threshold ) ||
547
+ $.data( ele, touchTargetPropertyName ) === o.touchID ) {
548
+ // XXX: We may want to consider removing matches from the block list
549
+ // instead of waiting for the reset timer to fire.
550
+ e.preventDefault();
551
+ e.stopPropagation();
552
+ return;
553
+ }
554
+ }
555
+ ele = ele.parentNode;
556
+ }
557
+ }
558
+ }, true);
559
+ }
560
+ })( jQuery, window, document );
561
+
562
+ (function( $ ) {
563
+ $.mobile = {};
564
+ }( jQuery ));
565
+ (function( $, undefined ) {
566
+ var support = {
567
+ touch: "ontouchend" in document
568
+ };
569
+
570
+ $.mobile.support = $.mobile.support || {};
571
+ $.extend( $.support, support );
572
+ $.extend( $.mobile.support, support );
573
+ }( jQuery ));
574
+
575
+
576
+ (function( $, window, undefined ) {
577
+ var $document = $( document );
578
+
579
+ // add new event shortcuts
580
+ $.each( ( "touchstart touchmove touchend " +
581
+ "tap taphold " +
582
+ "swipe swipeleft swiperight " +
583
+ "scrollstart scrollstop" ).split( " " ), function( i, name ) {
584
+
585
+ $.fn[ name ] = function( fn ) {
586
+ return fn ? this.bind( name, fn ) : this.trigger( name );
587
+ };
588
+
589
+ // jQuery < 1.8
590
+ if ( $.attrFn ) {
591
+ $.attrFn[ name ] = true;
592
+ }
593
+ });
594
+
595
+ var supportTouch = $.mobile.support.touch,
596
+ scrollEvent = "touchmove scroll",
597
+ touchStartEvent = supportTouch ? "touchstart" : "mousedown",
598
+ touchStopEvent = supportTouch ? "touchend" : "mouseup",
599
+ touchMoveEvent = supportTouch ? "touchmove" : "mousemove";
600
+
601
+ function triggerCustomEvent( obj, eventType, event ) {
602
+ var originalType = event.type;
603
+ event.type = eventType;
604
+ $.event.dispatch.call( obj, event );
605
+ event.type = originalType;
606
+ }
607
+
608
+ // also handles scrollstop
609
+ $.event.special.scrollstart = {
610
+
611
+ enabled: true,
612
+
613
+ setup: function() {
614
+
615
+ var thisObject = this,
616
+ $this = $( thisObject ),
617
+ scrolling,
618
+ timer;
619
+
620
+ function trigger( event, state ) {
621
+ scrolling = state;
622
+ triggerCustomEvent( thisObject, scrolling ? "scrollstart" : "scrollstop", event );
623
+ }
624
+
625
+ // iPhone triggers scroll after a small delay; use touchmove instead
626
+ $this.bind( scrollEvent, function( event ) {
627
+
628
+ if ( !$.event.special.scrollstart.enabled ) {
629
+ return;
630
+ }
631
+
632
+ if ( !scrolling ) {
633
+ trigger( event, true );
634
+ }
635
+
636
+ clearTimeout( timer );
637
+ timer = setTimeout( function() {
638
+ trigger( event, false );
639
+ }, 50 );
640
+ });
641
+ }
642
+ };
643
+
644
+ // also handles taphold
645
+ $.event.special.tap = {
646
+ tapholdThreshold: 750,
647
+
648
+ setup: function() {
649
+ var thisObject = this,
650
+ $this = $( thisObject );
651
+
652
+ $this.bind( "vmousedown", function( event ) {
653
+
654
+ if ( event.which && event.which !== 1 ) {
655
+ return false;
656
+ }
657
+
658
+ var origTarget = event.target,
659
+ origEvent = event.originalEvent,
660
+ timer;
661
+
662
+ function clearTapTimer() {
663
+ clearTimeout( timer );
664
+ }
665
+
666
+ function clearTapHandlers() {
667
+ clearTapTimer();
668
+
669
+ $this.unbind( "vclick", clickHandler )
670
+ .unbind( "vmouseup", clearTapTimer );
671
+ $document.unbind( "vmousecancel", clearTapHandlers );
672
+ }
673
+
674
+ function clickHandler( event ) {
675
+ clearTapHandlers();
676
+
677
+ // ONLY trigger a 'tap' event if the start target is
678
+ // the same as the stop target.
679
+ if ( origTarget === event.target ) {
680
+ triggerCustomEvent( thisObject, "tap", event );
681
+ }
682
+ }
683
+
684
+ $this.bind( "vmouseup", clearTapTimer )
685
+ .bind( "vclick", clickHandler );
686
+ $document.bind( "vmousecancel", clearTapHandlers );
687
+
688
+ timer = setTimeout( function() {
689
+ triggerCustomEvent( thisObject, "taphold", $.Event( "taphold", { target: origTarget } ) );
690
+ }, $.event.special.tap.tapholdThreshold );
691
+ });
692
+ }
693
+ };
694
+
695
+ // also handles swipeleft, swiperight
696
+ $.event.special.swipe = {
697
+ scrollSupressionThreshold: 30, // More than this horizontal displacement, and we will suppress scrolling.
698
+
699
+ durationThreshold: 1000, // More time than this, and it isn't a swipe.
700
+
701
+ horizontalDistanceThreshold: 30, // Swipe horizontal displacement must be more than this.
702
+
703
+ verticalDistanceThreshold: 75, // Swipe vertical displacement must be less than this.
704
+
705
+ start: function( event ) {
706
+ var data = event.originalEvent.touches ?
707
+ event.originalEvent.touches[ 0 ] : event;
708
+ return {
709
+ time: ( new Date() ).getTime(),
710
+ coords: [ data.pageX, data.pageY ],
711
+ origin: $( event.target )
712
+ };
713
+ },
714
+
715
+ stop: function( event ) {
716
+ var data = event.originalEvent.touches ?
717
+ event.originalEvent.touches[ 0 ] : event;
718
+ return {
719
+ time: ( new Date() ).getTime(),
720
+ coords: [ data.pageX, data.pageY ]
721
+ };
722
+ },
723
+
724
+ handleSwipe: function( start, stop ) {
725
+ if ( stop.time - start.time < $.event.special.swipe.durationThreshold &&
726
+ Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.horizontalDistanceThreshold &&
727
+ Math.abs( start.coords[ 1 ] - stop.coords[ 1 ] ) < $.event.special.swipe.verticalDistanceThreshold ) {
728
+
729
+ start.origin.trigger( "swipe" )
730
+ .trigger( start.coords[0] > stop.coords[ 0 ] ? "swipeleft" : "swiperight" );
731
+ }
732
+ },
733
+
734
+ setup: function() {
735
+ var thisObject = this,
736
+ $this = $( thisObject );
737
+
738
+ $this.bind( touchStartEvent, function( event ) {
739
+ var start = $.event.special.swipe.start( event ),
740
+ stop;
741
+
742
+ function moveHandler( event ) {
743
+ if ( !start ) {
744
+ return;
745
+ }
746
+
747
+ stop = $.event.special.swipe.stop( event );
748
+
749
+ // prevent scrolling
750
+ if ( Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.scrollSupressionThreshold ) {
751
+ event.preventDefault();
752
+ }
753
+ }
754
+
755
+ $this.bind( touchMoveEvent, moveHandler )
756
+ .one( touchStopEvent, function() {
757
+ $this.unbind( touchMoveEvent, moveHandler );
758
+
759
+ if ( start && stop ) {
760
+ $.event.special.swipe.handleSwipe( start, stop );
761
+ }
762
+ start = stop = undefined;
763
+ });
764
+ });
765
+ }
766
+ };
767
+ $.each({
768
+ scrollstop: "scrollstart",
769
+ taphold: "tap",
770
+ swipeleft: "swipe",
771
+ swiperight: "swipe"
772
+ }, function( event, sourceEvent ) {
773
+
774
+ $.event.special[ event ] = {
775
+ setup: function() {
776
+ $( this ).bind( sourceEvent, $.noop );
777
+ }
778
+ };
779
+ });
780
+
781
+ })( jQuery, this );
782
+
783
+ }));