@aquera/nile-elements 0.1.36-beta-1.1 → 0.1.36-beta-1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/README.md +7 -1
  2. package/dist/_commonjsHelpers-e8f8776f.cjs.js +2 -0
  3. package/dist/_commonjsHelpers-e8f8776f.cjs.js.map +1 -0
  4. package/dist/_commonjsHelpers-f94d783e.esm.js +1 -0
  5. package/dist/axe.min-61450170.cjs.js +12 -0
  6. package/dist/axe.min-61450170.cjs.js.map +1 -0
  7. package/dist/axe.min-640ded4a.esm.js +12 -0
  8. package/dist/fixture-205f11fa.cjs.js +395 -0
  9. package/dist/fixture-205f11fa.cjs.js.map +1 -0
  10. package/dist/fixture-2b5b3aba.esm.js +569 -0
  11. package/dist/{fixture-df8b52d7.esm.js → fixture-76051ef1.esm.js} +1 -1
  12. package/dist/fixture-7bfb866e.cjs.js +395 -0
  13. package/dist/fixture-7bfb866e.cjs.js.map +1 -0
  14. package/dist/{fixture-d5b55278.cjs.js → fixture-948ae33c.cjs.js} +2 -2
  15. package/dist/{fixture-d5b55278.cjs.js.map → fixture-948ae33c.cjs.js.map} +1 -1
  16. package/dist/fixture-e6fdfbfa.esm.js +569 -0
  17. package/dist/lit-html-39a6718c.esm.js +6 -0
  18. package/dist/lit-html-9b3af046.cjs.js +6 -0
  19. package/dist/lit-html-9b3af046.cjs.js.map +1 -0
  20. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  21. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  22. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  23. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  24. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  25. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  26. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  27. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  28. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  29. package/dist/nile-button/nile-button.test.esm.js +1 -1
  30. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  31. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
  32. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  33. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  34. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  35. package/dist/nile-card/nile-card.test.esm.js +1 -1
  36. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  37. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  38. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  39. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  40. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  41. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  42. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  43. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  44. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  45. package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
  46. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  47. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  48. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  49. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  50. package/dist/nile-file-preview/index.cjs.js +2 -0
  51. package/dist/nile-file-preview/index.cjs.js.map +1 -0
  52. package/dist/nile-file-preview/index.esm.js +1 -0
  53. package/dist/nile-file-preview/nile-file-preview.cjs.js +2 -0
  54. package/dist/nile-file-preview/nile-file-preview.cjs.js.map +1 -0
  55. package/dist/nile-file-preview/nile-file-preview.css.cjs.js +2 -0
  56. package/dist/nile-file-preview/nile-file-preview.css.cjs.js.map +1 -0
  57. package/dist/nile-file-preview/nile-file-preview.css.esm.js +521 -0
  58. package/dist/nile-file-preview/nile-file-preview.esm.js +3 -0
  59. package/dist/nile-file-preview/nile-file-preview.template.cjs.js +2 -0
  60. package/dist/nile-file-preview/nile-file-preview.template.cjs.js.map +1 -0
  61. package/dist/nile-file-preview/nile-file-preview.template.esm.js +117 -0
  62. package/dist/nile-file-preview/nile-file-preview.test.cjs.js +2 -0
  63. package/dist/nile-file-preview/nile-file-preview.test.cjs.js.map +1 -0
  64. package/dist/nile-file-preview/nile-file-preview.test.esm.js +1 -0
  65. package/dist/nile-file-preview/types/file-preview.enums.cjs.js +2 -0
  66. package/dist/nile-file-preview/types/file-preview.enums.cjs.js.map +1 -0
  67. package/dist/nile-file-preview/types/file-preview.enums.esm.js +1 -0
  68. package/dist/nile-file-preview/types/file-preview.interface.cjs.js +2 -0
  69. package/dist/nile-file-preview/types/file-preview.interface.cjs.js.map +1 -0
  70. package/dist/nile-file-preview/types/file-preview.interface.esm.js +1 -0
  71. package/dist/nile-file-preview/types/index.cjs.js +2 -0
  72. package/dist/nile-file-preview/types/index.cjs.js.map +1 -0
  73. package/dist/nile-file-preview/types/index.esm.js +1 -0
  74. package/dist/nile-file-preview/utils/file-preview.util.cjs.js +2 -0
  75. package/dist/nile-file-preview/utils/file-preview.util.cjs.js.map +1 -0
  76. package/dist/nile-file-preview/utils/file-preview.util.esm.js +1 -0
  77. package/dist/nile-file-preview/utils/index.cjs.js +2 -0
  78. package/dist/nile-file-preview/utils/index.cjs.js.map +1 -0
  79. package/dist/nile-file-preview/utils/index.esm.js +1 -0
  80. package/dist/nile-file-upload/index.cjs.js +2 -0
  81. package/dist/nile-file-upload/index.cjs.js.map +1 -0
  82. package/dist/nile-file-upload/index.esm.js +1 -0
  83. package/dist/nile-file-upload/nile-file-upload.cjs.js +2 -0
  84. package/dist/nile-file-upload/nile-file-upload.cjs.js.map +1 -0
  85. package/dist/nile-file-upload/nile-file-upload.css.cjs.js +2 -0
  86. package/dist/nile-file-upload/nile-file-upload.css.cjs.js.map +1 -0
  87. package/dist/nile-file-upload/nile-file-upload.css.esm.js +535 -0
  88. package/dist/nile-file-upload/nile-file-upload.esm.js +3 -0
  89. package/dist/nile-file-upload/nile-file-upload.template.cjs.js +10 -0
  90. package/dist/nile-file-upload/nile-file-upload.template.cjs.js.map +1 -0
  91. package/dist/nile-file-upload/nile-file-upload.template.esm.js +155 -0
  92. package/dist/nile-file-upload/nile-file-upload.test.cjs.js +2 -0
  93. package/dist/nile-file-upload/nile-file-upload.test.cjs.js.map +1 -0
  94. package/dist/nile-file-upload/nile-file-upload.test.esm.js +1 -0
  95. package/dist/nile-file-upload/types/file-upload.enums.cjs.js +2 -0
  96. package/dist/nile-file-upload/types/file-upload.enums.cjs.js.map +1 -0
  97. package/dist/nile-file-upload/types/file-upload.enums.esm.js +1 -0
  98. package/dist/nile-file-upload/types/file-upload.type.cjs.js +2 -0
  99. package/dist/nile-file-upload/types/file-upload.type.cjs.js.map +1 -0
  100. package/dist/nile-file-upload/types/file-upload.type.esm.js +1 -0
  101. package/dist/nile-file-upload/types/index.cjs.js +2 -0
  102. package/dist/nile-file-upload/types/index.cjs.js.map +1 -0
  103. package/dist/nile-file-upload/types/index.esm.js +1 -0
  104. package/dist/nile-file-upload/utils/drag-drop.util.cjs.js +2 -0
  105. package/dist/nile-file-upload/utils/drag-drop.util.cjs.js.map +1 -0
  106. package/dist/nile-file-upload/utils/drag-drop.util.esm.js +1 -0
  107. package/dist/nile-file-upload/utils/file-validation.util.cjs.js +2 -0
  108. package/dist/nile-file-upload/utils/file-validation.util.cjs.js.map +1 -0
  109. package/dist/nile-file-upload/utils/file-validation.util.esm.js +1 -0
  110. package/dist/nile-filter-chip/nile-filter-chip.cjs.js +1 -1
  111. package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -1
  112. package/dist/nile-filter-chip/nile-filter-chip.esm.js +13 -13
  113. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
  114. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js.map +1 -1
  115. package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +16 -16
  116. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  117. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  118. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  119. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  120. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  121. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  122. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  123. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  124. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  125. package/dist/nile-input/nile-input.test.esm.js +1 -1
  126. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  127. package/dist/nile-link/nile-link.test.esm.js +1 -1
  128. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  129. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  130. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  131. package/dist/nile-popover/nile-popover.test.esm.js +1 -1
  132. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  133. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  134. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  135. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  136. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  137. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  138. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  139. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  140. package/dist/nile-rich-text-editor/index.cjs.js +2 -0
  141. package/dist/nile-rich-text-editor/index.cjs.js.map +1 -0
  142. package/dist/nile-rich-text-editor/index.esm.js +1 -0
  143. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +10 -0
  144. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +1 -0
  145. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +2 -0
  146. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -0
  147. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +5 -0
  148. package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +28 -0
  149. package/dist/nile-rich-text-editor/nile-rich-text-editor.template.cjs.js +2 -0
  150. package/dist/nile-rich-text-editor/nile-rich-text-editor.template.cjs.js.map +1 -0
  151. package/dist/nile-rich-text-editor/nile-rich-text-editor.template.esm.js +1 -0
  152. package/dist/nile-rich-text-editor/nile-rich-text-editor.test.cjs.js +2 -0
  153. package/dist/nile-rich-text-editor/nile-rich-text-editor.test.cjs.js.map +1 -0
  154. package/dist/nile-rich-text-editor/nile-rich-text-editor.test.esm.js +1 -0
  155. package/dist/nile-rich-text-editor/sub-components/nile-rich-text-editor.cjs.js +2 -0
  156. package/dist/nile-rich-text-editor/sub-components/nile-rich-text-editor.cjs.js.map +1 -0
  157. package/dist/nile-rich-text-editor/sub-components/nile-rich-text-editor.esm.js +1 -0
  158. package/dist/nile-rich-text-editor/types/index.cjs.js +2 -0
  159. package/dist/nile-rich-text-editor/types/index.cjs.js.map +1 -0
  160. package/dist/nile-rich-text-editor/types/index.esm.js +1 -0
  161. package/dist/nile-rich-text-editor/types/rich-text-editor.type.cjs.js +2 -0
  162. package/dist/nile-rich-text-editor/types/rich-text-editor.type.cjs.js.map +1 -0
  163. package/dist/nile-rich-text-editor/types/rich-text-editor.type.esm.js +1 -0
  164. package/dist/nile-rich-text-editor/utils/nile-rich-text-editor.utils.cjs.js +2 -0
  165. package/dist/nile-rich-text-editor/utils/nile-rich-text-editor.utils.cjs.js.map +1 -0
  166. package/dist/nile-rich-text-editor/utils/nile-rich-text-editor.utils.esm.js +1 -0
  167. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  168. package/dist/nile-select/nile-select.test.esm.js +1 -1
  169. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  170. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  171. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  172. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  173. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  174. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  175. package/dist/nile-tooltip/nile-tooltip.test.cjs.js +1 -1
  176. package/dist/nile-tooltip/nile-tooltip.test.esm.js +1 -1
  177. package/dist/src/nile-file-preview/index.d.ts +1 -0
  178. package/dist/src/nile-file-preview/index.js +2 -0
  179. package/dist/src/nile-file-preview/index.js.map +1 -0
  180. package/dist/src/nile-file-preview/nile-file-preview.css.d.ts +12 -0
  181. package/dist/src/nile-file-preview/nile-file-preview.css.js +533 -0
  182. package/dist/src/nile-file-preview/nile-file-preview.css.js.map +1 -0
  183. package/dist/src/nile-file-preview/nile-file-preview.d.ts +48 -0
  184. package/dist/src/nile-file-preview/nile-file-preview.js +149 -0
  185. package/dist/src/nile-file-preview/nile-file-preview.js.map +1 -0
  186. package/dist/src/nile-file-preview/nile-file-preview.template.d.ts +11 -0
  187. package/dist/src/nile-file-preview/nile-file-preview.template.js +144 -0
  188. package/dist/src/nile-file-preview/nile-file-preview.template.js.map +1 -0
  189. package/dist/src/nile-file-preview/nile-file-preview.test.d.ts +7 -0
  190. package/dist/src/nile-file-preview/nile-file-preview.test.js +30 -0
  191. package/dist/src/nile-file-preview/nile-file-preview.test.js.map +1 -0
  192. package/dist/src/nile-file-preview/types/file-preview.enums.d.ts +23 -0
  193. package/dist/src/nile-file-preview/types/file-preview.enums.js +28 -0
  194. package/dist/src/nile-file-preview/types/file-preview.enums.js.map +1 -0
  195. package/dist/src/nile-file-preview/types/file-preview.interface.d.ts +4 -0
  196. package/dist/src/nile-file-preview/types/file-preview.interface.js +2 -0
  197. package/dist/src/nile-file-preview/types/file-preview.interface.js.map +1 -0
  198. package/dist/src/nile-file-preview/types/index.d.ts +2 -0
  199. package/dist/src/nile-file-preview/types/index.js +3 -0
  200. package/dist/src/nile-file-preview/types/index.js.map +1 -0
  201. package/dist/src/nile-file-preview/types/nile-file-preview.enums.d.ts +26 -0
  202. package/dist/src/nile-file-preview/types/nile-file-preview.enums.js +31 -0
  203. package/dist/src/nile-file-preview/types/nile-file-preview.enums.js.map +1 -0
  204. package/dist/src/nile-file-preview/types/nile-file-preview.interface.d.ts +4 -0
  205. package/dist/src/nile-file-preview/types/nile-file-preview.interface.js +2 -0
  206. package/dist/src/nile-file-preview/types/nile-file-preview.interface.js.map +1 -0
  207. package/dist/src/nile-file-preview/utils/file-preview.util.d.ts +3 -0
  208. package/dist/src/nile-file-preview/utils/file-preview.util.js +29 -0
  209. package/dist/src/nile-file-preview/utils/file-preview.util.js.map +1 -0
  210. package/dist/src/nile-file-preview/utils/index.d.ts +1 -0
  211. package/dist/src/nile-file-preview/utils/index.js +2 -0
  212. package/dist/src/nile-file-preview/utils/index.js.map +1 -0
  213. package/dist/src/nile-file-preview/utils/nile-file-preview.util.d.ts +4 -0
  214. package/dist/src/nile-file-preview/utils/nile-file-preview.util.js +45 -0
  215. package/dist/src/nile-file-preview/utils/nile-file-preview.util.js.map +1 -0
  216. package/dist/src/nile-file-upload/index.d.ts +1 -0
  217. package/dist/src/nile-file-upload/index.js +2 -0
  218. package/dist/src/nile-file-upload/index.js.map +1 -0
  219. package/dist/src/nile-file-upload/nile-file-upload.css.d.ts +12 -0
  220. package/dist/src/nile-file-upload/nile-file-upload.css.js +547 -0
  221. package/dist/src/nile-file-upload/nile-file-upload.css.js.map +1 -0
  222. package/dist/src/nile-file-upload/nile-file-upload.d.ts +45 -0
  223. package/dist/src/nile-file-upload/nile-file-upload.js +148 -0
  224. package/dist/src/nile-file-upload/nile-file-upload.js.map +1 -0
  225. package/dist/src/nile-file-upload/nile-file-upload.template.d.ts +11 -0
  226. package/dist/src/nile-file-upload/nile-file-upload.template.js +163 -0
  227. package/dist/src/nile-file-upload/nile-file-upload.template.js.map +1 -0
  228. package/dist/src/nile-file-upload/nile-file-upload.test.d.ts +7 -0
  229. package/dist/src/nile-file-upload/nile-file-upload.test.js +30 -0
  230. package/dist/src/nile-file-upload/nile-file-upload.test.js.map +1 -0
  231. package/dist/src/nile-file-upload/types/file-upload.enums.d.ts +28 -0
  232. package/dist/src/nile-file-upload/types/file-upload.enums.js +35 -0
  233. package/dist/src/nile-file-upload/types/file-upload.enums.js.map +1 -0
  234. package/dist/src/nile-file-upload/types/file-upload.type.d.ts +4 -0
  235. package/dist/src/nile-file-upload/types/file-upload.type.js +2 -0
  236. package/dist/src/nile-file-upload/types/file-upload.type.js.map +1 -0
  237. package/dist/src/nile-file-upload/types/index.d.ts +2 -0
  238. package/dist/src/nile-file-upload/types/index.js +3 -0
  239. package/dist/src/nile-file-upload/types/index.js.map +1 -0
  240. package/dist/src/nile-file-upload/utils/drag-drop.util.d.ts +19 -0
  241. package/dist/src/nile-file-upload/utils/drag-drop.util.js +77 -0
  242. package/dist/src/nile-file-upload/utils/drag-drop.util.js.map +1 -0
  243. package/dist/src/nile-file-upload/utils/file-validation.util.d.ts +9 -0
  244. package/dist/src/nile-file-upload/utils/file-validation.util.js +58 -0
  245. package/dist/src/nile-file-upload/utils/file-validation.util.js.map +1 -0
  246. package/dist/src/nile-filter-chip/nile-filter-chip.d.ts +1 -2
  247. package/dist/src/nile-filter-chip/nile-filter-chip.js +6 -10
  248. package/dist/src/nile-filter-chip/nile-filter-chip.js.map +1 -1
  249. package/dist/src/nile-filter-chip/nile-filter-chip.test.js +10 -10
  250. package/dist/src/nile-filter-chip/nile-filter-chip.test.js.map +1 -1
  251. package/dist/src/nile-pagination/index.d.ts +1 -0
  252. package/dist/src/nile-pagination/index.js +2 -0
  253. package/dist/src/nile-pagination/index.js.map +1 -0
  254. package/dist/src/nile-pagination/nile-pagination.css.d.ts +12 -0
  255. package/dist/src/nile-pagination/nile-pagination.css.js +156 -0
  256. package/dist/src/nile-pagination/nile-pagination.css.js.map +1 -0
  257. package/dist/src/nile-pagination/nile-pagination.d.ts +36 -0
  258. package/dist/src/nile-pagination/nile-pagination.js +170 -0
  259. package/dist/src/nile-pagination/nile-pagination.js.map +1 -0
  260. package/dist/src/nile-pagination/nile-pagination.template.d.ts +3 -0
  261. package/dist/src/nile-pagination/nile-pagination.template.js +5 -0
  262. package/dist/src/nile-pagination/nile-pagination.template.js.map +1 -0
  263. package/dist/src/nile-pagination/nile-pagination.test.d.ts +7 -0
  264. package/dist/src/nile-pagination/nile-pagination.test.js +30 -0
  265. package/dist/src/nile-pagination/nile-pagination.test.js.map +1 -0
  266. package/dist/src/nile-pagination/sub-components/nile-pagination.d.ts +0 -0
  267. package/dist/src/nile-pagination/sub-components/nile-pagination.js +2 -0
  268. package/dist/src/nile-pagination/sub-components/nile-pagination.js.map +1 -0
  269. package/dist/src/nile-pagination/types/index.d.ts +0 -0
  270. package/dist/src/nile-pagination/types/index.js +2 -0
  271. package/dist/src/nile-pagination/types/index.js.map +1 -0
  272. package/dist/src/nile-pagination/types/pagination.type.d.ts +3 -0
  273. package/dist/src/nile-pagination/types/pagination.type.js +5 -0
  274. package/dist/src/nile-pagination/types/pagination.type.js.map +1 -0
  275. package/dist/src/nile-pagination/utils/nile-pagination.utils.d.ts +0 -0
  276. package/dist/src/nile-pagination/utils/nile-pagination.utils.js +2 -0
  277. package/dist/src/nile-pagination/utils/nile-pagination.utils.js.map +1 -0
  278. package/dist/src/nile-rich-text-editor/index.d.ts +1 -0
  279. package/dist/src/nile-rich-text-editor/index.js +2 -0
  280. package/dist/src/nile-rich-text-editor/index.js.map +1 -0
  281. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.d.ts +12 -0
  282. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +17 -0
  283. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -0
  284. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.d.ts +10 -0
  285. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +62 -0
  286. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -0
  287. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.template.d.ts +3 -0
  288. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.template.js +5 -0
  289. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.template.js.map +1 -0
  290. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.test.d.ts +7 -0
  291. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.test.js +30 -0
  292. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.test.js.map +1 -0
  293. package/dist/src/nile-rich-text-editor/quill/quill.d.ts +8 -0
  294. package/dist/src/nile-rich-text-editor/quill/quill.js +19 -0
  295. package/dist/src/nile-rich-text-editor/quill/quill.js.map +1 -0
  296. package/dist/src/nile-rich-text-editor/sub-components/nile-rich-text-editor.d.ts +0 -0
  297. package/dist/src/nile-rich-text-editor/sub-components/nile-rich-text-editor.js +2 -0
  298. package/dist/src/nile-rich-text-editor/sub-components/nile-rich-text-editor.js.map +1 -0
  299. package/dist/src/nile-rich-text-editor/types/index.d.ts +0 -0
  300. package/dist/src/nile-rich-text-editor/types/index.js +2 -0
  301. package/dist/src/nile-rich-text-editor/types/index.js.map +1 -0
  302. package/dist/src/nile-rich-text-editor/types/rich-text-editor.type.d.ts +3 -0
  303. package/dist/src/nile-rich-text-editor/types/rich-text-editor.type.js +5 -0
  304. package/dist/src/nile-rich-text-editor/types/rich-text-editor.type.js.map +1 -0
  305. package/dist/src/nile-rich-text-editor/utils/nile-rich-text-editor.utils.d.ts +0 -0
  306. package/dist/src/nile-rich-text-editor/utils/nile-rich-text-editor.utils.js +2 -0
  307. package/dist/src/nile-rich-text-editor/utils/nile-rich-text-editor.utils.js.map +1 -0
  308. package/dist/tsconfig.tsbuildinfo +1 -1
  309. package/package.json +1 -1
  310. package/src/nile-filter-chip/nile-filter-chip.test.ts +10 -10
  311. package/src/nile-filter-chip/nile-filter-chip.ts +5 -6
  312. package/vscode-html-custom-data.json +5 -9
@@ -0,0 +1,28 @@
1
+ import{__decorate as t}from"tslib";import{css as n,LitElement as r,html as e}from"lit";import{property as i,customElement as s}from"lit/decorators.js";import{c as o,g as u}from"../_commonjsHelpers-f94d783e.esm.js";var c="object"==typeof global&&global&&global.Object===Object&&global,l="object"==typeof self&&self&&self.Object===Object&&self,a=c||l||Function("return this")(),f=a.Symbol,h=Object.prototype,v=h.hasOwnProperty,d=h.toString,p=f?f.toStringTag:void 0;var b=Object.prototype.toString;var y=f?f.toStringTag:void 0;function m(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":y&&y in Object(t)?function(t){var n=v.call(t,p),r=t[p];try{t[p]=void 0;var e=!0}catch(t){}var i=d.call(t);return e&&(n?t[p]=r:delete t[p]),i}(t):function(t){return b.call(t)}(t)}function g(t){return null!=t&&"object"==typeof t}function w(t){return"symbol"==typeof t||g(t)&&"[object Symbol]"==m(t)}function x(t){return"number"==typeof t?t:w(t)?NaN:+t}function j(t,n){for(var r=-1,e=null==t?0:t.length,i=Array(e);++r<e;)i[r]=n(t[r],r,t);return i}var k=Array.isArray,A=f?f.prototype:void 0,q=A?A.toString:void 0;function O(t){if("string"==typeof t)return t;if(k(t))return j(t,O)+"";if(w(t))return q?q.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function M(t,n){return function(r,e){var i;if(void 0===r&&void 0===e)return n;if(void 0!==r&&(i=r),void 0!==e){if(void 0===i)return e;"string"==typeof r||"string"==typeof e?(r=O(r),e=O(e)):(r=x(r),e=x(e)),i=t(r,e)}return i}}var E=M((function(t,n){return t+n}),0),_=/\s/;function T(t){for(var n=t.length;n--&&_.test(t.charAt(n)););return n}var L=/^\s+/;function $(t){return t?t.slice(0,T(t)+1).replace(L,""):t}function S(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}var N=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,I=/^0o[0-7]+$/i,B=parseInt;function C(t){if("number"==typeof t)return t;if(w(t))return NaN;if(S(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=S(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=$(t);var r=R.test(t);return r||I.test(t)?B(t.slice(2),r?2:8):N.test(t)?NaN:+t}var D=1/0;function V(t){return t?(t=C(t))===D||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function H(t){var n=V(t),r=n%1;return n==n?r?n-r:n:0}function F(t){return t}function U(t){if(!S(t))return!1;var n=m(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}var P,Z=a["t"],W=(P=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+P:"";var z=Function.prototype.toString;function K(t){if(null!=t){try{return z.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var G=/^\[object .+?Constructor\]$/,Q=Function.prototype,Y=Object.prototype,J=Q.toString,X=Y.hasOwnProperty,tt=RegExp("^"+J.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nt(t){return!(!S(t)||function(t){return!!W&&W in t}(t))&&(U(t)?tt:G).test(K(t))}function rt(t,n){var r=function(t,n){return null==t?void 0:t[n]}(t,n);return nt(r)?r:void 0}var et=rt(a,"WeakMap"),it=et&&new et,st=it?function(t,n){return it.set(t,n),t}:F,ot=Object.create,ut=function(){function t(){}return function(n){if(!S(n))return{};if(ot)return ot(n);t.prototype=n;var r=new t;return t.prototype=void 0,r}}();function ct(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=ut(t.prototype),e=t.apply(r,n);return S(e)?e:r}}function lt(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}var at=Math.max;function ft(t,n,r,e){for(var i=-1,s=t.length,o=r.length,u=-1,c=n.length,l=at(s-o,0),a=Array(c+l),f=!e;++u<c;)a[u]=n[u];for(;++i<o;)(f||i<s)&&(a[r[i]]=t[i]);for(;l--;)a[u++]=t[i++];return a}var ht=Math.max;function vt(t,n,r,e){for(var i=-1,s=t.length,o=-1,u=r.length,c=-1,l=n.length,a=ht(s-u,0),f=Array(a+l),h=!e;++i<a;)f[i]=t[i];for(var v=i;++c<l;)f[v+c]=n[c];for(;++o<u;)(h||i<s)&&(f[v+r[o]]=t[i++]);return f}function dt(){}function pt(t){this.i=t,this.o=[],this.u=1,this.l=!1,this.h=[],this.v=4294967295,this.p=[]}function bt(){}pt.prototype=ut(dt.prototype),pt.prototype.constructor=pt;var yt=it?function(t){return it.get(t)}:bt,mt={},gt=Object.prototype.hasOwnProperty;function wt(t){for(var n=t.name+"",r=mt[n],e=gt.call(mt,n)?r.length:0;e--;){var i=r[e],s=i.func;if(null==s||s==t)return i.name}return n}function xt(t,n){this.i=t,this.o=[],this.m=!!n,this.j=0,this.k=void 0}function jt(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r<e;)n[r]=t[r];return n}function kt(t){if(t instanceof pt)return t.clone();var n=new xt(t.i,t.m);return n.o=jt(t.o),n.j=t.j,n.k=t.k,n}xt.prototype=ut(dt.prototype),xt.prototype.constructor=xt;var At=Object.prototype.hasOwnProperty;function qt(t){if(g(t)&&!k(t)&&!(t instanceof pt)){if(t instanceof xt)return t;if(At.call(t,"__wrapped__"))return kt(t)}return new xt(t)}function Ot(t){var n=wt(t),r=qt[n];if("function"!=typeof r||!(n in pt.prototype))return!1;if(t===r)return!0;var e=yt(r);return!!e&&t===e[0]}qt.prototype=dt.prototype,qt.prototype.constructor=qt;var Mt=Date.now;function Et(t){var n=0,r=0;return function(){var e=Mt(),i=16-(e-r);if(r=e,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}var _t=Et(st),Tt=/\{\n\/\* \[wrapped with (.+)\] \*/,Lt=/,? & /;var $t=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function St(t){return function(){return t}}var Nt=function(){try{var t=rt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Rt=Nt?function(t,n){return Nt(t,"toString",{configurable:!0,enumerable:!1,value:St(n),writable:!0})}:F,It=Et(Rt);function Bt(t,n){for(var r=-1,e=null==t?0:t.length;++r<e&&!1!==n(t[r],r,t););return t}function Ct(t,n,r,e){for(var i=t.length,s=r+(e?1:-1);e?s--:++s<i;)if(n(t[s],s,t))return s;return-1}function Dt(t){return t!=t}function Vt(t,n,r){return n==n?function(t,n,r){for(var e=r-1,i=t.length;++e<i;)if(t[e]===n)return e;return-1}(t,n,r):Ct(t,Dt,r)}function Ht(t,n){return!!(null==t?0:t.length)&&Vt(t,n,0)>-1}var Ft=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function Ut(t,n,r){var e=n+"";return It(t,function(t,n){var r=n.length;if(!r)return t;var e=r-1;return n[e]=(r>1?"& ":"")+n[e],n=n.join(r>2?", ":" "),t.replace($t,"{\n/* [wrapped with "+n+"] */\n")}(e,function(t,n){return Bt(Ft,(function(r){var e="_."+r[0];n&r[1]&&!Ht(t,e)&&t.push(e)})),t.sort()}(function(t){var n=t.match(Tt);return n?n[1].split(Lt):[]}(e),r)))}function Pt(t,n,r,e,i,s,o,u,c,l){var a=8&n;n|=a?32:64,4&(n&=~(a?64:32))||(n&=-4);var f=[t,n,i,a?s:void 0,a?o:void 0,a?void 0:s,a?void 0:o,u,c,l],h=r.apply(void 0,f);return Ot(t)&&_t(h,f),h.placeholder=e,Ut(h,t,n)}function Zt(t){return t.placeholder}var Wt=/^(?:0|[1-9]\d*)$/;function zt(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&Wt.test(t))&&t>-1&&t%1==0&&t<n}var Kt=Math.min;var Gt="__lodash_placeholder__";function Qt(t,n){for(var r=-1,e=t.length,i=0,s=[];++r<e;){var o=t[r];o!==n&&o!==Gt||(t[r]=Gt,s[i++]=r)}return s}function Yt(t,n,r,e,i,s,o,u,c,l){var f=128&n,h=1&n,v=2&n,d=24&n,p=512&n,b=v?void 0:ct(t);return function y(){for(var m=arguments.length,g=Array(m),w=m;w--;)g[w]=arguments[w];if(d)var x=Zt(y),j=function(t,n){for(var r=t.length,e=0;r--;)t[r]===n&&++e;return e}(g,x);if(e&&(g=ft(g,e,i,d)),s&&(g=vt(g,s,o,d)),m-=j,d&&m<l){var k=Qt(g,x);return Pt(t,n,Yt,y.placeholder,r,g,k,u,c,l-m)}var A=h?r:this,q=v?A[t]:t;return m=g.length,u?g=function(t,n){for(var r=t.length,e=Kt(n.length,r),i=jt(t);e--;){var s=n[e];t[e]=zt(s,r)?i[s]:void 0}return t}(g,u):p&&m>1&&g.reverse(),f&&c<m&&(g.length=c),this&&this!==a&&this instanceof y&&(q=b||ct(q)),q.apply(A,g)}}var Jt="__lodash_placeholder__",Xt=128,tn=Math.min;var nn=Math.max;function rn(t,n,r,e,i,s,o,u){var c=2&n;if(!c&&"function"!=typeof t)throw new TypeError("Expected a function");var l=e?e.length:0;if(l||(n&=-97,e=i=void 0),o=void 0===o?o:nn(H(o),0),u=void 0===u?u:H(u),l-=i?i.length:0,64&n){var f=e,h=i;e=i=void 0}var v=c?void 0:yt(t),d=[t,n,r,e,i,f,h,s,o,u];if(v&&function(t,n){var r=t[1],e=n[1],i=r|e,s=i<131,o=e==Xt&&8==r||e==Xt&&256==r&&t[7].length<=n[8]||384==e&&n[7].length<=n[8]&&8==r;if(!s&&!o)return t;1&e&&(t[2]=n[2],i|=1&r?0:4);var u=n[3];if(u){var c=t[3];t[3]=c?ft(c,u,n[4]):u,t[4]=c?Qt(t[3],Jt):n[4]}(u=n[5])&&(c=t[5],t[5]=c?vt(c,u,n[6]):u,t[6]=c?Qt(t[5],Jt):n[6]),(u=n[7])&&(t[7]=u),e&Xt&&(t[8]=null==t[8]?n[8]:tn(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=i}(d,v),t=d[0],n=d[1],r=d[2],e=d[3],i=d[4],!(u=d[9]=void 0===d[9]?c?0:t.length:nn(d[9]-l,0))&&24&n&&(n&=-25),n&&1!=n)p=8==n||16==n?function(t,n,r){var e=ct(t);return function i(){for(var s=arguments.length,o=Array(s),u=s,c=Zt(i);u--;)o[u]=arguments[u];var l=s<3&&o[0]!==c&&o[s-1]!==c?[]:Qt(o,c);return(s-=l.length)<r?Pt(t,n,Yt,i.placeholder,void 0,o,l,void 0,void 0,r-s):lt(this&&this!==a&&this instanceof i?e:t,this,o)}}(t,n,u):32!=n&&33!=n||i.length?Yt.apply(void 0,d):function(t,n,r,e){var i=1&n,s=ct(t);return function n(){for(var o=-1,u=arguments.length,c=-1,l=e.length,f=Array(l+u),h=this&&this!==a&&this instanceof n?s:t;++c<l;)f[c]=e[c];for(;u--;)f[c++]=arguments[++o];return lt(h,i?r:this,f)}}(t,n,r,e);else var p=function(t,n,r){var e=1&n,i=ct(t);return function n(){return(this&&this!==a&&this instanceof n?i:t).apply(e?r:this,arguments)}}(t,n,r);return Ut((v?st:_t)(p,d),t,n)}function en(t,n,r){return n=r?void 0:n,rn(t,128,void 0,void 0,void 0,void 0,n=t&&null==n?t.length:n)}function sn(t,n,r){"__proto__"==n&&Nt?Nt(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}function on(t,n){return t===n||t!=t&&n!=n}var un=Object.prototype.hasOwnProperty;function cn(t,n,r){var e=t[n];un.call(t,n)&&on(e,r)&&(void 0!==r||n in t)||sn(t,n,r)}function ln(t,n,r,e){var i=!r;r||(r={});for(var s=-1,o=n.length;++s<o;){var u=n[s],c=e?e(r[u],t[u],u,r,t):void 0;void 0===c&&(c=t[u]),i?sn(r,u,c):cn(r,u,c)}return r}var an=Math.max;function fn(t,n,r){return n=an(void 0===n?t.length-1:n,0),function(){for(var e=arguments,i=-1,s=an(e.length-n,0),o=Array(s);++i<s;)o[i]=e[n+i];i=-1;for(var u=Array(n+1);++i<n;)u[i]=e[i];return u[n]=r(o),lt(t,this,u)}}function hn(t,n){return It(fn(t,n,F),t+"")}function vn(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function dn(t){return null!=t&&vn(t.length)&&!U(t)}function pn(t,n,r){if(!S(r))return!1;var e=typeof n;return!!("number"==e?dn(r)&&zt(n,r.length):"string"==e&&n in r)&&on(r[n],t)}function bn(t){return hn((function(n,r){var e=-1,i=r.length,s=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=t.length>3&&"function"==typeof s?(i--,s):void 0,o&&pn(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),n=Object(n);++e<i;){var u=r[e];u&&t(n,u,e,s)}return n}))}var yn=Object.prototype;function mn(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||yn)}function gn(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function wn(t){return g(t)&&"[object Arguments]"==m(t)}var xn=Object.prototype,jn=xn.hasOwnProperty,kn=xn.propertyIsEnumerable,An=wn(function(){return arguments}())?wn:function(t){return g(t)&&jn.call(t,"callee")&&!kn.call(t,"callee")};function qn(){return!1}var On="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mn=On&&"object"==typeof module&&module&&!module.nodeType&&module,En=Mn&&Mn.exports===On?a.Buffer:void 0,_n=(En?En.isBuffer:void 0)||qn,Tn={};function Ln(t){return function(n){return t(n)}}Tn["[object Float32Array]"]=Tn["[object Float64Array]"]=Tn["[object Int8Array]"]=Tn["[object Int16Array]"]=Tn["[object Int32Array]"]=Tn["[object Uint8Array]"]=Tn["[object Uint8ClampedArray]"]=Tn["[object Uint16Array]"]=Tn["[object Uint32Array]"]=!0,Tn["[object Arguments]"]=Tn["[object Array]"]=Tn["[object ArrayBuffer]"]=Tn["[object Boolean]"]=Tn["[object DataView]"]=Tn["[object Date]"]=Tn["[object Error]"]=Tn["[object Function]"]=Tn["[object Map]"]=Tn["[object Number]"]=Tn["[object Object]"]=Tn["[object RegExp]"]=Tn["[object Set]"]=Tn["[object String]"]=Tn["[object WeakMap]"]=!1;var $n="object"==typeof exports&&exports&&!exports.nodeType&&exports,Sn=$n&&"object"==typeof module&&module&&!module.nodeType&&module,Nn=Sn&&Sn.exports===$n&&c.process,Rn=function(){try{var t=Sn&&Sn.require&&Sn.require("util").types;return t||Nn&&Nn.binding&&Nn.binding("util")}catch(t){}}(),In=Rn&&Rn.isTypedArray,Bn=In?Ln(In):function(t){return g(t)&&vn(t.length)&&!!Tn[m(t)]},Cn=Object.prototype.hasOwnProperty;function Dn(t,n){var r=k(t),e=!r&&An(t),i=!r&&!e&&_n(t),s=!r&&!e&&!i&&Bn(t),o=r||e||i||s,u=o?gn(t.length,String):[],c=u.length;for(var l in t)!n&&!Cn.call(t,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||zt(l,c))||u.push(l);return u}function Vn(t,n){return function(r){return t(n(r))}}var Hn=Vn(Object.keys,Object),Fn=Object.prototype.hasOwnProperty;function Un(t){if(!mn(t))return Hn(t);var n=[];for(var r in Object(t))Fn.call(t,r)&&"constructor"!=r&&n.push(r);return n}function Pn(t){return dn(t)?Dn(t):Un(t)}var Zn=Object.prototype.hasOwnProperty,Wn=bn((function(t,n){if(mn(n)||dn(n))ln(n,Pn(n),t);else for(var r in n)Zn.call(n,r)&&cn(t,r,n[r])}));var zn=Object.prototype.hasOwnProperty;function Kn(t){if(!S(t))return function(t){var n=[];if(null!=t)for(var r in Object(t))n.push(r);return n}(t);var n=mn(t),r=[];for(var e in t)("constructor"!=e||!n&&zn.call(t,e))&&r.push(e);return r}function Gn(t){return dn(t)?Dn(t,!0):Kn(t)}var Qn=bn((function(t,n){ln(n,Gn(n),t)})),Yn=bn((function(t,n,r,e){ln(n,Gn(n),t,e)})),Jn=bn((function(t,n,r,e){ln(n,Pn(n),t,e)})),Xn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tr=/^\w*$/;function nr(t,n){if(k(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!w(t))||(tr.test(t)||!Xn.test(t)||null!=n&&t in Object(n))}var rr=rt(Object,"create");var er=Object.prototype.hasOwnProperty;var ir=Object.prototype.hasOwnProperty;function sr(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function or(t,n){for(var r=t.length;r--;)if(on(t[r][0],n))return r;return-1}sr.prototype.clear=function(){this.A=rr?rr(null):{},this.size=0},sr.prototype.delete=function(t){var n=this.has(t)&&delete this.A[t];return this.size-=n?1:0,n},sr.prototype.get=function(t){var n=this.A;if(rr){var r=n[t];return"__lodash_hash_undefined__"===r?void 0:r}return er.call(n,t)?n[t]:void 0},sr.prototype.has=function(t){var n=this.A;return rr?void 0!==n[t]:ir.call(n,t)},sr.prototype.set=function(t,n){var r=this.A;return this.size+=this.has(t)?0:1,r[t]=rr&&void 0===n?"__lodash_hash_undefined__":n,this};var ur=Array.prototype.splice;function cr(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}cr.prototype.clear=function(){this.A=[],this.size=0},cr.prototype.delete=function(t){var n=this.A,r=or(n,t);return!(r<0)&&(r==n.length-1?n.pop():ur.call(n,r,1),--this.size,!0)},cr.prototype.get=function(t){var n=this.A,r=or(n,t);return r<0?void 0:n[r][1]},cr.prototype.has=function(t){return or(this.A,t)>-1},cr.prototype.set=function(t,n){var r=this.A,e=or(r,t);return e<0?(++this.size,r.push([t,n])):r[e][1]=n,this};var lr=rt(a,"Map");function ar(t,n){var r,e,i=t.A;return("string"==(e=typeof(r=n))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==r:null===r)?i["string"==typeof n?"string":"hash"]:i.map}function fr(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}fr.prototype.clear=function(){this.size=0,this.A={hash:new sr,map:new(lr||cr),string:new sr}},fr.prototype.delete=function(t){var n=ar(this,t).delete(t);return this.size-=n?1:0,n},fr.prototype.get=function(t){return ar(this,t).get(t)},fr.prototype.has=function(t){return ar(this,t).has(t)},fr.prototype.set=function(t,n){var r=ar(this,t),e=r.size;return r.set(t,n),this.size+=r.size==e?0:1,this};function hr(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var r=function(){var e=arguments,i=n?n.apply(this,e):e[0],s=r.cache;if(s.has(i))return s.get(i);var o=t.apply(this,e);return r.cache=s.set(i,o)||s,o};return r.cache=new(hr.Cache||fr),r}hr.Cache=fr;var vr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dr=/\\(\\)?/g,pr=function(t){var n=hr(t,(function(t){return 500===r.size&&r.clear(),t})),r=n.cache;return n}((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(vr,(function(t,r,e,i){n.push(e?i.replace(dr,"$1"):r||t)})),n}));function br(t){return null==t?"":O(t)}function yr(t,n){return k(t)?t:nr(t,n)?[t]:pr(br(t))}function mr(t){if("string"==typeof t||w(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function gr(t,n){for(var r=0,e=(n=yr(n,t)).length;null!=t&&r<e;)t=t[mr(n[r++])];return r&&r==e?t:void 0}function wr(t,n,r){var e=null==t?void 0:gr(t,n);return void 0===e?r:e}function xr(t,n){for(var r=-1,e=n.length,i=Array(e),s=null==t;++r<e;)i[r]=s?void 0:wr(t,n[r]);return i}function jr(t,n){for(var r=-1,e=n.length,i=t.length;++r<e;)t[i+r]=n[r];return t}var kr=f?f.isConcatSpreadable:void 0;function Ar(t){return k(t)||An(t)||!!(kr&&t&&t[kr])}function qr(t,n,r,e,i){var s=-1,o=t.length;for(r||(r=Ar),i||(i=[]);++s<o;){var u=t[s];n>0&&r(u)?n>1?qr(u,n-1,r,e,i):jr(i,u):e||(i[i.length]=u)}return i}function Or(t){return(null==t?0:t.length)?qr(t,1):[]}function Mr(t){return It(fn(t,void 0,Or),t+"")}var Er=Mr(xr),_r=Vn(Object.getPrototypeOf,Object),Tr=Function.prototype,Lr=Object.prototype,$r=Tr.toString,Sr=Lr.hasOwnProperty,Nr=$r.call(Object);function Rr(t){if(!g(t)||"[object Object]"!=m(t))return!1;var n=_r(t);if(null===n)return!0;var r=Sr.call(n,"constructor")&&n.constructor;return"function"==typeof r&&r instanceof r&&$r.call(r)==Nr}function Ir(t){if(!g(t))return!1;var n=m(t);return"[object Error]"==n||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!Rr(t)}var Br=hn((function(t,n){try{return lt(t,void 0,n)}catch(t){return Ir(t)?t:new Error(t)}}));function Cr(t,n){var r;if("function"!=typeof n)throw new TypeError("Expected a function");return t=H(t),function(){return--t>0&&(r=n.apply(this,arguments)),t<=1&&(n=void 0),r}}var Dr=hn((function(t,n,r){var e=1;if(r.length){var i=Qt(r,Zt(Dr));e|=32}return rn(t,e,n,r,i)}));Dr.placeholder={};var Vr=Mr((function(t,n){return Bt(n,(function(n){n=mr(n),sn(t,n,Dr(t[n],t))})),t})),Hr=hn((function(t,n,r){var e=3;if(r.length){var i=Qt(r,Zt(Hr));e|=32}return rn(n,e,t,r,i)}));function Fr(t,n,r){var e=-1,i=t.length;n<0&&(n=-n>i?0:i+n),(r=r>i?i:r)<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var s=Array(i);++e<i;)s[e]=t[e+n];return s}function Ur(t,n,r){var e=t.length;return r=void 0===r?e:r,!n&&r>=e?t:Fr(t,n,r)}Hr.placeholder={};var Pr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Zr(t){return Pr.test(t)}var Wr="\\ud800-\\udfff",zr="["+Wr+"]",Kr="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Gr="\\ud83c[\\udffb-\\udfff]",Qr="[^"+Wr+"]",Yr="(?:\\ud83c[\\udde6-\\uddff]){2}",Jr="[\\ud800-\\udbff][\\udc00-\\udfff]",Xr="(?:"+Kr+"|"+Gr+")"+"?",te="[\\ufe0e\\ufe0f]?",ne=te+Xr+("(?:\\u200d(?:"+[Qr,Yr,Jr].join("|")+")"+te+Xr+")*"),re="(?:"+[Qr+Kr+"?",Kr,Yr,Jr,zr].join("|")+")",ee=RegExp(Gr+"(?="+Gr+")|"+re+ne,"g");function ie(t){return Zr(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.split("")}(t)}function se(t){return function(n){var r=Zr(n=br(n))?ie(n):void 0,e=r?r[0]:n.charAt(0),i=r?Ur(r,1).join(""):n.slice(1);return e[t]()+i}}var oe=se("toUpperCase");function ue(t){return oe(br(t).toLowerCase())}function ce(t,n,r,e){var i=-1,s=null==t?0:t.length;for(e&&s&&(r=t[++i]);++i<s;)r=n(r,t[i],i,t);return r}function le(t){return function(n){return null==t?void 0:t[n]}}var ae=le({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),fe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,he=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");function ve(t){return(t=br(t))&&t.replace(fe,ae).replace(he,"")}var de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var pe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var be="\\ud800-\\udfff",ye="\\u2700-\\u27bf",me="a-z\\xdf-\\xf6\\xf8-\\xff",ge="A-Z\\xc0-\\xd6\\xd8-\\xde",we="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xe="["+we+"]",je="\\d+",ke="["+ye+"]",Ae="["+me+"]",qe="[^"+be+we+je+ye+me+ge+"]",Oe="(?:\\ud83c[\\udde6-\\uddff]){2}",Me="[\\ud800-\\udbff][\\udc00-\\udfff]",Ee="["+ge+"]",_e="(?:"+Ae+"|"+qe+")",Te="(?:"+Ee+"|"+qe+")",Le="(?:['’](?:d|ll|m|re|s|t|ve))?",$e="(?:['’](?:D|LL|M|RE|S|T|VE))?",Se="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Ne="[\\ufe0e\\ufe0f]?",Re=Ne+Se+("(?:\\u200d(?:"+["[^"+be+"]",Oe,Me].join("|")+")"+Ne+Se+")*"),Ie="(?:"+[ke,Oe,Me].join("|")+")"+Re,Be=RegExp([Ee+"?"+Ae+"+"+Le+"(?="+[xe,Ee,"$"].join("|")+")",Te+"+"+$e+"(?="+[xe,Ee+_e,"$"].join("|")+")",Ee+"?"+_e+"+"+Le,Ee+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je,Ie].join("|"),"g");function Ce(t,n,r){return t=br(t),void 0===(n=r?void 0:n)?function(t){return pe.test(t)}(t)?function(t){return t.match(Be)||[]}(t):function(t){return t.match(de)||[]}(t):t.match(n)||[]}var De=RegExp("['’]","g");function Ve(t){return function(n){return ce(Ce(ve(n).replace(De,"")),t,"")}}var He=Ve((function(t,n,r){return n=n.toLowerCase(),t+(r?ue(n):n)}));var Fe=a.isFinite,Ue=Math.min;function Pe(t){var n=Math[t];return function(t,r){if(t=C(t),(r=null==r?0:Ue(H(r),292))&&Fe(t)){var e=(br(t)+"e").split("e");return+((e=(br(n(e[0]+"e"+(+e[1]+r)))+"e").split("e"))[0]+"e"+(+e[1]-r))}return n(t)}}var Ze=Pe("ceil");function We(t){var n=qt(t);return n.m=!0,n}var ze=Math.ceil,Ke=Math.max;function Ge(t,n,r){return t==t&&(void 0!==r&&(t=t<=r?t:r),void 0!==n&&(t=t>=n?t:n)),t}function Qe(t){var n=this.A=new cr(t);this.size=n.size}function Ye(t,n){return t&&ln(n,Pn(n),t)}Qe.prototype.clear=function(){this.A=new cr,this.size=0},Qe.prototype.delete=function(t){var n=this.A,r=n.delete(t);return this.size=n.size,r},Qe.prototype.get=function(t){return this.A.get(t)},Qe.prototype.has=function(t){return this.A.has(t)},Qe.prototype.set=function(t,n){var r=this.A;if(r instanceof cr){var e=r.A;if(!lr||e.length<199)return e.push([t,n]),this.size=++r.size,this;r=this.A=new fr(e)}return r.set(t,n),this.size=r.size,this};var Je="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xe=Je&&"object"==typeof module&&module&&!module.nodeType&&module,ti=Xe&&Xe.exports===Je?a.Buffer:void 0,ni=ti?ti.allocUnsafe:void 0;function ri(t,n){if(n)return t.slice();var r=t.length,e=ni?ni(r):new t.constructor(r);return t.copy(e),e}function ei(t,n){for(var r=-1,e=null==t?0:t.length,i=0,s=[];++r<e;){var o=t[r];n(o,r,t)&&(s[i++]=o)}return s}function ii(){return[]}var si=Object.prototype.propertyIsEnumerable,oi=Object.getOwnPropertySymbols,ui=oi?function(t){return null==t?[]:(t=Object(t),ei(oi(t),(function(n){return si.call(t,n)})))}:ii;var ci=Object.getOwnPropertySymbols?function(t){for(var n=[];t;)jr(n,ui(t)),t=_r(t);return n}:ii;function li(t,n,r){var e=n(t);return k(t)?e:jr(e,r(t))}function ai(t){return li(t,Pn,ui)}function fi(t){return li(t,Gn,ci)}var hi=rt(a,"DataView"),vi=rt(a,"Promise"),di=rt(a,"Set"),pi="[object Map]",bi="[object Promise]",yi="[object Set]",mi="[object WeakMap]",gi="[object DataView]",wi=K(hi),xi=K(lr),ji=K(vi),ki=K(di),Ai=K(et),qi=m;(hi&&qi(new hi(new ArrayBuffer(1)))!=gi||lr&&qi(new lr)!=pi||vi&&qi(vi.resolve())!=bi||di&&qi(new di)!=yi||et&&qi(new et)!=mi)&&(qi=function(t){var n=m(t),r="[object Object]"==n?t.constructor:void 0,e=r?K(r):"";if(e)switch(e){case wi:return gi;case xi:return pi;case ji:return bi;case ki:return yi;case Ai:return mi}return n});var Oi=qi,Mi=Object.prototype.hasOwnProperty;var Ei=a.Uint8Array;function _i(t){var n=new t.constructor(t.byteLength);return new Ei(n).set(new Ei(t)),n}var Ti=/\w*$/;var Li=f?f.prototype:void 0,$i=Li?Li.valueOf:void 0;function Si(t,n){var r=n?_i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ni(t,n,r){var e,i=t.constructor;switch(n){case"[object ArrayBuffer]":return _i(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return function(t,n){var r=n?_i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Si(t,r);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return function(t){var n=new t.constructor(t.source,Ti.exec(t));return n.lastIndex=t.lastIndex,n}(t);case"[object Symbol]":return e=t,$i?Object($i.call(e)):{}}}function Ri(t){return"function"!=typeof t.constructor||mn(t)?{}:ut(_r(t))}var Ii=Rn&&Rn.isMap,Bi=Ii?Ln(Ii):function(t){return g(t)&&"[object Map]"==Oi(t)};var Ci=Rn&&Rn.isSet,Di=Ci?Ln(Ci):function(t){return g(t)&&"[object Set]"==Oi(t)},Vi="[object Arguments]",Hi="[object Function]",Fi="[object Object]",Ui={};function Pi(t,n,r,e,i,s){var o,u=1&n,c=2&n,l=4&n;if(r&&(o=i?r(t,e,i,s):r(t)),void 0!==o)return o;if(!S(t))return t;var a=k(t);if(a){if(o=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&Mi.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!u)return jt(t,o)}else{var f=Oi(t),h=f==Hi||"[object GeneratorFunction]"==f;if(_n(t))return ri(t,u);if(f==Fi||f==Vi||h&&!i){if(o=c||h?{}:Ri(t),!u)return c?function(t,n){return ln(t,ci(t),n)}(t,function(t,n){return t&&ln(n,Gn(n),t)}(o,t)):function(t,n){return ln(t,ui(t),n)}(t,Ye(o,t))}else{if(!Ui[f])return i?t:{};o=Ni(t,f,u)}}s||(s=new Qe);var v=s.get(t);if(v)return v;s.set(t,o),Di(t)?t.forEach((function(e){o.add(Pi(e,n,r,e,t,s))})):Bi(t)&&t.forEach((function(e,i){o.set(i,Pi(e,n,r,i,t,s))}));var d=a?void 0:(l?c?fi:ai:c?Gn:Pn)(t);return Bt(d||t,(function(e,i){d&&(e=t[i=e]),cn(o,i,Pi(e,n,r,i,t,s))})),o}Ui[Vi]=Ui["[object Array]"]=Ui["[object ArrayBuffer]"]=Ui["[object DataView]"]=Ui["[object Boolean]"]=Ui["[object Date]"]=Ui["[object Float32Array]"]=Ui["[object Float64Array]"]=Ui["[object Int8Array]"]=Ui["[object Int16Array]"]=Ui["[object Int32Array]"]=Ui["[object Map]"]=Ui["[object Number]"]=Ui[Fi]=Ui["[object RegExp]"]=Ui["[object Set]"]=Ui["[object String]"]=Ui["[object Symbol]"]=Ui["[object Uint8Array]"]=Ui["[object Uint8ClampedArray]"]=Ui["[object Uint16Array]"]=Ui["[object Uint32Array]"]=!0,Ui["[object Error]"]=Ui[Hi]=Ui["[object WeakMap]"]=!1;function Zi(t){return Pi(t,5)}function Wi(t){var n=-1,r=null==t?0:t.length;for(this.A=new fr;++n<r;)this.add(t[n])}function zi(t,n){for(var r=-1,e=null==t?0:t.length;++r<e;)if(n(t[r],r,t))return!0;return!1}function Ki(t,n){return t.has(n)}Wi.prototype.add=Wi.prototype.push=function(t){return this.A.set(t,"__lodash_hash_undefined__"),this},Wi.prototype.has=function(t){return this.A.has(t)};function Gi(t,n,r,e,i,s){var o=1&r,u=t.length,c=n.length;if(u!=c&&!(o&&c>u))return!1;var l=s.get(t),a=s.get(n);if(l&&a)return l==n&&a==t;var f=-1,h=!0,v=2&r?new Wi:void 0;for(s.set(t,n),s.set(n,t);++f<u;){var d=t[f],p=n[f];if(e)var b=o?e(p,d,f,n,t,s):e(d,p,f,t,n,s);if(void 0!==b){if(b)continue;h=!1;break}if(v){if(!zi(n,(function(t,n){if(!Ki(v,n)&&(d===t||i(d,t,r,e,s)))return v.push(n)}))){h=!1;break}}else if(d!==p&&!i(d,p,r,e,s)){h=!1;break}}return s.delete(t),s.delete(n),h}function Qi(t){var n=-1,r=Array(t.size);return t.forEach((function(t,e){r[++n]=[e,t]})),r}function Yi(t){var n=-1,r=Array(t.size);return t.forEach((function(t){r[++n]=t})),r}var Ji=f?f.prototype:void 0,Xi=Ji?Ji.valueOf:void 0;var ts=Object.prototype.hasOwnProperty;var ns="[object Arguments]",rs="[object Array]",es="[object Object]",is=Object.prototype.hasOwnProperty;function ss(t,n,r,e,i,s){var o=k(t),u=k(n),c=o?rs:Oi(t),l=u?rs:Oi(n),a=(c=c==ns?es:c)==es,f=(l=l==ns?es:l)==es,h=c==l;if(h&&_n(t)){if(!_n(n))return!1;o=!0,a=!1}if(h&&!a)return s||(s=new Qe),o||Bn(t)?Gi(t,n,r,e,i,s):function(t,n,r,e,i,s,o){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=n.byteLength||!s(new Ei(t),new Ei(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return on(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var u=Qi;case"[object Set]":var c=1&e;if(u||(u=Yi),t.size!=n.size&&!c)return!1;var l=o.get(t);if(l)return l==n;e|=2,o.set(t,n);var a=Gi(u(t),u(n),e,i,s,o);return o.delete(t),a;case"[object Symbol]":if(Xi)return Xi.call(t)==Xi.call(n)}return!1}(t,n,c,r,e,i,s);if(!(1&r)){var v=a&&is.call(t,"__wrapped__"),d=f&&is.call(n,"__wrapped__");if(v||d){var p=v?t.value():t,b=d?n.value():n;return s||(s=new Qe),i(p,b,r,e,s)}}return!!h&&(s||(s=new Qe),function(t,n,r,e,i,s){var o=1&r,u=ai(t),c=u.length;if(c!=ai(n).length&&!o)return!1;for(var l=c;l--;){var a=u[l];if(!(o?a in n:ts.call(n,a)))return!1}var f=s.get(t),h=s.get(n);if(f&&h)return f==n&&h==t;var v=!0;s.set(t,n),s.set(n,t);for(var d=o;++l<c;){var p=t[a=u[l]],b=n[a];if(e)var y=o?e(b,p,a,n,t,s):e(p,b,a,t,n,s);if(!(void 0===y?p===b||i(p,b,r,e,s):y)){v=!1;break}d||(d="constructor"==a)}if(v&&!d){var m=t.constructor,g=n.constructor;m==g||!("constructor"in t)||!("constructor"in n)||"function"==typeof m&&m instanceof m&&"function"==typeof g&&g instanceof g||(v=!1)}return s.delete(t),s.delete(n),v}(t,n,r,e,i,s))}function os(t,n,r,e,i){return t===n||(null==t||null==n||!g(t)&&!g(n)?t!=t&&n!=n:ss(t,n,r,e,os,i))}function us(t,n,r,e){var i=r.length,s=i,o=!e;if(null==t)return!s;for(t=Object(t);i--;){var u=r[i];if(o&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<s;){var c=(u=r[i])[0],l=t[c],a=u[1];if(o&&u[2]){if(void 0===l&&!(c in t))return!1}else{var f=new Qe;if(e)var h=e(l,a,c,t,n,f);if(!(void 0===h?os(a,l,3,e,f):h))return!1}}return!0}function cs(t){return t==t&&!S(t)}function ls(t){for(var n=Pn(t),r=n.length;r--;){var e=n[r],i=t[e];n[r]=[e,i,cs(i)]}return n}function as(t,n){return function(r){return null!=r&&(r[t]===n&&(void 0!==n||t in Object(r)))}}function fs(t){var n=ls(t);return 1==n.length&&n[0][2]?as(n[0][0],n[0][1]):function(r){return r===t||us(r,t,n)}}function hs(t,n){return null!=t&&n in Object(t)}function vs(t,n,r){for(var e=-1,i=(n=yr(n,t)).length,s=!1;++e<i;){var o=mr(n[e]);if(!(s=null!=t&&r(t,o)))break;t=t[o]}return s||++e!=i?s:!!(i=null==t?0:t.length)&&vn(i)&&zt(o,i)&&(k(t)||An(t))}function ds(t,n){return null!=t&&vs(t,n,hs)}function ps(t,n){return nr(t)&&cs(n)?as(mr(t),n):function(r){var e=wr(r,t);return void 0===e&&e===n?ds(r,t):os(n,e,3)}}function bs(t){return function(n){return null==n?void 0:n[t]}}function ys(t){return nr(t)?bs(mr(t)):function(t){return function(n){return gr(n,t)}}(t)}function ms(t){return"function"==typeof t?t:null==t?F:"object"==typeof t?k(t)?ps(t[0],t[1]):fs(t):ys(t)}function gs(t,n,r){var e=r.length;if(null==t)return!e;for(t=Object(t);e--;){var i=r[e],s=n[i],o=t[i];if(void 0===o&&!(i in t)||!s(o))return!1}return!0}function ws(t,n,r,e){for(var i=-1,s=null==t?0:t.length;++i<s;){var o=t[i];n(e,o,r(o),t)}return e}function xs(t){return function(n,r,e){for(var i=-1,s=Object(n),o=e(n),u=o.length;u--;){var c=o[t?u:++i];if(!1===r(s[c],c,s))break}return n}}var js=xs();function ks(t,n){return t&&js(t,n,Pn)}function As(t,n){return function(r,e){if(null==r)return r;if(!dn(r))return t(r,e);for(var i=r.length,s=n?i:-1,o=Object(r);(n?s--:++s<i)&&!1!==e(o[s],s,o););return r}}var qs=As(ks);function Os(t,n,r,e){return qs(t,(function(t,i,s){n(e,t,r(t),s)})),e}function Ms(t,n){return function(r,e){var i=k(r)?ws:Os,s=n?n():{};return i(r,t,ms(e),s)}}var Es=Object.prototype.hasOwnProperty,_s=Ms((function(t,n,r){Es.call(t,r)?++t[r]:sn(t,r,1)}));function Ts(t,n,r){var e=rn(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return e.placeholder=Ts.placeholder,e}Ts.placeholder={};function Ls(t,n,r){var e=rn(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return e.placeholder=Ls.placeholder,e}Ls.placeholder={};var $s=function(){return a.Date.now()},Ss=Math.max,Ns=Math.min;function Rs(t,n,r){var e,i,s,o,u,c,l=0,a=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function v(n){var r=e,s=i;return e=i=void 0,l=n,o=t.apply(s,r)}function d(t){var r=t-c;return void 0===c||r>=n||r<0||f&&t-l>=s}function p(){var t=$s();if(d(t))return b(t);u=setTimeout(p,function(t){var r=n-(t-c);return f?Ns(r,s-(t-l)):r}(t))}function b(t){return u=void 0,h&&e?v(t):(e=i=void 0,o)}function y(){var t=$s(),r=d(t);if(e=arguments,i=this,c=t,r){if(void 0===u)return function(t){return l=t,u=setTimeout(p,n),a?v(t):o}(c);if(f)return clearTimeout(u),u=setTimeout(p,n),v(c)}return void 0===u&&(u=setTimeout(p,n)),o}return n=C(n)||0,S(r)&&(a=!!r.leading,s=(f="maxWait"in r)?Ss(C(r.maxWait)||0,n):s,h="trailing"in r?!!r.trailing:h),y.cancel=function(){void 0!==u&&clearTimeout(u),l=0,e=c=i=u=void 0},y.flush=function(){return void 0===u?o:b($s())},y}var Is=Object.prototype,Bs=Is.hasOwnProperty,Cs=hn((function(t,n){t=Object(t);var r=-1,e=n.length,i=e>2?n[2]:void 0;for(i&&pn(n[0],n[1],i)&&(e=1);++r<e;)for(var s=n[r],o=Gn(s),u=-1,c=o.length;++u<c;){var l=o[u],a=t[l];(void 0===a||on(a,Is[l])&&!Bs.call(t,l))&&(t[l]=s[l])}return t}));function Ds(t,n,r){(void 0!==r&&!on(t[n],r)||void 0===r&&!(n in t))&&sn(t,n,r)}function Vs(t){return g(t)&&dn(t)}function Hs(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}function Fs(t){return ln(t,Gn(t))}function Us(t,n,r,e,i){t!==n&&js(n,(function(s,o){if(i||(i=new Qe),S(s))!function(t,n,r,e,i,s,o){var u=Hs(t,r),c=Hs(n,r),l=o.get(c);if(l)Ds(t,r,l);else{var a=s?s(u,c,r+"",t,n,o):void 0,f=void 0===a;if(f){var h=k(c),v=!h&&_n(c),d=!h&&!v&&Bn(c);a=c,h||v||d?k(u)?a=u:Vs(u)?a=jt(u):v?(f=!1,a=ri(c,!0)):d?(f=!1,a=Si(c,!0)):a=[]:Rr(c)||An(c)?(a=u,An(u)?a=Fs(u):S(u)&&!U(u)||(a=Ri(c))):f=!1}f&&(o.set(c,a),i(a,c,e,s,o),o.delete(c)),Ds(t,r,a)}}(t,n,o,r,Us,e,i);else{var u=e?e(Hs(t,o),s,o+"",t,n,i):void 0;void 0===u&&(u=s),Ds(t,o,u)}}),Gn)}function Ps(t,n,r,e,i,s){return S(t)&&S(n)&&(s.set(n,t),Us(t,n,void 0,Ps,s),s.delete(n)),t}var Zs=bn((function(t,n,r,e){Us(t,n,r,e)})),Ws=hn((function(t){return t.push(void 0,Ps),lt(Zs,void 0,t)}));function zs(t,n,r){if("function"!=typeof t)throw new TypeError("Expected a function");return setTimeout((function(){t.apply(void 0,r)}),n)}var Ks=hn((function(t,n){return zs(t,1,n)})),Gs=hn((function(t,n,r){return zs(t,C(n)||0,r)}));function Qs(t,n,r){for(var e=-1,i=null==t?0:t.length;++e<i;)if(r(n,t[e]))return!0;return!1}function Ys(t,n,r,e){var i=-1,s=Ht,o=!0,u=t.length,c=[],l=n.length;if(!u)return c;r&&(n=j(n,Ln(r))),e?(s=Qs,o=!1):n.length>=200&&(s=Ki,o=!1,n=new Wi(n));t:for(;++i<u;){var a=t[i],f=null==r?a:r(a);if(a=e||0!==a?a:0,o&&f==f){for(var h=l;h--;)if(n[h]===f)continue t;c.push(a)}else s(n,f,e)||c.push(a)}return c}var Js=hn((function(t,n){return Vs(t)?Ys(t,qr(n,1,Vs,!0)):[]}));function Xs(t){var n=null==t?0:t.length;return n?t[n-1]:void 0}var to=hn((function(t,n){var r=Xs(n);return Vs(r)&&(r=void 0),Vs(t)?Ys(t,qr(n,1,Vs,!0),ms(r)):[]})),no=hn((function(t,n){var r=Xs(n);return Vs(r)&&(r=void 0),Vs(t)?Ys(t,qr(n,1,Vs,!0),void 0,r):[]})),ro=M((function(t,n){return t/n}),1);function eo(t,n,r,e){for(var i=t.length,s=e?i:-1;(e?s--:++s<i)&&n(t[s],s,t););return r?Fr(t,e?0:s,e?s+1:i):Fr(t,e?s+1:0,e?i:s)}function io(t){return"function"==typeof t?t:F}function so(t,n){return(k(t)?Bt:qs)(t,io(n))}function oo(t,n){for(var r=null==t?0:t.length;r--&&!1!==n(t[r],r,t););return t}var uo=xs(!0);function co(t,n){return t&&uo(t,n,Pn)}var lo=As(co,!0);function ao(t,n){return(k(t)?oo:lo)(t,io(n))}function fo(t){return function(n){var r=Oi(n);return"[object Map]"==r?Qi(n):"[object Set]"==r?function(t){var n=-1,r=Array(t.size);return t.forEach((function(t){r[++n]=[t,t]})),r}(n):function(t,n){return j(n,(function(n){return[n,t[n]]}))}(n,t(n))}}var ho=fo(Pn),vo=fo(Gn),po=le({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),bo=/[&<>"']/g,yo=RegExp(bo.source);function mo(t){return(t=br(t))&&yo.test(t)?t.replace(bo,po):t}var go=/[\\^$.*+?()[\]{}|]/g,wo=RegExp(go.source);function xo(t,n){for(var r=-1,e=null==t?0:t.length;++r<e;)if(!n(t[r],r,t))return!1;return!0}function jo(t,n){var r=!0;return qs(t,(function(t,e,i){return r=!!n(t,e,i)})),r}function ko(t){return t?Ge(H(t),0,4294967295):0}function Ao(t,n){var r=[];return qs(t,(function(t,e,i){n(t,e,i)&&r.push(t)})),r}function qo(t){return function(n,r,e){var i=Object(n);if(!dn(n)){var s=ms(r);n=Pn(n),r=function(t){return s(i[t],t,i)}}var o=t(n,r,e);return o>-1?i[s?n[o]:o]:void 0}}var Oo=Math.max;function Mo(t,n,r){var e=null==t?0:t.length;if(!e)return-1;var i=null==r?0:H(r);return i<0&&(i=Oo(e+i,0)),Ct(t,ms(n),i)}var Eo=qo(Mo);function _o(t,n,r){var e;return r(t,(function(t,r,i){if(n(t,r,i))return e=r,!1})),e}var To=Math.max,Lo=Math.min;function $o(t,n,r){var e=null==t?0:t.length;if(!e)return-1;var i=e-1;return void 0!==r&&(i=H(r),i=r<0?To(e+i,0):Lo(i,e-1)),Ct(t,ms(n),i,!0)}var So=qo($o);function No(t){return t&&t.length?t[0]:void 0}function Ro(t,n){var r=-1,e=dn(t)?Array(t.length):[];return qs(t,(function(t,i,s){e[++r]=n(t,i,s)})),e}function Io(t,n){return(k(t)?j:Ro)(t,ms(n))}var Bo=1/0;var Co=1/0;var Do=Pe("floor");function Vo(t){return Mr((function(n){var r=n.length,e=r,i=xt.prototype.thru;for(t&&n.reverse();e--;){var s=n[e];if("function"!=typeof s)throw new TypeError("Expected a function");if(i&&!o&&"wrapper"==wt(s))var o=new xt([],!0)}for(e=o?e:r;++e<r;){var u=wt(s=n[e]),c="wrapper"==u?yt(s):void 0;o=c&&Ot(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?o[wt(c[0])].apply(o,c[3]):1==s.length&&Ot(s)?o[u]():o.thru(s)}return function(){var t=arguments,e=t[0];if(o&&1==t.length&&k(e))return o.plant(e).value();for(var i=0,s=r?n[i].apply(this,t):e;++i<r;)s=n[i].call(this,s);return s}}))}var Ho=Vo(),Fo=Vo(!0);function Uo(t,n){return ei(n,(function(n){return U(t[n])}))}var Po=Object.prototype.hasOwnProperty,Zo=Ms((function(t,n,r){Po.call(t,r)?t[r].push(n):sn(t,r,[n])}));function Wo(t,n){return t>n}function zo(t){return function(n,r){return"string"==typeof n&&"string"==typeof r||(n=C(n),r=C(r)),t(n,r)}}var Ko=zo(Wo),Go=zo((function(t,n){return t>=n})),Qo=Object.prototype.hasOwnProperty;function Yo(t,n){return null!=t&&Qo.call(t,n)}var Jo=Math.max,Xo=Math.min;function tu(t){return"string"==typeof t||!k(t)&&g(t)&&"[object String]"==m(t)}function nu(t,n){return j(n,(function(n){return t[n]}))}function ru(t){return null==t?[]:nu(t,Pn(t))}var eu=Math.max;var iu=Math.max;var su=Math.min;function ou(t,n,r){for(var e=r?Qs:Ht,i=t[0].length,s=t.length,o=s,u=Array(s),c=1/0,l=[];o--;){var a=t[o];o&&n&&(a=j(a,Ln(n))),c=su(a.length,c),u[o]=!r&&(n||i>=120&&a.length>=120)?new Wi(o&&a):void 0}a=t[0];var f=-1,h=u[0];t:for(;++f<i&&l.length<c;){var v=a[f],d=n?n(v):v;if(v=r||0!==v?v:0,!(h?Ki(h,d):e(l,d,r))){for(o=s;--o;){var p=u[o];if(!(p?Ki(p,d):e(t[o],d,r)))continue t}h&&h.push(d),l.push(v)}}return l}function uu(t){return Vs(t)?t:[]}var cu=hn((function(t){var n=j(t,uu);return n.length&&n[0]===t[0]?ou(n):[]})),lu=hn((function(t){var n=Xs(t),r=j(t,uu);return n===Xs(r)?n=void 0:r.pop(),r.length&&r[0]===t[0]?ou(r,ms(n)):[]})),au=hn((function(t){var n=Xs(t),r=j(t,uu);return(n="function"==typeof n?n:void 0)&&r.pop(),r.length&&r[0]===t[0]?ou(r,void 0,n):[]}));function fu(t,n){return function(r,e){return function(t,n,r,e){return ks(t,(function(t,i,s){n(e,r(t),i,s)})),e}(r,t,n(e),{})}}var hu=Object.prototype.toString,vu=fu((function(t,n,r){null!=n&&"function"!=typeof n.toString&&(n=hu.call(n)),t[n]=r}),St(F)),du=Object.prototype,pu=du.hasOwnProperty,bu=du.toString,yu=fu((function(t,n,r){null!=n&&"function"!=typeof n.toString&&(n=bu.call(n)),pu.call(t,n)?t[n].push(r):t[n]=[r]}),ms);function mu(t,n){return n.length<2?t:gr(t,Fr(n,0,-1))}function gu(t,n,r){var e=null==(t=mu(t,n=yr(n,t)))?t:t[mr(Xs(n))];return null==e?void 0:lt(e,t,r)}var wu=hn(gu),xu=hn((function(t,n,r){var e=-1,i="function"==typeof n,s=dn(t)?Array(t.length):[];return qs(t,(function(t){s[++e]=i?lt(n,t,r):gu(t,n,r)})),s}));var ju=Rn&&Rn.isArrayBuffer,ku=ju?Ln(ju):function(t){return g(t)&&"[object ArrayBuffer]"==m(t)};var Au=Rn&&Rn.isDate,qu=Au?Ln(Au):function(t){return g(t)&&"[object Date]"==m(t)};var Ou=Object.prototype.hasOwnProperty;function Mu(t,n){return os(t,n)}var Eu=a.isFinite;function _u(t){return"number"==typeof t&&t==H(t)}function Tu(t){return"number"==typeof t||g(t)&&"[object Number]"==m(t)}var Lu=Z?U:qn;var $u=Rn&&Rn.isRegExp,Su=$u?Ln($u):function(t){return g(t)&&"[object RegExp]"==m(t)},Nu=9007199254740991;var Ru=Array.prototype.join;var Iu=Ve((function(t,n,r){return t+(r?"-":"")+n.toLowerCase()})),Bu=Ms((function(t,n,r){sn(t,r,n)}));var Cu=Math.max,Du=Math.min;var Vu=Ve((function(t,n,r){return t+(r?" ":"")+n.toLowerCase()})),Hu=se("toLowerCase");function Fu(t,n){return t<n}var Uu=zo(Fu),Pu=zo((function(t,n){return t<=n}));function Zu(t,n,r){for(var e=-1,i=t.length;++e<i;){var s=t[e],o=n(s);if(null!=o&&(void 0===u?o==o&&!w(o):r(o,u)))var u=o,c=s}return c}function Wu(t,n){for(var r,e=-1,i=t.length;++e<i;){var s=n(t[e]);void 0!==s&&(r=void 0===r?s:r+s)}return r}function zu(t,n){var r=null==t?0:t.length;return r?Wu(t,n)/r:NaN}var Ku=bn((function(t,n,r){Us(t,n,r)})),Gu=hn((function(t,n){return function(r){return gu(r,t,n)}})),Qu=hn((function(t,n){return function(r){return gu(t,r,n)}}));function Yu(t,n,r){var e=Pn(n),i=Uo(n,e),s=!(S(r)&&"chain"in r&&!r.chain),o=U(t);return Bt(i,(function(r){var e=n[r];t[r]=e,o&&(t.prototype[r]=function(){var n=this.m;if(s||n){var r=t(this.i);return(r.o=jt(this.o)).push({func:e,args:arguments,thisArg:t}),r.m=n,r}return e.apply(t,jr([this.value()],arguments))})})),t}var Ju=M((function(t,n){return t*n}),1);function Xu(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}var tc=f?f.iterator:void 0;function nc(t){if(!t)return[];if(dn(t))return tu(t)?ie(t):jt(t);if(tc&&t[tc])return function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}(t[tc]());var n=Oi(t);return("[object Map]"==n?Qi:"[object Set]"==n?Yi:ru)(t)}function rc(t,n){var r=t.length;if(r)return zt(n+=n<0?r:0,r)?t[n]:void 0}function ec(t,n){return null==(t=mu(t,n=yr(n,t)))||delete t[mr(Xs(n))]}function ic(t){return Rr(t)?void 0:t}var sc=Mr((function(t,n){var r={};if(null==t)return r;var e=!1;n=j(n,(function(n){return n=yr(n,t),e||(e=n.length>1),n})),ln(t,fi(t),r),e&&(r=Pi(r,7,ic));for(var i=n.length;i--;)ec(r,n[i]);return r}));function oc(t,n,r,e){if(!S(t))return t;for(var i=-1,s=(n=yr(n,t)).length,o=s-1,u=t;null!=u&&++i<s;){var c=mr(n[i]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(i!=o){var a=u[c];void 0===(l=e?e(a,c,u):void 0)&&(l=S(a)?a:zt(n[i+1])?[]:{})}cn(u,c,l),u=u[c]}return t}function uc(t,n,r){for(var e=-1,i=n.length,s={};++e<i;){var o=n[e],u=gr(t,o);r(u,o)&&oc(s,yr(o,t),u)}return s}function cc(t,n){if(null==t)return{};var r=j(fi(t),(function(t){return[t]}));return n=ms(n),uc(t,r,(function(t,r){return n(t,r[0])}))}function lc(t,n){if(t!==n){var r=void 0!==t,e=null===t,i=t==t,s=w(t),o=void 0!==n,u=null===n,c=n==n,l=w(n);if(!u&&!l&&!s&&t>n||s&&o&&c&&!u&&!l||e&&o&&c||!r&&c||!i)return 1;if(!e&&!s&&!l&&t<n||l&&r&&i&&!e&&!s||u&&r&&i||!o&&i||!c)return-1}return 0}function ac(t,n,r){n=n.length?j(n,(function(t){return k(t)?function(n){return gr(n,1===t.length?t[0]:t)}:t})):[F];var e=-1;n=j(n,Ln(ms));var i=Ro(t,(function(t,r,i){var s=j(n,(function(n){return n(t)}));return{criteria:s,index:++e,value:t}}));return function(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}(i,(function(t,n){return function(t,n,r){for(var e=-1,i=t.criteria,s=n.criteria,o=i.length,u=r.length;++e<o;){var c=lc(i[e],s[e]);if(c)return e>=u?c:c*("desc"==r[e]?-1:1)}return t.index-n.index}(t,n,r)}))}function fc(t){return Mr((function(n){return n=j(n,Ln(ms)),hn((function(r){var e=this;return t(n,(function(t){return lt(t,e,r)}))}))}))}var hc=fc(j),vc=hn,dc=Math.min,pc=vc((function(t,n){var r=(n=1==n.length&&k(n[0])?j(n[0],Ln(ms)):j(qr(n,1),Ln(ms))).length;return hn((function(e){for(var i=-1,s=dc(e.length,r);++i<s;)e[i]=n[i].call(this,e[i]);return lt(t,this,e)}))})),bc=fc(xo),yc=fc(zi),mc=Math.floor;function gc(t,n){var r="";if(!t||n<1||n>9007199254740991)return r;do{n%2&&(r+=t),(n=mc(n/2))&&(t+=t)}while(n);return r}var wc=bs("length"),xc="\\ud800-\\udfff",jc="["+xc+"]",kc="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Ac="\\ud83c[\\udffb-\\udfff]",qc="[^"+xc+"]",Oc="(?:\\ud83c[\\udde6-\\uddff]){2}",Mc="[\\ud800-\\udbff][\\udc00-\\udfff]",Ec="(?:"+kc+"|"+Ac+")"+"?",_c="[\\ufe0e\\ufe0f]?",Tc=_c+Ec+("(?:\\u200d(?:"+[qc,Oc,Mc].join("|")+")"+_c+Ec+")*"),Lc="(?:"+[qc+kc+"?",kc,Oc,Mc,jc].join("|")+")",$c=RegExp(Ac+"(?="+Ac+")|"+Lc+Tc,"g");function Sc(t){return Zr(t)?function(t){for(var n=$c.lastIndex=0;$c.test(t);)++n;return n}(t):wc(t)}var Nc=Math.ceil;function Rc(t,n){var r=(n=void 0===n?" ":O(n)).length;if(r<2)return r?gc(n,t):n;var e=gc(n,Nc(t/Sc(n)));return Zr(n)?Ur(ie(e),0,t).join(""):e.slice(0,t)}var Ic=Math.ceil,Bc=Math.floor;var Cc=/^\s+/,Dc=a.parseInt;var Vc=hn((function(t,n){return rn(t,32,void 0,n,Qt(n,Zt(Vc)))}));Vc.placeholder={};var Hc=hn((function(t,n){return rn(t,64,void 0,n,Qt(n,Zt(Hc)))}));Hc.placeholder={};var Fc=Ms((function(t,n,r){t[r?0:1].push(n)}),(function(){return[[],[]]}));var Uc=Mr((function(t,n){return null==t?{}:function(t,n){return uc(t,n,(function(n,r){return ds(t,r)}))}(t,n)}));function Pc(t,n,r,e){for(var i=r-1,s=t.length;++i<s;)if(e(t[i],n))return i;return-1}var Zc=Array.prototype.splice;function Wc(t,n,r,e){var i=e?Pc:Vt,s=-1,o=n.length,u=t;for(t===n&&(n=jt(n)),r&&(u=j(t,Ln(r)));++s<o;)for(var c=0,l=n[s],a=r?r(l):l;(c=i(u,a,c,e))>-1;)u!==t&&Zc.call(u,c,1),Zc.call(t,c,1);return t}function zc(t,n){return t&&t.length&&n&&n.length?Wc(t,n):t}var Kc=hn(zc);var Gc=Array.prototype.splice;function Qc(t,n){for(var r=t?n.length:0,e=r-1;r--;){var i=n[r];if(r==e||i!==s){var s=i;zt(i)?Gc.call(t,i,1):ec(t,i)}}return t}var Yc=Mr((function(t,n){var r=null==t?0:t.length,e=xr(t,n);return Qc(t,j(n,(function(t){return zt(t,r)?+t:t})).sort(lc)),e})),Jc=Math.floor,Xc=Math.random;function tl(t,n){return t+Jc(Xc()*(n-t+1))}var nl=parseFloat,rl=Math.min,el=Math.random;var il=Math.ceil,sl=Math.max;function ol(t){return function(n,r,e){return e&&"number"!=typeof e&&pn(n,r,e)&&(r=e=void 0),n=V(n),void 0===r?(r=n,n=0):r=V(r),function(t,n,r,e){for(var i=-1,s=sl(il((n-t)/(r||1)),0),o=Array(s);s--;)o[e?s:++i]=t,t+=r;return o}(n,r,e=void 0===e?n<r?1:-1:V(e),t)}}var ul=ol(),cl=ol(!0),ll=Mr((function(t,n){return rn(t,256,void 0,void 0,void 0,n)}));function al(t,n,r,e,i){return i(t,(function(t,i,s){r=e?(e=!1,t):n(r,t,i,s)})),r}function fl(t,n,r,e){var i=null==t?0:t.length;for(e&&i&&(r=t[--i]);i--;)r=n(r,t[i],i,t);return r}var hl=Array.prototype.reverse;function vl(t){return null==t?t:hl.call(t)}var dl=Pe("round");function pl(t){var n=t.length;return n?t[tl(0,n-1)]:void 0}function bl(t){return pl(ru(t))}function yl(t,n){var r=-1,e=t.length,i=e-1;for(n=void 0===n?e:n;++r<n;){var s=tl(r,i),o=t[s];t[s]=t[r],t[r]=o}return t.length=n,t}function ml(t,n){return yl(jt(t),Ge(n,0,t.length))}function gl(t,n){var r=ru(t);return yl(r,Ge(n,0,r.length))}function wl(t){return yl(jt(t))}function xl(t){return yl(ru(t))}var jl=Ve((function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}));function kl(t,n){var r;return qs(t,(function(t,e,i){return!(r=n(t,e,i))})),!!r}var Al=hn((function(t,n){if(null==t)return[];var r=n.length;return r>1&&pn(t,n[0],n[1])?n=[]:r>2&&pn(n[0],n[1],n[2])&&(n=[n[0]]),ac(t,qr(n,1),[])})),ql=Math.floor,Ol=Math.min;function Ml(t,n,r,e){var i=0,s=null==t?0:t.length;if(0===s)return 0;for(var o=(n=r(n))!=n,u=null===n,c=w(n),l=void 0===n;i<s;){var a=ql((i+s)/2),f=r(t[a]),h=void 0!==f,v=null===f,d=f==f,p=w(f);if(o)var b=e||d;else b=l?d&&(e||h):u?d&&h&&(e||!v):c?d&&h&&!v&&(e||!p):!v&&!p&&(e?f<=n:f<n);b?i=a+1:s=a}return Ol(s,4294967294)}function El(t,n,r){var e=0,i=null==t?e:t.length;if("number"==typeof n&&n==n&&i<=2147483647){for(;e<i;){var s=e+i>>>1,o=t[s];null!==o&&!w(o)&&(r?o<=n:o<n)?e=s+1:i=s}return i}return Ml(t,n,F,r)}function _l(t,n){for(var r=-1,e=t.length,i=0,s=[];++r<e;){var o=t[r],u=n?n(o):o;if(!r||!on(u,c)){var c=u;s[i++]=0===o?0:o}}return s}var Tl=Math.max;var Ll=Ve((function(t,n,r){return t+(r?" ":"")+oe(n)}));var $l=M((function(t,n){return t-n}),0);var Sl=Object.prototype,Nl=Sl.hasOwnProperty;function Rl(t,n,r,e){return void 0===t||on(t,Sl[r])&&!Nl.call(e,r)?n:t}var Il={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Bl(t){return"\\"+Il[t]}var Cl=/<%=([\s\S]+?)%>/g,Dl={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:Cl,variable:"",imports:{_:{escape:mo}}},Vl=/\b__p \+= '';/g,Hl=/\b(__p \+=) '' \+/g,Fl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ul=/[()=,{}\[\]\/\s]/,Pl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Zl=/($^)/,Wl=/['\n\r\u2028\u2029\\]/g,zl=Object.prototype.hasOwnProperty;function Kl(t,n){return n(t)}var Gl=4294967295,Ql=Math.min;function Yl(t,n){var r=t;return r instanceof pt&&(r=r.value()),ce(n,(function(t,n){return n.func.apply(n.thisArg,jr([t],n.args))}),r)}function Jl(){return Yl(this.i,this.o)}var Xl=9007199254740991;function ta(t,n){for(var r=t.length;r--&&Vt(n,t[r],0)>-1;);return r}function na(t,n){for(var r=-1,e=t.length;++r<e&&Vt(n,t[r],0)>-1;);return r}var ra=/^\s+/;var ea=/\w*$/;var ia=le({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),sa=/&(?:amp|lt|gt|quot|#39);/g,oa=RegExp(sa.source);var ua=di&&1/Yi(new di([,-0]))[1]==1/0?function(t){return new di(t)}:bt;function ca(t,n,r){var e=-1,i=Ht,s=t.length,o=!0,u=[],c=u;if(r)o=!1,i=Qs;else if(s>=200){var l=n?null:ua(t);if(l)return Yi(l);o=!1,i=Ki,c=new Wi}else c=n?[]:u;t:for(;++e<s;){var a=t[e],f=n?n(a):a;if(a=r||0!==a?a:0,o&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue t;n&&c.push(f),u.push(a)}else i(c,f,r)||(c!==u&&c.push(f),u.push(a))}return u}var la=hn((function(t){return ca(qr(t,1,Vs,!0))})),aa=hn((function(t){var n=Xs(t);return Vs(n)&&(n=void 0),ca(qr(t,1,Vs,!0),ms(n))})),fa=hn((function(t){var n=Xs(t);return n="function"==typeof n?n:void 0,ca(qr(t,1,Vs,!0),void 0,n)}));var ha=0;var va=Math.max;function da(t){if(!t||!t.length)return[];var n=0;return t=ei(t,(function(t){if(Vs(t))return n=va(t.length,n),!0})),gn(n,(function(n){return j(t,bs(n))}))}function pa(t,n){if(!t||!t.length)return[];var r=da(t);return null==n?r:j(r,(function(t){return lt(n,void 0,t)}))}function ba(t,n,r,e){return oc(t,n,r(gr(t,n)),e)}var ya=Ve((function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}));var ma=hn((function(t,n){return Vs(t)?Ys(t,n):[]}));var ga=Mr((function(t){var n=t.length,r=n?t[0]:0,e=this.i,i=function(n){return xr(n,t)};return!(n>1||this.o.length)&&e instanceof pt&&zt(r)?((e=e.slice(r,+r+(n?1:0))).o.push({func:Kl,args:[i],thisArg:void 0}),new xt(e,this.m).thru((function(t){return n&&!t.length&&t.push(void 0),t}))):this.thru(i)}));function wa(t,n,r){var e=t.length;if(e<2)return e?ca(t[0]):[];for(var i=-1,s=Array(e);++i<e;)for(var o=t[i],u=-1;++u<e;)u!=i&&(s[i]=Ys(s[i]||o,t[u],n,r));return ca(qr(s,1),n,r)}var xa=hn((function(t){return wa(ei(t,Vs))})),ja=hn((function(t){var n=Xs(t);return Vs(n)&&(n=void 0),wa(ei(t,Vs),ms(n))})),ka=hn((function(t){var n=Xs(t);return n="function"==typeof n?n:void 0,wa(ei(t,Vs),void 0,n)})),Aa=hn(da);function qa(t,n,r){for(var e=-1,i=t.length,s=n.length,o={};++e<i;){var u=e<s?n[e]:void 0;r(o,t[e],u)}return o}var Oa=hn((function(t){var n=t.length,r=n>1?t[n-1]:void 0;return r="function"==typeof r?(t.pop(),r):void 0,pa(t,r)})),Ma={chunk:function(t,n,r){n=(r?pn(t,n,r):void 0===n)?1:Ke(H(n),0);var e=null==t?0:t.length;if(!e||n<1)return[];for(var i=0,s=0,o=Array(ze(e/n));i<e;)o[s++]=Fr(t,i,i+=n);return o},compact:function(t){for(var n=-1,r=null==t?0:t.length,e=0,i=[];++n<r;){var s=t[n];s&&(i[e++]=s)}return i},concat:function(){var t=arguments.length;if(!t)return[];for(var n=Array(t-1),r=arguments[0],e=t;e--;)n[e-1]=arguments[e];return jr(k(r)?jt(r):[r],qr(n,1))},difference:Js,differenceBy:to,differenceWith:no,drop:function(t,n,r){var e=null==t?0:t.length;return e?Fr(t,(n=r||void 0===n?1:H(n))<0?0:n,e):[]},dropRight:function(t,n,r){var e=null==t?0:t.length;return e?Fr(t,0,(n=e-(n=r||void 0===n?1:H(n)))<0?0:n):[]},dropRightWhile:function(t,n){return t&&t.length?eo(t,ms(n),!0,!0):[]},dropWhile:function(t,n){return t&&t.length?eo(t,ms(n),!0):[]},fill:function(t,n,r,e){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&pn(t,n,r)&&(r=0,e=i),function(t,n,r,e){var i=t.length;for((r=H(r))<0&&(r=-r>i?0:i+r),(e=void 0===e||e>i?i:H(e))<0&&(e+=i),e=r>e?0:ko(e);r<e;)t[r++]=n;return t}(t,n,r,e)):[]},findIndex:Mo,findLastIndex:$o,first:No,flatten:Or,flattenDeep:function(t){return(null==t?0:t.length)?qr(t,Co):[]},flattenDepth:function(t,n){return(null==t?0:t.length)?qr(t,n=void 0===n?1:H(n)):[]},fromPairs:function(t){for(var n=-1,r=null==t?0:t.length,e={};++n<r;){var i=t[n];e[i[0]]=i[1]}return e},head:No,indexOf:function(t,n,r){var e=null==t?0:t.length;if(!e)return-1;var i=null==r?0:H(r);return i<0&&(i=iu(e+i,0)),Vt(t,n,i)},initial:function(t){return(null==t?0:t.length)?Fr(t,0,-1):[]},intersection:cu,intersectionBy:lu,intersectionWith:au,join:function(t,n){return null==t?"":Ru.call(t,n)},last:Xs,lastIndexOf:function(t,n,r){var e=null==t?0:t.length;if(!e)return-1;var i=e;return void 0!==r&&(i=(i=H(r))<0?Cu(e+i,0):Du(i,e-1)),n==n?function(t,n,r){for(var e=r+1;e--;)if(t[e]===n)return e;return e}(t,n,i):Ct(t,Dt,i,!0)},nth:function(t,n){return t&&t.length?rc(t,H(n)):void 0},pull:Kc,pullAll:zc,pullAllBy:function(t,n,r){return t&&t.length&&n&&n.length?Wc(t,n,ms(r)):t},pullAllWith:function(t,n,r){return t&&t.length&&n&&n.length?Wc(t,n,void 0,r):t},pullAt:Yc,remove:function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,i=[],s=t.length;for(n=ms(n);++e<s;){var o=t[e];n(o,e,t)&&(r.push(o),i.push(e))}return Qc(t,i),r},reverse:vl,slice:function(t,n,r){var e=null==t?0:t.length;return e?(r&&"number"!=typeof r&&pn(t,n,r)?(n=0,r=e):(n=null==n?0:H(n),r=void 0===r?e:H(r)),Fr(t,n,r)):[]},sortedIndex:function(t,n){return El(t,n)},sortedIndexBy:function(t,n,r){return Ml(t,n,ms(r))},sortedIndexOf:function(t,n){var r=null==t?0:t.length;if(r){var e=El(t,n);if(e<r&&on(t[e],n))return e}return-1},sortedLastIndex:function(t,n){return El(t,n,!0)},sortedLastIndexBy:function(t,n,r){return Ml(t,n,ms(r),!0)},sortedLastIndexOf:function(t,n){if(null==t?0:t.length){var r=El(t,n,!0)-1;if(on(t[r],n))return r}return-1},sortedUniq:function(t){return t&&t.length?_l(t):[]},sortedUniqBy:function(t,n){return t&&t.length?_l(t,ms(n)):[]},tail:function(t){var n=null==t?0:t.length;return n?Fr(t,1,n):[]},take:function(t,n,r){return t&&t.length?Fr(t,0,(n=r||void 0===n?1:H(n))<0?0:n):[]},takeRight:function(t,n,r){var e=null==t?0:t.length;return e?Fr(t,(n=e-(n=r||void 0===n?1:H(n)))<0?0:n,e):[]},takeRightWhile:function(t,n){return t&&t.length?eo(t,ms(n),!1,!0):[]},takeWhile:function(t,n){return t&&t.length?eo(t,ms(n)):[]},union:la,unionBy:aa,unionWith:fa,uniq:function(t){return t&&t.length?ca(t):[]},uniqBy:function(t,n){return t&&t.length?ca(t,ms(n)):[]},uniqWith:function(t,n){return n="function"==typeof n?n:void 0,t&&t.length?ca(t,void 0,n):[]},unzip:da,unzipWith:pa,without:ma,xor:xa,xorBy:ja,xorWith:ka,zip:Aa,zipObject:function(t,n){return qa(t||[],n||[],cn)},zipObjectDeep:function(t,n){return qa(t||[],n||[],oc)},zipWith:Oa},Ea={countBy:_s,each:so,eachRight:ao,every:function(t,n,r){var e=k(t)?xo:jo;return r&&pn(t,n,r)&&(n=void 0),e(t,ms(n))},filter:function(t,n){return(k(t)?ei:Ao)(t,ms(n))},find:Eo,findLast:So,flatMap:function(t,n){return qr(Io(t,n),1)},flatMapDeep:function(t,n){return qr(Io(t,n),Bo)},flatMapDepth:function(t,n,r){return r=void 0===r?1:H(r),qr(Io(t,n),r)},forEach:so,forEachRight:ao,groupBy:Zo,includes:function(t,n,r,e){t=dn(t)?t:ru(t),r=r&&!e?H(r):0;var i=t.length;return r<0&&(r=eu(i+r,0)),tu(t)?r<=i&&t.indexOf(n,r)>-1:!!i&&Vt(t,n,r)>-1},invokeMap:xu,keyBy:Bu,map:Io,orderBy:function(t,n,r,e){return null==t?[]:(k(n)||(n=null==n?[]:[n]),k(r=e?void 0:r)||(r=null==r?[]:[r]),ac(t,n,r))},partition:Fc,reduce:function(t,n,r){var e=k(t)?ce:al,i=arguments.length<3;return e(t,ms(n),r,i,qs)},reduceRight:function(t,n,r){var e=k(t)?fl:al,i=arguments.length<3;return e(t,ms(n),r,i,lo)},reject:function(t,n){return(k(t)?ei:Ao)(t,Xu(ms(n)))},sample:function(t){return(k(t)?pl:bl)(t)},sampleSize:function(t,n,r){return n=(r?pn(t,n,r):void 0===n)?1:H(n),(k(t)?ml:gl)(t,n)},shuffle:function(t){return(k(t)?wl:xl)(t)},size:function(t){if(null==t)return 0;if(dn(t))return tu(t)?Sc(t):t.length;var n=Oi(t);return"[object Map]"==n||"[object Set]"==n?t.size:Un(t).length},some:function(t,n,r){var e=k(t)?zi:kl;return r&&pn(t,n,r)&&(n=void 0),e(t,ms(n))},sortBy:Al},_a=$s,Ta={after:function(t,n){if("function"!=typeof n)throw new TypeError("Expected a function");return t=H(t),function(){if(--t<1)return n.apply(this,arguments)}},ary:en,before:Cr,bind:Dr,bindKey:Hr,curry:Ts,curryRight:Ls,debounce:Rs,defer:Ks,delay:Gs,flip:function(t){return rn(t,512)},memoize:hr,negate:Xu,once:function(t){return Cr(2,t)},overArgs:pc,partial:Vc,partialRight:Hc,rearg:ll,rest:function(t,n){if("function"!=typeof t)throw new TypeError("Expected a function");return hn(t,n=void 0===n?n:H(n))},spread:function(t,n){if("function"!=typeof t)throw new TypeError("Expected a function");return n=null==n?0:Tl(H(n),0),hn((function(r){var e=r[n],i=Ur(r,0,n);return e&&jr(i,e),lt(t,this,i)}))},throttle:function(t,n,r){var e=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return S(r)&&(e="leading"in r?!!r.leading:e,i="trailing"in r?!!r.trailing:i),Rs(t,n,{leading:e,maxWait:n,trailing:i})},unary:function(t){return en(t,1)},wrap:function(t,n){return Vc(io(n),t)}},La={castArray:function(){if(!arguments.length)return[];var t=arguments[0];return k(t)?t:[t]},clone:function(t){return Pi(t,4)},cloneDeep:Zi,cloneDeepWith:function(t,n){return Pi(t,5,n="function"==typeof n?n:void 0)},cloneWith:function(t,n){return Pi(t,4,n="function"==typeof n?n:void 0)},conformsTo:function(t,n){return null==n||gs(t,n,Pn(n))},eq:on,gt:Ko,gte:Go,isArguments:An,isArray:k,isArrayBuffer:ku,isArrayLike:dn,isArrayLikeObject:Vs,isBoolean:function(t){return!0===t||!1===t||g(t)&&"[object Boolean]"==m(t)},isBuffer:_n,isDate:qu,isElement:function(t){return g(t)&&1===t.nodeType&&!Rr(t)},isEmpty:function(t){if(null==t)return!0;if(dn(t)&&(k(t)||"string"==typeof t||"function"==typeof t.splice||_n(t)||Bn(t)||An(t)))return!t.length;var n=Oi(t);if("[object Map]"==n||"[object Set]"==n)return!t.size;if(mn(t))return!Un(t).length;for(var r in t)if(Ou.call(t,r))return!1;return!0},isEqual:Mu,isEqualWith:function(t,n,r){var e=(r="function"==typeof r?r:void 0)?r(t,n):void 0;return void 0===e?os(t,n,void 0,r):!!e},isError:Ir,isFinite:function(t){return"number"==typeof t&&Eu(t)},isFunction:U,isInteger:_u,isLength:vn,isMap:Bi,isMatch:function(t,n){return t===n||us(t,n,ls(n))},isMatchWith:function(t,n,r){return r="function"==typeof r?r:void 0,us(t,n,ls(n),r)},isNaN:function(t){return Tu(t)&&t!=+t},isNative:function(t){if(Lu(t))throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return nt(t)},isNil:function(t){return null==t},isNull:function(t){return null===t},isNumber:Tu,isObject:S,isObjectLike:g,isPlainObject:Rr,isRegExp:Su,isSafeInteger:function(t){return _u(t)&&t>=-9007199254740991&&t<=Nu},isSet:Di,isString:tu,isSymbol:w,isTypedArray:Bn,isUndefined:function(t){return void 0===t},isWeakMap:function(t){return g(t)&&"[object WeakMap]"==Oi(t)},isWeakSet:function(t){return g(t)&&"[object WeakSet]"==m(t)},lt:Uu,lte:Pu,toArray:nc,toFinite:V,toInteger:H,toLength:ko,toNumber:C,toPlainObject:Fs,toSafeInteger:function(t){return t?Ge(H(t),-9007199254740991,Xl):0===t?t:0},toString:br},$a={add:E,ceil:Ze,divide:ro,floor:Do,max:function(t){return t&&t.length?Zu(t,F,Wo):void 0},maxBy:function(t,n){return t&&t.length?Zu(t,ms(n),Wo):void 0},mean:function(t){return zu(t,F)},meanBy:function(t,n){return zu(t,ms(n))},min:function(t){return t&&t.length?Zu(t,F,Fu):void 0},minBy:function(t,n){return t&&t.length?Zu(t,ms(n),Fu):void 0},multiply:Ju,round:dl,subtract:$l,sum:function(t){return t&&t.length?Wu(t,F):0},sumBy:function(t,n){return t&&t.length?Wu(t,ms(n)):0}},Sa=function(t,n,r){return void 0===r&&(r=n,n=void 0),void 0!==r&&(r=(r=C(r))==r?r:0),void 0!==n&&(n=(n=C(n))==n?n:0),Ge(C(t),n,r)},Na=function(t,n,r){return n=V(n),void 0===r?(r=n,n=0):r=V(r),function(t,n,r){return t>=Xo(n,r)&&t<Jo(n,r)}(t=C(t),n,r)},Ra=function(t,n,r){if(r&&"boolean"!=typeof r&&pn(t,n,r)&&(n=r=void 0),void 0===r&&("boolean"==typeof n?(r=n,n=void 0):"boolean"==typeof t&&(r=t,t=void 0)),void 0===t&&void 0===n?(t=0,n=1):(t=V(t),void 0===n?(n=t,t=0):n=V(n)),t>n){var e=t;t=n,n=e}if(r||t%1||n%1){var i=el();return rl(t+i*(n-t+nl("1e-"+((i+"").length-1))),n)}return tl(t,n)},Ia={assign:Wn,assignIn:Qn,assignInWith:Yn,assignWith:Jn,at:Er,create:function(t,n){var r=ut(t);return null==n?r:Ye(r,n)},defaults:Cs,defaultsDeep:Ws,entries:ho,entriesIn:vo,extend:Qn,extendWith:Yn,findKey:function(t,n){return _o(t,ms(n),ks)},findLastKey:function(t,n){return _o(t,ms(n),co)},forIn:function(t,n){return null==t?t:js(t,io(n),Gn)},forInRight:function(t,n){return null==t?t:uo(t,io(n),Gn)},forOwn:function(t,n){return t&&ks(t,io(n))},forOwnRight:function(t,n){return t&&co(t,io(n))},functions:function(t){return null==t?[]:Uo(t,Pn(t))},functionsIn:function(t){return null==t?[]:Uo(t,Gn(t))},get:wr,has:function(t,n){return null!=t&&vs(t,n,Yo)},hasIn:ds,invert:vu,invertBy:yu,invoke:wu,keys:Pn,keysIn:Gn,mapKeys:function(t,n){var r={};return n=ms(n),ks(t,(function(t,e,i){sn(r,n(t,e,i),t)})),r},mapValues:function(t,n){var r={};return n=ms(n),ks(t,(function(t,e,i){sn(r,e,n(t,e,i))})),r},merge:Ku,mergeWith:Zs,omit:sc,omitBy:function(t,n){return cc(t,Xu(ms(n)))},pick:Uc,pickBy:cc,result:function(t,n,r){var e=-1,i=(n=yr(n,t)).length;for(i||(i=1,t=void 0);++e<i;){var s=null==t?void 0:t[mr(n[e])];void 0===s&&(e=i,s=r),t=U(s)?s.call(t):s}return t},set:function(t,n,r){return null==t?t:oc(t,n,r)},setWith:function(t,n,r,e){return e="function"==typeof e?e:void 0,null==t?t:oc(t,n,r,e)},toPairs:ho,toPairsIn:vo,transform:function(t,n,r){var e=k(t),i=e||_n(t)||Bn(t);if(n=ms(n),null==r){var s=t&&t.constructor;r=i?e?new s:[]:S(t)&&U(s)?ut(_r(t)):{}}return(i?Bt:ks)(t,(function(t,e,i){return n(r,t,e,i)})),r},unset:function(t,n){return null==t||ec(t,n)},update:function(t,n,r){return null==t?t:ba(t,n,io(r))},updateWith:function(t,n,r,e){return e="function"==typeof e?e:void 0,null==t?t:ba(t,n,io(r),e)},values:ru,valuesIn:function(t){return null==t?[]:nu(t,Gn(t))}},Ba={at:ga,chain:We,commit:function(){return new xt(this.value(),this.m)},lodash:qt,next:function(){void 0===this.k&&(this.k=nc(this.value()));var t=this.j>=this.k.length;return{done:t,value:t?void 0:this.k[this.j++]}},plant:function(t){for(var n,r=this;r instanceof dt;){var e=kt(r);e.j=0,e.k=void 0,n?i.i=e:n=e;var i=e;r=r.i}return i.i=t,n},reverse:function(){var t=this.i;if(t instanceof pt){var n=t;return this.o.length&&(n=new pt(this)),(n=n.reverse()).o.push({func:Kl,args:[vl],thisArg:void 0}),new xt(n,this.m)}return this.thru(vl)},tap:function(t,n){return n(t),t},thru:Kl,toIterator:function(){return this},toJSON:Jl,value:Jl,valueOf:Jl,wrapperChain:function(){return We(this)}},Ca={camelCase:He,capitalize:ue,deburr:ve,endsWith:function(t,n,r){t=br(t),n=O(n);var e=t.length,i=r=void 0===r?e:Ge(H(r),0,e);return(r-=n.length)>=0&&t.slice(r,i)==n},escape:mo,escapeRegExp:function(t){return(t=br(t))&&wo.test(t)?t.replace(go,"\\$&"):t},kebabCase:Iu,lowerCase:Vu,lowerFirst:Hu,pad:function(t,n,r){t=br(t);var e=(n=H(n))?Sc(t):0;if(!n||e>=n)return t;var i=(n-e)/2;return Rc(Bc(i),r)+t+Rc(Ic(i),r)},padEnd:function(t,n,r){t=br(t);var e=(n=H(n))?Sc(t):0;return n&&e<n?t+Rc(n-e,r):t},padStart:function(t,n,r){t=br(t);var e=(n=H(n))?Sc(t):0;return n&&e<n?Rc(n-e,r)+t:t},parseInt:function(t,n,r){return r||null==n?n=0:n&&(n=+n),Dc(br(t).replace(Cc,""),n||0)},repeat:function(t,n,r){return n=(r?pn(t,n,r):void 0===n)?1:H(n),gc(br(t),n)},replace:function(){var t=arguments,n=br(t[0]);return t.length<3?n:n.replace(t[1],t[2])},snakeCase:jl,split:function(t,n,r){return r&&"number"!=typeof r&&pn(t,n,r)&&(n=r=void 0),(r=void 0===r?4294967295:r>>>0)?(t=br(t))&&("string"==typeof n||null!=n&&!Su(n))&&!(n=O(n))&&Zr(t)?Ur(ie(t),0,r):t.split(n,r):[]},startCase:Ll,startsWith:function(t,n,r){return t=br(t),r=null==r?0:Ge(H(r),0,t.length),n=O(n),t.slice(r,r+n.length)==n},template:function(t,n,r){var e=Dl.imports._.templateSettings||Dl;r&&pn(t,n,r)&&(n=void 0),t=br(t),n=Yn({},n,e,Rl);var i,s,o=Yn({},n.imports,e.imports,Rl),u=Pn(o),c=nu(o,u),l=0,a=n.interpolate||Zl,f="__p += '",h=RegExp((n.escape||Zl).source+"|"+a.source+"|"+(a===Cl?Pl:Zl).source+"|"+(n.evaluate||Zl).source+"|$","g"),v=zl.call(n,"sourceURL")?"//# sourceURL="+(n.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(h,(function(n,r,e,o,u,c){return e||(e=o),f+=t.slice(l,c).replace(Wl,Bl),r&&(i=!0,f+="' +\n__e("+r+") +\n'"),u&&(s=!0,f+="';\n"+u+";\n__p += '"),e&&(f+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),l=c+n.length,n})),f+="';\n";var d=zl.call(n,"variable")&&n.variable;if(d){if(Ul.test(d))throw new Error("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(Vl,""):f).replace(Hl,"$1").replace(Fl,"$1;"),f="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var p=Br((function(){return Function(u,v+"return "+f).apply(void 0,c)}));if(p.source=f,Ir(p))throw p;return p},templateSettings:Dl,toLower:function(t){return br(t).toLowerCase()},toUpper:function(t){return br(t).toUpperCase()},trim:function(t,n,r){if((t=br(t))&&(r||void 0===n))return $(t);if(!t||!(n=O(n)))return t;var e=ie(t),i=ie(n);return Ur(e,na(e,i),ta(e,i)+1).join("")},trimEnd:function(t,n,r){if((t=br(t))&&(r||void 0===n))return t.slice(0,T(t)+1);if(!t||!(n=O(n)))return t;var e=ie(t);return Ur(e,0,ta(e,ie(n))+1).join("")},trimStart:function(t,n,r){if((t=br(t))&&(r||void 0===n))return t.replace(ra,"");if(!t||!(n=O(n)))return t;var e=ie(t);return Ur(e,na(e,ie(n))).join("")},truncate:function(t,n){var r=30,e="...";if(S(n)){var i="separator"in n?n.separator:i;r="length"in n?H(n.length):r,e="omission"in n?O(n.omission):e}var s=(t=br(t)).length;if(Zr(t)){var o=ie(t);s=o.length}if(r>=s)return t;var u=r-Sc(e);if(u<1)return e;var c=o?Ur(o,0,u).join(""):t.slice(0,u);if(void 0===i)return c+e;if(o&&(u+=c.length-u),Su(i)){if(t.slice(u).search(i)){var l,a=c;for(i.global||(i=RegExp(i.source,br(ea.exec(i))+"g")),i.lastIndex=0;l=i.exec(a);)var f=l.index;c=c.slice(0,void 0===f?u:f)}}else if(t.indexOf(O(i),u)!=u){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+e},unescape:function(t){return(t=br(t))&&oa.test(t)?t.replace(sa,ia):t},upperCase:ya,upperFirst:oe,words:Ce},Da={attempt:Br,bindAll:Vr,cond:function(t){var n=null==t?0:t.length,r=ms;return t=n?j(t,(function(t){if("function"!=typeof t[1])throw new TypeError("Expected a function");return[r(t[0]),t[1]]})):[],hn((function(r){for(var e=-1;++e<n;){var i=t[e];if(lt(i[0],this,r))return lt(i[1],this,r)}}))},conforms:function(t){return function(t){var n=Pn(t);return function(r){return gs(r,t,n)}}(Pi(t,1))},constant:St,defaultTo:function(t,n){return null==t||t!=t?n:t},flow:Ho,flowRight:Fo,identity:F,iteratee:function(t){return ms("function"==typeof t?t:Pi(t,1))},matches:function(t){return fs(Pi(t,1))},matchesProperty:function(t,n){return ps(t,Pi(n,1))},method:Gu,methodOf:Qu,mixin:Yu,noop:bt,nthArg:function(t){return t=H(t),hn((function(n){return rc(n,t)}))},over:hc,overEvery:bc,overSome:yc,property:ys,propertyOf:function(t){return function(n){return null==t?void 0:gr(t,n)}},range:ul,rangeRight:cl,stubArray:ii,stubFalse:qn,stubObject:function(){return{}},stubString:function(){return""},stubTrue:function(){return!0},times:function(t,n){if((t=H(t))<1||t>9007199254740991)return[];var r=Gl,e=Ql(t,Gl);n=io(n),t-=Gl;for(var i=gn(e,n);++r<t;)n(r);return i},toPath:function(t){return k(t)?j(t,mr):w(t)?[t]:jt(pr(br(t)))},uniqueId:function(t){var n=++ha;return br(t)+n}};var Va=Math.max,Ha=Math.min;var Fa=Math.min;
2
+ /**
3
+ * @license
4
+ * Lodash (Custom Build) <https://lodash.com/>
5
+ * Build: `lodash modularize exports="es" -o ./`
6
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
7
+ * Released under MIT license <https://lodash.com/license>
8
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
9
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
10
+ */
11
+ var Ua,Pa=4294967295,Za=Array.prototype,Wa=Object.prototype.hasOwnProperty,za=f?f.iterator:void 0,Ka=Math.max,Ga=Math.min,Qa=function(t){return function(n,r,e){if(null==e){var i=S(r),s=i&&Pn(r),o=s&&s.length&&Uo(r,s);(o?o.length:i)||(e=r,r=n,n=this)}return t(n,r,e)}}(Yu);qt.after=Ta.after,qt.ary=Ta.ary,qt.assign=Ia.assign,qt.assignIn=Ia.assignIn,qt.assignInWith=Ia.assignInWith,qt.assignWith=Ia.assignWith,qt.at=Ia.at,qt.before=Ta.before,qt.bind=Ta.bind,qt.bindAll=Da.bindAll,qt.bindKey=Ta.bindKey,qt.castArray=La.castArray,qt.chain=Ba.chain,qt.chunk=Ma.chunk,qt.compact=Ma.compact,qt.concat=Ma.concat,qt.cond=Da.cond,qt.conforms=Da.conforms,qt.constant=Da.constant,qt.countBy=Ea.countBy,qt.create=Ia.create,qt.curry=Ta.curry,qt.curryRight=Ta.curryRight,qt.debounce=Ta.debounce,qt.defaults=Ia.defaults,qt.defaultsDeep=Ia.defaultsDeep,qt.defer=Ta.defer,qt.delay=Ta.delay,qt.difference=Ma.difference,qt.differenceBy=Ma.differenceBy,qt.differenceWith=Ma.differenceWith,qt.drop=Ma.drop,qt.dropRight=Ma.dropRight,qt.dropRightWhile=Ma.dropRightWhile,qt.dropWhile=Ma.dropWhile,qt.fill=Ma.fill,qt.filter=Ea.filter,qt.flatMap=Ea.flatMap,qt.flatMapDeep=Ea.flatMapDeep,qt.flatMapDepth=Ea.flatMapDepth,qt.flatten=Ma.flatten,qt.flattenDeep=Ma.flattenDeep,qt.flattenDepth=Ma.flattenDepth,qt.flip=Ta.flip,qt.flow=Da.flow,qt.flowRight=Da.flowRight,qt.fromPairs=Ma.fromPairs,qt.functions=Ia.functions,qt.functionsIn=Ia.functionsIn,qt.groupBy=Ea.groupBy,qt.initial=Ma.initial,qt.intersection=Ma.intersection,qt.intersectionBy=Ma.intersectionBy,qt.intersectionWith=Ma.intersectionWith,qt.invert=Ia.invert,qt.invertBy=Ia.invertBy,qt.invokeMap=Ea.invokeMap,qt.iteratee=Da.iteratee,qt.keyBy=Ea.keyBy,qt.keys=Pn,qt.keysIn=Ia.keysIn,qt.map=Ea.map,qt.mapKeys=Ia.mapKeys,qt.mapValues=Ia.mapValues,qt.matches=Da.matches,qt.matchesProperty=Da.matchesProperty,qt.memoize=Ta.memoize,qt.merge=Ia.merge,qt.mergeWith=Ia.mergeWith,qt.method=Da.method,qt.methodOf=Da.methodOf,qt.mixin=Qa,qt.negate=Xu,qt.nthArg=Da.nthArg,qt.omit=Ia.omit,qt.omitBy=Ia.omitBy,qt.once=Ta.once,qt.orderBy=Ea.orderBy,qt.over=Da.over,qt.overArgs=Ta.overArgs,qt.overEvery=Da.overEvery,qt.overSome=Da.overSome,qt.partial=Ta.partial,qt.partialRight=Ta.partialRight,qt.partition=Ea.partition,qt.pick=Ia.pick,qt.pickBy=Ia.pickBy,qt.property=Da.property,qt.propertyOf=Da.propertyOf,qt.pull=Ma.pull,qt.pullAll=Ma.pullAll,qt.pullAllBy=Ma.pullAllBy,qt.pullAllWith=Ma.pullAllWith,qt.pullAt=Ma.pullAt,qt.range=Da.range,qt.rangeRight=Da.rangeRight,qt.rearg=Ta.rearg,qt.reject=Ea.reject,qt.remove=Ma.remove,qt.rest=Ta.rest,qt.reverse=Ma.reverse,qt.sampleSize=Ea.sampleSize,qt.set=Ia.set,qt.setWith=Ia.setWith,qt.shuffle=Ea.shuffle,qt.slice=Ma.slice,qt.sortBy=Ea.sortBy,qt.sortedUniq=Ma.sortedUniq,qt.sortedUniqBy=Ma.sortedUniqBy,qt.split=Ca.split,qt.spread=Ta.spread,qt.tail=Ma.tail,qt.take=Ma.take,qt.takeRight=Ma.takeRight,qt.takeRightWhile=Ma.takeRightWhile,qt.takeWhile=Ma.takeWhile,qt.tap=Ba.tap,qt.throttle=Ta.throttle,qt.thru=Kl,qt.toArray=La.toArray,qt.toPairs=Ia.toPairs,qt.toPairsIn=Ia.toPairsIn,qt.toPath=Da.toPath,qt.toPlainObject=La.toPlainObject,qt.transform=Ia.transform,qt.unary=Ta.unary,qt.union=Ma.union,qt.unionBy=Ma.unionBy,qt.unionWith=Ma.unionWith,qt.uniq=Ma.uniq,qt.uniqBy=Ma.uniqBy,qt.uniqWith=Ma.uniqWith,qt.unset=Ia.unset,qt.unzip=Ma.unzip,qt.unzipWith=Ma.unzipWith,qt.update=Ia.update,qt.updateWith=Ia.updateWith,qt.values=Ia.values,qt.valuesIn=Ia.valuesIn,qt.without=Ma.without,qt.words=Ca.words,qt.wrap=Ta.wrap,qt.xor=Ma.xor,qt.xorBy=Ma.xorBy,qt.xorWith=Ma.xorWith,qt.zip=Ma.zip,qt.zipObject=Ma.zipObject,qt.zipObjectDeep=Ma.zipObjectDeep,qt.zipWith=Ma.zipWith,qt.entries=Ia.toPairs,qt.entriesIn=Ia.toPairsIn,qt.extend=Ia.assignIn,qt.extendWith=Ia.assignInWith,Qa(qt,qt),qt.add=$a.add,qt.attempt=Da.attempt,qt.camelCase=Ca.camelCase,qt.capitalize=Ca.capitalize,qt.ceil=$a.ceil,qt.clamp=Sa,qt.clone=La.clone,qt.cloneDeep=La.cloneDeep,qt.cloneDeepWith=La.cloneDeepWith,qt.cloneWith=La.cloneWith,qt.conformsTo=La.conformsTo,qt.deburr=Ca.deburr,qt.defaultTo=Da.defaultTo,qt.divide=$a.divide,qt.endsWith=Ca.endsWith,qt.eq=La.eq,qt.escape=Ca.escape,qt.escapeRegExp=Ca.escapeRegExp,qt.every=Ea.every,qt.find=Ea.find,qt.findIndex=Ma.findIndex,qt.findKey=Ia.findKey,qt.findLast=Ea.findLast,qt.findLastIndex=Ma.findLastIndex,qt.findLastKey=Ia.findLastKey,qt.floor=$a.floor,qt.forEach=Ea.forEach,qt.forEachRight=Ea.forEachRight,qt.forIn=Ia.forIn,qt.forInRight=Ia.forInRight,qt.forOwn=Ia.forOwn,qt.forOwnRight=Ia.forOwnRight,qt.get=Ia.get,qt.gt=La.gt,qt.gte=La.gte,qt.has=Ia.has,qt.hasIn=Ia.hasIn,qt.head=Ma.head,qt.identity=F,qt.includes=Ea.includes,qt.indexOf=Ma.indexOf,qt.inRange=Na,qt.invoke=Ia.invoke,qt.isArguments=La.isArguments,qt.isArray=k,qt.isArrayBuffer=La.isArrayBuffer,qt.isArrayLike=La.isArrayLike,qt.isArrayLikeObject=La.isArrayLikeObject,qt.isBoolean=La.isBoolean,qt.isBuffer=La.isBuffer,qt.isDate=La.isDate,qt.isElement=La.isElement,qt.isEmpty=La.isEmpty,qt.isEqual=La.isEqual,qt.isEqualWith=La.isEqualWith,qt.isError=La.isError,qt.isFinite=La.isFinite,qt.isFunction=La.isFunction,qt.isInteger=La.isInteger,qt.isLength=La.isLength,qt.isMap=La.isMap,qt.isMatch=La.isMatch,qt.isMatchWith=La.isMatchWith,qt.isNaN=La.isNaN,qt.isNative=La.isNative,qt.isNil=La.isNil,qt.isNull=La.isNull,qt.isNumber=La.isNumber,qt.isObject=S,qt.isObjectLike=La.isObjectLike,qt.isPlainObject=La.isPlainObject,qt.isRegExp=La.isRegExp,qt.isSafeInteger=La.isSafeInteger,qt.isSet=La.isSet,qt.isString=La.isString,qt.isSymbol=La.isSymbol,qt.isTypedArray=La.isTypedArray,qt.isUndefined=La.isUndefined,qt.isWeakMap=La.isWeakMap,qt.isWeakSet=La.isWeakSet,qt.join=Ma.join,qt.kebabCase=Ca.kebabCase,qt.last=Xs,qt.lastIndexOf=Ma.lastIndexOf,qt.lowerCase=Ca.lowerCase,qt.lowerFirst=Ca.lowerFirst,qt.lt=La.lt,qt.lte=La.lte,qt.max=$a.max,qt.maxBy=$a.maxBy,qt.mean=$a.mean,qt.meanBy=$a.meanBy,qt.min=$a.min,qt.minBy=$a.minBy,qt.stubArray=Da.stubArray,qt.stubFalse=Da.stubFalse,qt.stubObject=Da.stubObject,qt.stubString=Da.stubString,qt.stubTrue=Da.stubTrue,qt.multiply=$a.multiply,qt.nth=Ma.nth,qt.noop=Da.noop,qt.now=_a,qt.pad=Ca.pad,qt.padEnd=Ca.padEnd,qt.padStart=Ca.padStart,qt.parseInt=Ca.parseInt,qt.random=Ra,qt.reduce=Ea.reduce,qt.reduceRight=Ea.reduceRight,qt.repeat=Ca.repeat,qt.replace=Ca.replace,qt.result=Ia.result,qt.round=$a.round,qt.sample=Ea.sample,qt.size=Ea.size,qt.snakeCase=Ca.snakeCase,qt.some=Ea.some,qt.sortedIndex=Ma.sortedIndex,qt.sortedIndexBy=Ma.sortedIndexBy,qt.sortedIndexOf=Ma.sortedIndexOf,qt.sortedLastIndex=Ma.sortedLastIndex,qt.sortedLastIndexBy=Ma.sortedLastIndexBy,qt.sortedLastIndexOf=Ma.sortedLastIndexOf,qt.startCase=Ca.startCase,qt.startsWith=Ca.startsWith,qt.subtract=$a.subtract,qt.sum=$a.sum,qt.sumBy=$a.sumBy,qt.template=Ca.template,qt.times=Da.times,qt.toFinite=La.toFinite,qt.toInteger=H,qt.toLength=La.toLength,qt.toLower=Ca.toLower,qt.toNumber=La.toNumber,qt.toSafeInteger=La.toSafeInteger,qt.toString=La.toString,qt.toUpper=Ca.toUpper,qt.trim=Ca.trim,qt.trimEnd=Ca.trimEnd,qt.trimStart=Ca.trimStart,qt.truncate=Ca.truncate,qt.unescape=Ca.unescape,qt.uniqueId=Da.uniqueId,qt.upperCase=Ca.upperCase,qt.upperFirst=Ca.upperFirst,qt.each=Ea.forEach,qt.eachRight=Ea.forEachRight,qt.first=Ma.head,Qa(qt,(Ua={},ks(qt,(function(t,n){Wa.call(qt.prototype,n)||(Ua[n]=t)})),Ua),{chain:!1}),qt.VERSION="4.17.21",(qt.templateSettings=Ca.templateSettings).imports._=qt,Bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){qt[t].placeholder=qt})),Bt(["drop","take"],(function(t,n){pt.prototype[t]=function(r){r=void 0===r?1:Ka(H(r),0);var e=this.l&&!n?new pt(this):this.clone();return e.l?e.v=Ga(r,e.v):e.p.push({size:Ga(r,Pa),type:t+(e.u<0?"Right":"")}),e},pt.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}})),Bt(["filter","map","takeWhile"],(function(t,n){var r=n+1,e=1==r||3==r;pt.prototype[t]=function(t){var n=this.clone();return n.h.push({iteratee:ms(t),type:r}),n.l=n.l||e,n}})),Bt(["head","last"],(function(t,n){var r="take"+(n?"Right":"");pt.prototype[t]=function(){return this[r](1).value()[0]}})),Bt(["initial","tail"],(function(t,n){var r="drop"+(n?"":"Right");pt.prototype[t]=function(){return this.l?new pt(this):this[r](1)}})),pt.prototype.compact=function(){return this.filter(F)},pt.prototype.find=function(t){return this.filter(t).head()},pt.prototype.findLast=function(t){return this.reverse().find(t)},pt.prototype.invokeMap=hn((function(t,n){return"function"==typeof t?new pt(this):this.map((function(r){return gu(r,t,n)}))})),pt.prototype.reject=function(t){return this.filter(Xu(ms(t)))},pt.prototype.slice=function(t,n){t=H(t);var r=this;return r.l&&(t>0||n<0)?new pt(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),void 0!==n&&(r=(n=H(n))<0?r.dropRight(-n):r.take(n-t)),r)},pt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},pt.prototype.toArray=function(){return this.take(Pa)},ks(pt.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),i=qt[e?"take"+("last"==n?"Right":""):n],s=e||/^find/.test(n);i&&(qt.prototype[n]=function(){var n=this.i,o=e?[1]:arguments,u=n instanceof pt,c=o[0],l=u||k(n),a=function(t){var n=i.apply(qt,jr([t],o));return e&&f?n[0]:n};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.m,h=!!this.o.length,v=s&&!f,d=u&&!h;if(!s&&l){n=d?n:new pt(this);var p=t.apply(n,o);return p.o.push({func:Kl,args:[a],thisArg:void 0}),new xt(p,f)}return v&&d?t.apply(this,o):(p=this.thru(a),v?e?p.value()[0]:p.value():p)})})),Bt(["pop","push","shift","sort","splice","unshift"],(function(t){var n=Za[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);qt.prototype[t]=function(){var t=arguments;if(e&&!this.m){var i=this.value();return n.apply(k(i)?i:[],t)}return this[r]((function(r){return n.apply(k(r)?r:[],t)}))}})),ks(pt.prototype,(function(t,n){var r=qt[n];if(r){var e=r.name+"";Wa.call(mt,e)||(mt[e]=[]),mt[e].push({name:n,func:r})}})),mt[Yt(void 0,2).name]=[{name:"wrapper",func:void 0}],pt.prototype.clone=function(){var t=new pt(this.i);return t.o=jt(this.o),t.u=this.u,t.l=this.l,t.h=jt(this.h),t.v=this.v,t.p=jt(this.p),t},pt.prototype.reverse=function(){if(this.l){var t=new pt(this);t.u=-1,t.l=!0}else(t=this.clone()).u*=-1;return t},pt.prototype.value=function(){var t=this.i.value(),n=this.u,r=k(t),e=n<0,i=r?t.length:0,s=function(t,n,r){for(var e=-1,i=r.length;++e<i;){var s=r[e],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":n-=o;break;case"take":n=Ha(n,t+o);break;case"takeRight":t=Va(t,n-o)}}return{start:t,end:n}}(0,i,this.p),o=s.start,u=s.end,c=u-o,l=e?u:o-1,a=this.h,f=a.length,h=0,v=Fa(c,this.v);if(!r||!e&&i==c&&v==c)return Yl(t,this.o);var d=[];t:for(;c--&&h<v;){for(var p=-1,b=t[l+=n];++p<f;){var y=a[p],m=y.iteratee,g=y.type,w=m(b);if(2==g)b=w;else if(!w){if(1==g)continue t;break t}}d[h++]=b}return d},qt.prototype.at=Ba.at,qt.prototype.chain=Ba.wrapperChain,qt.prototype.commit=Ba.commit,qt.prototype.next=Ba.next,qt.prototype.plant=Ba.plant,qt.prototype.reverse=Ba.reverse,qt.prototype.toJSON=qt.prototype.valueOf=qt.prototype.value=Ba.value,qt.prototype.first=qt.prototype.head,za&&(qt.prototype[za]=Ba.toIterator);var Ya=(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",t))(Ya||{});class Ja{constructor(t,n,r={}){this.attrName=t,this.keyName=n;const e=Ya.TYPE&Ya.ATTRIBUTE;this.scope=null!=r.scope?r.scope&Ya.LEVEL|e:Ya.ATTRIBUTE,null!=r.whitelist&&(this.whitelist=r.whitelist)}static keys(t){return Array.from(t.attributes).map((t=>t.name))}add(t,n){return!!this.canAdd(t,n)&&(t.setAttribute(this.keyName,n),!0)}canAdd(t,n){return null==this.whitelist||("string"==typeof n?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1)}remove(t){t.removeAttribute(this.keyName)}value(t){const n=t.getAttribute(this.keyName);return this.canAdd(t,n)&&n?n:""}}class Xa extends Error{constructor(t){super(t="[Parchment] "+t),this.message=t,this.name=this.constructor.name}}const tf=class t{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,n=!1){if(null==t)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(n){let r=null;try{r=t.parentNode}catch{return null}return this.find(r,n)}return null}create(n,r,e){const i=this.query(r);if(null==i)throw new Xa(`Unable to create ${r} blot`);const s=i,o=r instanceof Node||r.nodeType===Node.TEXT_NODE?r:s.create(e),u=new s(n,o,e);return t.blots.set(u.domNode,u),u}find(n,r=!1){return t.find(n,r)}query(t,n=Ya.ANY){let r;return"string"==typeof t?r=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?r=this.types.text:"number"==typeof t?t&Ya.LEVEL&Ya.BLOCK?r=this.types.block:t&Ya.LEVEL&Ya.INLINE&&(r=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some((t=>(r=this.classes[t],!!r))),r=r||this.tags[t.tagName]),null==r?null:"scope"in r&&n&Ya.LEVEL&r.scope&&n&Ya.TYPE&r.scope?r:null}register(...t){return t.map((t=>{const n="blotName"in t,r="attrName"in t;if(!n&&!r)throw new Xa("Invalid definition");if(n&&"abstract"===t.blotName)throw new Xa("Cannot register abstract class");const e=n?t.blotName:r?t.attrName:void 0;return this.types[e]=t,r?"string"==typeof t.keyName&&(this.attributes[t.keyName]=t):n&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map((t=>t.toUpperCase())):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach((n=>{(null==this.tags[n]||null==t.className)&&(this.tags[n]=t)})))),t}))}};tf.blots=new WeakMap;let nf=tf;function rf(t,n){return(t.getAttribute("class")||"").split(/\s+/).filter((t=>0===t.indexOf(`${n}-`)))}const ef=class extends Ja{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map((t=>t.split("-").slice(0,-1).join("-")))}add(t,n){return!!this.canAdd(t,n)&&(this.remove(t),t.classList.add(`${this.keyName}-${n}`),!0)}remove(t){rf(t,this.keyName).forEach((n=>{t.classList.remove(n)})),0===t.classList.length&&t.removeAttribute("class")}value(t){const n=(rf(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,n)?n:""}};function sf(t){const n=t.split("-"),r=n.slice(1).map((t=>t[0].toUpperCase()+t.slice(1))).join("");return n[0]+r}const of=class extends Ja{static keys(t){return(t.getAttribute("style")||"").split(";").map((t=>t.split(":")[0].trim()))}add(t,n){return!!this.canAdd(t,n)&&(t.style[sf(this.keyName)]=n,!0)}remove(t){t.style[sf(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const n=t.style[sf(this.keyName)];return this.canAdd(t,n)?n:""}};const uf=class{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,n){n?t.add(this.domNode,n)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=nf.find(this.domNode);if(null==t)return;const n=Ja.keys(this.domNode),r=ef.keys(this.domNode),e=of.keys(this.domNode);n.concat(r).concat(e).forEach((n=>{const r=t.scroll.query(n,Ya.ATTRIBUTE);r instanceof Ja&&(this.attributes[r.attrName]=r)}))}copy(t){Object.keys(this.attributes).forEach((n=>{const r=this.attributes[n].value(this.domNode);t.format(n,r)}))}move(t){this.copy(t),Object.keys(this.attributes).forEach((t=>{this.attributes[t].remove(this.domNode)})),this.attributes={}}values(){return Object.keys(this.attributes).reduce(((t,n)=>(t[n]=this.attributes[n].value(this.domNode),t)),{})}},cf=class{constructor(t,n){this.scroll=t,this.domNode=n,nf.blots.set(n,this),this.prev=null,this.next=null}static create(t){if(null==this.tagName)throw new Xa("Blot definition missing tagName");let n,r;return Array.isArray(this.tagName)?("string"==typeof t?(r=t.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):"number"==typeof t&&(r=t),n="number"==typeof r?document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?document.createElement(r):document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){null!=this.parent&&this.parent.removeChild(this),nf.blots.delete(this.domNode)}deleteAt(t,n){this.isolate(t,n).remove()}formatAt(t,n,r,e){const i=this.isolate(t,n);if(null!=this.scroll.query(r,Ya.BLOT)&&e)i.wrap(r,e);else if(null!=this.scroll.query(r,Ya.ATTRIBUTE)){const t=this.scroll.create(this.statics.scope);i.wrap(t),t.format(r,e)}}insertAt(t,n,r){const e=null==r?this.scroll.create("text",n):this.scroll.create(n,r),i=this.split(t);this.parent.insertBefore(e,i||void 0)}isolate(t,n){const r=this.split(t);if(null==r)throw new Error("Attempt to isolate at end");return r.split(n),r}length(){return 1}offset(t=this.parent){return null==this.parent||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,n){const r="string"==typeof t?this.scroll.create(t,n):t;return null!=this.parent&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(t,n){return 0===t?this:this.next}update(t,n){}wrap(t,n){const r="string"==typeof t?this.scroll.create(t,n):t;if(null!=this.parent&&this.parent.insertBefore(r,this.next||void 0),"function"!=typeof r.appendChild)throw new Xa(`Cannot wrap ${t}`);return r.appendChild(this),r}};cf.blotName="abstract";let lf=cf;const af=class extends lf{static value(t){return!0}index(t,n){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(t,n){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};af.scope=Ya.INLINE_BLOT;const ff=af;class hf{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const n=t.slice(1);this.append(...n)}}at(t){const n=this.iterator();let r=n();for(;r&&t>0;)t-=1,r=n();return r}contains(t){const n=this.iterator();let r=n();for(;r;){if(r===t)return!0;r=n()}return!1}indexOf(t){const n=this.iterator();let r=n(),e=0;for(;r;){if(r===t)return e;e+=1,r=n()}return-1}insertBefore(t,n){null!=t&&(this.remove(t),t.next=n,null!=n?(t.prev=n.prev,null!=n.prev&&(n.prev.next=t),n.prev=t,n===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)}offset(t){let n=0,r=this.head;for(;null!=r;){if(r===t)return n;n+=r.length(),r=r.next}return-1}remove(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)}iterator(t=this.head){return()=>{const n=t;return null!=t&&(t=t.next),n}}find(t,n=!1){const r=this.iterator();let e=r();for(;e;){const i=e.length();if(t<i||n&&t===i&&(null==e.next||0!==e.next.length()))return[e,t];t-=i,e=r()}return[null,0]}forEach(t){const n=this.iterator();let r=n();for(;r;)t(r),r=n()}forEachAt(t,n,r){if(n<=0)return;const[e,i]=this.find(t);let s=t-i;const o=this.iterator(e);let u=o();for(;u&&s<t+n;){const e=u.length();t>s?r(u,t-s,Math.min(n,s+e-t)):r(u,0,Math.min(e,t+n-s)),s+=e,u=o()}}map(t){return this.reduce(((n,r)=>(n.push(t(r)),n)),[])}reduce(t,n){const r=this.iterator();let e=r();for(;e;)n=t(n,e),e=r();return n}}function vf(t,n){const r=n.find(t);if(r)return r;try{return n.create(t)}catch{const r=n.create(Ya.INLINE);return Array.from(t.childNodes).forEach((t=>{r.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(r.domNode,t),r.attach(),r}}const df=class t extends lf{constructor(t,n){super(t,n),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach((t=>{t.attach()}))}attachUI(n){null!=this.uiNode&&this.uiNode.remove(),this.uiNode=n,t.uiClass&&this.uiNode.classList.add(t.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new hf,Array.from(this.domNode.childNodes).filter((t=>t!==this.uiNode)).reverse().forEach((t=>{try{const n=vf(t,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(t){if(t instanceof Xa)return;throw t}}))}deleteAt(t,n){if(0===t&&n===this.length())return this.remove();this.children.forEachAt(t,n,((t,n,r)=>{t.deleteAt(n,r)}))}descendant(n,r=0){const[e,i]=this.children.find(r);return null==n.blotName&&n(e)||null!=n.blotName&&e instanceof n?[e,i]:e instanceof t?e.descendant(n,i):[null,-1]}descendants(n,r=0,e=Number.MAX_VALUE){let i=[],s=e;return this.children.forEachAt(r,e,((r,e,o)=>{(null==n.blotName&&n(r)||null!=n.blotName&&r instanceof n)&&i.push(r),r instanceof t&&(i=i.concat(r.descendants(n,e,s))),s-=o})),i}detach(){this.children.forEach((t=>{t.detach()})),super.detach()}enforceAllowedChildren(){let n=!1;this.children.forEach((r=>{n||this.statics.allowedChildren.some((t=>r instanceof t))||(r.statics.scope===Ya.BLOCK_BLOT?(null!=r.next&&this.splitAfter(r),null!=r.prev&&this.splitAfter(r.prev),r.parent.unwrap(),n=!0):r instanceof t?r.unwrap():r.remove())}))}formatAt(t,n,r,e){this.children.forEachAt(t,n,((t,n,i)=>{t.formatAt(n,i,r,e)}))}insertAt(t,n,r){const[e,i]=this.children.find(t);if(e)e.insertAt(i,n,r);else{const t=null==r?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(t)}}insertBefore(t,n){null!=t.parent&&t.parent.children.remove(t);let r=null;this.children.insertBefore(t,n||null),t.parent=this,null!=n&&(r=n.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(t.domNode,r),t.attach()}length(){return this.children.reduce(((t,n)=>t+n.length()),0)}moveChildren(t,n){this.children.forEach((r=>{t.insertBefore(r,n)}))}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(n,r=!1){const[e,i]=this.children.find(n,r),s=[[this,n]];return e instanceof t?s.concat(e.path(i,r)):(null!=e&&s.push([e,i]),s)}removeChild(t){this.children.remove(t)}replaceWith(n,r){const e="string"==typeof n?this.scroll.create(n,r):n;return e instanceof t&&this.moveChildren(e),super.replaceWith(e)}split(t,n=!1){if(!n){if(0===t)return this;if(t===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(t,this.length(),((t,e,i)=>{const s=t.split(e,n);null!=s&&r.appendChild(s)})),r}splitAfter(t){const n=this.clone();for(;null!=t.next;)n.appendChild(t.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,n){const r=[],e=[];t.forEach((t=>{t.target===this.domNode&&"childList"===t.type&&(r.push(...t.addedNodes),e.push(...t.removedNodes))})),e.forEach((t=>{if(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const n=this.scroll.find(t);null!=n&&(null==n.domNode.parentNode||n.domNode.parentNode===this.domNode)&&n.detach()})),r.filter((t=>t.parentNode===this.domNode&&t!==this.uiNode)).sort(((t,n)=>t===n?0:t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1)).forEach((t=>{let n=null;null!=t.nextSibling&&(n=this.scroll.find(t.nextSibling));const r=vf(t,this.scroll);(r.next!==n||null==r.next)&&(null!=r.parent&&r.parent.removeChild(this),this.insertBefore(r,n||void 0))})),this.enforceAllowedChildren()}};df.uiClass="";const pf=df;const bf=class t extends pf{static create(t){return super.create(t)}static formats(n,r){const e=r.query(t.blotName);if(null==e||n.tagName!==e.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return n.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new uf(this.domNode)}format(n,r){if(n!==this.statics.blotName||r){const t=this.scroll.query(n,Ya.INLINE);if(null==t)return;t instanceof Ja?this.attributes.attribute(t,r):r&&(n!==this.statics.blotName||this.formats()[n]!==r)&&this.replaceWith(n,r)}else this.children.forEach((n=>{n instanceof t||(n=n.wrap(t.blotName,!0)),this.attributes.copy(n)})),this.unwrap()}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return null!=n&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,e){null!=this.formats()[r]||this.scroll.query(r,Ya.ATTRIBUTE)?this.isolate(t,n).format(r,e):super.formatAt(t,n,r,e)}optimize(n){super.optimize(n);const r=this.formats();if(0===Object.keys(r).length)return this.unwrap();const e=this.next;e instanceof t&&e.prev===this&&function(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}(r,e.formats())&&(e.moveChildren(this),e.remove())}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some((t=>t.target===this.domNode&&"attributes"===t.type))&&this.attributes.build()}wrap(n,r){const e=super.wrap(n,r);return e instanceof t&&this.attributes.move(e),e}};bf.allowedChildren=[bf,ff],bf.blotName="inline",bf.scope=Ya.INLINE_BLOT,bf.tagName="SPAN";const yf=bf,mf=class t extends pf{static create(t){return super.create(t)}static formats(n,r){const e=r.query(t.blotName);if(null==e||n.tagName!==e.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return n.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new uf(this.domNode)}format(n,r){const e=this.scroll.query(n,Ya.BLOCK);null!=e&&(e instanceof Ja?this.attributes.attribute(e,r):n!==this.statics.blotName||r?r&&(n!==this.statics.blotName||this.formats()[n]!==r)&&this.replaceWith(n,r):this.replaceWith(t.blotName))}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return null!=n&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,e){null!=this.scroll.query(r,Ya.BLOCK)?this.format(r,e):super.formatAt(t,n,r,e)}insertAt(t,n,r){if(null==r||null!=this.scroll.query(n,Ya.INLINE))super.insertAt(t,n,r);else{const e=this.split(t);if(null==e)throw new Error("Attempt to insertAt after block boundaries");{const t=this.scroll.create(n,r);e.parent.insertBefore(t,e)}}}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some((t=>t.target===this.domNode&&"attributes"===t.type))&&this.attributes.build()}};mf.blotName="block",mf.scope=Ya.BLOCK_BLOT,mf.tagName="P",mf.allowedChildren=[yf,mf,ff];const gf=mf,wf=class extends pf{checkMerge(){return null!==this.next&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,n){super.deleteAt(t,n),this.enforceAllowedChildren()}formatAt(t,n,r,e){super.formatAt(t,n,r,e),this.enforceAllowedChildren()}insertAt(t,n,r){super.insertAt(t,n,r),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};wf.blotName="container",wf.scope=Ya.BLOCK_BLOT;const xf=wf;const jf=class extends ff{static formats(t,n){}format(t,n){super.formatAt(0,this.length(),t,n)}formatAt(t,n,r,e){0===t&&n===this.length()?this.format(r,e):super.formatAt(t,n,r,e)}formats(){return this.statics.formats(this.domNode,this.scroll)}},kf={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},Af=class extends pf{constructor(t,n){super(null,n),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver((t=>{this.update(t)})),this.observer.observe(this.domNode,kf),this.attach()}create(t,n){return this.registry.create(this,t,n)}find(t,n=!1){const r=this.registry.find(t,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(t,n=Ya.ANY){return this.registry.query(t,n)}register(...t){return this.registry.register(...t)}build(){null!=this.scroll&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,n){this.update(),0===t&&n===this.length()?this.children.forEach((t=>{t.remove()})):super.deleteAt(t,n)}formatAt(t,n,r,e){this.update(),super.formatAt(t,n,r,e)}insertAt(t,n,r){this.update(),super.insertAt(t,n,r)}optimize(t=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let e=Array.from(this.observer.takeRecords());for(;e.length>0;)t.push(e.pop());const i=(t,n=!0)=>{null==t||t===this||null!=t.domNode.parentNode&&(r.has(t.domNode)||r.set(t.domNode,[]),n&&i(t.parent))},s=t=>{r.has(t.domNode)&&(t instanceof pf&&t.children.forEach(s),r.delete(t.domNode),t.optimize(n))};let o=t;for(let n=0;o.length>0;n+=1){if(n>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(o.forEach((t=>{const n=this.find(t.target,!0);null!=n&&(n.domNode===t.target&&("childList"===t.type?(i(this.find(t.previousSibling,!1)),Array.from(t.addedNodes).forEach((t=>{const n=this.find(t,!1);i(n,!1),n instanceof pf&&n.children.forEach((t=>{i(t,!1)}))}))):"attributes"===t.type&&i(n.prev)),i(n))})),this.children.forEach(s),o=Array.from(this.observer.takeRecords()),e=o.slice();e.length>0;)t.push(e.pop())}}update(t,n={}){t=t||this.observer.takeRecords();const r=new WeakMap;t.map((t=>{const n=this.find(t.target,!0);return null==n?null:r.has(n.domNode)?(r.get(n.domNode).push(t),null):(r.set(n.domNode,[t]),n)})).forEach((t=>{null!=t&&t!==this&&r.has(t.domNode)&&t.update(r.get(t.domNode)||[],n)})),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(t,n)}};Af.blotName="scroll",Af.defaultChild=gf,Af.allowedChildren=[gf,xf],Af.scope=Ya.BLOCK_BLOT,Af.tagName="DIV";const qf=Af,Of=class t extends ff{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,n){super(t,n),this.text=this.statics.value(this.domNode)}deleteAt(t,n){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+n)}index(t,n){return this.domNode===t?n:-1}insertAt(t,n,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,n,r)}length(){return this.text.length}optimize(n){super.optimize(n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,n=!1){return[this.domNode,t]}split(t,n=!1){if(!n){if(0===t)return this;if(t===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(t,n){t.some((t=>"characterData"===t.type&&t.target===this.domNode))&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Of.blotName="text",Of.scope=Ya.INLINE_BLOT;const Mf=Of;var Ef=Object.freeze({__proto__:null,Attributor:Ja,AttributorStore:uf,BlockBlot:gf,ClassAttributor:ef,ContainerBlot:xf,EmbedBlot:jf,InlineBlot:yf,LeafBlot:ff,ParentBlot:pf,Registry:nf,Scope:Ya,ScrollBlot:qf,StyleAttributor:of,TextBlot:Mf}),_f={exports:{}},Tf=-1;function Lf(t,n,r,e,i){if(t===n)return t?[[0,t]]:[];if(null!=r){var s=function(t,n,r){var e="number"==typeof r?{index:r,length:0}:r.oldRange,i="number"==typeof r?null:r.newRange,s=t.length,o=n.length;if(0===e.length&&(null===i||0===i.length)){var u=e.index,c=t.slice(0,u),l=t.slice(u),a=i?i.index:null,f=u+o-s;if((null===a||a===f)&&!(f<0||f>o)){var h=n.slice(0,f);if((p=n.slice(f))===l){var v=Math.min(u,f);if((y=c.slice(0,v))===(g=h.slice(0,v)))return Wf(y,c.slice(v),h.slice(v),l)}}if(null===a||a===u){var d=u,p=(h=n.slice(0,d),n.slice(d));if(h===c){var b=Math.min(s-d,o-d);if((m=l.slice(l.length-b))===(w=p.slice(p.length-b)))return Wf(c,l.slice(0,l.length-b),p.slice(0,p.length-b),m)}}}if(e.length>0&&i&&0===i.length){var y=t.slice(0,e.index),m=t.slice(e.index+e.length);if(!(o<(v=y.length)+(b=m.length))){var g=n.slice(0,v),w=n.slice(o-b);if(y===g&&m===w)return Wf(y,t.slice(v,s-b),n.slice(v,o-b),m)}}return null}(t,n,r);if(s)return s}var o=Sf(t,n),u=t.substring(0,o);o=Rf(t=t.substring(o),n=n.substring(o));var c=t.substring(t.length-o),l=function(t,n){var r;if(!t)return[[1,n]];if(!n)return[[Tf,t]];var e=t.length>n.length?t:n,i=t.length>n.length?n:t,s=e.indexOf(i);if(-1!==s)return r=[[1,e.substring(0,s)],[0,i],[1,e.substring(s+i.length)]],t.length>n.length&&(r[0][0]=r[2][0]=Tf),r;if(1===i.length)return[[Tf,t],[1,n]];var o=function(t,n){var r=t.length>n.length?t:n,e=t.length>n.length?n:t;if(r.length<4||2*e.length<r.length)return null;function i(t,n,r){for(var e,i,s,o,u=t.substring(r,r+Math.floor(t.length/4)),c=-1,l="";-1!==(c=n.indexOf(u,c+1));){var a=Sf(t.substring(r),n.substring(c)),f=Rf(t.substring(0,r),n.substring(0,c));l.length<f+a&&(l=n.substring(c-f,c)+n.substring(c,c+a),e=t.substring(0,r-f),i=t.substring(r+a),s=n.substring(0,c-f),o=n.substring(c+a))}return 2*l.length>=t.length?[e,i,s,o,l]:null}var s,o,u,c,l,a=i(r,e,Math.ceil(r.length/4)),f=i(r,e,Math.ceil(r.length/2));if(!a&&!f)return null;s=f?a&&a[4].length>f[4].length?a:f:a;t.length>n.length?(o=s[0],u=s[1],c=s[2],l=s[3]):(c=s[0],l=s[1],o=s[2],u=s[3]);var h=s[4];return[o,u,c,l,h]}(t,n);if(o){var u=o[0],c=o[1],l=o[2],a=o[3],f=o[4],h=Lf(u,l),v=Lf(c,a);return h.concat([[0,f]],v)}return function(t,n){for(var r=t.length,e=n.length,i=Math.ceil((r+e)/2),s=i,o=2*i,u=new Array(o),c=new Array(o),l=0;l<o;l++)u[l]=-1,c[l]=-1;u[s+1]=0,c[s+1]=0;for(var a=r-e,f=a%2!=0,h=0,v=0,d=0,p=0,b=0;b<i;b++){for(var y=-b+h;y<=b-v;y+=2){for(var m=s+y,g=(A=y===-b||y!==b&&u[m-1]<u[m+1]?u[m+1]:u[m-1]+1)-y;A<r&&g<e&&t.charAt(A)===n.charAt(g);)A++,g++;if(u[m]=A,A>r)v+=2;else if(g>e)h+=2;else if(f){if((j=s+a-y)>=0&&j<o&&-1!==c[j])if(A>=(x=r-c[j]))return $f(t,n,A,g)}}for(var w=-b+d;w<=b-p;w+=2){for(var x,j=s+w,k=(x=w===-b||w!==b&&c[j-1]<c[j+1]?c[j+1]:c[j-1]+1)-w;x<r&&k<e&&t.charAt(r-x-1)===n.charAt(e-k-1);)x++,k++;if(c[j]=x,x>r)p+=2;else if(k>e)d+=2;else if(!f){if((m=s+a-w)>=0&&m<o&&-1!==u[m]){var A;g=s+(A=u[m])-m;if(A>=(x=r-x))return $f(t,n,A,g)}}}}return[[Tf,t],[1,n]]}(t,n)}(t=t.substring(0,t.length-o),n=n.substring(0,n.length-o));return u&&l.unshift([0,u]),c&&l.push([0,c]),Hf(l,i),e&&function(t){var n=!1,r=[],e=0,i=null,s=0,o=0,u=0,c=0,l=0;for(;s<t.length;)0==t[s][0]?(r[e++]=s,o=c,u=l,c=0,l=0,i=t[s][1]):(1==t[s][0]?c+=t[s][1].length:l+=t[s][1].length,i&&i.length<=Math.max(o,u)&&i.length<=Math.max(c,l)&&(t.splice(r[e-1],0,[Tf,i]),t[r[e-1]+1][0]=1,e--,s=--e>0?r[e-1]:-1,o=0,u=0,c=0,l=0,i=null,n=!0)),s++;n&&Hf(t);(function(t){function n(t,n){if(!t||!n)return 6;var r=t.charAt(t.length-1),e=n.charAt(0),i=r.match(If),s=e.match(If),o=i&&r.match(Bf),u=s&&e.match(Bf),c=o&&r.match(Cf),l=u&&e.match(Cf),a=c&&t.match(Df),f=l&&n.match(Vf);return a||f?5:c||l?4:i&&!o&&u?3:o||u?2:i||s?1:0}var r=1;for(;r<t.length-1;){if(0==t[r-1][0]&&0==t[r+1][0]){var e=t[r-1][1],i=t[r][1],s=t[r+1][1],o=Rf(e,i);if(o){var u=i.substring(i.length-o);e=e.substring(0,e.length-o),i=u+i.substring(0,i.length-o),s=u+s}for(var c=e,l=i,a=s,f=n(e,i)+n(i,s);i.charAt(0)===s.charAt(0);){e+=i.charAt(0),i=i.substring(1)+s.charAt(0),s=s.substring(1);var h=n(e,i)+n(i,s);h>=f&&(f=h,c=e,l=i,a=s)}t[r-1][1]!=c&&(c?t[r-1][1]=c:(t.splice(r-1,1),r--),t[r][1]=l,a?t[r+1][1]=a:(t.splice(r+1,1),r--))}r++}})(t),s=1;for(;s<t.length;){if(t[s-1][0]==Tf&&1==t[s][0]){var a=t[s-1][1],f=t[s][1],h=Nf(a,f),v=Nf(f,a);h>=v?(h>=a.length/2||h>=f.length/2)&&(t.splice(s,0,[0,f.substring(0,h)]),t[s-1][1]=a.substring(0,a.length-h),t[s+1][1]=f.substring(h),s++):(v>=a.length/2||v>=f.length/2)&&(t.splice(s,0,[0,a.substring(0,v)]),t[s-1][0]=1,t[s-1][1]=f.substring(0,f.length-v),t[s+1][0]=Tf,t[s+1][1]=a.substring(v),s++),s++}s++}}(l),l}function $f(t,n,r,e){var i=t.substring(0,r),s=n.substring(0,e),o=t.substring(r),u=n.substring(e),c=Lf(i,s),l=Lf(o,u);return c.concat(l)}function Sf(t,n){if(!t||!n||t.charAt(0)!==n.charAt(0))return 0;for(var r=0,e=Math.min(t.length,n.length),i=e,s=0;r<i;)t.substring(s,i)==n.substring(s,i)?s=r=i:e=i,i=Math.floor((e-r)/2+r);return Ff(t.charCodeAt(i-1))&&i--,i}function Nf(t,n){var r=t.length,e=n.length;if(0==r||0==e)return 0;r>e?t=t.substring(r-e):r<e&&(n=n.substring(0,r));var i=Math.min(r,e);if(t==n)return i;for(var s=0,o=1;;){var u=t.substring(i-o),c=n.indexOf(u);if(-1==c)return s;o+=c,0!=c&&t.substring(i-o)!=n.substring(0,o)||(s=o,o++)}}function Rf(t,n){if(!t||!n||t.slice(-1)!==n.slice(-1))return 0;for(var r=0,e=Math.min(t.length,n.length),i=e,s=0;r<i;)t.substring(t.length-i,t.length-s)==n.substring(n.length-i,n.length-s)?s=r=i:e=i,i=Math.floor((e-r)/2+r);return Uf(t.charCodeAt(t.length-i))&&i--,i}var If=/[^a-zA-Z0-9]/,Bf=/\s/,Cf=/[\r\n]/,Df=/\n\r?\n$/,Vf=/^\r?\n\r?\n/;function Hf(t,n){t.push([0,""]);for(var r,e=0,i=0,s=0,o="",u="";e<t.length;)if(e<t.length-1&&!t[e][1])t.splice(e,1);else switch(t[e][0]){case 1:s++,u+=t[e][1],e++;break;case Tf:i++,o+=t[e][1],e++;break;case 0:var c=e-s-i-1;if(n){if(c>=0&&Zf(t[c][1])){var l=t[c][1].slice(-1);if(t[c][1]=t[c][1].slice(0,-1),o=l+o,u=l+u,!t[c][1]){t.splice(c,1),e--;var a=c-1;t[a]&&1===t[a][0]&&(s++,u=t[a][1]+u,a--),t[a]&&t[a][0]===Tf&&(i++,o=t[a][1]+o,a--),c=a}}if(Pf(t[e][1])){l=t[e][1].charAt(0);t[e][1]=t[e][1].slice(1),o+=l,u+=l}}if(e<t.length-1&&!t[e][1]){t.splice(e,1);break}if(o.length>0||u.length>0){o.length>0&&u.length>0&&(0!==(r=Sf(u,o))&&(c>=0?t[c][1]+=u.substring(0,r):(t.splice(0,0,[0,u.substring(0,r)]),e++),u=u.substring(r),o=o.substring(r)),0!==(r=Rf(u,o))&&(t[e][1]=u.substring(u.length-r)+t[e][1],u=u.substring(0,u.length-r),o=o.substring(0,o.length-r)));var f=s+i;0===o.length&&0===u.length?(t.splice(e-f,f),e-=f):0===o.length?(t.splice(e-f,f,[1,u]),e=e-f+1):0===u.length?(t.splice(e-f,f,[Tf,o]),e=e-f+1):(t.splice(e-f,f,[Tf,o],[1,u]),e=e-f+2)}0!==e&&0===t[e-1][0]?(t[e-1][1]+=t[e][1],t.splice(e,1)):e++,s=0,i=0,o="",u=""}""===t[t.length-1][1]&&t.pop();var h=!1;for(e=1;e<t.length-1;)0===t[e-1][0]&&0===t[e+1][0]&&(t[e][1].substring(t[e][1].length-t[e-1][1].length)===t[e-1][1]?(t[e][1]=t[e-1][1]+t[e][1].substring(0,t[e][1].length-t[e-1][1].length),t[e+1][1]=t[e-1][1]+t[e+1][1],t.splice(e-1,1),h=!0):t[e][1].substring(0,t[e+1][1].length)==t[e+1][1]&&(t[e-1][1]+=t[e+1][1],t[e][1]=t[e][1].substring(t[e+1][1].length)+t[e+1][1],t.splice(e+1,1),h=!0)),e++;h&&Hf(t,n)}function Ff(t){return t>=55296&&t<=56319}function Uf(t){return t>=56320&&t<=57343}function Pf(t){return Uf(t.charCodeAt(0))}function Zf(t){return Ff(t.charCodeAt(t.length-1))}function Wf(t,n,r,e){return Zf(t)||Pf(e)?null:function(t){for(var n=[],r=0;r<t.length;r++)t[r][1].length>0&&n.push(t[r]);return n}([[0,t],[Tf,n],[1,r],[0,e]])}function zf(t,n,r,e){return Lf(t,n,r,e,!0)}zf.INSERT=1,zf.DELETE=Tf,zf.EQUAL=0;var Kf=zf,Gf={exports:{}};!function(t,n){var r="__lodash_hash_undefined__",e=9007199254740991,i="[object Arguments]",s="[object Boolean]",u="[object Date]",c="[object Function]",l="[object GeneratorFunction]",a="[object Map]",f="[object Number]",h="[object Object]",v="[object Promise]",d="[object RegExp]",p="[object Set]",b="[object String]",y="[object Symbol]",m="[object WeakMap]",g="[object ArrayBuffer]",w="[object DataView]",x="[object Float32Array]",j="[object Float64Array]",k="[object Int8Array]",A="[object Int16Array]",q="[object Int32Array]",O="[object Uint8Array]",M="[object Uint8ClampedArray]",E="[object Uint16Array]",_="[object Uint32Array]",T=/\w*$/,L=/^\[object .+?Constructor\]$/,$=/^(?:0|[1-9]\d*)$/,S={};S[i]=S["[object Array]"]=S[g]=S[w]=S[s]=S[u]=S[x]=S[j]=S[k]=S[A]=S[q]=S[a]=S[f]=S[h]=S[d]=S[p]=S[b]=S[y]=S[O]=S[M]=S[E]=S[_]=!0,S["[object Error]"]=S[c]=S[m]=!1;var N="object"==typeof o&&o&&o.Object===Object&&o,R="object"==typeof self&&self&&self.Object===Object&&self,I=N||R||Function("return this")(),B=n&&!n.nodeType&&n,C=B&&t&&!t.nodeType&&t,D=C&&C.exports===B;function V(t,n){return t.set(n[0],n[1]),t}function H(t,n){return t.add(n),t}function F(t,n,r,e){var i=-1,s=t?t.length:0;for(e&&s&&(r=t[++i]);++i<s;)r=n(r,t[i],i,t);return r}function U(t){var n=!1;if(null!=t&&"function"!=typeof t.toString)try{n=!!(t+"")}catch(t){}return n}function P(t){var n=-1,r=Array(t.size);return t.forEach((function(t,e){r[++n]=[e,t]})),r}function Z(t,n){return function(r){return t(n(r))}}function W(t){var n=-1,r=Array(t.size);return t.forEach((function(t){r[++n]=t})),r}var z=Array.prototype,K=Function.prototype,G=Object.prototype,Q=I["t"],Y=function(){var t=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),J=K.toString,X=G.hasOwnProperty,tt=G.toString,nt=RegExp("^"+J.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rt=D?I.Buffer:void 0,et=I.Symbol,it=I.Uint8Array,st=Z(Object.getPrototypeOf,Object),ot=Object.create,ut=G.propertyIsEnumerable,ct=z.splice,lt=Object.getOwnPropertySymbols,at=rt?rt.isBuffer:void 0,ft=Z(Object.keys,Object),ht=Bt(I,"DataView"),vt=Bt(I,"Map"),dt=Bt(I,"Promise"),pt=Bt(I,"Set"),bt=Bt(I,"WeakMap"),yt=Bt(Object,"create"),mt=Ft(ht),gt=Ft(vt),wt=Ft(dt),xt=Ft(pt),jt=Ft(bt),kt=et?et.prototype:void 0,At=kt?kt.valueOf:void 0;function qt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Ot(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Mt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Et(t){this.A=new Ot(t)}function _t(t,n){var r=Pt(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&Zt(t)}(t)&&X.call(t,"callee")&&(!ut.call(t,"callee")||tt.call(t)==i)}(t)?function(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}(t.length,String):[],e=r.length,s=!!e;for(var o in t)!n&&!X.call(t,o)||s&&("length"==o||Vt(o,e))||r.push(o);return r}function Tt(t,n,r){var e=t[n];X.call(t,n)&&Ut(e,r)&&(void 0!==r||n in t)||(t[n]=r)}function Lt(t,n){for(var r=t.length;r--;)if(Ut(t[r][0],n))return r;return-1}function $t(t,n,r,e,o,v,m){var L;if(e&&(L=v?e(t,o,v,m):e(t)),void 0!==L)return L;if(!Kt(t))return t;var $=Pt(t);if($){if(L=function(t){var n=t.length,r=t.constructor(n);n&&"string"==typeof t[0]&&X.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!n)return function(t,n){var r=-1,e=t.length;n||(n=Array(e));for(;++r<e;)n[r]=t[r];return n}(t,L)}else{var N=Dt(t),R=N==c||N==l;if(Wt(t))return function(t,n){if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}(t,n);if(N==h||N==i||R&&!v){if(U(t))return v?t:{};if(L=function(t){return"function"!=typeof t.constructor||Ht(t)?{}:(n=st(t),Kt(n)?ot(n):{});var n}(R?{}:t),!n)return function(t,n){return Rt(t,Ct(t),n)}(t,function(t,n){return t&&Rt(n,Gt(n),t)}(L,t))}else{if(!S[N])return v?t:{};L=function(t,n,r,e){var i=t.constructor;switch(n){case g:return Nt(t);case s:case u:return new i(+t);case w:return function(t,n){var r=n?Nt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,e);case x:case j:case k:case A:case q:case O:case M:case E:case _:return function(t,n){var r=n?Nt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,e);case a:return function(t,n,r){var e=n?r(P(t),!0):P(t);return F(e,V,new t.constructor)}(t,e,r);case f:case b:return new i(t);case d:return function(t){var n=new t.constructor(t.source,T.exec(t));return n.lastIndex=t.lastIndex,n}(t);case p:return function(t,n,r){var e=n?r(W(t),!0):W(t);return F(e,H,new t.constructor)}(t,e,r);case y:return o=t,At?Object(At.call(o)):{}}var o}(t,N,$t,n)}}m||(m=new Et);var I=m.get(t);if(I)return I;if(m.set(t,L),!$)var B=r?function(t){return function(t,n,r){var e=n(t);return Pt(t)?e:function(t,n){for(var r=-1,e=n.length,i=t.length;++r<e;)t[i+r]=n[r];return t}(e,r(t))}(t,Gt,Ct)}(t):Gt(t);return function(t,n){for(var r=-1,e=t?t.length:0;++r<e&&!1!==n(t[r],r,t););}(B||t,(function(i,s){B&&(i=t[s=i]),Tt(L,s,$t(i,n,r,e,s,t,m))})),L}function St(t){return!(!Kt(t)||function(t){return!!Y&&Y in t}(t))&&(zt(t)||U(t)?nt:L).test(Ft(t))}function Nt(t){var n=new t.constructor(t.byteLength);return new it(n).set(new it(t)),n}function Rt(t,n,r,e){r||(r={});for(var i=-1,s=n.length;++i<s;){var o=n[i],u=e?e(r[o],t[o],o,r,t):void 0;Tt(r,o,void 0===u?t[o]:u)}return r}function It(t,n){var r,e,i=t.A;return("string"==(e=typeof(r=n))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==r:null===r)?i["string"==typeof n?"string":"hash"]:i.map}function Bt(t,n){var r=function(t,n){return null==t?void 0:t[n]}(t,n);return St(r)?r:void 0}qt.prototype.clear=function(){this.A=yt?yt(null):{}},qt.prototype.delete=function(t){return this.has(t)&&delete this.A[t]},qt.prototype.get=function(t){var n=this.A;if(yt){var e=n[t];return e===r?void 0:e}return X.call(n,t)?n[t]:void 0},qt.prototype.has=function(t){var n=this.A;return yt?void 0!==n[t]:X.call(n,t)},qt.prototype.set=function(t,n){return this.A[t]=yt&&void 0===n?r:n,this},Ot.prototype.clear=function(){this.A=[]},Ot.prototype.delete=function(t){var n=this.A,r=Lt(n,t);return!(r<0)&&(r==n.length-1?n.pop():ct.call(n,r,1),!0)},Ot.prototype.get=function(t){var n=this.A,r=Lt(n,t);return r<0?void 0:n[r][1]},Ot.prototype.has=function(t){return Lt(this.A,t)>-1},Ot.prototype.set=function(t,n){var r=this.A,e=Lt(r,t);return e<0?r.push([t,n]):r[e][1]=n,this},Mt.prototype.clear=function(){this.A={hash:new qt,map:new(vt||Ot),string:new qt}},Mt.prototype.delete=function(t){return It(this,t).delete(t)},Mt.prototype.get=function(t){return It(this,t).get(t)},Mt.prototype.has=function(t){return It(this,t).has(t)},Mt.prototype.set=function(t,n){return It(this,t).set(t,n),this},Et.prototype.clear=function(){this.A=new Ot},Et.prototype.delete=function(t){return this.A.delete(t)},Et.prototype.get=function(t){return this.A.get(t)},Et.prototype.has=function(t){return this.A.has(t)},Et.prototype.set=function(t,n){var r=this.A;if(r instanceof Ot){var e=r.A;if(!vt||e.length<199)return e.push([t,n]),this;r=this.A=new Mt(e)}return r.set(t,n),this};var Ct=lt?Z(lt,Object):function(){return[]},Dt=function(t){return tt.call(t)};function Vt(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||$.test(t))&&t>-1&&t%1==0&&t<n}function Ht(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||G)}function Ft(t){if(null!=t){try{return J.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ut(t,n){return t===n||t!=t&&n!=n}(ht&&Dt(new ht(new ArrayBuffer(1)))!=w||vt&&Dt(new vt)!=a||dt&&Dt(dt.resolve())!=v||pt&&Dt(new pt)!=p||bt&&Dt(new bt)!=m)&&(Dt=function(t){var n=tt.call(t),r=n==h?t.constructor:void 0,e=r?Ft(r):void 0;if(e)switch(e){case mt:return w;case gt:return a;case wt:return v;case xt:return p;case jt:return m}return n});var Pt=Array.isArray;function Zt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!zt(t)}var Wt=at||function(){return!1};function zt(t){var n=Kt(t)?tt.call(t):"";return n==c||n==l}function Kt(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Gt(t){return Zt(t)?_t(t):function(t){if(!Ht(t))return ft(t);var n=[];for(var r in Object(t))X.call(t,r)&&"constructor"!=r&&n.push(r);return n}(t)}t.exports=function(t){return $t(t,!0,!0)}}(Gf,Gf.exports);var Qf=Gf.exports,Yf={exports:{}};!function(t,n){var r="__lodash_hash_undefined__",e=9007199254740991,i="[object Arguments]",s="[object Array]",u="[object Boolean]",c="[object Date]",l="[object Error]",a="[object Function]",f="[object Map]",h="[object Number]",v="[object Object]",d="[object Promise]",p="[object RegExp]",b="[object Set]",y="[object String]",m="[object Symbol]",g="[object WeakMap]",w="[object ArrayBuffer]",x="[object DataView]",j=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,A={};A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A[i]=A[s]=A[w]=A[u]=A[x]=A[c]=A[l]=A[a]=A[f]=A[h]=A[v]=A[p]=A[b]=A[y]=A[g]=!1;var q="object"==typeof o&&o&&o.Object===Object&&o,O="object"==typeof self&&self&&self.Object===Object&&self,M=q||O||Function("return this")(),E=n&&!n.nodeType&&n,_=E&&t&&!t.nodeType&&t,T=_&&_.exports===E,L=T&&q.process,$=function(){try{return L&&L.binding&&L.binding("util")}catch(t){}}(),S=$&&$.isTypedArray;function N(t,n){for(var r=-1,e=null==t?0:t.length;++r<e;)if(n(t[r],r,t))return!0;return!1}function R(t){var n=-1,r=Array(t.size);return t.forEach((function(t,e){r[++n]=[e,t]})),r}function I(t){var n=-1,r=Array(t.size);return t.forEach((function(t){r[++n]=t})),r}var B=Array.prototype,C=Function.prototype,D=Object.prototype,V=M["t"],H=C.toString,F=D.hasOwnProperty,U=function(){var t=/[^.]+$/.exec(V&&V.keys&&V.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),P=D.toString,Z=RegExp("^"+H.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),W=T?M.Buffer:void 0,z=M.Symbol,K=M.Uint8Array,G=D.propertyIsEnumerable,Q=B.splice,Y=z?z.toStringTag:void 0,J=Object.getOwnPropertySymbols,X=W?W.isBuffer:void 0,tt=function(t,n){return function(r){return t(n(r))}}(Object.keys,Object),nt=_t(M,"DataView"),rt=_t(M,"Map"),et=_t(M,"Promise"),it=_t(M,"Set"),st=_t(M,"WeakMap"),ot=_t(Object,"create"),ut=St(nt),ct=St(rt),lt=St(et),at=St(it),ft=St(st),ht=z?z.prototype:void 0,vt=ht?ht.valueOf:void 0;function dt(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function pt(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function bt(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function yt(t){var n=-1,r=null==t?0:t.length;for(this.A=new bt;++n<r;)this.add(t[n])}function mt(t){var n=this.A=new pt(t);this.size=n.size}function gt(t,n){var r=It(t),e=!r&&Rt(t),i=!r&&!e&&Bt(t),s=!r&&!e&&!i&&Ft(t),o=r||e||i||s,u=o?function(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}(t.length,String):[],c=u.length;for(var l in t)!n&&!F.call(t,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||$t(l,c))||u.push(l);return u}function wt(t,n){for(var r=t.length;r--;)if(Nt(t[r][0],n))return r;return-1}function xt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Y&&Y in Object(t)?function(t){var n=F.call(t,Y),r=t[Y];try{t[Y]=void 0;var e=!0}catch(t){}var i=P.call(t);e&&(n?t[Y]=r:delete t[Y]);return i}(t):function(t){return P.call(t)}(t)}function jt(t){return Ht(t)&&xt(t)==i}function kt(t,n,r,e,o){return t===n||(null==t||null==n||!Ht(t)&&!Ht(n)?t!=t&&n!=n:function(t,n,r,e,o,a){var d=It(t),g=It(n),j=d?s:Lt(t),k=g?s:Lt(n),A=(j=j==i?v:j)==v,q=(k=k==i?v:k)==v,O=j==k;if(O&&Bt(t)){if(!Bt(n))return!1;d=!0,A=!1}if(O&&!A)return a||(a=new mt),d||Ft(t)?Ot(t,n,r,e,o,a):function(t,n,r,e,i,s,o){switch(r){case x:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case w:return!(t.byteLength!=n.byteLength||!s(new K(t),new K(n)));case u:case c:case h:return Nt(+t,+n);case l:return t.name==n.name&&t.message==n.message;case p:case y:return t==n+"";case f:var a=R;case b:var v=1&e;if(a||(a=I),t.size!=n.size&&!v)return!1;var d=o.get(t);if(d)return d==n;e|=2,o.set(t,n);var g=Ot(a(t),a(n),e,i,s,o);return o.delete(t),g;case m:if(vt)return vt.call(t)==vt.call(n)}return!1}(t,n,j,r,e,o,a);if(!(1&r)){var M=A&&F.call(t,"__wrapped__"),E=q&&F.call(n,"__wrapped__");if(M||E){var _=M?t.value():t,T=E?n.value():n;return a||(a=new mt),o(_,T,r,e,a)}}if(!O)return!1;return a||(a=new mt),function(t,n,r,e,i,s){var o=1&r,u=Mt(t),c=u.length,l=Mt(n),a=l.length;if(c!=a&&!o)return!1;var f=c;for(;f--;){var h=u[f];if(!(o?h in n:F.call(n,h)))return!1}var v=s.get(t);if(v&&s.get(n))return v==n;var d=!0;s.set(t,n),s.set(n,t);var p=o;for(;++f<c;){var b=t[h=u[f]],y=n[h];if(e)var m=o?e(y,b,h,n,t,s):e(b,y,h,t,n,s);if(!(void 0===m?b===y||i(b,y,r,e,s):m)){d=!1;break}p||(p="constructor"==h)}if(d&&!p){var g=t.constructor,w=n.constructor;g==w||!("constructor"in t)||!("constructor"in n)||"function"==typeof g&&g instanceof g&&"function"==typeof w&&w instanceof w||(d=!1)}return s.delete(t),s.delete(n),d}(t,n,r,e,o,a)}(t,n,r,e,kt,o))}function At(t){return!(!Vt(t)||function(t){return!!U&&U in t}(t))&&(Ct(t)?Z:j).test(St(t))}function qt(t){if(r=(n=t)&&n.constructor,e="function"==typeof r&&r.prototype||D,n!==e)return tt(t);var n,r,e,i=[];for(var s in Object(t))F.call(t,s)&&"constructor"!=s&&i.push(s);return i}function Ot(t,n,r,e,i,s){var o=1&r,u=t.length,c=n.length;if(u!=c&&!(o&&c>u))return!1;var l=s.get(t);if(l&&s.get(n))return l==n;var a=-1,f=!0,h=2&r?new yt:void 0;for(s.set(t,n),s.set(n,t);++a<u;){var v=t[a],d=n[a];if(e)var p=o?e(d,v,a,n,t,s):e(v,d,a,t,n,s);if(void 0!==p){if(p)continue;f=!1;break}if(h){if(!N(n,(function(t,n){if(o=n,!h.has(o)&&(v===t||i(v,t,r,e,s)))return h.push(n);var o}))){f=!1;break}}else if(v!==d&&!i(v,d,r,e,s)){f=!1;break}}return s.delete(t),s.delete(n),f}function Mt(t){return function(t,n,r){var e=n(t);return It(t)?e:function(t,n){for(var r=-1,e=n.length,i=t.length;++r<e;)t[i+r]=n[r];return t}(e,r(t))}(t,Ut,Tt)}function Et(t,n){var r,e,i=t.A;return("string"==(e=typeof(r=n))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==r:null===r)?i["string"==typeof n?"string":"hash"]:i.map}function _t(t,n){var r=function(t,n){return null==t?void 0:t[n]}(t,n);return At(r)?r:void 0}dt.prototype.clear=function(){this.A=ot?ot(null):{},this.size=0},dt.prototype.delete=function(t){var n=this.has(t)&&delete this.A[t];return this.size-=n?1:0,n},dt.prototype.get=function(t){var n=this.A;if(ot){var e=n[t];return e===r?void 0:e}return F.call(n,t)?n[t]:void 0},dt.prototype.has=function(t){var n=this.A;return ot?void 0!==n[t]:F.call(n,t)},dt.prototype.set=function(t,n){var e=this.A;return this.size+=this.has(t)?0:1,e[t]=ot&&void 0===n?r:n,this},pt.prototype.clear=function(){this.A=[],this.size=0},pt.prototype.delete=function(t){var n=this.A,r=wt(n,t);return!(r<0)&&(r==n.length-1?n.pop():Q.call(n,r,1),--this.size,!0)},pt.prototype.get=function(t){var n=this.A,r=wt(n,t);return r<0?void 0:n[r][1]},pt.prototype.has=function(t){return wt(this.A,t)>-1},pt.prototype.set=function(t,n){var r=this.A,e=wt(r,t);return e<0?(++this.size,r.push([t,n])):r[e][1]=n,this},bt.prototype.clear=function(){this.size=0,this.A={hash:new dt,map:new(rt||pt),string:new dt}},bt.prototype.delete=function(t){var n=Et(this,t).delete(t);return this.size-=n?1:0,n},bt.prototype.get=function(t){return Et(this,t).get(t)},bt.prototype.has=function(t){return Et(this,t).has(t)},bt.prototype.set=function(t,n){var r=Et(this,t),e=r.size;return r.set(t,n),this.size+=r.size==e?0:1,this},yt.prototype.add=yt.prototype.push=function(t){return this.A.set(t,r),this},yt.prototype.has=function(t){return this.A.has(t)},mt.prototype.clear=function(){this.A=new pt,this.size=0},mt.prototype.delete=function(t){var n=this.A,r=n.delete(t);return this.size=n.size,r},mt.prototype.get=function(t){return this.A.get(t)},mt.prototype.has=function(t){return this.A.has(t)},mt.prototype.set=function(t,n){var r=this.A;if(r instanceof pt){var e=r.A;if(!rt||e.length<199)return e.push([t,n]),this.size=++r.size,this;r=this.A=new bt(e)}return r.set(t,n),this.size=r.size,this};var Tt=J?function(t){return null==t?[]:(t=Object(t),function(t,n){for(var r=-1,e=null==t?0:t.length,i=0,s=[];++r<e;){var o=t[r];n(o,r,t)&&(s[i++]=o)}return s}(J(t),(function(n){return G.call(t,n)})))}:function(){return[]},Lt=xt;function $t(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||k.test(t))&&t>-1&&t%1==0&&t<n}function St(t){if(null!=t){try{return H.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Nt(t,n){return t===n||t!=t&&n!=n}(nt&&Lt(new nt(new ArrayBuffer(1)))!=x||rt&&Lt(new rt)!=f||et&&Lt(et.resolve())!=d||it&&Lt(new it)!=b||st&&Lt(new st)!=g)&&(Lt=function(t){var n=xt(t),r=n==v?t.constructor:void 0,e=r?St(r):"";if(e)switch(e){case ut:return x;case ct:return f;case lt:return d;case at:return b;case ft:return g}return n});var Rt=jt(function(){return arguments}())?jt:function(t){return Ht(t)&&F.call(t,"callee")&&!G.call(t,"callee")},It=Array.isArray;var Bt=X||function(){return!1};function Ct(t){if(!Vt(t))return!1;var n=xt(t);return n==a||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}function Dt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}function Vt(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function Ht(t){return null!=t&&"object"==typeof t}var Ft=S?function(t){return function(n){return t(n)}}(S):function(t){return Ht(t)&&Dt(t.length)&&!!A[xt(t)]};function Ut(t){return null!=(n=t)&&Dt(n.length)&&!Ct(n)?gt(t):qt(t);var n}t.exports=function(t,n){return kt(t,n)}}(Yf,Yf.exports);var Jf=Yf.exports,Xf={};Object.defineProperty(Xf,"q",{value:!0});const th=Qf,nh=Jf;var rh;!function(t){t.compose=function(t={},n={},r=!1){"object"!=typeof t&&(t={}),"object"!=typeof n&&(n={});let e=th(n);r||(e=Object.keys(e).reduce(((t,n)=>(null!=e[n]&&(t[n]=e[n]),t)),{}));for(const r in t)void 0!==t[r]&&void 0===n[r]&&(e[r]=t[r]);return Object.keys(e).length>0?e:void 0},t.diff=function(t={},n={}){"object"!=typeof t&&(t={}),"object"!=typeof n&&(n={});const r=Object.keys(t).concat(Object.keys(n)).reduce(((r,e)=>(nh(t[e],n[e])||(r[e]=void 0===n[e]?null:n[e]),r)),{});return Object.keys(r).length>0?r:void 0},t.invert=function(t={},n={}){t=t||{};const r=Object.keys(n).reduce(((r,e)=>(n[e]!==t[e]&&void 0!==t[e]&&(r[e]=n[e]),r)),{});return Object.keys(t).reduce(((r,e)=>(t[e]!==n[e]&&void 0===n[e]&&(r[e]=null),r)),r)},t.transform=function(t,n,r=!1){if("object"!=typeof t)return n;if("object"!=typeof n)return;if(!r)return n;const e=Object.keys(n).reduce(((r,e)=>(void 0===t[e]&&(r[e]=n[e]),r)),{});return Object.keys(e).length>0?e:void 0}}(rh||(rh={})),Xf.default=rh;var eh,ih={};Object.defineProperty(ih,"q",{value:!0}),function(t){t.length=function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"object"==typeof t.retain&&null!==t.retain?1:"string"==typeof t.insert?t.insert.length:1}}(eh||(eh={})),ih.default=eh;var sh={};Object.defineProperty(sh,"q",{value:!0});const oh=ih;sh.default=class{constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);const n=this.ops[this.index];if(n){const r=this.offset,e=oh.default.length(n);if(t>=e-r?(t=e-r,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof n.delete)return{delete:t};{const e={};return n.attributes&&(e.attributes=n.attributes),"number"==typeof n.retain?e.retain=t:"object"==typeof n.retain&&null!==n.retain?e.retain=n.retain:"string"==typeof n.insert?e.insert=n.insert.substr(r,t):e.insert=n.insert,e}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?oh.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const t=this.ops[this.index];return t?"number"==typeof t.delete?"delete":"number"==typeof t.retain||"object"==typeof t.retain&&null!==t.retain?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);{const t=this.offset,n=this.index,r=this.next(),e=this.ops.slice(this.index);return this.offset=t,this.index=n,[r].concat(e)}}return[]}},function(t,n){Object.defineProperty(n,"q",{value:!0}),n.AttributeMap=n.OpIterator=n.Op=void 0;const r=Kf,e=Qf,i=Jf,s=Xf;n.AttributeMap=s.default;const o=ih;n.Op=o.default;const u=sh;n.OpIterator=u.default;const c=String.fromCharCode(0),l=(t,n)=>{if("object"!=typeof t||null===t)throw new Error("cannot retain a "+typeof t);if("object"!=typeof n||null===n)throw new Error("cannot retain a "+typeof n);const r=Object.keys(t)[0];if(!r||r!==Object.keys(n)[0])throw new Error(`embed types not matched: ${r} != ${Object.keys(n)[0]}`);return[r,t[r],n[r]]};class a{constructor(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}static registerEmbed(t,n){this.handlers[t]=n}static unregisterEmbed(t){delete this.handlers[t]}static getHandler(t){const n=this.handlers[t];if(!n)throw new Error(`no handlers for embed type "${t}"`);return n}insert(t,n){const r={};return"string"==typeof t&&0===t.length?this:(r.insert=t,null!=n&&"object"==typeof n&&Object.keys(n).length>0&&(r.attributes=n),this.push(r))}delete(t){return t<=0?this:this.push({delete:t})}retain(t,n){if("number"==typeof t&&t<=0)return this;const r={retain:t};return null!=n&&"object"==typeof n&&Object.keys(n).length>0&&(r.attributes=n),this.push(r)}push(t){let n=this.ops.length,r=this.ops[n-1];if(t=e(t),"object"==typeof r){if("number"==typeof t.delete&&"number"==typeof r.delete)return this.ops[n-1]={delete:r.delete+t.delete},this;if("number"==typeof r.delete&&null!=t.insert&&(n-=1,r=this.ops[n-1],"object"!=typeof r))return this.ops.unshift(t),this;if(i(t.attributes,r.attributes)){if("string"==typeof t.insert&&"string"==typeof r.insert)return this.ops[n-1]={insert:r.insert+t.insert},"object"==typeof t.attributes&&(this.ops[n-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof r.retain)return this.ops[n-1]={retain:r.retain+t.retain},"object"==typeof t.attributes&&(this.ops[n-1].attributes=t.attributes),this}}return n===this.ops.length?this.ops.push(t):this.ops.splice(n,0,t),this}chop(){const t=this.ops[this.ops.length-1];return t&&"number"==typeof t.retain&&!t.attributes&&this.ops.pop(),this}filter(t){return this.ops.filter(t)}forEach(t){this.ops.forEach(t)}map(t){return this.ops.map(t)}partition(t){const n=[],r=[];return this.forEach((e=>{(t(e)?n:r).push(e)})),[n,r]}reduce(t,n){return this.ops.reduce(t,n)}changeLength(){return this.reduce(((t,n)=>n.insert?t+o.default.length(n):n.delete?t-n.delete:t),0)}length(){return this.reduce(((t,n)=>t+o.default.length(n)),0)}slice(t=0,n=1/0){const r=[],e=new u.default(this.ops);let i=0;for(;i<n&&e.hasNext();){let s;i<t?s=e.next(t-i):(s=e.next(n-i),r.push(s)),i+=o.default.length(s)}return new a(r)}compose(t){const n=new u.default(this.ops),r=new u.default(t.ops),e=[],o=r.peek();if(null!=o&&"number"==typeof o.retain&&null==o.attributes){let t=o.retain;for(;"insert"===n.peekType()&&n.peekLength()<=t;)t-=n.peekLength(),e.push(n.next());o.retain-t>0&&r.next(o.retain-t)}const c=new a(e);for(;n.hasNext()||r.hasNext();)if("insert"===r.peekType())c.push(r.next());else if("delete"===n.peekType())c.push(n.next());else{const t=Math.min(n.peekLength(),r.peekLength()),e=n.next(t),o=r.next(t);if(o.retain){const u={};if("number"==typeof e.retain)u.retain="number"==typeof o.retain?t:o.retain;else if("number"==typeof o.retain)null==e.retain?u.insert=e.insert:u.retain=e.retain;else{const t=null==e.retain?"insert":"retain",[n,r,i]=l(e[t],o.retain),s=a.getHandler(n);u[t]={[n]:s.compose(r,i,"retain"===t)}}const f=s.default.compose(e.attributes,o.attributes,"number"==typeof e.retain);if(f&&(u.attributes=f),c.push(u),!r.hasNext()&&i(c.ops[c.ops.length-1],u)){const t=new a(n.rest());return c.concat(t).chop()}}else"number"==typeof o.delete&&("number"==typeof e.retain||"object"==typeof e.retain&&null!==e.retain)&&c.push(o)}return c.chop()}concat(t){const n=new a(this.ops.slice());return t.ops.length>0&&(n.push(t.ops[0]),n.ops=n.ops.concat(t.ops.slice(1))),n}diff(t,n){if(this.ops===t.ops)return new a;const e=[this,t].map((n=>n.map((r=>{if(null!=r.insert)return"string"==typeof r.insert?r.insert:c;throw new Error("diff() called "+(n===t?"on":"with")+" non-document")})).join(""))),o=new a,l=r(e[0],e[1],n,!0),f=new u.default(this.ops),h=new u.default(t.ops);return l.forEach((t=>{let n=t[1].length;for(;n>0;){let e=0;switch(t[0]){case r.INSERT:e=Math.min(h.peekLength(),n),o.push(h.next(e));break;case r.DELETE:e=Math.min(n,f.peekLength()),f.next(e),o.delete(e);break;case r.EQUAL:e=Math.min(f.peekLength(),h.peekLength(),n);const t=f.next(e),u=h.next(e);i(t.insert,u.insert)?o.retain(e,s.default.diff(t.attributes,u.attributes)):o.push(u).delete(e)}n-=e}})),o.chop()}eachLine(t,n="\n"){const r=new u.default(this.ops);let e=new a,i=0;for(;r.hasNext();){if("insert"!==r.peekType())return;const s=r.peek(),u=o.default.length(s)-r.peekLength(),c="string"==typeof s.insert?s.insert.indexOf(n,u)-u:-1;if(c<0)e.push(r.next());else if(c>0)e.push(r.next(c));else{if(!1===t(e,r.next(1).attributes||{},i))return;i+=1,e=new a}}e.length()>0&&t(e,{},i)}invert(t){const n=new a;return this.reduce(((r,e)=>{if(e.insert)n.delete(o.default.length(e));else{if("number"==typeof e.retain&&null==e.attributes)return n.retain(e.retain),r+e.retain;if(e.delete||"number"==typeof e.retain){const i=e.delete||e.retain;return t.slice(r,r+i).forEach((t=>{e.delete?n.push(t):e.retain&&e.attributes&&n.retain(o.default.length(t),s.default.invert(e.attributes,t.attributes))})),r+i}if("object"==typeof e.retain&&null!==e.retain){const i=t.slice(r,r+1),o=new u.default(i.ops).next(),[c,f,h]=l(e.retain,o.insert),v=a.getHandler(c);return n.retain({[c]:v.invert(f,h)},s.default.invert(e.attributes,o.attributes)),r+1}}return r}),0),n.chop()}transform(t,n=!1){if(n=!!n,"number"==typeof t)return this.transformPosition(t,n);const r=t,e=new u.default(this.ops),i=new u.default(r.ops),c=new a;for(;e.hasNext()||i.hasNext();)if("insert"!==e.peekType()||!n&&"insert"===i.peekType())if("insert"===i.peekType())c.push(i.next());else{const t=Math.min(e.peekLength(),i.peekLength()),r=e.next(t),o=i.next(t);if(r.delete)continue;if(o.delete)c.push(o);else{const e=r.retain,i=o.retain;let u="object"==typeof i&&null!==i?i:t;if("object"==typeof e&&null!==e&&"object"==typeof i&&null!==i){const t=Object.keys(e)[0];if(t===Object.keys(i)[0]){const r=a.getHandler(t);r&&(u={[t]:r.transform(e[t],i[t],n)})}}c.retain(u,s.default.transform(r.attributes,o.attributes,n))}}else c.retain(o.default.length(e.next()));return c.chop()}transformPosition(t,n=!1){n=!!n;const r=new u.default(this.ops);let e=0;for(;r.hasNext()&&e<=t;){const i=r.peekLength(),s=r.peekType();r.next(),"delete"!==s?("insert"===s&&(e<t||!n)&&(t+=i),e+=i):t-=Math.min(i,t-e)}return t}}a.Op=o.default,a.OpIterator=u.default,a.AttributeMap=s.default,a.handlers={},n.default=a,t.exports=a,t.exports.default=a}(_f,_f.exports);var uh=_f.exports,ch=u(uh);class lh extends jf{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}lh.blotName="break",lh.tagName="BR";let ah=class extends Mf{};const fh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function hh(t){return t.replace(/[&<>"']/g,(t=>fh[t]))}class vh extends yf{static allowedChildren=[vh,lh,jf,ah];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(t,n){const r=vh.order.indexOf(t),e=vh.order.indexOf(n);return r>=0||e>=0?r-e:t===n?0:t<n?-1:1}formatAt(t,n,r,e){if(vh.compare(this.statics.blotName,r)<0&&this.scroll.query(r,Ya.BLOT)){const i=this.isolate(t,n);e&&i.wrap(r,e)}else super.formatAt(t,n,r,e)}optimize(t){if(super.optimize(t),this.parent instanceof vh&&vh.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}class dh extends gf{cache={};delta(){return null==this.cache.delta&&(this.cache.delta=function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.descendants(ff).reduce(((t,r)=>0===r.length()?t:t.insert(r.value(),bh(r,{},n))),new ch).insert("\n",bh(t))}(this)),this.cache.delta}deleteAt(t,n){super.deleteAt(t,n),this.cache={}}formatAt(t,n,r,e){n<=0||(this.scroll.query(r,Ya.BLOCK)?t+n===this.length()&&this.format(r,e):super.formatAt(t,Math.min(n,this.length()-t-1),r,e),this.cache={})}insertAt(t,n,r){if(null!=r)return super.insertAt(t,n,r),void(this.cache={});if(0===n.length)return;const e=n.split("\n"),i=e.shift();i.length>0&&(t<this.length()-1||null==this.children.tail?super.insertAt(Math.min(t,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let s=this;e.reduce(((t,n)=>(s=s.split(t,!0),s.insertAt(0,n),n.length)),t+i.length)}insertBefore(t,n){const{head:r}=this.children;super.insertBefore(t,n),r instanceof lh&&r.remove(),this.cache={}}length(){return null==this.cache.length&&(this.cache.length=super.length()+1),this.cache.length}moveChildren(t,n){super.moveChildren(t,n),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){const n=this.clone();return 0===t?(this.parent.insertBefore(n,this),this):(this.parent.insertBefore(n,this.next),n)}const r=super.split(t,n);return this.cache={},r}}dh.blotName="block",dh.tagName="P",dh.defaultChild=lh,dh.allowedChildren=[lh,vh,jf,ah];class ph extends jf{attach(){super.attach(),this.attributes=new uf(this.domNode)}delta(){return(new ch).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,n){const r=this.scroll.query(t,Ya.BLOCK_ATTRIBUTE);null!=r&&this.attributes.attribute(r,n)}formatAt(t,n,r,e){this.format(r,e)}insertAt(t,n,r){if(null!=r)return void super.insertAt(t,n,r);const e=n.split("\n"),i=e.pop(),s=e.map((t=>{const n=this.scroll.create(dh.blotName);return n.insertAt(0,t),n})),o=this.split(t);s.forEach((t=>{this.parent.insertBefore(t,o)})),i&&this.parent.insertBefore(this.scroll.create("text",i),o)}}function bh(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==t?n:("formats"in t&&"function"==typeof t.formats&&(n={...n,...t.formats()},r&&delete n["code-token"]),null==t.parent||"scroll"===t.parent.statics.blotName||t.parent.statics.scope!==t.statics.scope?n:bh(t.parent,n,r))}ph.scope=Ya.BLOCK_BLOT;class yh extends jf{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\ufeff";static value(){}constructor(t,n,r){super(t,n),this.selection=r,this.textNode=document.createTextNode(yh.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(t,n){if(0!==this.savedLength)return void super.format(t,n);let r=this,e=0;for(;null!=r&&r.statics.scope!==Ya.BLOCK_BLOT;)e+=r.offset(r.parent),r=r.parent;null!=r&&(this.savedLength=yh.CONTENTS.length,r.optimize(),r.formatAt(e,yh.CONTENTS.length,t,n),this.savedLength=0)}index(t,n){return t===this.textNode?0:super.index(t,n)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||null==this.parent)return null;const t=this.selection.getNativeRange();for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const n=this.prev instanceof ah?this.prev:null,r=n?n.length():0,e=this.next instanceof ah?this.next:null,i=e?e.text:"",{textNode:s}=this,o=s.data.split(yh.CONTENTS).join("");let u;if(s.data=yh.CONTENTS,n)u=n,(o||e)&&(n.insertAt(n.length(),o+i),e&&e.remove());else if(e)u=e,e.insertAt(0,o);else{const t=document.createTextNode(o);u=this.scroll.create(t),this.parent.insertBefore(u,this)}if(this.remove(),t){const i=(t,i)=>n&&t===n.domNode?i:t===s?r+i-1:e&&t===e.domNode?r+o.length+i:null,c=i(t.start.node,t.start.offset),l=i(t.end.node,t.end.offset);if(null!==c&&null!==l)return{startNode:u.domNode,startOffset:c,endNode:u.domNode,endOffset:l}}return null}update(t,n){if(t.some((t=>"characterData"===t.type&&t.target===this.textNode))){const t=this.restore();t&&(n.range=t)}}optimize(t){super.optimize(t);let{parent:n}=this;for(;n;){if("A"===n.domNode.tagName){this.savedLength=yh.CONTENTS.length,n.isolate(this.offset(n),this.length()).unwrap(),this.savedLength=0;break}n=n.parent}}value(){return""}}var mh={exports:{}};!function(t){var n=Object.prototype.hasOwnProperty,r="~";function e(){}function i(t,n,r){this.fn=t,this.context=n,this.once=r||!1}function s(t,n,e,s,o){if("function"!=typeof e)throw new TypeError("The listener must be a function");var u=new i(e,s||t,o),c=r?r+n:n;return t._events[c]?t._events[c].fn?t._events[c]=[t._events[c],u]:t._events[c].push(u):(t._events[c]=u,t._eventsCount++),t}function o(t,n){0==--t._eventsCount?t._events=new e:delete t._events[n]}function u(){this._events=new e,this._eventsCount=0}Object.create&&(e.prototype=Object.create(null),(new e).__proto__||(r=!1)),u.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},u.prototype.listeners=function(t){var n=r?r+t:t,e=this._events[n];if(!e)return[];if(e.fn)return[e.fn];for(var i=0,s=e.length,o=new Array(s);i<s;i++)o[i]=e[i].fn;return o},u.prototype.listenerCount=function(t){var n=r?r+t:t,e=this._events[n];return e?e.fn?1:e.length:0},u.prototype.emit=function(t,n,e,i,s,o){var u=r?r+t:t;if(!this._events[u])return!1;var c,l,a=this._events[u],f=arguments.length;if(a.fn){switch(a.once&&this.removeListener(t,a.fn,void 0,!0),f){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,n),!0;case 3:return a.fn.call(a.context,n,e),!0;case 4:return a.fn.call(a.context,n,e,i),!0;case 5:return a.fn.call(a.context,n,e,i,s),!0;case 6:return a.fn.call(a.context,n,e,i,s,o),!0}for(l=1,c=new Array(f-1);l<f;l++)c[l-1]=arguments[l];a.fn.apply(a.context,c)}else{var h,v=a.length;for(l=0;l<v;l++)switch(a[l].once&&this.removeListener(t,a[l].fn,void 0,!0),f){case 1:a[l].fn.call(a[l].context);break;case 2:a[l].fn.call(a[l].context,n);break;case 3:a[l].fn.call(a[l].context,n,e);break;case 4:a[l].fn.call(a[l].context,n,e,i);break;default:if(!c)for(h=1,c=new Array(f-1);h<f;h++)c[h-1]=arguments[h];a[l].fn.apply(a[l].context,c)}}return!0},u.prototype.on=function(t,n,r){return s(this,t,n,r,!1)},u.prototype.once=function(t,n,r){return s(this,t,n,r,!0)},u.prototype.removeListener=function(t,n,e,i){var s=r?r+t:t;if(!this._events[s])return this;if(!n)return o(this,s),this;var u=this._events[s];if(u.fn)u.fn!==n||i&&!u.once||e&&u.context!==e||o(this,s);else{for(var c=0,l=[],a=u.length;c<a;c++)(u[c].fn!==n||i&&!u[c].once||e&&u[c].context!==e)&&l.push(u[c]);l.length?this._events[s]=1===l.length?l[0]:l:o(this,s)}return this},u.prototype.removeAllListeners=function(t){var n;return t?(n=r?r+t:t,this._events[n]&&o(this,n)):(this._events=new e,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u}(mh);var gh=u(mh.exports),wh=new WeakMap;const xh=["error","warn","log","info"];let jh="warn";function kh(t){if(jh&&xh.indexOf(t)<=xh.indexOf(jh)){for(var n=arguments.length,r=new Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];console[t](...r)}}function Ah(t){return xh.reduce(((n,r)=>(n[r]=kh.bind(console,r,t),n)),{})}Ah.level=t=>{jh=t},kh.level=Ah.level;const qh=Ah("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((t=>{document.addEventListener(t,(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach((t=>{const r=wh.get(t);r&&r.emitter&&r.emitter.handleDOM(...n)}))}))}));class Oh extends gh{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",qh.error)}emit(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qh.log.call(qh,...n),super.emit(...n)}handleDOM(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];(this.domListeners[t.type]||[]).forEach((n=>{let{node:e,handler:i}=n;(t.target===e||e.contains(t.target))&&i(t,...r)}))}listenDOM(t,n,r){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:n,handler:r})}}const Mh=Ah("quill:selection");class Eh{constructor(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.index=t,this.length=n}}class _h{constructor(t,n){this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Eh(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(()=>{this.mouseDown||this.composing||setTimeout(this.update.bind(this,Oh.sources.USER),1)})),this.emitter.on(Oh.events.SCROLL_BEFORE_UPDATE,(()=>{if(!this.hasFocus())return;const t=this.getNativeRange();null!=t&&t.start.node!==this.cursor.textNode&&this.emitter.once(Oh.events.SCROLL_UPDATE,((n,r)=>{try{this.root.contains(t.start.node)&&this.root.contains(t.end.node)&&this.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset);const e=r.some((t=>"characterData"===t.type||"childList"===t.type||"attributes"===t.type&&t.target===this.root));this.update(e?Oh.sources.SILENT:n)}catch(t){}}))})),this.emitter.on(Oh.events.SCROLL_OPTIMIZE,((t,n)=>{if(n.range){const{startNode:t,startOffset:r,endNode:e,endOffset:i}=n.range;this.setNativeRange(t,r,e,i),this.update(Oh.sources.SILENT)}})),this.update(Oh.sources.SILENT)}handleComposition(){this.emitter.on(Oh.events.COMPOSITION_BEFORE_START,(()=>{this.composing=!0})),this.emitter.on(Oh.events.COMPOSITION_END,(()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout((()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}handleDragging(){this.emitter.listenDOM("mousedown",document.body,(()=>{this.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(()=>{this.mouseDown=!1,this.update(Oh.sources.USER)}))}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,n){this.scroll.update();const r=this.getNativeRange();if(null!=r&&r.native.collapsed&&!this.scroll.query(t,Ya.BLOCK)){if(r.start.node!==this.cursor.textNode){const t=this.scroll.find(r.start.node,!1);if(null==t)return;if(t instanceof ff){const n=t.split(r.start.offset);t.parent.insertBefore(this.cursor,n)}else t.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(t,n),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.scroll.length();let e;t=Math.min(t,r-1),n=Math.min(t+n,r-1)-t;let[i,s]=this.scroll.leaf(t);if(null==i)return null;if(n>0&&s===i.length()){const[n]=this.scroll.leaf(t+1);if(n){const[r]=this.scroll.line(t),[e]=this.scroll.line(t+1);r===e&&(i=n,s=0)}}[e,s]=i.position(s,!0);const o=document.createRange();if(n>0)return o.setStart(e,s),[i,s]=this.scroll.leaf(t+n),null==i?null:([e,s]=i.position(s,!0),o.setEnd(e,s),o.getBoundingClientRect());let u,c="left";if(e instanceof Text){if(!e.data.length)return null;s<e.data.length?(o.setStart(e,s),o.setEnd(e,s+1)):(o.setStart(e,s-1),o.setEnd(e,s),c="right"),u=o.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;u=i.domNode.getBoundingClientRect(),s>0&&(c="right")}return{bottom:u.top+u.height,height:u.height,left:u[c],right:u[c],top:u.top,width:0}}getNativeRange(){const t=document.getSelection();if(null==t||t.rangeCount<=0)return null;const n=t.getRangeAt(0);if(null==n)return null;const r=this.normalizeNative(n);return Mh.info("getNativeRange",r),r}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const n=this.getNativeRange();if(null==n)return[null,null];return[this.normalizedToRange(n),n]}hasFocus(){return document.activeElement===this.root||null!=document.activeElement&&Th(this.root,document.activeElement)}normalizedToRange(t){const n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);const r=n.map((t=>{const[n,r]=t,e=this.scroll.find(n,!0),i=e.offset(this.scroll);return 0===r?i:e instanceof ff?i+e.index(n,r):i+e.length()})),e=Math.min(Math.max(...r),this.scroll.length()-1),i=Math.min(e,...r);return new Eh(i,e-i)}normalizeNative(t){if(!Th(this.root,t.startContainer)||!t.collapsed&&!Th(this.root,t.endContainer))return null;const n={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[n.start,n.end].forEach((t=>{let{node:n,offset:r}=t;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>r)n=n.childNodes[r],r=0;else{if(n.childNodes.length!==r)break;n=n.lastChild,r=n instanceof Text?n.data.length:n.childNodes.length>0?n.childNodes.length:n.childNodes.length+1}t.node=n,t.offset=r})),n}rangeToNative(t){const n=this.scroll.length(),r=(t,r)=>{t=Math.min(n-1,t);const[e,i]=this.scroll.leaf(t);return e?e.position(i,r):[null,-1]};return[...r(t.index,!1),...r(t.index+t.length,!0)]}setNativeRange(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(Mh.info("setNativeRange",t,n,r,e),null!=t&&(null==this.root.parentNode||null==t.parentNode||null==r.parentNode))return;const s=document.getSelection();if(null!=s)if(null!=t){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:o}=this.getNativeRange()||{};if(null==o||i||t!==o.startContainer||n!==o.startOffset||r!==o.endContainer||e!==o.endOffset){t instanceof Element&&"BR"===t.tagName&&(n=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),r instanceof Element&&"BR"===r.tagName&&(e=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);const i=document.createRange();i.setStart(t,n),i.setEnd(r,e),s.removeAllRanges(),s.addRange(i)}}else s.removeAllRanges(),this.root.blur()}setRange(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Oh.sources.API;if("string"==typeof n&&(r=n,n=!1),Mh.info("setRange",t),null!=t){const r=this.rangeToNative(t);this.setNativeRange(...r,n)}else this.setNativeRange(null);this.update(r)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Oh.sources.USER;const n=this.lastRange,[r,e]=this.getRange();if(this.lastRange=r,this.lastNative=e,null!=this.lastRange&&(this.savedRange=this.lastRange),!Mu(n,this.lastRange)){if(!this.composing&&null!=e&&e.native.collapsed&&e.start.node!==this.cursor.textNode){const t=this.cursor.restore();t&&this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}const r=[Oh.events.SELECTION_CHANGE,Zi(this.lastRange),Zi(n),t];this.emitter.emit(Oh.events.EDITOR_CHANGE,...r),t!==Oh.sources.SILENT&&this.emitter.emit(...r)}}}function Th(t,n){try{n.parentNode}catch(t){return!1}return t.contains(n)}const Lh=/^[ -~]*$/;class $h{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let n=this.scroll.length();this.scroll.batchStart();const r=Bh(t),e=new ch,i=function(t){const n=[];return t.forEach((t=>{if("string"==typeof t.insert){t.insert.split("\n").forEach(((r,e)=>{e&&n.push({insert:"\n",attributes:t.attributes}),r&&n.push({insert:r,attributes:t.attributes})}))}else n.push(t)})),n}(r.ops.slice());return i.reduce(((t,r)=>{const i=uh.Op.length(r);let s=r.attributes||{},o=!1,u=!1;if(null!=r.insert){if(e.retain(i),"string"==typeof r.insert){const e=r.insert;u=!e.endsWith("\n")&&(n<=t||!!this.scroll.descendant(ph,t)[0]),this.scroll.insertAt(t,e);const[i,o]=this.scroll.line(t);let c=Ku({},bh(i));if(i instanceof dh){const[t]=i.descendant(ff,o);t&&(c=Ku(c,bh(t)))}s=uh.AttributeMap.diff(c,s)||{}}else if("object"==typeof r.insert){const e=Object.keys(r.insert)[0];if(null==e)return t;const i=null!=this.scroll.query(e,Ya.INLINE);if(i)(n<=t||this.scroll.descendant(ph,t)[0])&&(u=!0);else if(t>0){const[n,r]=this.scroll.descendant(ff,t-1);if(n instanceof ah){"\n"!==n.value()[r]&&(o=!0)}else n instanceof jf&&n.statics.scope===Ya.INLINE_BLOT&&(o=!0)}if(this.scroll.insertAt(t,e,r.insert[e]),i){const[n]=this.scroll.descendant(ff,t);if(n){const t=Ku({},bh(n));s=uh.AttributeMap.diff(t,s)||{}}}}n+=i}else if(e.push(r),null!==r.retain&&"object"==typeof r.retain){const n=Object.keys(r.retain)[0];if(null==n)return t;this.scroll.updateEmbedAt(t,n,r.retain[n])}Object.keys(s).forEach((n=>{this.scroll.formatAt(t,i,n,s[n])}));const c=o?1:0,l=u?1:0;return n+=c+l,e.retain(c),e.delete(l),t+i+c+l}),0),e.reduce(((t,n)=>"number"==typeof n.delete?(this.scroll.deleteAt(t,n.delete),t):t+uh.Op.length(n)),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(t,n){return this.scroll.deleteAt(t,n),this.update((new ch).retain(t).delete(n))}formatLine(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach((e=>{this.scroll.lines(t,Math.max(n,1)).forEach((t=>{t.format(e,r[e])}))})),this.scroll.optimize();const e=(new ch).retain(t).retain(n,Zi(r));return this.update(e)}formatText(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(r).forEach((e=>{this.scroll.formatAt(t,n,e,r[e])}));const e=(new ch).retain(t).retain(n,Zi(r));return this.update(e)}getContents(t,n){return this.delta.slice(t,t+n)}getDelta(){return this.scroll.lines().reduce(((t,n)=>t.concat(n.delta())),new ch)}getFormat(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[],e=[];0===n?this.scroll.path(t).forEach((t=>{const[n]=t;n instanceof dh?r.push(n):n instanceof ff&&e.push(n)})):(r=this.scroll.lines(t,n),e=this.scroll.descendants(ff,t,n));const[i,s]=[r,e].map((t=>{const n=t.shift();if(null==n)return{};let r=bh(n);for(;Object.keys(r).length>0;){const n=t.shift();if(null==n)return r;r=Rh(bh(n),r)}return r}));return{...i,...s}}getHTML(t,n){const[r,e]=this.scroll.line(t);if(r){const i=r.length();return!(r.length()>=e+n)||0===e&&n===i?Nh(this.scroll,t,n,!0):Nh(r,e,n,!0)}return""}getText(t,n){return this.getContents(t,n).filter((t=>"string"==typeof t.insert)).map((t=>t.insert)).join("")}insertContents(t,n){const r=Bh(n),e=(new ch).retain(t).concat(r);return this.scroll.insertContents(t,r),this.update(e)}insertEmbed(t,n,r){return this.scroll.insertAt(t,n,r),this.update((new ch).retain(t).insert({[n]:r}))}insertText(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n=n.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,n),Object.keys(r).forEach((e=>{this.scroll.formatAt(t,n.length,e,r[e])})),this.update((new ch).retain(t).insert(n,Zi(r)))}isBlank(){if(0===this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if(t?.statics.blotName!==dh.blotName)return!1;const n=t;return!(n.children.length>1)&&n.children.head instanceof lh}removeFormat(t,n){const r=this.getText(t,n),[e,i]=this.scroll.line(t+n);let s=0,o=new ch;null!=e&&(s=e.length()-i,o=e.delta().slice(i,i+s-1).insert("\n"));const u=this.getContents(t,n+s).diff((new ch).insert(r).concat(o)),c=(new ch).retain(t).concat(u);return this.applyDelta(c)}update(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const e=this.delta;if(1===n.length&&"characterData"===n[0].type&&n[0].target.data.match(Lh)&&this.scroll.find(n[0].target)){const i=this.scroll.find(n[0].target),s=bh(i),o=i.offset(this.scroll),u=n[0].oldValue.replace(yh.CONTENTS,""),c=(new ch).insert(u),l=(new ch).insert(i.value()),a=r&&{oldRange:Ch(r.oldRange,-o),newRange:Ch(r.newRange,-o)};t=(new ch).retain(o).concat(c.diff(l,a)).reduce(((t,n)=>n.insert?t.insert(n.insert,s):t.push(n)),new ch),this.delta=e.compose(t)}else this.delta=this.getDelta(),t&&Mu(e.compose(t),this.delta)||(t=e.diff(this.delta,r));return t}}function Sh(t,n,r){if(0===t.length){const[t]=Ih(r.pop());return n<=0?`</li></${t}>`:`</li></${t}>${Sh([],n-1,r)}`}const[{child:e,offset:i,length:s,indent:o,type:u},...c]=t,[l,a]=Ih(u);if(o>n)return r.push(u),o===n+1?`<${l}><li${a}>${Nh(e,i,s)}${Sh(c,o,r)}`:`<${l}><li>${Sh(t,n+1,r)}`;const f=r[r.length-1];if(o===n&&u===f)return`</li><li${a}>${Nh(e,i,s)}${Sh(c,o,r)}`;const[h]=Ih(r.pop());return`</li></${h}>${Sh(t,n-1,r)}`}function Nh(t,n,r){let e=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("html"in t&&"function"==typeof t.html)return t.html(n,r);if(t instanceof ah){return hh(t.value().slice(n,n+r)).replaceAll(" ","&nbsp;")}if(t instanceof pf){if("list-container"===t.statics.blotName){const e=[];return t.children.forEachAt(n,r,((t,n,r)=>{const i="formats"in t&&"function"==typeof t.formats?t.formats():{};e.push({child:t,offset:n,length:r,indent:i.indent||0,type:i.list})})),Sh(e,-1,[])}const i=[];if(t.children.forEachAt(n,r,((t,n,r)=>{i.push(Nh(t,n,r))})),e||"list"===t.statics.blotName)return i.join("");const{outerHTML:s,innerHTML:o}=t.domNode,[u,c]=s.split(`>${o}<`);return"<table"===u?`<table style="border: 1px solid #000;">${i.join("")}<${c}`:`${u}>${i.join("")}<${c}`}return t.domNode instanceof Element?t.domNode.outerHTML:""}function Rh(t,n){return Object.keys(n).reduce(((r,e)=>{if(null==t[e])return r;const i=n[e];return i===t[e]?r[e]=i:Array.isArray(i)?i.indexOf(t[e])<0?r[e]=i.concat([t[e]]):r[e]=i:r[e]=[i,t[e]],r}),{})}function Ih(t){const n="ordered"===t?"ol":"ul";switch(t){case"checked":return[n,' data-list="checked"'];case"unchecked":return[n,' data-list="unchecked"'];default:return[n,""]}}function Bh(t){return t.reduce(((t,n)=>{if("string"==typeof n.insert){const r=n.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,n.attributes)}return t.push(n)}),new ch)}function Ch(t,n){let{index:r,length:e}=t;return new Eh(r+n,e)}class Dh{static DEFAULTS={};constructor(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.quill=t,this.options=n}}const Vh="\ufeff";class Hh extends jf{constructor(t,n){super(t,n),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach((t=>{this.contentNode.appendChild(t)})),this.leftGuard=document.createTextNode(Vh),this.rightGuard=document.createTextNode(Vh),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,n)}restore(t){let n,r=null;const e=t.data.split(Vh).join("");if(t===this.leftGuard)if(this.prev instanceof ah){const t=this.prev.length();this.prev.insertAt(t,e),r={startNode:this.prev.domNode,startOffset:t+e.length}}else n=document.createTextNode(e),this.parent.insertBefore(this.scroll.create(n),this),r={startNode:n,startOffset:e.length};else t===this.rightGuard&&(this.next instanceof ah?(this.next.insertAt(0,e),r={startNode:this.next.domNode,startOffset:e.length}):(n=document.createTextNode(e),this.parent.insertBefore(this.scroll.create(n),this.next),r={startNode:n,startOffset:e.length}));return t.data=Vh,r}update(t,n){t.forEach((t=>{if("characterData"===t.type&&(t.target===this.leftGuard||t.target===this.rightGuard)){const r=this.restore(t.target);r&&(n.range=r)}}))}}class Fh{isComposing=!1;constructor(t,n){this.scroll=t,this.emitter=n,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",(t=>{this.isComposing||this.handleCompositionStart(t)})),this.scroll.domNode.addEventListener("compositionend",(t=>{this.isComposing&&queueMicrotask((()=>{this.handleCompositionEnd(t)}))}))}handleCompositionStart(t){const n=t.target instanceof Node?this.scroll.find(t.target,!0):null;!n||n instanceof Hh||(this.emitter.emit(Oh.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(Oh.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(Oh.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(Oh.events.COMPOSITION_END,t),this.isComposing=!1}}class Uh{static DEFAULTS={modules:{}};static themes={default:Uh};modules={};constructor(t,n){this.quill=t,this.options=n}init(){Object.keys(this.options.modules).forEach((t=>{null==this.modules[t]&&this.addModule(t)}))}addModule(t){const n=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new n(this.quill,this.options.modules[t]||{}),this.modules[t]}}const Ph=t=>{const n=t.getBoundingClientRect(),r="offsetWidth"in t&&Math.abs(n.width)/t.offsetWidth||1,e="offsetHeight"in t&&Math.abs(n.height)/t.offsetHeight||1;return{top:n.top,right:n.left+t.clientWidth*r,bottom:n.top+t.clientHeight*e,left:n.left}},Zh=t=>{const n=parseInt(t,10);return Number.isNaN(n)?0:n},Wh=(t,n,r,e,i,s)=>t<r&&n>e?0:t<r?-(r-t+i):n>e?n-t>e-r?t+i-r:n-e+s:0,zh=["block","break","cursor","inline","scroll","text"],Kh=Ah("quill"),Gh=new nf;pf.uiClass="ql-ui";class Qh{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Gh,theme:"default"};static events=Oh.events;static sources=Oh.sources;static version="2.0.3";static imports={delta:ch,parchment:Ef,"core/module":Dh,"core/theme":Uh};static debug(t){!0===t&&(t="log"),Ah.level(t)}static find(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return wh.get(t)||Gh.find(t,n)}static import(t){return null==this.imports[t]&&Kh.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if("string"!=typeof(arguments.length<=0?void 0:arguments[0])){const t=arguments.length<=0?void 0:arguments[0],n=!!(arguments.length<=1?void 0:arguments[1]),r="attrName"in t?t.attrName:t.blotName;"string"==typeof r?this.register(`formats/${r}`,t,n):Object.keys(t).forEach((r=>{this.register(r,t[r],n)}))}else{const t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],r=!!(arguments.length<=2?void 0:arguments[2]);null==this.imports[t]||r||Kh.warn(`Overwriting ${t} with`,n),this.imports[t]=n,(t.startsWith("blots/")||t.startsWith("formats/"))&&n&&"boolean"!=typeof n&&"abstract"!==n.blotName&&Gh.register(n),"function"==typeof n.register&&n.register(Gh)}}constructor(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.options=function(t,n){const r=Yh(t);if(!r)throw new Error("Invalid Quill container");const e=!n.theme||n.theme===Qh.DEFAULTS.theme,i=e?Uh:Qh.import(`themes/${n.theme}`);if(!i)throw new Error(`Invalid theme ${n.theme}. Did you register it?`);const{modules:s,...o}=Qh.DEFAULTS,{modules:u,...c}=i.DEFAULTS;let l=Jh(n.modules);null!=l&&l.toolbar&&l.toolbar.constructor!==Object&&(l={...l,toolbar:{container:l.toolbar}});const a=Ku({},Jh(s),Jh(u),l),f={...o,...Xh(c),...Xh(n)};let h=n.registry;h?n.formats&&Kh.warn('Ignoring "formats" option because "registry" is specified'):h=n.formats?((t,n,r)=>{const e=new nf;return zh.forEach((t=>{const r=n.query(t);r&&e.register(r)})),t.forEach((t=>{let i=n.query(t);i||r.error(`Cannot register "${t}" specified in "formats" config. Are you sure it was registered?`);let s=0;for(;i;)if(e.register(i),i="blotName"in i?i.requiredContainer??null:null,s+=1,s>100){r.error(`Cycle detected in registering blot requiredContainer: "${t}"`);break}})),e})(n.formats,f.registry,Kh):f.registry;return{...f,registry:h,container:r,theme:i,modules:Object.entries(a).reduce(((t,n)=>{let[r,e]=n;if(!e)return t;const i=Qh.import(`modules/${r}`);return null==i?(Kh.error(`Cannot load ${r} module. Are you sure you registered it?`),t):{...t,[r]:Ku({},i.DEFAULTS||{},e)}}),{}),bounds:Yh(f.bounds)}}(t,n),this.container=this.options.container,null==this.container)return void Kh.error("Invalid Quill container",t);this.options.debug&&Qh.debug(this.options.debug);const r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",wh.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new Oh;const e=qf.blotName,i=this.options.registry.query(e);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${e}" blot`);if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new $h(this.scroll),this.selection=new _h(this.scroll,this.emitter),this.composition=new Fh(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(Oh.events.EDITOR_CHANGE,(t=>{t===Oh.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())})),this.emitter.on(Oh.events.SCROLL_UPDATE,((t,n)=>{const r=this.selection.lastRange,[e]=this.selection.getRange(),i=r&&e?{oldRange:r,newRange:e}:void 0;tv.call(this,(()=>this.editor.update(null,n,i)),t)})),this.emitter.on(Oh.events.SCROLL_EMBED_UPDATE,((t,n)=>{const r=this.selection.lastRange,[e]=this.selection.getRange(),i=r&&e?{oldRange:r,newRange:e}:void 0;tv.call(this,(()=>{const r=(new ch).retain(t.offset(this)).retain({[t.statics.blotName]:n});return this.editor.update(r,[],i)}),Qh.sources.USER)})),r){const t=this.clipboard.convert({html:`${r}<p><br></p>`,text:"\n"});this.setContents(t)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){const n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,n),t}blur(){this.selection.setRange(null)}deleteText(t,n,r){return[t,n,,r]=nv(t,n,r),tv.call(this,(()=>this.editor.deleteText(t,n)),r,t,-1*n)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const n=t();return this.allowReadOnlyEdits=!1,n}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Oh.sources.API;return tv.call(this,(()=>{const r=this.getSelection(!0);let e=new ch;if(null==r)return e;if(this.scroll.query(t,Ya.BLOCK))e=this.editor.formatLine(r.index,r.length,{[t]:n});else{if(0===r.length)return this.selection.format(t,n),e;e=this.editor.formatText(r.index,r.length,{[t]:n})}return this.setSelection(r,Oh.sources.SILENT),e}),r)}formatLine(t,n,r,e,i){let s;return[t,n,s,i]=nv(t,n,r,e,i),tv.call(this,(()=>this.editor.formatLine(t,n,s)),i,t,0)}formatText(t,n,r,e,i){let s;return[t,n,s,i]=nv(t,n,r,e,i),tv.call(this,(()=>this.editor.formatText(t,n,s)),i,t,0)}getBounds(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=null;if(r="number"==typeof t?this.selection.getBounds(t,n):this.selection.getBounds(t.index,t.length),!r)return null;const e=this.container.getBoundingClientRect();return{bottom:r.bottom-e.top,height:r.height,left:r.left-e.left,right:r.right-e.left,top:r.top-e.top,width:r.width}}getContents(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t;return[t,n]=nv(t,n),this.editor.getContents(t,n)}getFormat(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,n):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,n)}getModule(t){return this.theme.modules[t]}getSelection(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return"number"==typeof t&&(n=n??this.getLength()-t),[t,n]=nv(t,n),this.editor.getHTML(t,n)}getText(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return"number"==typeof t&&(n=n??this.getLength()-t),[t,n]=nv(t,n),this.editor.getText(t,n)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,n,r){let e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Qh.sources.API;return tv.call(this,(()=>this.editor.insertEmbed(t,n,r)),e,t)}insertText(t,n,r,e,i){let s;return[t,,s,i]=nv(t,0,r,e,i),tv.call(this,(()=>this.editor.insertText(t,n,s)),i,t,n.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,n,r){return[t,n,,r]=nv(t,n,r),tv.call(this,(()=>this.editor.removeFormat(t,n)),r,t)}scrollRectIntoView(t){((t,n)=>{const r=t.ownerDocument;let e=n,i=t;for(;i;){const t=i===r.body,n=t?{top:0,right:window.visualViewport?.width??r.documentElement.clientWidth,bottom:window.visualViewport?.height??r.documentElement.clientHeight,left:0}:Ph(i),o=getComputedStyle(i),u=Wh(e.left,e.right,n.left,n.right,Zh(o.scrollPaddingLeft),Zh(o.scrollPaddingRight)),c=Wh(e.top,e.bottom,n.top,n.bottom,Zh(o.scrollPaddingTop),Zh(o.scrollPaddingBottom));if(u||c)if(t)r.defaultView?.scrollBy(u,c);else{const{scrollLeft:t,scrollTop:n}=i;c&&(i.scrollTop+=c),u&&(i.scrollLeft+=u);const r=i.scrollLeft-t,s=i.scrollTop-n;e={left:e.left-r,top:e.top-s,right:e.right-r,bottom:e.bottom-s}}i=t||"fixed"===o.position?null:(s=i).parentElement||s.getRootNode().host||null}var s})(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,n=t&&this.selection.getBounds(t.index,t.length);n&&this.scrollRectIntoView(n)}setContents(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oh.sources.API;return tv.call(this,(()=>{t=new ch(t);const n=this.getLength(),r=this.editor.deleteText(0,n),e=this.editor.insertContents(0,t),i=this.editor.deleteText(this.getLength()-1,1);return r.compose(e).compose(i)}),n)}setSelection(t,n,r){null==t?this.selection.setRange(null,n||Qh.sources.API):([t,n,,r]=nv(t,n,r),this.selection.setRange(new Eh(Math.max(0,t),n),r),r!==Oh.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oh.sources.API;const r=(new ch).insert(t);return this.setContents(r,n)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Oh.sources.USER;const n=this.scroll.update(t);return this.selection.update(t),n}updateContents(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oh.sources.API;return tv.call(this,(()=>(t=new ch(t),this.editor.applyDelta(t))),n,!0)}}function Yh(t){return"string"==typeof t?document.querySelector(t):t}function Jh(t){return Object.entries(t??{}).reduce(((t,n)=>{let[r,e]=n;return{...t,[r]:!0===e?{}:e}}),{})}function Xh(t){return Object.fromEntries(Object.entries(t).filter((t=>void 0!==t[1])))}function tv(t,n,r,e){if(!this.isEnabled()&&n===Oh.sources.USER&&!this.allowReadOnlyEdits)return new ch;let i=null==r?null:this.getSelection();const s=this.editor.delta,o=t();if(null!=i&&(!0===r&&(r=i.index),null==e?i=rv(i,o,n):0!==e&&(i=rv(i,r,e,n)),this.setSelection(i,Oh.sources.SILENT)),o.length()>0){const t=[Oh.events.TEXT_CHANGE,o,s,n];this.emitter.emit(Oh.events.EDITOR_CHANGE,...t),n!==Oh.sources.SILENT&&this.emitter.emit(...t)}return o}function nv(t,n,r,e,i){let s={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof n?(i=e,e=r,r=n,n=t.length,t=t.index):(n=t.length,t=t.index):"number"!=typeof n&&(i=e,e=r,r=n,n=0),"object"==typeof r?(s=r,i=e):"string"==typeof r&&(null!=e?s[r]=e:i=r),[t,n,s,i=i||Oh.sources.API]}function rv(t,n,r,e){const i="number"==typeof r?r:0;if(null==t)return null;let s,o;return n&&"function"==typeof n.transformPosition?[s,o]=[t.index,t.index+t.length].map((t=>n.transformPosition(t,e!==Oh.sources.USER))):[s,o]=[t.index,t.index+t.length].map((t=>t<n||t===n&&e===Oh.sources.USER?t:i>=0?t+i:Math.max(n,t+i))),new Eh(s,o-s)}class ev extends xf{}function iv(t){return t instanceof dh||t instanceof ph}function sv(t){return"function"==typeof t.updateContent}function ov(t,n,r){r.reduce(((n,r)=>{const e=uh.Op.length(r);let i=r.attributes||{};if(null!=r.insert)if("string"==typeof r.insert){const e=r.insert;t.insertAt(n,e);const[s]=t.descendant(ff,n),o=bh(s);i=uh.AttributeMap.diff(o,i)||{}}else if("object"==typeof r.insert){const e=Object.keys(r.insert)[0];if(null==e)return n;t.insertAt(n,e,r.insert[e]);if(null!=t.scroll.query(e,Ya.INLINE)){const[r]=t.descendant(ff,n),e=bh(r);i=uh.AttributeMap.diff(e,i)||{}}}return Object.keys(i).forEach((r=>{t.formatAt(n,e,r,i[r])})),n+e}),n)}const uv={scope:Ya.BLOCK,whitelist:["right","center","justify"]},cv=new Ja("align","align",uv);new ef("align","ql-align",uv);const lv=new of("align","text-align",uv);class av extends of{value(t){let n=super.value(t);if(!n.startsWith("rgb("))return n;n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"");return`#${n.split(",").map((t=>`00${parseInt(t,10).toString(16)}`.slice(-2))).join("")}`}}new ef("color","ql-color",{scope:Ya.INLINE});const fv=new av("color","color",{scope:Ya.INLINE});new ef("background","ql-bg",{scope:Ya.INLINE});const hv=new av("background","background-color",{scope:Ya.INLINE});class vv extends ev{static create(t){const n=super.create(t);return n.setAttribute("spellcheck","false"),n}code(t,n){return this.children.map((t=>t.length()<=1?"":t.domNode.innerText)).join("\n").slice(t,t+n)}html(t,n){return`<pre>\n${hh(this.code(t,n))}\n</pre>`}}class dv extends dh{static TAB=" ";static register(){Qh.register(vv)}}class pv extends vh{}pv.blotName="code",pv.tagName="CODE",dv.blotName="code-block",dv.className="ql-code-block",dv.tagName="DIV",vv.blotName="code-block-container",vv.className="ql-code-block-container",vv.tagName="DIV",vv.allowedChildren=[dv],dv.allowedChildren=[ah,lh,yh],dv.requiredContainer=vv;const bv={scope:Ya.BLOCK,whitelist:["rtl"]},yv=new Ja("direction","dir",bv);new ef("direction","ql-direction",bv);const mv=new of("direction","direction",bv),gv={scope:Ya.INLINE,whitelist:["serif","monospace"]};new ef("font","ql-font",gv);const wv=new class extends of{value(t){return super.value(t).replace(/["']/g,"")}}("font","font-family",gv);new ef("size","ql-size",{scope:Ya.INLINE,whitelist:["small","large","huge"]});const xv=new of("size","font-size",{scope:Ya.INLINE,whitelist:["10px","18px","32px"]}),jv=Ah("quill:keyboard"),kv=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Av extends Dh{static match(t,n){return!["altKey","ctrlKey","metaKey","shiftKey"].some((r=>!!n[r]!==t[r]&&null!==n[r]))&&(n.key===t.key||n.key===t.which)}constructor(t,n){super(t,n),this.bindings={},Object.keys(this.options.bindings).forEach((t=>{this.options.bindings[t]&&this.addBinding(this.options.bindings[t])})),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},(()=>{})),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const e=function(t){if("string"==typeof t||"number"==typeof t)t={key:t};else{if("object"!=typeof t)return null;t=Zi(t)}t.shortKey&&(t[kv]=t.shortKey,delete t.shortKey);return t}(t);if(null==e)return void jv.warn("Attempted to add invalid keyboard binding",e);"function"==typeof n&&(n={handler:n}),"function"==typeof r&&(r={handler:r});(Array.isArray(e.key)?e.key:[e.key]).forEach((t=>{const i={...e,key:t,...n,...r};this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}))}listen(){this.quill.root.addEventListener("keydown",(t=>{if(t.defaultPrevented||t.isComposing)return;if(229===t.keyCode&&("Enter"===t.key||"Backspace"===t.key))return;const n=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter((n=>Av.match(t,n)));if(0===n.length)return;const r=Qh.find(t.target,!0);if(r&&r.scroll!==this.quill.scroll)return;const e=this.quill.getSelection();if(null==e||!this.quill.hasFocus())return;const[i,s]=this.quill.getLine(e.index),[o,u]=this.quill.getLeaf(e.index),[c,l]=0===e.length?[o,u]:this.quill.getLeaf(e.index+e.length),a=o instanceof Mf?o.value().slice(0,u):"",f=c instanceof Mf?c.value().slice(l):"",h={collapsed:0===e.length,empty:0===e.length&&i.length()<=1,format:this.quill.getFormat(e),line:i,offset:s,prefix:a,suffix:f,event:t};n.some((t=>{if(null!=t.collapsed&&t.collapsed!==h.collapsed)return!1;if(null!=t.empty&&t.empty!==h.empty)return!1;if(null!=t.offset&&t.offset!==h.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((t=>null==h.format[t])))return!1}else if("object"==typeof t.format&&!Object.keys(t.format).every((n=>!0===t.format[n]?null!=h.format[n]:!1===t.format[n]?null==h.format[n]:Mu(t.format[n],h.format[n]))))return!1;return!(null!=t.prefix&&!t.prefix.test(h.prefix))&&(!(null!=t.suffix&&!t.suffix.test(h.suffix))&&!0!==t.handler.call(this,e,h,t))}))&&t.preventDefault()}))}handleBackspace(t,n){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(n.prefix)?2:1;if(0===t.index||this.quill.getLength()<=1)return;let e={};const[i]=this.quill.getLine(t.index);let s=(new ch).retain(t.index-r).delete(r);if(0===n.offset){const[n]=this.quill.getLine(t.index-1);if(n){if(!("block"===n.statics.blotName&&n.length()<=1)){const n=i.formats(),r=this.quill.getFormat(t.index-1,1);if(e=uh.AttributeMap.diff(n,r)||{},Object.keys(e).length>0){const n=(new ch).retain(t.index+i.length()-2).retain(1,e);s=s.compose(n)}}}}this.quill.updateContents(s,Qh.sources.USER),this.quill.focus()}handleDelete(t,n){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(n.suffix)?2:1;if(t.index>=this.quill.getLength()-r)return;let e={};const[i]=this.quill.getLine(t.index);let s=(new ch).retain(t.index).delete(r);if(n.offset>=i.length()-1){const[n]=this.quill.getLine(t.index+1);if(n){const r=i.formats(),o=this.quill.getFormat(t.index,1);e=uh.AttributeMap.diff(r,o)||{},Object.keys(e).length>0&&(s=s.retain(n.length()-1).retain(1,e))}}this.quill.updateContents(s,Qh.sources.USER),this.quill.focus()}handleDeleteRange(t){Tv({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,n){const r=Object.keys(n.format).reduce(((t,r)=>(this.quill.scroll.query(r,Ya.BLOCK)&&!Array.isArray(n.format[r])&&(t[r]=n.format[r]),t)),{}),e=(new ch).retain(t.index).delete(t.length).insert("\n",r);this.quill.updateContents(e,Qh.sources.USER),this.quill.setSelection(t.index+1,Qh.sources.SILENT),this.quill.focus()}}const qv={bindings:{bold:Ev("bold"),italic:Ev("italic"),underline:Ev("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(t,n){return!(!n.collapsed||0===n.offset)||(this.quill.format("indent","+1",Qh.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(t,n){return!(!n.collapsed||0===n.offset)||(this.quill.format("indent","-1",Qh.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(t,n){null!=n.format.indent?this.quill.format("indent","-1",Qh.sources.USER):null!=n.format.list&&this.quill.format("list",!1,Qh.sources.USER)}},"indent code-block":Ov(!0),"outdent code-block":Ov(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(t){this.quill.deleteText(t.index-1,1,Qh.sources.USER)}},tab:{key:"Tab",handler(t,n){if(n.format.table)return!0;this.quill.history.cutoff();const r=(new ch).retain(t.index).delete(t.length).insert("\t");return this.quill.updateContents(r,Qh.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,Qh.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,Qh.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(t,n){const r={list:!1};n.format.indent&&(r.indent=!1),this.quill.formatLine(t.index,t.length,r,Qh.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(t){const[n,r]=this.quill.getLine(t.index),e={...n.formats(),list:"checked"},i=(new ch).retain(t.index).insert("\n",e).retain(n.length()-r-1).retain(1,{list:"unchecked"});this.quill.updateContents(i,Qh.sources.USER),this.quill.setSelection(t.index+1,Qh.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(t,n){const[r,e]=this.quill.getLine(t.index),i=(new ch).retain(t.index).insert("\n",n.format).retain(r.length()-e-1).retain(1,{header:null});this.quill.updateContents(i,Qh.sources.USER),this.quill.setSelection(t.index+1,Qh.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(t){const n=this.quill.getModule("table");if(n){const[r,e,i,s]=n.getTable(t),o=function(t,n,r,e){if(null==n.prev&&null==n.next)return null==r.prev&&null==r.next?0===e?-1:1:null==r.prev?-1:1;if(null==n.prev)return-1;if(null==n.next)return 1;return null}(0,e,i,s);if(null==o)return;let u=r.offset();if(o<0){const n=(new ch).retain(u).insert("\n");this.quill.updateContents(n,Qh.sources.USER),this.quill.setSelection(t.index+1,t.length,Qh.sources.SILENT)}else if(o>0){u+=r.length();const t=(new ch).retain(u).insert("\n");this.quill.updateContents(t,Qh.sources.USER),this.quill.setSelection(u,Qh.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(t,n){const{event:r,line:e}=n,i=e.offset(this.quill.scroll);r.shiftKey?this.quill.setSelection(i-1,Qh.sources.USER):this.quill.setSelection(i+e.length(),Qh.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(t,n){if(null==this.quill.scroll.query("list"))return!0;const{length:r}=n.prefix,[e,i]=this.quill.getLine(t.index);if(i>r)return!0;let s;switch(n.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(t.index," ",Qh.sources.USER),this.quill.history.cutoff();const o=(new ch).retain(t.index-i).delete(r+1).retain(e.length()-2-i).retain(1,{list:s});return this.quill.updateContents(o,Qh.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-r,Qh.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(t){const[n,r]=this.quill.getLine(t.index);let e=2,i=n;for(;null!=i&&i.length()<=1&&i.formats()["code-block"];)if(i=i.prev,e-=1,e<=0){const e=(new ch).retain(t.index+n.length()-r-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(e,Qh.sources.USER),this.quill.setSelection(t.index-1,Qh.sources.SILENT),!1}return!0}},"embed left":Mv("ArrowLeft",!1),"embed left shift":Mv("ArrowLeft",!0),"embed right":Mv("ArrowRight",!1),"embed right shift":Mv("ArrowRight",!0),"table down":_v(!1),"table up":_v(!0)}};function Ov(t){return{key:"Tab",shiftKey:!t,format:{"code-block":!0},handler(n,r){let{event:e}=r;const i=this.quill.scroll.query("code-block"),{TAB:s}=i;if(0===n.length&&!e.shiftKey)return this.quill.insertText(n.index,s,Qh.sources.USER),void this.quill.setSelection(n.index+s.length,Qh.sources.SILENT);const o=0===n.length?this.quill.getLines(n.index,1):this.quill.getLines(n);let{index:u,length:c}=n;o.forEach(((n,r)=>{t?(n.insertAt(0,s),0===r?u+=s.length:c+=s.length):n.domNode.textContent.startsWith(s)&&(n.deleteAt(0,s.length),0===r?u-=s.length:c-=s.length)})),this.quill.update(Qh.sources.USER),this.quill.setSelection(u,c,Qh.sources.SILENT)}}}function Mv(t,n){const r="ArrowLeft"===t?"prefix":"suffix";return{key:t,shiftKey:n,altKey:null,[r]:/^$/,handler(r){let{index:e}=r;"ArrowRight"===t&&(e+=r.length+1);const[i]=this.quill.getLeaf(e);return!(i instanceof jf)||("ArrowLeft"===t?n?this.quill.setSelection(r.index-1,r.length+1,Qh.sources.USER):this.quill.setSelection(r.index-1,Qh.sources.USER):n?this.quill.setSelection(r.index,r.length+1,Qh.sources.USER):this.quill.setSelection(r.index+r.length+1,Qh.sources.USER),!1)}}}function Ev(t){return{key:t[0],shortKey:!0,handler(n,r){this.quill.format(t,!r.format[t],Qh.sources.USER)}}}function _v(t){return{key:t?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(n,r){const e=t?"prev":"next",i=r.line,s=i.parent[e];if(null!=s){if("table-row"===s.statics.blotName){let t=s.children.head,n=i;for(;null!=n.prev;)n=n.prev,t=t.next;const e=t.offset(this.quill.scroll)+Math.min(r.offset,t.length()-1);this.quill.setSelection(e,0,Qh.sources.USER)}}else{const n=i.table()[e];null!=n&&(t?this.quill.setSelection(n.offset(this.quill.scroll)+n.length()-1,0,Qh.sources.USER):this.quill.setSelection(n.offset(this.quill.scroll),0,Qh.sources.USER))}return!1}}}function Tv(t){let{quill:n,range:r}=t;const e=n.getLines(r);let i={};if(e.length>1){const t=e[0].formats(),n=e[e.length-1].formats();i=uh.AttributeMap.diff(n,t)||{}}n.deleteText(r,Qh.sources.USER),Object.keys(i).length>0&&n.formatLine(r.index,1,i,Qh.sources.USER),n.setSelection(r.index,Qh.sources.SILENT)}Av.DEFAULTS=qv;const Lv=/font-weight:\s*normal/,$v=["P","OL","UL"],Sv=t=>t&&$v.includes(t.tagName);const Nv=/\bmso-list:[^;]*ignore/i,Rv=/\bmso-list:[^;]*\bl(\d+)/i,Iv=/\bmso-list:[^;]*\blevel(\d+)/i,Bv=t=>{const n=Array.from(t.querySelectorAll("[style*=mso-list]")),r=[],e=[];n.forEach((t=>{(t.getAttribute("style")||"").match(Nv)?r.push(t):e.push(t)})),r.forEach((t=>t.parentNode?.removeChild(t)));const i=t.documentElement.innerHTML,s=e.map((t=>((t,n)=>{const r=t.getAttribute("style"),e=r?.match(Rv);if(!e)return null;const i=Number(e[1]),s=r?.match(Iv),o=s?Number(s[1]):1,u=new RegExp(`@list l${i}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),c=n.match(u);return{id:i,indent:o,type:c&&"bullet"===c[1]?"bullet":"ordered",element:t}})(t,i))).filter((t=>t));for(;s.length;){const t=[];let n=s.shift();for(;n;)t.push(n),n=s.length&&s[0]?.element===n.element.nextElementSibling&&s[0].id===n.id?s.shift():null;const r=document.createElement("ul");t.forEach((t=>{const n=document.createElement("li");n.setAttribute("data-list",t.type),t.indent>1&&n.setAttribute("class","ql-indent-"+(t.indent-1)),n.innerHTML=t.element.innerHTML,r.appendChild(n)}));const e=t[0]?.element,{parentNode:i}=e??{};e&&i?.replaceChild(r,e),t.slice(1).forEach((t=>{let{element:n}=t;i?.removeChild(n)}))}};const Cv=[function(t){"urn:schemas-microsoft-com:office:word"===t.documentElement.getAttribute("xmlns:w")&&Bv(t)},function(t){t.querySelector('[id^="docs-internal-guid-"]')&&((t=>{Array.from(t.querySelectorAll('b[style*="font-weight"]')).filter((t=>t.getAttribute("style")?.match(Lv))).forEach((n=>{const r=t.createDocumentFragment();r.append(...n.childNodes),n.parentNode?.replaceChild(r,n)}))})(t),(t=>{Array.from(t.querySelectorAll("br")).filter((t=>Sv(t.previousElementSibling)&&Sv(t.nextElementSibling))).forEach((t=>{t.parentNode?.removeChild(t)}))})(t))}],Dv=Ah("quill:clipboard"),Vv=[[Node.TEXT_NODE,function(t,n,r){let e=t.data;if("O:P"===t.parentElement?.tagName)return n.insert(e.trim());if(!Kv(t)){if(0===e.trim().length&&e.includes("\n")&&!function(t,n){return t.previousElementSibling&&t.nextElementSibling&&!Wv(t.previousElementSibling,n)&&!Wv(t.nextElementSibling,n)}(t,r))return n;e=e.replace(/[^\S\u00a0]/g," "),e=e.replace(/ {2,}/g," "),(null==t.previousSibling&&null!=t.parentElement&&Wv(t.parentElement,r)||t.previousSibling instanceof Element&&Wv(t.previousSibling,r))&&(e=e.replace(/^ /,"")),(null==t.nextSibling&&null!=t.parentElement&&Wv(t.parentElement,r)||t.nextSibling instanceof Element&&Wv(t.nextSibling,r))&&(e=e.replace(/ $/,"")),e=e.replaceAll(" "," ")}return n.insert(e)}],[Node.TEXT_NODE,Yv],["br",function(t,n){Zv(n,"\n")||n.insert("\n");return n}],[Node.ELEMENT_NODE,Yv],[Node.ELEMENT_NODE,function(t,n,r){const e=r.query(t);if(null==e)return n;if(e.prototype instanceof jf){const n={},i=e.value(t);if(null!=i)return n[e.blotName]=i,(new ch).insert(n,e.formats(t,r))}else if(e.prototype instanceof gf&&!Zv(n,"\n")&&n.insert("\n"),"blotName"in e&&"formats"in e&&"function"==typeof e.formats)return Pv(n,e.blotName,e.formats(t,r),r);return n}],[Node.ELEMENT_NODE,function(t,n,r){const e=Ja.keys(t),i=ef.keys(t),s=of.keys(t),o={};return e.concat(i).concat(s).forEach((n=>{let e=r.query(n,Ya.ATTRIBUTE);null!=e&&(o[e.attrName]=e.value(t),o[e.attrName])||(e=Hv[n],null==e||e.attrName!==n&&e.keyName!==n||(o[e.attrName]=e.value(t)||void 0),e=Fv[n],null==e||e.attrName!==n&&e.keyName!==n||(e=Fv[n],o[e.attrName]=e.value(t)||void 0))})),Object.entries(o).reduce(((t,n)=>{let[e,i]=n;return Pv(t,e,i,r)}),n)}],[Node.ELEMENT_NODE,function(t,n,r){const e={},i=t.style||{};"italic"===i.fontStyle&&(e.italic=!0);"underline"===i.textDecoration&&(e.underline=!0);"line-through"===i.textDecoration&&(e.strike=!0);(i.fontWeight?.startsWith("bold")||parseInt(i.fontWeight,10)>=700)&&(e.bold=!0);if(n=Object.entries(e).reduce(((t,n)=>{let[e,i]=n;return Pv(t,e,i,r)}),n),parseFloat(i.textIndent||0)>0)return(new ch).insert("\t").concat(n);return n}],["li",function(t,n,r){const e=r.query(t);if(null==e||"list"!==e.blotName||!Zv(n,"\n"))return n;let i=-1,s=t.parentNode;for(;null!=s;)["OL","UL"].includes(s.tagName)&&(i+=1),s=s.parentNode;return i<=0?n:n.reduce(((t,n)=>n.insert?n.attributes&&"number"==typeof n.attributes.indent?t.push(n):t.insert(n.insert,{indent:i,...n.attributes||{}}):t),new ch)}],["ol, ul",function(t,n,r){const e=t;let i="OL"===e.tagName?"ordered":"bullet";const s=e.getAttribute("data-checked");s&&(i="true"===s?"checked":"unchecked");return Pv(n,"list",i,r)}],["pre",function(t,n,r){const e=r.query("code-block"),i=!e||!("formats"in e)||"function"!=typeof e.formats||e.formats(t,r);return Pv(n,"code-block",i,r)}],["tr",function(t,n,r){const e="TABLE"===t.parentElement?.tagName?t.parentElement:t.parentElement?.parentElement;if(null!=e){return Pv(n,"table",Array.from(e.querySelectorAll("tr")).indexOf(t)+1,r)}return n}],["b",Qv("bold")],["i",Qv("italic")],["strike",Qv("strike")],["style",function(){return new ch}]],Hv=[cv,yv].reduce(((t,n)=>(t[n.keyName]=n,t)),{}),Fv=[lv,hv,fv,mv,wv,xv].reduce(((t,n)=>(t[n.keyName]=n,t)),{});class Uv extends Dh{static DEFAULTS={matchers:[]};constructor(t,n){super(t,n),this.quill.root.addEventListener("copy",(t=>this.onCaptureCopy(t,!1))),this.quill.root.addEventListener("cut",(t=>this.onCaptureCopy(t,!0))),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],Vv.concat(this.options.matchers??[]).forEach((t=>{let[n,r]=t;this.addMatcher(n,r)}))}addMatcher(t,n){this.matchers.push([t,n])}convert(t){let{html:n,text:r}=t,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e[dv.blotName])return(new ch).insert(r||"",{[dv.blotName]:e[dv.blotName]});if(!n)return(new ch).insert(r||"",e);const i=this.convertHTML(n);return Zv(i,"\n")&&(null==i.ops[i.ops.length-1].attributes||e.table)?i.compose((new ch).retain(i.length()-1).delete(1)):i}normalizeHTML(t){(t=>{t.documentElement&&Cv.forEach((n=>{n(t)}))})(t)}convertHTML(t){const n=(new DOMParser).parseFromString(t,"text/html");this.normalizeHTML(n);const r=n.body,e=new WeakMap,[i,s]=this.prepareMatching(r,e);return Gv(this.quill.scroll,r,i,s,e)}dangerouslyPasteHTML(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Qh.sources.API;if("string"==typeof t){const r=this.convert({html:t,text:""});this.quill.setContents(r,n),this.quill.setSelection(0,Qh.sources.SILENT)}else{const e=this.convert({html:n,text:""});this.quill.updateContents((new ch).retain(t).concat(e),r),this.quill.setSelection(t+e.length(),Qh.sources.SILENT)}}onCaptureCopy(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.defaultPrevented)return;t.preventDefault();const[r]=this.quill.selection.getRange();if(null==r)return;const{html:e,text:i}=this.onCopy(r,n);t.clipboardData?.setData("text/plain",i),t.clipboardData?.setData("text/html",e),n&&Tv({range:r,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter((t=>"#"!==t[0])).join("\n")}onCapturePaste(t){if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const n=this.quill.getSelection(!0);if(null==n)return;const r=t.clipboardData?.getData("text/html");let e=t.clipboardData?.getData("text/plain");if(!r&&!e){const n=t.clipboardData?.getData("text/uri-list");n&&(e=this.normalizeURIList(n))}const i=Array.from(t.clipboardData?.files||[]);if(!r&&i.length>0)this.quill.uploader.upload(n,i);else{if(r&&i.length>0){const t=(new DOMParser).parseFromString(r,"text/html");if(1===t.body.childElementCount&&"IMG"===t.body.firstElementChild?.tagName)return void this.quill.uploader.upload(n,i)}this.onPaste(n,{html:r,text:e})}}onCopy(t){const n=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:n}}onPaste(t,n){let{text:r,html:e}=n;const i=this.quill.getFormat(t.index),s=this.convert({text:r,html:e},i);Dv.log("onPaste",s,{text:r,html:e});const o=(new ch).retain(t.index).delete(t.length).concat(s);this.quill.updateContents(o,Qh.sources.USER),this.quill.setSelection(o.length()-t.length,Qh.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,n){const r=[],e=[];return this.matchers.forEach((i=>{const[s,o]=i;switch(s){case Node.TEXT_NODE:e.push(o);break;case Node.ELEMENT_NODE:r.push(o);break;default:Array.from(t.querySelectorAll(s)).forEach((t=>{if(n.has(t)){const r=n.get(t);r?.push(o)}else n.set(t,[o])}))}})),[r,e]}}function Pv(t,n,r,e){return e.query(n)?t.reduce(((t,e)=>{if(!e.insert)return t;if(e.attributes&&e.attributes[n])return t.push(e);const i=r?{[n]:r}:{};return t.insert(e.insert,{...i,...e.attributes})}),new ch):t}function Zv(t,n){let r="";for(let e=t.ops.length-1;e>=0&&r.length<n.length;--e){const n=t.ops[e];if("string"!=typeof n.insert)break;r=n.insert+r}return r.slice(-1*n.length)===n}function Wv(t,n){if(!(t instanceof Element))return!1;const r=n.query(t);return!(r&&r.prototype instanceof jf)&&["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(t.tagName.toLowerCase())}const zv=new WeakMap;function Kv(t){return null!=t&&(zv.has(t)||("PRE"===t.tagName?zv.set(t,!0):zv.set(t,Kv(t.parentNode))),zv.get(t))}function Gv(t,n,r,e,i){return n.nodeType===n.TEXT_NODE?e.reduce(((r,e)=>e(n,r,t)),new ch):n.nodeType===n.ELEMENT_NODE?Array.from(n.childNodes||[]).reduce(((s,o)=>{let u=Gv(t,o,r,e,i);return o.nodeType===n.ELEMENT_NODE&&(u=r.reduce(((n,r)=>r(o,n,t)),u),u=(i.get(o)||[]).reduce(((n,r)=>r(o,n,t)),u)),s.concat(u)}),new ch):new ch}function Qv(t){return(n,r,e)=>Pv(r,t,!0,e)}function Yv(t,n,r){if(!Zv(n,"\n")){if(Wv(t,r)&&(t.childNodes.length>0||t instanceof HTMLParagraphElement))return n.insert("\n");if(n.length()>0&&t.nextSibling){let e=t.nextSibling;for(;null!=e;){if(Wv(e,r))return n.insert("\n");const t=r.query(e);if(t&&t.prototype instanceof ph)return n.insert("\n");e=e.firstChild}}}return n}class Jv extends Dh{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(t,n){super(t,n),this.quill.on(Qh.events.EDITOR_CHANGE,((t,n,r,e)=>{t===Qh.events.SELECTION_CHANGE?n&&e!==Qh.sources.SILENT&&(this.currentRange=n):t===Qh.events.TEXT_CHANGE&&(this.ignoreChange||(this.options.userOnly&&e!==Qh.sources.USER?this.transform(n):this.record(n,r)),this.currentRange=td(this.currentRange,n))})),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",(t=>{"historyUndo"===t.inputType?(this.undo(),t.preventDefault()):"historyRedo"===t.inputType&&(this.redo(),t.preventDefault())}))}change(t,n){if(0===this.stack[t].length)return;const r=this.stack[t].pop();if(!r)return;const e=this.quill.getContents(),i=r.delta.invert(e);this.stack[n].push({delta:i,range:td(r.range,i)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(r.delta,Qh.sources.USER),this.ignoreChange=!1,this.restoreSelection(r)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,n){if(0===t.ops.length)return;this.stack.redo=[];let r=t.invert(n),e=this.currentRange;const i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){const t=this.stack.undo.pop();t&&(r=r.compose(t.delta),e=t.range)}else this.lastRecorded=i;0!==r.length()&&(this.stack.undo.push({delta:r,range:e}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){Xv(this.stack.undo,t),Xv(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,Qh.sources.USER);else{const n=function(t,n){const r=n.reduce(((t,n)=>t+(n.delete||0)),0);let e=n.length()-r;(function(t,n){const r=n.ops[n.ops.length-1];if(null==r)return!1;if(null!=r.insert)return"string"==typeof r.insert&&r.insert.endsWith("\n");if(null!=r.attributes)return Object.keys(r.attributes).some((n=>null!=t.query(n,Ya.BLOCK)));return!1})(t,n)&&(e-=1);return e}(this.quill.scroll,t.delta);this.quill.setSelection(n,Qh.sources.USER)}}}function Xv(t,n){let r=n;for(let n=t.length-1;n>=0;n-=1){const e=t[n];t[n]={delta:r.transform(e.delta,!0),range:e.range&&td(e.range,r)},r=e.delta.transform(r),0===t[n].delta.length()&&t.splice(n,1)}}function td(t,n){if(!t)return t;const r=n.transformPosition(t.index);return{index:r,length:n.transformPosition(t.index+t.length)-r}}class nd extends Dh{constructor(t,n){super(t,n),t.root.addEventListener("drop",(n=>{n.preventDefault();let r=null;if(document.caretRangeFromPoint)r=document.caretRangeFromPoint(n.clientX,n.clientY);else if(document.caretPositionFromPoint){const t=document.caretPositionFromPoint(n.clientX,n.clientY);r=document.createRange(),r.setStart(t.offsetNode,t.offset),r.setEnd(t.offsetNode,t.offset)}const e=r&&t.selection.normalizeNative(r);if(e){const r=t.selection.normalizedToRange(e);n.dataTransfer?.files&&this.upload(r,n.dataTransfer.files)}}))}upload(t,n){const r=[];Array.from(n).forEach((t=>{t&&this.options.mimetypes?.includes(t.type)&&r.push(t)})),r.length>0&&this.options.handler.call(this,t,r)}}nd.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(t,n){if(!this.quill.scroll.query("image"))return;const r=n.map((t=>new Promise((n=>{const r=new FileReader;r.onload=()=>{n(r.result)},r.readAsDataURL(t)}))));Promise.all(r).then((n=>{const r=n.reduce(((t,n)=>t.insert({image:n})),(new ch).retain(t.index).delete(t.length));this.quill.updateContents(r,Oh.sources.USER),this.quill.setSelection(t.index+n.length,Oh.sources.SILENT)}))}};const rd=["insertText","insertReplacementText"];const ed=/Mac/i.test(navigator.platform);Qh.register({"blots/block":dh,"blots/block/embed":ph,"blots/break":lh,"blots/container":ev,"blots/cursor":yh,"blots/embed":Hh,"blots/inline":vh,"blots/scroll":class extends qf{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=dh;static allowedChildren=[dh,ph,ev];constructor(t,n,r){let{emitter:e}=r;super(t,n),this.emitter=e,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",(t=>this.handleDragStart(t)))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(Oh.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(Oh.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,n){this.emitter.emit(Oh.events.SCROLL_EMBED_UPDATE,t,n)}deleteAt(t,n){const[r,e]=this.line(t),[i]=this.line(t+n);if(super.deleteAt(t,n),null!=i&&r!==i&&e>0){if(r instanceof ph||i instanceof ph)return void this.optimize();const t=i.children.head instanceof lh?null:i.children.head;r.moveChildren(i,t),r.remove()}this.optimize()}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,n,r,e){super.formatAt(t,n,r,e),this.optimize()}insertAt(t,n,r){if(t>=this.length())if(null==r||null==this.scroll.query(n,Ya.BLOCK)){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t),null==r&&n.endsWith("\n")?t.insertAt(0,n.slice(0,-1),r):t.insertAt(0,n,r)}else{const t=this.scroll.create(n,r);this.appendChild(t)}else super.insertAt(t,n,r);this.optimize()}insertBefore(t,n){if(t.statics.scope===Ya.INLINE_BLOT){const r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(t),super.insertBefore(r,n)}else super.insertBefore(t,n)}insertContents(t,n){const r=this.deltaToRenderBlocks(n.concat((new ch).insert("\n"))),e=r.pop();if(null==e)return;this.batchStart();const i=r.shift();if(i){const n="block"===i.type&&(0===i.delta.length()||!this.descendant(ph,t)[0]&&t<this.length()),r="block"===i.type?i.delta:(new ch).insert({[i.key]:i.value});ov(this,t,r);const e="block"===i.type?1:0,s=t+r.length()+e;n&&this.insertAt(s-1,"\n");const o=bh(this.line(t)[0]),u=uh.AttributeMap.diff(o,i.attributes)||{};Object.keys(u).forEach((t=>{this.formatAt(s-1,1,t,u[t])})),t=s}let[s,o]=this.children.find(t);if(r.length&&(s&&(s=s.split(o),o=0),r.forEach((t=>{if("block"===t.type){ov(this.createBlock(t.attributes,s||void 0),0,t.delta)}else{const n=this.create(t.key,t.value);this.insertBefore(n,s||void 0),Object.keys(t.attributes).forEach((r=>{n.format(r,t.attributes[r])}))}}))),"block"===e.type&&e.delta.length()){ov(this,s?s.offset(s.scroll)+o:this.length(),e.delta)}this.batchEnd(),this.optimize()}isEnabled(){return"true"===this.domNode.getAttribute("contenteditable")}leaf(t){const n=this.path(t).pop();if(!n)return[null,-1];const[r,e]=n;return r instanceof ff?[r,e]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(iv,t)}lines(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;const r=(t,n,e)=>{let i=[],s=e;return t.children.forEachAt(n,e,((t,n,e)=>{iv(t)?i.push(t):t instanceof xf&&(i=i.concat(r(t,n,s))),s-=e})),i};return r(this,t,n)}optimize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.batch||(super.optimize(t,n),t.length>0&&this.emitter.emit(Oh.events.SCROLL_OPTIMIZE,t,n))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch)return void(Array.isArray(t)&&(this.batch=this.batch.concat(t)));let n=Oh.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),(t=t.filter((t=>{let{target:n}=t;const r=this.find(n,!0);return r&&!sv(r)}))).length>0&&this.emitter.emit(Oh.events.SCROLL_BEFORE_UPDATE,n,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(Oh.events.SCROLL_UPDATE,n,t)}updateEmbedAt(t,n,r){const[e]=this.descendant((t=>t instanceof ph),t);e&&e.statics.blotName===n&&sv(e)&&e.updateContent(r)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const n=[];let r=new ch;return t.forEach((t=>{const e=t?.insert;if(e)if("string"==typeof e){const i=e.split("\n");i.slice(0,-1).forEach((e=>{r.insert(e,t.attributes),n.push({type:"block",delta:r,attributes:t.attributes??{}}),r=new ch}));const s=i[i.length-1];s&&r.insert(s,t.attributes)}else{const i=Object.keys(e)[0];if(!i)return;this.query(i,Ya.INLINE)?r.push(t):(r.length()&&n.push({type:"block",delta:r,attributes:{}}),r=new ch,n.push({type:"blockEmbed",key:i,value:e[i],attributes:t.attributes??{}}))}})),r.length()&&n.push({type:"block",delta:r,attributes:{}}),n}createBlock(t,n){let r;const e={};Object.entries(t).forEach((t=>{let[n,i]=t;null!=this.query(n,Ya.BLOCK&Ya.BLOT)?r=n:e[n]=i}));const i=this.create(r||this.statics.defaultChild.blotName,r?t[r]:void 0);this.insertBefore(i,n||void 0);const s=i.length();return Object.entries(e).forEach((t=>{let[n,r]=t;i.formatAt(0,s,n,r)})),i}},"blots/text":ah,"modules/clipboard":Uv,"modules/history":Jv,"modules/keyboard":Av,"modules/uploader":nd,"modules/input":class extends Dh{constructor(t,n){super(t,n),t.root.addEventListener("beforeinput",(t=>{this.handleBeforeInput(t)})),/Android/i.test(navigator.userAgent)||t.on(Qh.events.COMPOSITION_BEFORE_START,(()=>{this.handleCompositionStart()}))}deleteRange(t){Tv({range:t,quill:this.quill})}replaceText(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===t.length)return!1;if(n){const r=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents((new ch).retain(t.index).insert(n,r),Qh.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+n.length,0,Qh.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!rd.includes(t.inputType))return;const n=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!n||!0===n.collapsed)return;const r=function(t){if("string"==typeof t.data)return t.data;if(t.dataTransfer?.types.includes("text/plain"))return t.dataTransfer.getData("text/plain");return null}(t);if(null==r)return;const e=this.quill.selection.normalizeNative(n),i=e?this.quill.selection.normalizedToRange(e):null;i&&this.replaceText(i,r)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}},"modules/uiNode":class extends Dh{isListening=!1;selectionChangeDeadline=0;constructor(t,n){super(t,n),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,n){let{line:r,event:e}=n;if(!(r instanceof pf&&r.uiNode))return!0;const i="rtl"===getComputedStyle(r.domNode).direction;return!!(i&&"ArrowRight"!==e.key||!i&&"ArrowLeft"!==e.key)||(this.quill.setSelection(t.index-1,t.length+(e.shiftKey?1:0),Qh.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",(t=>{!t.defaultPrevented&&(t=>"ArrowLeft"===t.key||"ArrowRight"===t.key||"ArrowUp"===t.key||"ArrowDown"===t.key||"Home"===t.key||!(!ed||"a"!==t.key||!0!==t.ctrlKey))(t)&&this.ensureListeningToSelectionChange()}))}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+100,this.isListening)return;this.isListening=!0;document.addEventListener("selectionchange",(()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()}),{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const n=t.getRangeAt(0);if(!0!==n.collapsed||0!==n.startOffset)return;const r=this.quill.scroll.find(n.startContainer);if(!(r instanceof pf&&r.uiNode))return;const e=document.createRange();e.setStartAfter(r.uiNode),e.setEndAfter(r.uiNode),t.removeAllRanges(),t.addRange(e)}}});const id=Ah("quill:toolbar");class sd extends Dh{constructor(t,n){if(super(t,n),Array.isArray(this.options.container)){const n=document.createElement("div");n.setAttribute("role","toolbar"),function(t,n){Array.isArray(n[0])||(n=[n]);n.forEach((n=>{const r=document.createElement("span");r.classList.add("ql-formats"),n.forEach((t=>{if("string"==typeof t)od(r,t);else{const n=Object.keys(t)[0],e=t[n];Array.isArray(e)?function(t,n,r){const e=document.createElement("select");e.classList.add(`ql-${n}`),r.forEach((t=>{const n=document.createElement("option");!1!==t?n.setAttribute("value",String(t)):n.setAttribute("selected","selected"),e.appendChild(n)})),t.appendChild(e)}(r,n,e):od(r,n,e)}})),t.appendChild(r)}))}(n,this.options.container),t.container?.parentNode?.insertBefore(n,t.container),this.container=n}else"string"==typeof this.options.container?this.container=document.querySelector(this.options.container):this.container=this.options.container;this.container instanceof HTMLElement?(this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach((t=>{const n=this.options.handlers?.[t];n&&this.addHandler(t,n)})),Array.from(this.container.querySelectorAll("button, select")).forEach((t=>{this.attach(t)})),this.quill.on(Qh.events.EDITOR_CHANGE,(()=>{const[t]=this.quill.selection.getRange();this.update(t)}))):id.error("Container required for toolbar",this.options)}addHandler(t,n){this.handlers[t]=n}attach(t){let n=Array.from(t.classList).find((t=>0===t.indexOf("ql-")));if(!n)return;if(n=n.slice(3),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]&&null==this.quill.scroll.query(n))return void id.warn("ignoring attaching to nonexistent format",n,t);const r="SELECT"===t.tagName?"change":"click";t.addEventListener(r,(r=>{let e;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;const n=t.options[t.selectedIndex];e=!n.hasAttribute("selected")&&(n.value||!1)}else e=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),r.preventDefault();this.quill.focus();const[i]=this.quill.selection.getRange();if(null!=this.handlers[n])this.handlers[n].call(this,e);else if(this.quill.scroll.query(n).prototype instanceof jf){if(e=prompt(`Enter ${n}`),!e)return;this.quill.updateContents((new ch).retain(i.index).delete(i.length).insert({[n]:e}),Qh.sources.USER)}else this.quill.format(n,e,Qh.sources.USER);this.update(i)})),this.controls.push([n,t])}update(t){const n=null==t?{}:this.quill.getFormat(t);this.controls.forEach((r=>{const[e,i]=r;if("SELECT"===i.tagName){let r=null;if(null==t)r=null;else if(null==n[e])r=i.querySelector("option[selected]");else if(!Array.isArray(n[e])){let t=n[e];"string"==typeof t&&(t=t.replace(/"/g,'\\"')),r=i.querySelector(`option[value="${t}"]`)}null==r?(i.value="",i.selectedIndex=-1):r.selected=!0}else if(null==t)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const t=n[e],r=t===i.getAttribute("value")||null!=t&&t.toString()===i.getAttribute("value")||null==t&&!i.getAttribute("value");i.classList.toggle("ql-active",r),i.setAttribute("aria-pressed",r.toString())}else{const t=null!=n[e];i.classList.toggle("ql-active",t),i.setAttribute("aria-pressed",t.toString())}}))}}function od(t,n,r){const e=document.createElement("button");e.setAttribute("type","button"),e.classList.add(`ql-${n}`),e.setAttribute("aria-pressed","false"),null!=r?(e.value=r,e.setAttribute("aria-label",`${n}: ${r}`)):e.setAttribute("aria-label",n),t.appendChild(e)}sd.DEFAULTS={},sd.DEFAULTS={container:null,handlers:{clean(){const t=this.quill.getSelection();if(null!=t)if(0===t.length){const t=this.quill.getFormat();Object.keys(t).forEach((t=>{null!=this.quill.scroll.query(t,Ya.INLINE)&&this.quill.format(t,!1,Qh.sources.USER)}))}else this.quill.removeFormat(t.index,t.length,Qh.sources.USER)},direction(t){const{align:n}=this.quill.getFormat();"rtl"===t&&null==n?this.quill.format("align","right",Qh.sources.USER):t||"right"!==n||this.quill.format("align",!1,Qh.sources.USER),this.quill.format("direction",t,Qh.sources.USER)},indent(t){const n=this.quill.getSelection(),r=this.quill.getFormat(n),e=parseInt(r.indent||0,10);if("+1"===t||"-1"===t){let n="+1"===t?1:-1;"rtl"===r.direction&&(n*=-1),this.quill.format("indent",e+n,Qh.sources.USER)}},link(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,Qh.sources.USER)},list(t){const n=this.quill.getSelection(),r=this.quill.getFormat(n);"check"===t?"checked"===r.list||"unchecked"===r.list?this.quill.format("list",!1,Qh.sources.USER):this.quill.format("list","unchecked",Qh.sources.USER):this.quill.format("list",t,Qh.sources.USER)}}};let ud=0;function cd(t,n){t.setAttribute(n,`${!("true"===t.getAttribute(n))}`)}class ld{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(()=>{this.togglePicker()})),this.label.addEventListener("keydown",(t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),cd(this.label,"aria-expanded"),cd(this.options,"aria-hidden")}buildItem(t){const n=document.createElement("span");n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item");const r=t.getAttribute("value");return r&&n.setAttribute("data-value",r),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",(()=>{this.selectItem(n,!0)})),n.addEventListener("keydown",(t=>{switch(t.key){case"Enter":this.selectItem(n,!0),t.preventDefault();break;case"Escape":this.escape(),t.preventDefault()}})),n}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>',t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${ud}`,ud+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach((n=>{const r=this.buildItem(n);t.appendChild(r),!0===n.selected&&this.selectItem(r)})),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach((t=>{this.container.setAttribute(t.name,t.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout((()=>this.label.focus()),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=this.container.querySelector(".ql-selected");t!==r&&(null!=r&&r.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),n&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const n=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(n)}else this.selectItem(null);const n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}class ad extends ld{constructor(t,n){super(t),this.label.innerHTML=n,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach((t=>{t.classList.add("ql-primary")}))}buildItem(t){const n=super.buildItem(t);return n.style.backgroundColor=t.getAttribute("value")||"",n}selectItem(t,n){super.selectItem(t,n);const r=this.label.querySelector(".ql-color-label"),e=t&&t.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=e:r.style.fill=e)}}class fd extends ld{constructor(t,n){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach((t=>{t.innerHTML=n[t.getAttribute("data-value")||""]})),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,n){super.selectItem(t,n);const r=t||this.defaultItem;if(null!=r){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}class hd{constructor(t,n){this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,(t=>{const{overflowY:n}=getComputedStyle(t,null);return"visible"!==n&&"clip"!==n})(this.quill.root)&&this.quill.root.addEventListener("scroll",(()=>{this.root.style.marginTop=-1*this.quill.root.scrollTop+"px"})),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const n=t.left+t.width/2-this.root.offsetWidth/2,r=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${n}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const e=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let s=0;if(i.right>e.right&&(s=e.right-i.right,this.root.style.left=`${n+s}px`),i.left<e.left&&(s=e.left-i.left,this.root.style.left=`${n+s}px`),i.bottom>e.bottom){const n=i.bottom-i.top,e=t.bottom-t.top+n;this.root.style.top=r-e+"px",this.root.classList.add("ql-flip")}return s}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const vd=[!1,"center","right","justify"],dd=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],pd=[!1,"serif","monospace"],bd=["1","2","3",!1],yd=["small",!1,"large","huge"];class md extends Uh{constructor(t,n){super(t,n);const r=n=>{document.body.contains(t.root)?(null==this.tooltip||this.tooltip.root.contains(n.target)||document.activeElement===this.tooltip.textbox||this.quill.hasFocus()||this.tooltip.hide(),null!=this.pickers&&this.pickers.forEach((t=>{t.container.contains(n.target)||t.close()}))):document.body.removeEventListener("click",r)};t.emitter.listenDOM("click",document.body,r)}addModule(t){const n=super.addModule(t);return"toolbar"===t&&this.extendToolbar(n),n}buildButtons(t,n){Array.from(t).forEach((t=>{(t.getAttribute("class")||"").split(/\s+/).forEach((r=>{if(r.startsWith("ql-")&&(r=r.slice(3),null!=n[r]))if("direction"===r)t.innerHTML=n[r][""]+n[r].rtl;else if("string"==typeof n[r])t.innerHTML=n[r];else{const e=t.value||"";null!=e&&n[r][e]&&(t.innerHTML=n[r][e])}}))}))}buildPickers(t,n){this.pickers=Array.from(t).map((t=>{if(t.classList.contains("ql-align")&&(null==t.querySelector("option")&&wd(t,vd),"object"==typeof n.align))return new fd(t,n.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){const r=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&wd(t,dd,"background"===r?"#ffffff":"#000000"),new ad(t,n[r])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?wd(t,pd):t.classList.contains("ql-header")?wd(t,bd):t.classList.contains("ql-size")&&wd(t,yd)),new ld(t)}));this.quill.on(Oh.events.EDITOR_CHANGE,(()=>{this.pickers.forEach((t=>{t.update()}))}))}}md.DEFAULTS=Ku({},Uh.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let t=this.container.querySelector("input.ql-image[type=file]");null==t&&(t=document.createElement("input"),t.setAttribute("type","file"),t.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),t.classList.add("ql-image"),t.addEventListener("change",(()=>{const n=this.quill.getSelection(!0);this.quill.uploader.upload(n,t.files),t.value=""})),this.container.appendChild(t)),t.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class gd extends hd{constructor(t,n){super(t,n),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",(t=>{"Enter"===t.key?(this.save(),t.preventDefault()):"Escape"===t.key&&(this.cancel(),t.preventDefault())}))}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null==this.textbox)return;null!=n?this.textbox.value=n:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);null!=r&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:n}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,Oh.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,Oh.sources.USER)),this.quill.root.scrollTop=n;break}case"video":t=function(t){let n=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(n)return`${n[1]||"https"}://www.youtube.com/embed/${n[2]}?showinfo=0`;if(n=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return`${n[1]||"https"}://player.vimeo.com/video/${n[2]}/`;return t}(t);case"formula":{if(!t)break;const n=this.quill.getSelection(!0);if(null!=n){const r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,Oh.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",Oh.sources.USER),this.quill.setSelection(r+2,Oh.sources.USER)}break}}this.textbox.value="",this.hide()}}function wd(t,n){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n.forEach((n=>{const e=document.createElement("option");n===r?e.setAttribute("selected","selected"):e.setAttribute("value",String(n)),t.appendChild(e)}))}class xd extends vh{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(t){const n=super.create(t);return n.setAttribute("href",this.sanitize(t)),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}static formats(t){return t.getAttribute("href")}static sanitize(t){return function(t,n){const r=document.createElement("a");r.href=t;const e=r.href.slice(0,r.href.indexOf(":"));return n.indexOf(e)>-1}(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,n){t===this.statics.blotName&&n?this.domNode.setAttribute("href",this.constructor.sanitize(n)):super.format(t,n)}}const jd='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>';var kd={align:{"":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',center:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',right:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',justify:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>'},background:'<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',blockquote:'<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',bold:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',clean:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',code:jd,"code-block":jd,color:'<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',direction:{"":'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',rtl:'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>'},formula:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',header:{1:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',2:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',3:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',4:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',5:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',6:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>'},italic:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',image:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',indent:{"+1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',"-1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>'},link:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',list:{bullet:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',check:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ordered:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>'},script:{sub:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',super:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>'},strike:'<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',table:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',underline:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',video:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>'};const Ad=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class qd extends gd{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",(t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(t=>{if(null!=this.linkRange){const t=this.linkRange;this.restoreFocus(),this.quill.formatText(t,"link",!1,Oh.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()})),this.quill.on(Oh.events.SELECTION_CHANGE,((t,n,r)=>{if(null!=t){if(0===t.length&&r===Oh.sources.USER){const[n,r]=this.quill.scroll.descendant(xd,t.index);if(null!=n){this.linkRange=new Eh(t.index-r,n.length());const e=xd.formats(n.domNode);this.preview.textContent=e,this.preview.setAttribute("href",e),this.show();const i=this.quill.getBounds(this.linkRange);return void(null!=i&&this.position(i))}}else delete this.linkRange;this.hide()}}))}show(){super.show(),this.root.removeAttribute("data-mode")}}class Od extends md{constructor(t,n){null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=Ad),super(t,n),this.quill.container.classList.add("ql-snow")}extendToolbar(t){null!=t.container&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),kd),this.buildPickers(t.container.querySelectorAll("select"),kd),this.tooltip=new qd(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},((n,r)=>{t.handlers.link.call(t,!r.format.link)})))}}Od.DEFAULTS=Ku({},md.DEFAULTS,{modules:{toolbar:{handlers:{link(t){if(t){const t=this.quill.getSelection();if(null==t||0===t.length)return;let n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n=`mailto:${n}`);const{tooltip:r}=this.quill.theme;r.edit("link",n)}else this.quill.format("link",!1,Qh.sources.USER)}}}}}),Qh.register("modules/toolbar",sd),Qh.register("modules/clipboard",Uv),Qh.register("modules/history",Jv),Qh.register("theme/snow",Od);let Md=class extends r{constructor(){super(...arguments),this.theme="snow",this.placeholder="Compose an epic...",this.modules={toolbar:[["bold","italic","underline"],["link"]]}}render(){return e`
12
+ <!-- Link snow theme styles manually (quill v2 doesn't bundle CSS) -->
13
+ <link
14
+ rel="stylesheet"
15
+ href="https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.snow.css"
16
+ />
17
+ <div id="editor-container"></div>
18
+ `}firstUpdated(){const t=this.shadowRoot?.getElementById("editor-container");t&&(this.quill=new Qh(t,{theme:this.theme,placeholder:this.placeholder,modules:this.modules}))}get editor(){return this.quill}};Md.styles=n`
19
+ :host {
20
+ display: block;
21
+ width: 100%;
22
+ height: 300px;
23
+ }
24
+
25
+ #editor-container {
26
+ height: 100%;
27
+ }
28
+ `,t([i({type:String})],Md.prototype,"theme",void 0),t([i({type:String})],Md.prototype,"placeholder",void 0),t([i({type:Object})],Md.prototype,"modules",void 0),Md=t([s("nile-rich-text-editor")],Md);export{Md as N};