lady_josephine 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (304) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +32 -0
  4. data/app/assets/fonts/lady_josephine/icons/icons.eot +0 -0
  5. data/app/assets/fonts/lady_josephine/icons/icons.svg +215 -0
  6. data/app/assets/fonts/lady_josephine/icons/icons.ttf +0 -0
  7. data/app/assets/fonts/lady_josephine/icons/icons.woff +0 -0
  8. data/app/assets/javascripts/lady_josephine/blocks/facebook.js +25 -0
  9. data/app/assets/javascripts/lady_josephine/blocks/instagram.js +22 -0
  10. data/app/assets/javascripts/lady_josephine/blocks/soundcloud.js +24 -0
  11. data/app/assets/javascripts/lady_josephine/blocks/twitter.js +25 -0
  12. data/app/assets/javascripts/lady_josephine/blocks/vimeo.js +55 -0
  13. data/app/assets/javascripts/lady_josephine/blocks/youtube.js +64 -0
  14. data/app/assets/javascripts/lady_josephine/editor.js +40 -0
  15. data/app/assets/javascripts/lady_josephine/lady_josephine.js +4 -0
  16. data/app/assets/javascripts/lady_josephine/lady_josephine_view.js +6 -0
  17. data/app/assets/stylesheets/lady_josephine/content.sass +33 -0
  18. data/app/assets/stylesheets/lady_josephine/icons.sass +175 -0
  19. data/app/assets/stylesheets/lady_josephine/lady_josephine.sass +6 -0
  20. data/app/assets/stylesheets/lady_josephine/sir_trevor.sass +619 -0
  21. data/app/assets/stylesheets/lady_josephine/vars.sass +36 -0
  22. data/app/controllers/lady_josephine/application_controller.rb +4 -0
  23. data/app/controllers/lady_josephine/editor_controller.rb +40 -0
  24. data/app/controllers/lady_josephine/images_controller.rb +26 -0
  25. data/app/helpers/lady_josephine/helper.rb +25 -0
  26. data/app/helpers/lady_josephine/sir_trevor_helper.rb +172 -0
  27. data/app/models/lady_josephine/concerns/model.rb +29 -0
  28. data/app/models/lady_josephine/concerns/pingable.rb +28 -0
  29. data/app/models/lady_josephine/concerns/server_uuid.rb +24 -0
  30. data/app/models/lady_josephine/concerns/sir_trevor_images.rb +38 -0
  31. data/app/models/lady_josephine/image.rb +41 -0
  32. data/app/uploader/lady_josephine/base_uploader.rb +47 -0
  33. data/app/uploader/lady_josephine/image_uploader.rb +149 -0
  34. data/app/views/lady_josephine/blocks/_audio_block.haml +2 -0
  35. data/app/views/lady_josephine/blocks/_definition_block.haml +4 -0
  36. data/app/views/lady_josephine/blocks/_divider_block.haml +2 -0
  37. data/app/views/lady_josephine/blocks/_extended_image_block.haml +63 -0
  38. data/app/views/lady_josephine/blocks/_extended_quote_block.haml +5 -0
  39. data/app/views/lady_josephine/blocks/_extended_tweet_block.haml +2 -0
  40. data/app/views/lady_josephine/blocks/_facebook_post_block.haml +2 -0
  41. data/app/views/lady_josephine/blocks/_heading_block.haml +2 -0
  42. data/app/views/lady_josephine/blocks/_html_block.haml +1 -0
  43. data/app/views/lady_josephine/blocks/_instagram_block.haml +2 -0
  44. data/app/views/lady_josephine/blocks/_list_block.haml +3 -0
  45. data/app/views/lady_josephine/blocks/_quote_block.haml +5 -0
  46. data/app/views/lady_josephine/blocks/_text_block.html.haml +2 -0
  47. data/app/views/lady_josephine/blocks/_video_block.haml +9 -0
  48. data/config/routes.rb +9 -0
  49. data/db/migrate/20160222151500_lady_josephine_image.rb +18 -0
  50. data/lib/generators/lady_josephine_migration/USAGE +9 -0
  51. data/lib/generators/lady_josephine_migration/lady_josephine_migration_generator.rb +17 -0
  52. data/lib/generators/lady_josephine_migration/templates/migration.rb +9 -0
  53. data/lib/lady_josephine.rb +18 -0
  54. data/lib/lady_josephine/engine.rb +18 -0
  55. data/lib/lady_josephine/redcarpet/custom_markdown_formatter.rb +63 -0
  56. data/lib/lady_josephine/renderer/sir_trevor_renderer.rb +16 -0
  57. data/lib/lady_josephine/version.rb +3 -0
  58. data/lib/lady_josephine/whitelist.rb +26 -0
  59. data/lib/tasks/lady_josephine_tasks.rake +4 -0
  60. data/spec/controllers/lady_josephine/editor_controller_spec.rb +58 -0
  61. data/spec/dummy/README.rdoc +28 -0
  62. data/spec/dummy/Rakefile +6 -0
  63. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  64. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  65. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  66. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  67. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  68. data/spec/dummy/bin/bundle +3 -0
  69. data/spec/dummy/bin/rails +4 -0
  70. data/spec/dummy/bin/rake +4 -0
  71. data/spec/dummy/bin/setup +29 -0
  72. data/spec/dummy/config.ru +4 -0
  73. data/spec/dummy/config/application.rb +26 -0
  74. data/spec/dummy/config/boot.rb +5 -0
  75. data/spec/dummy/config/database.yml +25 -0
  76. data/spec/dummy/config/environment.rb +5 -0
  77. data/spec/dummy/config/environments/development.rb +41 -0
  78. data/spec/dummy/config/environments/production.rb +79 -0
  79. data/spec/dummy/config/environments/test.rb +42 -0
  80. data/spec/dummy/config/initializers/assets.rb +11 -0
  81. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  82. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  83. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  84. data/spec/dummy/config/initializers/inflections.rb +16 -0
  85. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  86. data/spec/dummy/config/initializers/session_store.rb +3 -0
  87. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  88. data/spec/dummy/config/locales/en.yml +23 -0
  89. data/spec/dummy/config/routes.rb +4 -0
  90. data/spec/dummy/config/secrets.yml +22 -0
  91. data/spec/dummy/db/development.sqlite3 +0 -0
  92. data/spec/dummy/db/schema.rb +16 -0
  93. data/spec/dummy/db/test.sqlite3 +0 -0
  94. data/spec/dummy/log/bla +0 -0
  95. data/spec/dummy/public/404.html +67 -0
  96. data/spec/dummy/public/422.html +67 -0
  97. data/spec/dummy/public/500.html +66 -0
  98. data/spec/dummy/public/favicon.ico +0 -0
  99. data/spec/spec_helper.rb +17 -0
  100. data/vendor/assets/components/Eventable/README.md +12 -0
  101. data/vendor/assets/components/Eventable/bower.json +10 -0
  102. data/vendor/assets/components/Eventable/component.json +11 -0
  103. data/vendor/assets/components/Eventable/eventable.js +207 -0
  104. data/vendor/assets/components/Eventable/package.json +15 -0
  105. data/vendor/assets/components/jquery-autosize/bower.json +30 -0
  106. data/vendor/assets/components/jquery-autosize/demo.html +36 -0
  107. data/vendor/assets/components/jquery-autosize/jquery.autosize.js +273 -0
  108. data/vendor/assets/components/jquery-autosize/jquery.autosize.min.js +6 -0
  109. data/vendor/assets/components/jquery-autosize/package.json +32 -0
  110. data/vendor/assets/components/jquery-autosize/readme.md +216 -0
  111. data/vendor/assets/components/jquery/AUTHORS.txt +163 -0
  112. data/vendor/assets/components/jquery/CONTRIBUTING.md +216 -0
  113. data/vendor/assets/components/jquery/Gruntfile.js +496 -0
  114. data/vendor/assets/components/jquery/MIT-LICENSE.txt +21 -0
  115. data/vendor/assets/components/jquery/README.md +415 -0
  116. data/vendor/assets/components/jquery/build/release-notes.js +59 -0
  117. data/vendor/assets/components/jquery/build/release.js +246 -0
  118. data/vendor/assets/components/jquery/component.json +13 -0
  119. data/vendor/assets/components/jquery/composer.json +35 -0
  120. data/vendor/assets/components/jquery/jquery-migrate.js +496 -0
  121. data/vendor/assets/components/jquery/jquery-migrate.min.js +3 -0
  122. data/vendor/assets/components/jquery/jquery.js +9597 -0
  123. data/vendor/assets/components/jquery/jquery.min.js +5 -0
  124. data/vendor/assets/components/jquery/jquery.min.map +1 -0
  125. data/vendor/assets/components/jquery/package.json +39 -0
  126. data/vendor/assets/components/jquery/speed/benchmark.js +15 -0
  127. data/vendor/assets/components/jquery/speed/benchmarker.css +65 -0
  128. data/vendor/assets/components/jquery/speed/benchmarker.js +181 -0
  129. data/vendor/assets/components/jquery/speed/closest.html +39 -0
  130. data/vendor/assets/components/jquery/speed/css.html +82 -0
  131. data/vendor/assets/components/jquery/speed/event.html +58 -0
  132. data/vendor/assets/components/jquery/speed/filter.html +183 -0
  133. data/vendor/assets/components/jquery/speed/find.html +179 -0
  134. data/vendor/assets/components/jquery/speed/index.html +72 -0
  135. data/vendor/assets/components/jquery/speed/jquery-basis.js +6238 -0
  136. data/vendor/assets/components/jquery/speed/slice.vs.concat.html +47 -0
  137. data/vendor/assets/components/jquery/src/ajax.js +851 -0
  138. data/vendor/assets/components/jquery/src/ajax/jsonp.js +80 -0
  139. data/vendor/assets/components/jquery/src/ajax/script.js +86 -0
  140. data/vendor/assets/components/jquery/src/ajax/xhr.js +207 -0
  141. data/vendor/assets/components/jquery/src/attributes.js +661 -0
  142. data/vendor/assets/components/jquery/src/callbacks.js +196 -0
  143. data/vendor/assets/components/jquery/src/core.js +949 -0
  144. data/vendor/assets/components/jquery/src/css.js +679 -0
  145. data/vendor/assets/components/jquery/src/data.js +340 -0
  146. data/vendor/assets/components/jquery/src/deferred.js +141 -0
  147. data/vendor/assets/components/jquery/src/deprecated.js +4 -0
  148. data/vendor/assets/components/jquery/src/dimensions.js +41 -0
  149. data/vendor/assets/components/jquery/src/effects.js +730 -0
  150. data/vendor/assets/components/jquery/src/event-alias.js +15 -0
  151. data/vendor/assets/components/jquery/src/event.js +991 -0
  152. data/vendor/assets/components/jquery/src/exports.js +18 -0
  153. data/vendor/assets/components/jquery/src/intro.js +20 -0
  154. data/vendor/assets/components/jquery/src/manipulation.js +796 -0
  155. data/vendor/assets/components/jquery/src/offset.js +169 -0
  156. data/vendor/assets/components/jquery/src/outro.js +2 -0
  157. data/vendor/assets/components/jquery/src/queue.js +147 -0
  158. data/vendor/assets/components/jquery/src/serialize.js +99 -0
  159. data/vendor/assets/components/jquery/src/sizzle-jquery.js +9 -0
  160. data/vendor/assets/components/jquery/src/support.js +241 -0
  161. data/vendor/assets/components/jquery/src/traversing.js +275 -0
  162. data/vendor/assets/components/jquery/test/csp.php +16 -0
  163. data/vendor/assets/components/jquery/test/data/1x1.jpg +0 -0
  164. data/vendor/assets/components/jquery/test/data/ajax/unreleasedXHR.html +25 -0
  165. data/vendor/assets/components/jquery/test/data/atom+xml.php +4 -0
  166. data/vendor/assets/components/jquery/test/data/badcall.js +1 -0
  167. data/vendor/assets/components/jquery/test/data/badjson.js +1 -0
  168. data/vendor/assets/components/jquery/test/data/cleanScript.html +10 -0
  169. data/vendor/assets/components/jquery/test/data/core/cc_on.html +22 -0
  170. data/vendor/assets/components/jquery/test/data/dashboard.xml +11 -0
  171. data/vendor/assets/components/jquery/test/data/dimensions/documentLarge.html +17 -0
  172. data/vendor/assets/components/jquery/test/data/dimensions/documentSmall.html +21 -0
  173. data/vendor/assets/components/jquery/test/data/echoData.php +1 -0
  174. data/vendor/assets/components/jquery/test/data/echoQuery.php +1 -0
  175. data/vendor/assets/components/jquery/test/data/errorWithText.php +5 -0
  176. data/vendor/assets/components/jquery/test/data/etag.php +21 -0
  177. data/vendor/assets/components/jquery/test/data/evalScript.php +1 -0
  178. data/vendor/assets/components/jquery/test/data/event/longLoadScript.php +4 -0
  179. data/vendor/assets/components/jquery/test/data/event/promiseReady.html +17 -0
  180. data/vendor/assets/components/jquery/test/data/event/syncReady.html +23 -0
  181. data/vendor/assets/components/jquery/test/data/headers.php +18 -0
  182. data/vendor/assets/components/jquery/test/data/if_modified_since.php +20 -0
  183. data/vendor/assets/components/jquery/test/data/iframe.html +8 -0
  184. data/vendor/assets/components/jquery/test/data/jquery-1.8.2.ajax_xhr.min.js +2 -0
  185. data/vendor/assets/components/jquery/test/data/json.php +13 -0
  186. data/vendor/assets/components/jquery/test/data/json_obj.js +1 -0
  187. data/vendor/assets/components/jquery/test/data/jsonp.php +14 -0
  188. data/vendor/assets/components/jquery/test/data/manipulation/iframe-denied.html +36 -0
  189. data/vendor/assets/components/jquery/test/data/name.html +1 -0
  190. data/vendor/assets/components/jquery/test/data/name.php +24 -0
  191. data/vendor/assets/components/jquery/test/data/nocontent.php +5 -0
  192. data/vendor/assets/components/jquery/test/data/offset/absolute.html +41 -0
  193. data/vendor/assets/components/jquery/test/data/offset/body.html +26 -0
  194. data/vendor/assets/components/jquery/test/data/offset/fixed.html +34 -0
  195. data/vendor/assets/components/jquery/test/data/offset/relative.html +31 -0
  196. data/vendor/assets/components/jquery/test/data/offset/scroll.html +39 -0
  197. data/vendor/assets/components/jquery/test/data/offset/static.html +31 -0
  198. data/vendor/assets/components/jquery/test/data/offset/table.html +43 -0
  199. data/vendor/assets/components/jquery/test/data/params_html.php +12 -0
  200. data/vendor/assets/components/jquery/test/data/readywaitasset.js +1 -0
  201. data/vendor/assets/components/jquery/test/data/readywaitloader.js +25 -0
  202. data/vendor/assets/components/jquery/test/data/script.php +11 -0
  203. data/vendor/assets/components/jquery/test/data/selector/html5_selector.html +114 -0
  204. data/vendor/assets/components/jquery/test/data/selector/sizzle_cache.html +21 -0
  205. data/vendor/assets/components/jquery/test/data/statusText.php +5 -0
  206. data/vendor/assets/components/jquery/test/data/support/bodyBackground.html +28 -0
  207. data/vendor/assets/components/jquery/test/data/support/shrinkWrapBlocks.html +23 -0
  208. data/vendor/assets/components/jquery/test/data/support/testElementCrash.html +17 -0
  209. data/vendor/assets/components/jquery/test/data/test.html +7 -0
  210. data/vendor/assets/components/jquery/test/data/test.js +3 -0
  211. data/vendor/assets/components/jquery/test/data/test.php +7 -0
  212. data/vendor/assets/components/jquery/test/data/test2.html +5 -0
  213. data/vendor/assets/components/jquery/test/data/test3.html +3 -0
  214. data/vendor/assets/components/jquery/test/data/testinit.js +269 -0
  215. data/vendor/assets/components/jquery/test/data/testrunner.js +368 -0
  216. data/vendor/assets/components/jquery/test/data/testsuite.css +155 -0
  217. data/vendor/assets/components/jquery/test/data/text.php +12 -0
  218. data/vendor/assets/components/jquery/test/data/ua.txt +272 -0
  219. data/vendor/assets/components/jquery/test/data/with_fries.xml +25 -0
  220. data/vendor/assets/components/jquery/test/data/with_fries_over_jsonp.php +7 -0
  221. data/vendor/assets/components/jquery/test/delegatetest.html +228 -0
  222. data/vendor/assets/components/jquery/test/hovertest.html +158 -0
  223. data/vendor/assets/components/jquery/test/index.html +330 -0
  224. data/vendor/assets/components/jquery/test/localfile.html +75 -0
  225. data/vendor/assets/components/jquery/test/networkerror.html +84 -0
  226. data/vendor/assets/components/jquery/test/polluted.php +110 -0
  227. data/vendor/assets/components/jquery/test/readywait.html +70 -0
  228. data/vendor/assets/components/jquery/test/unit/ajax.js +1971 -0
  229. data/vendor/assets/components/jquery/test/unit/attributes.js +1332 -0
  230. data/vendor/assets/components/jquery/test/unit/callbacks.js +326 -0
  231. data/vendor/assets/components/jquery/test/unit/core.js +1332 -0
  232. data/vendor/assets/components/jquery/test/unit/css.js +1036 -0
  233. data/vendor/assets/components/jquery/test/unit/data.js +636 -0
  234. data/vendor/assets/components/jquery/test/unit/deferred.js +440 -0
  235. data/vendor/assets/components/jquery/test/unit/deprecated.js +1 -0
  236. data/vendor/assets/components/jquery/test/unit/dimensions.js +461 -0
  237. data/vendor/assets/components/jquery/test/unit/effects.js +2050 -0
  238. data/vendor/assets/components/jquery/test/unit/event.js +2690 -0
  239. data/vendor/assets/components/jquery/test/unit/exports.js +7 -0
  240. data/vendor/assets/components/jquery/test/unit/manipulation.js +2242 -0
  241. data/vendor/assets/components/jquery/test/unit/offset.js +549 -0
  242. data/vendor/assets/components/jquery/test/unit/queue.js +316 -0
  243. data/vendor/assets/components/jquery/test/unit/selector.js +185 -0
  244. data/vendor/assets/components/jquery/test/unit/serialize.js +146 -0
  245. data/vendor/assets/components/jquery/test/unit/support.js +384 -0
  246. data/vendor/assets/components/jquery/test/unit/traversing.js +667 -0
  247. data/vendor/assets/components/jquery/test/xhtml.php +5 -0
  248. data/vendor/assets/components/sir-trevor-js/CHANGELOG.md +44 -0
  249. data/vendor/assets/components/sir-trevor-js/Gemfile +3 -0
  250. data/vendor/assets/components/sir-trevor-js/Gemfile.lock +10 -0
  251. data/vendor/assets/components/sir-trevor-js/Gruntfile.js +109 -0
  252. data/vendor/assets/components/sir-trevor-js/MIT-LICENCE +20 -0
  253. data/vendor/assets/components/sir-trevor-js/Readme.md +84 -0
  254. data/vendor/assets/components/sir-trevor-js/bower.json +21 -0
  255. data/vendor/assets/components/sir-trevor-js/component.json +42 -0
  256. data/vendor/assets/components/sir-trevor-js/contributing.md +74 -0
  257. data/vendor/assets/components/sir-trevor-js/examples-component/component.json +14 -0
  258. data/vendor/assets/components/sir-trevor-js/examples-component/index.html +33 -0
  259. data/vendor/assets/components/sir-trevor-js/examples-component/index.js +29 -0
  260. data/vendor/assets/components/sir-trevor-js/examples-component/javascript/example_block.js +203 -0
  261. data/vendor/assets/components/sir-trevor-js/examples-component/javascript/limit_chars.js +46 -0
  262. data/vendor/assets/components/sir-trevor-js/examples-component/sir-trevor.gif +0 -0
  263. data/vendor/assets/components/sir-trevor-js/locales/cn.js +51 -0
  264. data/vendor/assets/components/sir-trevor-js/locales/de.js +51 -0
  265. data/vendor/assets/components/sir-trevor-js/locales/es.js +51 -0
  266. data/vendor/assets/components/sir-trevor-js/locales/fi.js +51 -0
  267. data/vendor/assets/components/sir-trevor-js/locales/fr.js +51 -0
  268. data/vendor/assets/components/sir-trevor-js/locales/pt.js +52 -0
  269. data/vendor/assets/components/sir-trevor-js/package.json +23 -0
  270. data/vendor/assets/components/sir-trevor-js/sir-trevor-icons.css +6 -0
  271. data/vendor/assets/components/sir-trevor-js/sir-trevor.css +393 -0
  272. data/vendor/assets/components/sir-trevor-js/sir-trevor.css.map +7 -0
  273. data/vendor/assets/components/sir-trevor-js/sir-trevor.js +5481 -0
  274. data/vendor/assets/components/sir-trevor-js/sir-trevor.min.js +13 -0
  275. data/vendor/assets/components/underscore/CNAME +1 -0
  276. data/vendor/assets/components/underscore/CONTRIBUTING.md +9 -0
  277. data/vendor/assets/components/underscore/LICENSE +22 -0
  278. data/vendor/assets/components/underscore/README.md +19 -0
  279. data/vendor/assets/components/underscore/Rakefile +10 -0
  280. data/vendor/assets/components/underscore/docs/docco.css +192 -0
  281. data/vendor/assets/components/underscore/docs/favicon.ico +0 -0
  282. data/vendor/assets/components/underscore/docs/images/background.png +0 -0
  283. data/vendor/assets/components/underscore/docs/images/underscore.png +0 -0
  284. data/vendor/assets/components/underscore/docs/underscore.html +823 -0
  285. data/vendor/assets/components/underscore/favicon.ico +0 -0
  286. data/vendor/assets/components/underscore/index.html +2467 -0
  287. data/vendor/assets/components/underscore/index.js +1 -0
  288. data/vendor/assets/components/underscore/package.json +16 -0
  289. data/vendor/assets/components/underscore/test/arrays.js +200 -0
  290. data/vendor/assets/components/underscore/test/chaining.js +59 -0
  291. data/vendor/assets/components/underscore/test/collections.js +453 -0
  292. data/vendor/assets/components/underscore/test/functions.js +265 -0
  293. data/vendor/assets/components/underscore/test/index.html +44 -0
  294. data/vendor/assets/components/underscore/test/objects.js +570 -0
  295. data/vendor/assets/components/underscore/test/speed.js +75 -0
  296. data/vendor/assets/components/underscore/test/utility.js +266 -0
  297. data/vendor/assets/components/underscore/test/vendor/jquery.js +9404 -0
  298. data/vendor/assets/components/underscore/test/vendor/jslitmus.js +670 -0
  299. data/vendor/assets/components/underscore/test/vendor/qunit.css +235 -0
  300. data/vendor/assets/components/underscore/test/vendor/qunit.js +1977 -0
  301. data/vendor/assets/components/underscore/test/vendor/runner.js +98 -0
  302. data/vendor/assets/components/underscore/underscore-min.js +1 -0
  303. data/vendor/assets/components/underscore/underscore.js +1226 -0
  304. metadata +473 -0
@@ -0,0 +1,18 @@
1
+ // Expose jQuery to the global object
2
+ window.jQuery = window.$ = jQuery;
3
+
4
+ // Expose jQuery as an AMD module, but only for AMD loaders that
5
+ // understand the issues with loading multiple versions of jQuery
6
+ // in a page that all might call define(). The loader will indicate
7
+ // they have special allowances for multiple jQuery versions by
8
+ // specifying define.amd.jQuery = true. Register as a named module,
9
+ // since jQuery can be concatenated with other files that may use define,
10
+ // but not use a proper concatenation script that understands anonymous
11
+ // AMD modules. A named AMD is safest and most robust way to register.
12
+ // Lowercase jquery is used because AMD module names are derived from
13
+ // file names, and jQuery is normally delivered in a lowercase file name.
14
+ // Do this after creating the global so that if an AMD module wants to call
15
+ // noConflict to hide this version of jQuery, it will work.
16
+ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
17
+ define( "jquery", [], function () { return jQuery; } );
18
+ }
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * jQuery JavaScript Library v@VERSION
3
+ * http://jquery.com/
4
+ *
5
+ * Includes Sizzle.js
6
+ * http://sizzlejs.com/
7
+ *
8
+ * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
9
+ * Released under the MIT license
10
+ * http://jquery.org/license
11
+ *
12
+ * Date: @DATE
13
+ */
14
+ (function( window, undefined ) {
15
+
16
+ // Can't do this because several apps including ASP.NET trace
17
+ // the stack via arguments.caller.callee and Firefox dies if
18
+ // you try to trace through "use strict" call chains. (#13335)
19
+ // Support: Firefox 18+
20
+ //"use strict";
@@ -0,0 +1,796 @@
1
+ function createSafeFragment( document ) {
2
+ var list = nodeNames.split( "|" ),
3
+ safeFrag = document.createDocumentFragment();
4
+
5
+ if ( safeFrag.createElement ) {
6
+ while ( list.length ) {
7
+ safeFrag.createElement(
8
+ list.pop()
9
+ );
10
+ }
11
+ }
12
+ return safeFrag;
13
+ }
14
+
15
+ var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
16
+ "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
17
+ rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
18
+ rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
19
+ rleadingWhitespace = /^\s+/,
20
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
21
+ rtagName = /<([\w:]+)/,
22
+ rtbody = /<tbody/i,
23
+ rhtml = /<|&#?\w+;/,
24
+ rnoInnerhtml = /<(?:script|style|link)/i,
25
+ manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
26
+ // checked="checked" or checked
27
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
28
+ rscriptType = /^$|\/(?:java|ecma)script/i,
29
+ rscriptTypeMasked = /^true\/(.*)/,
30
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
31
+
32
+ // We have to close these tags to support XHTML (#13200)
33
+ wrapMap = {
34
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
35
+ legend: [ 1, "<fieldset>", "</fieldset>" ],
36
+ area: [ 1, "<map>", "</map>" ],
37
+ param: [ 1, "<object>", "</object>" ],
38
+ thead: [ 1, "<table>", "</table>" ],
39
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
40
+ col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
41
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
42
+
43
+ // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
44
+ // unless wrapped in a div with non-breaking characters in front of it.
45
+ _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
46
+ },
47
+ safeFragment = createSafeFragment( document ),
48
+ fragmentDiv = safeFragment.appendChild( document.createElement("div") );
49
+
50
+ wrapMap.optgroup = wrapMap.option;
51
+ wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
52
+ wrapMap.th = wrapMap.td;
53
+
54
+ jQuery.fn.extend({
55
+ text: function( value ) {
56
+ return jQuery.access( this, function( value ) {
57
+ return value === undefined ?
58
+ jQuery.text( this ) :
59
+ this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
60
+ }, null, value, arguments.length );
61
+ },
62
+
63
+ wrapAll: function( html ) {
64
+ if ( jQuery.isFunction( html ) ) {
65
+ return this.each(function(i) {
66
+ jQuery(this).wrapAll( html.call(this, i) );
67
+ });
68
+ }
69
+
70
+ if ( this[0] ) {
71
+ // The elements to wrap the target around
72
+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
73
+
74
+ if ( this[0].parentNode ) {
75
+ wrap.insertBefore( this[0] );
76
+ }
77
+
78
+ wrap.map(function() {
79
+ var elem = this;
80
+
81
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
82
+ elem = elem.firstChild;
83
+ }
84
+
85
+ return elem;
86
+ }).append( this );
87
+ }
88
+
89
+ return this;
90
+ },
91
+
92
+ wrapInner: function( html ) {
93
+ if ( jQuery.isFunction( html ) ) {
94
+ return this.each(function(i) {
95
+ jQuery(this).wrapInner( html.call(this, i) );
96
+ });
97
+ }
98
+
99
+ return this.each(function() {
100
+ var self = jQuery( this ),
101
+ contents = self.contents();
102
+
103
+ if ( contents.length ) {
104
+ contents.wrapAll( html );
105
+
106
+ } else {
107
+ self.append( html );
108
+ }
109
+ });
110
+ },
111
+
112
+ wrap: function( html ) {
113
+ var isFunction = jQuery.isFunction( html );
114
+
115
+ return this.each(function(i) {
116
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
117
+ });
118
+ },
119
+
120
+ unwrap: function() {
121
+ return this.parent().each(function() {
122
+ if ( !jQuery.nodeName( this, "body" ) ) {
123
+ jQuery( this ).replaceWith( this.childNodes );
124
+ }
125
+ }).end();
126
+ },
127
+
128
+ append: function() {
129
+ return this.domManip(arguments, true, function( elem ) {
130
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
131
+ this.appendChild( elem );
132
+ }
133
+ });
134
+ },
135
+
136
+ prepend: function() {
137
+ return this.domManip(arguments, true, function( elem ) {
138
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
139
+ this.insertBefore( elem, this.firstChild );
140
+ }
141
+ });
142
+ },
143
+
144
+ before: function() {
145
+ return this.domManip( arguments, false, function( elem ) {
146
+ if ( this.parentNode ) {
147
+ this.parentNode.insertBefore( elem, this );
148
+ }
149
+ });
150
+ },
151
+
152
+ after: function() {
153
+ return this.domManip( arguments, false, function( elem ) {
154
+ if ( this.parentNode ) {
155
+ this.parentNode.insertBefore( elem, this.nextSibling );
156
+ }
157
+ });
158
+ },
159
+
160
+ // keepData is for internal use only--do not document
161
+ remove: function( selector, keepData ) {
162
+ var elem,
163
+ i = 0;
164
+
165
+ for ( ; (elem = this[i]) != null; i++ ) {
166
+ if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) {
167
+ if ( !keepData && elem.nodeType === 1 ) {
168
+ jQuery.cleanData( getAll( elem ) );
169
+ }
170
+
171
+ if ( elem.parentNode ) {
172
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
173
+ setGlobalEval( getAll( elem, "script" ) );
174
+ }
175
+ elem.parentNode.removeChild( elem );
176
+ }
177
+ }
178
+ }
179
+
180
+ return this;
181
+ },
182
+
183
+ empty: function() {
184
+ var elem,
185
+ i = 0;
186
+
187
+ for ( ; (elem = this[i]) != null; i++ ) {
188
+ // Remove element nodes and prevent memory leaks
189
+ if ( elem.nodeType === 1 ) {
190
+ jQuery.cleanData( getAll( elem, false ) );
191
+ }
192
+
193
+ // Remove any remaining nodes
194
+ while ( elem.firstChild ) {
195
+ elem.removeChild( elem.firstChild );
196
+ }
197
+
198
+ // If this is a select, ensure that it displays empty (#12336)
199
+ // Support: IE<9
200
+ if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
201
+ elem.options.length = 0;
202
+ }
203
+ }
204
+
205
+ return this;
206
+ },
207
+
208
+ clone: function( dataAndEvents, deepDataAndEvents ) {
209
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
210
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
211
+
212
+ return this.map( function () {
213
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
214
+ });
215
+ },
216
+
217
+ html: function( value ) {
218
+ return jQuery.access( this, function( value ) {
219
+ var elem = this[0] || {},
220
+ i = 0,
221
+ l = this.length;
222
+
223
+ if ( value === undefined ) {
224
+ return elem.nodeType === 1 ?
225
+ elem.innerHTML.replace( rinlinejQuery, "" ) :
226
+ undefined;
227
+ }
228
+
229
+ // See if we can take a shortcut and just use innerHTML
230
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
231
+ ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
232
+ ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
233
+ !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
234
+
235
+ value = value.replace( rxhtmlTag, "<$1></$2>" );
236
+
237
+ try {
238
+ for (; i < l; i++ ) {
239
+ // Remove element nodes and prevent memory leaks
240
+ elem = this[i] || {};
241
+ if ( elem.nodeType === 1 ) {
242
+ jQuery.cleanData( getAll( elem, false ) );
243
+ elem.innerHTML = value;
244
+ }
245
+ }
246
+
247
+ elem = 0;
248
+
249
+ // If using innerHTML throws an exception, use the fallback method
250
+ } catch(e) {}
251
+ }
252
+
253
+ if ( elem ) {
254
+ this.empty().append( value );
255
+ }
256
+ }, null, value, arguments.length );
257
+ },
258
+
259
+ replaceWith: function( value ) {
260
+ var isFunc = jQuery.isFunction( value );
261
+
262
+ // Make sure that the elements are removed from the DOM before they are inserted
263
+ // this can help fix replacing a parent with child elements
264
+ if ( !isFunc && typeof value !== "string" ) {
265
+ value = jQuery( value ).not( this ).detach();
266
+ }
267
+
268
+ return this.domManip( [ value ], true, function( elem ) {
269
+ var next = this.nextSibling,
270
+ parent = this.parentNode;
271
+
272
+ if ( parent ) {
273
+ jQuery( this ).remove();
274
+ parent.insertBefore( elem, next );
275
+ }
276
+ });
277
+ },
278
+
279
+ detach: function( selector ) {
280
+ return this.remove( selector, true );
281
+ },
282
+
283
+ domManip: function( args, table, callback ) {
284
+
285
+ // Flatten any nested arrays
286
+ args = core_concat.apply( [], args );
287
+
288
+ var first, node, hasScripts,
289
+ scripts, doc, fragment,
290
+ i = 0,
291
+ l = this.length,
292
+ set = this,
293
+ iNoClone = l - 1,
294
+ value = args[0],
295
+ isFunction = jQuery.isFunction( value );
296
+
297
+ // We can't cloneNode fragments that contain checked, in WebKit
298
+ if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
299
+ return this.each(function( index ) {
300
+ var self = set.eq( index );
301
+ if ( isFunction ) {
302
+ args[0] = value.call( this, index, table ? self.html() : undefined );
303
+ }
304
+ self.domManip( args, table, callback );
305
+ });
306
+ }
307
+
308
+ if ( l ) {
309
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
310
+ first = fragment.firstChild;
311
+
312
+ if ( fragment.childNodes.length === 1 ) {
313
+ fragment = first;
314
+ }
315
+
316
+ if ( first ) {
317
+ table = table && jQuery.nodeName( first, "tr" );
318
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
319
+ hasScripts = scripts.length;
320
+
321
+ // Use the original fragment for the last item instead of the first because it can end up
322
+ // being emptied incorrectly in certain situations (#8070).
323
+ for ( ; i < l; i++ ) {
324
+ node = fragment;
325
+
326
+ if ( i !== iNoClone ) {
327
+ node = jQuery.clone( node, true, true );
328
+
329
+ // Keep references to cloned scripts for later restoration
330
+ if ( hasScripts ) {
331
+ jQuery.merge( scripts, getAll( node, "script" ) );
332
+ }
333
+ }
334
+
335
+ callback.call(
336
+ table && jQuery.nodeName( this[i], "table" ) ?
337
+ findOrAppend( this[i], "tbody" ) :
338
+ this[i],
339
+ node,
340
+ i
341
+ );
342
+ }
343
+
344
+ if ( hasScripts ) {
345
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
346
+
347
+ // Reenable scripts
348
+ jQuery.map( scripts, restoreScript );
349
+
350
+ // Evaluate executable scripts on first document insertion
351
+ for ( i = 0; i < hasScripts; i++ ) {
352
+ node = scripts[ i ];
353
+ if ( rscriptType.test( node.type || "" ) &&
354
+ !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
355
+
356
+ if ( node.src ) {
357
+ // Hope ajax is available...
358
+ jQuery.ajax({
359
+ url: node.src,
360
+ type: "GET",
361
+ dataType: "script",
362
+ async: false,
363
+ global: false,
364
+ "throws": true
365
+ });
366
+ } else {
367
+ jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
368
+ }
369
+ }
370
+ }
371
+ }
372
+
373
+ // Fix #11809: Avoid leaking memory
374
+ fragment = first = null;
375
+ }
376
+ }
377
+
378
+ return this;
379
+ }
380
+ });
381
+
382
+ function findOrAppend( elem, tag ) {
383
+ return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
384
+ }
385
+
386
+ // Replace/restore the type attribute of script elements for safe DOM manipulation
387
+ function disableScript( elem ) {
388
+ var attr = elem.getAttributeNode("type");
389
+ elem.type = ( attr && attr.specified ) + "/" + elem.type;
390
+ return elem;
391
+ }
392
+ function restoreScript( elem ) {
393
+ var match = rscriptTypeMasked.exec( elem.type );
394
+ if ( match ) {
395
+ elem.type = match[1];
396
+ } else {
397
+ elem.removeAttribute("type");
398
+ }
399
+ return elem;
400
+ }
401
+
402
+ // Mark scripts as having already been evaluated
403
+ function setGlobalEval( elems, refElements ) {
404
+ var elem,
405
+ i = 0;
406
+ for ( ; (elem = elems[i]) != null; i++ ) {
407
+ jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
408
+ }
409
+ }
410
+
411
+ function cloneCopyEvent( src, dest ) {
412
+
413
+ if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
414
+ return;
415
+ }
416
+
417
+ var type, i, l,
418
+ oldData = jQuery._data( src ),
419
+ curData = jQuery._data( dest, oldData ),
420
+ events = oldData.events;
421
+
422
+ if ( events ) {
423
+ delete curData.handle;
424
+ curData.events = {};
425
+
426
+ for ( type in events ) {
427
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
428
+ jQuery.event.add( dest, type, events[ type ][ i ] );
429
+ }
430
+ }
431
+ }
432
+
433
+ // make the cloned public data object a copy from the original
434
+ if ( curData.data ) {
435
+ curData.data = jQuery.extend( {}, curData.data );
436
+ }
437
+ }
438
+
439
+ function fixCloneNodeIssues( src, dest ) {
440
+ var nodeName, e, data;
441
+
442
+ // We do not need to do anything for non-Elements
443
+ if ( dest.nodeType !== 1 ) {
444
+ return;
445
+ }
446
+
447
+ nodeName = dest.nodeName.toLowerCase();
448
+
449
+ // IE6-8 copies events bound via attachEvent when using cloneNode.
450
+ if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
451
+ data = jQuery._data( dest );
452
+
453
+ for ( e in data.events ) {
454
+ jQuery.removeEvent( dest, e, data.handle );
455
+ }
456
+
457
+ // Event data gets referenced instead of copied if the expando gets copied too
458
+ dest.removeAttribute( jQuery.expando );
459
+ }
460
+
461
+ // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
462
+ if ( nodeName === "script" && dest.text !== src.text ) {
463
+ disableScript( dest ).text = src.text;
464
+ restoreScript( dest );
465
+
466
+ // IE6-10 improperly clones children of object elements using classid.
467
+ // IE10 throws NoModificationAllowedError if parent is null, #12132.
468
+ } else if ( nodeName === "object" ) {
469
+ if ( dest.parentNode ) {
470
+ dest.outerHTML = src.outerHTML;
471
+ }
472
+
473
+ // This path appears unavoidable for IE9. When cloning an object
474
+ // element in IE9, the outerHTML strategy above is not sufficient.
475
+ // If the src has innerHTML and the destination does not,
476
+ // copy the src.innerHTML into the dest.innerHTML. #10324
477
+ if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
478
+ dest.innerHTML = src.innerHTML;
479
+ }
480
+
481
+ } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
482
+ // IE6-8 fails to persist the checked state of a cloned checkbox
483
+ // or radio button. Worse, IE6-7 fail to give the cloned element
484
+ // a checked appearance if the defaultChecked value isn't also set
485
+
486
+ dest.defaultChecked = dest.checked = src.checked;
487
+
488
+ // IE6-7 get confused and end up setting the value of a cloned
489
+ // checkbox/radio button to an empty string instead of "on"
490
+ if ( dest.value !== src.value ) {
491
+ dest.value = src.value;
492
+ }
493
+
494
+ // IE6-8 fails to return the selected option to the default selected
495
+ // state when cloning options
496
+ } else if ( nodeName === "option" ) {
497
+ dest.defaultSelected = dest.selected = src.defaultSelected;
498
+
499
+ // IE6-8 fails to set the defaultValue to the correct value when
500
+ // cloning other types of input fields
501
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
502
+ dest.defaultValue = src.defaultValue;
503
+ }
504
+ }
505
+
506
+ jQuery.each({
507
+ appendTo: "append",
508
+ prependTo: "prepend",
509
+ insertBefore: "before",
510
+ insertAfter: "after",
511
+ replaceAll: "replaceWith"
512
+ }, function( name, original ) {
513
+ jQuery.fn[ name ] = function( selector ) {
514
+ var elems,
515
+ i = 0,
516
+ ret = [],
517
+ insert = jQuery( selector ),
518
+ last = insert.length - 1;
519
+
520
+ for ( ; i <= last; i++ ) {
521
+ elems = i === last ? this : this.clone(true);
522
+ jQuery( insert[i] )[ original ]( elems );
523
+
524
+ // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
525
+ core_push.apply( ret, elems.get() );
526
+ }
527
+
528
+ return this.pushStack( ret );
529
+ };
530
+ });
531
+
532
+ function getAll( context, tag ) {
533
+ var elems, elem,
534
+ i = 0,
535
+ found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) :
536
+ typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) :
537
+ undefined;
538
+
539
+ if ( !found ) {
540
+ for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
541
+ if ( !tag || jQuery.nodeName( elem, tag ) ) {
542
+ found.push( elem );
543
+ } else {
544
+ jQuery.merge( found, getAll( elem, tag ) );
545
+ }
546
+ }
547
+ }
548
+
549
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
550
+ jQuery.merge( [ context ], found ) :
551
+ found;
552
+ }
553
+
554
+ // Used in buildFragment, fixes the defaultChecked property
555
+ function fixDefaultChecked( elem ) {
556
+ if ( manipulation_rcheckableType.test( elem.type ) ) {
557
+ elem.defaultChecked = elem.checked;
558
+ }
559
+ }
560
+
561
+ jQuery.extend({
562
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
563
+ var destElements, node, clone, i, srcElements,
564
+ inPage = jQuery.contains( elem.ownerDocument, elem );
565
+
566
+ if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
567
+ clone = elem.cloneNode( true );
568
+
569
+ // IE<=8 does not properly clone detached, unknown element nodes
570
+ } else {
571
+ fragmentDiv.innerHTML = elem.outerHTML;
572
+ fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
573
+ }
574
+
575
+ if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
576
+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
577
+
578
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
579
+ destElements = getAll( clone );
580
+ srcElements = getAll( elem );
581
+
582
+ // Fix all IE cloning issues
583
+ for ( i = 0; (node = srcElements[i]) != null; ++i ) {
584
+ // Ensure that the destination node is not null; Fixes #9587
585
+ if ( destElements[i] ) {
586
+ fixCloneNodeIssues( node, destElements[i] );
587
+ }
588
+ }
589
+ }
590
+
591
+ // Copy the events from the original to the clone
592
+ if ( dataAndEvents ) {
593
+ if ( deepDataAndEvents ) {
594
+ srcElements = srcElements || getAll( elem );
595
+ destElements = destElements || getAll( clone );
596
+
597
+ for ( i = 0; (node = srcElements[i]) != null; i++ ) {
598
+ cloneCopyEvent( node, destElements[i] );
599
+ }
600
+ } else {
601
+ cloneCopyEvent( elem, clone );
602
+ }
603
+ }
604
+
605
+ // Preserve script evaluation history
606
+ destElements = getAll( clone, "script" );
607
+ if ( destElements.length > 0 ) {
608
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
609
+ }
610
+
611
+ destElements = srcElements = node = null;
612
+
613
+ // Return the cloned set
614
+ return clone;
615
+ },
616
+
617
+ buildFragment: function( elems, context, scripts, selection ) {
618
+ var j, elem, contains,
619
+ tmp, tag, tbody, wrap,
620
+ l = elems.length,
621
+
622
+ // Ensure a safe fragment
623
+ safe = createSafeFragment( context ),
624
+
625
+ nodes = [],
626
+ i = 0;
627
+
628
+ for ( ; i < l; i++ ) {
629
+ elem = elems[ i ];
630
+
631
+ if ( elem || elem === 0 ) {
632
+
633
+ // Add nodes directly
634
+ if ( jQuery.type( elem ) === "object" ) {
635
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
636
+
637
+ // Convert non-html into a text node
638
+ } else if ( !rhtml.test( elem ) ) {
639
+ nodes.push( context.createTextNode( elem ) );
640
+
641
+ // Convert html into DOM nodes
642
+ } else {
643
+ tmp = tmp || safe.appendChild( context.createElement("div") );
644
+
645
+ // Deserialize a standard representation
646
+ tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
647
+ wrap = wrapMap[ tag ] || wrapMap._default;
648
+
649
+ tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
650
+
651
+ // Descend through wrappers to the right content
652
+ j = wrap[0];
653
+ while ( j-- ) {
654
+ tmp = tmp.lastChild;
655
+ }
656
+
657
+ // Manually add leading whitespace removed by IE
658
+ if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
659
+ nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
660
+ }
661
+
662
+ // Remove IE's autoinserted <tbody> from table fragments
663
+ if ( !jQuery.support.tbody ) {
664
+
665
+ // String was a <table>, *may* have spurious <tbody>
666
+ elem = tag === "table" && !rtbody.test( elem ) ?
667
+ tmp.firstChild :
668
+
669
+ // String was a bare <thead> or <tfoot>
670
+ wrap[1] === "<table>" && !rtbody.test( elem ) ?
671
+ tmp :
672
+ 0;
673
+
674
+ j = elem && elem.childNodes.length;
675
+ while ( j-- ) {
676
+ if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
677
+ elem.removeChild( tbody );
678
+ }
679
+ }
680
+ }
681
+
682
+ jQuery.merge( nodes, tmp.childNodes );
683
+
684
+ // Fix #12392 for WebKit and IE > 9
685
+ tmp.textContent = "";
686
+
687
+ // Fix #12392 for oldIE
688
+ while ( tmp.firstChild ) {
689
+ tmp.removeChild( tmp.firstChild );
690
+ }
691
+
692
+ // Remember the top-level container for proper cleanup
693
+ tmp = safe.lastChild;
694
+ }
695
+ }
696
+ }
697
+
698
+ // Fix #11356: Clear elements from fragment
699
+ if ( tmp ) {
700
+ safe.removeChild( tmp );
701
+ }
702
+
703
+ // Reset defaultChecked for any radios and checkboxes
704
+ // about to be appended to the DOM in IE 6/7 (#8060)
705
+ if ( !jQuery.support.appendChecked ) {
706
+ jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
707
+ }
708
+
709
+ i = 0;
710
+ while ( (elem = nodes[ i++ ]) ) {
711
+
712
+ // #4087 - If origin and destination elements are the same, and this is
713
+ // that element, do not do anything
714
+ if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
715
+ continue;
716
+ }
717
+
718
+ contains = jQuery.contains( elem.ownerDocument, elem );
719
+
720
+ // Append to fragment
721
+ tmp = getAll( safe.appendChild( elem ), "script" );
722
+
723
+ // Preserve script evaluation history
724
+ if ( contains ) {
725
+ setGlobalEval( tmp );
726
+ }
727
+
728
+ // Capture executables
729
+ if ( scripts ) {
730
+ j = 0;
731
+ while ( (elem = tmp[ j++ ]) ) {
732
+ if ( rscriptType.test( elem.type || "" ) ) {
733
+ scripts.push( elem );
734
+ }
735
+ }
736
+ }
737
+ }
738
+
739
+ tmp = null;
740
+
741
+ return safe;
742
+ },
743
+
744
+ cleanData: function( elems, /* internal */ acceptData ) {
745
+ var elem, type, id, data,
746
+ i = 0,
747
+ internalKey = jQuery.expando,
748
+ cache = jQuery.cache,
749
+ deleteExpando = jQuery.support.deleteExpando,
750
+ special = jQuery.event.special;
751
+
752
+ for ( ; (elem = elems[i]) != null; i++ ) {
753
+
754
+ if ( acceptData || jQuery.acceptData( elem ) ) {
755
+
756
+ id = elem[ internalKey ];
757
+ data = id && cache[ id ];
758
+
759
+ if ( data ) {
760
+ if ( data.events ) {
761
+ for ( type in data.events ) {
762
+ if ( special[ type ] ) {
763
+ jQuery.event.remove( elem, type );
764
+
765
+ // This is a shortcut to avoid jQuery.event.remove's overhead
766
+ } else {
767
+ jQuery.removeEvent( elem, type, data.handle );
768
+ }
769
+ }
770
+ }
771
+
772
+ // Remove cache only if it was not already removed by jQuery.event.remove
773
+ if ( cache[ id ] ) {
774
+
775
+ delete cache[ id ];
776
+
777
+ // IE does not allow us to delete expando properties from nodes,
778
+ // nor does it have a removeAttribute function on Document nodes;
779
+ // we must handle all of these cases
780
+ if ( deleteExpando ) {
781
+ delete elem[ internalKey ];
782
+
783
+ } else if ( typeof elem.removeAttribute !== core_strundefined ) {
784
+ elem.removeAttribute( internalKey );
785
+
786
+ } else {
787
+ elem[ internalKey ] = null;
788
+ }
789
+
790
+ core_deletedIds.push( id );
791
+ }
792
+ }
793
+ }
794
+ }
795
+ }
796
+ });