effective_bootstrap 0.6.31 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (294) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/app/assets/images/icons/activity.svg +1 -13
  4. data/app/assets/images/icons/airplay.svg +1 -14
  5. data/app/assets/images/icons/alert-circle.svg +1 -15
  6. data/app/assets/images/icons/alert-octagon.svg +1 -15
  7. data/app/assets/images/icons/alert-triangle.svg +1 -15
  8. data/app/assets/images/icons/align-center.svg +1 -16
  9. data/app/assets/images/icons/align-justify.svg +1 -16
  10. data/app/assets/images/icons/align-left.svg +1 -16
  11. data/app/assets/images/icons/align-right.svg +1 -16
  12. data/app/assets/images/icons/anchor.svg +1 -15
  13. data/app/assets/images/icons/aperture.svg +1 -19
  14. data/app/assets/images/icons/archive.svg +1 -0
  15. data/app/assets/images/icons/arrow-down-circle.svg +1 -15
  16. data/app/assets/images/icons/arrow-down-left.svg +1 -14
  17. data/app/assets/images/icons/arrow-down-right.svg +1 -14
  18. data/app/assets/images/icons/arrow-down.svg +1 -14
  19. data/app/assets/images/icons/arrow-left-circle.svg +1 -15
  20. data/app/assets/images/icons/arrow-left.svg +1 -14
  21. data/app/assets/images/icons/arrow-right-circle.svg +1 -15
  22. data/app/assets/images/icons/arrow-right.svg +1 -14
  23. data/app/assets/images/icons/arrow-up-circle.svg +1 -15
  24. data/app/assets/images/icons/arrow-up-left.svg +1 -14
  25. data/app/assets/images/icons/arrow-up-right.svg +1 -14
  26. data/app/assets/images/icons/arrow-up.svg +1 -14
  27. data/app/assets/images/icons/at-sign.svg +1 -14
  28. data/app/assets/images/icons/award.svg +1 -14
  29. data/app/assets/images/icons/bar-chart-2.svg +1 -15
  30. data/app/assets/images/icons/bar-chart.svg +1 -15
  31. data/app/assets/images/icons/battery-charging.svg +1 -15
  32. data/app/assets/images/icons/battery.svg +1 -14
  33. data/app/assets/images/icons/bell-off.svg +1 -14
  34. data/app/assets/images/icons/bell.svg +1 -13
  35. data/app/assets/images/icons/bluetooth.svg +1 -13
  36. data/app/assets/images/icons/bold.svg +1 -14
  37. data/app/assets/images/icons/book-open.svg +1 -14
  38. data/app/assets/images/icons/book.svg +1 -14
  39. data/app/assets/images/icons/bookmark.svg +1 -13
  40. data/app/assets/images/icons/box.svg +1 -15
  41. data/app/assets/images/icons/briefcase.svg +1 -14
  42. data/app/assets/images/icons/calendar.svg +1 -16
  43. data/app/assets/images/icons/camera-off.svg +1 -14
  44. data/app/assets/images/icons/camera.svg +1 -14
  45. data/app/assets/images/icons/cast.svg +1 -14
  46. data/app/assets/images/icons/check-circle.svg +1 -14
  47. data/app/assets/images/icons/check-square.svg +1 -14
  48. data/app/assets/images/icons/check.svg +1 -13
  49. data/app/assets/images/icons/chevron-down.svg +1 -13
  50. data/app/assets/images/icons/chevron-left.svg +1 -13
  51. data/app/assets/images/icons/chevron-right.svg +1 -13
  52. data/app/assets/images/icons/chevron-up.svg +1 -13
  53. data/app/assets/images/icons/chevrons-down.svg +1 -14
  54. data/app/assets/images/icons/chevrons-left.svg +1 -14
  55. data/app/assets/images/icons/chevrons-right.svg +1 -14
  56. data/app/assets/images/icons/chevrons-up.svg +1 -14
  57. data/app/assets/images/icons/chrome.svg +1 -17
  58. data/app/assets/images/icons/circle.svg +1 -13
  59. data/app/assets/images/icons/clipboard.svg +1 -14
  60. data/app/assets/images/icons/clock.svg +1 -14
  61. data/app/assets/images/icons/cloud-drizzle.svg +1 -19
  62. data/app/assets/images/icons/cloud-lightning.svg +1 -14
  63. data/app/assets/images/icons/cloud-off.svg +1 -14
  64. data/app/assets/images/icons/cloud-rain.svg +1 -16
  65. data/app/assets/images/icons/cloud-snow.svg +1 -19
  66. data/app/assets/images/icons/cloud.svg +1 -13
  67. data/app/assets/images/icons/code.svg +1 -14
  68. data/app/assets/images/icons/codepen.svg +1 -17
  69. data/app/assets/images/icons/codesandbox.svg +1 -0
  70. data/app/assets/images/icons/coffee.svg +1 -0
  71. data/app/assets/images/icons/columns.svg +1 -0
  72. data/app/assets/images/icons/command.svg +1 -13
  73. data/app/assets/images/icons/compass.svg +1 -14
  74. data/app/assets/images/icons/copy.svg +1 -14
  75. data/app/assets/images/icons/corner-down-left.svg +1 -14
  76. data/app/assets/images/icons/corner-down-right.svg +1 -14
  77. data/app/assets/images/icons/corner-left-down.svg +1 -14
  78. data/app/assets/images/icons/corner-left-up.svg +1 -14
  79. data/app/assets/images/icons/corner-right-down.svg +1 -14
  80. data/app/assets/images/icons/corner-right-up.svg +1 -14
  81. data/app/assets/images/icons/corner-up-left.svg +1 -14
  82. data/app/assets/images/icons/corner-up-right.svg +1 -14
  83. data/app/assets/images/icons/cpu.svg +1 -22
  84. data/app/assets/images/icons/credit-card.svg +1 -14
  85. data/app/assets/images/icons/crop.svg +1 -14
  86. data/app/assets/images/icons/crosshair.svg +1 -17
  87. data/app/assets/images/icons/database.svg +1 -15
  88. data/app/assets/images/icons/delete.svg +1 -15
  89. data/app/assets/images/icons/disc.svg +1 -14
  90. data/app/assets/images/icons/dollar-sign.svg +1 -14
  91. data/app/assets/images/icons/download-cloud.svg +1 -15
  92. data/app/assets/images/icons/download.svg +1 -15
  93. data/app/assets/images/icons/droplet.svg +1 -13
  94. data/app/assets/images/icons/edit-2.svg +1 -13
  95. data/app/assets/images/icons/edit-3.svg +1 -14
  96. data/app/assets/images/icons/edit.svg +1 -14
  97. data/app/assets/images/icons/external-link.svg +1 -15
  98. data/app/assets/images/icons/eye-off.svg +1 -14
  99. data/app/assets/images/icons/eye.svg +1 -14
  100. data/app/assets/images/icons/facebook.svg +1 -13
  101. data/app/assets/images/icons/fast-forward.svg +1 -14
  102. data/app/assets/images/icons/feather.svg +1 -15
  103. data/app/assets/images/icons/figma.svg +1 -0
  104. data/app/assets/images/icons/file-minus.svg +1 -15
  105. data/app/assets/images/icons/file-plus.svg +1 -16
  106. data/app/assets/images/icons/file-text.svg +1 -17
  107. data/app/assets/images/icons/file.svg +1 -14
  108. data/app/assets/images/icons/film.svg +1 -20
  109. data/app/assets/images/icons/filter.svg +1 -13
  110. data/app/assets/images/icons/flag.svg +1 -14
  111. data/app/assets/images/icons/folder-minus.svg +1 -14
  112. data/app/assets/images/icons/folder-plus.svg +1 -15
  113. data/app/assets/images/icons/folder.svg +1 -13
  114. data/app/assets/images/icons/framer.svg +1 -0
  115. data/app/assets/images/icons/frown.svg +1 -0
  116. data/app/assets/images/icons/gift.svg +1 -0
  117. data/app/assets/images/icons/git-branch.svg +1 -16
  118. data/app/assets/images/icons/git-commit.svg +1 -15
  119. data/app/assets/images/icons/git-merge.svg +1 -15
  120. data/app/assets/images/icons/git-pull-request.svg +1 -16
  121. data/app/assets/images/icons/github.svg +1 -13
  122. data/app/assets/images/icons/gitlab.svg +1 -13
  123. data/app/assets/images/icons/globe.svg +1 -15
  124. data/app/assets/images/icons/grid.svg +1 -16
  125. data/app/assets/images/icons/hard-drive.svg +1 -16
  126. data/app/assets/images/icons/hash.svg +1 -16
  127. data/app/assets/images/icons/headphones.svg +1 -14
  128. data/app/assets/images/icons/heart.svg +1 -13
  129. data/app/assets/images/icons/help-circle.svg +1 -15
  130. data/app/assets/images/icons/hexagon.svg +1 -0
  131. data/app/assets/images/icons/home.svg +1 -14
  132. data/app/assets/images/icons/image.svg +1 -15
  133. data/app/assets/images/icons/inbox.svg +1 -14
  134. data/app/assets/images/icons/info.svg +1 -15
  135. data/app/assets/images/icons/instagram.svg +1 -15
  136. data/app/assets/images/icons/italic.svg +1 -15
  137. data/app/assets/images/icons/key.svg +1 -0
  138. data/app/assets/images/icons/layers.svg +1 -15
  139. data/app/assets/images/icons/layout.svg +1 -15
  140. data/app/assets/images/icons/life-buoy.svg +1 -19
  141. data/app/assets/images/icons/link-2.svg +1 -14
  142. data/app/assets/images/icons/link.svg +1 -14
  143. data/app/assets/images/icons/linkedin.svg +1 -15
  144. data/app/assets/images/icons/list.svg +1 -18
  145. data/app/assets/images/icons/loader.svg +1 -20
  146. data/app/assets/images/icons/lock.svg +1 -14
  147. data/app/assets/images/icons/log-in.svg +1 -15
  148. data/app/assets/images/icons/log-out.svg +1 -15
  149. data/app/assets/images/icons/mail.svg +1 -14
  150. data/app/assets/images/icons/map-pin.svg +1 -14
  151. data/app/assets/images/icons/map.svg +1 -15
  152. data/app/assets/images/icons/maximize-2.svg +1 -16
  153. data/app/assets/images/icons/maximize.svg +1 -13
  154. data/app/assets/images/icons/meh.svg +1 -0
  155. data/app/assets/images/icons/menu.svg +1 -15
  156. data/app/assets/images/icons/message-circle.svg +1 -13
  157. data/app/assets/images/icons/message-square.svg +1 -13
  158. data/app/assets/images/icons/mic-off.svg +1 -17
  159. data/app/assets/images/icons/mic.svg +1 -16
  160. data/app/assets/images/icons/minimize-2.svg +1 -16
  161. data/app/assets/images/icons/minimize.svg +1 -13
  162. data/app/assets/images/icons/minus-circle.svg +1 -14
  163. data/app/assets/images/icons/minus-square.svg +1 -14
  164. data/app/assets/images/icons/minus.svg +1 -13
  165. data/app/assets/images/icons/monitor.svg +1 -15
  166. data/app/assets/images/icons/moon.svg +1 -13
  167. data/app/assets/images/icons/more-horizontal.svg +1 -15
  168. data/app/assets/images/icons/more-vertical.svg +1 -15
  169. data/app/assets/images/icons/mouse-pointer.svg +1 -0
  170. data/app/assets/images/icons/move.svg +1 -18
  171. data/app/assets/images/icons/music.svg +1 -14
  172. data/app/assets/images/icons/navigation-2.svg +1 -13
  173. data/app/assets/images/icons/navigation.svg +1 -13
  174. data/app/assets/images/icons/octagon.svg +1 -13
  175. data/app/assets/images/icons/package.svg +1 -16
  176. data/app/assets/images/icons/paperclip.svg +1 -13
  177. data/app/assets/images/icons/pause-circle.svg +1 -15
  178. data/app/assets/images/icons/pause.svg +1 -14
  179. data/app/assets/images/icons/pen-tool.svg +1 -0
  180. data/app/assets/images/icons/percent.svg +1 -15
  181. data/app/assets/images/icons/phone-call.svg +1 -13
  182. data/app/assets/images/icons/phone-forwarded.svg +1 -15
  183. data/app/assets/images/icons/phone-incoming.svg +1 -15
  184. data/app/assets/images/icons/phone-missed.svg +1 -15
  185. data/app/assets/images/icons/phone-off.svg +1 -14
  186. data/app/assets/images/icons/phone-outgoing.svg +1 -15
  187. data/app/assets/images/icons/phone.svg +1 -13
  188. data/app/assets/images/icons/pie-chart.svg +1 -14
  189. data/app/assets/images/icons/play-circle.svg +1 -14
  190. data/app/assets/images/icons/play.svg +1 -13
  191. data/app/assets/images/icons/plus-circle.svg +1 -15
  192. data/app/assets/images/icons/plus-square.svg +1 -15
  193. data/app/assets/images/icons/plus.svg +1 -14
  194. data/app/assets/images/icons/pocket.svg +1 -14
  195. data/app/assets/images/icons/power.svg +1 -14
  196. data/app/assets/images/icons/printer.svg +1 -15
  197. data/app/assets/images/icons/radio.svg +1 -14
  198. data/app/assets/images/icons/refresh-ccw.svg +1 -15
  199. data/app/assets/images/icons/refresh-cw.svg +1 -15
  200. data/app/assets/images/icons/repeat.svg +1 -16
  201. data/app/assets/images/icons/rewind.svg +1 -14
  202. data/app/assets/images/icons/rotate-ccw.svg +1 -14
  203. data/app/assets/images/icons/rotate-cw.svg +1 -14
  204. data/app/assets/images/icons/rss.svg +1 -15
  205. data/app/assets/images/icons/save.svg +1 -15
  206. data/app/assets/images/icons/scissors.svg +1 -17
  207. data/app/assets/images/icons/search.svg +1 -14
  208. data/app/assets/images/icons/send.svg +1 -14
  209. data/app/assets/images/icons/server.svg +1 -16
  210. data/app/assets/images/icons/settings.svg +1 -14
  211. data/app/assets/images/icons/share-2.svg +1 -17
  212. data/app/assets/images/icons/share.svg +1 -15
  213. data/app/assets/images/icons/shield-off.svg +1 -15
  214. data/app/assets/images/icons/shield.svg +1 -13
  215. data/app/assets/images/icons/shopping-bag.svg +1 -15
  216. data/app/assets/images/icons/shopping-cart.svg +1 -15
  217. data/app/assets/images/icons/shuffle.svg +1 -17
  218. data/app/assets/images/icons/sidebar.svg +1 -14
  219. data/app/assets/images/icons/skip-back.svg +1 -14
  220. data/app/assets/images/icons/skip-forward.svg +1 -14
  221. data/app/assets/images/icons/slack.svg +1 -17
  222. data/app/assets/images/icons/slash.svg +1 -14
  223. data/app/assets/images/icons/sliders.svg +1 -21
  224. data/app/assets/images/icons/smartphone.svg +1 -14
  225. data/app/assets/images/icons/smile.svg +1 -0
  226. data/app/assets/images/icons/speaker.svg +1 -15
  227. data/app/assets/images/icons/square.svg +1 -13
  228. data/app/assets/images/icons/star.svg +1 -13
  229. data/app/assets/images/icons/stop-circle.svg +1 -14
  230. data/app/assets/images/icons/sun.svg +1 -21
  231. data/app/assets/images/icons/sunrise.svg +1 -20
  232. data/app/assets/images/icons/sunset.svg +1 -20
  233. data/app/assets/images/icons/tablet.svg +1 -22
  234. data/app/assets/images/icons/tag.svg +1 -14
  235. data/app/assets/images/icons/target.svg +1 -15
  236. data/app/assets/images/icons/terminal.svg +1 -14
  237. data/app/assets/images/icons/thermometer.svg +1 -13
  238. data/app/assets/images/icons/thumbs-down.svg +1 -13
  239. data/app/assets/images/icons/thumbs-up.svg +1 -13
  240. data/app/assets/images/icons/toggle-left.svg +1 -14
  241. data/app/assets/images/icons/toggle-right.svg +1 -14
  242. data/app/assets/images/icons/tool.svg +1 -0
  243. data/app/assets/images/icons/trash-2.svg +1 -16
  244. data/app/assets/images/icons/trash.svg +1 -14
  245. data/app/assets/images/icons/trello.svg +1 -0
  246. data/app/assets/images/icons/trending-down.svg +1 -14
  247. data/app/assets/images/icons/trending-up.svg +1 -14
  248. data/app/assets/images/icons/triangle.svg +1 -13
  249. data/app/assets/images/icons/truck.svg +1 -16
  250. data/app/assets/images/icons/tv.svg +1 -14
  251. data/app/assets/images/icons/twitch.svg +1 -0
  252. data/app/assets/images/icons/twitter.svg +1 -13
  253. data/app/assets/images/icons/type.svg +1 -15
  254. data/app/assets/images/icons/umbrella.svg +1 -13
  255. data/app/assets/images/icons/underline.svg +1 -14
  256. data/app/assets/images/icons/unlock.svg +1 -14
  257. data/app/assets/images/icons/upload-cloud.svg +1 -16
  258. data/app/assets/images/icons/upload.svg +1 -15
  259. data/app/assets/images/icons/user-check.svg +1 -15
  260. data/app/assets/images/icons/user-minus.svg +1 -15
  261. data/app/assets/images/icons/user-plus.svg +1 -16
  262. data/app/assets/images/icons/user-x.svg +1 -16
  263. data/app/assets/images/icons/user.svg +1 -14
  264. data/app/assets/images/icons/users.svg +1 -16
  265. data/app/assets/images/icons/video-off.svg +1 -14
  266. data/app/assets/images/icons/video.svg +1 -14
  267. data/app/assets/images/icons/voicemail.svg +1 -15
  268. data/app/assets/images/icons/volume-1.svg +1 -14
  269. data/app/assets/images/icons/volume-2.svg +1 -14
  270. data/app/assets/images/icons/volume-x.svg +1 -15
  271. data/app/assets/images/icons/volume.svg +1 -13
  272. data/app/assets/images/icons/watch.svg +1 -15
  273. data/app/assets/images/icons/wifi-off.svg +1 -19
  274. data/app/assets/images/icons/wifi.svg +1 -16
  275. data/app/assets/images/icons/wind.svg +1 -13
  276. data/app/assets/images/icons/x-circle.svg +1 -15
  277. data/app/assets/images/icons/x-octagon.svg +1 -0
  278. data/app/assets/images/icons/x-square.svg +1 -15
  279. data/app/assets/images/icons/x.svg +1 -14
  280. data/app/assets/images/icons/youtube.svg +1 -0
  281. data/app/assets/images/icons/zap-off.svg +1 -16
  282. data/app/assets/images/icons/zap.svg +1 -13
  283. data/app/assets/images/icons/zoom-in.svg +1 -16
  284. data/app/assets/images/icons/zoom-out.svg +1 -15
  285. data/app/assets/javascripts/effective_editor/image-drop-and-paste.js +3 -0
  286. data/app/assets/javascripts/effective_editor/image-resize.js +2 -0
  287. data/app/assets/javascripts/effective_editor/initialize.js.coffee +68 -0
  288. data/app/assets/javascripts/effective_editor/input.js +2 -0
  289. data/app/assets/javascripts/effective_select/initialize.js.coffee +5 -2
  290. data/app/helpers/effective_bootstrap_helper.rb +24 -11
  291. data/app/models/effective/form_inputs/editor.rb +34 -2
  292. data/app/models/effective/form_inputs/select.rb +34 -5
  293. data/lib/effective_bootstrap/version.rb +1 -1
  294. metadata +23 -2
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-octagon"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>
@@ -1,15 +1 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="24"
4
- height="24"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- >
12
- <rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
13
- <line x1="9" y1="9" x2="15" y2="15" />
14
- <line x1="15" y1="9" x2="9" y2="15" />
15
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-square"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line></svg>
@@ -1,14 +1 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="24"
4
- height="24"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- >
12
- <line x1="18" y1="6" x2="6" y2="18" />
13
- <line x1="6" y1="6" x2="18" y2="18" />
14
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-youtube"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon></svg>
@@ -1,16 +1 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="24"
4
- height="24"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- >
12
- <polyline points="12.41 6.75 13 2 10.57 4.92" />
13
- <polyline points="18.57 12.91 21 10 15.66 10" />
14
- <polyline points="8 8 3 14 12 14 11 22 16 16" />
15
- <line x1="1" y1="1" x2="23" y2="23" />
16
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zap-off"><polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line></svg>
@@ -1,13 +1 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="24"
4
- height="24"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- >
12
- <polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />
13
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zap"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>
@@ -1,16 +1 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="24"
4
- height="24"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- >
12
- <circle cx="11" cy="11" r="8" />
13
- <line x1="21" y1="21" x2="16.65" y2="16.65" />
14
- <line x1="11" y1="8" x2="11" y2="14" />
15
- <line x1="8" y1="11" x2="14" y2="11" />
16
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zoom-in"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>
@@ -1,15 +1 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="24"
4
- height="24"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- >
12
- <circle cx="11" cy="11" r="8" />
13
- <line x1="21" y1="21" x2="16.65" y2="16.65" />
14
- <line x1="8" y1="11" x2="14" y2="11" />
15
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zoom-out"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>
@@ -0,0 +1,3 @@
1
+ (function(){var exports={};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(t,a,r){if(a)e(t.prototype,a);if(r)e(t,r);return t}}();function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var ImageData=function(){function e(t,a){_classCallCheck(this,e);this.dataUrl=t;this.type=a}_createClass(e,[{key:"minify",value:function t(){var a=this;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return new Promise(function(t,n){var i=r.maxWidth||800;var l=r.maxHeight||800;var o=r.quality||.8;if(!a.dataUrl){return n({message:"[error] QuillImageDropAndPaste: Fail to minify the image, dataUrl should not be empty."})}var s=new Image;s.onload=function(){var r=s.width;var n=s.height;if(r>n){if(r>i){s.height=n*i/r;s.width=i}}else{if(n>l){s.width=r*l/n;s.height=l}}var u=document.createElement("canvas");u.width=s.width;u.height=s.height;var f=u.getContext("2d");f.drawImage(s,0,0,s.width,s.height);var d=a.type||"image/png";var h=u.toDataURL(d,o);t(new e(h,d))};s.src=a.dataUrl})}},{key:"toFile",value:function e(t){if(!window.File){console.error("[error] QuillImageDropAndPaste: Your browser didnot support File API.");return null}return new File([this.toBlob()],t,{type:this.type})}},{key:"toBlob",value:function e(){var t=this.dataUrl.replace(/^[^,]+,/,"");var a=this.binaryStringToArrayBuffer(atob(t));return this.createBlob([a],{type:this.type})}},{key:"binaryStringToArrayBuffer",value:function e(t){var a=t.length;var r=new ArrayBuffer(a);var n=new Uint8Array(r);var i=-1;while(++i<a){n[i]=t.charCodeAt(i)}return r}},{key:"createBlob",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(typeof a==="string")a={type:a};try{return new Blob(t,a)}catch(e){if(e.name!=="TypeError")throw e;var r=typeof BlobBuilder!=="undefined"?BlobBuilder:typeof MSBlobBuilder!=="undefined"?MSBlobBuilder:typeof MozBlobBuilder!=="undefined"?MozBlobBuilder:WebKitBlobBuilder;var n=new r;for(var i=0;i<t.length;i++){n.append(t[i])}return n.getBlob(a.type)}}}]);return e}();var ImageDropAndPaste=function(){function e(t){var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,e);this.quill=t;this.options=a;this.handleDrop=this.handleDrop.bind(this);this.handlePaste=this.handlePaste.bind(this);this.quill.root.addEventListener("drop",this.handleDrop,false);this.quill.root.addEventListener("paste",this.handlePaste,false)}_createClass(e,[{key:"handleDrop",value:function e(t){var a=this;t.preventDefault();if(t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length){if(document.caretRangeFromPoint){var r=document.getSelection();var n=document.caretRangeFromPoint(t.clientX,t.clientY);if(r&&n){r.setBaseAndExtent(n.startContainer,n.startOffset,n.startContainer,n.startOffset)}}this.readFiles(t.dataTransfer.files,function(e,t){t=t||"image/png";if(typeof a.options.handler==="function"){a.options.handler.call(a,e,t,new ImageData(e,t))}else{a.insert.call(a,e,t)}},t)}}},{key:"handlePaste",value:function e(t){var a=this;if(t.clipboardData&&t.clipboardData.items&&t.clipboardData.items.length){this.readFiles(t.clipboardData.items,function(e,t){t=t||"image/png";if(typeof a.options.handler==="function"){a.options.handler.call(a,e,t,new ImageData(e,t))}else{a.insert(e,t)}},t)}}},{key:"readFiles",value:function e(t,a,r){[].forEach.call(t,function(e){var t=e.type;if(!t.match(/^image\/(gif|jpe?g|a?png|svg|webp|bmp)/i))return;r.preventDefault();var n=new FileReader;n.onload=function(e){a(e.target.result,t)};var i=e.getAsFile?e.getAsFile():e;if(i instanceof Blob)n.readAsDataURL(i)})}},{key:"insert",value:function e(t,a){var r=(this.quill.getSelection()||{}).index||this.quill.getLength();this.quill.insertEmbed(r,"image",t,"user")}}]);return e}();ImageDropAndPaste.ImageData=ImageData;exports.default=ImageDropAndPaste;
3
+ window.QuillImageDropAndPaste = ImageDropAndPaste;window.Quill.register('modules/imageDropAndPaste',ImageDropAndPaste)})();
@@ -0,0 +1,2 @@
1
+ // https://github.com/taoqf/quill-image-resize-module
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ImageResize=e():t.ImageResize=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=39)}([function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){var o=n(22),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();t.exports=i},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e,n){function o(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}var r=n(76),i=n(77),a=n(78),s=n(79),u=n(80);o.prototype.clear=r,o.prototype.delete=i,o.prototype.get=a,o.prototype.has=s,o.prototype.set=u,t.exports=o},function(t,e,n){function o(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}var r=n(8);t.exports=o},function(t,e,n){function o(t){return null==t?void 0===t?u:s:c&&c in Object(t)?i(t):a(t)}var r=n(16),i=n(65),a=n(88),s="[object Null]",u="[object Undefined]",c=r?r.toStringTag:void 0;t.exports=o},function(t,e,n){function o(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}var r=n(74);t.exports=o},function(t,e,n){var o=n(11),r=o(Object,"create");t.exports=r},function(t,e){function n(t,e){return t===e||t!==t&&e!==e}t.exports=n},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",function(){return r});var r=function t(e){o(this,t),this.onCreate=function(){},this.onDestroy=function(){},this.onUpdate=function(){},this.overlay=e.overlay,this.img=e.img,this.options=e.options,this.requestUpdate=e.onUpdate}},function(t,e,n){function o(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var r=n(21);t.exports=o},function(t,e,n){function o(t,e){var n=i(t,e);return r(n)?n:void 0}var r=n(49),i=n(66);t.exports=o},function(t,e,n){function o(t){return null!=t&&i(t.length)&&!r(t)}var r=n(13),i=n(31);t.exports=o},function(t,e,n){function o(t){if(!i(t))return!1;var e=r(t);return e==s||e==u||e==a||e==c}var r=n(5),i=n(0),a="[object AsyncFunction]",s="[object Function]",u="[object GeneratorFunction]",c="[object Proxy]";t.exports=o},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var o=n(11),r=n(1),i=o(r,"Map");t.exports=i},function(t,e,n){var o=n(1),r=o.Symbol;t.exports=r},function(t,e){function n(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}t.exports=n},function(t,e,n){function o(t,e,n){(void 0===n||i(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}var r=n(10),i=n(8);t.exports=o},function(t,e,n){function o(t,e,n,p,f){t!==e&&a(e,function(a,c){if(u(a))f||(f=new r),s(t,e,c,n,o,p,f);else{var h=p?p(l(t,c),a,c+"",t,e,f):void 0;void 0===h&&(h=a),i(t,c,h)}},c)}var r=n(42),i=n(18),a=n(47),s=n(52),u=n(0),c=n(33),l=n(26);t.exports=o},function(t,e,n){function o(t,e){return a(i(t,e,r),t+"")}var r=n(27),i=n(90),a=n(91);t.exports=o},function(t,e,n){var o=n(11),r=function(){try{var t=o(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=r},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(e,n(109))},function(t,e,n){var o=n(89),r=o(Object.getPrototypeOf,Object);t.exports=r},function(t,e){function n(t,e){var n=typeof t;return!!(e=null==e?o:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}var o=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=n},function(t,e){function n(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||o)}var o=Object.prototype;t.exports=n},function(t,e){function n(t,e){if("__proto__"!=e)return t[e]}t.exports=n},function(t,e){function n(t){return t}t.exports=n},function(t,e,n){var o=n(48),r=n(2),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=o(function(){return arguments}())?o:function(t){return r(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){(function(t){var o=n(1),r=n(103),i="object"==typeof e&&e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?o.Buffer:void 0,c=u?u.isBuffer:void 0,l=c||r;t.exports=l}).call(e,n(14)(t))},function(t,e){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}var o=9007199254740991;t.exports=n},function(t,e,n){var o=n(50),r=n(55),i=n(87),a=i&&i.isTypedArray,s=a?r(a):o;t.exports=s},function(t,e,n){function o(t){return a(t)?r(t,!0):i(t)}var r=n(44),i=n(51),a=n(12);t.exports=o},function(t,e,n){"use strict";e.a={modules:["DisplaySize","Toolbar","Resize"],overlayStyles:{position:"absolute",boxSizing:"border-box",border:"1px dashed #444"},handleStyles:{position:"absolute",height:"12px",width:"12px",backgroundColor:"white",border:"1px solid #777",boxSizing:"border-box",opacity:"0.80"},displayStyles:{position:"absolute",font:"12px/1.0 Arial, Helvetica, sans-serif",padding:"4px 8px",textAlign:"center",backgroundColor:"white",color:"#333",border:"1px solid #777",boxSizing:"border-box",opacity:"0.80",cursor:"default"},toolbarStyles:{position:"absolute",top:"-12px",right:"0",left:"0",height:"0",minWidth:"100px",font:"12px/1.0 Arial, Helvetica, sans-serif",textAlign:"center",color:"#333",boxSizing:"border-box",cursor:"default"},toolbarButtonStyles:{display:"inline-block",width:"24px",height:"24px",padding:"3px",background:"white",border:"1px solid #999",verticalAlign:"middle"},toolbarButtonSvgStyles:{fill:"#444",stroke:"#444",strokeWidth:"2"}}},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return s});var a=n(9),s=function(t){function e(){var t,n,i,a;o(this,e);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=i=r(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(u))),i.onCreate=function(){i.display=document.createElement("div"),Object.assign(i.display.style,i.options.displayStyles),i.overlay.appendChild(i.display)},i.onDestroy=function(){},i.onUpdate=function(){if(i.display&&i.img){var t=i.getCurrentSize();if(i.display.innerHTML=t.join(" &times; "),t[0]>120&&t[1]>30)Object.assign(i.display.style,{right:"4px",bottom:"4px",left:"auto"});else if("right"==i.img.style.float){var e=i.display.getBoundingClientRect();Object.assign(i.display.style,{right:"auto",bottom:"-"+(e.height+4)+"px",left:"-"+(e.width+4)+"px"})}else{var n=i.display.getBoundingClientRect();Object.assign(i.display.style,{right:"-"+(n.width+4)+"px",bottom:"-"+(n.height+4)+"px",left:"auto"})}}},i.getCurrentSize=function(){return[i.img.width,Math.round(i.img.width/i.img.naturalWidth*i.img.naturalHeight)]},a=n,r(i,a)}return i(e,t),e}(a.a)},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return s});var a=n(9),s=function(t){function e(){var t,n,i,a;o(this,e);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=i=r(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(u))),i.onCreate=function(){i.boxes=[],i.addBox("nwse-resize"),i.addBox("nesw-resize"),i.addBox("nwse-resize"),i.addBox("nesw-resize"),i.positionBoxes()},i.onDestroy=function(){i.setCursor("")},i.positionBoxes=function(){var t=-parseFloat(i.options.handleStyles.width)/2+"px",e=-parseFloat(i.options.handleStyles.height)/2+"px";[{left:t,top:e},{right:t,top:e},{right:t,bottom:e},{left:t,bottom:e}].forEach(function(t,e){Object.assign(i.boxes[e].style,t)})},i.addBox=function(t){var e=document.createElement("div");Object.assign(e.style,i.options.handleStyles),e.style.cursor=t,e.style.width=i.options.handleStyles.width+"px",e.style.height=i.options.handleStyles.height+"px",e.addEventListener("touchstart",i.handleMousedown,!1),e.addEventListener("mousedown",i.handleMousedown,!1),e.addEventListener("touchstart",i.handleMousedown,!1),i.overlay.appendChild(e),i.boxes.push(e)},i.handleMousedown=function(t){i.dragBox=t.target,t.touches?i.dragStartX=t.touches[0].clientX:i.dragStartX=t.clientX,i.preDragWidth=i.img.width||i.img.naturalWidth,i.setCursor(i.dragBox.style.cursor),document.addEventListener("touchmove",i.handleDrag,!1),document.addEventListener("touchend",i.handleMouseup,!1),document.addEventListener("mousemove",i.handleDrag,!1),document.addEventListener("mouseup",i.handleMouseup,!1)},i.handleMouseup=function(){i.setCursor(""),document.removeEventListener("touchmove",i.handleDrag),document.removeEventListener("touchend",i.handleMouseup),document.removeEventListener("mousemove",i.handleDrag),document.removeEventListener("mouseup",i.handleMouseup)},i.handleDrag=function(t){if(i.img){var e=void 0;e=t.touches?t.touches[0].clientX-i.dragStartX:t.clientX-i.dragStartX,i.dragBox===i.boxes[0]||i.dragBox===i.boxes[3]?i.img.width=Math.round(i.preDragWidth-e):i.img.width=Math.round(i.preDragWidth+e),i.requestUpdate()}},i.setCursor=function(t){[document.body,i.img].forEach(function(e){e.style.cursor=t})},a=n,r(i,a)}return i(e,t),e}(a.a)},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return b});var a=n(105),s=n.n(a),u=n(107),c=n.n(u),l=n(106),p=n.n(l),f=n(108),h=n.n(f),d=n(9),y=new s.a.Attributor.Style("float","float"),v=new s.a.Attributor.Style("margin","margin"),m=new s.a.Attributor.Style("display","display"),b=function(t){function e(){var t,n,i,a;o(this,e);for(var s=arguments.length,u=Array(s),l=0;l<s;l++)u[l]=arguments[l];return n=i=r(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(u))),i.onCreate=function(){i.toolbar=document.createElement("div"),Object.assign(i.toolbar.style,i.options.toolbarStyles),i.overlay.appendChild(i.toolbar),i._defineAlignments(),i._addToolbarButtons()},i.onDestroy=function(){},i.onUpdate=function(){},i._defineAlignments=function(){i.alignments=[{icon:c.a,apply:function(){m.add(i.img,"inline"),y.add(i.img,"left"),v.add(i.img,"0 1em 1em 0")},isApplied:function(){return"left"==y.value(i.img)}},{icon:p.a,apply:function(){m.add(i.img,"block"),y.remove(i.img),v.add(i.img,"auto")},isApplied:function(){return"auto"==v.value(i.img)}},{icon:h.a,apply:function(){m.add(i.img,"inline"),y.add(i.img,"right"),v.add(i.img,"0 0 1em 1em")},isApplied:function(){return"right"==y.value(i.img)}}]},i._addToolbarButtons=function(){var t=[];i.alignments.forEach(function(e,n){var o=document.createElement("span");t.push(o),o.innerHTML=e.icon,o.addEventListener("click",function(){t.forEach(function(t){return t.style.filter=""}),e.isApplied()?(y.remove(i.img),v.remove(i.img),m.remove(i.img)):(i._selectButton(o),e.apply()),i.requestUpdate()}),Object.assign(o.style,i.options.toolbarButtonStyles),n>0&&(o.style.borderLeftWidth="0"),Object.assign(o.children[0].style,i.options.toolbarButtonSvgStyles),e.isApplied()&&i._selectButton(o),i.toolbar.appendChild(o)})},i._selectButton=function(t){t.style.filter="invert(20%)"},a=n,r(i,a)}return i(e,t),e}(d.a)},function(t,e,n){var o=n(17),r=n(20),i=n(64),a=n(102),s=r(function(t){return t.push(void 0,i),o(a,void 0,t)});t.exports=s},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=n(38),i=n.n(r),a=n(34),s=n(35),u=n(37),c=n(36),l={DisplaySize:s.a,Toolbar:u.a,Resize:c.a},p=function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,t),this.initializeModules=function(){n.removeModules(),n.modules=n.moduleClasses.map(function(t){return new(l[t]||t)(n)}),n.modules.forEach(function(t){t.onCreate()}),n.onUpdate()},this.onUpdate=function(){n.repositionElements(),n.modules.forEach(function(t){t.onUpdate()})},this.removeModules=function(){n.modules.forEach(function(t){t.onDestroy()}),n.modules=[]},this.handleClick=function(t){if(t.target&&t.target.tagName&&"IMG"===t.target.tagName.toUpperCase()){if(n.img===t.target)return;n.img&&n.hide(),n.show(t.target)}else n.img&&n.hide()},this.show=function(t){n.img=t,n.showOverlay(),n.initializeModules()},this.showOverlay=function(){n.overlay&&n.hideOverlay(),n.setUserSelect("none"),document.addEventListener("keyup",n.checkImage,!0),n.quill.root.addEventListener("input",n.checkImage,!0),n.overlay=document.createElement("div"),Object.assign(n.overlay.style,n.options.overlayStyles),n.quill.root.parentNode.appendChild(n.overlay),n.repositionElements()},this.hideOverlay=function(){n.overlay&&(n.quill.root.parentNode.removeChild(n.overlay),n.overlay=void 0,document.removeEventListener("keyup",n.checkImage),n.quill.root.removeEventListener("input",n.checkImage),n.setUserSelect(""))},this.repositionElements=function(){if(n.overlay&&n.img){var t=n.quill.root.parentNode,e=n.img.getBoundingClientRect(),o=t.getBoundingClientRect();Object.assign(n.overlay.style,{left:e.left-o.left-1+t.scrollLeft+"px",top:e.top-o.top+t.scrollTop+"px",width:e.width+"px",height:e.height+"px"})}},this.hide=function(){n.hideOverlay(),n.removeModules(),n.img=void 0},this.setUserSelect=function(t){["userSelect","mozUserSelect","webkitUserSelect","msUserSelect"].forEach(function(e){n.quill.root.style[e]=t,document.documentElement.style[e]=t})},this.checkImage=function(t){try{n.img&&(46!=t.keyCode&&8!=t.keyCode||n.quill.find(n.img).deleteAt(0),n.hide())}catch(err){}},this.quill=e;var s=!1;r.modules&&(s=r.modules.slice()),this.options=i()({},r,a.a),!1!==s&&(this.options.modules=s),document.execCommand("enableObjectResizing",!1,"false"),this.quill.root.addEventListener("click",this.handleClick,!1),this.quill.root.parentNode.style.position=this.quill.root.parentNode.style.position||"relative",this.moduleClasses=this.options.modules,this.modules=[]};e.default=p},function(t,e,n){function o(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}var r=n(67),i=n(68),a=n(69),s=n(70),u=n(71);o.prototype.clear=r,o.prototype.delete=i,o.prototype.get=a,o.prototype.has=s,o.prototype.set=u,t.exports=o},function(t,e,n){function o(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}var r=n(81),i=n(82),a=n(83),s=n(84),u=n(85);o.prototype.clear=r,o.prototype.delete=i,o.prototype.get=a,o.prototype.has=s,o.prototype.set=u,t.exports=o},function(t,e,n){function o(t){var e=this.__data__=new r(t);this.size=e.size}var r=n(3),i=n(93),a=n(94),s=n(95),u=n(96),c=n(97);o.prototype.clear=i,o.prototype.delete=a,o.prototype.get=s,o.prototype.has=u,o.prototype.set=c,t.exports=o},function(t,e,n){var o=n(1),r=o.Uint8Array;t.exports=r},function(t,e,n){function o(t,e){var n=a(t),o=!n&&i(t),l=!n&&!o&&s(t),f=!n&&!o&&!l&&c(t),h=n||o||l||f,d=h?r(t.length,String):[],y=d.length;for(var v in t)!e&&!p.call(t,v)||h&&("length"==v||l&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||u(v,y))||d.push(v);return d}var r=n(54),i=n(28),a=n(29),s=n(30),u=n(24),c=n(32),l=Object.prototype,p=l.hasOwnProperty;t.exports=o},function(t,e,n){function o(t,e,n){var o=t[e];s.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}var r=n(10),i=n(8),a=Object.prototype,s=a.hasOwnProperty;t.exports=o},function(t,e,n){var o=n(0),r=Object.create,i=function(){function t(){}return function(e){if(!o(e))return{};if(r)return r(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},function(t,e,n){var o=n(63),r=o();t.exports=r},function(t,e,n){function o(t){return i(t)&&r(t)==a}var r=n(5),i=n(2),a="[object Arguments]";t.exports=o},function(t,e,n){function o(t){return!(!a(t)||i(t))&&(r(t)?d:c).test(s(t))}var r=n(13),i=n(75),a=n(0),s=n(98),u=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,l=Function.prototype,p=Object.prototype,f=l.toString,h=p.hasOwnProperty,d=RegExp("^"+f.call(h).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=o},function(t,e,n){function o(t){return a(t)&&i(t.length)&&!!s[r(t)]}var r=n(5),i=n(31),a=n(2),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=o},function(t,e,n){function o(t){if(!r(t))return a(t);var e=i(t),n=[];for(var o in t)("constructor"!=o||!e&&u.call(t,o))&&n.push(o);return n}var r=n(0),i=n(25),a=n(86),s=Object.prototype,u=s.hasOwnProperty;t.exports=o},function(t,e,n){function o(t,e,n,o,_,g,x){var N=m(t,n),O=m(e,n),A=x.get(O);if(A)return void r(t,n,A);var E=g?g(N,O,n+"",t,e,x):void 0,j=void 0===E;if(j){var w=l(O),T=!w&&f(O),S=!w&&!T&&v(O);E=O,w||T||S?l(N)?E=N:p(N)?E=s(N):T?(j=!1,E=i(O,!0)):S?(j=!1,E=a(O,!0)):E=[]:y(O)||c(O)?(E=N,c(N)?E=b(N):d(N)&&!h(N)||(E=u(O))):j=!1}j&&(x.set(O,E),_(E,O,o,g,x),x.delete(O)),r(t,n,E)}var r=n(18),i=n(57),a=n(58),s=n(59),u=n(72),c=n(28),l=n(29),p=n(100),f=n(30),h=n(13),d=n(0),y=n(101),v=n(32),m=n(26),b=n(104);t.exports=o},function(t,e,n){var o=n(99),r=n(21),i=n(27),a=r?function(t,e){return r(t,"toString",{configurable:!0,enumerable:!1,value:o(e),writable:!0})}:i;t.exports=a},function(t,e){function n(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o}t.exports=n},function(t,e){function n(t){return function(e){return t(e)}}t.exports=n},function(t,e,n){function o(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}var r=n(43);t.exports=o},function(t,e,n){(function(t){function o(t,e){if(e)return t.slice();var n=t.length,o=c?c(n):new t.constructor(n);return t.copy(o),o}var r=n(1),i="object"==typeof e&&e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?r.Buffer:void 0,c=u?u.allocUnsafe:void 0;t.exports=o}).call(e,n(14)(t))},function(t,e,n){function o(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var r=n(56);t.exports=o},function(t,e){function n(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++n<o;)e[n]=t[n];return e}t.exports=n},function(t,e,n){function o(t,e,n,o){var a=!n;n||(n={});for(var s=-1,u=e.length;++s<u;){var c=e[s],l=o?o(n[c],t[c],c,n,t):void 0;void 0===l&&(l=t[c]),a?i(n,c,l):r(n,c,l)}return n}var r=n(45),i=n(10);t.exports=o},function(t,e,n){var o=n(1),r=o["__core-js_shared__"];t.exports=r},function(t,e,n){function o(t){return r(function(e,n){var o=-1,r=n.length,a=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(r--,a):void 0,s&&i(n[0],n[1],s)&&(a=r<3?void 0:a,r=1),e=Object(e);++o<r;){var u=n[o];u&&t(e,u,o,a)}return e})}var r=n(20),i=n(73);t.exports=o},function(t,e){function n(t){return function(e,n,o){for(var r=-1,i=Object(e),a=o(e),s=a.length;s--;){var u=a[t?s:++r];if(!1===n(i[u],u,i))break}return e}}t.exports=n},function(t,e,n){function o(t,e,n,a,s,u){return i(t)&&i(e)&&(u.set(e,t),r(t,e,void 0,o,u),u.delete(e)),t}var r=n(19),i=n(0);t.exports=o},function(t,e,n){function o(t){var e=a.call(t,u),n=t[u];try{t[u]=void 0;var o=!0}catch(t){}var r=s.call(t);return o&&(e?t[u]=n:delete t[u]),r}var r=n(16),i=Object.prototype,a=i.hasOwnProperty,s=i.toString,u=r?r.toStringTag:void 0;t.exports=o},function(t,e){function n(t,e){return null==t?void 0:t[e]}t.exports=n},function(t,e,n){function o(){this.__data__=r?r(null):{},this.size=0}var r=n(7);t.exports=o},function(t,e){function n(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}t.exports=n},function(t,e,n){function o(t){var e=this.__data__;if(r){var n=e[t];return n===i?void 0:n}return s.call(e,t)?e[t]:void 0}var r=n(7),i="__lodash_hash_undefined__",a=Object.prototype,s=a.hasOwnProperty;t.exports=o},function(t,e,n){function o(t){var e=this.__data__;return r?void 0!==e[t]:a.call(e,t)}var r=n(7),i=Object.prototype,a=i.hasOwnProperty;t.exports=o},function(t,e,n){function o(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?i:e,this}var r=n(7),i="__lodash_hash_undefined__";t.exports=o},function(t,e,n){function o(t){return"function"!=typeof t.constructor||a(t)?{}:r(i(t))}var r=n(46),i=n(23),a=n(25);t.exports=o},function(t,e,n){function o(t,e,n){if(!s(n))return!1;var o=typeof e;return!!("number"==o?i(n)&&a(e,n.length):"string"==o&&e in n)&&r(n[e],t)}var r=n(8),i=n(12),a=n(24),s=n(0);t.exports=o},function(t,e){function n(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}t.exports=n},function(t,e,n){function o(t){return!!i&&i in t}var r=n(61),i=function(){var t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=o},function(t,e){function n(){this.__data__=[],this.size=0}t.exports=n},function(t,e,n){function o(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():a.call(e,n,1),--this.size,!0)}var r=n(4),i=Array.prototype,a=i.splice;t.exports=o},function(t,e,n){function o(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}var r=n(4);t.exports=o},function(t,e,n){function o(t){return r(this.__data__,t)>-1}var r=n(4);t.exports=o},function(t,e,n){function o(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}var r=n(4);t.exports=o},function(t,e,n){function o(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}var r=n(40),i=n(3),a=n(15);t.exports=o},function(t,e,n){function o(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}var r=n(6);t.exports=o},function(t,e,n){function o(t){return r(this,t).get(t)}var r=n(6);t.exports=o},function(t,e,n){function o(t){return r(this,t).has(t)}var r=n(6);t.exports=o},function(t,e,n){function o(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}var r=n(6);t.exports=o},function(t,e){function n(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}t.exports=n},function(t,e,n){(function(t){var o=n(22),r="object"==typeof e&&e&&!e.nodeType&&e,i=r&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===r,s=a&&o.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=u}).call(e,n(14)(t))},function(t,e){function n(t){return r.call(t)}var o=Object.prototype,r=o.toString;t.exports=n},function(t,e){function n(t,e){return function(n){return t(e(n))}}t.exports=n},function(t,e,n){function o(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);++a<s;)u[a]=o[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=o[a];return c[e]=n(u),r(t,this,c)}}var r=n(17),i=Math.max;t.exports=o},function(t,e,n){var o=n(53),r=n(92),i=r(o);t.exports=i},function(t,e){function n(t){var e=0,n=0;return function(){var a=i(),s=r-(a-n);if(n=a,s>0){if(++e>=o)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var o=800,r=16,i=Date.now;t.exports=n},function(t,e,n){function o(){this.__data__=new r,this.size=0}var r=n(3);t.exports=o},function(t,e){function n(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}t.exports=n},function(t,e){function n(t){return this.__data__.get(t)}t.exports=n},function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},function(t,e,n){function o(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<s-1)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}var r=n(3),i=n(15),a=n(41),s=200;t.exports=o},function(t,e){function n(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var o=Function.prototype,r=o.toString;t.exports=n},function(t,e){function n(t){return function(){return t}}t.exports=n},function(t,e,n){function o(t){return i(t)&&r(t)}var r=n(12),i=n(2);t.exports=o},function(t,e,n){function o(t){if(!a(t)||r(t)!=s)return!1;var e=i(t);if(null===e)return!0;var n=p.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==f}var r=n(5),i=n(23),a=n(2),s="[object Object]",u=Function.prototype,c=Object.prototype,l=u.toString,p=c.hasOwnProperty,f=l.call(Object);t.exports=o},function(t,e,n){var o=n(19),r=n(62),i=r(function(t,e,n,r){o(t,e,n,r)});t.exports=i},function(t,e){function n(){return!1}t.exports=n},function(t,e,n){function o(t){return r(t,i(t))}var r=n(60),i=n(33);t.exports=o},function(t,e,n){!function(e,n){t.exports=n()}("undefined"!=typeof self&&self,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=9)}([function(t,e,n){"use strict";function o(t,e){var n=i(t);if(null==n)throw new u("Unable to create "+t+" blot");var o=n;return new o(t instanceof Node||t.nodeType===Node.TEXT_NODE?t:o.create(e),e)}function r(t,n){return void 0===n&&(n=!1),null==t?null:null!=t[e.DATA_KEY]?t[e.DATA_KEY].blot:n?r(t.parentNode,n):null}function i(t,e){void 0===e&&(e=h.ANY);var n;if("string"==typeof t)n=f[t]||c[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=f.text;else if("number"==typeof t)t&h.LEVEL&h.BLOCK?n=f.block:t&h.LEVEL&h.INLINE&&(n=f.inline);else if(t instanceof HTMLElement){var o=(t.getAttribute("class")||"").split(/\s+/);for(var r in o)if(n=l[o[r]])break;n=n||p[t.tagName]}return null==n?null:e&h.LEVEL&n.scope&&e&h.TYPE&n.scope?n:null}function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length>1)return t.map(function(t){return a(t)});var n=t[0];if("string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new u("Invalid definition");if("abstract"===n.blotName)throw new u("Cannot register abstract class");if(f[n.blotName||n.attrName]=n,"string"==typeof n.keyName)c[n.keyName]=n;else if(null!=n.className&&(l[n.className]=n),null!=n.tagName){Array.isArray(n.tagName)?n.tagName=n.tagName.map(function(t){return t.toUpperCase()}):n.tagName=n.tagName.toUpperCase();var o=Array.isArray(n.tagName)?n.tagName:[n.tagName];o.forEach(function(t){null!=p[t]&&null!=n.className||(p[t]=n)})}return n}var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e){var n=this;return e="[Parchment] "+e,n=t.call(this,e)||this,n.message=e,n.name=n.constructor.name,n}return s(e,t),e}(Error);e.ParchmentError=u;var c={},l={},p={},f={};e.DATA_KEY="__blot";var h;!function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(h=e.Scope||(e.Scope={})),e.create=o,e.find=r,e.query=i,e.register=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var r=o.Scope.TYPE&o.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&o.Scope.LEVEL|r:this.scope=o.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,function(t){return t.name})},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=o.query(t,o.Scope.BLOT&(this.scope|o.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=r},function(t,e,n){"use strict";function o(t){var e=s.find(t);if(null==e)try{e=s.create(t)}catch(n){e=s.create(s.Scope.INLINE),[].slice.call(t.childNodes).forEach(function(t){e.domNode.appendChild(t)}),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),a=n(5),s=n(0),u=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return r(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach(function(t){t.attach()})},e.prototype.build=function(){var t=this;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(e){try{var n=o(e);t.insertBefore(n,t.children.head||void 0)}catch(t){if(t instanceof s.ParchmentError)return;throw t}})},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,function(t,e,n){t.deleteAt(e,n)})},e.prototype.descendant=function(t,n){var o=this.children.find(n),r=o[0],i=o[1];return null==t.blotName&&t(r)||null!=t.blotName&&r instanceof t?[r,i]:r instanceof e?r.descendant(t,i):[null,-1]},e.prototype.descendants=function(t,n,o){void 0===n&&(n=0),void 0===o&&(o=Number.MAX_VALUE);var r=[],i=o;return this.children.forEachAt(n,o,function(n,o,a){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&r.push(n),n instanceof e&&(r=r.concat(n.descendants(t,o,i))),i-=a}),r},e.prototype.detach=function(){this.children.forEach(function(t){t.detach()}),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,o){this.children.forEachAt(t,e,function(t,e,r){t.formatAt(e,r,n,o)})},e.prototype.insertAt=function(t,e,n){var o=this.children.find(t),r=o[0],i=o[1];if(r)r.insertAt(i,e,n);else{var a=null==n?s.create("text",e):s.create(e,n);this.appendChild(a)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(e){return t instanceof e}))throw new s.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce(function(t,e){return t+e.length()},0)},e.prototype.moveChildren=function(t,e){this.children.forEach(function(n){t.insertBefore(n,e)})},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=s.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var o=this.children.find(t,n),r=o[0],i=o[1],a=[[this,t]];return r instanceof e?a.concat(r.path(i,n)):(null!=r&&a.push([r,i]),a)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),function(t,o,r){t=t.split(o,e),n.appendChild(t)}),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,r=[],i=[];t.forEach(function(t){t.target===n.domNode&&"childList"===t.type&&(r.push.apply(r,t.addedNodes),i.push.apply(i,t.removedNodes))}),i.forEach(function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=s.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}}),r.filter(function(t){return t.parentNode==n.domNode}).sort(function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(t){var e=null;null!=t.nextSibling&&(e=s.find(t.nextSibling));var r=o(t);r.next==e&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,e||void 0))})},e}(a.default);e.default=u},function(t,e,n){"use strict";var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(6),a=n(2),s=n(0),u=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new i.default(n.domNode),n}return o(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=s.query(t);n instanceof r.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var o=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(o),o},e.prototype.update=function(e,n){var o=this;t.prototype.update.call(this,e,n),e.some(function(t){return t.target===o.domNode&&"attributes"===t.type})&&this.attributes.build()},e.prototype.wrap=function(n,o){var r=t.prototype.wrap.call(this,n,o);return r instanceof e&&r.statics.scope===this.statics.scope&&this.attributes.move(r),r},e}(a.default);e.default=u},function(t,e,n){"use strict";var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),i=n(0),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){return t={},t[this.statics.blotName]=this.statics.value(this.domNode)||!0,t;var t},e.scope=i.Scope.INLINE_BLOT,e}(r.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=function(){function t(t){this.domNode=t,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new o.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return o.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,r){var i=this.isolate(t,e);if(null!=o.query(n,o.Scope.BLOT)&&r)i.wrap(n,r);else if(null!=o.query(n,o.Scope.ATTRIBUTE)){var a=o.create(this.statics.scope);i.wrap(a),a.format(n,r)}},t.prototype.insertAt=function(t,e,n){var r=null==n?o.create("text",e):o.create(e,n),i=this.split(t);this.parent.insertBefore(r,i)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[o.DATA_KEY]&&delete this.domNode[o.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?o.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?o.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(7),i=n(8),a=n(0),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=o.default.keys(this.domNode),n=r.default.keys(this.domNode),s=i.default.keys(this.domNode);e.concat(n).concat(s).forEach(function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof o.default&&(t.attributes[n.attrName]=n)})},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach(function(n){var o=e.attributes[n].value(e.domNode);t.format(n,o)})},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce(function(e,n){return e[n]=t.attributes[n].value(t.domNode),e},{})},t}();e.default=s},function(t,e,n){"use strict";function o(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(function(t){return 0===t.indexOf(e+"-")})}var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){o(t,this.keyName).forEach(function(e){t.classList.remove(e)}),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=o(t,this.keyName)[0]||"",n=e.slice(this.keyName.length+1);return this.canAdd(t,n)?n:""},e}(i.default);e.default=a},function(t,e,n){"use strict";function o(t){var e=t.split("-"),n=e.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return e[0]+n}var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map(function(t){return t.split(":")[0].trim()})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[o(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[o(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[o(this.keyName)];return this.canAdd(t,e)?e:""},e}(i.default);e.default=a},function(t,e,n){t.exports=n(10)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),r=n(3),i=n(4),a=n(12),s=n(13),u=n(14),c=n(15),l=n(16),p=n(1),f=n(7),h=n(8),d=n(6),y=n(0),v={Scope:y.Scope,create:y.create,find:y.find,query:y.query,register:y.register,Container:o.default,Format:r.default,Leaf:i.default,Embed:c.default,Scroll:a.default,Block:u.default,Inline:s.default,Text:l.default,Attributor:{Attribute:p.default,Class:f.default,Style:h.default,Store:d.default}};e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,o=this.iterator();n=o();){var r=n.length();if(t<r||e&&t===r&&(null==n.next||0!==n.next.length()))return[n,t];t-=r}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var o,r=this.find(t),i=r[0],a=r[1],s=t-a,u=this.iterator(i);(o=u())&&s<t+e;){var c=o.length();t>s?n(o,t-s,Math.min(e,s+c-t)):n(o,0,Math.min(c,t+e-s)),s+=c}},t.prototype.map=function(t){return this.reduce(function(e,n){return e.push(t(n)),e},[])},t.prototype.reduce=function(t,e){for(var n,o=this.iterator();n=o();)e=t(e,n);return e},t}();e.default=o},function(t,e,n){"use strict";var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(0),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver(function(t){n.update(t)}),n.observer.observe(n.domNode,a),n.attach(),n}return o(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach(function(t){t.remove()}):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,o,r){this.update(),t.prototype.formatAt.call(this,e,n,o,r)},e.prototype.insertAt=function(e,n,o){this.update(),t.prototype.insertAt.call(this,e,n,o)},e.prototype.optimize=function(e,n){var o=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var a=[].slice.call(this.observer.takeRecords());a.length>0;)e.push(a.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==o&&null!=t.domNode.parentNode&&(null==t.domNode[i.DATA_KEY].mutations&&(t.domNode[i.DATA_KEY].mutations=[]),e&&s(t.parent))},u=function(t){null!=t.domNode[i.DATA_KEY]&&null!=t.domNode[i.DATA_KEY].mutations&&(t instanceof r.default&&t.children.forEach(u),t.optimize(n))},c=e,l=0;c.length>0;l+=1){if(l>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach(function(t){var e=i.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(i.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,function(t){var e=i.find(t,!1);s(e,!1),e instanceof r.default&&e.children.forEach(function(t){s(t,!1)})})):"attributes"===t.type&&s(e.prev)),s(e))}),this.children.forEach(u),c=[].slice.call(this.observer.takeRecords()),a=c.slice();a.length>0;)e.push(a.pop())}},e.prototype.update=function(e,n){var o=this;void 0===n&&(n={}),e=e||this.observer.takeRecords(),e.map(function(t){var e=i.find(t.target,!0);return null==e?null:null==e.domNode[i.DATA_KEY].mutations?(e.domNode[i.DATA_KEY].mutations=[t],e):(e.domNode[i.DATA_KEY].mutations.push(t),null)}).forEach(function(t){null!=t&&t!==o&&null!=t.domNode[i.DATA_KEY]&&t.update(t.domNode[i.DATA_KEY].mutations||[],n)}),null!=this.domNode[i.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[i.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=i.Scope.BLOCK_BLOT,e.tagName="DIV",e}(r.default);e.default=s},function(t,e,n){"use strict";function o(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),a=n(0),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,o){var r=this;n!==this.statics.blotName||o?t.prototype.format.call(this,n,o):(this.children.forEach(function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),r.attributes.copy(t)}),this.unwrap())},e.prototype.formatAt=function(e,n,o,r){if(null!=this.formats()[o]||a.query(o,a.Scope.ATTRIBUTE)){this.isolate(e,n).format(o,r)}else t.prototype.formatAt.call(this,e,n,o,r)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&o(r,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i.default);e.default=s},function(t,e,n){"use strict";var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(0),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){var o=i.query(e.blotName).tagName;if(n.tagName!==o)return t.formats.call(this,n)},e.prototype.format=function(n,o){null!=i.query(n,i.Scope.BLOCK)&&(n!==this.statics.blotName||o?t.prototype.format.call(this,n,o):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,o,r){null!=i.query(o,i.Scope.BLOCK)?this.format(o,r):t.prototype.formatAt.call(this,e,n,o,r)},e.prototype.insertAt=function(e,n,o){if(null==o||null!=i.query(n,i.Scope.INLINE))t.prototype.insertAt.call(this,e,n,o);else{var r=this.split(e),a=i.create(n,o);r.parent.insertBefore(a,r)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=i.Scope.BLOCK_BLOT,e.tagName="P",e}(r.default);e.default=a},function(t,e,n){"use strict";var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(4),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,o,r){0===e&&n===this.length()?this.format(o,r):t.prototype.formatAt.call(this,e,n,o,r)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(r.default);e.default=i},function(t,e,n){"use strict";var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(4),i=n(0),a=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return o(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,o){null==o?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,o)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=i.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some(function(t){return"characterData"===t.type&&t.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=i.Scope.INLINE_BLOT,e}(r.default);e.default=a}])})},function(t,e){t.exports='<svg viewbox="0 0 18 18">\n <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line>\n <line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"></line>\n <line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"></line>\n</svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18">\n <line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"></line>\n <line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"></line>\n <line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"></line>\n</svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18">\n <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line>\n <line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"></line>\n <line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"></line>\n</svg>'},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n}])});
@@ -1,11 +1,27 @@
1
1
  # https://quilljs.com/docs/download/
2
2
  # https://github.com/quilljs/quill
3
+
4
+ Quill.register('modules/imageResize', window.ImageResize.default)
5
+ Quill.register('modules/imageDrop', window.QuillImageDropAndPaste)
6
+
3
7
  (this.EffectiveBootstrap || {}).effective_editor = ($element, options) ->
4
8
  editor = '#' + $element.attr('id') + '_editor'
5
9
 
10
+ active_storage = options['active_storage']
11
+ delete options['active_storage']
12
+
6
13
  content_mode = options['content_mode']
7
14
  delete options['content_mode']
8
15
 
16
+ if options['modules']['imageDropAndPaste']
17
+ # Image Drop & Paste
18
+ # https://github.com/chenjuneking/quill-image-drop-and-paste
19
+ dropImage = (imageDataUrl, type, imageData) ->
20
+ file = imageData.toFile(type.replace('/', '.'))
21
+ uploadImage(quill, file)
22
+
23
+ options['modules']['imageDropAndPaste'] = { handler: dropImage }
24
+
9
25
  quill = new Quill($element.siblings(editor).get(0), options)
10
26
  content = $element.val() || ''
11
27
 
@@ -49,6 +65,58 @@
49
65
 
50
66
  $element.on 'quill:focus', (event) -> quill.focus()
51
67
 
68
+ # Active Storage support
69
+ if active_storage and content_mode != 'code'
70
+ quill.getModule('toolbar').addHandler('image', -> createImage(quill))
71
+
72
+ # Active Support Direct Upload
73
+ createImage = (quill) ->
74
+ input = document.createElement('input')
75
+ input.setAttribute('type', 'file')
76
+ input.click()
77
+
78
+ input.onchange = ->
79
+ file = input.files[0]
80
+
81
+ if(/^image\//.test(file.type) == false)
82
+ return alert('Please upload an image')
83
+
84
+ if file.size > 20000000
85
+ return alert('Please upload an image less than 20mb')
86
+
87
+ uploadImage(quill, file)
88
+
89
+ uploadImage = (quill, file) ->
90
+ $form = $(quill.container).closest('form')
91
+
92
+ # Insert the image here
93
+ index = try quill.getSelection().index catch err then 0
94
+
95
+ # Apply progress indicators
96
+ quill.disable()
97
+ quill.insertText(index, "Uploading image...", 'italic': true)
98
+ EffectiveForm.setCurrentSubmit($form.find('.form-actions'))
99
+ EffectiveForm.submitting($form)
100
+
101
+ # Do the direct upload
102
+ fd = new FormData()
103
+ fd.append('blob', file)
104
+
105
+ upload = new ActiveStorage.DirectUpload(file, '/rails/active_storage/direct_uploads')
106
+
107
+ # After it's been uploaded
108
+ upload.create (error, blob) ->
109
+ # Remove progress indicators
110
+ quill.enable()
111
+ quill.deleteText(index, 18)
112
+ EffectiveForm.reset($form)
113
+
114
+ if error
115
+ return alert("Unable to upload: #{error}")
116
+
117
+ # Insert the image as an embed with url
118
+ quill.insertEmbed(index, 'image', "/rails/active_storage/blobs/#{blob.signed_id}/#{blob.filename}")
119
+
52
120
  # This is the read only region. Always delta.
53
121
  (this.EffectiveBootstrap || {}).effective_editor_tag = ($element, options) ->
54
122
  quill = new Quill('#' + $element.attr('id'), options)
@@ -1,2 +1,4 @@
1
1
  //= require ./quill
2
+ //= require ./image-drop-and-paste
3
+ //= require ./image-resize
2
4
  //= require ./initialize
@@ -28,6 +28,11 @@ matchWithHtml = (params, data) ->
28
28
  options['templateSelection'] = formatWithHtml
29
29
  options['matcher'] = matchWithHtml
30
30
 
31
+ if options['noResults']
32
+ noResults = options['noResults']
33
+ delete options['noResults']
34
+ options['language'] = { noResults: (_) -> noResults }
35
+
31
36
  $select = $element.select2(options)
32
37
 
33
38
  # effective_select custom class functionality
@@ -49,5 +54,3 @@ $(document).on 'change', "select.effective_select.polymorphic", (event) ->
49
54
 
50
55
  $select.siblings("input[type='hidden'][name$='_type]']").val(value.split('_')[0] || '')
51
56
  $select.siblings("input[type='hidden'][name$='_id]']").val(value.split('_')[1] || '')
52
-
53
-
@@ -72,29 +72,42 @@ module EffectiveBootstrapHelper
72
72
  # variations can be :dropup, :dropleft, :dropright
73
73
  # split can be true, false
74
74
  # right is to right align things
75
- def dropdown(variation: nil, split: true, btn_class: nil, right: false, &block)
75
+ def dropdown(variation: nil, split: true, btn_class: nil, btn_content: nil, right: false, &block)
76
76
  raise 'expected a block' unless block_given?
77
77
 
78
78
  btn_class = btn_class.presence || 'btn-outline-primary'
79
79
 
80
- @_dropdown_link_tos = []; yield
80
+ @_dropdown_link_tos = []
81
+ @_dropdown_split = split
82
+
83
+ # process dropdown_link_tos
84
+ yield
81
85
 
82
86
  return @_dropdown_link_tos.first if @_dropdown_link_tos.length <= 1
83
87
 
84
- retval = if split
85
- first = @_dropdown_link_tos.first
86
- menu = content_tag(:div, @_dropdown_link_tos[1..-1].join.html_safe, class: ['dropdown-menu', ('dropdown-menu-right' if right)].compact.join(' '))
87
- split = content_tag(:button, class: "btn #{btn_class} dropdown-toggle dropdown-toggle-split", type: 'button', 'data-toggle': 'dropdown', 'aria-haspopup': true, 'aria-expanded': false) do
88
- content_tag(:span, 'Toggle Dropdown', class: 'sr-only')
89
- end
88
+ # Build tags
89
+ first = @_dropdown_link_tos.first
90
+
91
+ button = content_tag(:button, class: "btn #{btn_class} dropdown-toggle" + (split ? " dropdown-toggle-split" : ''), type: 'button', 'data-toggle': 'dropdown', 'aria-haspopup': true, 'aria-expanded': false) do
92
+ btn_content || content_tag(:span, 'Toggle Dropdown', class: 'sr-only')
93
+ end
90
94
 
95
+ menu = if split
96
+ content_tag(:div, @_dropdown_link_tos[1..-1].join.html_safe, class: ['dropdown-menu', ('dropdown-menu-right' if right)].compact.join(' '))
97
+ else
98
+ content_tag(:div, @_dropdown_link_tos.join.html_safe, class: ['dropdown-menu', ('dropdown-menu-right' if right)].compact.join(' '))
99
+ end
100
+
101
+ retval = if split
91
102
  content_tag(:div, class: 'btn-group') do
92
103
  content_tag(:div, class: ['btn-group', variation.to_s.presence].compact.join(' '), role: 'group') do
93
- [:dropleft].include?(variation) ? (split + menu) : (first + split + menu)
104
+ [:dropleft].include?(variation) ? (button + menu) : (first + button + menu)
94
105
  end + ([:dropleft].include?(variation) ? first : '').html_safe
95
106
  end
96
107
  else
97
- raise 'split false is unsupported'
108
+ content_tag(:div, class: 'dropdown') do
109
+ button + menu
110
+ end
98
111
  end
99
112
 
100
113
  @_dropdown_link_tos = nil
@@ -129,7 +142,7 @@ module EffectiveBootstrapHelper
129
142
  return link_to(label, path, options)
130
143
  end
131
144
 
132
- if @_dropdown_link_tos.length == 0
145
+ if @_dropdown_link_tos.length == 0 && @_dropdown_split
133
146
  options[:class] = [options[:class], 'btn', btn_class].compact.join(' ')
134
147
  else
135
148
  options[:class] = [options[:class], 'dropdown-item'].compact.join(' ')
@@ -15,10 +15,16 @@ module Effective
15
15
 
16
16
  def input_js_options
17
17
  {
18
- modules: { toolbar: toolbar, syntax: (content_mode == :code) },
18
+ modules: {
19
+ toolbar: toolbar,
20
+ imageResize: imageResize,
21
+ imageDropAndPaste: imageDropAndPaste,
22
+ syntax: (content_mode == :code)
23
+ },
19
24
  theme: 'snow',
20
25
  placeholder: "Add #{name.to_s.pluralize}...",
21
- content_mode: content_mode
26
+ content_mode: content_mode,
27
+ active_storage: active_storage
22
28
  }
23
29
  end
24
30
 
@@ -35,6 +41,32 @@ module Effective
35
41
  ]
36
42
  end
37
43
 
44
+ def imageDropAndPaste
45
+ active_storage && !(content_mode == :code)
46
+ end
47
+
48
+ def imageResize
49
+ {
50
+ displaySize: true,
51
+ displayStyles: {
52
+ backgroundColor: 'black',
53
+ border: 'none',
54
+ color: 'white'
55
+ },
56
+ modules: [ 'Resize', 'DisplaySize' ]
57
+ }
58
+ end
59
+
60
+ def active_storage
61
+ return @active_storage unless @active_storage.nil?
62
+
63
+ @active_storage = if options.key?(:active_storage)
64
+ options.delete(:active_storage)
65
+ else
66
+ defined?(ActiveStorage).present?
67
+ end
68
+ end
69
+
38
70
  def content_mode # default false
39
71
  return @content_mode unless @content_mode.nil?
40
72
 
@@ -29,17 +29,15 @@ module Effective
29
29
  end
30
30
 
31
31
  def input_js_options
32
- placeholder = options.delete(:placeholder)
33
- placeholder = '' if placeholder == false
34
-
35
32
  opts = {
36
33
  theme: 'bootstrap',
37
- minimumResultsForSearch: 6,
34
+ minimumResultsForSearch: (freeform? ? 0 : 6),
38
35
  width: 'style',
39
- placeholder: (placeholder || 'Please choose'),
36
+ placeholder: placeholder,
40
37
  allowClear: (true if include_blank?),
41
38
  tokenSeparators: ([',', ';', '\n', '\t'] if tags?),
42
39
  tags: (true if tags?),
40
+ noResults: no_results,
43
41
  template: js_template,
44
42
  containerClass: ('hide-disabled' if hide_disabled?),
45
43
  dropdownClass: ('hide-disabled' if hide_disabled?),
@@ -51,6 +49,7 @@ module Effective
51
49
  classes = [
52
50
  'effective_select',
53
51
  'form-control',
52
+ ('freeform' if freeform?),
54
53
  ('polymorphic' if polymorphic?),
55
54
  ('grouped' if (grouped? || polymorphic?)),
56
55
  ('hide-disabled' if hide_disabled?),
@@ -109,11 +108,13 @@ module Effective
109
108
  end
110
109
 
111
110
  def multiple?
111
+ return false if freeform?
112
112
  return @multiple unless @multiple.nil?
113
113
  @multiple = options.key?(:multiple) ? options.delete(:multiple) : (tags? || name.to_s.ends_with?('_ids'))
114
114
  end
115
115
 
116
116
  def tags?
117
+ return true if freeform?
117
118
  return @tags unless @tags.nil?
118
119
  @tags = (options.delete(:tags) || false)
119
120
  end
@@ -133,11 +134,39 @@ module Effective
133
134
  @disable_open_on_focus = (options.delete(:disable_open_on_focus) || false)
134
135
  end
135
136
 
137
+ def freeform?
138
+ return @freeform unless @freeform.nil?
139
+ @freeform = (options.delete(:freeform) || false)
140
+ end
141
+
142
+ def no_results
143
+ return @no_results unless @no_results.nil?
144
+
145
+ @no_results = options.delete(:no_results)
146
+
147
+ if freeform?
148
+ @no_results ||= 'No results. To create a new one, press ENTER after typing your own free form response.'
149
+ end
150
+ end
151
+
136
152
  def js_template
137
153
  return @js_template unless @js_template.nil?
138
154
  @js_template = options.delete(:template)
139
155
  end
140
156
 
157
+ def placeholder
158
+ return @placeholder unless @placeholder.nil?
159
+
160
+ obj = options.delete(:placeholder)
161
+
162
+ @placeholder = case obj
163
+ when nil then
164
+ (freeform? ? 'Choose or enter' : 'Please choose')
165
+ when false then ''
166
+ else obj
167
+ end
168
+ end
169
+
141
170
  def ajax_url
142
171
  @ajax_url ||= (options.delete(:ajax_url) || options.delete(:ajax) || options.delete(:url))
143
172
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.6.31'.freeze
2
+ VERSION = '0.7.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.31
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-09 00:00:00.000000000 Z
11
+ date: 2020-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -114,6 +114,7 @@ files:
114
114
  - app/assets/images/icons/align-right.svg
115
115
  - app/assets/images/icons/anchor.svg
116
116
  - app/assets/images/icons/aperture.svg
117
+ - app/assets/images/icons/archive.svg
117
118
  - app/assets/images/icons/arrow-down-circle.svg
118
119
  - app/assets/images/icons/arrow-down-left.svg
119
120
  - app/assets/images/icons/arrow-down-right.svg
@@ -168,6 +169,9 @@ files:
168
169
  - app/assets/images/icons/cloud.svg
169
170
  - app/assets/images/icons/code.svg
170
171
  - app/assets/images/icons/codepen.svg
172
+ - app/assets/images/icons/codesandbox.svg
173
+ - app/assets/images/icons/coffee.svg
174
+ - app/assets/images/icons/columns.svg
171
175
  - app/assets/images/icons/command.svg
172
176
  - app/assets/images/icons/compass.svg
173
177
  - app/assets/images/icons/copy.svg
@@ -200,6 +204,7 @@ files:
200
204
  - app/assets/images/icons/facebook.svg
201
205
  - app/assets/images/icons/fast-forward.svg
202
206
  - app/assets/images/icons/feather.svg
207
+ - app/assets/images/icons/figma.svg
203
208
  - app/assets/images/icons/file-minus.svg
204
209
  - app/assets/images/icons/file-plus.svg
205
210
  - app/assets/images/icons/file-text.svg
@@ -210,6 +215,9 @@ files:
210
215
  - app/assets/images/icons/folder-minus.svg
211
216
  - app/assets/images/icons/folder-plus.svg
212
217
  - app/assets/images/icons/folder.svg
218
+ - app/assets/images/icons/framer.svg
219
+ - app/assets/images/icons/frown.svg
220
+ - app/assets/images/icons/gift.svg
213
221
  - app/assets/images/icons/git-branch.svg
214
222
  - app/assets/images/icons/git-commit.svg
215
223
  - app/assets/images/icons/git-merge.svg
@@ -224,12 +232,14 @@ files:
224
232
  - app/assets/images/icons/headphones.svg
225
233
  - app/assets/images/icons/heart.svg
226
234
  - app/assets/images/icons/help-circle.svg
235
+ - app/assets/images/icons/hexagon.svg
227
236
  - app/assets/images/icons/home.svg
228
237
  - app/assets/images/icons/image.svg
229
238
  - app/assets/images/icons/inbox.svg
230
239
  - app/assets/images/icons/info.svg
231
240
  - app/assets/images/icons/instagram.svg
232
241
  - app/assets/images/icons/italic.svg
242
+ - app/assets/images/icons/key.svg
233
243
  - app/assets/images/icons/layers.svg
234
244
  - app/assets/images/icons/layout.svg
235
245
  - app/assets/images/icons/life-buoy.svg
@@ -246,6 +256,7 @@ files:
246
256
  - app/assets/images/icons/map.svg
247
257
  - app/assets/images/icons/maximize-2.svg
248
258
  - app/assets/images/icons/maximize.svg
259
+ - app/assets/images/icons/meh.svg
249
260
  - app/assets/images/icons/menu.svg
250
261
  - app/assets/images/icons/message-circle.svg
251
262
  - app/assets/images/icons/message-square.svg
@@ -260,6 +271,7 @@ files:
260
271
  - app/assets/images/icons/moon.svg
261
272
  - app/assets/images/icons/more-horizontal.svg
262
273
  - app/assets/images/icons/more-vertical.svg
274
+ - app/assets/images/icons/mouse-pointer.svg
263
275
  - app/assets/images/icons/move.svg
264
276
  - app/assets/images/icons/music.svg
265
277
  - app/assets/images/icons/navigation-2.svg
@@ -269,6 +281,7 @@ files:
269
281
  - app/assets/images/icons/paperclip.svg
270
282
  - app/assets/images/icons/pause-circle.svg
271
283
  - app/assets/images/icons/pause.svg
284
+ - app/assets/images/icons/pen-tool.svg
272
285
  - app/assets/images/icons/percent.svg
273
286
  - app/assets/images/icons/phone-call.svg
274
287
  - app/assets/images/icons/phone-forwarded.svg
@@ -314,6 +327,7 @@ files:
314
327
  - app/assets/images/icons/slash.svg
315
328
  - app/assets/images/icons/sliders.svg
316
329
  - app/assets/images/icons/smartphone.svg
330
+ - app/assets/images/icons/smile.svg
317
331
  - app/assets/images/icons/speaker.svg
318
332
  - app/assets/images/icons/spinner.svg
319
333
  - app/assets/images/icons/square.svg
@@ -331,13 +345,16 @@ files:
331
345
  - app/assets/images/icons/thumbs-up.svg
332
346
  - app/assets/images/icons/toggle-left.svg
333
347
  - app/assets/images/icons/toggle-right.svg
348
+ - app/assets/images/icons/tool.svg
334
349
  - app/assets/images/icons/trash-2.svg
335
350
  - app/assets/images/icons/trash.svg
351
+ - app/assets/images/icons/trello.svg
336
352
  - app/assets/images/icons/trending-down.svg
337
353
  - app/assets/images/icons/trending-up.svg
338
354
  - app/assets/images/icons/triangle.svg
339
355
  - app/assets/images/icons/truck.svg
340
356
  - app/assets/images/icons/tv.svg
357
+ - app/assets/images/icons/twitch.svg
341
358
  - app/assets/images/icons/twitter.svg
342
359
  - app/assets/images/icons/type.svg
343
360
  - app/assets/images/icons/umbrella.svg
@@ -363,8 +380,10 @@ files:
363
380
  - app/assets/images/icons/wifi.svg
364
381
  - app/assets/images/icons/wind.svg
365
382
  - app/assets/images/icons/x-circle.svg
383
+ - app/assets/images/icons/x-octagon.svg
366
384
  - app/assets/images/icons/x-square.svg
367
385
  - app/assets/images/icons/x.svg
386
+ - app/assets/images/icons/youtube.svg
368
387
  - app/assets/images/icons/zap-off.svg
369
388
  - app/assets/images/icons/zap.svg
370
389
  - app/assets/images/icons/zoom-in.svg
@@ -389,6 +408,8 @@ files:
389
408
  - app/assets/javascripts/effective_datetime/input.js
390
409
  - app/assets/javascripts/effective_datetime/overrides.js.coffee
391
410
  - app/assets/javascripts/effective_datetime/turbolinks.js.coffee
411
+ - app/assets/javascripts/effective_editor/image-drop-and-paste.js
412
+ - app/assets/javascripts/effective_editor/image-resize.js
392
413
  - app/assets/javascripts/effective_editor/initialize.js.coffee
393
414
  - app/assets/javascripts/effective_editor/input.js
394
415
  - app/assets/javascripts/effective_editor/quill.js