spiderfw 0.6.38 → 0.6.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (515) hide show
  1. checksums.yaml +13 -5
  2. data/CHANGELOG +23 -0
  3. data/VERSION +1 -1
  4. data/apps/core/admin/views/admin.layout.shtml +6 -0
  5. data/apps/core/auth/controllers/login_controller.rb +1 -1
  6. data/apps/core/components/assets.rb +55 -6
  7. data/apps/core/components/public/bootstrap/scss/_variables.scss +5 -2
  8. data/apps/core/components/public/bootstrap/scss/bootstrap.css +942 -236
  9. data/apps/core/components/public/bootstrap/scss/responsive.css +187 -30
  10. data/apps/core/components/public/css/tinymce/skins/lightgray/AbsoluteLayout.less +17 -0
  11. data/apps/core/components/public/css/tinymce/skins/lightgray/Animations.less +10 -0
  12. data/apps/core/components/public/css/tinymce/skins/lightgray/Button.less +172 -0
  13. data/apps/core/components/public/css/tinymce/skins/lightgray/ButtonGroup.less +71 -0
  14. data/apps/core/components/public/css/tinymce/skins/lightgray/Checkbox.less +49 -0
  15. data/apps/core/components/public/css/tinymce/skins/lightgray/ColorBox.less +6 -0
  16. data/apps/core/components/public/css/tinymce/skins/lightgray/ColorButton.less +72 -0
  17. data/apps/core/components/public/css/tinymce/skins/lightgray/ColorPicker.less +80 -0
  18. data/apps/core/components/public/css/tinymce/skins/lightgray/ComboBox.less +39 -0
  19. data/apps/core/components/public/css/tinymce/skins/lightgray/Container.less +9 -0
  20. data/apps/core/components/public/css/tinymce/skins/lightgray/Content.Inline.less +4 -0
  21. data/apps/core/components/public/css/tinymce/skins/lightgray/Content.Objects.less +166 -0
  22. data/apps/core/components/public/css/tinymce/skins/lightgray/Content.less +27 -0
  23. data/apps/core/components/public/css/tinymce/skins/lightgray/CropRect.less +54 -0
  24. data/apps/core/components/public/css/tinymce/skins/lightgray/FieldSet.less +15 -0
  25. data/apps/core/components/public/css/tinymce/skins/lightgray/FitLayout.less +9 -0
  26. data/apps/core/components/public/css/tinymce/skins/lightgray/FloatPanel.less +69 -0
  27. data/apps/core/components/public/css/tinymce/skins/lightgray/FlowLayout.less +36 -0
  28. data/apps/core/components/public/css/tinymce/skins/lightgray/Icons.Ie7.less +136 -0
  29. data/apps/core/components/public/css/tinymce/skins/lightgray/Icons.less +180 -0
  30. data/apps/core/components/public/css/tinymce/skins/lightgray/Iframe.less +6 -0
  31. data/apps/core/components/public/css/tinymce/skins/lightgray/ImagePanel.less +20 -0
  32. data/apps/core/components/public/css/tinymce/skins/lightgray/InfoBox.less +71 -0
  33. data/apps/core/components/public/css/tinymce/skins/lightgray/Label.less +38 -0
  34. data/apps/core/components/public/css/tinymce/skins/lightgray/ListBox.less +26 -0
  35. data/apps/core/components/public/css/tinymce/skins/lightgray/Menu.less +34 -0
  36. data/apps/core/components/public/css/tinymce/skins/lightgray/MenuBar.less +32 -0
  37. data/apps/core/components/public/css/tinymce/skins/lightgray/MenuButton.less +34 -0
  38. data/apps/core/components/public/css/tinymce/skins/lightgray/MenuItem.less +142 -0
  39. data/apps/core/components/public/css/tinymce/skins/lightgray/Mixins.less +54 -0
  40. data/apps/core/components/public/css/tinymce/skins/lightgray/Notification.less +144 -0
  41. data/apps/core/components/public/css/tinymce/skins/lightgray/Panel.less +7 -0
  42. data/apps/core/components/public/css/tinymce/skins/lightgray/Path.less +45 -0
  43. data/apps/core/components/public/css/tinymce/skins/lightgray/Progress.less +34 -0
  44. data/apps/core/components/public/css/tinymce/skins/lightgray/Radio.less +1 -0
  45. data/apps/core/components/public/css/tinymce/skins/lightgray/Reset.less +32 -0
  46. data/apps/core/components/public/css/tinymce/skins/lightgray/ResizeHandle.less +18 -0
  47. data/apps/core/components/public/css/tinymce/skins/lightgray/Scrollable.less +44 -0
  48. data/apps/core/components/public/css/tinymce/skins/lightgray/SelectBox.less +6 -0
  49. data/apps/core/components/public/css/tinymce/skins/lightgray/Slider.less +29 -0
  50. data/apps/core/components/public/css/tinymce/skins/lightgray/Spacer.less +5 -0
  51. data/apps/core/components/public/css/tinymce/skins/lightgray/SplitButton.less +49 -0
  52. data/apps/core/components/public/css/tinymce/skins/lightgray/StackLayout.less +5 -0
  53. data/apps/core/components/public/css/tinymce/skins/lightgray/TabPanel.less +44 -0
  54. data/apps/core/components/public/css/tinymce/skins/lightgray/TextBox.less +41 -0
  55. data/apps/core/components/public/css/tinymce/skins/lightgray/Throbber.less +19 -0
  56. data/apps/core/components/public/css/tinymce/skins/lightgray/TinyMCE.less +159 -0
  57. data/apps/core/components/public/css/tinymce/skins/lightgray/ToolTip.less +129 -0
  58. data/apps/core/components/public/css/tinymce/skins/lightgray/Variables.less +214 -0
  59. data/apps/core/components/public/css/tinymce/skins/lightgray/Window.less +127 -0
  60. data/apps/core/components/public/css/tinymce/skins/lightgray/content.inline.min.css +1 -0
  61. data/apps/core/components/public/css/tinymce/skins/lightgray/content.min.css +1 -0
  62. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/readme.md +1 -0
  63. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
  64. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.json +1277 -0
  65. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.svg +63 -0
  66. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  67. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
  68. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  69. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.json +3381 -0
  70. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.svg +129 -0
  71. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  72. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  73. data/apps/core/components/public/css/tinymce/skins/lightgray/img/anchor.gif +0 -0
  74. data/apps/core/components/public/css/tinymce/skins/lightgray/img/loader.gif +0 -0
  75. data/apps/core/components/public/css/tinymce/skins/lightgray/img/object.gif +0 -0
  76. data/apps/core/components/public/css/tinymce/skins/lightgray/img/trans.gif +0 -0
  77. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.dev.less +46 -0
  78. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.ie7.dev.less +46 -0
  79. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.ie7.less +2542 -0
  80. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
  81. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.less +2586 -0
  82. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.min.css +1 -0
  83. data/apps/core/components/public/js/bootbox_2/bootbox.js +551 -0
  84. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-it-min.js +4 -0
  85. data/apps/core/components/public/js/spider.js +7 -3
  86. data/apps/core/components/public/js/tinymce/classes/AddOnManager.js +265 -0
  87. data/apps/core/components/public/js/tinymce/classes/Compat.js +90 -0
  88. data/apps/core/components/public/js/tinymce/classes/DragDropOverrides.js +224 -0
  89. data/apps/core/components/public/js/tinymce/classes/Editor.js +2221 -0
  90. data/apps/core/components/public/js/tinymce/classes/EditorCommands.js +1028 -0
  91. data/apps/core/components/public/js/tinymce/classes/EditorManager.js +715 -0
  92. data/apps/core/components/public/js/tinymce/classes/EditorObservable.js +204 -0
  93. data/apps/core/components/public/js/tinymce/classes/EditorUpload.js +191 -0
  94. data/apps/core/components/public/js/tinymce/classes/EnterKey.js +676 -0
  95. data/apps/core/components/public/js/tinymce/classes/Env.js +177 -0
  96. data/apps/core/components/public/js/tinymce/classes/FocusManager.js +266 -0
  97. data/apps/core/components/public/js/tinymce/classes/ForceBlocks.js +138 -0
  98. data/apps/core/components/public/js/tinymce/classes/Formatter.js +2378 -0
  99. data/apps/core/components/public/js/tinymce/classes/LegacyInput.js +82 -0
  100. data/apps/core/components/public/js/tinymce/classes/Mode.js +54 -0
  101. data/apps/core/components/public/js/tinymce/classes/NodeChange.js +154 -0
  102. data/apps/core/components/public/js/tinymce/classes/NotificationManager.js +156 -0
  103. data/apps/core/components/public/js/tinymce/classes/Register.js +34 -0
  104. data/apps/core/components/public/js/tinymce/classes/SelectionOverrides.js +810 -0
  105. data/apps/core/components/public/js/tinymce/classes/Shortcuts.js +172 -0
  106. data/apps/core/components/public/js/tinymce/classes/UndoManager.js +346 -0
  107. data/apps/core/components/public/js/tinymce/classes/WindowManager.js +278 -0
  108. data/apps/core/components/public/js/tinymce/classes/caret/CaretBookmark.js +263 -0
  109. data/apps/core/components/public/js/tinymce/classes/caret/CaretCandidate.js +86 -0
  110. data/apps/core/components/public/js/tinymce/classes/caret/CaretContainer.js +151 -0
  111. data/apps/core/components/public/js/tinymce/classes/caret/CaretPosition.js +371 -0
  112. data/apps/core/components/public/js/tinymce/classes/caret/CaretUtils.js +302 -0
  113. data/apps/core/components/public/js/tinymce/classes/caret/CaretWalker.js +215 -0
  114. data/apps/core/components/public/js/tinymce/classes/caret/FakeCaret.js +192 -0
  115. data/apps/core/components/public/js/tinymce/classes/caret/LineUtils.js +135 -0
  116. data/apps/core/components/public/js/tinymce/classes/caret/LineWalker.js +166 -0
  117. data/apps/core/components/public/js/tinymce/classes/data/Binding.js +79 -0
  118. data/apps/core/components/public/js/tinymce/classes/data/ObservableArray.js +196 -0
  119. data/apps/core/components/public/js/tinymce/classes/data/ObservableObject.js +194 -0
  120. data/apps/core/components/public/js/tinymce/classes/dom/BookmarkManager.js +456 -0
  121. data/apps/core/components/public/js/tinymce/classes/dom/ControlSelection.js +634 -0
  122. data/apps/core/components/public/js/tinymce/classes/dom/DOMUtils.js +1853 -0
  123. data/apps/core/components/public/js/tinymce/classes/dom/Dimensions.js +64 -0
  124. data/apps/core/components/public/js/tinymce/classes/dom/DomQuery.js +1578 -0
  125. data/apps/core/components/public/js/tinymce/classes/dom/ElementUtils.js +118 -0
  126. data/apps/core/components/public/js/tinymce/classes/dom/EventUtils.js +583 -0
  127. data/apps/core/components/public/js/tinymce/classes/dom/NodePath.js +50 -0
  128. data/apps/core/components/public/js/tinymce/classes/dom/NodeType.js +110 -0
  129. data/apps/core/components/public/js/tinymce/classes/dom/Range.js +785 -0
  130. data/apps/core/components/public/js/tinymce/classes/dom/RangeUtils.js +628 -0
  131. data/apps/core/components/public/js/tinymce/classes/dom/ScriptLoader.js +254 -0
  132. data/apps/core/components/public/js/tinymce/classes/dom/Selection.js +1008 -0
  133. data/apps/core/components/public/js/tinymce/classes/dom/Serializer.js +506 -0
  134. data/apps/core/components/public/js/tinymce/classes/dom/Sizzle.jQuery.js +23 -0
  135. data/apps/core/components/public/js/tinymce/classes/dom/Sizzle.js +2039 -0
  136. data/apps/core/components/public/js/tinymce/classes/dom/StyleSheetLoader.js +190 -0
  137. data/apps/core/components/public/js/tinymce/classes/dom/TreeWalker.js +127 -0
  138. data/apps/core/components/public/js/tinymce/classes/dom/TridentSelection.js +508 -0
  139. data/apps/core/components/public/js/tinymce/classes/file/BlobCache.js +72 -0
  140. data/apps/core/components/public/js/tinymce/classes/file/Conversions.js +106 -0
  141. data/apps/core/components/public/js/tinymce/classes/file/ImageScanner.js +145 -0
  142. data/apps/core/components/public/js/tinymce/classes/file/Uploader.js +193 -0
  143. data/apps/core/components/public/js/tinymce/classes/fmt/Hooks.js +66 -0
  144. data/apps/core/components/public/js/tinymce/classes/fmt/Preview.js +151 -0
  145. data/apps/core/components/public/js/tinymce/classes/geom/ClientRect.js +136 -0
  146. data/apps/core/components/public/js/tinymce/classes/geom/Rect.js +214 -0
  147. data/apps/core/components/public/js/tinymce/classes/html/DomParser.js +822 -0
  148. data/apps/core/components/public/js/tinymce/classes/html/Entities.js +268 -0
  149. data/apps/core/components/public/js/tinymce/classes/html/Node.js +496 -0
  150. data/apps/core/components/public/js/tinymce/classes/html/SaxParser.js +474 -0
  151. data/apps/core/components/public/js/tinymce/classes/html/Schema.js +1004 -0
  152. data/apps/core/components/public/js/tinymce/classes/html/Serializer.js +158 -0
  153. data/apps/core/components/public/js/tinymce/classes/html/Styles.js +363 -0
  154. data/apps/core/components/public/js/tinymce/classes/html/Writer.js +199 -0
  155. data/apps/core/components/public/js/tinymce/classes/jquery.tinymce.js +377 -0
  156. data/apps/core/components/public/js/tinymce/classes/text/ExtendingChar.js +53 -0
  157. data/apps/core/components/public/js/tinymce/classes/text/Zwsp.js +36 -0
  158. data/apps/core/components/public/js/tinymce/classes/ui/AbsoluteLayout.js +63 -0
  159. data/apps/core/components/public/js/tinymce/classes/ui/BoxUtils.js +98 -0
  160. data/apps/core/components/public/js/tinymce/classes/ui/Button.js +199 -0
  161. data/apps/core/components/public/js/tinymce/classes/ui/ButtonGroup.js +62 -0
  162. data/apps/core/components/public/js/tinymce/classes/ui/Checkbox.js +162 -0
  163. data/apps/core/components/public/js/tinymce/classes/ui/ClassList.js +149 -0
  164. data/apps/core/components/public/js/tinymce/classes/ui/Collection.js +438 -0
  165. data/apps/core/components/public/js/tinymce/classes/ui/ColorBox.js +72 -0
  166. data/apps/core/components/public/js/tinymce/classes/ui/ColorButton.js +124 -0
  167. data/apps/core/components/public/js/tinymce/classes/ui/ColorPicker.js +206 -0
  168. data/apps/core/components/public/js/tinymce/classes/ui/ComboBox.js +306 -0
  169. data/apps/core/components/public/js/tinymce/classes/ui/Container.js +506 -0
  170. data/apps/core/components/public/js/tinymce/classes/ui/Control.js +1301 -0
  171. data/apps/core/components/public/js/tinymce/classes/ui/DomUtils.js +107 -0
  172. data/apps/core/components/public/js/tinymce/classes/ui/DragHelper.js +144 -0
  173. data/apps/core/components/public/js/tinymce/classes/ui/ElementPath.js +79 -0
  174. data/apps/core/components/public/js/tinymce/classes/ui/Factory.js +105 -0
  175. data/apps/core/components/public/js/tinymce/classes/ui/FieldSet.js +59 -0
  176. data/apps/core/components/public/js/tinymce/classes/ui/FilePicker.js +85 -0
  177. data/apps/core/components/public/js/tinymce/classes/ui/FitLayout.js +48 -0
  178. data/apps/core/components/public/js/tinymce/classes/ui/FlexLayout.js +246 -0
  179. data/apps/core/components/public/js/tinymce/classes/ui/FloatPanel.js +409 -0
  180. data/apps/core/components/public/js/tinymce/classes/ui/FlowLayout.js +46 -0
  181. data/apps/core/components/public/js/tinymce/classes/ui/Form.js +157 -0
  182. data/apps/core/components/public/js/tinymce/classes/ui/FormItem.js +56 -0
  183. data/apps/core/components/public/js/tinymce/classes/ui/FormatControls.js +535 -0
  184. data/apps/core/components/public/js/tinymce/classes/ui/GridLayout.js +233 -0
  185. data/apps/core/components/public/js/tinymce/classes/ui/Iframe.js +85 -0
  186. data/apps/core/components/public/js/tinymce/classes/ui/InfoBox.js +93 -0
  187. data/apps/core/components/public/js/tinymce/classes/ui/KeyboardNavigation.js +406 -0
  188. data/apps/core/components/public/js/tinymce/classes/ui/Label.js +144 -0
  189. data/apps/core/components/public/js/tinymce/classes/ui/Layout.js +120 -0
  190. data/apps/core/components/public/js/tinymce/classes/ui/ListBox.js +152 -0
  191. data/apps/core/components/public/js/tinymce/classes/ui/Menu.js +195 -0
  192. data/apps/core/components/public/js/tinymce/classes/ui/MenuBar.js +33 -0
  193. data/apps/core/components/public/js/tinymce/classes/ui/MenuButton.js +268 -0
  194. data/apps/core/components/public/js/tinymce/classes/ui/MenuItem.js +336 -0
  195. data/apps/core/components/public/js/tinymce/classes/ui/MessageBox.js +202 -0
  196. data/apps/core/components/public/js/tinymce/classes/ui/Movable.js +200 -0
  197. data/apps/core/components/public/js/tinymce/classes/ui/Notification.js +154 -0
  198. data/apps/core/components/public/js/tinymce/classes/ui/Panel.js +67 -0
  199. data/apps/core/components/public/js/tinymce/classes/ui/PanelButton.js +114 -0
  200. data/apps/core/components/public/js/tinymce/classes/ui/Path.js +127 -0
  201. data/apps/core/components/public/js/tinymce/classes/ui/Progress.js +81 -0
  202. data/apps/core/components/public/js/tinymce/classes/ui/Radio.js +29 -0
  203. data/apps/core/components/public/js/tinymce/classes/ui/ReflowQueue.js +79 -0
  204. data/apps/core/components/public/js/tinymce/classes/ui/Resizable.js +68 -0
  205. data/apps/core/components/public/js/tinymce/classes/ui/ResizeHandle.js +86 -0
  206. data/apps/core/components/public/js/tinymce/classes/ui/Scrollable.js +141 -0
  207. data/apps/core/components/public/js/tinymce/classes/ui/SelectBox.js +106 -0
  208. data/apps/core/components/public/js/tinymce/classes/ui/Selector.js +369 -0
  209. data/apps/core/components/public/js/tinymce/classes/ui/Slider.js +161 -0
  210. data/apps/core/components/public/js/tinymce/classes/ui/Spacer.js +39 -0
  211. data/apps/core/components/public/js/tinymce/classes/ui/SplitButton.js +146 -0
  212. data/apps/core/components/public/js/tinymce/classes/ui/StackLayout.js +34 -0
  213. data/apps/core/components/public/js/tinymce/classes/ui/TabPanel.js +178 -0
  214. data/apps/core/components/public/js/tinymce/classes/ui/TextBox.js +208 -0
  215. data/apps/core/components/public/js/tinymce/classes/ui/Throbber.js +88 -0
  216. data/apps/core/components/public/js/tinymce/classes/ui/Toolbar.js +56 -0
  217. data/apps/core/components/public/js/tinymce/classes/ui/Tooltip.js +73 -0
  218. data/apps/core/components/public/js/tinymce/classes/ui/Widget.js +151 -0
  219. data/apps/core/components/public/js/tinymce/classes/ui/Window.js +474 -0
  220. data/apps/core/components/public/js/tinymce/classes/util/Arr.js +153 -0
  221. data/apps/core/components/public/js/tinymce/classes/util/Class.js +167 -0
  222. data/apps/core/components/public/js/tinymce/classes/util/Color.js +235 -0
  223. data/apps/core/components/public/js/tinymce/classes/util/Delay.js +191 -0
  224. data/apps/core/components/public/js/tinymce/classes/util/EventDispatcher.js +294 -0
  225. data/apps/core/components/public/js/tinymce/classes/util/Fun.js +87 -0
  226. data/apps/core/components/public/js/tinymce/classes/util/I18n.js +116 -0
  227. data/apps/core/components/public/js/tinymce/classes/util/JSON.js +109 -0
  228. data/apps/core/components/public/js/tinymce/classes/util/JSONP.js +38 -0
  229. data/apps/core/components/public/js/tinymce/classes/util/JSONRequest.js +110 -0
  230. data/apps/core/components/public/js/tinymce/classes/util/LocalStorage.js +213 -0
  231. data/apps/core/components/public/js/tinymce/classes/util/Observable.js +129 -0
  232. data/apps/core/components/public/js/tinymce/classes/util/Promise.js +200 -0
  233. data/apps/core/components/public/js/tinymce/classes/util/Quirks.js +1701 -0
  234. data/apps/core/components/public/js/tinymce/classes/util/Tools.js +442 -0
  235. data/apps/core/components/public/js/tinymce/classes/util/URI.js +411 -0
  236. data/apps/core/components/public/js/tinymce/classes/util/VK.js +37 -0
  237. data/apps/core/components/public/js/tinymce/classes/util/XHR.js +110 -0
  238. data/apps/core/components/public/js/tinymce/jquery.tinymce.min.js +1 -0
  239. data/apps/core/components/public/js/tinymce/langs/it.js +219 -0
  240. data/apps/core/components/public/js/tinymce/langs/readme.md +3 -0
  241. data/apps/core/components/public/js/tinymce/license.txt +504 -0
  242. data/apps/core/components/public/js/tinymce/plugins/advlist/plugin.js +97 -0
  243. data/apps/core/components/public/js/tinymce/plugins/advlist/plugin.min.js +1 -0
  244. data/apps/core/components/public/js/tinymce/plugins/anchor/plugin.js +55 -0
  245. data/apps/core/components/public/js/tinymce/plugins/anchor/plugin.min.js +1 -0
  246. data/apps/core/components/public/js/tinymce/plugins/autolink/plugin.js +204 -0
  247. data/apps/core/components/public/js/tinymce/plugins/autolink/plugin.min.js +1 -0
  248. data/apps/core/components/public/js/tinymce/plugins/autoresize/plugin.js +162 -0
  249. data/apps/core/components/public/js/tinymce/plugins/autoresize/plugin.min.js +1 -0
  250. data/apps/core/components/public/js/tinymce/plugins/autosave/plugin.js +165 -0
  251. data/apps/core/components/public/js/tinymce/plugins/autosave/plugin.min.js +1 -0
  252. data/apps/core/components/public/js/tinymce/plugins/bbcode/plugin.js +123 -0
  253. data/apps/core/components/public/js/tinymce/plugins/bbcode/plugin.min.js +1 -0
  254. data/apps/core/components/public/js/tinymce/plugins/charmap/plugin.js +450 -0
  255. data/apps/core/components/public/js/tinymce/plugins/charmap/plugin.min.js +1 -0
  256. data/apps/core/components/public/js/tinymce/plugins/code/plugin.js +60 -0
  257. data/apps/core/components/public/js/tinymce/plugins/code/plugin.min.js +1 -0
  258. data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Dialog.js +121 -0
  259. data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Plugin.js +95 -0
  260. data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Prism.js +937 -0
  261. data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Utils.js +33 -0
  262. data/apps/core/components/public/js/tinymce/plugins/codesample/css/prism.css +138 -0
  263. data/apps/core/components/public/js/tinymce/plugins/codesample/plugin.dev.js +141 -0
  264. data/apps/core/components/public/js/tinymce/plugins/codesample/plugin.js +1299 -0
  265. data/apps/core/components/public/js/tinymce/plugins/codesample/plugin.min.js +1 -0
  266. data/apps/core/components/public/js/tinymce/plugins/colorpicker/plugin.js +112 -0
  267. data/apps/core/components/public/js/tinymce/plugins/colorpicker/plugin.min.js +1 -0
  268. data/apps/core/components/public/js/tinymce/plugins/compat3x/css/dialog.css +118 -0
  269. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/buttons.png +0 -0
  270. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/icons.gif +0 -0
  271. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/items.gif +0 -0
  272. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/menu_arrow.gif +0 -0
  273. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/menu_check.gif +0 -0
  274. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/progress.gif +0 -0
  275. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/tabs.gif +0 -0
  276. data/apps/core/components/public/js/tinymce/plugins/compat3x/plugin.js +297 -0
  277. data/apps/core/components/public/js/tinymce/plugins/compat3x/plugin.min.js +1 -0
  278. data/apps/core/components/public/js/tinymce/plugins/compat3x/tiny_mce_popup.js +542 -0
  279. data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/editable_selects.js +70 -0
  280. data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/form_utils.js +210 -0
  281. data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/mctabs.js +164 -0
  282. data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/validate.js +252 -0
  283. data/apps/core/components/public/js/tinymce/plugins/contextmenu/plugin.js +88 -0
  284. data/apps/core/components/public/js/tinymce/plugins/contextmenu/plugin.min.js +1 -0
  285. data/apps/core/components/public/js/tinymce/plugins/directionality/plugin.js +64 -0
  286. data/apps/core/components/public/js/tinymce/plugins/directionality/plugin.min.js +1 -0
  287. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
  288. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
  289. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
  290. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
  291. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
  292. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
  293. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
  294. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
  295. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
  296. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
  297. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
  298. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
  299. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
  300. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
  301. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
  302. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
  303. data/apps/core/components/public/js/tinymce/plugins/emoticons/plugin.js +65 -0
  304. data/apps/core/components/public/js/tinymce/plugins/emoticons/plugin.min.js +1 -0
  305. data/apps/core/components/public/js/tinymce/plugins/example/dialog.html +8 -0
  306. data/apps/core/components/public/js/tinymce/plugins/example/plugin.js +68 -0
  307. data/apps/core/components/public/js/tinymce/plugins/example/plugin.min.js +1 -0
  308. data/apps/core/components/public/js/tinymce/plugins/example_dependency/plugin.js +22 -0
  309. data/apps/core/components/public/js/tinymce/plugins/example_dependency/plugin.min.js +1 -0
  310. data/apps/core/components/public/js/tinymce/plugins/fullpage/plugin.js +490 -0
  311. data/apps/core/components/public/js/tinymce/plugins/fullpage/plugin.min.js +1 -0
  312. data/apps/core/components/public/js/tinymce/plugins/fullscreen/plugin.js +154 -0
  313. data/apps/core/components/public/js/tinymce/plugins/fullscreen/plugin.min.js +1 -0
  314. data/apps/core/components/public/js/tinymce/plugins/hr/plugin.js +30 -0
  315. data/apps/core/components/public/js/tinymce/plugins/hr/plugin.min.js +1 -0
  316. data/apps/core/components/public/js/tinymce/plugins/image/plugin.js +630 -0
  317. data/apps/core/components/public/js/tinymce/plugins/image/plugin.min.js +1 -0
  318. data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/atomic.js +6 -0
  319. data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/browser.js +6 -0
  320. data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/demo.js +8 -0
  321. data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/prod.js +6 -0
  322. data/apps/core/components/public/js/tinymce/plugins/imagetools/plugin.js +2668 -0
  323. data/apps/core/components/public/js/tinymce/plugins/imagetools/plugin.min.js +1 -0
  324. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/demo/html/demo.html +16 -0
  325. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/demo/js/Demo.js +92 -0
  326. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/CropRect.js +214 -0
  327. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/Dialog.js +485 -0
  328. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/ImagePanel.js +218 -0
  329. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/Plugin.js +411 -0
  330. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/UndoStack.js +57 -0
  331. data/apps/core/components/public/js/tinymce/plugins/importcss/plugin.js +227 -0
  332. data/apps/core/components/public/js/tinymce/plugins/importcss/plugin.min.js +1 -0
  333. data/apps/core/components/public/js/tinymce/plugins/insertdatetime/plugin.js +121 -0
  334. data/apps/core/components/public/js/tinymce/plugins/insertdatetime/plugin.min.js +1 -0
  335. data/apps/core/components/public/js/tinymce/plugins/layer/plugin.js +225 -0
  336. data/apps/core/components/public/js/tinymce/plugins/layer/plugin.min.js +1 -0
  337. data/apps/core/components/public/js/tinymce/plugins/legacyoutput/plugin.js +211 -0
  338. data/apps/core/components/public/js/tinymce/plugins/legacyoutput/plugin.min.js +1 -0
  339. data/apps/core/components/public/js/tinymce/plugins/link/plugin.js +403 -0
  340. data/apps/core/components/public/js/tinymce/plugins/link/plugin.min.js +1 -0
  341. data/apps/core/components/public/js/tinymce/plugins/lists/plugin.js +885 -0
  342. data/apps/core/components/public/js/tinymce/plugins/lists/plugin.min.js +1 -0
  343. data/apps/core/components/public/js/tinymce/plugins/media/moxieplayer.swf +0 -0
  344. data/apps/core/components/public/js/tinymce/plugins/media/plugin.js +878 -0
  345. data/apps/core/components/public/js/tinymce/plugins/media/plugin.min.js +1 -0
  346. data/apps/core/components/public/js/tinymce/plugins/nonbreaking/plugin.js +53 -0
  347. data/apps/core/components/public/js/tinymce/plugins/nonbreaking/plugin.min.js +1 -0
  348. data/apps/core/components/public/js/tinymce/plugins/noneditable/plugin.js +101 -0
  349. data/apps/core/components/public/js/tinymce/plugins/noneditable/plugin.min.js +1 -0
  350. data/apps/core/components/public/js/tinymce/plugins/pagebreak/plugin.js +88 -0
  351. data/apps/core/components/public/js/tinymce/plugins/pagebreak/plugin.min.js +1 -0
  352. data/apps/core/components/public/js/tinymce/plugins/paste/classes/Clipboard.js +672 -0
  353. data/apps/core/components/public/js/tinymce/plugins/paste/classes/Plugin.js +121 -0
  354. data/apps/core/components/public/js/tinymce/plugins/paste/classes/Quirks.js +159 -0
  355. data/apps/core/components/public/js/tinymce/plugins/paste/classes/Utils.js +140 -0
  356. data/apps/core/components/public/js/tinymce/plugins/paste/classes/WordFilter.js +500 -0
  357. data/apps/core/components/public/js/tinymce/plugins/paste/plugin.dev.js +142 -0
  358. data/apps/core/components/public/js/tinymce/plugins/paste/plugin.js +1708 -0
  359. data/apps/core/components/public/js/tinymce/plugins/paste/plugin.min.js +1 -0
  360. data/apps/core/components/public/js/tinymce/plugins/preview/plugin.js +88 -0
  361. data/apps/core/components/public/js/tinymce/plugins/preview/plugin.min.js +1 -0
  362. data/apps/core/components/public/js/tinymce/plugins/print/plugin.js +32 -0
  363. data/apps/core/components/public/js/tinymce/plugins/print/plugin.min.js +1 -0
  364. data/apps/core/components/public/js/tinymce/plugins/save/plugin.js +98 -0
  365. data/apps/core/components/public/js/tinymce/plugins/save/plugin.min.js +1 -0
  366. data/apps/core/components/public/js/tinymce/plugins/searchreplace/plugin.js +609 -0
  367. data/apps/core/components/public/js/tinymce/plugins/searchreplace/plugin.min.js +1 -0
  368. data/apps/core/components/public/js/tinymce/plugins/spellchecker/classes/DomTextMatcher.js +480 -0
  369. data/apps/core/components/public/js/tinymce/plugins/spellchecker/classes/Plugin.js +439 -0
  370. data/apps/core/components/public/js/tinymce/plugins/spellchecker/plugin.dev.js +139 -0
  371. data/apps/core/components/public/js/tinymce/plugins/spellchecker/plugin.js +1026 -0
  372. data/apps/core/components/public/js/tinymce/plugins/spellchecker/plugin.min.js +1 -0
  373. data/apps/core/components/public/js/tinymce/plugins/tabfocus/plugin.js +120 -0
  374. data/apps/core/components/public/js/tinymce/plugins/tabfocus/plugin.min.js +1 -0
  375. data/apps/core/components/public/js/tinymce/plugins/table/classes/CellSelection.js +202 -0
  376. data/apps/core/components/public/js/tinymce/plugins/table/classes/Dialogs.js +824 -0
  377. data/apps/core/components/public/js/tinymce/plugins/table/classes/Plugin.js +599 -0
  378. data/apps/core/components/public/js/tinymce/plugins/table/classes/Quirks.js +400 -0
  379. data/apps/core/components/public/js/tinymce/plugins/table/classes/ResizeBars.js +984 -0
  380. data/apps/core/components/public/js/tinymce/plugins/table/classes/TableGrid.js +941 -0
  381. data/apps/core/components/public/js/tinymce/plugins/table/classes/Utils.js +36 -0
  382. data/apps/core/components/public/js/tinymce/plugins/table/plugin.dev.js +142 -0
  383. data/apps/core/components/public/js/tinymce/plugins/table/plugin.js +4106 -0
  384. data/apps/core/components/public/js/tinymce/plugins/table/plugin.min.js +2 -0
  385. data/apps/core/components/public/js/tinymce/plugins/template/plugin.js +270 -0
  386. data/apps/core/components/public/js/tinymce/plugins/template/plugin.min.js +1 -0
  387. data/apps/core/components/public/js/tinymce/plugins/textcolor/plugin.js +282 -0
  388. data/apps/core/components/public/js/tinymce/plugins/textcolor/plugin.min.js +1 -0
  389. data/apps/core/components/public/js/tinymce/plugins/textpattern/plugin.js +268 -0
  390. data/apps/core/components/public/js/tinymce/plugins/textpattern/plugin.min.js +1 -0
  391. data/apps/core/components/public/js/tinymce/plugins/visualblocks/css/visualblocks.css +135 -0
  392. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/address.gif +0 -0
  393. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/article.gif +0 -0
  394. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/aside.gif +0 -0
  395. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/blockquote.gif +0 -0
  396. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/div.gif +0 -0
  397. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/dl.gif +0 -0
  398. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/figure.gif +0 -0
  399. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h1.gif +0 -0
  400. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h2.gif +0 -0
  401. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h3.gif +0 -0
  402. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h4.gif +0 -0
  403. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h5.gif +0 -0
  404. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h6.gif +0 -0
  405. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/hgroup.gif +0 -0
  406. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/ol.gif +0 -0
  407. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/p.gif +0 -0
  408. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/pre.gif +0 -0
  409. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/section.gif +0 -0
  410. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/ul.gif +0 -0
  411. data/apps/core/components/public/js/tinymce/plugins/visualblocks/plugin.js +86 -0
  412. data/apps/core/components/public/js/tinymce/plugins/visualblocks/plugin.min.js +1 -0
  413. data/apps/core/components/public/js/tinymce/plugins/visualchars/plugin.js +123 -0
  414. data/apps/core/components/public/js/tinymce/plugins/visualchars/plugin.min.js +1 -0
  415. data/apps/core/components/public/js/tinymce/plugins/wordcount/plugin.js +69 -0
  416. data/apps/core/components/public/js/tinymce/plugins/wordcount/plugin.min.js +1 -0
  417. data/apps/core/components/public/js/tinymce/skins/lightgray/AbsoluteLayout.less +17 -0
  418. data/apps/core/components/public/js/tinymce/skins/lightgray/Animations.less +10 -0
  419. data/apps/core/components/public/js/tinymce/skins/lightgray/Button.less +172 -0
  420. data/apps/core/components/public/js/tinymce/skins/lightgray/ButtonGroup.less +71 -0
  421. data/apps/core/components/public/js/tinymce/skins/lightgray/Checkbox.less +49 -0
  422. data/apps/core/components/public/js/tinymce/skins/lightgray/ColorBox.less +6 -0
  423. data/apps/core/components/public/js/tinymce/skins/lightgray/ColorButton.less +72 -0
  424. data/apps/core/components/public/js/tinymce/skins/lightgray/ColorPicker.less +80 -0
  425. data/apps/core/components/public/js/tinymce/skins/lightgray/ComboBox.less +39 -0
  426. data/apps/core/components/public/js/tinymce/skins/lightgray/Container.less +9 -0
  427. data/apps/core/components/public/js/tinymce/skins/lightgray/Content.Inline.less +4 -0
  428. data/apps/core/components/public/js/tinymce/skins/lightgray/Content.Objects.less +166 -0
  429. data/apps/core/components/public/js/tinymce/skins/lightgray/Content.less +27 -0
  430. data/apps/core/components/public/js/tinymce/skins/lightgray/CropRect.less +54 -0
  431. data/apps/core/components/public/js/tinymce/skins/lightgray/FieldSet.less +15 -0
  432. data/apps/core/components/public/js/tinymce/skins/lightgray/FitLayout.less +9 -0
  433. data/apps/core/components/public/js/tinymce/skins/lightgray/FloatPanel.less +69 -0
  434. data/apps/core/components/public/js/tinymce/skins/lightgray/FlowLayout.less +36 -0
  435. data/apps/core/components/public/js/tinymce/skins/lightgray/Icons.Ie7.less +136 -0
  436. data/apps/core/components/public/js/tinymce/skins/lightgray/Icons.less +180 -0
  437. data/apps/core/components/public/js/tinymce/skins/lightgray/Iframe.less +6 -0
  438. data/apps/core/components/public/js/tinymce/skins/lightgray/ImagePanel.less +20 -0
  439. data/apps/core/components/public/js/tinymce/skins/lightgray/InfoBox.less +71 -0
  440. data/apps/core/components/public/js/tinymce/skins/lightgray/Label.less +38 -0
  441. data/apps/core/components/public/js/tinymce/skins/lightgray/ListBox.less +26 -0
  442. data/apps/core/components/public/js/tinymce/skins/lightgray/Menu.less +34 -0
  443. data/apps/core/components/public/js/tinymce/skins/lightgray/MenuBar.less +32 -0
  444. data/apps/core/components/public/js/tinymce/skins/lightgray/MenuButton.less +34 -0
  445. data/apps/core/components/public/js/tinymce/skins/lightgray/MenuItem.less +142 -0
  446. data/apps/core/components/public/js/tinymce/skins/lightgray/Mixins.less +54 -0
  447. data/apps/core/components/public/js/tinymce/skins/lightgray/Notification.less +144 -0
  448. data/apps/core/components/public/js/tinymce/skins/lightgray/Panel.less +7 -0
  449. data/apps/core/components/public/js/tinymce/skins/lightgray/Path.less +45 -0
  450. data/apps/core/components/public/js/tinymce/skins/lightgray/Progress.less +34 -0
  451. data/apps/core/components/public/js/tinymce/skins/lightgray/Radio.less +1 -0
  452. data/apps/core/components/public/js/tinymce/skins/lightgray/Reset.less +32 -0
  453. data/apps/core/components/public/js/tinymce/skins/lightgray/ResizeHandle.less +18 -0
  454. data/apps/core/components/public/js/tinymce/skins/lightgray/Scrollable.less +44 -0
  455. data/apps/core/components/public/js/tinymce/skins/lightgray/SelectBox.less +6 -0
  456. data/apps/core/components/public/js/tinymce/skins/lightgray/Slider.less +29 -0
  457. data/apps/core/components/public/js/tinymce/skins/lightgray/Spacer.less +5 -0
  458. data/apps/core/components/public/js/tinymce/skins/lightgray/SplitButton.less +49 -0
  459. data/apps/core/components/public/js/tinymce/skins/lightgray/StackLayout.less +5 -0
  460. data/apps/core/components/public/js/tinymce/skins/lightgray/TabPanel.less +44 -0
  461. data/apps/core/components/public/js/tinymce/skins/lightgray/TextBox.less +41 -0
  462. data/apps/core/components/public/js/tinymce/skins/lightgray/Throbber.less +19 -0
  463. data/apps/core/components/public/js/tinymce/skins/lightgray/TinyMCE.less +159 -0
  464. data/apps/core/components/public/js/tinymce/skins/lightgray/ToolTip.less +129 -0
  465. data/apps/core/components/public/js/tinymce/skins/lightgray/Variables.less +214 -0
  466. data/apps/core/components/public/js/tinymce/skins/lightgray/Window.less +127 -0
  467. data/apps/core/components/public/js/tinymce/skins/lightgray/content.inline.min.css +1 -0
  468. data/apps/core/components/public/js/tinymce/skins/lightgray/content.min.css +1 -0
  469. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/readme.md +1 -0
  470. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
  471. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.json +1277 -0
  472. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.svg +63 -0
  473. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  474. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
  475. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  476. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.json +3381 -0
  477. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.svg +129 -0
  478. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  479. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  480. data/apps/core/components/public/js/tinymce/skins/lightgray/img/anchor.gif +0 -0
  481. data/apps/core/components/public/js/tinymce/skins/lightgray/img/loader.gif +0 -0
  482. data/apps/core/components/public/js/tinymce/skins/lightgray/img/object.gif +0 -0
  483. data/apps/core/components/public/js/tinymce/skins/lightgray/img/trans.gif +0 -0
  484. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.dev.less +46 -0
  485. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.ie7.dev.less +46 -0
  486. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.ie7.less +2542 -0
  487. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
  488. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.less +2586 -0
  489. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.min.css +1 -0
  490. data/apps/core/components/public/js/tinymce/themes/modern/theme.js +878 -0
  491. data/apps/core/components/public/js/tinymce/themes/modern/theme.min.js +1 -0
  492. data/apps/core/components/public/js/tinymce/tinymce.dev.js +286 -0
  493. data/apps/core/components/public/js/tinymce/tinymce.js +45811 -0
  494. data/apps/core/components/public/js/tinymce/tinymce.min.js +13 -0
  495. data/apps/core/forms/widgets/form/form.rb +3 -1
  496. data/apps/core/forms/widgets/form/form.shtml +1 -0
  497. data/apps/core/forms/widgets/inputs/search_select/search_select.rb +1 -1
  498. data/apps/core/forms/widgets/inputs/select/select.rb +1 -1
  499. data/apps/core/forms/widgets/inputs/select/select.shtml +0 -1
  500. data/apps/messenger/backends/sms/skebby.rb +1 -1
  501. data/apps/messenger/controllers/mixins/messenger_helper.rb +23 -5
  502. data/lib/spiderfw/config/options/spider.rb +1 -1
  503. data/lib/spiderfw/controller/mixins/visual.rb +2 -0
  504. data/lib/spiderfw/http/adapters/rack.rb +10 -5
  505. data/lib/spiderfw/http/http.rb +4 -2
  506. data/lib/spiderfw/model/base_model.rb +4 -4
  507. data/lib/spiderfw/model/mappers/db_mapper.rb +4 -2
  508. data/lib/spiderfw/model/storage/db/adapters/mysql.rb +2 -1
  509. data/lib/spiderfw/model/storage/db/db_storage.rb +4 -0
  510. data/lib/spiderfw/spider.rb +6 -0
  511. data/lib/spiderfw/templates/layout.rb +1 -1
  512. data/lib/spiderfw/utils/monkey/object.rb +3 -0
  513. data/spider.gemspec +6 -2
  514. metadata +539 -42
  515. data/blueprints/.DS_Store +0 -0
@@ -0,0 +1 @@
1
+ tinymce.PluginManager.add("charmap",function(a){function b(){return[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["221","Y - acute"],["376","Y - diaeresis"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]]}function c(a){return tinymce.util.Tools.grep(a,function(a){return i(a)&&2==a.length})}function d(a){return i(a)?[].concat(c(a)):"function"==typeof a?a():[]}function e(b){var c=a.settings;return c.charmap&&(b=d(c.charmap)),c.charmap_append?[].concat(b).concat(d(c.charmap_append)):b}function f(){return e(b())}function g(b){a.fire("insertCustomChar",{chr:b}).chr,a.execCommand("mceInsertContent",!1,b)}function h(){function b(a){for(;a;){if("TD"==a.nodeName)return a;a=a.parentNode}}var c,d,e,h;c='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';var i=f(),j=Math.min(i.length,25),k=Math.ceil(i.length/j);for(e=0;k>e;e++){for(c+="<tr>",d=0;j>d;d++){var l=e*j+d;if(l<i.length){var m=i[l];c+='<td title="'+m[1]+'"><div tabindex="-1" title="'+m[1]+'" role="button">'+(m?String.fromCharCode(parseInt(m[0],10)):"&nbsp;")+"</div></td>"}else c+="<td />"}c+="</tr>"}c+="</tbody></table>";var n={type:"container",html:c,onclick:function(a){var c=a.target;/^(TD|DIV)$/.test(c.nodeName)&&b(c).firstChild&&(g(tinymce.trim(c.innerText||c.textContent)),a.ctrlKey||h.close())},onmouseover:function(a){var c=b(a.target);c&&c.firstChild?(h.find("#preview").text(c.firstChild.firstChild.data),h.find("#previewTitle").text(c.title)):(h.find("#preview").text(" "),h.find("#previewTitle").text(" "))}};h=a.windowManager.open({title:"Special character",spacing:10,padding:10,items:[n,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"label",name:"previewTitle",text:" ",style:"text-align: center",border:1,minWidth:140,minHeight:80}]}],buttons:[{text:"Close",onclick:function(){h.close()}}]})}var i=tinymce.util.Tools.isArray;return a.addCommand("mceShowCharmap",h),a.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),a.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"}),{getCharMap:f,insertChar:g}});
@@ -0,0 +1,60 @@
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Released under LGPL License.
5
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('code', function(editor) {
14
+ function showDialog() {
15
+ var win = editor.windowManager.open({
16
+ title: "Source code",
17
+ body: {
18
+ type: 'textbox',
19
+ name: 'code',
20
+ multiline: true,
21
+ minWidth: editor.getParam("code_dialog_width", 600),
22
+ minHeight: editor.getParam("code_dialog_height", Math.min(tinymce.DOM.getViewPort().h - 200, 500)),
23
+ spellcheck: false,
24
+ style: 'direction: ltr; text-align: left'
25
+ },
26
+ onSubmit: function(e) {
27
+ // We get a lovely "Wrong document" error in IE 11 if we
28
+ // don't move the focus to the editor before creating an undo
29
+ // transation since it tries to make a bookmark for the current selection
30
+ editor.focus();
31
+
32
+ editor.undoManager.transact(function() {
33
+ editor.setContent(e.data.code);
34
+ });
35
+
36
+ editor.selection.setCursorLocation();
37
+ editor.nodeChanged();
38
+ }
39
+ });
40
+
41
+ // Gecko has a major performance issue with textarea
42
+ // contents so we need to set it when all reflows are done
43
+ win.find('#code').value(editor.getContent({source_view: true}));
44
+ }
45
+
46
+ editor.addCommand("mceCodeEditor", showDialog);
47
+
48
+ editor.addButton('code', {
49
+ icon: 'code',
50
+ tooltip: 'Source code',
51
+ onclick: showDialog
52
+ });
53
+
54
+ editor.addMenuItem('code', {
55
+ icon: 'code',
56
+ text: 'Source code',
57
+ context: 'tools',
58
+ onclick: showDialog
59
+ });
60
+ });
@@ -0,0 +1 @@
1
+ tinymce.PluginManager.add("code",function(a){function b(){var b=a.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:a.getParam("code_dialog_width",600),minHeight:a.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(b){a.focus(),a.undoManager.transact(function(){a.setContent(b.data.code)}),a.selection.setCursorLocation(),a.nodeChanged()}});b.find("#code").value(a.getContent({source_view:!0}))}a.addCommand("mceCodeEditor",b),a.addButton("code",{icon:"code",tooltip:"Source code",onclick:b}),a.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:b})});
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Dialog.js
3
+ *
4
+ * Released under LGPL License.
5
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /**
12
+ * Contains all dialog logic.
13
+ *
14
+ * @class tinymce.codesample.Dialog
15
+ * @private
16
+ */
17
+ define("tinymce/codesampleplugin/Dialog", [
18
+ "tinymce/dom/DOMUtils",
19
+ "tinymce/codesampleplugin/Utils",
20
+ "tinymce/codesampleplugin/Prism"
21
+ ], function(DOMUtils, Utils, Prism) {
22
+ var DOM = DOMUtils.DOM;
23
+
24
+ var languages = [
25
+ {text: 'HTML/XML', value: 'markup'},
26
+ {text: 'JavaScript', value: 'javascript'},
27
+ {text: 'CSS', value: 'css'},
28
+ {text: 'PHP', value: 'php'},
29
+ {text: 'Ruby', value: 'ruby'},
30
+ {text: 'Python', value: 'python'},
31
+ {text: 'Java', value: 'java'},
32
+ {text: 'C', value: 'c'},
33
+ {text: 'C#', value: 'csharp'},
34
+ {text: 'C++', value: 'cpp'}
35
+ ];
36
+
37
+ function insertCodeSample(editor, language, code) {
38
+ editor.undoManager.transact(function() {
39
+ var node = getSelectedCodeSample(editor);
40
+
41
+ code = DOM.encode(code);
42
+
43
+ if (node) {
44
+ editor.dom.setAttrib(node, 'class', 'language-' + language);
45
+ node.innerHTML = code;
46
+ Prism.highlightElement(node);
47
+ editor.selection.select(node);
48
+ } else {
49
+ editor.insertContent('<pre id="__new" class="language-' + language + '">' + code + '</pre>');
50
+ editor.selection.select(editor.$('#__new').removeAttr('id')[0]);
51
+ }
52
+ });
53
+ }
54
+
55
+ function getSelectedCodeSample(editor) {
56
+ var node = editor.selection.getNode();
57
+
58
+ if (Utils.isCodeSample(node)) {
59
+ return node;
60
+ }
61
+
62
+ return null;
63
+ }
64
+
65
+ function getCurrentCode(editor) {
66
+ var node = getSelectedCodeSample(editor);
67
+
68
+ if (node) {
69
+ return node.textContent;
70
+ }
71
+
72
+ return '';
73
+ }
74
+
75
+ function getCurrentLanguage(editor) {
76
+ var matches, node = getSelectedCodeSample(editor);
77
+
78
+ if (node) {
79
+ matches = node.className.match(/language-(\w+)/);
80
+ return matches ? matches[1] : '';
81
+ }
82
+
83
+ return '';
84
+ }
85
+
86
+ return {
87
+ open: function(editor) {
88
+ editor.windowManager.open({
89
+ title: "Insert/Edit code sample",
90
+ minWidth: Math.min(DOM.getViewPort().w, 800),
91
+ minHeight: Math.min(DOM.getViewPort().h, 650),
92
+ layout: 'fit',
93
+ body: [
94
+ {
95
+ type: 'listbox',
96
+ name: 'language',
97
+ label: 'Language',
98
+ maxWidth: 200,
99
+ value: getCurrentLanguage(editor),
100
+ values: languages
101
+ },
102
+
103
+ {
104
+ type: 'textbox',
105
+ name: 'code',
106
+ multiline: true,
107
+ spellcheck: false,
108
+ ariaLabel: 'Code view',
109
+ flex: 1,
110
+ style: 'direction: ltr; text-align: left',
111
+ classes: 'monospace',
112
+ value: getCurrentCode(editor)
113
+ }
114
+ ],
115
+ onSubmit: function(e) {
116
+ insertCodeSample(editor, e.data.language, e.data.code);
117
+ }
118
+ });
119
+ }
120
+ };
121
+ });
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Plugin.js
3
+ *
4
+ * Released under LGPL License.
5
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /**
12
+ * Main plugin logic.
13
+ *
14
+ * @class tinymce.codesample.Plugin
15
+ * @private
16
+ */
17
+ define("tinymce/codesampleplugin/Plugin", [
18
+ "tinymce/Env",
19
+ "tinymce/PluginManager",
20
+ "tinymce/codesampleplugin/Prism",
21
+ "tinymce/codesampleplugin/Dialog",
22
+ "tinymce/codesampleplugin/Utils"
23
+ ], function(Env, PluginManager, Prism, Dialog, Utils) {
24
+ var addedCss, trimArg = Utils.trimArg;
25
+
26
+ PluginManager.add('codesample', function(editor, pluginUrl) {
27
+ var $ = editor.$;
28
+
29
+ if (!Env.ceFalse) {
30
+ return;
31
+ }
32
+
33
+ function loadCss() {
34
+ var linkElm;
35
+
36
+ if (!addedCss) {
37
+ addedCss = true;
38
+ linkElm = editor.dom.create('link', {
39
+ rel: 'stylesheet',
40
+ href: pluginUrl + '/css/prism.css'
41
+ });
42
+
43
+ editor.getDoc().getElementsByTagName('head')[0].appendChild(linkElm);
44
+ }
45
+ }
46
+
47
+ editor.on('PreProcess', function(e) {
48
+ $('pre[contenteditable=false]', e.node).
49
+ filter(trimArg(Utils.isCodeSample)).
50
+ each(function(idx, elm) {
51
+ var $elm = $(elm), code = elm.textContent;
52
+
53
+ $elm.attr('class', $.trim($elm.attr('class')));
54
+ $elm.removeAttr('contentEditable');
55
+
56
+ $elm.empty().append($('<code></code>').each(function() {
57
+ // Needs to be textContent since innerText produces BR:s
58
+ this.textContent = code;
59
+ }));
60
+ });
61
+ });
62
+
63
+ editor.on('SetContent', function() {
64
+ var unprocessedCodeSamples = $('pre').filter(trimArg(Utils.isCodeSample)).filter(function(idx, elm) {
65
+ return elm.contentEditable !== "false";
66
+ });
67
+
68
+ if (unprocessedCodeSamples.length) {
69
+ editor.undoManager.transact(function() {
70
+ unprocessedCodeSamples.each(function(idx, elm) {
71
+ $(elm).find('br').each(function(idx, elm) {
72
+ elm.parentNode.replaceChild(editor.getDoc().createTextNode('\n'), elm);
73
+ });
74
+
75
+ elm.contentEditable = false;
76
+ elm.innerHTML = editor.dom.encode(elm.textContent);
77
+ Prism.highlightElement(elm);
78
+ elm.className = $.trim(elm.className);
79
+ });
80
+ });
81
+ }
82
+ });
83
+
84
+ editor.addCommand('codesample', function() {
85
+ Dialog.open(editor);
86
+ });
87
+
88
+ editor.addButton('codesample', {
89
+ cmd: 'codesample',
90
+ title: 'Insert/Edit code sample'
91
+ });
92
+
93
+ editor.on('init', loadCss);
94
+ });
95
+ });
@@ -0,0 +1,937 @@
1
+ /**
2
+ * Prism.js
3
+ *
4
+ * Released under LGPL License.
5
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ *
10
+ * Import of prism. Disabled DOMContentLoaded event listener.
11
+ */
12
+
13
+ define("tinymce/codesampleplugin/Prism", [], function() {
14
+ var window = {};
15
+ // ------------------ Start wrap
16
+
17
+ /* http://prismjs.com/download.html?themes=prism-dark&languages=markup+css+clike+javascript+c+csharp+cpp+java+php+python+ruby */
18
+ var _self = (typeof window !== 'undefined')
19
+ ? window // if in browser
20
+ : (
21
+ (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)
22
+ ? self // if in worker
23
+ : {} // if in node js
24
+ );
25
+
26
+ /**
27
+ * Prism: Lightweight, robust, elegant syntax highlighting
28
+ * MIT license http://www.opensource.org/licenses/mit-license.php/
29
+ * @author Lea Verou http://lea.verou.me
30
+ */
31
+
32
+ var Prism = (function(){
33
+
34
+ // Private helper vars
35
+ var lang = /\blang(?:uage)?-(?!\*)(\w+)\b/i;
36
+
37
+ var _ = _self.Prism = {
38
+ util: {
39
+ encode: function (tokens) {
40
+ if (tokens instanceof Token) {
41
+ return new Token(tokens.type, _.util.encode(tokens.content), tokens.alias);
42
+ } else if (_.util.type(tokens) === 'Array') {
43
+ return tokens.map(_.util.encode);
44
+ } else {
45
+ return tokens.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\u00a0/g, ' ');
46
+ }
47
+ },
48
+
49
+ type: function (o) {
50
+ return Object.prototype.toString.call(o).match(/\[object (\w+)\]/)[1];
51
+ },
52
+
53
+ // Deep clone a language definition (e.g. to extend it)
54
+ clone: function (o) {
55
+ var type = _.util.type(o);
56
+
57
+ switch (type) {
58
+ case 'Object':
59
+ var clone = {};
60
+
61
+ for (var key in o) {
62
+ if (o.hasOwnProperty(key)) {
63
+ clone[key] = _.util.clone(o[key]);
64
+ }
65
+ }
66
+
67
+ return clone;
68
+
69
+ case 'Array':
70
+ // Check for existence for IE8
71
+ return o.map && o.map(function(v) { return _.util.clone(v); });
72
+ }
73
+
74
+ return o;
75
+ }
76
+ },
77
+
78
+ languages: {
79
+ extend: function (id, redef) {
80
+ var lang = _.util.clone(_.languages[id]);
81
+
82
+ for (var key in redef) {
83
+ lang[key] = redef[key];
84
+ }
85
+
86
+ return lang;
87
+ },
88
+
89
+ /**
90
+ * Insert a token before another token in a language literal
91
+ * As this needs to recreate the object (we cannot actually insert before keys in object literals),
92
+ * we cannot just provide an object, we need anobject and a key.
93
+ * @param inside The key (or language id) of the parent
94
+ * @param before The key to insert before. If not provided, the function appends instead.
95
+ * @param insert Object with the key/value pairs to insert
96
+ * @param root The object that contains `inside`. If equal to Prism.languages, it can be omitted.
97
+ */
98
+ insertBefore: function (inside, before, insert, root) {
99
+ root = root || _.languages;
100
+ var grammar = root[inside];
101
+
102
+ if (arguments.length == 2) {
103
+ insert = arguments[1];
104
+
105
+ for (var newToken in insert) {
106
+ if (insert.hasOwnProperty(newToken)) {
107
+ grammar[newToken] = insert[newToken];
108
+ }
109
+ }
110
+
111
+ return grammar;
112
+ }
113
+
114
+ var ret = {};
115
+
116
+ for (var token in grammar) {
117
+
118
+ if (grammar.hasOwnProperty(token)) {
119
+
120
+ if (token == before) {
121
+
122
+ for (var newToken in insert) {
123
+
124
+ if (insert.hasOwnProperty(newToken)) {
125
+ ret[newToken] = insert[newToken];
126
+ }
127
+ }
128
+ }
129
+
130
+ ret[token] = grammar[token];
131
+ }
132
+ }
133
+
134
+ // Update references in other language definitions
135
+ _.languages.DFS(_.languages, function(key, value) {
136
+ if (value === root[inside] && key != inside) {
137
+ this[key] = ret;
138
+ }
139
+ });
140
+
141
+ return root[inside] = ret;
142
+ },
143
+
144
+ // Traverse a language definition with Depth First Search
145
+ DFS: function(o, callback, type) {
146
+ for (var i in o) {
147
+ if (o.hasOwnProperty(i)) {
148
+ callback.call(o, i, o[i], type || i);
149
+
150
+ if (_.util.type(o[i]) === 'Object') {
151
+ _.languages.DFS(o[i], callback);
152
+ }
153
+ else if (_.util.type(o[i]) === 'Array') {
154
+ _.languages.DFS(o[i], callback, i);
155
+ }
156
+ }
157
+ }
158
+ }
159
+ },
160
+ plugins: {},
161
+
162
+ highlightAll: function(async, callback) {
163
+ var elements = document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');
164
+
165
+ for (var i=0, element; element = elements[i++];) {
166
+ _.highlightElement(element, async === true, callback);
167
+ }
168
+ },
169
+
170
+ highlightElement: function(element, async, callback) {
171
+ // Find language
172
+ var language, grammar, parent = element;
173
+
174
+ while (parent && !lang.test(parent.className)) {
175
+ parent = parent.parentNode;
176
+ }
177
+
178
+ if (parent) {
179
+ language = (parent.className.match(lang) || [,''])[1];
180
+ grammar = _.languages[language];
181
+ }
182
+
183
+ // Set language on the element, if not present
184
+ element.className = element.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
185
+
186
+ // Set language on the parent, for styling
187
+ parent = element.parentNode;
188
+
189
+ if (/pre/i.test(parent.nodeName)) {
190
+ parent.className = parent.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
191
+ }
192
+
193
+ var code = element.textContent;
194
+
195
+ var env = {
196
+ element: element,
197
+ language: language,
198
+ grammar: grammar,
199
+ code: code
200
+ };
201
+
202
+ if (!code || !grammar) {
203
+ _.hooks.run('complete', env);
204
+ return;
205
+ }
206
+
207
+ _.hooks.run('before-highlight', env);
208
+
209
+ if (async && _self.Worker) {
210
+ var worker = new Worker(_.filename);
211
+
212
+ worker.onmessage = function(evt) {
213
+ env.highlightedCode = evt.data;
214
+
215
+ _.hooks.run('before-insert', env);
216
+
217
+ env.element.innerHTML = env.highlightedCode;
218
+
219
+ callback && callback.call(env.element);
220
+ _.hooks.run('after-highlight', env);
221
+ _.hooks.run('complete', env);
222
+ };
223
+
224
+ worker.postMessage(JSON.stringify({
225
+ language: env.language,
226
+ code: env.code,
227
+ immediateClose: true
228
+ }));
229
+ }
230
+ else {
231
+ env.highlightedCode = _.highlight(env.code, env.grammar, env.language);
232
+
233
+ _.hooks.run('before-insert', env);
234
+
235
+ env.element.innerHTML = env.highlightedCode;
236
+
237
+ callback && callback.call(element);
238
+
239
+ _.hooks.run('after-highlight', env);
240
+ _.hooks.run('complete', env);
241
+ }
242
+ },
243
+
244
+ highlight: function (text, grammar, language) {
245
+ var tokens = _.tokenize(text, grammar);
246
+ return Token.stringify(_.util.encode(tokens), language);
247
+ },
248
+
249
+ tokenize: function(text, grammar, language) {
250
+ var Token = _.Token;
251
+
252
+ var strarr = [text];
253
+
254
+ var rest = grammar.rest;
255
+
256
+ if (rest) {
257
+ for (var token in rest) {
258
+ grammar[token] = rest[token];
259
+ }
260
+
261
+ delete grammar.rest;
262
+ }
263
+
264
+ tokenloop: for (var token in grammar) {
265
+ if(!grammar.hasOwnProperty(token) || !grammar[token]) {
266
+ continue;
267
+ }
268
+
269
+ var patterns = grammar[token];
270
+ patterns = (_.util.type(patterns) === "Array") ? patterns : [patterns];
271
+
272
+ for (var j = 0; j < patterns.length; ++j) {
273
+ var pattern = patterns[j],
274
+ inside = pattern.inside,
275
+ lookbehind = !!pattern.lookbehind,
276
+ lookbehindLength = 0,
277
+ alias = pattern.alias;
278
+
279
+ pattern = pattern.pattern || pattern;
280
+
281
+ for (var i=0; i<strarr.length; i++) { // Don’t cache length as it changes during the loop
282
+
283
+ var str = strarr[i];
284
+
285
+ if (strarr.length > text.length) {
286
+ // Something went terribly wrong, ABORT, ABORT!
287
+ break tokenloop;
288
+ }
289
+
290
+ if (str instanceof Token) {
291
+ continue;
292
+ }
293
+
294
+ pattern.lastIndex = 0;
295
+
296
+ var match = pattern.exec(str);
297
+
298
+ if (match) {
299
+ if(lookbehind) {
300
+ lookbehindLength = match[1].length;
301
+ }
302
+
303
+ var from = match.index - 1 + lookbehindLength,
304
+ match = match[0].slice(lookbehindLength),
305
+ len = match.length,
306
+ to = from + len,
307
+ before = str.slice(0, from + 1),
308
+ after = str.slice(to + 1);
309
+
310
+ var args = [i, 1];
311
+
312
+ if (before) {
313
+ args.push(before);
314
+ }
315
+
316
+ var wrapped = new Token(token, inside? _.tokenize(match, inside) : match, alias);
317
+
318
+ args.push(wrapped);
319
+
320
+ if (after) {
321
+ args.push(after);
322
+ }
323
+
324
+ Array.prototype.splice.apply(strarr, args);
325
+ }
326
+ }
327
+ }
328
+ }
329
+
330
+ return strarr;
331
+ },
332
+
333
+ hooks: {
334
+ all: {},
335
+
336
+ add: function (name, callback) {
337
+ var hooks = _.hooks.all;
338
+
339
+ hooks[name] = hooks[name] || [];
340
+
341
+ hooks[name].push(callback);
342
+ },
343
+
344
+ run: function (name, env) {
345
+ var callbacks = _.hooks.all[name];
346
+
347
+ if (!callbacks || !callbacks.length) {
348
+ return;
349
+ }
350
+
351
+ for (var i=0, callback; callback = callbacks[i++];) {
352
+ callback(env);
353
+ }
354
+ }
355
+ }
356
+ };
357
+
358
+ var Token = _.Token = function(type, content, alias) {
359
+ this.type = type;
360
+ this.content = content;
361
+ this.alias = alias;
362
+ };
363
+
364
+ Token.stringify = function(o, language, parent) {
365
+ if (typeof o == 'string') {
366
+ return o;
367
+ }
368
+
369
+ if (_.util.type(o) === 'Array') {
370
+ return o.map(function(element) {
371
+ return Token.stringify(element, language, o);
372
+ }).join('');
373
+ }
374
+
375
+ var env = {
376
+ type: o.type,
377
+ content: Token.stringify(o.content, language, parent),
378
+ tag: 'span',
379
+ classes: ['token', o.type],
380
+ attributes: {},
381
+ language: language,
382
+ parent: parent
383
+ };
384
+
385
+ if (env.type == 'comment') {
386
+ env.attributes['spellcheck'] = 'true';
387
+ }
388
+
389
+ if (o.alias) {
390
+ var aliases = _.util.type(o.alias) === 'Array' ? o.alias : [o.alias];
391
+ Array.prototype.push.apply(env.classes, aliases);
392
+ }
393
+
394
+ _.hooks.run('wrap', env);
395
+
396
+ var attributes = '';
397
+
398
+ for (var name in env.attributes) {
399
+ attributes += (attributes ? ' ' : '') + name + '="' + (env.attributes[name] || '') + '"';
400
+ }
401
+
402
+ return '<' + env.tag + ' class="' + env.classes.join(' ') + '" ' + attributes + '>' + env.content + '</' + env.tag + '>';
403
+
404
+ };
405
+
406
+ if (!_self.document) {
407
+ if (!_self.addEventListener) {
408
+ // in Node.js
409
+ return _self.Prism;
410
+ }
411
+ // In worker
412
+ _self.addEventListener('message', function(evt) {
413
+ var message = JSON.parse(evt.data),
414
+ lang = message.language,
415
+ code = message.code,
416
+ immediateClose = message.immediateClose;
417
+
418
+ _self.postMessage(_.highlight(code, _.languages[lang], lang));
419
+ if (immediateClose) {
420
+ _self.close();
421
+ }
422
+ }, false);
423
+
424
+ return _self.Prism;
425
+ }
426
+ /*
427
+ // Get current script and highlight
428
+ var script = document.getElementsByTagName('script');
429
+
430
+ script = script[script.length - 1];
431
+
432
+ if (script) {
433
+ _.filename = script.src;
434
+
435
+ if (document.addEventListener && !script.hasAttribute('data-manual')) {
436
+ document.addEventListener('DOMContentLoaded', _.highlightAll);
437
+ }
438
+ }
439
+
440
+ return _self.Prism;
441
+ */
442
+ })();
443
+
444
+ if (typeof module !== 'undefined' && module.exports) {
445
+ module.exports = Prism;
446
+ }
447
+
448
+ // hack for components to work correctly in node.js
449
+ if (typeof global !== 'undefined') {
450
+ global.Prism = Prism;
451
+ }
452
+ ;
453
+ Prism.languages.markup = {
454
+ 'comment': /<!--[\w\W]*?-->/,
455
+ 'prolog': /<\?[\w\W]+?\?>/,
456
+ 'doctype': /<!DOCTYPE[\w\W]+?>/,
457
+ 'cdata': /<!\[CDATA\[[\w\W]*?]]>/i,
458
+ 'tag': {
459
+ pattern: /<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,
460
+ inside: {
461
+ 'tag': {
462
+ pattern: /^<\/?[^\s>\/]+/i,
463
+ inside: {
464
+ 'punctuation': /^<\/?/,
465
+ 'namespace': /^[^\s>\/:]+:/
466
+ }
467
+ },
468
+ 'attr-value': {
469
+ pattern: /=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,
470
+ inside: {
471
+ 'punctuation': /[=>"']/
472
+ }
473
+ },
474
+ 'punctuation': /\/?>/,
475
+ 'attr-name': {
476
+ pattern: /[^\s>\/]+/,
477
+ inside: {
478
+ 'namespace': /^[^\s>\/:]+:/
479
+ }
480
+ }
481
+
482
+ }
483
+ },
484
+ 'entity': /&#?[\da-z]{1,8};/i
485
+ };
486
+
487
+ // Plugin to make entity title show the real entity, idea by Roman Komarov
488
+ Prism.hooks.add('wrap', function(env) {
489
+
490
+ if (env.type === 'entity') {
491
+ env.attributes['title'] = env.content.replace(/&amp;/, '&');
492
+ }
493
+ });
494
+
495
+ Prism.languages.xml = Prism.languages.markup;
496
+ Prism.languages.html = Prism.languages.markup;
497
+ Prism.languages.mathml = Prism.languages.markup;
498
+ Prism.languages.svg = Prism.languages.markup;
499
+
500
+ Prism.languages.css = {
501
+ 'comment': /\/\*[\w\W]*?\*\//,
502
+ 'atrule': {
503
+ pattern: /@[\w-]+?.*?(;|(?=\s*\{))/i,
504
+ inside: {
505
+ 'rule': /@[\w-]+/
506
+ // See rest below
507
+ }
508
+ },
509
+ 'url': /url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
510
+ 'selector': /[^\{\}\s][^\{\};]*?(?=\s*\{)/,
511
+ 'string': /("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,
512
+ 'property': /(\b|\B)[\w-]+(?=\s*:)/i,
513
+ 'important': /\B!important\b/i,
514
+ 'function': /[-a-z0-9]+(?=\()/i,
515
+ 'punctuation': /[(){};:]/
516
+ };
517
+
518
+ Prism.languages.css['atrule'].inside.rest = Prism.util.clone(Prism.languages.css);
519
+
520
+ if (Prism.languages.markup) {
521
+ Prism.languages.insertBefore('markup', 'tag', {
522
+ 'style': {
523
+ pattern: /<style[\w\W]*?>[\w\W]*?<\/style>/i,
524
+ inside: {
525
+ 'tag': {
526
+ pattern: /<style[\w\W]*?>|<\/style>/i,
527
+ inside: Prism.languages.markup.tag.inside
528
+ },
529
+ rest: Prism.languages.css
530
+ },
531
+ alias: 'language-css'
532
+ }
533
+ });
534
+
535
+ Prism.languages.insertBefore('inside', 'attr-value', {
536
+ 'style-attr': {
537
+ pattern: /\s*style=("|').*?\1/i,
538
+ inside: {
539
+ 'attr-name': {
540
+ pattern: /^\s*style/i,
541
+ inside: Prism.languages.markup.tag.inside
542
+ },
543
+ 'punctuation': /^\s*=\s*['"]|['"]\s*$/,
544
+ 'attr-value': {
545
+ pattern: /.+/i,
546
+ inside: Prism.languages.css
547
+ }
548
+ },
549
+ alias: 'language-css'
550
+ }
551
+ }, Prism.languages.markup.tag);
552
+ };
553
+ Prism.languages.clike = {
554
+ 'comment': [
555
+ {
556
+ pattern: /(^|[^\\])\/\*[\w\W]*?\*\//,
557
+ lookbehind: true
558
+ },
559
+ {
560
+ pattern: /(^|[^\\:])\/\/.*/,
561
+ lookbehind: true
562
+ }
563
+ ],
564
+ 'string': /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
565
+ 'class-name': {
566
+ pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,
567
+ lookbehind: true,
568
+ inside: {
569
+ punctuation: /(\.|\\)/
570
+ }
571
+ },
572
+ 'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
573
+ 'boolean': /\b(true|false)\b/,
574
+ 'function': /[a-z0-9_]+(?=\()/i,
575
+ 'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,
576
+ 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
577
+ 'punctuation': /[{}[\];(),.:]/
578
+ };
579
+
580
+ Prism.languages.javascript = Prism.languages.extend('clike', {
581
+ 'keyword': /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,
582
+ 'number': /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,
583
+ // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
584
+ 'function': /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i
585
+ });
586
+
587
+ Prism.languages.insertBefore('javascript', 'keyword', {
588
+ 'regex': {
589
+ pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,
590
+ lookbehind: true
591
+ }
592
+ });
593
+
594
+ Prism.languages.insertBefore('javascript', 'class-name', {
595
+ 'template-string': {
596
+ pattern: /`(?:\\`|\\?[^`])*`/,
597
+ inside: {
598
+ 'interpolation': {
599
+ pattern: /\$\{[^}]+\}/,
600
+ inside: {
601
+ 'interpolation-punctuation': {
602
+ pattern: /^\$\{|\}$/,
603
+ alias: 'punctuation'
604
+ },
605
+ rest: Prism.languages.javascript
606
+ }
607
+ },
608
+ 'string': /[\s\S]+/
609
+ }
610
+ }
611
+ });
612
+
613
+ if (Prism.languages.markup) {
614
+ Prism.languages.insertBefore('markup', 'tag', {
615
+ 'script': {
616
+ pattern: /<script[\w\W]*?>[\w\W]*?<\/script>/i,
617
+ inside: {
618
+ 'tag': {
619
+ pattern: /<script[\w\W]*?>|<\/script>/i,
620
+ inside: Prism.languages.markup.tag.inside
621
+ },
622
+ rest: Prism.languages.javascript
623
+ },
624
+ alias: 'language-javascript'
625
+ }
626
+ });
627
+ }
628
+
629
+ Prism.languages.js = Prism.languages.javascript;
630
+ Prism.languages.c = Prism.languages.extend('clike', {
631
+ 'keyword': /\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,
632
+ 'operator': /\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,
633
+ 'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i
634
+ });
635
+
636
+ Prism.languages.insertBefore('c', 'string', {
637
+ 'macro': {
638
+ // allow for multiline macro definitions
639
+ // spaces after the # character compile fine with gcc
640
+ pattern: /(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,
641
+ lookbehind: true,
642
+ alias: 'property',
643
+ inside: {
644
+ // highlight the path of the include statement as a string
645
+ 'string': {
646
+ pattern: /(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,
647
+ lookbehind: true
648
+ }
649
+ }
650
+ }
651
+ });
652
+
653
+ delete Prism.languages.c['class-name'];
654
+ delete Prism.languages.c['boolean'];
655
+
656
+ Prism.languages.csharp = Prism.languages.extend('clike', {
657
+ 'keyword': /\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,
658
+ 'string': [
659
+ /@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,
660
+ /("|')(\\?.)*?\1/
661
+ ],
662
+ 'number': /\b-?(0x[\da-f]+|\d*\.?\d+)\b/i
663
+ });
664
+
665
+ Prism.languages.insertBefore('csharp', 'keyword', {
666
+ 'preprocessor': {
667
+ pattern: /(^\s*)#.*/m,
668
+ lookbehind: true
669
+ }
670
+ });
671
+
672
+ Prism.languages.cpp = Prism.languages.extend('c', {
673
+ 'keyword': /\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,
674
+ 'boolean': /\b(true|false)\b/,
675
+ 'operator': /[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/
676
+ });
677
+
678
+ Prism.languages.insertBefore('cpp', 'keyword', {
679
+ 'class-name': {
680
+ pattern: /(class\s+)[a-z0-9_]+/i,
681
+ lookbehind: true
682
+ }
683
+ });
684
+ Prism.languages.java = Prism.languages.extend('clike', {
685
+ 'keyword': /\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,
686
+ 'number': /\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,
687
+ 'operator': {
688
+ pattern: /(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,
689
+ lookbehind: true
690
+ }
691
+ });
692
+ /**
693
+ * Original by Aaron Harun: http://aahacreative.com/2012/07/31/php-syntax-highlighting-prism/
694
+ * Modified by Miles Johnson: http://milesj.me
695
+ *
696
+ * Supports the following:
697
+ * - Extends clike syntax
698
+ * - Support for PHP 5.3+ (namespaces, traits, generators, etc)
699
+ * - Smarter constant and function matching
700
+ *
701
+ * Adds the following new token classes:
702
+ * constant, delimiter, variable, function, package
703
+ */
704
+
705
+ Prism.languages.php = Prism.languages.extend('clike', {
706
+ 'keyword': /\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,
707
+ 'constant': /\b[A-Z0-9_]{2,}\b/,
708
+ 'comment': {
709
+ pattern: /(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,
710
+ lookbehind: true
711
+ }
712
+ });
713
+
714
+ // Shell-like comments are matched after strings, because they are less
715
+ // common than strings containing hashes...
716
+ Prism.languages.insertBefore('php', 'class-name', {
717
+ 'shell-comment': {
718
+ pattern: /(^|[^\\])#.*/,
719
+ lookbehind: true,
720
+ alias: 'comment'
721
+ }
722
+ });
723
+
724
+ Prism.languages.insertBefore('php', 'keyword', {
725
+ 'delimiter': /\?>|<\?(?:php)?/i,
726
+ 'variable': /\$\w+\b/i,
727
+ 'package': {
728
+ pattern: /(\\|namespace\s+|use\s+)[\w\\]+/,
729
+ lookbehind: true,
730
+ inside: {
731
+ punctuation: /\\/
732
+ }
733
+ }
734
+ });
735
+
736
+ // Must be defined after the function pattern
737
+ Prism.languages.insertBefore('php', 'operator', {
738
+ 'property': {
739
+ pattern: /(->)[\w]+/,
740
+ lookbehind: true
741
+ }
742
+ });
743
+
744
+ // Add HTML support of the markup language exists
745
+ if (Prism.languages.markup) {
746
+
747
+ // Tokenize all inline PHP blocks that are wrapped in <?php ?>
748
+ // This allows for easy PHP + markup highlighting
749
+ Prism.hooks.add('before-highlight', function(env) {
750
+ if (env.language !== 'php') {
751
+ return;
752
+ }
753
+
754
+ env.tokenStack = [];
755
+
756
+ env.backupCode = env.code;
757
+ env.code = env.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/ig, function(match) {
758
+ env.tokenStack.push(match);
759
+
760
+ return '{{{PHP' + env.tokenStack.length + '}}}';
761
+ });
762
+ });
763
+
764
+ // Restore env.code for other plugins (e.g. line-numbers)
765
+ Prism.hooks.add('before-insert', function(env) {
766
+ if (env.language === 'php') {
767
+ env.code = env.backupCode;
768
+ delete env.backupCode;
769
+ }
770
+ });
771
+
772
+ // Re-insert the tokens after highlighting
773
+ Prism.hooks.add('after-highlight', function(env) {
774
+ if (env.language !== 'php') {
775
+ return;
776
+ }
777
+
778
+ for (var i = 0, t; t = env.tokenStack[i]; i++) {
779
+ // The replace prevents $$, $&, $`, $', $n, $nn from being interpreted as special patterns
780
+ env.highlightedCode = env.highlightedCode.replace('{{{PHP' + (i + 1) + '}}}', Prism.highlight(t, env.grammar, 'php').replace(/\$/g, '$$$$'));
781
+ }
782
+
783
+ env.element.innerHTML = env.highlightedCode;
784
+ });
785
+
786
+ // Wrap tokens in classes that are missing them
787
+ Prism.hooks.add('wrap', function(env) {
788
+ if (env.language === 'php' && env.type === 'markup') {
789
+ env.content = env.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g, "<span class=\"token php\">$1</span>");
790
+ }
791
+ });
792
+
793
+ // Add the rules before all others
794
+ Prism.languages.insertBefore('php', 'comment', {
795
+ 'markup': {
796
+ pattern: /<[^?]\/?(.*?)>/,
797
+ inside: Prism.languages.markup
798
+ },
799
+ 'php': /\{\{\{PHP[0-9]+\}\}\}/
800
+ });
801
+ }
802
+ ;
803
+ Prism.languages.python= {
804
+ 'comment': {
805
+ pattern: /(^|[^\\])#.*/,
806
+ lookbehind: true
807
+ },
808
+ 'string': /"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,
809
+ 'function' : {
810
+ pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,
811
+ lookbehind: true
812
+ },
813
+ 'class-name': {
814
+ pattern: /(\bclass\s+)[a-z0-9_]+/i,
815
+ lookbehind: true
816
+ },
817
+ 'keyword' : /\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,
818
+ 'boolean' : /\b(?:True|False)\b/,
819
+ 'number' : /\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,
820
+ 'operator' : /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,
821
+ 'punctuation' : /[{}[\];(),.:]/
822
+ };
823
+
824
+ /**
825
+ * Original by Samuel Flores
826
+ *
827
+ * Adds the following new token classes:
828
+ * constant, builtin, variable, symbol, regex
829
+ */
830
+ (function(Prism) {
831
+ Prism.languages.ruby = Prism.languages.extend('clike', {
832
+ 'comment': /#(?!\{[^\r\n]*?\}).*/,
833
+ 'keyword': /\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/
834
+ });
835
+
836
+ var interpolation = {
837
+ pattern: /#\{[^}]+\}/,
838
+ inside: {
839
+ 'delimiter': {
840
+ pattern: /^#\{|\}$/,
841
+ alias: 'tag'
842
+ },
843
+ rest: Prism.util.clone(Prism.languages.ruby)
844
+ }
845
+ };
846
+
847
+ Prism.languages.insertBefore('ruby', 'keyword', {
848
+ 'regex': [
849
+ {
850
+ pattern: /%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,
851
+ inside: {
852
+ 'interpolation': interpolation
853
+ }
854
+ },
855
+ {
856
+ pattern: /%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,
857
+ inside: {
858
+ 'interpolation': interpolation
859
+ }
860
+ },
861
+ {
862
+ // Here we need to specifically allow interpolation
863
+ pattern: /%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,
864
+ inside: {
865
+ 'interpolation': interpolation
866
+ }
867
+ },
868
+ {
869
+ pattern: /%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,
870
+ inside: {
871
+ 'interpolation': interpolation
872
+ }
873
+ },
874
+ {
875
+ pattern: /%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,
876
+ inside: {
877
+ 'interpolation': interpolation
878
+ }
879
+ },
880
+ {
881
+ pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,
882
+ lookbehind: true
883
+ }
884
+ ],
885
+ 'variable': /[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,
886
+ 'symbol': /:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/
887
+ });
888
+
889
+ Prism.languages.insertBefore('ruby', 'number', {
890
+ 'builtin': /\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,
891
+ 'constant': /\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/
892
+ });
893
+
894
+ Prism.languages.ruby.string = [
895
+ {
896
+ pattern: /%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,
897
+ inside: {
898
+ 'interpolation': interpolation
899
+ }
900
+ },
901
+ {
902
+ pattern: /%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,
903
+ inside: {
904
+ 'interpolation': interpolation
905
+ }
906
+ },
907
+ {
908
+ // Here we need to specifically allow interpolation
909
+ pattern: /%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,
910
+ inside: {
911
+ 'interpolation': interpolation
912
+ }
913
+ },
914
+ {
915
+ pattern: /%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,
916
+ inside: {
917
+ 'interpolation': interpolation
918
+ }
919
+ },
920
+ {
921
+ pattern: /%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,
922
+ inside: {
923
+ 'interpolation': interpolation
924
+ }
925
+ },
926
+ {
927
+ pattern: /("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,
928
+ inside: {
929
+ 'interpolation': interpolation
930
+ }
931
+ }
932
+ ];
933
+ }(Prism));
934
+
935
+ // ------------------ End wrap
936
+ return Prism;
937
+ });