process_engine 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (409) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +37 -0
  4. data/app/assets/bower_components/process_engine/Snap.svg/CONTRIBUTING +3 -0
  5. data/app/assets/bower_components/process_engine/Snap.svg/Gruntfile.js +59 -0
  6. data/app/assets/bower_components/process_engine/Snap.svg/LICENSE +202 -0
  7. data/app/assets/bower_components/process_engine/Snap.svg/NOTICE +190 -0
  8. data/app/assets/bower_components/process_engine/Snap.svg/README.md +62 -0
  9. data/app/assets/bower_components/process_engine/Snap.svg/bower.json +25 -0
  10. data/app/assets/bower_components/process_engine/Snap.svg/component.json +13 -0
  11. data/app/assets/bower_components/process_engine/Snap.svg/dist/snap.svg-min.js +20 -0
  12. data/app/assets/bower_components/process_engine/Snap.svg/dist/snap.svg.js +7653 -0
  13. data/app/assets/bower_components/process_engine/Snap.svg/doc/css/dr.css +144 -0
  14. data/app/assets/bower_components/process_engine/Snap.svg/doc/css/main.css +508 -0
  15. data/app/assets/bower_components/process_engine/Snap.svg/doc/css/prism.css +168 -0
  16. data/app/assets/bower_components/process_engine/Snap.svg/doc/css/topcoat-desktop-light.css +3700 -0
  17. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.eot +0 -0
  18. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.svg +242 -0
  19. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.ttf +0 -0
  20. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.woff +0 -0
  21. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.eot +0 -0
  22. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.svg +243 -0
  23. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.ttf +0 -0
  24. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.woff +0 -0
  25. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.eot +0 -0
  26. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.svg +243 -0
  27. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.ttf +0 -0
  28. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.woff +0 -0
  29. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.eot +0 -0
  30. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.svg +243 -0
  31. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.ttf +0 -0
  32. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.woff +0 -0
  33. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/stylesheet.css +57 -0
  34. data/app/assets/bower_components/process_engine/Snap.svg/doc/img/search.svg +11 -0
  35. data/app/assets/bower_components/process_engine/Snap.svg/doc/img/search_dark.svg +16 -0
  36. data/app/assets/bower_components/process_engine/Snap.svg/doc/js/prism.js +9 -0
  37. data/app/assets/bower_components/process_engine/Snap.svg/doc/reference.html +13633 -0
  38. data/app/assets/bower_components/process_engine/Snap.svg/dr.json +33 -0
  39. data/app/assets/bower_components/process_engine/Snap.svg/history.md +31 -0
  40. data/app/assets/bower_components/process_engine/Snap.svg/package.json +22 -0
  41. data/app/assets/bower_components/process_engine/Snap.svg/template.dot +157 -0
  42. data/app/assets/bower_components/process_engine/Snap.svg/test.html +75 -0
  43. data/app/assets/bower_components/process_engine/bpmn-js/LICENSE +22 -0
  44. data/app/assets/bower_components/process_engine/bpmn-js/README.md +46 -0
  45. data/app/assets/bower_components/process_engine/bpmn-js/bower.json +28 -0
  46. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css +40 -0
  47. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.eot +0 -0
  48. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.svg +21 -0
  49. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.ttf +0 -0
  50. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.woff +0 -0
  51. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/diagram-js.css +355 -0
  52. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.js +21552 -0
  53. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.js.map +1 -0
  54. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.min.js +8 -0
  55. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.js +13542 -0
  56. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.js.map +1 -0
  57. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.min.js +5 -0
  58. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.js +13294 -0
  59. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.js.map +1 -0
  60. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.min.js +5 -0
  61. data/app/assets/bower_components/process_engine/hammerjs/CHANGELOG.md +30 -0
  62. data/app/assets/bower_components/process_engine/hammerjs/CONTRIBUTING.md +41 -0
  63. data/app/assets/bower_components/process_engine/hammerjs/Gruntfile.coffee +123 -0
  64. data/app/assets/bower_components/process_engine/hammerjs/LICENSE.md +21 -0
  65. data/app/assets/bower_components/process_engine/hammerjs/README.md +6 -0
  66. data/app/assets/bower_components/process_engine/hammerjs/bower.json +9 -0
  67. data/app/assets/bower_components/process_engine/hammerjs/component.json +8 -0
  68. data/app/assets/bower_components/process_engine/hammerjs/hammer.js +2463 -0
  69. data/app/assets/bower_components/process_engine/hammerjs/hammer.min.js +7 -0
  70. data/app/assets/bower_components/process_engine/hammerjs/hammer.min.map +1 -0
  71. data/app/assets/bower_components/process_engine/hammerjs/package.json +50 -0
  72. data/app/assets/bower_components/process_engine/jquery/MIT-LICENSE.txt +21 -0
  73. data/app/assets/bower_components/process_engine/jquery/bower.json +27 -0
  74. data/app/assets/bower_components/process_engine/jquery/dist/jquery.js +9205 -0
  75. data/app/assets/bower_components/process_engine/jquery/dist/jquery.min.js +5 -0
  76. data/app/assets/bower_components/process_engine/jquery/dist/jquery.min.map +1 -0
  77. data/app/assets/bower_components/process_engine/jquery/src/ajax/jsonp.js +89 -0
  78. data/app/assets/bower_components/process_engine/jquery/src/ajax/load.js +75 -0
  79. data/app/assets/bower_components/process_engine/jquery/src/ajax/parseJSON.js +13 -0
  80. data/app/assets/bower_components/process_engine/jquery/src/ajax/parseXML.js +28 -0
  81. data/app/assets/bower_components/process_engine/jquery/src/ajax/script.js +64 -0
  82. data/app/assets/bower_components/process_engine/jquery/src/ajax/var/nonce.js +5 -0
  83. data/app/assets/bower_components/process_engine/jquery/src/ajax/var/rquery.js +3 -0
  84. data/app/assets/bower_components/process_engine/jquery/src/ajax/xhr.js +136 -0
  85. data/app/assets/bower_components/process_engine/jquery/src/ajax.js +786 -0
  86. data/app/assets/bower_components/process_engine/jquery/src/attributes/attr.js +141 -0
  87. data/app/assets/bower_components/process_engine/jquery/src/attributes/classes.js +158 -0
  88. data/app/assets/bower_components/process_engine/jquery/src/attributes/prop.js +94 -0
  89. data/app/assets/bower_components/process_engine/jquery/src/attributes/support.js +35 -0
  90. data/app/assets/bower_components/process_engine/jquery/src/attributes/val.js +161 -0
  91. data/app/assets/bower_components/process_engine/jquery/src/attributes.js +11 -0
  92. data/app/assets/bower_components/process_engine/jquery/src/callbacks.js +205 -0
  93. data/app/assets/bower_components/process_engine/jquery/src/core/access.js +60 -0
  94. data/app/assets/bower_components/process_engine/jquery/src/core/init.js +123 -0
  95. data/app/assets/bower_components/process_engine/jquery/src/core/parseHTML.js +39 -0
  96. data/app/assets/bower_components/process_engine/jquery/src/core/ready.js +97 -0
  97. data/app/assets/bower_components/process_engine/jquery/src/core/var/rsingleTag.js +4 -0
  98. data/app/assets/bower_components/process_engine/jquery/src/core.js +497 -0
  99. data/app/assets/bower_components/process_engine/jquery/src/css/addGetHookIf.js +22 -0
  100. data/app/assets/bower_components/process_engine/jquery/src/css/curCSS.js +57 -0
  101. data/app/assets/bower_components/process_engine/jquery/src/css/defaultDisplay.js +70 -0
  102. data/app/assets/bower_components/process_engine/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  103. data/app/assets/bower_components/process_engine/jquery/src/css/support.js +96 -0
  104. data/app/assets/bower_components/process_engine/jquery/src/css/swap.js +28 -0
  105. data/app/assets/bower_components/process_engine/jquery/src/css/var/cssExpand.js +3 -0
  106. data/app/assets/bower_components/process_engine/jquery/src/css/var/getStyles.js +12 -0
  107. data/app/assets/bower_components/process_engine/jquery/src/css/var/isHidden.js +13 -0
  108. data/app/assets/bower_components/process_engine/jquery/src/css/var/rmargin.js +3 -0
  109. data/app/assets/bower_components/process_engine/jquery/src/css/var/rnumnonpx.js +5 -0
  110. data/app/assets/bower_components/process_engine/jquery/src/css.js +450 -0
  111. data/app/assets/bower_components/process_engine/jquery/src/data/Data.js +181 -0
  112. data/app/assets/bower_components/process_engine/jquery/src/data/accepts.js +20 -0
  113. data/app/assets/bower_components/process_engine/jquery/src/data/var/data_priv.js +5 -0
  114. data/app/assets/bower_components/process_engine/jquery/src/data/var/data_user.js +5 -0
  115. data/app/assets/bower_components/process_engine/jquery/src/data.js +178 -0
  116. data/app/assets/bower_components/process_engine/jquery/src/deferred.js +149 -0
  117. data/app/assets/bower_components/process_engine/jquery/src/deprecated.js +13 -0
  118. data/app/assets/bower_components/process_engine/jquery/src/dimensions.js +50 -0
  119. data/app/assets/bower_components/process_engine/jquery/src/effects/Tween.js +114 -0
  120. data/app/assets/bower_components/process_engine/jquery/src/effects/animatedSelector.js +13 -0
  121. data/app/assets/bower_components/process_engine/jquery/src/effects.js +648 -0
  122. data/app/assets/bower_components/process_engine/jquery/src/event/ajax.js +13 -0
  123. data/app/assets/bower_components/process_engine/jquery/src/event/alias.js +39 -0
  124. data/app/assets/bower_components/process_engine/jquery/src/event/support.js +9 -0
  125. data/app/assets/bower_components/process_engine/jquery/src/event.js +868 -0
  126. data/app/assets/bower_components/process_engine/jquery/src/exports/amd.js +24 -0
  127. data/app/assets/bower_components/process_engine/jquery/src/exports/global.js +32 -0
  128. data/app/assets/bower_components/process_engine/jquery/src/intro.js +44 -0
  129. data/app/assets/bower_components/process_engine/jquery/src/jquery.js +37 -0
  130. data/app/assets/bower_components/process_engine/jquery/src/manipulation/_evalUrl.js +18 -0
  131. data/app/assets/bower_components/process_engine/jquery/src/manipulation/support.js +32 -0
  132. data/app/assets/bower_components/process_engine/jquery/src/manipulation/var/rcheckableType.js +3 -0
  133. data/app/assets/bower_components/process_engine/jquery/src/manipulation.js +580 -0
  134. data/app/assets/bower_components/process_engine/jquery/src/offset.js +207 -0
  135. data/app/assets/bower_components/process_engine/jquery/src/outro.js +1 -0
  136. data/app/assets/bower_components/process_engine/jquery/src/queue/delay.js +22 -0
  137. data/app/assets/bower_components/process_engine/jquery/src/queue.js +142 -0
  138. data/app/assets/bower_components/process_engine/jquery/src/selector-native.js +172 -0
  139. data/app/assets/bower_components/process_engine/jquery/src/selector-sizzle.js +14 -0
  140. data/app/assets/bower_components/process_engine/jquery/src/selector.js +1 -0
  141. data/app/assets/bower_components/process_engine/jquery/src/serialize.js +111 -0
  142. data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.js +2067 -0
  143. data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.min.js +3 -0
  144. data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.min.map +1 -0
  145. data/app/assets/bower_components/process_engine/jquery/src/traversing/findFilter.js +100 -0
  146. data/app/assets/bower_components/process_engine/jquery/src/traversing/var/rneedsContext.js +6 -0
  147. data/app/assets/bower_components/process_engine/jquery/src/traversing.js +199 -0
  148. data/app/assets/bower_components/process_engine/jquery/src/var/arr.js +3 -0
  149. data/app/assets/bower_components/process_engine/jquery/src/var/class2type.js +4 -0
  150. data/app/assets/bower_components/process_engine/jquery/src/var/concat.js +5 -0
  151. data/app/assets/bower_components/process_engine/jquery/src/var/hasOwn.js +5 -0
  152. data/app/assets/bower_components/process_engine/jquery/src/var/indexOf.js +5 -0
  153. data/app/assets/bower_components/process_engine/jquery/src/var/pnum.js +3 -0
  154. data/app/assets/bower_components/process_engine/jquery/src/var/push.js +5 -0
  155. data/app/assets/bower_components/process_engine/jquery/src/var/rnotwhite.js +3 -0
  156. data/app/assets/bower_components/process_engine/jquery/src/var/slice.js +5 -0
  157. data/app/assets/bower_components/process_engine/jquery/src/var/strundefined.js +3 -0
  158. data/app/assets/bower_components/process_engine/jquery/src/var/support.js +4 -0
  159. data/app/assets/bower_components/process_engine/jquery/src/var/toString.js +5 -0
  160. data/app/assets/bower_components/process_engine/jquery/src/wrap.js +79 -0
  161. data/app/assets/bower_components/process_engine/jquery-mousewheel/ChangeLog.md +141 -0
  162. data/app/assets/bower_components/process_engine/jquery-mousewheel/LICENSE.txt +20 -0
  163. data/app/assets/bower_components/process_engine/jquery-mousewheel/README.md +85 -0
  164. data/app/assets/bower_components/process_engine/jquery-mousewheel/bower.json +17 -0
  165. data/app/assets/bower_components/process_engine/jquery-mousewheel/jquery.mousewheel.js +221 -0
  166. data/app/assets/bower_components/process_engine/jquery-mousewheel/jquery.mousewheel.min.js +8 -0
  167. data/app/assets/bower_components/process_engine/lodash/LICENSE.txt +22 -0
  168. data/app/assets/bower_components/process_engine/lodash/bower.json +23 -0
  169. data/app/assets/bower_components/process_engine/lodash/dist/lodash.compat.js +7157 -0
  170. data/app/assets/bower_components/process_engine/lodash/dist/lodash.compat.min.js +61 -0
  171. data/app/assets/bower_components/process_engine/lodash/dist/lodash.js +6785 -0
  172. data/app/assets/bower_components/process_engine/lodash/dist/lodash.min.js +56 -0
  173. data/app/assets/bower_components/process_engine/lodash/dist/lodash.underscore.js +4979 -0
  174. data/app/assets/bower_components/process_engine/lodash/dist/lodash.underscore.min.js +39 -0
  175. data/app/assets/bower_components/process_engine/sax/AUTHORS +10 -0
  176. data/app/assets/bower_components/process_engine/sax/LICENSE +32 -0
  177. data/app/assets/bower_components/process_engine/sax/LICENSE-W3C.html +188 -0
  178. data/app/assets/bower_components/process_engine/sax/README.md +216 -0
  179. data/app/assets/bower_components/process_engine/sax/component.json +12 -0
  180. data/app/assets/bower_components/process_engine/sax/examples/big-not-pretty.xml +8002 -0
  181. data/app/assets/bower_components/process_engine/sax/examples/example.js +29 -0
  182. data/app/assets/bower_components/process_engine/sax/examples/get-products.js +58 -0
  183. data/app/assets/bower_components/process_engine/sax/examples/hello-world.js +4 -0
  184. data/app/assets/bower_components/process_engine/sax/examples/not-pretty.xml +8 -0
  185. data/app/assets/bower_components/process_engine/sax/examples/pretty-print.js +74 -0
  186. data/app/assets/bower_components/process_engine/sax/examples/shopping.xml +2 -0
  187. data/app/assets/bower_components/process_engine/sax/examples/strict.dtd +870 -0
  188. data/app/assets/bower_components/process_engine/sax/examples/test.html +15 -0
  189. data/app/assets/bower_components/process_engine/sax/examples/test.xml +1254 -0
  190. data/app/assets/bower_components/process_engine/sax/lib/sax.js +1410 -0
  191. data/app/assets/bower_components/process_engine/sax/package.json +12 -0
  192. data/app/assets/bower_components/process_engine/sax/test/attribute-name.js +33 -0
  193. data/app/assets/bower_components/process_engine/sax/test/attribute-no-space.js +75 -0
  194. data/app/assets/bower_components/process_engine/sax/test/buffer-overrun.js +26 -0
  195. data/app/assets/bower_components/process_engine/sax/test/case.js +50 -0
  196. data/app/assets/bower_components/process_engine/sax/test/cdata-chunked.js +11 -0
  197. data/app/assets/bower_components/process_engine/sax/test/cdata-end-split.js +15 -0
  198. data/app/assets/bower_components/process_engine/sax/test/cdata-fake-end.js +28 -0
  199. data/app/assets/bower_components/process_engine/sax/test/cdata-multiple.js +15 -0
  200. data/app/assets/bower_components/process_engine/sax/test/cdata.js +10 -0
  201. data/app/assets/bower_components/process_engine/sax/test/cyrillic.js +8 -0
  202. data/app/assets/bower_components/process_engine/sax/test/duplicate-attribute.js +13 -0
  203. data/app/assets/bower_components/process_engine/sax/test/emoji.js +12 -0
  204. data/app/assets/bower_components/process_engine/sax/test/end_empty_stream.js +5 -0
  205. data/app/assets/bower_components/process_engine/sax/test/entities.js +10 -0
  206. data/app/assets/bower_components/process_engine/sax/test/entity-mega.js +16 -0
  207. data/app/assets/bower_components/process_engine/sax/test/flush.js +13 -0
  208. data/app/assets/bower_components/process_engine/sax/test/index.js +86 -0
  209. data/app/assets/bower_components/process_engine/sax/test/issue-23.js +43 -0
  210. data/app/assets/bower_components/process_engine/sax/test/issue-30.js +24 -0
  211. data/app/assets/bower_components/process_engine/sax/test/issue-35.js +15 -0
  212. data/app/assets/bower_components/process_engine/sax/test/issue-47.js +12 -0
  213. data/app/assets/bower_components/process_engine/sax/test/issue-49.js +31 -0
  214. data/app/assets/bower_components/process_engine/sax/test/issue-84.js +13 -0
  215. data/app/assets/bower_components/process_engine/sax/test/parser-position.js +28 -0
  216. data/app/assets/bower_components/process_engine/sax/test/script-close-better.js +12 -0
  217. data/app/assets/bower_components/process_engine/sax/test/script.js +12 -0
  218. data/app/assets/bower_components/process_engine/sax/test/self-closing-child-strict.js +44 -0
  219. data/app/assets/bower_components/process_engine/sax/test/self-closing-child.js +44 -0
  220. data/app/assets/bower_components/process_engine/sax/test/self-closing-tag.js +25 -0
  221. data/app/assets/bower_components/process_engine/sax/test/stray-ending.js +17 -0
  222. data/app/assets/bower_components/process_engine/sax/test/trailing-attribute-no-value.js +10 -0
  223. data/app/assets/bower_components/process_engine/sax/test/trailing-non-whitespace.js +18 -0
  224. data/app/assets/bower_components/process_engine/sax/test/unclosed-root.js +11 -0
  225. data/app/assets/bower_components/process_engine/sax/test/unquoted.js +18 -0
  226. data/app/assets/bower_components/process_engine/sax/test/utf8-split.js +32 -0
  227. data/app/assets/bower_components/process_engine/sax/test/xmlns-as-tag-name.js +15 -0
  228. data/app/assets/bower_components/process_engine/sax/test/xmlns-issue-41.js +68 -0
  229. data/app/assets/bower_components/process_engine/sax/test/xmlns-rebinding.js +63 -0
  230. data/app/assets/bower_components/process_engine/sax/test/xmlns-strict.js +74 -0
  231. data/app/assets/bower_components/process_engine/sax/test/xmlns-unbound-element.js +33 -0
  232. data/app/assets/bower_components/process_engine/sax/test/xmlns-unbound.js +15 -0
  233. data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-ns.js +31 -0
  234. data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-prefix-attribute.js +36 -0
  235. data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-prefix.js +21 -0
  236. data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-redefine.js +41 -0
  237. data/app/assets/javascripts/process_engine/application.js +65 -0
  238. data/app/assets/stylesheets/process_engine/application.css +39 -0
  239. data/app/controllers/process_engine/application_controller.rb +28 -0
  240. data/app/controllers/process_engine/process_definitions_controller.rb +63 -0
  241. data/app/controllers/process_engine/process_instances_controller.rb +42 -0
  242. data/app/controllers/process_engine/process_tasks_controller.rb +23 -0
  243. data/app/helpers/process_engine/application_helper.rb +4 -0
  244. data/app/models/process_engine/consumer/consumer_task.rb +15 -0
  245. data/app/models/process_engine/error/false_task_state.rb +2 -0
  246. data/app/models/process_engine/listener/base.rb +49 -0
  247. data/app/models/process_engine/node_data_injection.rb +22 -0
  248. data/app/models/process_engine/parser/complex_gateway.rb +21 -0
  249. data/app/models/process_engine/parser/end_event.rb +23 -0
  250. data/app/models/process_engine/parser/exclusive_gateway.rb +25 -0
  251. data/app/models/process_engine/parser/extension/condition_expression.rb +39 -0
  252. data/app/models/process_engine/parser/extension/execution_listener.rb +15 -0
  253. data/app/models/process_engine/parser/extension/form_field.rb +50 -0
  254. data/app/models/process_engine/parser/extension/input_output.rb +28 -0
  255. data/app/models/process_engine/parser/extension/listener.rb +43 -0
  256. data/app/models/process_engine/parser/extension/property.rb +20 -0
  257. data/app/models/process_engine/parser/extension/task_listener.rb +15 -0
  258. data/app/models/process_engine/parser/extension/transitional_parameter.rb +53 -0
  259. data/app/models/process_engine/parser/inclusive_gateway.rb +25 -0
  260. data/app/models/process_engine/parser/parallel_gateway.rb +19 -0
  261. data/app/models/process_engine/parser/script_task.rb +37 -0
  262. data/app/models/process_engine/parser/sequence_flow.rb +36 -0
  263. data/app/models/process_engine/parser/start_event.rb +27 -0
  264. data/app/models/process_engine/parser/user_task.rb +36 -0
  265. data/app/models/process_engine/parser/xml_node.rb +125 -0
  266. data/app/models/process_engine/process_definition.rb +50 -0
  267. data/app/models/process_engine/process_instance.rb +72 -0
  268. data/app/models/process_engine/process_query.rb +52 -0
  269. data/app/models/process_engine/process_schema.rb +30 -0
  270. data/app/models/process_engine/process_task.rb +70 -0
  271. data/app/models/process_engine/schema/interceptor/exclusive_gateway.rb +39 -0
  272. data/app/models/process_engine/schema/node.rb +48 -0
  273. data/app/models/process_engine/schema/node_extension.rb +79 -0
  274. data/app/models/process_engine/schema/transition.rb +22 -0
  275. data/app/views/layouts/process_engine/application.html.erb +14 -0
  276. data/app/views/process_engine/layouts/_menu.html.haml +6 -0
  277. data/app/views/process_engine/layouts/application.html.haml +11 -0
  278. data/app/views/process_engine/process_definitions/_form.html.haml +6 -0
  279. data/app/views/process_engine/process_definitions/edit.html.haml +3 -0
  280. data/app/views/process_engine/process_definitions/index.html.haml +26 -0
  281. data/app/views/process_engine/process_definitions/new.html.haml +3 -0
  282. data/app/views/process_engine/process_definitions/show.html.haml +51 -0
  283. data/app/views/process_engine/process_instances/_form.html.haml +5 -0
  284. data/app/views/process_engine/process_instances/edit.html.haml +3 -0
  285. data/app/views/process_engine/process_instances/index.html.haml +29 -0
  286. data/app/views/process_engine/process_instances/show.html.haml +38 -0
  287. data/app/views/process_engine/process_tasks/index.html.haml +44 -0
  288. data/app/views/process_engine/share/_bpmn_canvas.html.haml +7 -0
  289. data/config/initializers/bower_rails.rb +16 -0
  290. data/config/initializers/simple_form.rb +166 -0
  291. data/config/initializers/simple_form_bootstrap.rb +135 -0
  292. data/config/locales/simple_form.en.yml +31 -0
  293. data/config/routes.rb +18 -0
  294. data/db/migrate/20150313063311_create_process_engine_process_definitions.rb +14 -0
  295. data/db/migrate/20150313063508_create_process_engine_process_instances.rb +15 -0
  296. data/db/migrate/20150313063633_create_process_engine_process_tasks.rb +30 -0
  297. data/lib/process_engine/engine.rb +12 -0
  298. data/lib/process_engine/version.rb +3 -0
  299. data/lib/process_engine.rb +8 -0
  300. data/lib/tasks/process_engine_tasks.rake +4 -0
  301. data/lib/templates/erb/scaffold/_form.html.erb +13 -0
  302. data/test/dummy/README.rdoc +28 -0
  303. data/test/dummy/Rakefile +6 -0
  304. data/test/dummy/app/assets/javascripts/application.js +13 -0
  305. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  306. data/test/dummy/app/controllers/application_controller.rb +5 -0
  307. data/test/dummy/app/helpers/application_helper.rb +2 -0
  308. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  309. data/test/dummy/bin/bundle +3 -0
  310. data/test/dummy/bin/rails +4 -0
  311. data/test/dummy/bin/rake +4 -0
  312. data/test/dummy/bin/setup +29 -0
  313. data/test/dummy/config/application.rb +26 -0
  314. data/test/dummy/config/boot.rb +5 -0
  315. data/test/dummy/config/database.yml +85 -0
  316. data/test/dummy/config/environment.rb +5 -0
  317. data/test/dummy/config/environments/development.rb +41 -0
  318. data/test/dummy/config/environments/production.rb +79 -0
  319. data/test/dummy/config/environments/test.rb +42 -0
  320. data/test/dummy/config/initializers/assets.rb +11 -0
  321. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  322. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  323. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  324. data/test/dummy/config/initializers/inflections.rb +16 -0
  325. data/test/dummy/config/initializers/mime_types.rb +4 -0
  326. data/test/dummy/config/initializers/session_store.rb +3 -0
  327. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  328. data/test/dummy/config/locales/en.yml +23 -0
  329. data/test/dummy/config/routes.rb +4 -0
  330. data/test/dummy/config/secrets.yml +22 -0
  331. data/test/dummy/config.ru +4 -0
  332. data/test/dummy/db/schema.rb +66 -0
  333. data/test/dummy/log/development.log +9722 -0
  334. data/test/dummy/public/404.html +67 -0
  335. data/test/dummy/public/422.html +67 -0
  336. data/test/dummy/public/500.html +66 -0
  337. data/test/dummy/public/favicon.ico +0 -0
  338. data/test/dummy/tmp/cache/assets/development/sass/8afee1847b645742b0d2535a7c32f4f22e7926ec/bootstrap.scssc +0 -0
  339. data/test/dummy/tmp/cache/assets/development/sass/b5911aa594334efca1023d6f01abce0758e9648a/bootstrap.scssc +0 -0
  340. data/test/dummy/tmp/cache/assets/development/sprockets/014d8413350c7d85a5429f5e2c9ac911 +0 -0
  341. data/test/dummy/tmp/cache/assets/development/sprockets/0cbd667d0fbf9e0e6f60b5ebf2f95fa3 +0 -0
  342. data/test/dummy/tmp/cache/assets/development/sprockets/0f7ba040a442530a6d4a5bc8307769c1 +0 -0
  343. data/test/dummy/tmp/cache/assets/development/sprockets/0fca2cc9aa38138660d8c7d492cf81e4 +0 -0
  344. data/test/dummy/tmp/cache/assets/development/sprockets/0ff24903c54f534941fbc96ff862e475 +0 -0
  345. data/test/dummy/tmp/cache/assets/development/sprockets/11100f87277a2892323fe5581af75a7b +0 -0
  346. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  347. data/test/dummy/tmp/cache/assets/development/sprockets/18a34084783e8b7f9bc871bc64b13eed +0 -0
  348. data/test/dummy/tmp/cache/assets/development/sprockets/1a3821ce28e0196075ed0830fcb45f38 +0 -0
  349. data/test/dummy/tmp/cache/assets/development/sprockets/1cf94b9a49ee68cb0f4065d48e9cbaf3 +0 -0
  350. data/test/dummy/tmp/cache/assets/development/sprockets/21a6373d6c40614fd05be57194c68248 +0 -0
  351. data/test/dummy/tmp/cache/assets/development/sprockets/26276ae8df51c046f3adc0b50a1521ba +0 -0
  352. data/test/dummy/tmp/cache/assets/development/sprockets/2eea4a8f4854d438cd03cb23a89b6d8c +0 -0
  353. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  354. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  355. data/test/dummy/tmp/cache/assets/development/sprockets/3993bcd8bae4771e550d8fc91d1debbc +0 -0
  356. data/test/dummy/tmp/cache/assets/development/sprockets/3ccc4edae36a9c4bd70fc330c9c83dc9 +0 -0
  357. data/test/dummy/tmp/cache/assets/development/sprockets/3e391b0f37505fffc40ba9ffa13330a2 +0 -0
  358. data/test/dummy/tmp/cache/assets/development/sprockets/42e258b77f5dd532dfb9344a2d766de6 +0 -0
  359. data/test/dummy/tmp/cache/assets/development/sprockets/43a5910cb7a330ece5856c0e9099efa2 +0 -0
  360. data/test/dummy/tmp/cache/assets/development/sprockets/4e65ec1149f01e749e1e372861210d4d +0 -0
  361. data/test/dummy/tmp/cache/assets/development/sprockets/501160bcee63ae68449a5a5eb78b6d41 +0 -0
  362. data/test/dummy/tmp/cache/assets/development/sprockets/517beb0bf366ec3c8649da9ac8a8a01e +0 -0
  363. data/test/dummy/tmp/cache/assets/development/sprockets/525a556b1eaacfa041722e1250d9859a +0 -0
  364. data/test/dummy/tmp/cache/assets/development/sprockets/56edbae38e4e0ff9f4b4fc576ae3d746 +0 -0
  365. data/test/dummy/tmp/cache/assets/development/sprockets/5b04f4a7058d92f88f89f2248bcc16b0 +0 -0
  366. data/test/dummy/tmp/cache/assets/development/sprockets/5c3c69f7c2520b57620931c150032d7e +0 -0
  367. data/test/dummy/tmp/cache/assets/development/sprockets/5d1f8f2111e14084ebf711412c9230d2 +0 -0
  368. data/test/dummy/tmp/cache/assets/development/sprockets/5f9833d6835900c56d0e76a1b2924cc2 +0 -0
  369. data/test/dummy/tmp/cache/assets/development/sprockets/67c653cc36eb639f7a7af5159e9f9de3 +0 -0
  370. data/test/dummy/tmp/cache/assets/development/sprockets/704b33432a5ba417bcd5962ad999c671 +0 -0
  371. data/test/dummy/tmp/cache/assets/development/sprockets/7301f83e8e67f30be13546a794a553ef +0 -0
  372. data/test/dummy/tmp/cache/assets/development/sprockets/7482c8f712712a79937caf41413bca15 +0 -0
  373. data/test/dummy/tmp/cache/assets/development/sprockets/761cb171e67ddca71e8b9c74f0220457 +0 -0
  374. data/test/dummy/tmp/cache/assets/development/sprockets/7e23bd4385e166267961b6d936363042 +0 -0
  375. data/test/dummy/tmp/cache/assets/development/sprockets/7e5100f290c9ba0d4c026e43b58d0d79 +0 -0
  376. data/test/dummy/tmp/cache/assets/development/sprockets/80743880e8d46958e9839ff9408c3113 +0 -0
  377. data/test/dummy/tmp/cache/assets/development/sprockets/8b8941aae968854bafb4638a86cad77b +0 -0
  378. data/test/dummy/tmp/cache/assets/development/sprockets/9c292f3b6b577a92970303c351e1d4a1 +0 -0
  379. data/test/dummy/tmp/cache/assets/development/sprockets/a3435b13cfa60fb7469a19703350bda7 +0 -0
  380. data/test/dummy/tmp/cache/assets/development/sprockets/a6ce1b2837383f1e8b62b7f1ddcc6820 +0 -0
  381. data/test/dummy/tmp/cache/assets/development/sprockets/a7e90acc68ba69b7cd5c0a7005467c4b +0 -0
  382. data/test/dummy/tmp/cache/assets/development/sprockets/be4d00fb7bf467b370f0fda7e453ec68 +0 -0
  383. data/test/dummy/tmp/cache/assets/development/sprockets/c4fbf44e63e40cbbf825fe750374728f +0 -0
  384. data/test/dummy/tmp/cache/assets/development/sprockets/c593bacb8d3f003125f91763a7b36b10 +0 -0
  385. data/test/dummy/tmp/cache/assets/development/sprockets/c5ae3bc69f7b1e1fdb51a667c9f3cdd6 +0 -0
  386. data/test/dummy/tmp/cache/assets/development/sprockets/cc843b336460771bf75c97cf0935301b +0 -0
  387. data/test/dummy/tmp/cache/assets/development/sprockets/ce3b6127737ed36f7b62a54acec06b3e +0 -0
  388. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  389. data/test/dummy/tmp/cache/assets/development/sprockets/d58931b13c55c146d21475e532b126ba +0 -0
  390. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  391. data/test/dummy/tmp/cache/assets/development/sprockets/dc6bbdc1e385c7bb2743011e9c2a7407 +0 -0
  392. data/test/dummy/tmp/cache/assets/development/sprockets/dd7270e11b484ae10f601e1dd014445a +0 -0
  393. data/test/dummy/tmp/cache/assets/development/sprockets/de86beefc60e0cd84dd1525af863e64d +0 -0
  394. data/test/dummy/tmp/cache/assets/development/sprockets/e0953e6e4a6c208e350f7f25d85bdce8 +0 -0
  395. data/test/dummy/tmp/cache/assets/development/sprockets/ec3b479833be43bf164a3deb119c3aee +0 -0
  396. data/test/dummy/tmp/cache/assets/development/sprockets/ef2cb0afc9a61a3d5819b4dfc84720ad +0 -0
  397. data/test/dummy/tmp/cache/assets/development/sprockets/f0511bbd6f6cd5530acddebb6d7e7044 +0 -0
  398. data/test/dummy/tmp/cache/assets/development/sprockets/f7009bba030498129042e0c542d4f264 +0 -0
  399. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  400. data/test/fixtures/process_engine/process_definitions.yml +17 -0
  401. data/test/fixtures/process_engine/process_instances.yml +11 -0
  402. data/test/fixtures/process_engine/process_tasks.yml +11 -0
  403. data/test/integration/navigation_test.rb +10 -0
  404. data/test/models/process_engine/process_definition_test.rb +9 -0
  405. data/test/models/process_engine/process_instance_test.rb +9 -0
  406. data/test/models/process_engine/process_task_test.rb +9 -0
  407. data/test/process_engine_test.rb +7 -0
  408. data/test/test_helper.rb +19 -0
  409. metadata +740 -0
@@ -0,0 +1,580 @@
1
+ define([
2
+ "./core",
3
+ "./var/concat",
4
+ "./var/push",
5
+ "./core/access",
6
+ "./manipulation/var/rcheckableType",
7
+ "./manipulation/support",
8
+ "./data/var/data_priv",
9
+ "./data/var/data_user",
10
+
11
+ "./core/init",
12
+ "./data/accepts",
13
+ "./traversing",
14
+ "./selector",
15
+ "./event"
16
+ ], function( jQuery, concat, push, access, rcheckableType, support, data_priv, data_user ) {
17
+
18
+ var
19
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
20
+ rtagName = /<([\w:]+)/,
21
+ rhtml = /<|&#?\w+;/,
22
+ rnoInnerhtml = /<(?:script|style|link)/i,
23
+ // checked="checked" or checked
24
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
25
+ rscriptType = /^$|\/(?:java|ecma)script/i,
26
+ rscriptTypeMasked = /^true\/(.*)/,
27
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
28
+
29
+ // We have to close these tags to support XHTML (#13200)
30
+ wrapMap = {
31
+
32
+ // Support: IE9
33
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
34
+
35
+ thead: [ 1, "<table>", "</table>" ],
36
+ col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
37
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
38
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
39
+
40
+ _default: [ 0, "", "" ]
41
+ };
42
+
43
+ // Support: IE9
44
+ wrapMap.optgroup = wrapMap.option;
45
+
46
+ wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
47
+ wrapMap.th = wrapMap.td;
48
+
49
+ // Support: 1.x compatibility
50
+ // Manipulating tables requires a tbody
51
+ function manipulationTarget( elem, content ) {
52
+ return jQuery.nodeName( elem, "table" ) &&
53
+ jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
54
+
55
+ elem.getElementsByTagName("tbody")[0] ||
56
+ elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
57
+ elem;
58
+ }
59
+
60
+ // Replace/restore the type attribute of script elements for safe DOM manipulation
61
+ function disableScript( elem ) {
62
+ elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
63
+ return elem;
64
+ }
65
+ function restoreScript( elem ) {
66
+ var match = rscriptTypeMasked.exec( elem.type );
67
+
68
+ if ( match ) {
69
+ elem.type = match[ 1 ];
70
+ } else {
71
+ elem.removeAttribute("type");
72
+ }
73
+
74
+ return elem;
75
+ }
76
+
77
+ // Mark scripts as having already been evaluated
78
+ function setGlobalEval( elems, refElements ) {
79
+ var i = 0,
80
+ l = elems.length;
81
+
82
+ for ( ; i < l; i++ ) {
83
+ data_priv.set(
84
+ elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )
85
+ );
86
+ }
87
+ }
88
+
89
+ function cloneCopyEvent( src, dest ) {
90
+ var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
91
+
92
+ if ( dest.nodeType !== 1 ) {
93
+ return;
94
+ }
95
+
96
+ // 1. Copy private data: events, handlers, etc.
97
+ if ( data_priv.hasData( src ) ) {
98
+ pdataOld = data_priv.access( src );
99
+ pdataCur = data_priv.set( dest, pdataOld );
100
+ events = pdataOld.events;
101
+
102
+ if ( events ) {
103
+ delete pdataCur.handle;
104
+ pdataCur.events = {};
105
+
106
+ for ( type in events ) {
107
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
108
+ jQuery.event.add( dest, type, events[ type ][ i ] );
109
+ }
110
+ }
111
+ }
112
+ }
113
+
114
+ // 2. Copy user data
115
+ if ( data_user.hasData( src ) ) {
116
+ udataOld = data_user.access( src );
117
+ udataCur = jQuery.extend( {}, udataOld );
118
+
119
+ data_user.set( dest, udataCur );
120
+ }
121
+ }
122
+
123
+ function getAll( context, tag ) {
124
+ var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :
125
+ context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :
126
+ [];
127
+
128
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
129
+ jQuery.merge( [ context ], ret ) :
130
+ ret;
131
+ }
132
+
133
+ // Fix IE bugs, see support tests
134
+ function fixInput( src, dest ) {
135
+ var nodeName = dest.nodeName.toLowerCase();
136
+
137
+ // Fails to persist the checked state of a cloned checkbox or radio button.
138
+ if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
139
+ dest.checked = src.checked;
140
+
141
+ // Fails to return the selected option to the default selected state when cloning options
142
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
143
+ dest.defaultValue = src.defaultValue;
144
+ }
145
+ }
146
+
147
+ jQuery.extend({
148
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
149
+ var i, l, srcElements, destElements,
150
+ clone = elem.cloneNode( true ),
151
+ inPage = jQuery.contains( elem.ownerDocument, elem );
152
+
153
+ // Fix IE cloning issues
154
+ if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
155
+ !jQuery.isXMLDoc( elem ) ) {
156
+
157
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
158
+ destElements = getAll( clone );
159
+ srcElements = getAll( elem );
160
+
161
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
162
+ fixInput( srcElements[ i ], destElements[ i ] );
163
+ }
164
+ }
165
+
166
+ // Copy the events from the original to the clone
167
+ if ( dataAndEvents ) {
168
+ if ( deepDataAndEvents ) {
169
+ srcElements = srcElements || getAll( elem );
170
+ destElements = destElements || getAll( clone );
171
+
172
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
173
+ cloneCopyEvent( srcElements[ i ], destElements[ i ] );
174
+ }
175
+ } else {
176
+ cloneCopyEvent( elem, clone );
177
+ }
178
+ }
179
+
180
+ // Preserve script evaluation history
181
+ destElements = getAll( clone, "script" );
182
+ if ( destElements.length > 0 ) {
183
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
184
+ }
185
+
186
+ // Return the cloned set
187
+ return clone;
188
+ },
189
+
190
+ buildFragment: function( elems, context, scripts, selection ) {
191
+ var elem, tmp, tag, wrap, contains, j,
192
+ fragment = context.createDocumentFragment(),
193
+ nodes = [],
194
+ i = 0,
195
+ l = elems.length;
196
+
197
+ for ( ; i < l; i++ ) {
198
+ elem = elems[ i ];
199
+
200
+ if ( elem || elem === 0 ) {
201
+
202
+ // Add nodes directly
203
+ if ( jQuery.type( elem ) === "object" ) {
204
+ // Support: QtWebKit, PhantomJS
205
+ // push.apply(_, arraylike) throws on ancient WebKit
206
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
207
+
208
+ // Convert non-html into a text node
209
+ } else if ( !rhtml.test( elem ) ) {
210
+ nodes.push( context.createTextNode( elem ) );
211
+
212
+ // Convert html into DOM nodes
213
+ } else {
214
+ tmp = tmp || fragment.appendChild( context.createElement("div") );
215
+
216
+ // Deserialize a standard representation
217
+ tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
218
+ wrap = wrapMap[ tag ] || wrapMap._default;
219
+ tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ];
220
+
221
+ // Descend through wrappers to the right content
222
+ j = wrap[ 0 ];
223
+ while ( j-- ) {
224
+ tmp = tmp.lastChild;
225
+ }
226
+
227
+ // Support: QtWebKit, PhantomJS
228
+ // push.apply(_, arraylike) throws on ancient WebKit
229
+ jQuery.merge( nodes, tmp.childNodes );
230
+
231
+ // Remember the top-level container
232
+ tmp = fragment.firstChild;
233
+
234
+ // Ensure the created nodes are orphaned (#12392)
235
+ tmp.textContent = "";
236
+ }
237
+ }
238
+ }
239
+
240
+ // Remove wrapper from fragment
241
+ fragment.textContent = "";
242
+
243
+ i = 0;
244
+ while ( (elem = nodes[ i++ ]) ) {
245
+
246
+ // #4087 - If origin and destination elements are the same, and this is
247
+ // that element, do not do anything
248
+ if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
249
+ continue;
250
+ }
251
+
252
+ contains = jQuery.contains( elem.ownerDocument, elem );
253
+
254
+ // Append to fragment
255
+ tmp = getAll( fragment.appendChild( elem ), "script" );
256
+
257
+ // Preserve script evaluation history
258
+ if ( contains ) {
259
+ setGlobalEval( tmp );
260
+ }
261
+
262
+ // Capture executables
263
+ if ( scripts ) {
264
+ j = 0;
265
+ while ( (elem = tmp[ j++ ]) ) {
266
+ if ( rscriptType.test( elem.type || "" ) ) {
267
+ scripts.push( elem );
268
+ }
269
+ }
270
+ }
271
+ }
272
+
273
+ return fragment;
274
+ },
275
+
276
+ cleanData: function( elems ) {
277
+ var data, elem, type, key,
278
+ special = jQuery.event.special,
279
+ i = 0;
280
+
281
+ for ( ; (elem = elems[ i ]) !== undefined; i++ ) {
282
+ if ( jQuery.acceptData( elem ) ) {
283
+ key = elem[ data_priv.expando ];
284
+
285
+ if ( key && (data = data_priv.cache[ key ]) ) {
286
+ if ( data.events ) {
287
+ for ( type in data.events ) {
288
+ if ( special[ type ] ) {
289
+ jQuery.event.remove( elem, type );
290
+
291
+ // This is a shortcut to avoid jQuery.event.remove's overhead
292
+ } else {
293
+ jQuery.removeEvent( elem, type, data.handle );
294
+ }
295
+ }
296
+ }
297
+ if ( data_priv.cache[ key ] ) {
298
+ // Discard any remaining `private` data
299
+ delete data_priv.cache[ key ];
300
+ }
301
+ }
302
+ }
303
+ // Discard any remaining `user` data
304
+ delete data_user.cache[ elem[ data_user.expando ] ];
305
+ }
306
+ }
307
+ });
308
+
309
+ jQuery.fn.extend({
310
+ text: function( value ) {
311
+ return access( this, function( value ) {
312
+ return value === undefined ?
313
+ jQuery.text( this ) :
314
+ this.empty().each(function() {
315
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
316
+ this.textContent = value;
317
+ }
318
+ });
319
+ }, null, value, arguments.length );
320
+ },
321
+
322
+ append: function() {
323
+ return this.domManip( arguments, function( elem ) {
324
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
325
+ var target = manipulationTarget( this, elem );
326
+ target.appendChild( elem );
327
+ }
328
+ });
329
+ },
330
+
331
+ prepend: function() {
332
+ return this.domManip( arguments, function( elem ) {
333
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
334
+ var target = manipulationTarget( this, elem );
335
+ target.insertBefore( elem, target.firstChild );
336
+ }
337
+ });
338
+ },
339
+
340
+ before: function() {
341
+ return this.domManip( arguments, function( elem ) {
342
+ if ( this.parentNode ) {
343
+ this.parentNode.insertBefore( elem, this );
344
+ }
345
+ });
346
+ },
347
+
348
+ after: function() {
349
+ return this.domManip( arguments, function( elem ) {
350
+ if ( this.parentNode ) {
351
+ this.parentNode.insertBefore( elem, this.nextSibling );
352
+ }
353
+ });
354
+ },
355
+
356
+ remove: function( selector, keepData /* Internal Use Only */ ) {
357
+ var elem,
358
+ elems = selector ? jQuery.filter( selector, this ) : this,
359
+ i = 0;
360
+
361
+ for ( ; (elem = elems[i]) != null; i++ ) {
362
+ if ( !keepData && elem.nodeType === 1 ) {
363
+ jQuery.cleanData( getAll( elem ) );
364
+ }
365
+
366
+ if ( elem.parentNode ) {
367
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
368
+ setGlobalEval( getAll( elem, "script" ) );
369
+ }
370
+ elem.parentNode.removeChild( elem );
371
+ }
372
+ }
373
+
374
+ return this;
375
+ },
376
+
377
+ empty: function() {
378
+ var elem,
379
+ i = 0;
380
+
381
+ for ( ; (elem = this[i]) != null; i++ ) {
382
+ if ( elem.nodeType === 1 ) {
383
+
384
+ // Prevent memory leaks
385
+ jQuery.cleanData( getAll( elem, false ) );
386
+
387
+ // Remove any remaining nodes
388
+ elem.textContent = "";
389
+ }
390
+ }
391
+
392
+ return this;
393
+ },
394
+
395
+ clone: function( dataAndEvents, deepDataAndEvents ) {
396
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
397
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
398
+
399
+ return this.map(function() {
400
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
401
+ });
402
+ },
403
+
404
+ html: function( value ) {
405
+ return access( this, function( value ) {
406
+ var elem = this[ 0 ] || {},
407
+ i = 0,
408
+ l = this.length;
409
+
410
+ if ( value === undefined && elem.nodeType === 1 ) {
411
+ return elem.innerHTML;
412
+ }
413
+
414
+ // See if we can take a shortcut and just use innerHTML
415
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
416
+ !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
417
+
418
+ value = value.replace( rxhtmlTag, "<$1></$2>" );
419
+
420
+ try {
421
+ for ( ; i < l; i++ ) {
422
+ elem = this[ i ] || {};
423
+
424
+ // Remove element nodes and prevent memory leaks
425
+ if ( elem.nodeType === 1 ) {
426
+ jQuery.cleanData( getAll( elem, false ) );
427
+ elem.innerHTML = value;
428
+ }
429
+ }
430
+
431
+ elem = 0;
432
+
433
+ // If using innerHTML throws an exception, use the fallback method
434
+ } catch( e ) {}
435
+ }
436
+
437
+ if ( elem ) {
438
+ this.empty().append( value );
439
+ }
440
+ }, null, value, arguments.length );
441
+ },
442
+
443
+ replaceWith: function() {
444
+ var arg = arguments[ 0 ];
445
+
446
+ // Make the changes, replacing each context element with the new content
447
+ this.domManip( arguments, function( elem ) {
448
+ arg = this.parentNode;
449
+
450
+ jQuery.cleanData( getAll( this ) );
451
+
452
+ if ( arg ) {
453
+ arg.replaceChild( elem, this );
454
+ }
455
+ });
456
+
457
+ // Force removal if there was no new content (e.g., from empty arguments)
458
+ return arg && (arg.length || arg.nodeType) ? this : this.remove();
459
+ },
460
+
461
+ detach: function( selector ) {
462
+ return this.remove( selector, true );
463
+ },
464
+
465
+ domManip: function( args, callback ) {
466
+
467
+ // Flatten any nested arrays
468
+ args = concat.apply( [], args );
469
+
470
+ var fragment, first, scripts, hasScripts, node, doc,
471
+ i = 0,
472
+ l = this.length,
473
+ set = this,
474
+ iNoClone = l - 1,
475
+ value = args[ 0 ],
476
+ isFunction = jQuery.isFunction( value );
477
+
478
+ // We can't cloneNode fragments that contain checked, in WebKit
479
+ if ( isFunction ||
480
+ ( l > 1 && typeof value === "string" &&
481
+ !support.checkClone && rchecked.test( value ) ) ) {
482
+ return this.each(function( index ) {
483
+ var self = set.eq( index );
484
+ if ( isFunction ) {
485
+ args[ 0 ] = value.call( this, index, self.html() );
486
+ }
487
+ self.domManip( args, callback );
488
+ });
489
+ }
490
+
491
+ if ( l ) {
492
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
493
+ first = fragment.firstChild;
494
+
495
+ if ( fragment.childNodes.length === 1 ) {
496
+ fragment = first;
497
+ }
498
+
499
+ if ( first ) {
500
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
501
+ hasScripts = scripts.length;
502
+
503
+ // Use the original fragment for the last item instead of the first because it can end up
504
+ // being emptied incorrectly in certain situations (#8070).
505
+ for ( ; i < l; i++ ) {
506
+ node = fragment;
507
+
508
+ if ( i !== iNoClone ) {
509
+ node = jQuery.clone( node, true, true );
510
+
511
+ // Keep references to cloned scripts for later restoration
512
+ if ( hasScripts ) {
513
+ // Support: QtWebKit
514
+ // jQuery.merge because push.apply(_, arraylike) throws
515
+ jQuery.merge( scripts, getAll( node, "script" ) );
516
+ }
517
+ }
518
+
519
+ callback.call( this[ i ], node, i );
520
+ }
521
+
522
+ if ( hasScripts ) {
523
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
524
+
525
+ // Reenable scripts
526
+ jQuery.map( scripts, restoreScript );
527
+
528
+ // Evaluate executable scripts on first document insertion
529
+ for ( i = 0; i < hasScripts; i++ ) {
530
+ node = scripts[ i ];
531
+ if ( rscriptType.test( node.type || "" ) &&
532
+ !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
533
+
534
+ if ( node.src ) {
535
+ // Optional AJAX dependency, but won't run scripts if not present
536
+ if ( jQuery._evalUrl ) {
537
+ jQuery._evalUrl( node.src );
538
+ }
539
+ } else {
540
+ jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
541
+ }
542
+ }
543
+ }
544
+ }
545
+ }
546
+ }
547
+
548
+ return this;
549
+ }
550
+ });
551
+
552
+ jQuery.each({
553
+ appendTo: "append",
554
+ prependTo: "prepend",
555
+ insertBefore: "before",
556
+ insertAfter: "after",
557
+ replaceAll: "replaceWith"
558
+ }, function( name, original ) {
559
+ jQuery.fn[ name ] = function( selector ) {
560
+ var elems,
561
+ ret = [],
562
+ insert = jQuery( selector ),
563
+ last = insert.length - 1,
564
+ i = 0;
565
+
566
+ for ( ; i <= last; i++ ) {
567
+ elems = i === last ? this : this.clone( true );
568
+ jQuery( insert[ i ] )[ original ]( elems );
569
+
570
+ // Support: QtWebKit
571
+ // .get() because push.apply(_, arraylike) throws
572
+ push.apply( ret, elems.get() );
573
+ }
574
+
575
+ return this.pushStack( ret );
576
+ };
577
+ });
578
+
579
+ return jQuery;
580
+ });