decidim 0.0.1.alpha9 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim might be problematic. Click here for more details.

Files changed (488) hide show
  1. checksums.yaml +4 -4
  2. data/.babelrc +16 -0
  3. data/.codeclimate.yml +16 -2
  4. data/.eslintignore +11 -0
  5. data/.eslintrc.json +275 -11
  6. data/.gitattributes +1 -0
  7. data/.gitignore +8 -0
  8. data/.hound.yml +2 -4
  9. data/.rubocop.yml +8 -4
  10. data/.ruby-version +1 -1
  11. data/.travis.yml +7 -8
  12. data/Dockerfile +16 -5
  13. data/Gemfile +4 -6
  14. data/Gemfile.lock +148 -70
  15. data/{LICENSE.txt → LICENSE-AGPLv3.txt} +42 -0
  16. data/README.md +28 -10
  17. data/Rakefile +53 -2
  18. data/codecov.yml +14 -6
  19. data/crowdin.yaml +1 -2
  20. data/decidim-admin/README.md +33 -8
  21. data/decidim-admin/Rakefile +0 -25
  22. data/decidim-admin/app/assets/javascripts/decidim/admin/application.js.es6 +17 -10
  23. data/decidim-admin/app/assets/javascripts/decidim/admin/sort_steps.js.es6 +20 -11
  24. data/decidim-admin/app/assets/javascripts/decidim/admin/tab_focus.js.es6 +22 -0
  25. data/decidim-admin/app/assets/stylesheets/decidim/admin/_forms.scss +10 -0
  26. data/decidim-admin/app/assets/stylesheets/decidim/admin/_layout.scss +11 -0
  27. data/decidim-admin/app/assets/stylesheets/decidim/admin/_tables.scss +4 -0
  28. data/decidim-admin/app/assets/stylesheets/decidim/admin/application.scss +8 -2
  29. data/decidim-admin/app/commands/decidim/admin/activate_participatory_process_step.rb +1 -1
  30. data/decidim-admin/app/commands/decidim/admin/create_category.rb +44 -0
  31. data/decidim-admin/app/commands/decidim/admin/create_feature.rb +48 -0
  32. data/decidim-admin/app/commands/decidim/admin/create_participatory_process.rb +3 -6
  33. data/decidim-admin/app/commands/decidim/admin/create_participatory_process_admin.rb +51 -0
  34. data/decidim-admin/app/commands/decidim/admin/create_participatory_process_attachment.rb +44 -0
  35. data/decidim-admin/app/commands/decidim/admin/create_participatory_process_step.rb +3 -3
  36. data/decidim-admin/app/commands/decidim/admin/create_scope.rb +38 -0
  37. data/decidim-admin/app/commands/decidim/admin/create_static_page.rb +40 -0
  38. data/decidim-admin/app/commands/decidim/admin/destroy_category.rb +36 -0
  39. data/decidim-admin/app/commands/decidim/admin/destroy_feature.rb +39 -0
  40. data/decidim-admin/app/commands/decidim/admin/publish_participatory_process.rb +1 -1
  41. data/decidim-admin/app/commands/decidim/admin/reorder_participatory_process_steps.rb +5 -2
  42. data/decidim-admin/app/commands/decidim/admin/unpublish_participatory_process.rb +1 -1
  43. data/decidim-admin/app/commands/decidim/admin/update_category.rb +48 -0
  44. data/decidim-admin/app/commands/decidim/admin/update_organization.rb +49 -0
  45. data/decidim-admin/app/commands/decidim/admin/update_participatory_process.rb +2 -2
  46. data/decidim-admin/app/commands/decidim/admin/update_participatory_process_attachment.rb +49 -0
  47. data/decidim-admin/app/commands/decidim/admin/update_participatory_process_step.rb +1 -1
  48. data/decidim-admin/app/commands/decidim/admin/update_scope.rb +43 -0
  49. data/decidim-admin/app/commands/decidim/admin/update_static_page.rb +45 -0
  50. data/decidim-admin/app/constraints/decidim/admin/organization_dashboard_constraint.rb +5 -1
  51. data/decidim-admin/app/controllers/decidim/admin/application_controller.rb +8 -0
  52. data/decidim-admin/app/controllers/decidim/admin/categories_controller.rb +90 -0
  53. data/decidim-admin/app/controllers/decidim/admin/concerns/participatory_process_admin.rb +31 -0
  54. data/decidim-admin/app/controllers/decidim/admin/features_controller.rb +74 -0
  55. data/decidim-admin/app/controllers/decidim/admin/organization_controller.rb +40 -0
  56. data/decidim-admin/app/controllers/decidim/admin/participatory_process_attachments_controller.rb +84 -0
  57. data/decidim-admin/app/controllers/decidim/admin/participatory_process_publications_controller.rb +2 -7
  58. data/decidim-admin/app/controllers/decidim/admin/participatory_process_step_activations_controller.rb +6 -8
  59. data/decidim-admin/app/controllers/decidim/admin/participatory_process_step_ordering_controller.rb +2 -4
  60. data/decidim-admin/app/controllers/decidim/admin/participatory_process_steps_controller.rb +13 -11
  61. data/decidim-admin/app/controllers/decidim/admin/participatory_process_user_roles_controller.rb +54 -0
  62. data/decidim-admin/app/controllers/decidim/admin/participatory_processes_controller.rb +11 -6
  63. data/decidim-admin/app/controllers/decidim/admin/scopes_controller.rb +79 -0
  64. data/decidim-admin/app/controllers/decidim/admin/static_pages_controller.rb +94 -0
  65. data/decidim-admin/app/forms/decidim/admin/category_form.rb +37 -0
  66. data/decidim-admin/app/forms/decidim/admin/feature_form.rb +16 -0
  67. data/decidim-admin/app/forms/decidim/admin/organization_form.rb +31 -0
  68. data/decidim-admin/app/forms/decidim/admin/participatory_process_attachment_form.rb +19 -0
  69. data/decidim-admin/app/forms/decidim/admin/participatory_process_form.rb +4 -7
  70. data/decidim-admin/app/forms/decidim/admin/participatory_process_step_form.rb +12 -2
  71. data/decidim-admin/app/forms/decidim/admin/participatory_process_user_role_form.rb +15 -0
  72. data/decidim-admin/app/forms/decidim/admin/scope_form.rb +24 -0
  73. data/decidim-admin/app/forms/decidim/admin/static_page_form.rb +30 -0
  74. data/decidim-admin/app/helpers/decidim/admin/application_helper.rb +1 -0
  75. data/decidim-admin/app/helpers/decidim/admin/aria_selected_link_to_helper.rb +28 -0
  76. data/decidim-admin/app/helpers/decidim/admin/attributes_display_helper.rb +13 -5
  77. data/decidim-admin/app/models/decidim/admin/abilities/admin_user.rb +34 -0
  78. data/decidim-admin/app/models/decidim/admin/abilities/base.rb +19 -0
  79. data/decidim-admin/app/models/decidim/admin/abilities/participatory_process_admin.rb +51 -0
  80. data/decidim-admin/app/models/decidim/admin/participatory_process_user_role.rb +14 -0
  81. data/decidim-admin/app/queries/decidim/admin/manageable_participatory_processes_for_user.rb +41 -0
  82. data/decidim-admin/app/queries/decidim/admin/process_admin_roles_for_process.rb +35 -0
  83. data/decidim-admin/app/views/decidim/admin/categories/_form.html.erb +12 -0
  84. data/decidim-admin/app/views/decidim/admin/categories/edit.html.erb +9 -0
  85. data/decidim-admin/app/views/decidim/admin/categories/index.html.erb +44 -0
  86. data/decidim-admin/app/views/decidim/admin/categories/new.html.erb +9 -0
  87. data/decidim-admin/app/views/decidim/admin/categories/show.html.erb +14 -0
  88. data/decidim-admin/app/views/decidim/admin/features/_feature.html.erb +20 -0
  89. data/decidim-admin/app/views/decidim/admin/features/_form.html.erb +3 -0
  90. data/decidim-admin/app/views/decidim/admin/features/index.html.erb +23 -0
  91. data/decidim-admin/app/views/decidim/admin/features/new.html.erb +9 -0
  92. data/decidim-admin/app/views/decidim/admin/organization/_form.html.erb +23 -0
  93. data/decidim-admin/app/views/decidim/admin/organization/edit.html.erb +11 -0
  94. data/decidim-admin/app/views/decidim/admin/participatory_process_attachments/_form.html.erb +11 -0
  95. data/decidim-admin/app/views/decidim/admin/participatory_process_attachments/edit.html.erb +9 -0
  96. data/decidim-admin/app/views/decidim/admin/participatory_process_attachments/index.html.erb +37 -0
  97. data/decidim-admin/app/views/decidim/admin/participatory_process_attachments/new.html.erb +9 -0
  98. data/decidim-admin/app/views/decidim/admin/participatory_process_attachments/show.html.erb +25 -0
  99. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/_form.html.erb +2 -2
  100. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/edit.html.erb +1 -3
  101. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/{_table.html.erb → index.html.erb} +15 -11
  102. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/new.html.erb +1 -3
  103. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/show.html.erb +1 -4
  104. data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/index.html.erb +34 -0
  105. data/decidim-admin/app/views/decidim/admin/participatory_processes/_form.html.erb +2 -2
  106. data/decidim-admin/app/views/decidim/admin/participatory_processes/edit.html.erb +13 -3
  107. data/decidim-admin/app/views/decidim/admin/participatory_processes/index.html.erb +5 -14
  108. data/decidim-admin/app/views/decidim/admin/participatory_processes/show.html.erb +19 -36
  109. data/decidim-admin/app/views/decidim/admin/scopes/_form.html.erb +3 -0
  110. data/decidim-admin/app/views/decidim/admin/scopes/edit.html.erb +11 -0
  111. data/decidim-admin/app/views/decidim/admin/scopes/index.html.erb +38 -0
  112. data/decidim-admin/app/views/decidim/admin/scopes/new.html.erb +11 -0
  113. data/decidim-admin/app/views/decidim/admin/static_pages/_form.html.erb +13 -0
  114. data/decidim-admin/app/views/decidim/admin/static_pages/edit.html.erb +11 -0
  115. data/decidim-admin/app/views/decidim/admin/static_pages/index.html.erb +40 -0
  116. data/decidim-admin/app/views/decidim/admin/static_pages/new.html.erb +11 -0
  117. data/decidim-admin/app/views/decidim/admin/static_pages/show.html.erb +22 -0
  118. data/decidim-admin/app/views/layouts/decidim/admin/_application.html.erb +40 -0
  119. data/decidim-admin/app/views/layouts/decidim/admin/_sidebar.html.erb +5 -2
  120. data/decidim-admin/app/views/layouts/decidim/admin/application.html.erb +3 -40
  121. data/decidim-admin/app/views/layouts/decidim/admin/participatory_process.html.erb +54 -0
  122. data/decidim-admin/config/i18n-tasks.yml +3 -2
  123. data/decidim-admin/config/locales/ca.yml +138 -6
  124. data/decidim-admin/config/locales/en.yml +191 -13
  125. data/decidim-admin/config/locales/es.yml +139 -7
  126. data/decidim-admin/config/routes.rb +23 -1
  127. data/decidim-admin/db/migrate/20161102144648_add_admin_participatory_process_user_roles.rb +15 -0
  128. data/decidim-admin/db/seeds.rb +21 -0
  129. data/decidim-admin/decidim-admin.gemspec +6 -11
  130. data/decidim-admin/lib/decidim/admin.rb +1 -0
  131. data/decidim-admin/lib/decidim/admin/engine.rb +10 -3
  132. data/decidim-admin/lib/decidim/admin/features.rb +10 -0
  133. data/decidim-admin/lib/decidim/admin/features/base_controller.rb +33 -0
  134. data/decidim-admin/spec/commands/create_category_spec.rb +61 -0
  135. data/decidim-admin/spec/commands/create_feature_spec.rb +60 -0
  136. data/decidim-admin/spec/commands/create_participatory_process_admin_spec.rb +42 -0
  137. data/decidim-admin/spec/commands/create_participatory_process_spec.rb +37 -0
  138. data/decidim-admin/spec/commands/create_scope_spec.rb +24 -0
  139. data/decidim-admin/spec/commands/create_static_page_spec.rb +42 -0
  140. data/decidim-admin/spec/commands/destroy_category_spec.rb +46 -0
  141. data/decidim-admin/spec/commands/destroy_feature_spec.rb +31 -0
  142. data/decidim-admin/spec/commands/update_category_spec.rb +64 -0
  143. data/decidim-admin/spec/commands/update_organization_spec.rb +73 -0
  144. data/decidim-admin/spec/commands/update_scope_spec.rb +24 -0
  145. data/decidim-admin/spec/commands/update_static_page_spec.rb +50 -0
  146. data/decidim-admin/spec/controllers/static_pages_controller_spec.rb +50 -0
  147. data/decidim-admin/spec/factories.rb +8 -0
  148. data/decidim-admin/spec/features/admin_invite_spec.rb +6 -2
  149. data/decidim-admin/spec/features/admin_manages_features_spec.rb +75 -0
  150. data/decidim-admin/spec/features/admin_manages_organization_scopes_spec.rb +80 -0
  151. data/decidim-admin/spec/features/admin_manages_organization_spec.rb +38 -0
  152. data/decidim-admin/spec/features/admin_manages_participatory_process_admins_spec.rb +10 -0
  153. data/decidim-admin/spec/features/admin_manages_participatory_process_attachments_spec.rb +10 -0
  154. data/decidim-admin/spec/features/admin_manages_participatory_process_categories_spec.rb +18 -0
  155. data/decidim-admin/spec/features/admin_manages_participatory_process_steps_spec.rb +10 -0
  156. data/decidim-admin/spec/features/admin_manages_participatory_processes_spec.rb +95 -0
  157. data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_admins_spec.rb +27 -0
  158. data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_attachments_spec.rb +13 -0
  159. data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_steps_spec.rb +12 -0
  160. data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_processes_spec.rb +36 -0
  161. data/decidim-admin/spec/features/process_admin_manages_participatory_process_categories_spec.rb +20 -0
  162. data/decidim-admin/spec/features/static_pages_spec.rb +120 -0
  163. data/decidim-admin/spec/forms/category_form_spec.rb +94 -0
  164. data/decidim-admin/spec/forms/organization_form_spec.rb +60 -0
  165. data/decidim-admin/spec/forms/participatory_process_form_spec.rb +19 -6
  166. data/decidim-admin/spec/forms/participatory_process_step_form_spec.rb +21 -1
  167. data/decidim-admin/spec/forms/participatory_process_user_role_form_spec.rb +29 -0
  168. data/decidim-admin/spec/forms/scope_form_spec.rb +60 -0
  169. data/decidim-admin/spec/forms/static_page_form_spec.rb +97 -0
  170. data/decidim-admin/spec/helpers/aria_selected_link_to_helper_spec.rb +46 -0
  171. data/decidim-admin/spec/models/abilities/admin_user_spec.rb +62 -0
  172. data/decidim-admin/spec/models/abilities/participatory_process_admin_spec.rb +50 -0
  173. data/decidim-admin/spec/models/participatory_process_user_role_spec.rb +21 -0
  174. data/decidim-admin/spec/queries/manageable_participatory_processes_for_user_spec.rb +30 -0
  175. data/decidim-admin/spec/queries/process_admin_roles_for_process_spec.rb +17 -0
  176. data/decidim-admin/spec/shared/manage_process_admins_examples.rb +56 -0
  177. data/decidim-admin/spec/shared/manage_process_attachments_examples.rb +105 -0
  178. data/decidim-admin/spec/shared/manage_process_categories_examples.rb +129 -0
  179. data/decidim-admin/spec/shared/manage_process_steps_examples.rb +153 -0
  180. data/decidim-admin/spec/shared/manage_processes_examples.rb +139 -0
  181. data/decidim-admin/spec/shared/participatory_admin_shared_context.rb +19 -0
  182. data/decidim-admin/spec/spec_helper.rb +4 -0
  183. data/decidim-admin/spec/support/processes_menu_links_helpers.rb +12 -0
  184. data/decidim-admin/spec/views/decidim/static_pages/_form.html.erb_spec.rb +35 -0
  185. data/decidim-admin/vendor/assets/javascripts/html.sortable.js +691 -0
  186. data/decidim-api/README.md +11 -10
  187. data/decidim-api/Rakefile +0 -25
  188. data/decidim-api/app/assets/config/decidim_api_manifest.js +1 -0
  189. data/decidim-api/app/assets/javascripts/decidim/api/docs.js.es6 +23 -0
  190. data/decidim-api/app/controllers/decidim/api/documentation_controller.rb +10 -0
  191. data/decidim-api/app/controllers/decidim/api/queries_controller.rb +3 -2
  192. data/decidim-api/app/views/decidim/api/documentation/show.html.erb +10 -0
  193. data/decidim-api/app/views/layouts/decidim/api/documentation.html.erb +9 -0
  194. data/decidim-api/config/routes.rb +4 -3
  195. data/decidim-api/decidim-api.gemspec +6 -9
  196. data/decidim-api/lib/decidim/api.rb +7 -0
  197. data/decidim-api/lib/decidim/api/engine.rb +14 -0
  198. data/decidim-api/lib/decidim/api/graphiql-initial-query.txt +11 -0
  199. data/decidim-api/{app/schemas → lib}/decidim/api/schema.rb +1 -0
  200. data/decidim-api/lib/decidim/api/test/type_context.rb +41 -0
  201. data/decidim-api/{app/types/decidim/api/localized_string_type.rb → lib/decidim/api/types/localized_string.rb} +1 -1
  202. data/decidim-api/lib/decidim/api/types/mutation.rb +10 -0
  203. data/decidim-api/lib/decidim/api/types/query.rb +10 -0
  204. data/decidim-api/{app/types/decidim/api/translated_field_type.rb → lib/decidim/api/types/translated_field.rb} +2 -2
  205. data/decidim-api/spec/factories.rb +1 -0
  206. data/decidim-api/spec/features/documentation_spec.rb +22 -0
  207. data/decidim-api/spec/features/graphiql_spec.rb +22 -0
  208. data/decidim-api/spec/types/localized_string_type_spec.rb +2 -1
  209. data/decidim-api/spec/types/mutation_type_spec.rb +38 -0
  210. data/decidim-api/spec/types/query_type_spec.rb +2 -1
  211. data/decidim-api/spec/types/translated_field_type_spec.rb +2 -1
  212. data/decidim-api/vendor/assets/javascripts/decidim/api/graphql-docs.js +3518 -0
  213. data/decidim-api/vendor/assets/javascripts/decidim/api/react-dom.js +42 -0
  214. data/decidim-api/vendor/assets/javascripts/decidim/api/react.js +20595 -0
  215. data/decidim-comments/.gitignore +2 -0
  216. data/decidim-comments/Gemfile +6 -0
  217. data/decidim-comments/README.md +42 -0
  218. data/decidim-comments/Rakefile +2 -0
  219. data/decidim-comments/app/assets/config/decidim_comments_manifest.js +1 -0
  220. data/decidim-comments/app/assets/javascripts/decidim/comments/bundle.js +0 -0
  221. data/decidim-comments/app/assets/javascripts/decidim/comments/comments.js.erb +8 -0
  222. data/decidim-comments/app/commands/decidim/comments/create_comment.rb +40 -0
  223. data/decidim-comments/app/forms/decidim/comments/comment_form.rb +16 -0
  224. data/decidim-comments/app/frontend/application/apollo_client.js +16 -0
  225. data/decidim-comments/app/frontend/application/application.component.jsx +37 -0
  226. data/decidim-comments/app/frontend/application/application.component.test.jsx +33 -0
  227. data/decidim-comments/app/frontend/application/icon.component.jsx +21 -0
  228. data/decidim-comments/app/frontend/application/icon.component.test.jsx +43 -0
  229. data/decidim-comments/app/frontend/comments/add_comment_form.component.jsx +250 -0
  230. data/decidim-comments/app/frontend/comments/add_comment_form.component.test.jsx +173 -0
  231. data/decidim-comments/app/frontend/comments/add_comment_form.mutation.graphql +8 -0
  232. data/decidim-comments/app/frontend/comments/comment.component.jsx +202 -0
  233. data/decidim-comments/app/frontend/comments/comment.component.test.jsx +125 -0
  234. data/decidim-comments/app/frontend/comments/comment.fragment.graphql +12 -0
  235. data/decidim-comments/app/frontend/comments/comment_data.fragment.graphql +11 -0
  236. data/decidim-comments/app/frontend/comments/comment_order_selector.component.jsx +28 -0
  237. data/decidim-comments/app/frontend/comments/comment_order_selector.component.test.jsx +9 -0
  238. data/decidim-comments/app/frontend/comments/comment_thread.component.jsx +64 -0
  239. data/decidim-comments/app/frontend/comments/comment_thread.component.test.jsx +71 -0
  240. data/decidim-comments/app/frontend/comments/comment_thread.fragment.graphql +9 -0
  241. data/decidim-comments/app/frontend/comments/comments.component.jsx +139 -0
  242. data/decidim-comments/app/frontend/comments/comments.component.test.jsx +106 -0
  243. data/decidim-comments/app/frontend/comments/comments.query.graphql +10 -0
  244. data/decidim-comments/app/frontend/comments/featured_comment.component.jsx +23 -0
  245. data/decidim-comments/app/frontend/comments/featured_comment.component.test.jsx +15 -0
  246. data/decidim-comments/app/frontend/entry.js +24 -0
  247. data/decidim-comments/app/frontend/entry.test.js +29 -0
  248. data/decidim-comments/app/frontend/support/asset_url.js +11 -0
  249. data/decidim-comments/app/frontend/support/generate_comments_data.js +29 -0
  250. data/decidim-comments/app/frontend/support/generate_current_user_data.js +13 -0
  251. data/decidim-comments/app/frontend/support/load_translations.js +23 -0
  252. data/decidim-comments/app/frontend/support/require_all.js +10 -0
  253. data/decidim-comments/app/frontend/support/resolve_graphql_query.js +37 -0
  254. data/decidim-comments/app/frontend/support/stub_component.js +29 -0
  255. data/decidim-comments/app/helpers/decidim/comments/comments_helper.rb +51 -0
  256. data/decidim-comments/app/models/decidim/comments/comment.rb +55 -0
  257. data/decidim-comments/app/types/decidim/comments/add_comment_type.rb +12 -0
  258. data/decidim-comments/app/types/decidim/comments/author_type.rb +15 -0
  259. data/decidim-comments/app/types/decidim/comments/comment_type.rb +28 -0
  260. data/decidim-comments/bin/rails +14 -0
  261. data/decidim-comments/config/i18n-tasks.yml +124 -0
  262. data/decidim-comments/config/locales/ca.yml +35 -0
  263. data/decidim-comments/config/locales/en.yml +36 -0
  264. data/decidim-comments/config/locales/es.yml +35 -0
  265. data/decidim-comments/db/migrate/20161130143508_create_comments.rb +11 -0
  266. data/decidim-comments/db/migrate/20161214082645_add_depth_to_comments.rb +5 -0
  267. data/decidim-comments/db/migrate/20161216102820_add_alignment_to_comments.rb +5 -0
  268. data/decidim-comments/db/seeds.rb +11 -0
  269. data/decidim-comments/decidim-comments.gemspec +25 -0
  270. data/decidim-comments/lib/decidim/comments.rb +10 -0
  271. data/decidim-comments/lib/decidim/comments/engine.rb +34 -0
  272. data/decidim-comments/lib/decidim/comments/mutation_extensions.rb +36 -0
  273. data/decidim-comments/lib/decidim/comments/query_extensions.rb +33 -0
  274. data/decidim-comments/package.json +21 -0
  275. data/decidim-comments/spec/commands/create_comment_spec.rb +64 -0
  276. data/decidim-comments/spec/factories.rb +9 -0
  277. data/decidim-comments/spec/features/comments_spec.rb +97 -0
  278. data/decidim-comments/spec/forms/comment_form_spec.rb +48 -0
  279. data/decidim-comments/spec/helpers/comments_helper_spec.rb +48 -0
  280. data/decidim-comments/spec/models/comment_spec.rb +64 -0
  281. data/decidim-comments/spec/spec_helper.rb +2 -0
  282. data/decidim-comments/spec/support/dummy.rb +20 -0
  283. data/decidim-comments/spec/types/author_type_spec.rb +21 -0
  284. data/decidim-comments/spec/types/comment_type_spec.rb +51 -0
  285. data/decidim-comments/spec/types/query_type_spec.rb +49 -0
  286. data/decidim-dev/decidim-dev.gemspec +11 -7
  287. data/decidim-dev/lib/decidim/common_rake.rb +20 -6
  288. data/decidim-dev/lib/decidim/dummy_authorization_handler.rb +9 -2
  289. data/decidim-dev/lib/decidim/test/base_spec_helper.rb +25 -6
  290. data/decidim-dev/lib/decidim/test/i18n_spec.rb +1 -1
  291. data/decidim-dev/lib/decidim/test/rspec_support/capybara.rb +66 -5
  292. data/decidim-dev/lib/decidim/test/rspec_support/database_cleaner.rb +2 -2
  293. data/decidim-dev/lib/decidim/test/rspec_support/feature.rb +22 -0
  294. data/decidim-dev/lib/decidim/test/rspec_support/feature_context.rb +44 -0
  295. data/decidim-dev/lib/decidim/test/rspec_support/helpers.rb +42 -0
  296. data/decidim-dev/lib/decidim/test/rspec_support/translation_helpers.rb +63 -0
  297. data/decidim-dev/spec/support/Exampledocument.docx +0 -0
  298. data/decidim-dev/spec/support/Exampledocument.odt +0 -0
  299. data/decidim-dev/spec/support/Exampledocument.pdf +0 -0
  300. data/decidim-dev/spec/support/avatar.svg +14 -0
  301. data/decidim-dev/spec/support/malicious.jpg +0 -0
  302. data/decidim-meetings/.gitignore +7 -0
  303. data/decidim-meetings/README.md +23 -0
  304. data/decidim-meetings/Rakefile +2 -0
  305. data/decidim-meetings/app/commands/decidim/meetings/admin/create_meeting.rb +40 -0
  306. data/decidim-meetings/app/commands/decidim/meetings/admin/update_meeting.rb +44 -0
  307. data/decidim-meetings/app/controllers/decidim/meetings/admin/application_controller.rb +14 -0
  308. data/decidim-meetings/app/controllers/decidim/meetings/admin/meetings_controller.rb +69 -0
  309. data/decidim-meetings/app/controllers/decidim/meetings/application_controller.rb +13 -0
  310. data/decidim-meetings/app/controllers/decidim/meetings/meetings_controller.rb +24 -0
  311. data/decidim-meetings/app/forms/decidim/meetings/admin/meeting_form.rb +30 -0
  312. data/decidim-meetings/app/models/decidim/meetings/application_record.rb +9 -0
  313. data/decidim-meetings/app/models/decidim/meetings/meeting.rb +12 -0
  314. data/decidim-meetings/app/views/decidim/meetings/admin/meetings/_form.html.erb +32 -0
  315. data/decidim-meetings/app/views/decidim/meetings/admin/meetings/edit.html.erb +9 -0
  316. data/decidim-meetings/app/views/decidim/meetings/admin/meetings/index.html.erb +39 -0
  317. data/decidim-meetings/app/views/decidim/meetings/admin/meetings/new.html.erb +9 -0
  318. data/decidim-meetings/app/views/decidim/meetings/meetings/_address_details.html.erb +5 -0
  319. data/decidim-meetings/app/views/decidim/meetings/meetings/index.html.erb +30 -0
  320. data/decidim-meetings/app/views/decidim/meetings/meetings/show.html.erb +39 -0
  321. data/decidim-meetings/bin/rails +14 -0
  322. data/decidim-meetings/config/i18n-tasks.yml +4 -0
  323. data/decidim-meetings/config/locales/ca.yml +44 -0
  324. data/decidim-meetings/config/locales/en.yml +45 -0
  325. data/decidim-meetings/config/locales/es.yml +44 -0
  326. data/decidim-meetings/db/migrate/20161130121354_create_meetings.rb +18 -0
  327. data/decidim-meetings/decidim-meetings.gemspec +21 -0
  328. data/decidim-meetings/lib/decidim/meetings.rb +11 -0
  329. data/decidim-meetings/lib/decidim/meetings/admin.rb +9 -0
  330. data/decidim-meetings/lib/decidim/meetings/admin_engine.rb +22 -0
  331. data/decidim-meetings/lib/decidim/meetings/feature.rb +42 -0
  332. data/decidim-meetings/lib/decidim/meetings/list_engine.rb +16 -0
  333. data/decidim-meetings/spec/commands/create_meeting_spec.rb +38 -0
  334. data/decidim-meetings/spec/commands/update_meeting_spec.rb +36 -0
  335. data/decidim-meetings/spec/factories.rb +16 -0
  336. data/decidim-meetings/spec/features/admin_manages_meetings_spec.rb +16 -0
  337. data/decidim-meetings/spec/features/explore_meetings_spec.rb +54 -0
  338. data/decidim-meetings/spec/features/process_admin_manages_meetings_spec.rb +17 -0
  339. data/decidim-meetings/spec/forms/meeting_form_spec.rb +115 -0
  340. data/decidim-meetings/spec/models/meeting_spec.rb +10 -0
  341. data/decidim-meetings/spec/shared/admin_shared_context.rb +9 -0
  342. data/decidim-meetings/spec/shared/manage_meetings_examples.rb +118 -0
  343. data/decidim-meetings/spec/spec_helper.rb +2 -0
  344. data/decidim-pages/.gitignore +3 -0
  345. data/decidim-pages/README.md +24 -0
  346. data/decidim-pages/Rakefile +2 -0
  347. data/decidim-pages/app/commands/decidim/pages/admin/update_page.rb +39 -0
  348. data/decidim-pages/app/commands/decidim/pages/create_page.rb +21 -0
  349. data/decidim-pages/app/commands/decidim/pages/destroy_page.rb +17 -0
  350. data/decidim-pages/app/controllers/decidim/pages/admin/application_controller.rb +13 -0
  351. data/decidim-pages/app/controllers/decidim/pages/admin/pages_controller.rb +35 -0
  352. data/decidim-pages/app/controllers/decidim/pages/application_controller.rb +16 -0
  353. data/decidim-pages/app/forms/decidim/pages/admin/page_form.rb +17 -0
  354. data/decidim-pages/app/helpers/decidim/pages/application_helper.rb +10 -0
  355. data/decidim-pages/app/models/decidim/pages/application_record.rb +9 -0
  356. data/decidim-pages/app/models/decidim/pages/page.rb +12 -0
  357. data/decidim-pages/app/views/decidim/pages/admin/pages/_form.html.erb +5 -0
  358. data/decidim-pages/app/views/decidim/pages/admin/pages/edit.html.erb +9 -0
  359. data/decidim-pages/app/views/decidim/pages/application/show.html.erb +16 -0
  360. data/decidim-pages/bin/rails +14 -0
  361. data/decidim-pages/config/i18n-tasks.yml +4 -0
  362. data/decidim-pages/config/locales/ca.yml +19 -0
  363. data/decidim-pages/config/locales/en.yml +20 -0
  364. data/decidim-pages/config/locales/es.yml +19 -0
  365. data/decidim-pages/db/migrate/20161116121353_create_decidim_pages.rb +11 -0
  366. data/decidim-pages/db/migrate/20161214150429_add_commentable_to_pages.rb +5 -0
  367. data/decidim-pages/decidim-pages.gemspec +21 -0
  368. data/decidim-pages/lib/decidim/pages.rb +12 -0
  369. data/decidim-pages/lib/decidim/pages/admin.rb +9 -0
  370. data/decidim-pages/lib/decidim/pages/admin_engine.rb +21 -0
  371. data/decidim-pages/lib/decidim/pages/engine.rb +15 -0
  372. data/decidim-pages/lib/decidim/pages/feature.rb +41 -0
  373. data/decidim-pages/lib/tasks/decidim/pages_tasks.rake +1 -0
  374. data/decidim-pages/spec/commands/create_page_spec.rb +46 -0
  375. data/decidim-pages/spec/commands/destroy_page_spec.rb +24 -0
  376. data/decidim-pages/spec/commands/update_page_spec.rb +57 -0
  377. data/decidim-pages/spec/factories.rb +10 -0
  378. data/decidim-pages/spec/features/admin_spec.rb +71 -0
  379. data/decidim-pages/spec/features/page_show_spec.rb +67 -0
  380. data/decidim-pages/spec/forms/page_form_spec.rb +63 -0
  381. data/decidim-pages/spec/models/page_spec.rb +18 -0
  382. data/decidim-pages/spec/spec_helper.rb +2 -0
  383. data/decidim-proposals/.gitignore +3 -0
  384. data/decidim-proposals/README.md +24 -0
  385. data/decidim-proposals/Rakefile +2 -0
  386. data/decidim-proposals/app/commands/decidim/proposals/admin/create_proposal.rb +43 -0
  387. data/decidim-proposals/app/commands/decidim/proposals/create_proposal.rb +42 -0
  388. data/decidim-proposals/app/controllers/decidim/proposals/admin/application_controller.rb +14 -0
  389. data/decidim-proposals/app/controllers/decidim/proposals/admin/proposals_controller.rb +37 -0
  390. data/decidim-proposals/app/controllers/decidim/proposals/application_controller.rb +13 -0
  391. data/decidim-proposals/app/controllers/decidim/proposals/proposals_controller.rb +41 -0
  392. data/decidim-proposals/app/forms/decidim/proposals/admin/proposal_form.rb +38 -0
  393. data/decidim-proposals/app/forms/decidim/proposals/proposal_form.rb +37 -0
  394. data/decidim-proposals/app/helpers/decidim/proposals/application_helper.rb +10 -0
  395. data/decidim-proposals/app/models/decidim/proposals/application_record.rb +9 -0
  396. data/decidim-proposals/app/models/decidim/proposals/proposal.rb +53 -0
  397. data/decidim-proposals/app/services/decidim/proposals/proposal_search.rb +36 -0
  398. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/_form.html.erb +19 -0
  399. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb +34 -0
  400. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/new.html.erb +9 -0
  401. data/decidim-proposals/app/views/decidim/proposals/proposals/_proposal.html.erb +34 -0
  402. data/decidim-proposals/app/views/decidim/proposals/proposals/index.html.erb +23 -0
  403. data/decidim-proposals/app/views/decidim/proposals/proposals/new.html.erb +40 -0
  404. data/decidim-proposals/app/views/decidim/proposals/proposals/show.html.erb +37 -0
  405. data/decidim-proposals/bin/rails +14 -0
  406. data/decidim-proposals/config/i18n-tasks.yml +4 -0
  407. data/decidim-proposals/config/locales/ca.yml +46 -0
  408. data/decidim-proposals/config/locales/en.yml +47 -0
  409. data/decidim-proposals/config/locales/es.yml +46 -0
  410. data/decidim-proposals/db/migrate/20161212110850_create_decidim_proposals.rb +14 -0
  411. data/decidim-proposals/decidim-proposals.gemspec +22 -0
  412. data/decidim-proposals/lib/decidim/proposals.rb +12 -0
  413. data/decidim-proposals/lib/decidim/proposals/admin.rb +9 -0
  414. data/decidim-proposals/lib/decidim/proposals/admin_engine.rb +20 -0
  415. data/decidim-proposals/lib/decidim/proposals/engine.rb +18 -0
  416. data/decidim-proposals/lib/decidim/proposals/feature.rb +35 -0
  417. data/decidim-proposals/spec/commands/decidim/proposals/create_proposal_spec.rb +58 -0
  418. data/decidim-proposals/spec/factories.rb +18 -0
  419. data/decidim-proposals/spec/features/admin_manages_proposals_spec.rb +16 -0
  420. data/decidim-proposals/spec/features/process_admin_manages_proposals_spec.rb +17 -0
  421. data/decidim-proposals/spec/features/proposals_spec.rb +117 -0
  422. data/decidim-proposals/spec/forms/decidim/proposals/proposal_form_spec.rb +104 -0
  423. data/decidim-proposals/spec/lib/decidim/proposals/feature_spec.rb +31 -0
  424. data/decidim-proposals/spec/models/decidim/proposals/proposal_spec.rb +30 -0
  425. data/decidim-proposals/spec/services/decidim/proposals/proposal_search_spec.rb +62 -0
  426. data/decidim-proposals/spec/shared/admin_shared_context.rb +11 -0
  427. data/decidim-proposals/spec/shared/manage_proposals_examples.rb +40 -0
  428. data/decidim-proposals/spec/spec_helper.rb +2 -0
  429. data/decidim-system/Rakefile +0 -25
  430. data/decidim-system/app/assets/javascripts/decidim/system/application.js.es6 +6 -5
  431. data/decidim-system/app/assets/stylesheets/decidim/system/application.scss +7 -2
  432. data/decidim-system/app/commands/decidim/system/create_admin.rb +1 -1
  433. data/decidim-system/app/commands/decidim/system/create_default_pages.rb +43 -0
  434. data/decidim-system/app/commands/decidim/system/register_organization.rb +4 -2
  435. data/decidim-system/app/commands/decidim/system/update_admin.rb +1 -1
  436. data/decidim-system/app/commands/decidim/system/update_organization.rb +1 -2
  437. data/decidim-system/app/controllers/decidim/system/admins_controller.rb +4 -4
  438. data/decidim-system/app/controllers/decidim/system/application_controller.rb +1 -0
  439. data/decidim-system/app/controllers/decidim/system/organizations_controller.rb +4 -4
  440. data/decidim-system/app/forms/decidim/system/admin_form.rb +1 -1
  441. data/decidim-system/app/forms/decidim/system/register_organization_form.rb +6 -5
  442. data/decidim-system/app/forms/decidim/system/update_organization_form.rb +1 -3
  443. data/decidim-system/app/helpers/decidim/system/application_helper.rb +2 -0
  444. data/decidim-system/app/views/decidim/system/organizations/edit.html.erb +0 -4
  445. data/decidim-system/app/views/decidim/system/organizations/new.html.erb +23 -3
  446. data/decidim-system/config/i18n-tasks.yml +3 -1
  447. data/decidim-system/config/locales/ca.yml +15 -10
  448. data/decidim-system/config/locales/en.yml +6 -0
  449. data/decidim-system/config/locales/es.yml +11 -6
  450. data/decidim-system/db/seeds.rb +5 -2
  451. data/decidim-system/decidim-system.gemspec +6 -10
  452. data/decidim-system/lib/decidim/system/engine.rb +7 -2
  453. data/decidim-system/spec/commands/decidim/system/create_default_pages_spec.rb +30 -0
  454. data/decidim-system/spec/commands/decidim/system/register_organization_spec.rb +9 -3
  455. data/decidim-system/spec/features/organizations_spec.rb +4 -3
  456. data/decidim.gemspec +7 -8
  457. data/docs/features_and_components.md +45 -0
  458. data/docs/how_to_create_a_plugin.md +183 -0
  459. data/jsconfig.json +3 -0
  460. data/karma.conf.js +43 -0
  461. data/lib/decidim.rb +4 -0
  462. data/lib/generators/decidim/app_builder.rb +2 -0
  463. data/lib/generators/decidim/demo_generator.rb +27 -0
  464. data/lib/generators/decidim/docker_generator.rb +65 -0
  465. data/lib/generators/decidim/install_generator.rb +4 -25
  466. data/lib/generators/decidim/templates/Dockerfile.dev.erb +21 -0
  467. data/lib/generators/decidim/templates/app.json.erb +4 -1
  468. data/lib/generators/decidim/templates/initializer.rb +3 -0
  469. data/package.json +53 -8
  470. data/run_ci.sh +3 -0
  471. data/webpack.config.js +66 -0
  472. data/yarn.lock +4665 -456
  473. metadata +437 -35
  474. data/decidim-admin/LICENSE.txt +0 -619
  475. data/decidim-admin/app/models/decidim/admin/abilities/admin.rb +0 -21
  476. data/decidim-admin/spec/features/manage_participatory_process_steps_spec.rb +0 -151
  477. data/decidim-admin/spec/features/manage_participatory_processes_spec.rb +0 -227
  478. data/decidim-admin/spec/models/abilities/admin_spec.rb +0 -25
  479. data/decidim-admin/vendor/assets/javascripts/html.sortable.min.js +0 -2
  480. data/decidim-api/LICENSE.txt +0 -619
  481. data/decidim-api/app/types/decidim/api/process_step_type.rb +0 -26
  482. data/decidim-api/app/types/decidim/api/process_type.rb +0 -18
  483. data/decidim-api/app/types/decidim/api/query_type.rb +0 -19
  484. data/decidim-api/spec/schemas/schema_spec.rb +0 -38
  485. data/decidim-api/spec/support/type_helpers.rb +0 -46
  486. data/decidim-api/spec/types/process_step_type_spec.rb +0 -50
  487. data/decidim-api/spec/types/process_type_spec.rb +0 -39
  488. data/decidim-system/LICENSE.txt +0 -619
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
  require "spec_helper"
3
+ require "decidim/api/test/type_context"
3
4
 
4
5
  module Decidim
5
6
  module Api
6
7
  describe QueryType do
7
- include TypeHelpers
8
+ include_context "graphql type"
8
9
 
9
10
  describe "processes" do
10
11
  let!(:process1) { create(:participatory_process, organization: current_organization) }
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
  require "spec_helper"
3
+ require "decidim/api/test/type_context"
3
4
 
4
5
  module Decidim
5
6
  module Api
6
7
  describe TranslatedFieldType do
7
- include TypeHelpers
8
+ include_context "graphql type"
8
9
 
9
10
  let(:model) do
10
11
  {
@@ -0,0 +1,3518 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("react"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["react"], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["GraphQLDocs"] = factory(require("react"));
8
+ else
9
+ root["GraphQLDocs"] = factory(root["React"]);
10
+ })(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {
11
+ return /******/ (function(modules) { // webpackBootstrap
12
+ /******/ // The module cache
13
+ /******/ var installedModules = {};
14
+ /******/
15
+ /******/ // The require function
16
+ /******/ function __webpack_require__(moduleId) {
17
+ /******/
18
+ /******/ // Check if module is in cache
19
+ /******/ if(installedModules[moduleId])
20
+ /******/ return installedModules[moduleId].exports;
21
+ /******/
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var module = installedModules[moduleId] = {
24
+ /******/ exports: {},
25
+ /******/ id: moduleId,
26
+ /******/ loaded: false
27
+ /******/ };
28
+ /******/
29
+ /******/ // Execute the module function
30
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
+ /******/
32
+ /******/ // Flag the module as loaded
33
+ /******/ module.loaded = true;
34
+ /******/
35
+ /******/ // Return the exports of the module
36
+ /******/ return module.exports;
37
+ /******/ }
38
+ /******/
39
+ /******/
40
+ /******/ // expose the modules object (__webpack_modules__)
41
+ /******/ __webpack_require__.m = modules;
42
+ /******/
43
+ /******/ // expose the module cache
44
+ /******/ __webpack_require__.c = installedModules;
45
+ /******/
46
+ /******/ // __webpack_public_path__
47
+ /******/ __webpack_require__.p = "";
48
+ /******/
49
+ /******/ // Load entry module and return exports
50
+ /******/ return __webpack_require__(0);
51
+ /******/ })
52
+ /************************************************************************/
53
+ /******/ ([
54
+ /* 0 */
55
+ /***/ function(module, exports, __webpack_require__) {
56
+
57
+ 'use strict';
58
+
59
+ Object.defineProperty(exports, "__esModule", {
60
+ value: true
61
+ });
62
+ exports.GraphQLDocs = undefined;
63
+
64
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
65
+
66
+ var _react = __webpack_require__(1);
67
+
68
+ var _react2 = _interopRequireDefault(_react);
69
+
70
+ var _SchemaDocsView = __webpack_require__(2);
71
+
72
+ var _model = __webpack_require__(3);
73
+
74
+ var _introspectionQuery = __webpack_require__(30);
75
+
76
+ var _introspectionQuery2 = _interopRequireDefault(_introspectionQuery);
77
+
78
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79
+
80
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
81
+
82
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
83
+
84
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
85
+
86
+ var GraphQLDocs = exports.GraphQLDocs = function (_React$Component) {
87
+ _inherits(GraphQLDocs, _React$Component);
88
+
89
+ function GraphQLDocs() {
90
+ _classCallCheck(this, GraphQLDocs);
91
+
92
+ return _possibleConstructorReturn(this, (GraphQLDocs.__proto__ || Object.getPrototypeOf(GraphQLDocs)).apply(this, arguments));
93
+ }
94
+
95
+ _createClass(GraphQLDocs, [{
96
+ key: 'componentWillMount',
97
+ value: function componentWillMount() {
98
+ var _this2 = this;
99
+
100
+ var promise = this.props.fetcher(_introspectionQuery2.default);
101
+
102
+ promise.then(function (json) {
103
+ _this2.setState({
104
+ schema: new _model.Schema(json.data)
105
+ });
106
+ });
107
+ }
108
+ }, {
109
+ key: 'render',
110
+ value: function render() {
111
+ if (this.state && this.state.schema) {
112
+ return _react2.default.createElement(_SchemaDocsView.SchemaDocsView, { schema: this.state.schema });
113
+ } else {
114
+ return _react2.default.createElement('div', null);
115
+ }
116
+ }
117
+ }]);
118
+
119
+ return GraphQLDocs;
120
+ }(_react2.default.Component);
121
+
122
+ /***/ },
123
+ /* 1 */
124
+ /***/ function(module, exports) {
125
+
126
+ module.exports = __WEBPACK_EXTERNAL_MODULE_1__;
127
+
128
+ /***/ },
129
+ /* 2 */
130
+ /***/ function(module, exports, __webpack_require__) {
131
+
132
+ 'use strict';
133
+
134
+ Object.defineProperty(exports, "__esModule", {
135
+ value: true
136
+ });
137
+ exports.SchemaDocsView = undefined;
138
+
139
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
140
+
141
+ var _react = __webpack_require__(1);
142
+
143
+ var _react2 = _interopRequireDefault(_react);
144
+
145
+ var _model = __webpack_require__(3);
146
+
147
+ var _schemaWalker = __webpack_require__(4);
148
+
149
+ var _TypeDocsViews = __webpack_require__(5);
150
+
151
+ var _SchemaDocsView = __webpack_require__(27);
152
+
153
+ var StyleSheet = _interopRequireWildcard(_SchemaDocsView);
154
+
155
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
156
+
157
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
158
+
159
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
160
+
161
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
162
+
163
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
164
+
165
+ var SchemaDocsView = exports.SchemaDocsView = function (_React$Component) {
166
+ _inherits(SchemaDocsView, _React$Component);
167
+
168
+ function SchemaDocsView() {
169
+ _classCallCheck(this, SchemaDocsView);
170
+
171
+ return _possibleConstructorReturn(this, (SchemaDocsView.__proto__ || Object.getPrototypeOf(SchemaDocsView)).apply(this, arguments));
172
+ }
173
+
174
+ _createClass(SchemaDocsView, [{
175
+ key: 'render',
176
+ value: function render() {
177
+ var _this2 = this;
178
+
179
+ var types = (0, _schemaWalker.getReferencesInSchema)(this.props.schema).map(function (tn) {
180
+ return _this2.props.schema.types[tn];
181
+ });
182
+ var components = [];
183
+
184
+ types.forEach(function (t) {
185
+ if (t instanceof _model.ObjectType) {
186
+ components.push(_react2.default.createElement(_TypeDocsViews.ObjectDocsView, {
187
+ key: t.name,
188
+ type: t,
189
+ titleOverride: _this2.titleOverrideFor(t)
190
+ }));
191
+ }
192
+ if (t instanceof _model.InterfaceType) {
193
+ components.push(_react2.default.createElement(_TypeDocsViews.InterfaceDocsView, {
194
+ key: t.name,
195
+ type: t
196
+ }));
197
+ }
198
+ if (t instanceof _model.EnumType) {
199
+ components.push(_react2.default.createElement(_TypeDocsViews.EnumDocsView, {
200
+ key: t.name,
201
+ type: t
202
+ }));
203
+ }
204
+ if (t instanceof _model.InputObjectType) {
205
+ components.push(_react2.default.createElement(_TypeDocsViews.InputObjectDocsView, {
206
+ key: t.name,
207
+ type: t
208
+ }));
209
+ }
210
+ });
211
+ types.forEach(function (t) {
212
+ if (t instanceof _model.ScalarType) {
213
+ components.push(_react2.default.createElement(_TypeDocsViews.ScalarDocsView, {
214
+ key: t.name,
215
+ type: t
216
+ }));
217
+ }
218
+ });
219
+
220
+ return _react2.default.createElement(
221
+ 'div',
222
+ { className: StyleSheet.wrapper },
223
+ _react2.default.createElement(
224
+ 'div',
225
+ { className: StyleSheet.container },
226
+ components
227
+ )
228
+ );
229
+ }
230
+ }, {
231
+ key: 'titleOverrideFor',
232
+ value: function titleOverrideFor(t) {
233
+ if (t === this.props.schema.getQueryType()) {
234
+ return 'Root query';
235
+ }
236
+ if (t === this.props.schema.getMutationType()) {
237
+ return 'Mutations';
238
+ }
239
+
240
+ return null;
241
+ }
242
+ }]);
243
+
244
+ return SchemaDocsView;
245
+ }(_react2.default.Component);
246
+
247
+ /***/ },
248
+ /* 3 */
249
+ /***/ function(module, exports) {
250
+
251
+ 'use strict';
252
+
253
+ Object.defineProperty(exports, "__esModule", {
254
+ value: true
255
+ });
256
+
257
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
258
+
259
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
260
+
261
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
262
+
263
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
264
+
265
+ var TYPE_KINDS = exports.TYPE_KINDS = ['SCALAR', 'INTERFACE', 'OBJECT', 'ENUM', 'INPUT_OBJECT'];
266
+
267
+ var Schema = exports.Schema = function () {
268
+ function Schema(introspectionResult) {
269
+ var _this = this;
270
+
271
+ _classCallCheck(this, Schema);
272
+
273
+ if (!introspectionResult.__schema) {
274
+ throw new Error('Function "Schema" precondition failed: introspectionResult.__schema');
275
+ }
276
+
277
+ if (!Array.isArray(introspectionResult.__schema.types)) {
278
+ throw new Error('Function "Schema" precondition failed: Array.isArray(introspectionResult.__schema.types)');
279
+ }
280
+
281
+ if (!introspectionResult.__schema.queryType) {
282
+ throw new Error('Function "Schema" precondition failed: introspectionResult.__schema.queryType');
283
+ }
284
+
285
+ if (!(introspectionResult.__schema.mutationType === null || typeof introspectionResult.__schema.mutationType.name === 'string')) {
286
+ throw new Error('Function "Schema" precondition failed: introspectionResult.__schema.mutationType === null || typeof introspectionResult.__schema.mutationType.name === \'string\'');
287
+ }
288
+
289
+ this.types = {};
290
+ introspectionResult.__schema.types.forEach(function (t) {
291
+ if (!(typeof t.name === 'string')) {
292
+ throw new Error('Function precondition failed: typeof t.name === \'string\'');
293
+ }
294
+
295
+ _this.types[t.name] = Type.fromIntrospectionType(t);
296
+ });
297
+
298
+ this.queryTypeId = introspectionResult.__schema.queryType.name;
299
+
300
+ if (introspectionResult.__schema.mutationType) {
301
+ this.mutationTypeId = introspectionResult.__schema.mutationType.name;
302
+ } else {
303
+ this.mutationTypeId = null;
304
+ }
305
+ }
306
+
307
+ _createClass(Schema, [{
308
+ key: 'getQueryType',
309
+ value: function getQueryType() {
310
+ var queryType = this.types[this.queryTypeId];
311
+
312
+ if (queryType instanceof ObjectType) {
313
+ return queryType;
314
+ } else {
315
+ throw new Error('Query type must be an ObjectType');
316
+ }
317
+ }
318
+ }, {
319
+ key: 'getMutationType',
320
+ value: function getMutationType() {
321
+ if (!this.mutationTypeId) {
322
+ return null;
323
+ }
324
+
325
+ var mutationType = this.types[this.mutationTypeId];
326
+
327
+ if (mutationType instanceof ObjectType) {
328
+ return mutationType;
329
+ } else {
330
+ throw new Error('Mutation type must be an ObjectType');
331
+ }
332
+ }
333
+ }]);
334
+
335
+ return Schema;
336
+ }();
337
+
338
+ var Type = exports.Type = function () {
339
+ _createClass(Type, null, [{
340
+ key: 'fromIntrospectionType',
341
+ value: function fromIntrospectionType(introspectionType) {
342
+ if (introspectionType.kind === 'OBJECT') {
343
+ return new ObjectType(introspectionType);
344
+ } else if (introspectionType.kind === 'SCALAR') {
345
+ return new ScalarType(introspectionType);
346
+ } else if (introspectionType.kind === 'INTERFACE') {
347
+ return new InterfaceType(introspectionType);
348
+ } else if (introspectionType.kind === 'ENUM') {
349
+ return new EnumType(introspectionType);
350
+ } else if (introspectionType.kind === 'INPUT_OBJECT') {
351
+ return new InputObjectType(introspectionType);
352
+ } else {
353
+ throw new Error('Unsupported type kind: ' + introspectionType.kind);
354
+ }
355
+ }
356
+ }]);
357
+
358
+ function Type(introspectionType) {
359
+ _classCallCheck(this, Type);
360
+
361
+ if (!(this.constructor !== Type)) {
362
+ throw new Error('Function "Type" precondition failed: this.constructor !== Type');
363
+ }
364
+
365
+ if (!(typeof introspectionType.name === 'string')) {
366
+ throw new Error('Function "Type" precondition failed: typeof introspectionType.name === \'string\'');
367
+ }
368
+
369
+ if (!(introspectionType.description === null || typeof introspectionType.description === 'string')) {
370
+ throw new Error('Function "Type" precondition failed: introspectionType.description === null || typeof introspectionType.description === \'string\'');
371
+ }
372
+
373
+ this.name = introspectionType.name;
374
+ this.description = introspectionType.description;
375
+ }
376
+
377
+ return Type;
378
+ }();
379
+
380
+ var ObjectType = exports.ObjectType = function (_Type) {
381
+ _inherits(ObjectType, _Type);
382
+
383
+ function ObjectType(introspectionType) {
384
+ _classCallCheck(this, ObjectType);
385
+
386
+ if (!(introspectionType.kind === 'OBJECT')) {
387
+ throw new Error('Function "ObjectType" precondition failed: introspectionType.kind === \'OBJECT\'');
388
+ }
389
+
390
+ if (!Array.isArray(introspectionType.fields)) {
391
+ throw new Error('Function "ObjectType" precondition failed: Array.isArray(introspectionType.fields)');
392
+ }
393
+
394
+ if (!(introspectionType.interfaces === null || Array.isArray(introspectionType.interfaces))) {
395
+ throw new Error('Function "ObjectType" precondition failed: introspectionType.interfaces === null || Array.isArray(introspectionType.interfaces)');
396
+ }
397
+
398
+ var _this2 = _possibleConstructorReturn(this, (ObjectType.__proto__ || Object.getPrototypeOf(ObjectType)).call(this, introspectionType));
399
+
400
+ _this2.fields = introspectionType.fields.map(function (f) {
401
+ return new Field(f);
402
+ });
403
+
404
+ if (introspectionType.interfaces) {
405
+ _this2.interfaces = introspectionType.interfaces.map(function (r) {
406
+ return TypeRef.fromIntrospectionRef(r);
407
+ });
408
+ } else {
409
+ _this2.interfaces = [];
410
+ }
411
+ return _this2;
412
+ }
413
+
414
+ return ObjectType;
415
+ }(Type);
416
+
417
+ var ScalarType = exports.ScalarType = function (_Type2) {
418
+ _inherits(ScalarType, _Type2);
419
+
420
+ function ScalarType(introspectionType) {
421
+ _classCallCheck(this, ScalarType);
422
+
423
+ if (!(introspectionType.kind === 'SCALAR')) {
424
+ throw new Error('Function "ScalarType" precondition failed: introspectionType.kind === \'SCALAR\'');
425
+ }
426
+
427
+ return _possibleConstructorReturn(this, (ScalarType.__proto__ || Object.getPrototypeOf(ScalarType)).call(this, introspectionType));
428
+ }
429
+
430
+ return ScalarType;
431
+ }(Type);
432
+
433
+ var InterfaceType = exports.InterfaceType = function (_Type3) {
434
+ _inherits(InterfaceType, _Type3);
435
+
436
+ function InterfaceType(introspectionType) {
437
+ _classCallCheck(this, InterfaceType);
438
+
439
+ if (!(introspectionType.kind === 'INTERFACE')) {
440
+ throw new Error('Function "InterfaceType" precondition failed: introspectionType.kind === \'INTERFACE\'');
441
+ }
442
+
443
+ if (!Array.isArray(introspectionType.fields)) {
444
+ throw new Error('Function "InterfaceType" precondition failed: Array.isArray(introspectionType.fields)');
445
+ }
446
+
447
+ if (!Array.isArray(introspectionType.possibleTypes)) {
448
+ throw new Error('Function "InterfaceType" precondition failed: Array.isArray(introspectionType.possibleTypes)');
449
+ }
450
+
451
+ var _this4 = _possibleConstructorReturn(this, (InterfaceType.__proto__ || Object.getPrototypeOf(InterfaceType)).call(this, introspectionType));
452
+
453
+ _this4.fields = introspectionType.fields.map(function (f) {
454
+ return new Field(f);
455
+ });
456
+ _this4.possibleTypes = introspectionType.possibleTypes.map(function (r) {
457
+ return TypeRef.fromIntrospectionRef(r);
458
+ });
459
+ return _this4;
460
+ }
461
+
462
+ return InterfaceType;
463
+ }(Type);
464
+
465
+ var EnumType = exports.EnumType = function (_Type4) {
466
+ _inherits(EnumType, _Type4);
467
+
468
+ function EnumType(introspectionType) {
469
+ _classCallCheck(this, EnumType);
470
+
471
+ if (!(introspectionType.kind === 'ENUM')) {
472
+ throw new Error('Function "EnumType" precondition failed: introspectionType.kind === \'ENUM\'');
473
+ }
474
+
475
+ if (!Array.isArray(introspectionType.enumValues)) {
476
+ throw new Error('Function "EnumType" precondition failed: Array.isArray(introspectionType.enumValues)');
477
+ }
478
+
479
+ var _this5 = _possibleConstructorReturn(this, (EnumType.__proto__ || Object.getPrototypeOf(EnumType)).call(this, introspectionType));
480
+
481
+ _this5.enumValues = introspectionType.enumValues.map(function (v) {
482
+ return new EnumValue(v);
483
+ });
484
+ return _this5;
485
+ }
486
+
487
+ return EnumType;
488
+ }(Type);
489
+
490
+ var InputObjectType = exports.InputObjectType = function (_Type5) {
491
+ _inherits(InputObjectType, _Type5);
492
+
493
+ function InputObjectType(introspectionType) {
494
+ _classCallCheck(this, InputObjectType);
495
+
496
+ if (!(introspectionType.kind === 'INPUT_OBJECT')) {
497
+ throw new Error('Function "InputObjectType" precondition failed: introspectionType.kind === \'INPUT_OBJECT\'');
498
+ }
499
+
500
+ if (!Array.isArray(introspectionType.inputFields)) {
501
+ throw new Error('Function "InputObjectType" precondition failed: Array.isArray(introspectionType.inputFields)');
502
+ }
503
+
504
+ var _this6 = _possibleConstructorReturn(this, (InputObjectType.__proto__ || Object.getPrototypeOf(InputObjectType)).call(this, introspectionType));
505
+
506
+ _this6.inputFields = introspectionType.inputFields.map(function (f) {
507
+ return new InputValue(f);
508
+ });
509
+ return _this6;
510
+ }
511
+
512
+ return InputObjectType;
513
+ }(Type);
514
+
515
+ var Field = exports.Field = function Field(introspectionField) {
516
+ _classCallCheck(this, Field);
517
+
518
+ if (!(typeof introspectionField.name === 'string')) {
519
+ throw new Error('Function "Field" precondition failed: typeof introspectionField.name === \'string\'');
520
+ }
521
+
522
+ if (!(introspectionField.description === null || typeof introspectionField.description === 'string')) {
523
+ throw new Error('Function "Field" precondition failed: introspectionField.description === null || typeof introspectionField.description === \'string\'');
524
+ }
525
+
526
+ if (!introspectionField.type) {
527
+ throw new Error('Function "Field" precondition failed: introspectionField.type');
528
+ }
529
+
530
+ if (!Array.isArray(introspectionField.args)) {
531
+ throw new Error('Function "Field" precondition failed: Array.isArray(introspectionField.args)');
532
+ }
533
+
534
+ this.name = introspectionField.name;
535
+ this.description = introspectionField.description;
536
+ this.args = introspectionField.args.map(function (a) {
537
+ return new InputValue(a);
538
+ });
539
+ this.type = TypeRef.fromIntrospectionRef(introspectionField.type);
540
+ };
541
+
542
+ var InputValue = exports.InputValue = function InputValue(introspectionValue) {
543
+ _classCallCheck(this, InputValue);
544
+
545
+ if (!(typeof introspectionValue.name === 'string')) {
546
+ throw new Error('Function "InputValue" precondition failed: typeof introspectionValue.name === \'string\'');
547
+ }
548
+
549
+ if (!(introspectionValue.description === null || typeof introspectionValue.description === 'string')) {
550
+ throw new Error('Function "InputValue" precondition failed: introspectionValue.description === null || typeof introspectionValue.description === \'string\'');
551
+ }
552
+
553
+ if (!introspectionValue.type) {
554
+ throw new Error('Function "InputValue" precondition failed: introspectionValue.type');
555
+ }
556
+
557
+ if (!(introspectionValue.defaultValue !== undefined)) {
558
+ throw new Error('Function "InputValue" precondition failed: introspectionValue.defaultValue !== undefined');
559
+ }
560
+
561
+ this.name = introspectionValue.name;
562
+ this.type = TypeRef.fromIntrospectionRef(introspectionValue.type);
563
+ this.description = introspectionValue.description;
564
+ this.defaultValue = introspectionValue.defaultValue;
565
+ };
566
+
567
+ var TypeRef = exports.TypeRef = function () {
568
+ function TypeRef() {
569
+ _classCallCheck(this, TypeRef);
570
+
571
+ if (!(this.constructor !== TypeRef)) {
572
+ throw new Error('Function "TypeRef" precondition failed: this.constructor !== TypeRef');
573
+ }
574
+ }
575
+
576
+ _createClass(TypeRef, null, [{
577
+ key: 'fromIntrospectionRef',
578
+ value: function fromIntrospectionRef(introspectionRef) {
579
+ if (introspectionRef.kind === 'NON_NULL') {
580
+ return new NonNullTypeRef(introspectionRef);
581
+ } else if (introspectionRef.kind === 'LIST') {
582
+ return new ListTypeRef(introspectionRef);
583
+ } else if (TYPE_KINDS.indexOf(introspectionRef.kind) !== -1) {
584
+ return new NamedTypeRef(introspectionRef);
585
+ } else {
586
+ throw new Error('Unsupported type ref kind: ' + introspectionRef.kind);
587
+ }
588
+ }
589
+ }]);
590
+
591
+ return TypeRef;
592
+ }();
593
+
594
+ var NonNullTypeRef = exports.NonNullTypeRef = function (_TypeRef) {
595
+ _inherits(NonNullTypeRef, _TypeRef);
596
+
597
+ function NonNullTypeRef(introspectionRef) {
598
+ _classCallCheck(this, NonNullTypeRef);
599
+
600
+ if (!introspectionRef.ofType) {
601
+ throw new Error('Function "NonNullTypeRef" precondition failed: introspectionRef.ofType');
602
+ }
603
+
604
+ var _this7 = _possibleConstructorReturn(this, (NonNullTypeRef.__proto__ || Object.getPrototypeOf(NonNullTypeRef)).call(this));
605
+
606
+ _this7.ofType = TypeRef.fromIntrospectionRef(introspectionRef.ofType);
607
+ return _this7;
608
+ }
609
+
610
+ return NonNullTypeRef;
611
+ }(TypeRef);
612
+
613
+ var NamedTypeRef = exports.NamedTypeRef = function (_TypeRef2) {
614
+ _inherits(NamedTypeRef, _TypeRef2);
615
+
616
+ function NamedTypeRef(introspectionRef) {
617
+ _classCallCheck(this, NamedTypeRef);
618
+
619
+ if (!(typeof introspectionRef.name === 'string')) {
620
+ throw new Error('Function "NamedTypeRef" precondition failed: typeof introspectionRef.name === \'string\'');
621
+ }
622
+
623
+ var _this8 = _possibleConstructorReturn(this, (NamedTypeRef.__proto__ || Object.getPrototypeOf(NamedTypeRef)).call(this));
624
+
625
+ _this8.typeName = introspectionRef.name;
626
+ return _this8;
627
+ }
628
+
629
+ return NamedTypeRef;
630
+ }(TypeRef);
631
+
632
+ var ListTypeRef = exports.ListTypeRef = function (_TypeRef3) {
633
+ _inherits(ListTypeRef, _TypeRef3);
634
+
635
+ function ListTypeRef(introspectionRef) {
636
+ _classCallCheck(this, ListTypeRef);
637
+
638
+ if (!introspectionRef.ofType) {
639
+ throw new Error('Function "ListTypeRef" precondition failed: introspectionRef.ofType');
640
+ }
641
+
642
+ var _this9 = _possibleConstructorReturn(this, (ListTypeRef.__proto__ || Object.getPrototypeOf(ListTypeRef)).call(this));
643
+
644
+ _this9.ofType = TypeRef.fromIntrospectionRef(introspectionRef.ofType);
645
+ return _this9;
646
+ }
647
+
648
+ return ListTypeRef;
649
+ }(TypeRef);
650
+
651
+ var EnumValue = exports.EnumValue = function EnumValue(introspectionValue) {
652
+ _classCallCheck(this, EnumValue);
653
+
654
+ if (!(typeof introspectionValue.name === 'string')) {
655
+ throw new Error('Function "EnumValue" precondition failed: typeof introspectionValue.name === \'string\'');
656
+ }
657
+
658
+ if (!(introspectionValue.description === null || typeof introspectionValue.description === 'string')) {
659
+ throw new Error('Function "EnumValue" precondition failed: introspectionValue.description === null || typeof introspectionValue.description === \'string\'');
660
+ }
661
+
662
+ if (!(typeof introspectionValue.isDeprecated === 'boolean')) {
663
+ throw new Error('Function "EnumValue" precondition failed: typeof introspectionValue.isDeprecated === \'boolean\'');
664
+ }
665
+
666
+ if (!(!introspectionValue.isDeprecated || typeof introspectionValue.deprecationReason === 'string')) {
667
+ throw new Error('Function "EnumValue" precondition failed: !introspectionValue.isDeprecated || typeof introspectionValue.deprecationReason === \'string\'');
668
+ }
669
+
670
+ if (!(introspectionValue.isDeprecated || introspectionValue.deprecationReason === null)) {
671
+ throw new Error('Function "EnumValue" precondition failed: introspectionValue.isDeprecated || introspectionValue.deprecationReason === null');
672
+ }
673
+
674
+ this.name = introspectionValue.name;
675
+ this.description = introspectionValue.description;
676
+ this.isDeprecated = introspectionValue.isDeprecated;
677
+ this.deprecationReason = introspectionValue.deprecationReason;
678
+ };
679
+
680
+ /***/ },
681
+ /* 4 */
682
+ /***/ function(module, exports, __webpack_require__) {
683
+
684
+ 'use strict';
685
+
686
+ Object.defineProperty(exports, "__esModule", {
687
+ value: true
688
+ });
689
+ exports.getReferencesInSchema = getReferencesInSchema;
690
+
691
+ var _model = __webpack_require__(3);
692
+
693
+ function getReferencesInSchema(schema) {
694
+ var visitQueue = [];
695
+ var visited = [];
696
+
697
+ visitQueue.push(schema.getQueryType().name);
698
+
699
+ var mutationType = schema.getMutationType();
700
+ if (mutationType) {
701
+ visitQueue.push(mutationType.name);
702
+ }
703
+
704
+ while (visitQueue.length) {
705
+ var typeId = visitQueue.shift();
706
+ if (visited.indexOf(typeId) !== -1) {
707
+ continue;
708
+ }
709
+
710
+ var type = schema.types[typeId];
711
+
712
+ if (!type) {
713
+ throw new Error('Type ' + typeId + ' not found in schema');
714
+ }
715
+
716
+ var newRefs = getReferencesInType(type);
717
+
718
+ visited.push(typeId);
719
+
720
+ [].push.apply(visitQueue, Object.keys(newRefs));
721
+ }
722
+
723
+ return visited;
724
+ }
725
+
726
+ function getReferencesInType(type) {
727
+ var refs = {};
728
+ addTypeToBag(type, refs);
729
+
730
+ if (type instanceof _model.ObjectType) {
731
+ type.fields.forEach(function (f) {
732
+ return getReferencesInField(f, refs);
733
+ });
734
+ type.interfaces.forEach(function (r) {
735
+ return addTypeRefToBag(r, refs);
736
+ });
737
+ }
738
+
739
+ if (type instanceof _model.InterfaceType) {
740
+ type.fields.forEach(function (f) {
741
+ return getReferencesInField(f, refs);
742
+ });
743
+ type.possibleTypes.forEach(function (r) {
744
+ return addTypeRefToBag(r, refs);
745
+ });
746
+ }
747
+
748
+ if (type instanceof _model.InputObjectType) {
749
+ type.inputFields.forEach(function (iv) {
750
+ return addTypeRefToBag(iv.type, refs);
751
+ });
752
+ }
753
+
754
+ return refs;
755
+ }
756
+
757
+ function getReferencesInField(field, refs) {
758
+ addTypeRefToBag(field.type, refs);
759
+
760
+ field.args.forEach(function (arg) {
761
+ return addTypeRefToBag(arg.type, refs);
762
+ });
763
+ }
764
+
765
+ function addTypeRefToBag(typeRef, refs) {
766
+ if (typeRef instanceof _model.NonNullTypeRef) {
767
+ addTypeRefToBag(typeRef.ofType, refs);
768
+ } else if (typeRef instanceof _model.ListTypeRef) {
769
+ addTypeRefToBag(typeRef.ofType, refs);
770
+ } else if (typeRef instanceof _model.NamedTypeRef) {
771
+ refs[typeRef.typeName] = (refs[typeRef.typeName] || 0) + 1;
772
+ } else {
773
+ throw new Error('Unknown type ref: ' + typeRef.toString());
774
+ }
775
+ }
776
+
777
+ function addTypeToBag(type, refs) {
778
+ refs[type.name] = (refs[type.name] || 0) + 1;
779
+ }
780
+
781
+ /***/ },
782
+ /* 5 */
783
+ /***/ function(module, exports, __webpack_require__) {
784
+
785
+ 'use strict';
786
+
787
+ Object.defineProperty(exports, "__esModule", {
788
+ value: true
789
+ });
790
+ exports.InputObjectDocsView = exports.ScalarDocsView = exports.EnumDocsView = exports.InterfaceDocsView = exports.ObjectDocsView = undefined;
791
+
792
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
793
+
794
+ var _react = __webpack_require__(1);
795
+
796
+ var _react2 = _interopRequireDefault(_react);
797
+
798
+ var _model = __webpack_require__(3);
799
+
800
+ var _DescriptionView = __webpack_require__(6);
801
+
802
+ var _FieldView = __webpack_require__(12);
803
+
804
+ var _TypeRefView = __webpack_require__(14);
805
+
806
+ var _FieldArgumentsTableView = __webpack_require__(20);
807
+
808
+ var _TypeDocsViews = __webpack_require__(25);
809
+
810
+ var StyleSheet = _interopRequireWildcard(_TypeDocsViews);
811
+
812
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
813
+
814
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
815
+
816
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
817
+
818
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
819
+
820
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
821
+
822
+ var ObjectDocsView = exports.ObjectDocsView = function (_React$Component) {
823
+ _inherits(ObjectDocsView, _React$Component);
824
+
825
+ function ObjectDocsView() {
826
+ _classCallCheck(this, ObjectDocsView);
827
+
828
+ return _possibleConstructorReturn(this, (ObjectDocsView.__proto__ || Object.getPrototypeOf(ObjectDocsView)).apply(this, arguments));
829
+ }
830
+
831
+ _createClass(ObjectDocsView, [{
832
+ key: 'render',
833
+ value: function render() {
834
+ var type = this.props.type;
835
+ return _react2.default.createElement(
836
+ 'div',
837
+ { className: StyleSheet.type },
838
+ renderTitle(type.name, this.props.titleOverride),
839
+ renderDescription(type.description),
840
+ renderInterfaces(type.interfaces),
841
+ renderFields(type.fields)
842
+ );
843
+ }
844
+ }]);
845
+
846
+ return ObjectDocsView;
847
+ }(_react2.default.Component);
848
+
849
+ ObjectDocsView.defaultProps = {
850
+ titleOverride: null
851
+ };
852
+
853
+ var InterfaceDocsView = exports.InterfaceDocsView = function (_React$Component2) {
854
+ _inherits(InterfaceDocsView, _React$Component2);
855
+
856
+ function InterfaceDocsView() {
857
+ _classCallCheck(this, InterfaceDocsView);
858
+
859
+ return _possibleConstructorReturn(this, (InterfaceDocsView.__proto__ || Object.getPrototypeOf(InterfaceDocsView)).apply(this, arguments));
860
+ }
861
+
862
+ _createClass(InterfaceDocsView, [{
863
+ key: 'render',
864
+ value: function render() {
865
+ var type = this.props.type;
866
+ return _react2.default.createElement(
867
+ 'div',
868
+ { className: StyleSheet.type },
869
+ renderTitle(type.name),
870
+ renderDescription(type.description),
871
+ renderImplementors(type.possibleTypes),
872
+ renderFields(type.fields)
873
+ );
874
+ }
875
+ }]);
876
+
877
+ return InterfaceDocsView;
878
+ }(_react2.default.Component);
879
+
880
+ var EnumDocsView = exports.EnumDocsView = function (_React$Component3) {
881
+ _inherits(EnumDocsView, _React$Component3);
882
+
883
+ function EnumDocsView() {
884
+ _classCallCheck(this, EnumDocsView);
885
+
886
+ return _possibleConstructorReturn(this, (EnumDocsView.__proto__ || Object.getPrototypeOf(EnumDocsView)).apply(this, arguments));
887
+ }
888
+
889
+ _createClass(EnumDocsView, [{
890
+ key: 'render',
891
+ value: function render() {
892
+ var type = this.props.type;
893
+ return _react2.default.createElement(
894
+ 'div',
895
+ { className: StyleSheet.type },
896
+ renderTitle(type.name),
897
+ renderDescription(type.description),
898
+ renderEnumValues(type.enumValues)
899
+ );
900
+ }
901
+ }]);
902
+
903
+ return EnumDocsView;
904
+ }(_react2.default.Component);
905
+
906
+ var ScalarDocsView = exports.ScalarDocsView = function (_React$Component4) {
907
+ _inherits(ScalarDocsView, _React$Component4);
908
+
909
+ function ScalarDocsView() {
910
+ _classCallCheck(this, ScalarDocsView);
911
+
912
+ return _possibleConstructorReturn(this, (ScalarDocsView.__proto__ || Object.getPrototypeOf(ScalarDocsView)).apply(this, arguments));
913
+ }
914
+
915
+ _createClass(ScalarDocsView, [{
916
+ key: 'render',
917
+ value: function render() {
918
+ var type = this.props.type;
919
+ return _react2.default.createElement(
920
+ 'div',
921
+ { className: StyleSheet.type },
922
+ renderTitle(type.name),
923
+ renderDescription(type.description)
924
+ );
925
+ }
926
+ }]);
927
+
928
+ return ScalarDocsView;
929
+ }(_react2.default.Component);
930
+
931
+ var InputObjectDocsView = exports.InputObjectDocsView = function (_React$Component5) {
932
+ _inherits(InputObjectDocsView, _React$Component5);
933
+
934
+ function InputObjectDocsView() {
935
+ _classCallCheck(this, InputObjectDocsView);
936
+
937
+ return _possibleConstructorReturn(this, (InputObjectDocsView.__proto__ || Object.getPrototypeOf(InputObjectDocsView)).apply(this, arguments));
938
+ }
939
+
940
+ _createClass(InputObjectDocsView, [{
941
+ key: 'render',
942
+ value: function render() {
943
+ var type = this.props.type;
944
+
945
+ return _react2.default.createElement(
946
+ 'div',
947
+ { className: StyleSheet.type },
948
+ renderTitle(type.name),
949
+ renderDescription(type.description),
950
+ _react2.default.createElement(_FieldArgumentsTableView.FieldArgumentsTableView, {
951
+ args: type.inputFields
952
+ })
953
+ );
954
+ }
955
+ }]);
956
+
957
+ return InputObjectDocsView;
958
+ }(_react2.default.Component);
959
+
960
+ function renderTitle(typeName) {
961
+ var titleOverride = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
962
+
963
+ return _react2.default.createElement(
964
+ 'h2',
965
+ { className: StyleSheet.heading },
966
+ _react2.default.createElement('a', { name: typeName }),
967
+ titleOverride || typeName
968
+ );
969
+ }
970
+
971
+ function renderDescription(description) {
972
+ if (!description) {
973
+ return null;
974
+ }
975
+
976
+ return _react2.default.createElement(
977
+ 'div',
978
+ null,
979
+ _react2.default.createElement(_DescriptionView.DescriptionView, { description: description })
980
+ );
981
+ }
982
+
983
+ function renderFields(fields) {
984
+ return _react2.default.createElement(
985
+ 'div',
986
+ null,
987
+ _react2.default.createElement(
988
+ 'div',
989
+ { className: StyleSheet.subHeading },
990
+ 'Fields'
991
+ ),
992
+ fields.map(function (f) {
993
+ return _react2.default.createElement(_FieldView.FieldView, { key: f.name, field: f });
994
+ })
995
+ );
996
+ }
997
+
998
+ function renderInterfaces(interfaces) {
999
+ if (!interfaces.length) {
1000
+ return null;
1001
+ }
1002
+
1003
+ return _react2.default.createElement(
1004
+ 'div',
1005
+ null,
1006
+ _react2.default.createElement(
1007
+ 'div',
1008
+ { className: StyleSheet.subHeading },
1009
+ 'Implements'
1010
+ ),
1011
+ _react2.default.createElement(
1012
+ 'ul',
1013
+ { className: StyleSheet.interfacesList },
1014
+ interfaces.map(function (r, i) {
1015
+ return _react2.default.createElement(
1016
+ 'li',
1017
+ { key: i },
1018
+ _react2.default.createElement(_TypeRefView.TypeRefView, { key: i, typeRef: r })
1019
+ );
1020
+ })
1021
+ )
1022
+ );
1023
+ }
1024
+
1025
+ function renderImplementors(possibleTypes) {
1026
+ if (!possibleTypes.length) {
1027
+ return null;
1028
+ }
1029
+
1030
+ return _react2.default.createElement(
1031
+ 'div',
1032
+ null,
1033
+ _react2.default.createElement(
1034
+ 'div',
1035
+ { className: StyleSheet.subHeading },
1036
+ 'Implemented by'
1037
+ ),
1038
+ _react2.default.createElement(
1039
+ 'ul',
1040
+ { className: StyleSheet.interfacesList },
1041
+ possibleTypes.map(function (r, i) {
1042
+ return _react2.default.createElement(
1043
+ 'li',
1044
+ { key: i },
1045
+ _react2.default.createElement(_TypeRefView.TypeRefView, { key: i, typeRef: r })
1046
+ );
1047
+ })
1048
+ )
1049
+ );
1050
+ }
1051
+
1052
+ function renderEnumValues(enumValues) {
1053
+ if (!enumValues.length) {
1054
+ return null;
1055
+ }
1056
+
1057
+ return _react2.default.createElement(
1058
+ 'div',
1059
+ null,
1060
+ _react2.default.createElement(
1061
+ 'div',
1062
+ { className: StyleSheet.subHeading },
1063
+ 'Possible Enum Values'
1064
+ ),
1065
+ _react2.default.createElement(
1066
+ 'table',
1067
+ null,
1068
+ _react2.default.createElement(
1069
+ 'tbody',
1070
+ null,
1071
+ enumValues.map(function (v) {
1072
+ return _react2.default.createElement(
1073
+ 'tr',
1074
+ {
1075
+ key: v.name,
1076
+ className: StyleSheet.enumRow
1077
+ },
1078
+ _react2.default.createElement(
1079
+ 'td',
1080
+ {
1081
+ className: StyleSheet.enumName
1082
+ },
1083
+ v.name
1084
+ ),
1085
+ _react2.default.createElement(
1086
+ 'td',
1087
+ null,
1088
+ v.description && _react2.default.createElement(_DescriptionView.DescriptionView, { description: v.description })
1089
+ )
1090
+ );
1091
+ })
1092
+ )
1093
+ )
1094
+ );
1095
+ }
1096
+
1097
+ /***/ },
1098
+ /* 6 */
1099
+ /***/ function(module, exports, __webpack_require__) {
1100
+
1101
+ 'use strict';
1102
+
1103
+ Object.defineProperty(exports, "__esModule", {
1104
+ value: true
1105
+ });
1106
+ exports.DescriptionView = undefined;
1107
+
1108
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1109
+
1110
+ var _react = __webpack_require__(1);
1111
+
1112
+ var _react2 = _interopRequireDefault(_react);
1113
+
1114
+ var _marked = __webpack_require__(7);
1115
+
1116
+ var _marked2 = _interopRequireDefault(_marked);
1117
+
1118
+ var _DescriptionView = __webpack_require__(8);
1119
+
1120
+ var StyleSheet = _interopRequireWildcard(_DescriptionView);
1121
+
1122
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
1123
+
1124
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1125
+
1126
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1127
+
1128
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
1129
+
1130
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
1131
+
1132
+ var DescriptionView = exports.DescriptionView = function (_React$Component) {
1133
+ _inherits(DescriptionView, _React$Component);
1134
+
1135
+ function DescriptionView() {
1136
+ _classCallCheck(this, DescriptionView);
1137
+
1138
+ return _possibleConstructorReturn(this, (DescriptionView.__proto__ || Object.getPrototypeOf(DescriptionView)).apply(this, arguments));
1139
+ }
1140
+
1141
+ _createClass(DescriptionView, [{
1142
+ key: 'render',
1143
+ value: function render() {
1144
+ var html = (0, _marked2.default)(this.props.description);
1145
+
1146
+ return _react2.default.createElement('div', {
1147
+ className: [StyleSheet.container, this.props.className].join(' '),
1148
+ dangerouslySetInnerHTML: { __html: html }
1149
+ });
1150
+ }
1151
+ }]);
1152
+
1153
+ return DescriptionView;
1154
+ }(_react2.default.Component);
1155
+
1156
+ DescriptionView.defaultProps = {
1157
+ className: ''
1158
+ };
1159
+
1160
+ /***/ },
1161
+ /* 7 */
1162
+ /***/ function(module, exports, __webpack_require__) {
1163
+
1164
+ /* WEBPACK VAR INJECTION */(function(global) {/**
1165
+ * marked - a markdown parser
1166
+ * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
1167
+ * https://github.com/chjj/marked
1168
+ */
1169
+
1170
+ ;(function() {
1171
+
1172
+ /**
1173
+ * Block-Level Grammar
1174
+ */
1175
+
1176
+ var block = {
1177
+ newline: /^\n+/,
1178
+ code: /^( {4}[^\n]+\n*)+/,
1179
+ fences: noop,
1180
+ hr: /^( *[-*_]){3,} *(?:\n+|$)/,
1181
+ heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,
1182
+ nptable: noop,
1183
+ lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,
1184
+ blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,
1185
+ list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
1186
+ html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,
1187
+ def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,
1188
+ table: noop,
1189
+ paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,
1190
+ text: /^[^\n]+/
1191
+ };
1192
+
1193
+ block.bullet = /(?:[*+-]|\d+\.)/;
1194
+ block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;
1195
+ block.item = replace(block.item, 'gm')
1196
+ (/bull/g, block.bullet)
1197
+ ();
1198
+
1199
+ block.list = replace(block.list)
1200
+ (/bull/g, block.bullet)
1201
+ ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))')
1202
+ ('def', '\\n+(?=' + block.def.source + ')')
1203
+ ();
1204
+
1205
+ block.blockquote = replace(block.blockquote)
1206
+ ('def', block.def)
1207
+ ();
1208
+
1209
+ block._tag = '(?!(?:'
1210
+ + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code'
1211
+ + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo'
1212
+ + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b';
1213
+
1214
+ block.html = replace(block.html)
1215
+ ('comment', /<!--[\s\S]*?-->/)
1216
+ ('closed', /<(tag)[\s\S]+?<\/\1>/)
1217
+ ('closing', /<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)
1218
+ (/tag/g, block._tag)
1219
+ ();
1220
+
1221
+ block.paragraph = replace(block.paragraph)
1222
+ ('hr', block.hr)
1223
+ ('heading', block.heading)
1224
+ ('lheading', block.lheading)
1225
+ ('blockquote', block.blockquote)
1226
+ ('tag', '<' + block._tag)
1227
+ ('def', block.def)
1228
+ ();
1229
+
1230
+ /**
1231
+ * Normal Block Grammar
1232
+ */
1233
+
1234
+ block.normal = merge({}, block);
1235
+
1236
+ /**
1237
+ * GFM Block Grammar
1238
+ */
1239
+
1240
+ block.gfm = merge({}, block.normal, {
1241
+ fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,
1242
+ paragraph: /^/,
1243
+ heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/
1244
+ });
1245
+
1246
+ block.gfm.paragraph = replace(block.paragraph)
1247
+ ('(?!', '(?!'
1248
+ + block.gfm.fences.source.replace('\\1', '\\2') + '|'
1249
+ + block.list.source.replace('\\1', '\\3') + '|')
1250
+ ();
1251
+
1252
+ /**
1253
+ * GFM + Tables Block Grammar
1254
+ */
1255
+
1256
+ block.tables = merge({}, block.gfm, {
1257
+ nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,
1258
+ table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/
1259
+ });
1260
+
1261
+ /**
1262
+ * Block Lexer
1263
+ */
1264
+
1265
+ function Lexer(options) {
1266
+ this.tokens = [];
1267
+ this.tokens.links = {};
1268
+ this.options = options || marked.defaults;
1269
+ this.rules = block.normal;
1270
+
1271
+ if (this.options.gfm) {
1272
+ if (this.options.tables) {
1273
+ this.rules = block.tables;
1274
+ } else {
1275
+ this.rules = block.gfm;
1276
+ }
1277
+ }
1278
+ }
1279
+
1280
+ /**
1281
+ * Expose Block Rules
1282
+ */
1283
+
1284
+ Lexer.rules = block;
1285
+
1286
+ /**
1287
+ * Static Lex Method
1288
+ */
1289
+
1290
+ Lexer.lex = function(src, options) {
1291
+ var lexer = new Lexer(options);
1292
+ return lexer.lex(src);
1293
+ };
1294
+
1295
+ /**
1296
+ * Preprocessing
1297
+ */
1298
+
1299
+ Lexer.prototype.lex = function(src) {
1300
+ src = src
1301
+ .replace(/\r\n|\r/g, '\n')
1302
+ .replace(/\t/g, ' ')
1303
+ .replace(/\u00a0/g, ' ')
1304
+ .replace(/\u2424/g, '\n');
1305
+
1306
+ return this.token(src, true);
1307
+ };
1308
+
1309
+ /**
1310
+ * Lexing
1311
+ */
1312
+
1313
+ Lexer.prototype.token = function(src, top, bq) {
1314
+ var src = src.replace(/^ +$/gm, '')
1315
+ , next
1316
+ , loose
1317
+ , cap
1318
+ , bull
1319
+ , b
1320
+ , item
1321
+ , space
1322
+ , i
1323
+ , l;
1324
+
1325
+ while (src) {
1326
+ // newline
1327
+ if (cap = this.rules.newline.exec(src)) {
1328
+ src = src.substring(cap[0].length);
1329
+ if (cap[0].length > 1) {
1330
+ this.tokens.push({
1331
+ type: 'space'
1332
+ });
1333
+ }
1334
+ }
1335
+
1336
+ // code
1337
+ if (cap = this.rules.code.exec(src)) {
1338
+ src = src.substring(cap[0].length);
1339
+ cap = cap[0].replace(/^ {4}/gm, '');
1340
+ this.tokens.push({
1341
+ type: 'code',
1342
+ text: !this.options.pedantic
1343
+ ? cap.replace(/\n+$/, '')
1344
+ : cap
1345
+ });
1346
+ continue;
1347
+ }
1348
+
1349
+ // fences (gfm)
1350
+ if (cap = this.rules.fences.exec(src)) {
1351
+ src = src.substring(cap[0].length);
1352
+ this.tokens.push({
1353
+ type: 'code',
1354
+ lang: cap[2],
1355
+ text: cap[3] || ''
1356
+ });
1357
+ continue;
1358
+ }
1359
+
1360
+ // heading
1361
+ if (cap = this.rules.heading.exec(src)) {
1362
+ src = src.substring(cap[0].length);
1363
+ this.tokens.push({
1364
+ type: 'heading',
1365
+ depth: cap[1].length,
1366
+ text: cap[2]
1367
+ });
1368
+ continue;
1369
+ }
1370
+
1371
+ // table no leading pipe (gfm)
1372
+ if (top && (cap = this.rules.nptable.exec(src))) {
1373
+ src = src.substring(cap[0].length);
1374
+
1375
+ item = {
1376
+ type: 'table',
1377
+ header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),
1378
+ align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
1379
+ cells: cap[3].replace(/\n$/, '').split('\n')
1380
+ };
1381
+
1382
+ for (i = 0; i < item.align.length; i++) {
1383
+ if (/^ *-+: *$/.test(item.align[i])) {
1384
+ item.align[i] = 'right';
1385
+ } else if (/^ *:-+: *$/.test(item.align[i])) {
1386
+ item.align[i] = 'center';
1387
+ } else if (/^ *:-+ *$/.test(item.align[i])) {
1388
+ item.align[i] = 'left';
1389
+ } else {
1390
+ item.align[i] = null;
1391
+ }
1392
+ }
1393
+
1394
+ for (i = 0; i < item.cells.length; i++) {
1395
+ item.cells[i] = item.cells[i].split(/ *\| */);
1396
+ }
1397
+
1398
+ this.tokens.push(item);
1399
+
1400
+ continue;
1401
+ }
1402
+
1403
+ // lheading
1404
+ if (cap = this.rules.lheading.exec(src)) {
1405
+ src = src.substring(cap[0].length);
1406
+ this.tokens.push({
1407
+ type: 'heading',
1408
+ depth: cap[2] === '=' ? 1 : 2,
1409
+ text: cap[1]
1410
+ });
1411
+ continue;
1412
+ }
1413
+
1414
+ // hr
1415
+ if (cap = this.rules.hr.exec(src)) {
1416
+ src = src.substring(cap[0].length);
1417
+ this.tokens.push({
1418
+ type: 'hr'
1419
+ });
1420
+ continue;
1421
+ }
1422
+
1423
+ // blockquote
1424
+ if (cap = this.rules.blockquote.exec(src)) {
1425
+ src = src.substring(cap[0].length);
1426
+
1427
+ this.tokens.push({
1428
+ type: 'blockquote_start'
1429
+ });
1430
+
1431
+ cap = cap[0].replace(/^ *> ?/gm, '');
1432
+
1433
+ // Pass `top` to keep the current
1434
+ // "toplevel" state. This is exactly
1435
+ // how markdown.pl works.
1436
+ this.token(cap, top, true);
1437
+
1438
+ this.tokens.push({
1439
+ type: 'blockquote_end'
1440
+ });
1441
+
1442
+ continue;
1443
+ }
1444
+
1445
+ // list
1446
+ if (cap = this.rules.list.exec(src)) {
1447
+ src = src.substring(cap[0].length);
1448
+ bull = cap[2];
1449
+
1450
+ this.tokens.push({
1451
+ type: 'list_start',
1452
+ ordered: bull.length > 1
1453
+ });
1454
+
1455
+ // Get each top-level item.
1456
+ cap = cap[0].match(this.rules.item);
1457
+
1458
+ next = false;
1459
+ l = cap.length;
1460
+ i = 0;
1461
+
1462
+ for (; i < l; i++) {
1463
+ item = cap[i];
1464
+
1465
+ // Remove the list item's bullet
1466
+ // so it is seen as the next token.
1467
+ space = item.length;
1468
+ item = item.replace(/^ *([*+-]|\d+\.) +/, '');
1469
+
1470
+ // Outdent whatever the
1471
+ // list item contains. Hacky.
1472
+ if (~item.indexOf('\n ')) {
1473
+ space -= item.length;
1474
+ item = !this.options.pedantic
1475
+ ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')
1476
+ : item.replace(/^ {1,4}/gm, '');
1477
+ }
1478
+
1479
+ // Determine whether the next list item belongs here.
1480
+ // Backpedal if it does not belong in this list.
1481
+ if (this.options.smartLists && i !== l - 1) {
1482
+ b = block.bullet.exec(cap[i + 1])[0];
1483
+ if (bull !== b && !(bull.length > 1 && b.length > 1)) {
1484
+ src = cap.slice(i + 1).join('\n') + src;
1485
+ i = l - 1;
1486
+ }
1487
+ }
1488
+
1489
+ // Determine whether item is loose or not.
1490
+ // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/
1491
+ // for discount behavior.
1492
+ loose = next || /\n\n(?!\s*$)/.test(item);
1493
+ if (i !== l - 1) {
1494
+ next = item.charAt(item.length - 1) === '\n';
1495
+ if (!loose) loose = next;
1496
+ }
1497
+
1498
+ this.tokens.push({
1499
+ type: loose
1500
+ ? 'loose_item_start'
1501
+ : 'list_item_start'
1502
+ });
1503
+
1504
+ // Recurse.
1505
+ this.token(item, false, bq);
1506
+
1507
+ this.tokens.push({
1508
+ type: 'list_item_end'
1509
+ });
1510
+ }
1511
+
1512
+ this.tokens.push({
1513
+ type: 'list_end'
1514
+ });
1515
+
1516
+ continue;
1517
+ }
1518
+
1519
+ // html
1520
+ if (cap = this.rules.html.exec(src)) {
1521
+ src = src.substring(cap[0].length);
1522
+ this.tokens.push({
1523
+ type: this.options.sanitize
1524
+ ? 'paragraph'
1525
+ : 'html',
1526
+ pre: !this.options.sanitizer
1527
+ && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),
1528
+ text: cap[0]
1529
+ });
1530
+ continue;
1531
+ }
1532
+
1533
+ // def
1534
+ if ((!bq && top) && (cap = this.rules.def.exec(src))) {
1535
+ src = src.substring(cap[0].length);
1536
+ this.tokens.links[cap[1].toLowerCase()] = {
1537
+ href: cap[2],
1538
+ title: cap[3]
1539
+ };
1540
+ continue;
1541
+ }
1542
+
1543
+ // table (gfm)
1544
+ if (top && (cap = this.rules.table.exec(src))) {
1545
+ src = src.substring(cap[0].length);
1546
+
1547
+ item = {
1548
+ type: 'table',
1549
+ header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),
1550
+ align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
1551
+ cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n')
1552
+ };
1553
+
1554
+ for (i = 0; i < item.align.length; i++) {
1555
+ if (/^ *-+: *$/.test(item.align[i])) {
1556
+ item.align[i] = 'right';
1557
+ } else if (/^ *:-+: *$/.test(item.align[i])) {
1558
+ item.align[i] = 'center';
1559
+ } else if (/^ *:-+ *$/.test(item.align[i])) {
1560
+ item.align[i] = 'left';
1561
+ } else {
1562
+ item.align[i] = null;
1563
+ }
1564
+ }
1565
+
1566
+ for (i = 0; i < item.cells.length; i++) {
1567
+ item.cells[i] = item.cells[i]
1568
+ .replace(/^ *\| *| *\| *$/g, '')
1569
+ .split(/ *\| */);
1570
+ }
1571
+
1572
+ this.tokens.push(item);
1573
+
1574
+ continue;
1575
+ }
1576
+
1577
+ // top-level paragraph
1578
+ if (top && (cap = this.rules.paragraph.exec(src))) {
1579
+ src = src.substring(cap[0].length);
1580
+ this.tokens.push({
1581
+ type: 'paragraph',
1582
+ text: cap[1].charAt(cap[1].length - 1) === '\n'
1583
+ ? cap[1].slice(0, -1)
1584
+ : cap[1]
1585
+ });
1586
+ continue;
1587
+ }
1588
+
1589
+ // text
1590
+ if (cap = this.rules.text.exec(src)) {
1591
+ // Top-level should never reach here.
1592
+ src = src.substring(cap[0].length);
1593
+ this.tokens.push({
1594
+ type: 'text',
1595
+ text: cap[0]
1596
+ });
1597
+ continue;
1598
+ }
1599
+
1600
+ if (src) {
1601
+ throw new
1602
+ Error('Infinite loop on byte: ' + src.charCodeAt(0));
1603
+ }
1604
+ }
1605
+
1606
+ return this.tokens;
1607
+ };
1608
+
1609
+ /**
1610
+ * Inline-Level Grammar
1611
+ */
1612
+
1613
+ var inline = {
1614
+ escape: /^\\([\\`*{}\[\]()#+\-.!_>])/,
1615
+ autolink: /^<([^ >]+(@|:\/)[^ >]+)>/,
1616
+ url: noop,
1617
+ tag: /^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,
1618
+ link: /^!?\[(inside)\]\(href\)/,
1619
+ reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/,
1620
+ nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,
1621
+ strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,
1622
+ em: /^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,
1623
+ code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,
1624
+ br: /^ {2,}\n(?!\s*$)/,
1625
+ del: noop,
1626
+ text: /^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/
1627
+ };
1628
+
1629
+ inline._inside = /(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/;
1630
+ inline._href = /\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/;
1631
+
1632
+ inline.link = replace(inline.link)
1633
+ ('inside', inline._inside)
1634
+ ('href', inline._href)
1635
+ ();
1636
+
1637
+ inline.reflink = replace(inline.reflink)
1638
+ ('inside', inline._inside)
1639
+ ();
1640
+
1641
+ /**
1642
+ * Normal Inline Grammar
1643
+ */
1644
+
1645
+ inline.normal = merge({}, inline);
1646
+
1647
+ /**
1648
+ * Pedantic Inline Grammar
1649
+ */
1650
+
1651
+ inline.pedantic = merge({}, inline.normal, {
1652
+ strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,
1653
+ em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/
1654
+ });
1655
+
1656
+ /**
1657
+ * GFM Inline Grammar
1658
+ */
1659
+
1660
+ inline.gfm = merge({}, inline.normal, {
1661
+ escape: replace(inline.escape)('])', '~|])')(),
1662
+ url: /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,
1663
+ del: /^~~(?=\S)([\s\S]*?\S)~~/,
1664
+ text: replace(inline.text)
1665
+ (']|', '~]|')
1666
+ ('|', '|https?://|')
1667
+ ()
1668
+ });
1669
+
1670
+ /**
1671
+ * GFM + Line Breaks Inline Grammar
1672
+ */
1673
+
1674
+ inline.breaks = merge({}, inline.gfm, {
1675
+ br: replace(inline.br)('{2,}', '*')(),
1676
+ text: replace(inline.gfm.text)('{2,}', '*')()
1677
+ });
1678
+
1679
+ /**
1680
+ * Inline Lexer & Compiler
1681
+ */
1682
+
1683
+ function InlineLexer(links, options) {
1684
+ this.options = options || marked.defaults;
1685
+ this.links = links;
1686
+ this.rules = inline.normal;
1687
+ this.renderer = this.options.renderer || new Renderer;
1688
+ this.renderer.options = this.options;
1689
+
1690
+ if (!this.links) {
1691
+ throw new
1692
+ Error('Tokens array requires a `links` property.');
1693
+ }
1694
+
1695
+ if (this.options.gfm) {
1696
+ if (this.options.breaks) {
1697
+ this.rules = inline.breaks;
1698
+ } else {
1699
+ this.rules = inline.gfm;
1700
+ }
1701
+ } else if (this.options.pedantic) {
1702
+ this.rules = inline.pedantic;
1703
+ }
1704
+ }
1705
+
1706
+ /**
1707
+ * Expose Inline Rules
1708
+ */
1709
+
1710
+ InlineLexer.rules = inline;
1711
+
1712
+ /**
1713
+ * Static Lexing/Compiling Method
1714
+ */
1715
+
1716
+ InlineLexer.output = function(src, links, options) {
1717
+ var inline = new InlineLexer(links, options);
1718
+ return inline.output(src);
1719
+ };
1720
+
1721
+ /**
1722
+ * Lexing/Compiling
1723
+ */
1724
+
1725
+ InlineLexer.prototype.output = function(src) {
1726
+ var out = ''
1727
+ , link
1728
+ , text
1729
+ , href
1730
+ , cap;
1731
+
1732
+ while (src) {
1733
+ // escape
1734
+ if (cap = this.rules.escape.exec(src)) {
1735
+ src = src.substring(cap[0].length);
1736
+ out += cap[1];
1737
+ continue;
1738
+ }
1739
+
1740
+ // autolink
1741
+ if (cap = this.rules.autolink.exec(src)) {
1742
+ src = src.substring(cap[0].length);
1743
+ if (cap[2] === '@') {
1744
+ text = cap[1].charAt(6) === ':'
1745
+ ? this.mangle(cap[1].substring(7))
1746
+ : this.mangle(cap[1]);
1747
+ href = this.mangle('mailto:') + text;
1748
+ } else {
1749
+ text = escape(cap[1]);
1750
+ href = text;
1751
+ }
1752
+ out += this.renderer.link(href, null, text);
1753
+ continue;
1754
+ }
1755
+
1756
+ // url (gfm)
1757
+ if (!this.inLink && (cap = this.rules.url.exec(src))) {
1758
+ src = src.substring(cap[0].length);
1759
+ text = escape(cap[1]);
1760
+ href = text;
1761
+ out += this.renderer.link(href, null, text);
1762
+ continue;
1763
+ }
1764
+
1765
+ // tag
1766
+ if (cap = this.rules.tag.exec(src)) {
1767
+ if (!this.inLink && /^<a /i.test(cap[0])) {
1768
+ this.inLink = true;
1769
+ } else if (this.inLink && /^<\/a>/i.test(cap[0])) {
1770
+ this.inLink = false;
1771
+ }
1772
+ src = src.substring(cap[0].length);
1773
+ out += this.options.sanitize
1774
+ ? this.options.sanitizer
1775
+ ? this.options.sanitizer(cap[0])
1776
+ : escape(cap[0])
1777
+ : cap[0]
1778
+ continue;
1779
+ }
1780
+
1781
+ // link
1782
+ if (cap = this.rules.link.exec(src)) {
1783
+ src = src.substring(cap[0].length);
1784
+ this.inLink = true;
1785
+ out += this.outputLink(cap, {
1786
+ href: cap[2],
1787
+ title: cap[3]
1788
+ });
1789
+ this.inLink = false;
1790
+ continue;
1791
+ }
1792
+
1793
+ // reflink, nolink
1794
+ if ((cap = this.rules.reflink.exec(src))
1795
+ || (cap = this.rules.nolink.exec(src))) {
1796
+ src = src.substring(cap[0].length);
1797
+ link = (cap[2] || cap[1]).replace(/\s+/g, ' ');
1798
+ link = this.links[link.toLowerCase()];
1799
+ if (!link || !link.href) {
1800
+ out += cap[0].charAt(0);
1801
+ src = cap[0].substring(1) + src;
1802
+ continue;
1803
+ }
1804
+ this.inLink = true;
1805
+ out += this.outputLink(cap, link);
1806
+ this.inLink = false;
1807
+ continue;
1808
+ }
1809
+
1810
+ // strong
1811
+ if (cap = this.rules.strong.exec(src)) {
1812
+ src = src.substring(cap[0].length);
1813
+ out += this.renderer.strong(this.output(cap[2] || cap[1]));
1814
+ continue;
1815
+ }
1816
+
1817
+ // em
1818
+ if (cap = this.rules.em.exec(src)) {
1819
+ src = src.substring(cap[0].length);
1820
+ out += this.renderer.em(this.output(cap[2] || cap[1]));
1821
+ continue;
1822
+ }
1823
+
1824
+ // code
1825
+ if (cap = this.rules.code.exec(src)) {
1826
+ src = src.substring(cap[0].length);
1827
+ out += this.renderer.codespan(escape(cap[2], true));
1828
+ continue;
1829
+ }
1830
+
1831
+ // br
1832
+ if (cap = this.rules.br.exec(src)) {
1833
+ src = src.substring(cap[0].length);
1834
+ out += this.renderer.br();
1835
+ continue;
1836
+ }
1837
+
1838
+ // del (gfm)
1839
+ if (cap = this.rules.del.exec(src)) {
1840
+ src = src.substring(cap[0].length);
1841
+ out += this.renderer.del(this.output(cap[1]));
1842
+ continue;
1843
+ }
1844
+
1845
+ // text
1846
+ if (cap = this.rules.text.exec(src)) {
1847
+ src = src.substring(cap[0].length);
1848
+ out += this.renderer.text(escape(this.smartypants(cap[0])));
1849
+ continue;
1850
+ }
1851
+
1852
+ if (src) {
1853
+ throw new
1854
+ Error('Infinite loop on byte: ' + src.charCodeAt(0));
1855
+ }
1856
+ }
1857
+
1858
+ return out;
1859
+ };
1860
+
1861
+ /**
1862
+ * Compile Link
1863
+ */
1864
+
1865
+ InlineLexer.prototype.outputLink = function(cap, link) {
1866
+ var href = escape(link.href)
1867
+ , title = link.title ? escape(link.title) : null;
1868
+
1869
+ return cap[0].charAt(0) !== '!'
1870
+ ? this.renderer.link(href, title, this.output(cap[1]))
1871
+ : this.renderer.image(href, title, escape(cap[1]));
1872
+ };
1873
+
1874
+ /**
1875
+ * Smartypants Transformations
1876
+ */
1877
+
1878
+ InlineLexer.prototype.smartypants = function(text) {
1879
+ if (!this.options.smartypants) return text;
1880
+ return text
1881
+ // em-dashes
1882
+ .replace(/---/g, '\u2014')
1883
+ // en-dashes
1884
+ .replace(/--/g, '\u2013')
1885
+ // opening singles
1886
+ .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018')
1887
+ // closing singles & apostrophes
1888
+ .replace(/'/g, '\u2019')
1889
+ // opening doubles
1890
+ .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c')
1891
+ // closing doubles
1892
+ .replace(/"/g, '\u201d')
1893
+ // ellipses
1894
+ .replace(/\.{3}/g, '\u2026');
1895
+ };
1896
+
1897
+ /**
1898
+ * Mangle Links
1899
+ */
1900
+
1901
+ InlineLexer.prototype.mangle = function(text) {
1902
+ if (!this.options.mangle) return text;
1903
+ var out = ''
1904
+ , l = text.length
1905
+ , i = 0
1906
+ , ch;
1907
+
1908
+ for (; i < l; i++) {
1909
+ ch = text.charCodeAt(i);
1910
+ if (Math.random() > 0.5) {
1911
+ ch = 'x' + ch.toString(16);
1912
+ }
1913
+ out += '&#' + ch + ';';
1914
+ }
1915
+
1916
+ return out;
1917
+ };
1918
+
1919
+ /**
1920
+ * Renderer
1921
+ */
1922
+
1923
+ function Renderer(options) {
1924
+ this.options = options || {};
1925
+ }
1926
+
1927
+ Renderer.prototype.code = function(code, lang, escaped) {
1928
+ if (this.options.highlight) {
1929
+ var out = this.options.highlight(code, lang);
1930
+ if (out != null && out !== code) {
1931
+ escaped = true;
1932
+ code = out;
1933
+ }
1934
+ }
1935
+
1936
+ if (!lang) {
1937
+ return '<pre><code>'
1938
+ + (escaped ? code : escape(code, true))
1939
+ + '\n</code></pre>';
1940
+ }
1941
+
1942
+ return '<pre><code class="'
1943
+ + this.options.langPrefix
1944
+ + escape(lang, true)
1945
+ + '">'
1946
+ + (escaped ? code : escape(code, true))
1947
+ + '\n</code></pre>\n';
1948
+ };
1949
+
1950
+ Renderer.prototype.blockquote = function(quote) {
1951
+ return '<blockquote>\n' + quote + '</blockquote>\n';
1952
+ };
1953
+
1954
+ Renderer.prototype.html = function(html) {
1955
+ return html;
1956
+ };
1957
+
1958
+ Renderer.prototype.heading = function(text, level, raw) {
1959
+ return '<h'
1960
+ + level
1961
+ + ' id="'
1962
+ + this.options.headerPrefix
1963
+ + raw.toLowerCase().replace(/[^\w]+/g, '-')
1964
+ + '">'
1965
+ + text
1966
+ + '</h'
1967
+ + level
1968
+ + '>\n';
1969
+ };
1970
+
1971
+ Renderer.prototype.hr = function() {
1972
+ return this.options.xhtml ? '<hr/>\n' : '<hr>\n';
1973
+ };
1974
+
1975
+ Renderer.prototype.list = function(body, ordered) {
1976
+ var type = ordered ? 'ol' : 'ul';
1977
+ return '<' + type + '>\n' + body + '</' + type + '>\n';
1978
+ };
1979
+
1980
+ Renderer.prototype.listitem = function(text) {
1981
+ return '<li>' + text + '</li>\n';
1982
+ };
1983
+
1984
+ Renderer.prototype.paragraph = function(text) {
1985
+ return '<p>' + text + '</p>\n';
1986
+ };
1987
+
1988
+ Renderer.prototype.table = function(header, body) {
1989
+ return '<table>\n'
1990
+ + '<thead>\n'
1991
+ + header
1992
+ + '</thead>\n'
1993
+ + '<tbody>\n'
1994
+ + body
1995
+ + '</tbody>\n'
1996
+ + '</table>\n';
1997
+ };
1998
+
1999
+ Renderer.prototype.tablerow = function(content) {
2000
+ return '<tr>\n' + content + '</tr>\n';
2001
+ };
2002
+
2003
+ Renderer.prototype.tablecell = function(content, flags) {
2004
+ var type = flags.header ? 'th' : 'td';
2005
+ var tag = flags.align
2006
+ ? '<' + type + ' style="text-align:' + flags.align + '">'
2007
+ : '<' + type + '>';
2008
+ return tag + content + '</' + type + '>\n';
2009
+ };
2010
+
2011
+ // span level renderer
2012
+ Renderer.prototype.strong = function(text) {
2013
+ return '<strong>' + text + '</strong>';
2014
+ };
2015
+
2016
+ Renderer.prototype.em = function(text) {
2017
+ return '<em>' + text + '</em>';
2018
+ };
2019
+
2020
+ Renderer.prototype.codespan = function(text) {
2021
+ return '<code>' + text + '</code>';
2022
+ };
2023
+
2024
+ Renderer.prototype.br = function() {
2025
+ return this.options.xhtml ? '<br/>' : '<br>';
2026
+ };
2027
+
2028
+ Renderer.prototype.del = function(text) {
2029
+ return '<del>' + text + '</del>';
2030
+ };
2031
+
2032
+ Renderer.prototype.link = function(href, title, text) {
2033
+ if (this.options.sanitize) {
2034
+ try {
2035
+ var prot = decodeURIComponent(unescape(href))
2036
+ .replace(/[^\w:]/g, '')
2037
+ .toLowerCase();
2038
+ } catch (e) {
2039
+ return '';
2040
+ }
2041
+ if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0) {
2042
+ return '';
2043
+ }
2044
+ }
2045
+ var out = '<a href="' + href + '"';
2046
+ if (title) {
2047
+ out += ' title="' + title + '"';
2048
+ }
2049
+ out += '>' + text + '</a>';
2050
+ return out;
2051
+ };
2052
+
2053
+ Renderer.prototype.image = function(href, title, text) {
2054
+ var out = '<img src="' + href + '" alt="' + text + '"';
2055
+ if (title) {
2056
+ out += ' title="' + title + '"';
2057
+ }
2058
+ out += this.options.xhtml ? '/>' : '>';
2059
+ return out;
2060
+ };
2061
+
2062
+ Renderer.prototype.text = function(text) {
2063
+ return text;
2064
+ };
2065
+
2066
+ /**
2067
+ * Parsing & Compiling
2068
+ */
2069
+
2070
+ function Parser(options) {
2071
+ this.tokens = [];
2072
+ this.token = null;
2073
+ this.options = options || marked.defaults;
2074
+ this.options.renderer = this.options.renderer || new Renderer;
2075
+ this.renderer = this.options.renderer;
2076
+ this.renderer.options = this.options;
2077
+ }
2078
+
2079
+ /**
2080
+ * Static Parse Method
2081
+ */
2082
+
2083
+ Parser.parse = function(src, options, renderer) {
2084
+ var parser = new Parser(options, renderer);
2085
+ return parser.parse(src);
2086
+ };
2087
+
2088
+ /**
2089
+ * Parse Loop
2090
+ */
2091
+
2092
+ Parser.prototype.parse = function(src) {
2093
+ this.inline = new InlineLexer(src.links, this.options, this.renderer);
2094
+ this.tokens = src.reverse();
2095
+
2096
+ var out = '';
2097
+ while (this.next()) {
2098
+ out += this.tok();
2099
+ }
2100
+
2101
+ return out;
2102
+ };
2103
+
2104
+ /**
2105
+ * Next Token
2106
+ */
2107
+
2108
+ Parser.prototype.next = function() {
2109
+ return this.token = this.tokens.pop();
2110
+ };
2111
+
2112
+ /**
2113
+ * Preview Next Token
2114
+ */
2115
+
2116
+ Parser.prototype.peek = function() {
2117
+ return this.tokens[this.tokens.length - 1] || 0;
2118
+ };
2119
+
2120
+ /**
2121
+ * Parse Text Tokens
2122
+ */
2123
+
2124
+ Parser.prototype.parseText = function() {
2125
+ var body = this.token.text;
2126
+
2127
+ while (this.peek().type === 'text') {
2128
+ body += '\n' + this.next().text;
2129
+ }
2130
+
2131
+ return this.inline.output(body);
2132
+ };
2133
+
2134
+ /**
2135
+ * Parse Current Token
2136
+ */
2137
+
2138
+ Parser.prototype.tok = function() {
2139
+ switch (this.token.type) {
2140
+ case 'space': {
2141
+ return '';
2142
+ }
2143
+ case 'hr': {
2144
+ return this.renderer.hr();
2145
+ }
2146
+ case 'heading': {
2147
+ return this.renderer.heading(
2148
+ this.inline.output(this.token.text),
2149
+ this.token.depth,
2150
+ this.token.text);
2151
+ }
2152
+ case 'code': {
2153
+ return this.renderer.code(this.token.text,
2154
+ this.token.lang,
2155
+ this.token.escaped);
2156
+ }
2157
+ case 'table': {
2158
+ var header = ''
2159
+ , body = ''
2160
+ , i
2161
+ , row
2162
+ , cell
2163
+ , flags
2164
+ , j;
2165
+
2166
+ // header
2167
+ cell = '';
2168
+ for (i = 0; i < this.token.header.length; i++) {
2169
+ flags = { header: true, align: this.token.align[i] };
2170
+ cell += this.renderer.tablecell(
2171
+ this.inline.output(this.token.header[i]),
2172
+ { header: true, align: this.token.align[i] }
2173
+ );
2174
+ }
2175
+ header += this.renderer.tablerow(cell);
2176
+
2177
+ for (i = 0; i < this.token.cells.length; i++) {
2178
+ row = this.token.cells[i];
2179
+
2180
+ cell = '';
2181
+ for (j = 0; j < row.length; j++) {
2182
+ cell += this.renderer.tablecell(
2183
+ this.inline.output(row[j]),
2184
+ { header: false, align: this.token.align[j] }
2185
+ );
2186
+ }
2187
+
2188
+ body += this.renderer.tablerow(cell);
2189
+ }
2190
+ return this.renderer.table(header, body);
2191
+ }
2192
+ case 'blockquote_start': {
2193
+ var body = '';
2194
+
2195
+ while (this.next().type !== 'blockquote_end') {
2196
+ body += this.tok();
2197
+ }
2198
+
2199
+ return this.renderer.blockquote(body);
2200
+ }
2201
+ case 'list_start': {
2202
+ var body = ''
2203
+ , ordered = this.token.ordered;
2204
+
2205
+ while (this.next().type !== 'list_end') {
2206
+ body += this.tok();
2207
+ }
2208
+
2209
+ return this.renderer.list(body, ordered);
2210
+ }
2211
+ case 'list_item_start': {
2212
+ var body = '';
2213
+
2214
+ while (this.next().type !== 'list_item_end') {
2215
+ body += this.token.type === 'text'
2216
+ ? this.parseText()
2217
+ : this.tok();
2218
+ }
2219
+
2220
+ return this.renderer.listitem(body);
2221
+ }
2222
+ case 'loose_item_start': {
2223
+ var body = '';
2224
+
2225
+ while (this.next().type !== 'list_item_end') {
2226
+ body += this.tok();
2227
+ }
2228
+
2229
+ return this.renderer.listitem(body);
2230
+ }
2231
+ case 'html': {
2232
+ var html = !this.token.pre && !this.options.pedantic
2233
+ ? this.inline.output(this.token.text)
2234
+ : this.token.text;
2235
+ return this.renderer.html(html);
2236
+ }
2237
+ case 'paragraph': {
2238
+ return this.renderer.paragraph(this.inline.output(this.token.text));
2239
+ }
2240
+ case 'text': {
2241
+ return this.renderer.paragraph(this.parseText());
2242
+ }
2243
+ }
2244
+ };
2245
+
2246
+ /**
2247
+ * Helpers
2248
+ */
2249
+
2250
+ function escape(html, encode) {
2251
+ return html
2252
+ .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&amp;')
2253
+ .replace(/</g, '&lt;')
2254
+ .replace(/>/g, '&gt;')
2255
+ .replace(/"/g, '&quot;')
2256
+ .replace(/'/g, '&#39;');
2257
+ }
2258
+
2259
+ function unescape(html) {
2260
+ // explicitly match decimal, hex, and named HTML entities
2261
+ return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) {
2262
+ n = n.toLowerCase();
2263
+ if (n === 'colon') return ':';
2264
+ if (n.charAt(0) === '#') {
2265
+ return n.charAt(1) === 'x'
2266
+ ? String.fromCharCode(parseInt(n.substring(2), 16))
2267
+ : String.fromCharCode(+n.substring(1));
2268
+ }
2269
+ return '';
2270
+ });
2271
+ }
2272
+
2273
+ function replace(regex, opt) {
2274
+ regex = regex.source;
2275
+ opt = opt || '';
2276
+ return function self(name, val) {
2277
+ if (!name) return new RegExp(regex, opt);
2278
+ val = val.source || val;
2279
+ val = val.replace(/(^|[^\[])\^/g, '$1');
2280
+ regex = regex.replace(name, val);
2281
+ return self;
2282
+ };
2283
+ }
2284
+
2285
+ function noop() {}
2286
+ noop.exec = noop;
2287
+
2288
+ function merge(obj) {
2289
+ var i = 1
2290
+ , target
2291
+ , key;
2292
+
2293
+ for (; i < arguments.length; i++) {
2294
+ target = arguments[i];
2295
+ for (key in target) {
2296
+ if (Object.prototype.hasOwnProperty.call(target, key)) {
2297
+ obj[key] = target[key];
2298
+ }
2299
+ }
2300
+ }
2301
+
2302
+ return obj;
2303
+ }
2304
+
2305
+
2306
+ /**
2307
+ * Marked
2308
+ */
2309
+
2310
+ function marked(src, opt, callback) {
2311
+ if (callback || typeof opt === 'function') {
2312
+ if (!callback) {
2313
+ callback = opt;
2314
+ opt = null;
2315
+ }
2316
+
2317
+ opt = merge({}, marked.defaults, opt || {});
2318
+
2319
+ var highlight = opt.highlight
2320
+ , tokens
2321
+ , pending
2322
+ , i = 0;
2323
+
2324
+ try {
2325
+ tokens = Lexer.lex(src, opt)
2326
+ } catch (e) {
2327
+ return callback(e);
2328
+ }
2329
+
2330
+ pending = tokens.length;
2331
+
2332
+ var done = function(err) {
2333
+ if (err) {
2334
+ opt.highlight = highlight;
2335
+ return callback(err);
2336
+ }
2337
+
2338
+ var out;
2339
+
2340
+ try {
2341
+ out = Parser.parse(tokens, opt);
2342
+ } catch (e) {
2343
+ err = e;
2344
+ }
2345
+
2346
+ opt.highlight = highlight;
2347
+
2348
+ return err
2349
+ ? callback(err)
2350
+ : callback(null, out);
2351
+ };
2352
+
2353
+ if (!highlight || highlight.length < 3) {
2354
+ return done();
2355
+ }
2356
+
2357
+ delete opt.highlight;
2358
+
2359
+ if (!pending) return done();
2360
+
2361
+ for (; i < tokens.length; i++) {
2362
+ (function(token) {
2363
+ if (token.type !== 'code') {
2364
+ return --pending || done();
2365
+ }
2366
+ return highlight(token.text, token.lang, function(err, code) {
2367
+ if (err) return done(err);
2368
+ if (code == null || code === token.text) {
2369
+ return --pending || done();
2370
+ }
2371
+ token.text = code;
2372
+ token.escaped = true;
2373
+ --pending || done();
2374
+ });
2375
+ })(tokens[i]);
2376
+ }
2377
+
2378
+ return;
2379
+ }
2380
+ try {
2381
+ if (opt) opt = merge({}, marked.defaults, opt);
2382
+ return Parser.parse(Lexer.lex(src, opt), opt);
2383
+ } catch (e) {
2384
+ e.message += '\nPlease report this to https://github.com/chjj/marked.';
2385
+ if ((opt || marked.defaults).silent) {
2386
+ return '<p>An error occured:</p><pre>'
2387
+ + escape(e.message + '', true)
2388
+ + '</pre>';
2389
+ }
2390
+ throw e;
2391
+ }
2392
+ }
2393
+
2394
+ /**
2395
+ * Options
2396
+ */
2397
+
2398
+ marked.options =
2399
+ marked.setOptions = function(opt) {
2400
+ merge(marked.defaults, opt);
2401
+ return marked;
2402
+ };
2403
+
2404
+ marked.defaults = {
2405
+ gfm: true,
2406
+ tables: true,
2407
+ breaks: false,
2408
+ pedantic: false,
2409
+ sanitize: false,
2410
+ sanitizer: null,
2411
+ mangle: true,
2412
+ smartLists: false,
2413
+ silent: false,
2414
+ highlight: null,
2415
+ langPrefix: 'lang-',
2416
+ smartypants: false,
2417
+ headerPrefix: '',
2418
+ renderer: new Renderer,
2419
+ xhtml: false
2420
+ };
2421
+
2422
+ /**
2423
+ * Expose
2424
+ */
2425
+
2426
+ marked.Parser = Parser;
2427
+ marked.parser = Parser.parse;
2428
+
2429
+ marked.Renderer = Renderer;
2430
+
2431
+ marked.Lexer = Lexer;
2432
+ marked.lexer = Lexer.lex;
2433
+
2434
+ marked.InlineLexer = InlineLexer;
2435
+ marked.inlineLexer = InlineLexer.output;
2436
+
2437
+ marked.parse = marked;
2438
+
2439
+ if (true) {
2440
+ module.exports = marked;
2441
+ } else if (typeof define === 'function' && define.amd) {
2442
+ define(function() { return marked; });
2443
+ } else {
2444
+ this.marked = marked;
2445
+ }
2446
+
2447
+ }).call(function() {
2448
+ return this || (typeof window !== 'undefined' ? window : global);
2449
+ }());
2450
+
2451
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
2452
+
2453
+ /***/ },
2454
+ /* 8 */
2455
+ /***/ function(module, exports, __webpack_require__) {
2456
+
2457
+ // style-loader: Adds some css to the DOM by adding a <style> tag
2458
+
2459
+ // load the styles
2460
+ var content = __webpack_require__(9);
2461
+ if(typeof content === 'string') content = [[module.id, content, '']];
2462
+ // add the styles to the DOM
2463
+ var update = __webpack_require__(11)(content, {});
2464
+ if(content.locals) module.exports = content.locals;
2465
+ // Hot Module Replacement
2466
+ if(false) {
2467
+ // When the styles change, update the <style> tags
2468
+ if(!content.locals) {
2469
+ module.hot.accept("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./DescriptionView.css", function() {
2470
+ var newContent = require("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./DescriptionView.css");
2471
+ if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
2472
+ update(newContent);
2473
+ });
2474
+ }
2475
+ // When the module is disposed, remove the <style> tags
2476
+ module.hot.dispose(function() { update(); });
2477
+ }
2478
+
2479
+ /***/ },
2480
+ /* 9 */
2481
+ /***/ function(module, exports, __webpack_require__) {
2482
+
2483
+ exports = module.exports = __webpack_require__(10)();
2484
+ // imports
2485
+
2486
+
2487
+ // module
2488
+ exports.push([module.id, "._1S63EXzJ2LWrq2TSLX8cAu :first-child {\n margin-top: 0;\n}\n\n._1S63EXzJ2LWrq2TSLX8cAu :last-child {\n margin-bottom: 0;\n}\n\n._1S63EXzJ2LWrq2TSLX8cAu h1 {\n font-size: 1.3em;\n}\n\n._1S63EXzJ2LWrq2TSLX8cAu h2 {\n font-size: 1.1em;\n}\n\n._1S63EXzJ2LWrq2TSLX8cAu h3 {\n font-size: 1em;\n -webkit-font-feature-settings: \"c2sc\";\n font-feature-settings: \"c2sc\";\n font-variant: small-caps;\n}\n\n._1S63EXzJ2LWrq2TSLX8cAu blockquote {\n border-left: 8px solid #e8e8e8;\n margin-top: -0.3em;\n padding-top: 0.3em;\n margin-left: 20px;\n padding-left: 12px;\n margin-bottom: -0.5em;\n padding-bottom: 0.5em;\n}\n", ""]);
2489
+
2490
+ // exports
2491
+ exports.locals = {
2492
+ "container": "_1S63EXzJ2LWrq2TSLX8cAu"
2493
+ };
2494
+
2495
+ /***/ },
2496
+ /* 10 */
2497
+ /***/ function(module, exports) {
2498
+
2499
+ /*
2500
+ MIT License http://www.opensource.org/licenses/mit-license.php
2501
+ Author Tobias Koppers @sokra
2502
+ */
2503
+ // css base code, injected by the css-loader
2504
+ module.exports = function() {
2505
+ var list = [];
2506
+
2507
+ // return the list of modules as css string
2508
+ list.toString = function toString() {
2509
+ var result = [];
2510
+ for(var i = 0; i < this.length; i++) {
2511
+ var item = this[i];
2512
+ if(item[2]) {
2513
+ result.push("@media " + item[2] + "{" + item[1] + "}");
2514
+ } else {
2515
+ result.push(item[1]);
2516
+ }
2517
+ }
2518
+ return result.join("");
2519
+ };
2520
+
2521
+ // import a list of modules into the list
2522
+ list.i = function(modules, mediaQuery) {
2523
+ if(typeof modules === "string")
2524
+ modules = [[null, modules, ""]];
2525
+ var alreadyImportedModules = {};
2526
+ for(var i = 0; i < this.length; i++) {
2527
+ var id = this[i][0];
2528
+ if(typeof id === "number")
2529
+ alreadyImportedModules[id] = true;
2530
+ }
2531
+ for(i = 0; i < modules.length; i++) {
2532
+ var item = modules[i];
2533
+ // skip already imported module
2534
+ // this implementation is not 100% perfect for weird media query combinations
2535
+ // when a module is imported multiple times with different media queries.
2536
+ // I hope this will never occur (Hey this way we have smaller bundles)
2537
+ if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
2538
+ if(mediaQuery && !item[2]) {
2539
+ item[2] = mediaQuery;
2540
+ } else if(mediaQuery) {
2541
+ item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
2542
+ }
2543
+ list.push(item);
2544
+ }
2545
+ }
2546
+ };
2547
+ return list;
2548
+ };
2549
+
2550
+
2551
+ /***/ },
2552
+ /* 11 */
2553
+ /***/ function(module, exports, __webpack_require__) {
2554
+
2555
+ /*
2556
+ MIT License http://www.opensource.org/licenses/mit-license.php
2557
+ Author Tobias Koppers @sokra
2558
+ */
2559
+ var stylesInDom = {},
2560
+ memoize = function(fn) {
2561
+ var memo;
2562
+ return function () {
2563
+ if (typeof memo === "undefined") memo = fn.apply(this, arguments);
2564
+ return memo;
2565
+ };
2566
+ },
2567
+ isOldIE = memoize(function() {
2568
+ return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
2569
+ }),
2570
+ getHeadElement = memoize(function () {
2571
+ return document.head || document.getElementsByTagName("head")[0];
2572
+ }),
2573
+ singletonElement = null,
2574
+ singletonCounter = 0,
2575
+ styleElementsInsertedAtTop = [];
2576
+
2577
+ module.exports = function(list, options) {
2578
+ if(false) {
2579
+ if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
2580
+ }
2581
+
2582
+ options = options || {};
2583
+ // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
2584
+ // tags it will allow on a page
2585
+ if (typeof options.singleton === "undefined") options.singleton = isOldIE();
2586
+
2587
+ // By default, add <style> tags to the bottom of <head>.
2588
+ if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
2589
+
2590
+ var styles = listToStyles(list);
2591
+ addStylesToDom(styles, options);
2592
+
2593
+ return function update(newList) {
2594
+ var mayRemove = [];
2595
+ for(var i = 0; i < styles.length; i++) {
2596
+ var item = styles[i];
2597
+ var domStyle = stylesInDom[item.id];
2598
+ domStyle.refs--;
2599
+ mayRemove.push(domStyle);
2600
+ }
2601
+ if(newList) {
2602
+ var newStyles = listToStyles(newList);
2603
+ addStylesToDom(newStyles, options);
2604
+ }
2605
+ for(var i = 0; i < mayRemove.length; i++) {
2606
+ var domStyle = mayRemove[i];
2607
+ if(domStyle.refs === 0) {
2608
+ for(var j = 0; j < domStyle.parts.length; j++)
2609
+ domStyle.parts[j]();
2610
+ delete stylesInDom[domStyle.id];
2611
+ }
2612
+ }
2613
+ };
2614
+ }
2615
+
2616
+ function addStylesToDom(styles, options) {
2617
+ for(var i = 0; i < styles.length; i++) {
2618
+ var item = styles[i];
2619
+ var domStyle = stylesInDom[item.id];
2620
+ if(domStyle) {
2621
+ domStyle.refs++;
2622
+ for(var j = 0; j < domStyle.parts.length; j++) {
2623
+ domStyle.parts[j](item.parts[j]);
2624
+ }
2625
+ for(; j < item.parts.length; j++) {
2626
+ domStyle.parts.push(addStyle(item.parts[j], options));
2627
+ }
2628
+ } else {
2629
+ var parts = [];
2630
+ for(var j = 0; j < item.parts.length; j++) {
2631
+ parts.push(addStyle(item.parts[j], options));
2632
+ }
2633
+ stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
2634
+ }
2635
+ }
2636
+ }
2637
+
2638
+ function listToStyles(list) {
2639
+ var styles = [];
2640
+ var newStyles = {};
2641
+ for(var i = 0; i < list.length; i++) {
2642
+ var item = list[i];
2643
+ var id = item[0];
2644
+ var css = item[1];
2645
+ var media = item[2];
2646
+ var sourceMap = item[3];
2647
+ var part = {css: css, media: media, sourceMap: sourceMap};
2648
+ if(!newStyles[id])
2649
+ styles.push(newStyles[id] = {id: id, parts: [part]});
2650
+ else
2651
+ newStyles[id].parts.push(part);
2652
+ }
2653
+ return styles;
2654
+ }
2655
+
2656
+ function insertStyleElement(options, styleElement) {
2657
+ var head = getHeadElement();
2658
+ var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
2659
+ if (options.insertAt === "top") {
2660
+ if(!lastStyleElementInsertedAtTop) {
2661
+ head.insertBefore(styleElement, head.firstChild);
2662
+ } else if(lastStyleElementInsertedAtTop.nextSibling) {
2663
+ head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
2664
+ } else {
2665
+ head.appendChild(styleElement);
2666
+ }
2667
+ styleElementsInsertedAtTop.push(styleElement);
2668
+ } else if (options.insertAt === "bottom") {
2669
+ head.appendChild(styleElement);
2670
+ } else {
2671
+ throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
2672
+ }
2673
+ }
2674
+
2675
+ function removeStyleElement(styleElement) {
2676
+ styleElement.parentNode.removeChild(styleElement);
2677
+ var idx = styleElementsInsertedAtTop.indexOf(styleElement);
2678
+ if(idx >= 0) {
2679
+ styleElementsInsertedAtTop.splice(idx, 1);
2680
+ }
2681
+ }
2682
+
2683
+ function createStyleElement(options) {
2684
+ var styleElement = document.createElement("style");
2685
+ styleElement.type = "text/css";
2686
+ insertStyleElement(options, styleElement);
2687
+ return styleElement;
2688
+ }
2689
+
2690
+ function createLinkElement(options) {
2691
+ var linkElement = document.createElement("link");
2692
+ linkElement.rel = "stylesheet";
2693
+ insertStyleElement(options, linkElement);
2694
+ return linkElement;
2695
+ }
2696
+
2697
+ function addStyle(obj, options) {
2698
+ var styleElement, update, remove;
2699
+
2700
+ if (options.singleton) {
2701
+ var styleIndex = singletonCounter++;
2702
+ styleElement = singletonElement || (singletonElement = createStyleElement(options));
2703
+ update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
2704
+ remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
2705
+ } else if(obj.sourceMap &&
2706
+ typeof URL === "function" &&
2707
+ typeof URL.createObjectURL === "function" &&
2708
+ typeof URL.revokeObjectURL === "function" &&
2709
+ typeof Blob === "function" &&
2710
+ typeof btoa === "function") {
2711
+ styleElement = createLinkElement(options);
2712
+ update = updateLink.bind(null, styleElement);
2713
+ remove = function() {
2714
+ removeStyleElement(styleElement);
2715
+ if(styleElement.href)
2716
+ URL.revokeObjectURL(styleElement.href);
2717
+ };
2718
+ } else {
2719
+ styleElement = createStyleElement(options);
2720
+ update = applyToTag.bind(null, styleElement);
2721
+ remove = function() {
2722
+ removeStyleElement(styleElement);
2723
+ };
2724
+ }
2725
+
2726
+ update(obj);
2727
+
2728
+ return function updateStyle(newObj) {
2729
+ if(newObj) {
2730
+ if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
2731
+ return;
2732
+ update(obj = newObj);
2733
+ } else {
2734
+ remove();
2735
+ }
2736
+ };
2737
+ }
2738
+
2739
+ var replaceText = (function () {
2740
+ var textStore = [];
2741
+
2742
+ return function (index, replacement) {
2743
+ textStore[index] = replacement;
2744
+ return textStore.filter(Boolean).join('\n');
2745
+ };
2746
+ })();
2747
+
2748
+ function applyToSingletonTag(styleElement, index, remove, obj) {
2749
+ var css = remove ? "" : obj.css;
2750
+
2751
+ if (styleElement.styleSheet) {
2752
+ styleElement.styleSheet.cssText = replaceText(index, css);
2753
+ } else {
2754
+ var cssNode = document.createTextNode(css);
2755
+ var childNodes = styleElement.childNodes;
2756
+ if (childNodes[index]) styleElement.removeChild(childNodes[index]);
2757
+ if (childNodes.length) {
2758
+ styleElement.insertBefore(cssNode, childNodes[index]);
2759
+ } else {
2760
+ styleElement.appendChild(cssNode);
2761
+ }
2762
+ }
2763
+ }
2764
+
2765
+ function applyToTag(styleElement, obj) {
2766
+ var css = obj.css;
2767
+ var media = obj.media;
2768
+
2769
+ if(media) {
2770
+ styleElement.setAttribute("media", media)
2771
+ }
2772
+
2773
+ if(styleElement.styleSheet) {
2774
+ styleElement.styleSheet.cssText = css;
2775
+ } else {
2776
+ while(styleElement.firstChild) {
2777
+ styleElement.removeChild(styleElement.firstChild);
2778
+ }
2779
+ styleElement.appendChild(document.createTextNode(css));
2780
+ }
2781
+ }
2782
+
2783
+ function updateLink(linkElement, obj) {
2784
+ var css = obj.css;
2785
+ var sourceMap = obj.sourceMap;
2786
+
2787
+ if(sourceMap) {
2788
+ // http://stackoverflow.com/a/26603875
2789
+ css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
2790
+ }
2791
+
2792
+ var blob = new Blob([css], { type: "text/css" });
2793
+
2794
+ var oldSrc = linkElement.href;
2795
+
2796
+ linkElement.href = URL.createObjectURL(blob);
2797
+
2798
+ if(oldSrc)
2799
+ URL.revokeObjectURL(oldSrc);
2800
+ }
2801
+
2802
+
2803
+ /***/ },
2804
+ /* 12 */
2805
+ /***/ function(module, exports, __webpack_require__) {
2806
+
2807
+ 'use strict';
2808
+
2809
+ Object.defineProperty(exports, "__esModule", {
2810
+ value: true
2811
+ });
2812
+ exports.FieldView = undefined;
2813
+
2814
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
2815
+
2816
+ var _react = __webpack_require__(1);
2817
+
2818
+ var _react2 = _interopRequireDefault(_react);
2819
+
2820
+ var _model = __webpack_require__(3);
2821
+
2822
+ var _DescriptionView = __webpack_require__(6);
2823
+
2824
+ var _FieldSyntaxView = __webpack_require__(13);
2825
+
2826
+ var _FieldArgumentsTableView = __webpack_require__(20);
2827
+
2828
+ var _FieldView = __webpack_require__(23);
2829
+
2830
+ var StyleSheet = _interopRequireWildcard(_FieldView);
2831
+
2832
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
2833
+
2834
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2835
+
2836
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2837
+
2838
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
2839
+
2840
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
2841
+
2842
+ var FieldView = exports.FieldView = function (_React$Component) {
2843
+ _inherits(FieldView, _React$Component);
2844
+
2845
+ function FieldView() {
2846
+ _classCallCheck(this, FieldView);
2847
+
2848
+ return _possibleConstructorReturn(this, (FieldView.__proto__ || Object.getPrototypeOf(FieldView)).apply(this, arguments));
2849
+ }
2850
+
2851
+ _createClass(FieldView, [{
2852
+ key: 'render',
2853
+ value: function render() {
2854
+ var field = this.props.field;
2855
+
2856
+ return _react2.default.createElement(
2857
+ 'div',
2858
+ {
2859
+ key: field.name,
2860
+ className: StyleSheet.container
2861
+ },
2862
+ _react2.default.createElement(_FieldSyntaxView.FieldSyntaxView, { field: field }),
2863
+ this.renderDescription(field.description),
2864
+ _react2.default.createElement(_FieldArgumentsTableView.FieldArgumentsTableView, { args: field.args })
2865
+ );
2866
+ }
2867
+ }, {
2868
+ key: 'renderDescription',
2869
+ value: function renderDescription(description) {
2870
+ if (!description) {
2871
+ return null;
2872
+ }
2873
+
2874
+ return _react2.default.createElement(_DescriptionView.DescriptionView, {
2875
+ className: StyleSheet.description,
2876
+ description: description
2877
+ });
2878
+ }
2879
+ }]);
2880
+
2881
+ return FieldView;
2882
+ }(_react2.default.Component);
2883
+
2884
+ /***/ },
2885
+ /* 13 */
2886
+ /***/ function(module, exports, __webpack_require__) {
2887
+
2888
+ 'use strict';
2889
+
2890
+ Object.defineProperty(exports, "__esModule", {
2891
+ value: true
2892
+ });
2893
+ exports.FieldSyntaxView = undefined;
2894
+
2895
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
2896
+
2897
+ var _react = __webpack_require__(1);
2898
+
2899
+ var _react2 = _interopRequireDefault(_react);
2900
+
2901
+ var _model = __webpack_require__(3);
2902
+
2903
+ var _TypeRefView = __webpack_require__(14);
2904
+
2905
+ var _FieldSyntaxView = __webpack_require__(18);
2906
+
2907
+ var StyleSheet = _interopRequireWildcard(_FieldSyntaxView);
2908
+
2909
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
2910
+
2911
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2912
+
2913
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2914
+
2915
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
2916
+
2917
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
2918
+
2919
+ var FieldSyntaxView = exports.FieldSyntaxView = function (_React$Component) {
2920
+ _inherits(FieldSyntaxView, _React$Component);
2921
+
2922
+ function FieldSyntaxView() {
2923
+ _classCallCheck(this, FieldSyntaxView);
2924
+
2925
+ return _possibleConstructorReturn(this, (FieldSyntaxView.__proto__ || Object.getPrototypeOf(FieldSyntaxView)).apply(this, arguments));
2926
+ }
2927
+
2928
+ _createClass(FieldSyntaxView, [{
2929
+ key: 'render',
2930
+ value: function render() {
2931
+ var field = this.props.field;
2932
+
2933
+ return _react2.default.createElement(
2934
+ 'div',
2935
+ { className: StyleSheet.container },
2936
+ _react2.default.createElement(
2937
+ 'span',
2938
+ { className: StyleSheet.name },
2939
+ field.name
2940
+ ),
2941
+ this.renderFieldArgs(field.args),
2942
+ ': ',
2943
+ _react2.default.createElement(_TypeRefView.TypeRefView, { typeRef: field.type })
2944
+ );
2945
+ }
2946
+ }, {
2947
+ key: 'renderFieldArgs',
2948
+ value: function renderFieldArgs(args) {
2949
+ var _this2 = this;
2950
+
2951
+ if (!args.length) {
2952
+ return null;
2953
+ }
2954
+
2955
+ return _react2.default.createElement(
2956
+ 'span',
2957
+ null,
2958
+ '(',
2959
+ args.map(function (arg, idx) {
2960
+ return _this2.renderField(arg, idx);
2961
+ }),
2962
+ ')'
2963
+ );
2964
+ }
2965
+ }, {
2966
+ key: 'renderField',
2967
+ value: function renderField(arg, index) {
2968
+ return _react2.default.createElement(
2969
+ 'span',
2970
+ { key: arg.name },
2971
+ index > 0 ? _react2.default.createElement(
2972
+ 'span',
2973
+ null,
2974
+ ', '
2975
+ ) : null,
2976
+ _react2.default.createElement(
2977
+ 'span',
2978
+ { className: StyleSheet.argumentName },
2979
+ arg.name
2980
+ ),
2981
+ ': ',
2982
+ _react2.default.createElement(_TypeRefView.TypeRefView, { typeRef: arg.type }),
2983
+ this.renderDefaultValue(arg.defaultValue)
2984
+ );
2985
+ }
2986
+ }, {
2987
+ key: 'renderDefaultValue',
2988
+ value: function renderDefaultValue(defaultValue) {
2989
+ if (!defaultValue) {
2990
+ return null;
2991
+ }
2992
+
2993
+ return _react2.default.createElement(
2994
+ 'span',
2995
+ { className: StyleSheet.defaultValue },
2996
+ ' = ',
2997
+ defaultValue
2998
+ );
2999
+ }
3000
+ }]);
3001
+
3002
+ return FieldSyntaxView;
3003
+ }(_react2.default.Component);
3004
+
3005
+ /***/ },
3006
+ /* 14 */
3007
+ /***/ function(module, exports, __webpack_require__) {
3008
+
3009
+ 'use strict';
3010
+
3011
+ Object.defineProperty(exports, "__esModule", {
3012
+ value: true
3013
+ });
3014
+ exports.TypeRefView = undefined;
3015
+
3016
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
3017
+
3018
+ var _react = __webpack_require__(1);
3019
+
3020
+ var _react2 = _interopRequireDefault(_react);
3021
+
3022
+ var _model = __webpack_require__(3);
3023
+
3024
+ var _TypeRefView = __webpack_require__(15);
3025
+
3026
+ var StyleSheet = _interopRequireWildcard(_TypeRefView);
3027
+
3028
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
3029
+
3030
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3031
+
3032
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3033
+
3034
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
3035
+
3036
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
3037
+
3038
+ var TypeRefView = exports.TypeRefView = function (_React$Component) {
3039
+ _inherits(TypeRefView, _React$Component);
3040
+
3041
+ function TypeRefView() {
3042
+ _classCallCheck(this, TypeRefView);
3043
+
3044
+ return _possibleConstructorReturn(this, (TypeRefView.__proto__ || Object.getPrototypeOf(TypeRefView)).apply(this, arguments));
3045
+ }
3046
+
3047
+ _createClass(TypeRefView, [{
3048
+ key: 'render',
3049
+ value: function render() {
3050
+ var ref = this.props.typeRef;
3051
+
3052
+ if (ref instanceof _model.NamedTypeRef) {
3053
+ return _react2.default.createElement(
3054
+ 'a',
3055
+ {
3056
+ className: StyleSheet.typeRef,
3057
+ href: '#' + ref.typeName
3058
+ },
3059
+ ref.typeName
3060
+ );
3061
+ } else if (ref instanceof _model.NonNullTypeRef) {
3062
+ return _react2.default.createElement(
3063
+ 'span',
3064
+ null,
3065
+ _react2.default.createElement(TypeRefView, { typeRef: ref.ofType }),
3066
+ '!'
3067
+ );
3068
+ } else if (ref instanceof _model.ListTypeRef) {
3069
+ return _react2.default.createElement(
3070
+ 'span',
3071
+ null,
3072
+ '[',
3073
+ _react2.default.createElement(TypeRefView, { typeRef: ref.ofType }),
3074
+ ']'
3075
+ );
3076
+ }
3077
+
3078
+ throw new Error('Unknown type ref: ' + ref.toString());
3079
+ }
3080
+ }]);
3081
+
3082
+ return TypeRefView;
3083
+ }(_react2.default.Component);
3084
+
3085
+ /***/ },
3086
+ /* 15 */
3087
+ /***/ function(module, exports, __webpack_require__) {
3088
+
3089
+ // style-loader: Adds some css to the DOM by adding a <style> tag
3090
+
3091
+ // load the styles
3092
+ var content = __webpack_require__(16);
3093
+ if(typeof content === 'string') content = [[module.id, content, '']];
3094
+ // add the styles to the DOM
3095
+ var update = __webpack_require__(11)(content, {});
3096
+ if(content.locals) module.exports = content.locals;
3097
+ // Hot Module Replacement
3098
+ if(false) {
3099
+ // When the styles change, update the <style> tags
3100
+ if(!content.locals) {
3101
+ module.hot.accept("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./TypeRefView.css", function() {
3102
+ var newContent = require("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./TypeRefView.css");
3103
+ if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
3104
+ update(newContent);
3105
+ });
3106
+ }
3107
+ // When the module is disposed, remove the <style> tags
3108
+ module.hot.dispose(function() { update(); });
3109
+ }
3110
+
3111
+ /***/ },
3112
+ /* 16 */
3113
+ /***/ function(module, exports, __webpack_require__) {
3114
+
3115
+ exports = module.exports = __webpack_require__(10)();
3116
+ // imports
3117
+ exports.i(__webpack_require__(17), undefined);
3118
+
3119
+ // module
3120
+ exports.push([module.id, "._3Ue4q58Ya6q2FCTVkZKllk {\n}\n", ""]);
3121
+
3122
+ // exports
3123
+ exports.locals = {
3124
+ "typeRef": "_3Ue4q58Ya6q2FCTVkZKllk " + __webpack_require__(17).locals["typeLink"] + ""
3125
+ };
3126
+
3127
+ /***/ },
3128
+ /* 17 */
3129
+ /***/ function(module, exports, __webpack_require__) {
3130
+
3131
+ exports = module.exports = __webpack_require__(10)();
3132
+ // imports
3133
+
3134
+
3135
+ // module
3136
+ exports.push([module.id, "._3_QndMLrl0DS7txXsKk5aM {\n color: #5b2699;\n}\n\n._1QSb_Lywz03jNMCELm-GrU {\n padding-right: 16px;\n padding-right: 1rem;\n white-space: nowrap;\n}\n\n._3a5669pwdwJabgmbtJHumc {\n line-height: 1.3;\n}\n\n._3Xlbyq0Qo-JOAJLLx2z9-l {\n color: #64381f;\n}\n\n.NgU4gHjdynLJU2YSbF4ic {\n color: #836c28;\n}\n\n._15sahXcXCjIULC63jwKqZE {\n color: #007400;\n}\n\n._1ssUqN390ygEtVlxHSnU0e,\n._1ssUqN390ygEtVlxHSnU0e:active,\n._1ssUqN390ygEtVlxHSnU0e:hover,\n._1ssUqN390ygEtVlxHSnU0e:visited {\n color: #007400;\n}\n", ""]);
3137
+
3138
+ // exports
3139
+ exports.locals = {
3140
+ "argumentName": "_3_QndMLrl0DS7txXsKk5aM",
3141
+ "argumentCell": "_1QSb_Lywz03jNMCELm-GrU",
3142
+ "argumentRow": "_3a5669pwdwJabgmbtJHumc",
3143
+ "fieldName": "_3Xlbyq0Qo-JOAJLLx2z9-l",
3144
+ "defaultValue": "NgU4gHjdynLJU2YSbF4ic",
3145
+ "typeName": "_15sahXcXCjIULC63jwKqZE",
3146
+ "typeLink": "_1ssUqN390ygEtVlxHSnU0e"
3147
+ };
3148
+
3149
+ /***/ },
3150
+ /* 18 */
3151
+ /***/ function(module, exports, __webpack_require__) {
3152
+
3153
+ // style-loader: Adds some css to the DOM by adding a <style> tag
3154
+
3155
+ // load the styles
3156
+ var content = __webpack_require__(19);
3157
+ if(typeof content === 'string') content = [[module.id, content, '']];
3158
+ // add the styles to the DOM
3159
+ var update = __webpack_require__(11)(content, {});
3160
+ if(content.locals) module.exports = content.locals;
3161
+ // Hot Module Replacement
3162
+ if(false) {
3163
+ // When the styles change, update the <style> tags
3164
+ if(!content.locals) {
3165
+ module.hot.accept("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./FieldSyntaxView.css", function() {
3166
+ var newContent = require("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./FieldSyntaxView.css");
3167
+ if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
3168
+ update(newContent);
3169
+ });
3170
+ }
3171
+ // When the module is disposed, remove the <style> tags
3172
+ module.hot.dispose(function() { update(); });
3173
+ }
3174
+
3175
+ /***/ },
3176
+ /* 19 */
3177
+ /***/ function(module, exports, __webpack_require__) {
3178
+
3179
+ exports = module.exports = __webpack_require__(10)();
3180
+ // imports
3181
+ exports.i(__webpack_require__(17), undefined);
3182
+
3183
+ // module
3184
+ exports.push([module.id, "._3Q9rTqv61jz1TMbQgSC21Y {\n margin-bottom: 3.2px;\n margin-bottom: 0.2rem;\n}\n\n.pfwgw1KVkaL-Jspb7XsLn {\n}\n\n._3qTEJI-SGaaBwcproq96Z9 {\n}\n\n._1C3jrn92-2_teD3Q_-WwDn {\n}\n", ""]);
3185
+
3186
+ // exports
3187
+ exports.locals = {
3188
+ "container": "_3Q9rTqv61jz1TMbQgSC21Y",
3189
+ "name": "pfwgw1KVkaL-Jspb7XsLn " + __webpack_require__(17).locals["fieldName"] + "",
3190
+ "argumentName": "_3qTEJI-SGaaBwcproq96Z9 " + __webpack_require__(17).locals["argumentName"] + "",
3191
+ "defaultValue": "_1C3jrn92-2_teD3Q_-WwDn " + __webpack_require__(17).locals["defaultValue"] + ""
3192
+ };
3193
+
3194
+ /***/ },
3195
+ /* 20 */
3196
+ /***/ function(module, exports, __webpack_require__) {
3197
+
3198
+ 'use strict';
3199
+
3200
+ Object.defineProperty(exports, "__esModule", {
3201
+ value: true
3202
+ });
3203
+ exports.FieldArgumentsTableView = undefined;
3204
+
3205
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
3206
+
3207
+ var _react = __webpack_require__(1);
3208
+
3209
+ var _react2 = _interopRequireDefault(_react);
3210
+
3211
+ var _model = __webpack_require__(3);
3212
+
3213
+ var _TypeRefView = __webpack_require__(14);
3214
+
3215
+ var _DescriptionView = __webpack_require__(6);
3216
+
3217
+ var _FieldArgumentsTableView = __webpack_require__(21);
3218
+
3219
+ var StyleSheet = _interopRequireWildcard(_FieldArgumentsTableView);
3220
+
3221
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
3222
+
3223
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3224
+
3225
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3226
+
3227
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
3228
+
3229
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
3230
+
3231
+ var FieldArgumentsTableView = exports.FieldArgumentsTableView = function (_React$Component) {
3232
+ _inherits(FieldArgumentsTableView, _React$Component);
3233
+
3234
+ function FieldArgumentsTableView() {
3235
+ _classCallCheck(this, FieldArgumentsTableView);
3236
+
3237
+ return _possibleConstructorReturn(this, (FieldArgumentsTableView.__proto__ || Object.getPrototypeOf(FieldArgumentsTableView)).apply(this, arguments));
3238
+ }
3239
+
3240
+ _createClass(FieldArgumentsTableView, [{
3241
+ key: 'render',
3242
+ value: function render() {
3243
+ var _this2 = this;
3244
+
3245
+ var withDescription = this.props.args.filter(function (a) {
3246
+ return a.description;
3247
+ });
3248
+
3249
+ if (!withDescription.length) {
3250
+ return null;
3251
+ }
3252
+
3253
+ return _react2.default.createElement(
3254
+ 'table',
3255
+ { className: StyleSheet.table },
3256
+ _react2.default.createElement(
3257
+ 'thead',
3258
+ null,
3259
+ _react2.default.createElement(
3260
+ 'tr',
3261
+ null,
3262
+ _react2.default.createElement(
3263
+ 'th',
3264
+ {
3265
+ colSpan: '2',
3266
+ className: StyleSheet.header
3267
+ },
3268
+ 'Arguments'
3269
+ )
3270
+ )
3271
+ ),
3272
+ _react2.default.createElement(
3273
+ 'tbody',
3274
+ null,
3275
+ withDescription.map(function (a) {
3276
+ return _this2.renderRow(a);
3277
+ })
3278
+ )
3279
+ );
3280
+ }
3281
+ }, {
3282
+ key: 'renderRow',
3283
+ value: function renderRow(arg) {
3284
+ return _react2.default.createElement(
3285
+ 'tr',
3286
+ { key: arg.name, className: StyleSheet.row },
3287
+ _react2.default.createElement(
3288
+ 'td',
3289
+ {
3290
+ className: StyleSheet.key
3291
+ },
3292
+ _react2.default.createElement(
3293
+ 'span',
3294
+ { className: StyleSheet.argumentName },
3295
+ arg.name
3296
+ ),
3297
+ ': ',
3298
+ _react2.default.createElement(_TypeRefView.TypeRefView, { typeRef: arg.type })
3299
+ ),
3300
+ _react2.default.createElement(
3301
+ 'td',
3302
+ {
3303
+ className: StyleSheet.value
3304
+ },
3305
+ arg.description && _react2.default.createElement(_DescriptionView.DescriptionView, { description: arg.description })
3306
+ )
3307
+ );
3308
+ }
3309
+ }]);
3310
+
3311
+ return FieldArgumentsTableView;
3312
+ }(_react2.default.Component);
3313
+
3314
+ /***/ },
3315
+ /* 21 */
3316
+ /***/ function(module, exports, __webpack_require__) {
3317
+
3318
+ // style-loader: Adds some css to the DOM by adding a <style> tag
3319
+
3320
+ // load the styles
3321
+ var content = __webpack_require__(22);
3322
+ if(typeof content === 'string') content = [[module.id, content, '']];
3323
+ // add the styles to the DOM
3324
+ var update = __webpack_require__(11)(content, {});
3325
+ if(content.locals) module.exports = content.locals;
3326
+ // Hot Module Replacement
3327
+ if(false) {
3328
+ // When the styles change, update the <style> tags
3329
+ if(!content.locals) {
3330
+ module.hot.accept("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./FieldArgumentsTableView.css", function() {
3331
+ var newContent = require("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./FieldArgumentsTableView.css");
3332
+ if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
3333
+ update(newContent);
3334
+ });
3335
+ }
3336
+ // When the module is disposed, remove the <style> tags
3337
+ module.hot.dispose(function() { update(); });
3338
+ }
3339
+
3340
+ /***/ },
3341
+ /* 22 */
3342
+ /***/ function(module, exports, __webpack_require__) {
3343
+
3344
+ exports = module.exports = __webpack_require__(10)();
3345
+ // imports
3346
+ exports.i(__webpack_require__(17), undefined);
3347
+
3348
+ // module
3349
+ exports.push([module.id, "._2u0NKWFUVO10_7zl5FH1bX {\n margin-top: 16px;\n margin-top: 1rem;\n margin-left: 32px;\n margin-left: 2rem;\n width: calc(100% - 2rem);\n}\n\n._14Noc9w-o_IUonJxsVOnBQ {\n text-align: left;\n font-size: 17.6px;\n font-size: 1.1rem;\n border-bottom: 1px solid #d9d9d9;\n}\n\n._3qzzdu41HzTOjXefzRE8dy {\n}\n\n._3g8_wlJYIQqfvRx4Tdzt4u {\n width: 100%;\n}\n\n._1XONXofpDzZZq1kxZDtU2p {\n}\n\n.Sb22PNqbe2ZV1oFtChBAD {\n}\n", ""]);
3350
+
3351
+ // exports
3352
+ exports.locals = {
3353
+ "table": "_2u0NKWFUVO10_7zl5FH1bX",
3354
+ "header": "_14Noc9w-o_IUonJxsVOnBQ",
3355
+ "key": "_3qzzdu41HzTOjXefzRE8dy " + __webpack_require__(17).locals["argumentCell"] + "",
3356
+ "value": "_3g8_wlJYIQqfvRx4Tdzt4u",
3357
+ "row": "_1XONXofpDzZZq1kxZDtU2p " + __webpack_require__(17).locals["argumentRow"] + "",
3358
+ "argumentName": "Sb22PNqbe2ZV1oFtChBAD " + __webpack_require__(17).locals["argumentName"] + ""
3359
+ };
3360
+
3361
+ /***/ },
3362
+ /* 23 */
3363
+ /***/ function(module, exports, __webpack_require__) {
3364
+
3365
+ // style-loader: Adds some css to the DOM by adding a <style> tag
3366
+
3367
+ // load the styles
3368
+ var content = __webpack_require__(24);
3369
+ if(typeof content === 'string') content = [[module.id, content, '']];
3370
+ // add the styles to the DOM
3371
+ var update = __webpack_require__(11)(content, {});
3372
+ if(content.locals) module.exports = content.locals;
3373
+ // Hot Module Replacement
3374
+ if(false) {
3375
+ // When the styles change, update the <style> tags
3376
+ if(!content.locals) {
3377
+ module.hot.accept("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./FieldView.css", function() {
3378
+ var newContent = require("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./FieldView.css");
3379
+ if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
3380
+ update(newContent);
3381
+ });
3382
+ }
3383
+ // When the module is disposed, remove the <style> tags
3384
+ module.hot.dispose(function() { update(); });
3385
+ }
3386
+
3387
+ /***/ },
3388
+ /* 24 */
3389
+ /***/ function(module, exports, __webpack_require__) {
3390
+
3391
+ exports = module.exports = __webpack_require__(10)();
3392
+ // imports
3393
+
3394
+
3395
+ // module
3396
+ exports.push([module.id, "._2CI__araY4C94OAnkGP8Fv {\n margin-bottom: 24px;\n margin-bottom: 1.5rem;\n}\n\n._158AUimPZVUE217-1MuDQx {\n margin-left: 32px;\n margin-left: 2rem;\n}\n\n._158AUimPZVUE217-1MuDQx p {\n margin-top: 0;\n}\n", ""]);
3397
+
3398
+ // exports
3399
+ exports.locals = {
3400
+ "container": "_2CI__araY4C94OAnkGP8Fv",
3401
+ "description": "_158AUimPZVUE217-1MuDQx"
3402
+ };
3403
+
3404
+ /***/ },
3405
+ /* 25 */
3406
+ /***/ function(module, exports, __webpack_require__) {
3407
+
3408
+ // style-loader: Adds some css to the DOM by adding a <style> tag
3409
+
3410
+ // load the styles
3411
+ var content = __webpack_require__(26);
3412
+ if(typeof content === 'string') content = [[module.id, content, '']];
3413
+ // add the styles to the DOM
3414
+ var update = __webpack_require__(11)(content, {});
3415
+ if(content.locals) module.exports = content.locals;
3416
+ // Hot Module Replacement
3417
+ if(false) {
3418
+ // When the styles change, update the <style> tags
3419
+ if(!content.locals) {
3420
+ module.hot.accept("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./TypeDocsViews.css", function() {
3421
+ var newContent = require("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./TypeDocsViews.css");
3422
+ if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
3423
+ update(newContent);
3424
+ });
3425
+ }
3426
+ // When the module is disposed, remove the <style> tags
3427
+ module.hot.dispose(function() { update(); });
3428
+ }
3429
+
3430
+ /***/ },
3431
+ /* 26 */
3432
+ /***/ function(module, exports, __webpack_require__) {
3433
+
3434
+ exports = module.exports = __webpack_require__(10)();
3435
+ // imports
3436
+ exports.i(__webpack_require__(17), undefined);
3437
+
3438
+ // module
3439
+ exports.push([module.id, "._31nGuA4VcO5ASJ1Y-50NC0 {\n margin-bottom: 20px;\n}\n\n._1hBwBkrQ8ZlOyOUcLvjRpt {\n margin-bottom: 8px;\n margin-bottom: 0.5rem;\n}\n\n._1gsHTtZCfZy0kwT90S9nZC {\n -webkit-font-feature-settings: \"c2sc\";\n font-feature-settings: \"c2sc\";\n font-variant: small-caps;\n text-transform: uppercase;\n font-weight: bold;\n color: #4a4a4a;\n border-bottom: 1px solid #d9d9d9;\n margin-top: 16px;\n margin-top: 1rem;\n margin-bottom: 8px;\n margin-bottom: 0.5rem;\n}\n\n._2rkCQUiZ63eNMyTCRDL7GX {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.hI41jTQ51eUSGSCTegJoD {\n}\n\n.bHFx-gWNy1lALB9MKGx6U {\n}\n", ""]);
3440
+
3441
+ // exports
3442
+ exports.locals = {
3443
+ "type": "_31nGuA4VcO5ASJ1Y-50NC0",
3444
+ "heading": "_1hBwBkrQ8ZlOyOUcLvjRpt",
3445
+ "subHeading": "_1gsHTtZCfZy0kwT90S9nZC",
3446
+ "interfacesList": "_2rkCQUiZ63eNMyTCRDL7GX",
3447
+ "enumName": "hI41jTQ51eUSGSCTegJoD " + __webpack_require__(17).locals["argumentName"] + " " + __webpack_require__(17).locals["argumentCell"] + "",
3448
+ "enumRow": "bHFx-gWNy1lALB9MKGx6U " + __webpack_require__(17).locals["argumentRow"] + ""
3449
+ };
3450
+
3451
+ /***/ },
3452
+ /* 27 */
3453
+ /***/ function(module, exports, __webpack_require__) {
3454
+
3455
+ // style-loader: Adds some css to the DOM by adding a <style> tag
3456
+
3457
+ // load the styles
3458
+ var content = __webpack_require__(28);
3459
+ if(typeof content === 'string') content = [[module.id, content, '']];
3460
+ // add the styles to the DOM
3461
+ var update = __webpack_require__(11)(content, {});
3462
+ if(content.locals) module.exports = content.locals;
3463
+ // Hot Module Replacement
3464
+ if(false) {
3465
+ // When the styles change, update the <style> tags
3466
+ if(!content.locals) {
3467
+ module.hot.accept("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./SchemaDocsView.css", function() {
3468
+ var newContent = require("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1!./../../node_modules/postcss-loader/index.js!./SchemaDocsView.css");
3469
+ if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
3470
+ update(newContent);
3471
+ });
3472
+ }
3473
+ // When the module is disposed, remove the <style> tags
3474
+ module.hot.dispose(function() { update(); });
3475
+ }
3476
+
3477
+ /***/ },
3478
+ /* 28 */
3479
+ /***/ function(module, exports, __webpack_require__) {
3480
+
3481
+ exports = module.exports = __webpack_require__(10)();
3482
+ // imports
3483
+ exports.i(__webpack_require__(29), "");
3484
+
3485
+ // module
3486
+ exports.push([module.id, "._2Wa9wu-awiDVZ9IXTPcyFt {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n._38MtHDcUga2pYTxIRJJZ8o {\n max-width: 800px;\n}\n", ""]);
3487
+
3488
+ // exports
3489
+ exports.locals = {
3490
+ "wrapper": "_2Wa9wu-awiDVZ9IXTPcyFt",
3491
+ "container": "_38MtHDcUga2pYTxIRJJZ8o"
3492
+ };
3493
+
3494
+ /***/ },
3495
+ /* 29 */
3496
+ /***/ function(module, exports, __webpack_require__) {
3497
+
3498
+ exports = module.exports = __webpack_require__(10)();
3499
+ // imports
3500
+
3501
+
3502
+ // module
3503
+ exports.push([module.id, "/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */\n\n* {\n box-sizing: border-box;\n}\n\n/**\n * 1. Change the default font family in all browsers (opinionated).\n * 2. Prevent adjustments of font size after orientation changes in IE and iOS.\n */\n\nhtml {\n font-family: -apple-system, BlinkMacSystemFont,\n \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\",\n \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\",\n sans-serif; /* 1 */\n -ms-text-size-adjust: 100%; /* 2 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/**\n * Remove the margin in all browsers (opinionated).\n */\n\nbody {\n margin: 0 8px;\n}\n\n/* HTML5 display definitions\n ========================================================================== */\n\n/**\n * Add the correct display in IE 9-.\n * 1. Add the correct display in Edge, IE, and Firefox.\n * 2. Add the correct display in IE.\n */\n\narticle,\naside,\ndetails, /* 1 */\nfigcaption,\nfigure,\nfooter,\nheader,\nmain, /* 2 */\nmenu,\nnav,\nsection,\nsummary { /* 1 */\n display: block;\n}\n\n/**\n * Add the correct display in IE 9-.\n */\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n}\n\n/**\n * Add the correct display in iOS 4-7.\n */\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Add the correct display in IE 10-.\n * 1. Add the correct display in IE.\n */\n\ntemplate, /* 1 */\n[hidden] {\n display: none;\n}\n\n/* Links\n ========================================================================== */\n\n/**\n * 1. Remove the gray background on active links in IE 10.\n * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.\n */\n\na {\n background-color: transparent; /* 1 */\n -webkit-text-decoration-skip: ink; /* 2 */\n}\n\n/**\n * Remove the outline on focused links when they are also active or hovered\n * in all browsers (opinionated).\n */\n\na:active,\na:hover {\n outline-width: 0;\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * 1. Remove the bottom border in Firefox 39-.\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Prevent the duplicate application of `bolder` by the next rule in Safari 6.\n */\n\nb,\nstrong {\n font-weight: inherit;\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * Add the correct font style in Android 4.3-.\n */\n\ndfn {\n font-style: italic;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/**\n * Add the correct background and color in IE 9-.\n */\n\nmark {\n background-color: #ff0;\n color: #000;\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10-.\n */\n\nimg {\n border-style: none;\n}\n\n/**\n * Hide the overflow in IE.\n */\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct margin in IE 8.\n */\n\nfigure {\n margin: 1em 40px;\n}\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change font properties to `inherit` in all browsers (opinionated).\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font: inherit; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Restore the font weight unset by the previous rule.\n */\n\noptgroup {\n font-weight: bold;\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput { /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\n * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`\n * controls in Android 4.\n * 2. Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\nhtml [type=\"button\"], /* 1 */\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button; /* 2 */\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Change the border, margin, and padding in all browsers (opinionated).\n */\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Remove the default vertical scrollbar in IE.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10-.\n * 2. Remove the padding in IE 10-.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding and cancel buttons in Chrome and Safari on OS X.\n */\n\n[type=\"search\"]::-webkit-search-cancel-button,\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * Correct the text style of placeholders in Chrome, Edge, and Safari.\n */\n\n::-webkit-input-placeholder {\n color: inherit;\n opacity: 0.54;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n", ""]);
3504
+
3505
+ // exports
3506
+
3507
+
3508
+ /***/ },
3509
+ /* 30 */
3510
+ /***/ function(module, exports) {
3511
+
3512
+ module.exports = "query IntrospectionQuery {\n __schema {\n queryType {\n name\n }\n mutationType {\n name\n }\n subscriptionType {\n name\n }\n types {\n ...FullType\n }\n directives {\n name\n description\n args {\n ...InputValue\n }\n onOperation\n onFragment\n onField\n }\n }\n}\n\nfragment FullType on __Type {\n kind\n name\n description\n fields(includeDeprecated: true) {\n name\n description\n args {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n description\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n}\n\nfragment InputValue on __InputValue {\n name\n description\n type {\n ...TypeRef\n }\n defaultValue\n}\n\nfragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n}\n\n"
3513
+
3514
+ /***/ }
3515
+ /******/ ])
3516
+ });
3517
+ ;
3518
+ //# sourceMappingURL=graphql-docs.js.map