headmin 0.1.1

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 (175) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +13 -0
  3. data/.nvmrc +1 -0
  4. data/.rubocop.yml +13 -0
  5. data/.ruby-version +1 -0
  6. data/CHANGELOG.md +5 -0
  7. data/CODE_OF_CONDUCT.md +84 -0
  8. data/Gemfile +12 -0
  9. data/Gemfile.lock +43 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +166 -0
  12. data/Rakefile +16 -0
  13. data/app/assets/images/avatar.jpg +0 -0
  14. data/app/controllers/admin/users/confirmations_controller.rb +31 -0
  15. data/app/controllers/admin/users/omniauth_callbacks_controller.rb +31 -0
  16. data/app/controllers/admin/users/passwords_controller.rb +35 -0
  17. data/app/controllers/admin/users/registrations_controller.rb +63 -0
  18. data/app/controllers/admin/users/sessions_controller.rb +28 -0
  19. data/app/controllers/admin/users/unlocks_controller.rb +31 -0
  20. data/app/controllers/concerns/headmin/acts_as_list.rb +16 -0
  21. data/app/controllers/concerns/headmin/authentication.rb +17 -0
  22. data/app/controllers/concerns/headmin/ckeditor.rb +27 -0
  23. data/app/controllers/concerns/headmin/filter.rb +5 -0
  24. data/app/controllers/concerns/headmin/pagination.rb +23 -0
  25. data/app/controllers/concerns/headmin/searchable.rb +15 -0
  26. data/app/controllers/concerns/headmin/sortable.rb +44 -0
  27. data/app/helpers/headmin/admin_helper.rb +65 -0
  28. data/app/helpers/headmin/filter_helper.rb +12 -0
  29. data/app/helpers/headmin/notification_helper.rb +31 -0
  30. data/app/views/admin/users/confirmations/new.html.erb +9 -0
  31. data/app/views/admin/users/mailer/confirmation_instructions.html.erb +5 -0
  32. data/app/views/admin/users/mailer/email_changed.html.erb +7 -0
  33. data/app/views/admin/users/mailer/password_change.html.erb +3 -0
  34. data/app/views/admin/users/mailer/reset_password_instructions.html.erb +8 -0
  35. data/app/views/admin/users/mailer/unlock_instructions.html.erb +7 -0
  36. data/app/views/admin/users/passwords/edit.html.erb +12 -0
  37. data/app/views/admin/users/passwords/new.html.erb +9 -0
  38. data/app/views/admin/users/registrations/edit.html.erb +24 -0
  39. data/app/views/admin/users/registrations/new.html.erb +11 -0
  40. data/app/views/admin/users/sessions/new.html.erb +13 -0
  41. data/app/views/admin/users/shared/_error_messages.html.erb +7 -0
  42. data/app/views/admin/users/shared/_links.html.erb +27 -0
  43. data/app/views/admin/users/unlocks/new.html.erb +10 -0
  44. data/app/views/headmin/_breadcrumbs.html.erb +23 -0
  45. data/app/views/headmin/_filters.html.erb +47 -0
  46. data/app/views/headmin/_form.html.erb +11 -0
  47. data/app/views/headmin/_heading.html.erb +9 -0
  48. data/app/views/headmin/_index.html.erb +12 -0
  49. data/app/views/headmin/_notifications.html.erb +12 -0
  50. data/app/views/headmin/_pagination.html.erb +13 -0
  51. data/app/views/headmin/_table.html.erb +13 -0
  52. data/app/views/headmin/filters/_date.html.erb +46 -0
  53. data/app/views/headmin/filters/_search.html.erb +22 -0
  54. data/app/views/headmin/filters/_select.html.erb +39 -0
  55. data/app/views/headmin/filters/filter/_button.html.erb +22 -0
  56. data/app/views/headmin/filters/filter/_menu_item.html.erb +12 -0
  57. data/app/views/headmin/filters/filter/_template.html.erb +13 -0
  58. data/app/views/headmin/forms/_actions.html.erb +32 -0
  59. data/app/views/headmin/forms/_errors.html.erb +20 -0
  60. data/app/views/headmin/forms/_group.html.erb +36 -0
  61. data/app/views/headmin/forms/fields/_checkbox.html.erb +23 -0
  62. data/app/views/headmin/forms/fields/_ckeditor.html.erb +28 -0
  63. data/app/views/headmin/forms/fields/_currency.html.erb +24 -0
  64. data/app/views/headmin/forms/fields/_date.html.erb +36 -0
  65. data/app/views/headmin/forms/fields/_email.html.erb +39 -0
  66. data/app/views/headmin/forms/fields/_file.html.erb +24 -0
  67. data/app/views/headmin/forms/fields/_image.html.erb +37 -0
  68. data/app/views/headmin/forms/fields/_label.html.erb +9 -0
  69. data/app/views/headmin/forms/fields/_multiple_select.html.erb +37 -0
  70. data/app/views/headmin/forms/fields/_password.html.erb +39 -0
  71. data/app/views/headmin/forms/fields/_repeater.html.erb +48 -0
  72. data/app/views/headmin/forms/fields/_select.html.erb +36 -0
  73. data/app/views/headmin/forms/fields/_select_tags.html.erb +32 -0
  74. data/app/views/headmin/forms/fields/_text.html.erb +39 -0
  75. data/app/views/headmin/forms/fields/_textarea.html.erb +29 -0
  76. data/app/views/headmin/forms/fields/_url.html.erb +38 -0
  77. data/app/views/headmin/forms/fields/_validation.html.erb +12 -0
  78. data/app/views/headmin/forms/fields/repeater/_row.html.erb +16 -0
  79. data/app/views/headmin/heading/_title.html.erb +24 -0
  80. data/app/views/headmin/kaminari/_first_page.html.erb +11 -0
  81. data/app/views/headmin/kaminari/_gap.html.erb +12 -0
  82. data/app/views/headmin/kaminari/_last_page.html.erb +12 -0
  83. data/app/views/headmin/kaminari/_next_page.html.erb +13 -0
  84. data/app/views/headmin/kaminari/_page.html.erb +12 -0
  85. data/app/views/headmin/kaminari/_paginator.html.erb +25 -0
  86. data/app/views/headmin/kaminari/_prev_page.html.erb +11 -0
  87. data/app/views/headmin/layout/_body.html.erb +9 -0
  88. data/app/views/headmin/layout/_content.html.erb +9 -0
  89. data/app/views/headmin/layout/_footer.html.erb +17 -0
  90. data/app/views/headmin/layout/_header.html.erb +13 -0
  91. data/app/views/headmin/layout/_main.html.erb +13 -0
  92. data/app/views/headmin/layout/_sidebar.html.erb +20 -0
  93. data/app/views/headmin/layout/dropdown/_divider.html.erb +9 -0
  94. data/app/views/headmin/layout/dropdown/_item.html.erb +17 -0
  95. data/app/views/headmin/layout/header/_account.html.erb +25 -0
  96. data/app/views/headmin/layout/header/_locale.html.erb +19 -0
  97. data/app/views/headmin/layout/sidebar/_bottom.html.erb +4 -0
  98. data/app/views/headmin/layout/sidebar/_menu.html.erb +9 -0
  99. data/app/views/headmin/layout/sidebar/menu/_account.html.erb +25 -0
  100. data/app/views/headmin/layout/sidebar/menu/_item.html.erb +16 -0
  101. data/app/views/headmin/layout/sidebar/menu/_locale.html.erb +18 -0
  102. data/app/views/headmin/table/_actions.html.erb +19 -0
  103. data/app/views/headmin/table/_body.html.erb +19 -0
  104. data/app/views/headmin/table/_foot.html.erb +15 -0
  105. data/app/views/headmin/table/_footer.html.erb +13 -0
  106. data/app/views/headmin/table/_head.html.erb +15 -0
  107. data/app/views/headmin/table/_header.html.erb +13 -0
  108. data/app/views/headmin/table/actions/_action.html.erb +10 -0
  109. data/app/views/headmin/table/actions/_delete.html.erb +8 -0
  110. data/app/views/headmin/table/actions/_export.html.erb +8 -0
  111. data/app/views/headmin/table/body/_association.html.erb +11 -0
  112. data/app/views/headmin/table/body/_boolean.erb +16 -0
  113. data/app/views/headmin/table/body/_currency.html.erb +10 -0
  114. data/app/views/headmin/table/body/_date.html.erb +11 -0
  115. data/app/views/headmin/table/body/_id.html.erb +3 -0
  116. data/app/views/headmin/table/body/_row.html.erb +9 -0
  117. data/app/views/headmin/table/body/_sort.html.erb +3 -0
  118. data/app/views/headmin/table/body/_string.html.erb +16 -0
  119. data/app/views/headmin/table/body/_text.html.erb +10 -0
  120. data/app/views/headmin/table/foot/_cell.html.erb +10 -0
  121. data/app/views/headmin/table/foot/_id.html.erb +9 -0
  122. data/app/views/headmin/table/head/_cell.html.erb +13 -0
  123. data/app/views/headmin/table/head/_empty.html.erb +1 -0
  124. data/app/views/headmin/table/head/_id.html.erb +9 -0
  125. data/app/views/headmin/table/head/_sort.html.erb +3 -0
  126. data/app/views/headmin/table/head/cell/_asc.html.erb +4 -0
  127. data/app/views/headmin/table/head/cell/_default.html.erb +7 -0
  128. data/app/views/headmin/table/head/cell/_desc.html.erb +4 -0
  129. data/app/views/layouts/admin/auth.html.erb +20 -0
  130. data/app/views/layouts/admin.html.erb +42 -0
  131. data/bin/console +15 -0
  132. data/bin/setup +8 -0
  133. data/config/locales/defaults/en.yml +215 -0
  134. data/config/locales/defaults/nl.yml +213 -0
  135. data/config/locales/devise/nl.yml +85 -0
  136. data/config/locales/en.yml +137 -0
  137. data/config/locales/nl.yml +138 -0
  138. data/dist/css/headmin.css +9874 -0
  139. data/dist/js/headmin.js +852 -0
  140. data/docs/README.md +4 -0
  141. data/docs/blocks.md +116 -0
  142. data/docs/devise.md +62 -0
  143. data/headmin.gemspec +35 -0
  144. data/lib/headmin/engine.rb +10 -0
  145. data/lib/headmin/version.rb +5 -0
  146. data/lib/headmin.rb +4 -0
  147. data/package.json +62 -0
  148. data/src/js/headmin/controllers/filter_controller.js +47 -0
  149. data/src/js/headmin/controllers/filters_controller.js +53 -0
  150. data/src/js/headmin/controllers/index_controller.js +79 -0
  151. data/src/js/headmin/controllers/repeater_controller.js +35 -0
  152. data/src/js/headmin/controllers/repeater_row_controller.js +54 -0
  153. data/src/js/headmin/controllers/table_actions_controller.js +22 -0
  154. data/src/js/headmin/controllers/table_controller.js +36 -0
  155. data/src/js/headmin/headmin.js +168 -0
  156. data/src/js/headmin.js +1 -0
  157. data/src/scss/headmin/filter.scss +33 -0
  158. data/src/scss/headmin/filters.scss +14 -0
  159. data/src/scss/headmin/form.scss +39 -0
  160. data/src/scss/headmin/general.scss +3 -0
  161. data/src/scss/headmin/layout/body.scss +6 -0
  162. data/src/scss/headmin/layout/sidebar.scss +22 -0
  163. data/src/scss/headmin/layout.scss +2 -0
  164. data/src/scss/headmin/login.scss +35 -0
  165. data/src/scss/headmin/table.scss +32 -0
  166. data/src/scss/headmin/utilities.scss +19 -0
  167. data/src/scss/headmin.scss +58 -0
  168. data/src/scss/vendor/bootstrap/variables.scss +71 -0
  169. data/src/scss/vendor/choices/cross-inverse.svg +6 -0
  170. data/src/scss/vendor/choices/cross.svg +6 -0
  171. data/src/scss/vendor/choices/custom.scss +28 -0
  172. data/src/scss/vendor/choices/variables.scss +16 -0
  173. data/webpack.config.js +30 -0
  174. data/yarn.lock +7512 -0
  175. metadata +220 -0
@@ -0,0 +1,852 @@
1
+ /******/ (function(modules) { // webpackBootstrap
2
+ /******/ // The module cache
3
+ /******/ var installedModules = {};
4
+ /******/
5
+ /******/ // The require function
6
+ /******/ function __webpack_require__(moduleId) {
7
+ /******/
8
+ /******/ // Check if module is in cache
9
+ /******/ if(installedModules[moduleId]) {
10
+ /******/ return installedModules[moduleId].exports;
11
+ /******/ }
12
+ /******/ // Create a new module (and put it into the cache)
13
+ /******/ var module = installedModules[moduleId] = {
14
+ /******/ i: moduleId,
15
+ /******/ l: false,
16
+ /******/ exports: {}
17
+ /******/ };
18
+ /******/
19
+ /******/ // Execute the module function
20
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
+ /******/
22
+ /******/ // Flag the module as loaded
23
+ /******/ module.l = true;
24
+ /******/
25
+ /******/ // Return the exports of the module
26
+ /******/ return module.exports;
27
+ /******/ }
28
+ /******/
29
+ /******/
30
+ /******/ // expose the modules object (__webpack_modules__)
31
+ /******/ __webpack_require__.m = modules;
32
+ /******/
33
+ /******/ // expose the module cache
34
+ /******/ __webpack_require__.c = installedModules;
35
+ /******/
36
+ /******/ // define getter function for harmony exports
37
+ /******/ __webpack_require__.d = function(exports, name, getter) {
38
+ /******/ if(!__webpack_require__.o(exports, name)) {
39
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
40
+ /******/ }
41
+ /******/ };
42
+ /******/
43
+ /******/ // define __esModule on exports
44
+ /******/ __webpack_require__.r = function(exports) {
45
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47
+ /******/ }
48
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
49
+ /******/ };
50
+ /******/
51
+ /******/ // create a fake namespace object
52
+ /******/ // mode & 1: value is a module id, require it
53
+ /******/ // mode & 2: merge all properties of value into the ns
54
+ /******/ // mode & 4: return value when already ns object
55
+ /******/ // mode & 8|1: behave like require
56
+ /******/ __webpack_require__.t = function(value, mode) {
57
+ /******/ if(mode & 1) value = __webpack_require__(value);
58
+ /******/ if(mode & 8) return value;
59
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60
+ /******/ var ns = Object.create(null);
61
+ /******/ __webpack_require__.r(ns);
62
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64
+ /******/ return ns;
65
+ /******/ };
66
+ /******/
67
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
68
+ /******/ __webpack_require__.n = function(module) {
69
+ /******/ var getter = module && module.__esModule ?
70
+ /******/ function getDefault() { return module['default']; } :
71
+ /******/ function getModuleExports() { return module; };
72
+ /******/ __webpack_require__.d(getter, 'a', getter);
73
+ /******/ return getter;
74
+ /******/ };
75
+ /******/
76
+ /******/ // Object.prototype.hasOwnProperty.call
77
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78
+ /******/
79
+ /******/ // __webpack_public_path__
80
+ /******/ __webpack_require__.p = "";
81
+ /******/
82
+ /******/
83
+ /******/ // Load entry module and return exports
84
+ /******/ return __webpack_require__(__webpack_require__.s = "./src/js/headmin.js");
85
+ /******/ })
86
+ /************************************************************************/
87
+ /******/ ({
88
+
89
+ /***/ "./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js":
90
+ /*!******************************************************************!*\
91
+ !*** ./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js ***!
92
+ \******************************************************************/
93
+ /*! no static exports found */
94
+ /***/ (function(module, exports, __webpack_require__) {
95
+
96
+ eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/main/actionview/app/assets/javascripts\nReleased under the MIT license\n */;\n\n(function() {\n var context = this;\n\n (function() {\n (function() {\n this.Rails = {\n linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',\n buttonClickSelector: {\n selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',\n exclude: 'form button'\n },\n inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',\n formSubmitSelector: 'form',\n formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',\n formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',\n formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',\n fileInputSelector: 'input[name][type=file]:not([disabled])',\n linkDisableSelector: 'a[data-disable-with], a[data-disable]',\n buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'\n };\n\n }).call(this);\n }).call(context);\n\n var Rails = context.Rails;\n\n (function() {\n (function() {\n var nonce;\n\n nonce = null;\n\n Rails.loadCSPNonce = function() {\n var ref;\n return nonce = (ref = document.querySelector(\"meta[name=csp-nonce]\")) != null ? ref.content : void 0;\n };\n\n Rails.cspNonce = function() {\n return nonce != null ? nonce : Rails.loadCSPNonce();\n };\n\n }).call(this);\n (function() {\n var expando, m;\n\n m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\n Rails.matches = function(element, selector) {\n if (selector.exclude != null) {\n return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n } else {\n return m.call(element, selector);\n }\n };\n\n expando = '_ujsData';\n\n Rails.getData = function(element, key) {\n var ref;\n return (ref = element[expando]) != null ? ref[key] : void 0;\n };\n\n Rails.setData = function(element, key, value) {\n if (element[expando] == null) {\n element[expando] = {};\n }\n return element[expando][key] = value;\n };\n\n Rails.$ = function(selector) {\n return Array.prototype.slice.call(document.querySelectorAll(selector));\n };\n\n }).call(this);\n (function() {\n var $, csrfParam, csrfToken;\n\n $ = Rails.$;\n\n csrfToken = Rails.csrfToken = function() {\n var meta;\n meta = document.querySelector('meta[name=csrf-token]');\n return meta && meta.content;\n };\n\n csrfParam = Rails.csrfParam = function() {\n var meta;\n meta = document.querySelector('meta[name=csrf-param]');\n return meta && meta.content;\n };\n\n Rails.CSRFProtection = function(xhr) {\n var token;\n token = csrfToken();\n if (token != null) {\n return xhr.setRequestHeader('X-CSRF-Token', token);\n }\n };\n\n Rails.refreshCSRFTokens = function() {\n var param, token;\n token = csrfToken();\n param = csrfParam();\n if ((token != null) && (param != null)) {\n return $('form input[name=\"' + param + '\"]').forEach(function(input) {\n return input.value = token;\n });\n }\n };\n\n }).call(this);\n (function() {\n var CustomEvent, fire, matches, preventDefault;\n\n matches = Rails.matches;\n\n CustomEvent = window.CustomEvent;\n\n if (typeof CustomEvent !== 'function') {\n CustomEvent = function(event, params) {\n var evt;\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n CustomEvent.prototype = window.Event.prototype;\n preventDefault = CustomEvent.prototype.preventDefault;\n CustomEvent.prototype.preventDefault = function() {\n var result;\n result = preventDefault.call(this);\n if (this.cancelable && !this.defaultPrevented) {\n Object.defineProperty(this, 'defaultPrevented', {\n get: function() {\n return true;\n }\n });\n }\n return result;\n };\n }\n\n fire = Rails.fire = function(obj, name, data) {\n var event;\n event = new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: data\n });\n obj.dispatchEvent(event);\n return !event.defaultPrevented;\n };\n\n Rails.stopEverything = function(e) {\n fire(e.target, 'ujs:everythingStopped');\n e.preventDefault();\n e.stopPropagation();\n return e.stopImmediatePropagation();\n };\n\n Rails.delegate = function(element, selector, eventType, handler) {\n return element.addEventListener(eventType, function(e) {\n var target;\n target = e.target;\n while (!(!(target instanceof Element) || matches(target, selector))) {\n target = target.parentNode;\n }\n if (target instanceof Element && handler.call(target, e) === false) {\n e.preventDefault();\n return e.stopPropagation();\n }\n });\n };\n\n }).call(this);\n (function() {\n var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;\n\n cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;\n\n AcceptHeaders = {\n '*': '*/*',\n text: 'text/plain',\n html: 'text/html',\n xml: 'application/xml, text/xml',\n json: 'application/json, text/javascript',\n script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'\n };\n\n Rails.ajax = function(options) {\n var xhr;\n options = prepareOptions(options);\n xhr = createXHR(options, function() {\n var ref, response;\n response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));\n if (Math.floor(xhr.status / 100) === 2) {\n if (typeof options.success === \"function\") {\n options.success(response, xhr.statusText, xhr);\n }\n } else {\n if (typeof options.error === \"function\") {\n options.error(response, xhr.statusText, xhr);\n }\n }\n return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : void 0;\n });\n if ((options.beforeSend != null) && !options.beforeSend(xhr, options)) {\n return false;\n }\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n return xhr.send(options.data);\n }\n };\n\n prepareOptions = function(options) {\n options.url = options.url || location.href;\n options.type = options.type.toUpperCase();\n if (options.type === 'GET' && options.data) {\n if (options.url.indexOf('?') < 0) {\n options.url += '?' + options.data;\n } else {\n options.url += '&' + options.data;\n }\n }\n if (AcceptHeaders[options.dataType] == null) {\n options.dataType = '*';\n }\n options.accept = AcceptHeaders[options.dataType];\n if (options.dataType !== '*') {\n options.accept += ', */*; q=0.01';\n }\n return options;\n };\n\n createXHR = function(options, done) {\n var xhr;\n xhr = new XMLHttpRequest();\n xhr.open(options.type, options.url, true);\n xhr.setRequestHeader('Accept', options.accept);\n if (typeof options.data === 'string') {\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n }\n if (!options.crossDomain) {\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n CSRFProtection(xhr);\n }\n xhr.withCredentials = !!options.withCredentials;\n xhr.onreadystatechange = function() {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n return done(xhr);\n }\n };\n return xhr;\n };\n\n processResponse = function(response, type) {\n var parser, script;\n if (typeof response === 'string' && typeof type === 'string') {\n if (type.match(/\\bjson\\b/)) {\n try {\n response = JSON.parse(response);\n } catch (error) {}\n } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n script = document.createElement('script');\n script.setAttribute('nonce', cspNonce());\n script.text = response;\n document.head.appendChild(script).parentNode.removeChild(script);\n } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n parser = new DOMParser();\n type = type.replace(/;.+/, '');\n try {\n response = parser.parseFromString(response, type);\n } catch (error) {}\n }\n }\n return response;\n };\n\n Rails.href = function(element) {\n return element.href;\n };\n\n Rails.isCrossDomain = function(url) {\n var e, originAnchor, urlAnchor;\n originAnchor = document.createElement('a');\n originAnchor.href = location.href;\n urlAnchor = document.createElement('a');\n try {\n urlAnchor.href = url;\n return !(((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host) || (originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host));\n } catch (error) {\n e = error;\n return true;\n }\n };\n\n }).call(this);\n (function() {\n var matches, toArray;\n\n matches = Rails.matches;\n\n toArray = function(e) {\n return Array.prototype.slice.call(e);\n };\n\n Rails.serializeElement = function(element, additionalParam) {\n var inputs, params;\n inputs = [element];\n if (matches(element, 'form')) {\n inputs = toArray(element.elements);\n }\n params = [];\n inputs.forEach(function(input) {\n if (!input.name || input.disabled) {\n return;\n }\n if (matches(input, 'fieldset[disabled] *')) {\n return;\n }\n if (matches(input, 'select')) {\n return toArray(input.options).forEach(function(option) {\n if (option.selected) {\n return params.push({\n name: input.name,\n value: option.value\n });\n }\n });\n } else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {\n return params.push({\n name: input.name,\n value: input.value\n });\n }\n });\n if (additionalParam) {\n params.push(additionalParam);\n }\n return params.map(function(param) {\n if (param.name != null) {\n return (encodeURIComponent(param.name)) + \"=\" + (encodeURIComponent(param.value));\n } else {\n return param;\n }\n }).join('&');\n };\n\n Rails.formElements = function(form, selector) {\n if (matches(form, 'form')) {\n return toArray(form.elements).filter(function(el) {\n return matches(el, selector);\n });\n } else {\n return toArray(form.querySelectorAll(selector));\n }\n };\n\n }).call(this);\n (function() {\n var allowAction, fire, stopEverything;\n\n fire = Rails.fire, stopEverything = Rails.stopEverything;\n\n Rails.handleConfirm = function(e) {\n if (!allowAction(this)) {\n return stopEverything(e);\n }\n };\n\n Rails.confirm = function(message, element) {\n return confirm(message);\n };\n\n allowAction = function(element) {\n var answer, callback, message;\n message = element.getAttribute('data-confirm');\n if (!message) {\n return true;\n }\n answer = false;\n if (fire(element, 'confirm')) {\n try {\n answer = Rails.confirm(message, element);\n } catch (error) {}\n callback = fire(element, 'confirm:complete', [answer]);\n }\n return answer && callback;\n };\n\n }).call(this);\n (function() {\n var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, isXhrRedirect, matches, setData, stopEverything;\n\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;\n\n Rails.handleDisabledElement = function(e) {\n var element;\n element = this;\n if (element.disabled) {\n return stopEverything(e);\n }\n };\n\n Rails.enableElement = function(e) {\n var element;\n if (e instanceof Event) {\n if (isXhrRedirect(e)) {\n return;\n }\n element = e.target;\n } else {\n element = e;\n }\n if (matches(element, Rails.linkDisableSelector)) {\n return enableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {\n return enableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return enableFormElements(element);\n }\n };\n\n Rails.disableElement = function(e) {\n var element;\n element = e instanceof Event ? e.target : e;\n if (matches(element, Rails.linkDisableSelector)) {\n return disableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {\n return disableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return disableFormElements(element);\n }\n };\n\n disableLinkElement = function(element) {\n var replacement;\n if (getData(element, 'ujs:disabled')) {\n return;\n }\n replacement = element.getAttribute('data-disable-with');\n if (replacement != null) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n }\n element.addEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', true);\n };\n\n enableLinkElement = function(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n if (originalText != null) {\n element.innerHTML = originalText;\n setData(element, 'ujs:enable-with', null);\n }\n element.removeEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', null);\n };\n\n disableFormElements = function(form) {\n return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);\n };\n\n disableFormElement = function(element) {\n var replacement;\n if (getData(element, 'ujs:disabled')) {\n return;\n }\n replacement = element.getAttribute('data-disable-with');\n if (replacement != null) {\n if (matches(element, 'button')) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n } else {\n setData(element, 'ujs:enable-with', element.value);\n element.value = replacement;\n }\n }\n element.disabled = true;\n return setData(element, 'ujs:disabled', true);\n };\n\n enableFormElements = function(form) {\n return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);\n };\n\n enableFormElement = function(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n if (originalText != null) {\n if (matches(element, 'button')) {\n element.innerHTML = originalText;\n } else {\n element.value = originalText;\n }\n setData(element, 'ujs:enable-with', null);\n }\n element.disabled = false;\n return setData(element, 'ujs:disabled', null);\n };\n\n isXhrRedirect = function(event) {\n var ref, xhr;\n xhr = (ref = event.detail) != null ? ref[0] : void 0;\n return (xhr != null ? xhr.getResponseHeader(\"X-Xhr-Redirect\") : void 0) != null;\n };\n\n }).call(this);\n (function() {\n var stopEverything;\n\n stopEverything = Rails.stopEverything;\n\n Rails.handleMethod = function(e) {\n var csrfParam, csrfToken, form, formContent, href, link, method;\n link = this;\n method = link.getAttribute('data-method');\n if (!method) {\n return;\n }\n href = Rails.href(link);\n csrfToken = Rails.csrfToken();\n csrfParam = Rails.csrfParam();\n form = document.createElement('form');\n formContent = \"<input name='_method' value='\" + method + \"' type='hidden' />\";\n if ((csrfParam != null) && (csrfToken != null) && !Rails.isCrossDomain(href)) {\n formContent += \"<input name='\" + csrfParam + \"' value='\" + csrfToken + \"' type='hidden' />\";\n }\n formContent += '<input type=\"submit\" />';\n form.method = 'post';\n form.action = href;\n form.target = link.target;\n form.innerHTML = formContent;\n form.style.display = 'none';\n document.body.appendChild(form);\n form.querySelector('[type=\"submit\"]').click();\n return stopEverything(e);\n };\n\n }).call(this);\n (function() {\n var ajax, fire, getData, isCrossDomain, isRemote, matches, serializeElement, setData, stopEverything,\n slice = [].slice;\n\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement;\n\n isRemote = function(element) {\n var value;\n value = element.getAttribute('data-remote');\n return (value != null) && value !== 'false';\n };\n\n Rails.handleRemote = function(e) {\n var button, data, dataType, element, method, url, withCredentials;\n element = this;\n if (!isRemote(element)) {\n return true;\n }\n if (!fire(element, 'ajax:before')) {\n fire(element, 'ajax:stopped');\n return false;\n }\n withCredentials = element.getAttribute('data-with-credentials');\n dataType = element.getAttribute('data-type') || 'script';\n if (matches(element, Rails.formSubmitSelector)) {\n button = getData(element, 'ujs:submit-button');\n method = getData(element, 'ujs:submit-button-formmethod') || element.method;\n url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;\n if (method.toUpperCase() === 'GET') {\n url = url.replace(/\\?.*$/, '');\n }\n if (element.enctype === 'multipart/form-data') {\n data = new FormData(element);\n if (button != null) {\n data.append(button.name, button.value);\n }\n } else {\n data = serializeElement(element, button);\n }\n setData(element, 'ujs:submit-button', null);\n setData(element, 'ujs:submit-button-formmethod', null);\n setData(element, 'ujs:submit-button-formaction', null);\n } else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {\n method = element.getAttribute('data-method');\n url = element.getAttribute('data-url');\n data = serializeElement(element, element.getAttribute('data-params'));\n } else {\n method = element.getAttribute('data-method');\n url = Rails.href(element);\n data = element.getAttribute('data-params');\n }\n ajax({\n type: method || 'GET',\n url: url,\n data: data,\n dataType: dataType,\n beforeSend: function(xhr, options) {\n if (fire(element, 'ajax:beforeSend', [xhr, options])) {\n return fire(element, 'ajax:send', [xhr]);\n } else {\n fire(element, 'ajax:stopped');\n return false;\n }\n },\n success: function() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:success', args);\n },\n error: function() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:error', args);\n },\n complete: function() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:complete', args);\n },\n crossDomain: isCrossDomain(url),\n withCredentials: (withCredentials != null) && withCredentials !== 'false'\n });\n return stopEverything(e);\n };\n\n Rails.formSubmitButtonClick = function(e) {\n var button, form;\n button = this;\n form = button.form;\n if (!form) {\n return;\n }\n if (button.name) {\n setData(form, 'ujs:submit-button', {\n name: button.name,\n value: button.value\n });\n }\n setData(form, 'ujs:formnovalidate-button', button.formNoValidate);\n setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));\n return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));\n };\n\n Rails.preventInsignificantClick = function(e) {\n var data, insignificantMetaClick, link, metaClick, method, nonPrimaryMouseClick;\n link = this;\n method = (link.getAttribute('data-method') || 'GET').toUpperCase();\n data = link.getAttribute('data-params');\n metaClick = e.metaKey || e.ctrlKey;\n insignificantMetaClick = metaClick && method === 'GET' && !data;\n nonPrimaryMouseClick = (e.button != null) && e.button !== 0;\n if (nonPrimaryMouseClick || insignificantMetaClick) {\n return e.stopImmediatePropagation();\n }\n };\n\n }).call(this);\n (function() {\n var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMethod, handleRemote, loadCSPNonce, preventInsignificantClick, refreshCSRFTokens;\n\n fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, loadCSPNonce = Rails.loadCSPNonce, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, preventInsignificantClick = Rails.preventInsignificantClick, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMethod = Rails.handleMethod;\n\n if ((typeof jQuery !== \"undefined\" && jQuery !== null) && (jQuery.ajax != null)) {\n if (jQuery.rails) {\n throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');\n }\n jQuery.rails = Rails;\n jQuery.ajaxPrefilter(function(options, originalOptions, xhr) {\n if (!options.crossDomain) {\n return CSRFProtection(xhr);\n }\n });\n }\n\n Rails.start = function() {\n if (window._rails_loaded) {\n throw new Error('rails-ujs has already been loaded!');\n }\n window.addEventListener('pageshow', function() {\n $(Rails.formEnableSelector).forEach(function(el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n return $(Rails.linkDisableSelector).forEach(function(el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n });\n delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.linkClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.linkClickSelector, 'click', handleConfirm);\n delegate(document, Rails.linkClickSelector, 'click', disableElement);\n delegate(document, Rails.linkClickSelector, 'click', handleRemote);\n delegate(document, Rails.linkClickSelector, 'click', handleMethod);\n delegate(document, Rails.buttonClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);\n delegate(document, Rails.buttonClickSelector, 'click', disableElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleRemote);\n delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);\n delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);\n delegate(document, Rails.inputChangeSelector, 'change', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);\n delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);\n delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', function(e) {\n return setTimeout((function() {\n return disableElement(e);\n }), 13);\n });\n delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);\n delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.formInputClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);\n delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);\n document.addEventListener('DOMContentLoaded', refreshCSRFTokens);\n document.addEventListener('DOMContentLoaded', loadCSPNonce);\n return window._rails_loaded = true;\n };\n\n if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {\n Rails.start();\n }\n\n }).call(this);\n }).call(this);\n\n if ( true && module.exports) {\n module.exports = Rails;\n } else if (true) {\n !(__WEBPACK_AMD_DEFINE_FACTORY__ = (Rails),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n }\n}).call(this);\n\n\n//# sourceURL=webpack:///./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js?");
97
+
98
+ /***/ }),
99
+
100
+ /***/ "./node_modules/@stimulus/core/dist/action.js":
101
+ /*!****************************************************!*\
102
+ !*** ./node_modules/@stimulus/core/dist/action.js ***!
103
+ \****************************************************/
104
+ /*! exports provided: Action, getDefaultEventNameForElement */
105
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
+
107
+ "use strict";
108
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Action\", function() { return Action; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getDefaultEventNameForElement\", function() { return getDefaultEventNameForElement; });\n/* harmony import */ var _action_descriptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./action_descriptor */ \"./node_modules/@stimulus/core/dist/action_descriptor.js\");\n\nvar Action = /** @class */ (function () {\n function Action(element, index, descriptor) {\n this.element = element;\n this.index = index;\n this.eventTarget = descriptor.eventTarget || element;\n this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error(\"missing event name\");\n this.eventOptions = descriptor.eventOptions || {};\n this.identifier = descriptor.identifier || error(\"missing identifier\");\n this.methodName = descriptor.methodName || error(\"missing method name\");\n }\n Action.forToken = function (token) {\n return new this(token.element, token.index, Object(_action_descriptor__WEBPACK_IMPORTED_MODULE_0__[\"parseActionDescriptorString\"])(token.content));\n };\n Action.prototype.toString = function () {\n var eventNameSuffix = this.eventTargetName ? \"@\" + this.eventTargetName : \"\";\n return \"\" + this.eventName + eventNameSuffix + \"->\" + this.identifier + \"#\" + this.methodName;\n };\n Object.defineProperty(Action.prototype, \"eventTargetName\", {\n get: function () {\n return Object(_action_descriptor__WEBPACK_IMPORTED_MODULE_0__[\"stringifyEventTarget\"])(this.eventTarget);\n },\n enumerable: false,\n configurable: true\n });\n return Action;\n}());\n\nvar defaultEventNames = {\n \"a\": function (e) { return \"click\"; },\n \"button\": function (e) { return \"click\"; },\n \"form\": function (e) { return \"submit\"; },\n \"input\": function (e) { return e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"input\"; },\n \"select\": function (e) { return \"change\"; },\n \"textarea\": function (e) { return \"input\"; }\n};\nfunction getDefaultEventNameForElement(element) {\n var tagName = element.tagName.toLowerCase();\n if (tagName in defaultEventNames) {\n return defaultEventNames[tagName](element);\n }\n}\nfunction error(message) {\n throw new Error(message);\n}\n//# sourceMappingURL=action.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/action.js?");
109
+
110
+ /***/ }),
111
+
112
+ /***/ "./node_modules/@stimulus/core/dist/action_descriptor.js":
113
+ /*!***************************************************************!*\
114
+ !*** ./node_modules/@stimulus/core/dist/action_descriptor.js ***!
115
+ \***************************************************************/
116
+ /*! exports provided: parseActionDescriptorString, stringifyEventTarget */
117
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
118
+
119
+ "use strict";
120
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseActionDescriptorString\", function() { return parseActionDescriptorString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stringifyEventTarget\", function() { return stringifyEventTarget; });\n// capture nos.: 12 23 4 43 1 5 56 7 768 9 98\nvar descriptorPattern = /^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;\nfunction parseActionDescriptorString(descriptorString) {\n var source = descriptorString.trim();\n var matches = source.match(descriptorPattern) || [];\n return {\n eventTarget: parseEventTarget(matches[4]),\n eventName: matches[2],\n eventOptions: matches[9] ? parseEventOptions(matches[9]) : {},\n identifier: matches[5],\n methodName: matches[7]\n };\n}\nfunction parseEventTarget(eventTargetName) {\n if (eventTargetName == \"window\") {\n return window;\n }\n else if (eventTargetName == \"document\") {\n return document;\n }\n}\nfunction parseEventOptions(eventOptions) {\n return eventOptions.split(\":\").reduce(function (options, token) {\n var _a;\n return Object.assign(options, (_a = {}, _a[token.replace(/^!/, \"\")] = !/^!/.test(token), _a));\n }, {});\n}\nfunction stringifyEventTarget(eventTarget) {\n if (eventTarget == window) {\n return \"window\";\n }\n else if (eventTarget == document) {\n return \"document\";\n }\n}\n//# sourceMappingURL=action_descriptor.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/action_descriptor.js?");
121
+
122
+ /***/ }),
123
+
124
+ /***/ "./node_modules/@stimulus/core/dist/application.js":
125
+ /*!*********************************************************!*\
126
+ !*** ./node_modules/@stimulus/core/dist/application.js ***!
127
+ \*********************************************************/
128
+ /*! exports provided: Application */
129
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
130
+
131
+ "use strict";
132
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Application\", function() { return Application; });\n/* harmony import */ var _dispatcher__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dispatcher */ \"./node_modules/@stimulus/core/dist/dispatcher.js\");\n/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./router */ \"./node_modules/@stimulus/core/dist/router.js\");\n/* harmony import */ var _schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schema */ \"./node_modules/@stimulus/core/dist/schema.js\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArrays = (undefined && undefined.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n\n\n\nvar Application = /** @class */ (function () {\n function Application(element, schema) {\n if (element === void 0) { element = document.documentElement; }\n if (schema === void 0) { schema = _schema__WEBPACK_IMPORTED_MODULE_2__[\"defaultSchema\"]; }\n this.logger = console;\n this.element = element;\n this.schema = schema;\n this.dispatcher = new _dispatcher__WEBPACK_IMPORTED_MODULE_0__[\"Dispatcher\"](this);\n this.router = new _router__WEBPACK_IMPORTED_MODULE_1__[\"Router\"](this);\n }\n Application.start = function (element, schema) {\n var application = new Application(element, schema);\n application.start();\n return application;\n };\n Application.prototype.start = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, domReady()];\n case 1:\n _a.sent();\n this.dispatcher.start();\n this.router.start();\n return [2 /*return*/];\n }\n });\n });\n };\n Application.prototype.stop = function () {\n this.dispatcher.stop();\n this.router.stop();\n };\n Application.prototype.register = function (identifier, controllerConstructor) {\n this.load({ identifier: identifier, controllerConstructor: controllerConstructor });\n };\n Application.prototype.load = function (head) {\n var _this = this;\n var rest = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n rest[_i - 1] = arguments[_i];\n }\n var definitions = Array.isArray(head) ? head : __spreadArrays([head], rest);\n definitions.forEach(function (definition) { return _this.router.loadDefinition(definition); });\n };\n Application.prototype.unload = function (head) {\n var _this = this;\n var rest = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n rest[_i - 1] = arguments[_i];\n }\n var identifiers = Array.isArray(head) ? head : __spreadArrays([head], rest);\n identifiers.forEach(function (identifier) { return _this.router.unloadIdentifier(identifier); });\n };\n Object.defineProperty(Application.prototype, \"controllers\", {\n // Controllers\n get: function () {\n return this.router.contexts.map(function (context) { return context.controller; });\n },\n enumerable: false,\n configurable: true\n });\n Application.prototype.getControllerForElementAndIdentifier = function (element, identifier) {\n var context = this.router.getContextForElementAndIdentifier(element, identifier);\n return context ? context.controller : null;\n };\n // Error handling\n Application.prototype.handleError = function (error, message, detail) {\n this.logger.error(\"%s\\n\\n%o\\n\\n%o\", message, error, detail);\n };\n return Application;\n}());\n\nfunction domReady() {\n return new Promise(function (resolve) {\n if (document.readyState == \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", resolve);\n }\n else {\n resolve();\n }\n });\n}\n//# sourceMappingURL=application.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/application.js?");
133
+
134
+ /***/ }),
135
+
136
+ /***/ "./node_modules/@stimulus/core/dist/binding.js":
137
+ /*!*****************************************************!*\
138
+ !*** ./node_modules/@stimulus/core/dist/binding.js ***!
139
+ \*****************************************************/
140
+ /*! exports provided: Binding */
141
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
142
+
143
+ "use strict";
144
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Binding\", function() { return Binding; });\nvar Binding = /** @class */ (function () {\n function Binding(context, action) {\n this.context = context;\n this.action = action;\n }\n Object.defineProperty(Binding.prototype, \"index\", {\n get: function () {\n return this.action.index;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"eventTarget\", {\n get: function () {\n return this.action.eventTarget;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"eventOptions\", {\n get: function () {\n return this.action.eventOptions;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"identifier\", {\n get: function () {\n return this.context.identifier;\n },\n enumerable: false,\n configurable: true\n });\n Binding.prototype.handleEvent = function (event) {\n if (this.willBeInvokedByEvent(event)) {\n this.invokeWithEvent(event);\n }\n };\n Object.defineProperty(Binding.prototype, \"eventName\", {\n get: function () {\n return this.action.eventName;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"method\", {\n get: function () {\n var method = this.controller[this.methodName];\n if (typeof method == \"function\") {\n return method;\n }\n throw new Error(\"Action \\\"\" + this.action + \"\\\" references undefined method \\\"\" + this.methodName + \"\\\"\");\n },\n enumerable: false,\n configurable: true\n });\n Binding.prototype.invokeWithEvent = function (event) {\n try {\n this.method.call(this.controller, event);\n }\n catch (error) {\n var _a = this, identifier = _a.identifier, controller = _a.controller, element = _a.element, index = _a.index;\n var detail = { identifier: identifier, controller: controller, element: element, index: index, event: event };\n this.context.handleError(error, \"invoking action \\\"\" + this.action + \"\\\"\", detail);\n }\n };\n Binding.prototype.willBeInvokedByEvent = function (event) {\n var eventTarget = event.target;\n if (this.element === eventTarget) {\n return true;\n }\n else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {\n return this.scope.containsElement(eventTarget);\n }\n else {\n return this.scope.containsElement(this.action.element);\n }\n };\n Object.defineProperty(Binding.prototype, \"controller\", {\n get: function () {\n return this.context.controller;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"methodName\", {\n get: function () {\n return this.action.methodName;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"scope\", {\n get: function () {\n return this.context.scope;\n },\n enumerable: false,\n configurable: true\n });\n return Binding;\n}());\n\n//# sourceMappingURL=binding.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/binding.js?");
145
+
146
+ /***/ }),
147
+
148
+ /***/ "./node_modules/@stimulus/core/dist/binding_observer.js":
149
+ /*!**************************************************************!*\
150
+ !*** ./node_modules/@stimulus/core/dist/binding_observer.js ***!
151
+ \**************************************************************/
152
+ /*! exports provided: BindingObserver */
153
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
154
+
155
+ "use strict";
156
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"BindingObserver\", function() { return BindingObserver; });\n/* harmony import */ var _action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./action */ \"./node_modules/@stimulus/core/dist/action.js\");\n/* harmony import */ var _binding__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./binding */ \"./node_modules/@stimulus/core/dist/binding.js\");\n/* harmony import */ var _stimulus_mutation_observers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @stimulus/mutation-observers */ \"./node_modules/@stimulus/mutation-observers/dist/index.js\");\n\n\n\nvar BindingObserver = /** @class */ (function () {\n function BindingObserver(context, delegate) {\n this.context = context;\n this.delegate = delegate;\n this.bindingsByAction = new Map;\n }\n BindingObserver.prototype.start = function () {\n if (!this.valueListObserver) {\n this.valueListObserver = new _stimulus_mutation_observers__WEBPACK_IMPORTED_MODULE_2__[\"ValueListObserver\"](this.element, this.actionAttribute, this);\n this.valueListObserver.start();\n }\n };\n BindingObserver.prototype.stop = function () {\n if (this.valueListObserver) {\n this.valueListObserver.stop();\n delete this.valueListObserver;\n this.disconnectAllActions();\n }\n };\n Object.defineProperty(BindingObserver.prototype, \"element\", {\n get: function () {\n return this.context.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"identifier\", {\n get: function () {\n return this.context.identifier;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"actionAttribute\", {\n get: function () {\n return this.schema.actionAttribute;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"schema\", {\n get: function () {\n return this.context.schema;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"bindings\", {\n get: function () {\n return Array.from(this.bindingsByAction.values());\n },\n enumerable: false,\n configurable: true\n });\n BindingObserver.prototype.connectAction = function (action) {\n var binding = new _binding__WEBPACK_IMPORTED_MODULE_1__[\"Binding\"](this.context, action);\n this.bindingsByAction.set(action, binding);\n this.delegate.bindingConnected(binding);\n };\n BindingObserver.prototype.disconnectAction = function (action) {\n var binding = this.bindingsByAction.get(action);\n if (binding) {\n this.bindingsByAction.delete(action);\n this.delegate.bindingDisconnected(binding);\n }\n };\n BindingObserver.prototype.disconnectAllActions = function () {\n var _this = this;\n this.bindings.forEach(function (binding) { return _this.delegate.bindingDisconnected(binding); });\n this.bindingsByAction.clear();\n };\n // Value observer delegate\n BindingObserver.prototype.parseValueForToken = function (token) {\n var action = _action__WEBPACK_IMPORTED_MODULE_0__[\"Action\"].forToken(token);\n if (action.identifier == this.identifier) {\n return action;\n }\n };\n BindingObserver.prototype.elementMatchedValue = function (element, action) {\n this.connectAction(action);\n };\n BindingObserver.prototype.elementUnmatchedValue = function (element, action) {\n this.disconnectAction(action);\n };\n return BindingObserver;\n}());\n\n//# sourceMappingURL=binding_observer.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/binding_observer.js?");
157
+
158
+ /***/ }),
159
+
160
+ /***/ "./node_modules/@stimulus/core/dist/blessing.js":
161
+ /*!******************************************************!*\
162
+ !*** ./node_modules/@stimulus/core/dist/blessing.js ***!
163
+ \******************************************************/
164
+ /*! exports provided: bless */
165
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
166
+
167
+ "use strict";
168
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bless\", function() { return bless; });\n/* harmony import */ var _inheritable_statics__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inheritable_statics */ \"./node_modules/@stimulus/core/dist/inheritable_statics.js\");\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __spreadArrays = (undefined && undefined.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n\n/** @hidden */\nfunction bless(constructor) {\n return shadow(constructor, getBlessedProperties(constructor));\n}\nfunction shadow(constructor, properties) {\n var shadowConstructor = extend(constructor);\n var shadowProperties = getShadowProperties(constructor.prototype, properties);\n Object.defineProperties(shadowConstructor.prototype, shadowProperties);\n return shadowConstructor;\n}\nfunction getBlessedProperties(constructor) {\n var blessings = Object(_inheritable_statics__WEBPACK_IMPORTED_MODULE_0__[\"readInheritableStaticArrayValues\"])(constructor, \"blessings\");\n return blessings.reduce(function (blessedProperties, blessing) {\n var properties = blessing(constructor);\n for (var key in properties) {\n var descriptor = blessedProperties[key] || {};\n blessedProperties[key] = Object.assign(descriptor, properties[key]);\n }\n return blessedProperties;\n }, {});\n}\nfunction getShadowProperties(prototype, properties) {\n return getOwnKeys(properties).reduce(function (shadowProperties, key) {\n var _a;\n var descriptor = getShadowedDescriptor(prototype, properties, key);\n if (descriptor) {\n Object.assign(shadowProperties, (_a = {}, _a[key] = descriptor, _a));\n }\n return shadowProperties;\n }, {});\n}\nfunction getShadowedDescriptor(prototype, properties, key) {\n var shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);\n var shadowedByValue = shadowingDescriptor && \"value\" in shadowingDescriptor;\n if (!shadowedByValue) {\n var descriptor = Object.getOwnPropertyDescriptor(properties, key).value;\n if (shadowingDescriptor) {\n descriptor.get = shadowingDescriptor.get || descriptor.get;\n descriptor.set = shadowingDescriptor.set || descriptor.set;\n }\n return descriptor;\n }\n}\nvar getOwnKeys = (function () {\n if (typeof Object.getOwnPropertySymbols == \"function\") {\n return function (object) { return __spreadArrays(Object.getOwnPropertyNames(object), Object.getOwnPropertySymbols(object)); };\n }\n else {\n return Object.getOwnPropertyNames;\n }\n})();\nvar extend = (function () {\n function extendWithReflect(constructor) {\n function extended() {\n var _newTarget = this && this instanceof extended ? this.constructor : void 0;\n return Reflect.construct(constructor, arguments, _newTarget);\n }\n extended.prototype = Object.create(constructor.prototype, {\n constructor: { value: extended }\n });\n Reflect.setPrototypeOf(extended, constructor);\n return extended;\n }\n function testReflectExtension() {\n var a = function () { this.a.call(this); };\n var b = extendWithReflect(a);\n b.prototype.a = function () { };\n return new b;\n }\n try {\n testReflectExtension();\n return extendWithReflect;\n }\n catch (error) {\n return function (constructor) { return /** @class */ (function (_super) {\n __extends(extended, _super);\n function extended() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return extended;\n }(constructor)); };\n }\n})();\n//# sourceMappingURL=blessing.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/blessing.js?");
169
+
170
+ /***/ }),
171
+
172
+ /***/ "./node_modules/@stimulus/core/dist/class_map.js":
173
+ /*!*******************************************************!*\
174
+ !*** ./node_modules/@stimulus/core/dist/class_map.js ***!
175
+ \*******************************************************/
176
+ /*! exports provided: ClassMap */
177
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
178
+
179
+ "use strict";
180
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ClassMap\", function() { return ClassMap; });\nvar ClassMap = /** @class */ (function () {\n function ClassMap(scope) {\n this.scope = scope;\n }\n ClassMap.prototype.has = function (name) {\n return this.data.has(this.getDataKey(name));\n };\n ClassMap.prototype.get = function (name) {\n return this.data.get(this.getDataKey(name));\n };\n ClassMap.prototype.getAttributeName = function (name) {\n return this.data.getAttributeNameForKey(this.getDataKey(name));\n };\n ClassMap.prototype.getDataKey = function (name) {\n return name + \"-class\";\n };\n Object.defineProperty(ClassMap.prototype, \"data\", {\n get: function () {\n return this.scope.data;\n },\n enumerable: false,\n configurable: true\n });\n return ClassMap;\n}());\n\n//# sourceMappingURL=class_map.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/class_map.js?");
181
+
182
+ /***/ }),
183
+
184
+ /***/ "./node_modules/@stimulus/core/dist/class_properties.js":
185
+ /*!**************************************************************!*\
186
+ !*** ./node_modules/@stimulus/core/dist/class_properties.js ***!
187
+ \**************************************************************/
188
+ /*! exports provided: ClassPropertiesBlessing */
189
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
190
+
191
+ "use strict";
192
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ClassPropertiesBlessing\", function() { return ClassPropertiesBlessing; });\n/* harmony import */ var _inheritable_statics__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inheritable_statics */ \"./node_modules/@stimulus/core/dist/inheritable_statics.js\");\n/* harmony import */ var _string_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./string_helpers */ \"./node_modules/@stimulus/core/dist/string_helpers.js\");\n\n\n/** @hidden */\nfunction ClassPropertiesBlessing(constructor) {\n var classes = Object(_inheritable_statics__WEBPACK_IMPORTED_MODULE_0__[\"readInheritableStaticArrayValues\"])(constructor, \"classes\");\n return classes.reduce(function (properties, classDefinition) {\n return Object.assign(properties, propertiesForClassDefinition(classDefinition));\n }, {});\n}\nfunction propertiesForClassDefinition(key) {\n var _a;\n var name = key + \"Class\";\n return _a = {},\n _a[name] = {\n get: function () {\n var classes = this.classes;\n if (classes.has(key)) {\n return classes.get(key);\n }\n else {\n var attribute = classes.getAttributeName(key);\n throw new Error(\"Missing attribute \\\"\" + attribute + \"\\\"\");\n }\n }\n },\n _a[\"has\" + Object(_string_helpers__WEBPACK_IMPORTED_MODULE_1__[\"capitalize\"])(name)] = {\n get: function () {\n return this.classes.has(key);\n }\n },\n _a;\n}\n//# sourceMappingURL=class_properties.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/class_properties.js?");
193
+
194
+ /***/ }),
195
+
196
+ /***/ "./node_modules/@stimulus/core/dist/context.js":
197
+ /*!*****************************************************!*\
198
+ !*** ./node_modules/@stimulus/core/dist/context.js ***!
199
+ \*****************************************************/
200
+ /*! exports provided: Context */
201
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
202
+
203
+ "use strict";
204
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Context\", function() { return Context; });\n/* harmony import */ var _binding_observer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./binding_observer */ \"./node_modules/@stimulus/core/dist/binding_observer.js\");\n/* harmony import */ var _value_observer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./value_observer */ \"./node_modules/@stimulus/core/dist/value_observer.js\");\n\n\nvar Context = /** @class */ (function () {\n function Context(module, scope) {\n this.module = module;\n this.scope = scope;\n this.controller = new module.controllerConstructor(this);\n this.bindingObserver = new _binding_observer__WEBPACK_IMPORTED_MODULE_0__[\"BindingObserver\"](this, this.dispatcher);\n this.valueObserver = new _value_observer__WEBPACK_IMPORTED_MODULE_1__[\"ValueObserver\"](this, this.controller);\n try {\n this.controller.initialize();\n }\n catch (error) {\n this.handleError(error, \"initializing controller\");\n }\n }\n Context.prototype.connect = function () {\n this.bindingObserver.start();\n this.valueObserver.start();\n try {\n this.controller.connect();\n }\n catch (error) {\n this.handleError(error, \"connecting controller\");\n }\n };\n Context.prototype.disconnect = function () {\n try {\n this.controller.disconnect();\n }\n catch (error) {\n this.handleError(error, \"disconnecting controller\");\n }\n this.valueObserver.stop();\n this.bindingObserver.stop();\n };\n Object.defineProperty(Context.prototype, \"application\", {\n get: function () {\n return this.module.application;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"identifier\", {\n get: function () {\n return this.module.identifier;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"schema\", {\n get: function () {\n return this.application.schema;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"dispatcher\", {\n get: function () {\n return this.application.dispatcher;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"parentElement\", {\n get: function () {\n return this.element.parentElement;\n },\n enumerable: false,\n configurable: true\n });\n // Error handling\n Context.prototype.handleError = function (error, message, detail) {\n if (detail === void 0) { detail = {}; }\n var _a = this, identifier = _a.identifier, controller = _a.controller, element = _a.element;\n detail = Object.assign({ identifier: identifier, controller: controller, element: element }, detail);\n this.application.handleError(error, \"Error \" + message, detail);\n };\n return Context;\n}());\n\n//# sourceMappingURL=context.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/context.js?");
205
+
206
+ /***/ }),
207
+
208
+ /***/ "./node_modules/@stimulus/core/dist/controller.js":
209
+ /*!********************************************************!*\
210
+ !*** ./node_modules/@stimulus/core/dist/controller.js ***!
211
+ \********************************************************/
212
+ /*! exports provided: Controller */
213
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
214
+
215
+ "use strict";
216
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Controller\", function() { return Controller; });\n/* harmony import */ var _class_properties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./class_properties */ \"./node_modules/@stimulus/core/dist/class_properties.js\");\n/* harmony import */ var _target_properties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./target_properties */ \"./node_modules/@stimulus/core/dist/target_properties.js\");\n/* harmony import */ var _value_properties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./value_properties */ \"./node_modules/@stimulus/core/dist/value_properties.js\");\n\n\n\nvar Controller = /** @class */ (function () {\n function Controller(context) {\n this.context = context;\n }\n Object.defineProperty(Controller.prototype, \"application\", {\n get: function () {\n return this.context.application;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"scope\", {\n get: function () {\n return this.context.scope;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"identifier\", {\n get: function () {\n return this.scope.identifier;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"targets\", {\n get: function () {\n return this.scope.targets;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"classes\", {\n get: function () {\n return this.scope.classes;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"data\", {\n get: function () {\n return this.scope.data;\n },\n enumerable: false,\n configurable: true\n });\n Controller.prototype.initialize = function () {\n // Override in your subclass to set up initial controller state\n };\n Controller.prototype.connect = function () {\n // Override in your subclass to respond when the controller is connected to the DOM\n };\n Controller.prototype.disconnect = function () {\n // Override in your subclass to respond when the controller is disconnected from the DOM\n };\n Controller.blessings = [_class_properties__WEBPACK_IMPORTED_MODULE_0__[\"ClassPropertiesBlessing\"], _target_properties__WEBPACK_IMPORTED_MODULE_1__[\"TargetPropertiesBlessing\"], _value_properties__WEBPACK_IMPORTED_MODULE_2__[\"ValuePropertiesBlessing\"]];\n Controller.targets = [];\n Controller.values = {};\n return Controller;\n}());\n\n//# sourceMappingURL=controller.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/controller.js?");
217
+
218
+ /***/ }),
219
+
220
+ /***/ "./node_modules/@stimulus/core/dist/data_map.js":
221
+ /*!******************************************************!*\
222
+ !*** ./node_modules/@stimulus/core/dist/data_map.js ***!
223
+ \******************************************************/
224
+ /*! exports provided: DataMap */
225
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
226
+
227
+ "use strict";
228
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DataMap\", function() { return DataMap; });\n/* harmony import */ var _string_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./string_helpers */ \"./node_modules/@stimulus/core/dist/string_helpers.js\");\n\nvar DataMap = /** @class */ (function () {\n function DataMap(scope) {\n this.scope = scope;\n }\n Object.defineProperty(DataMap.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DataMap.prototype, \"identifier\", {\n get: function () {\n return this.scope.identifier;\n },\n enumerable: false,\n configurable: true\n });\n DataMap.prototype.get = function (key) {\n var name = this.getAttributeNameForKey(key);\n return this.element.getAttribute(name);\n };\n DataMap.prototype.set = function (key, value) {\n var name = this.getAttributeNameForKey(key);\n this.element.setAttribute(name, value);\n return this.get(key);\n };\n DataMap.prototype.has = function (key) {\n var name = this.getAttributeNameForKey(key);\n return this.element.hasAttribute(name);\n };\n DataMap.prototype.delete = function (key) {\n if (this.has(key)) {\n var name_1 = this.getAttributeNameForKey(key);\n this.element.removeAttribute(name_1);\n return true;\n }\n else {\n return false;\n }\n };\n DataMap.prototype.getAttributeNameForKey = function (key) {\n return \"data-\" + this.identifier + \"-\" + Object(_string_helpers__WEBPACK_IMPORTED_MODULE_0__[\"dasherize\"])(key);\n };\n return DataMap;\n}());\n\n//# sourceMappingURL=data_map.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/data_map.js?");
229
+
230
+ /***/ }),
231
+
232
+ /***/ "./node_modules/@stimulus/core/dist/definition.js":
233
+ /*!********************************************************!*\
234
+ !*** ./node_modules/@stimulus/core/dist/definition.js ***!
235
+ \********************************************************/
236
+ /*! exports provided: blessDefinition */
237
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
238
+
239
+ "use strict";
240
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"blessDefinition\", function() { return blessDefinition; });\n/* harmony import */ var _blessing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./blessing */ \"./node_modules/@stimulus/core/dist/blessing.js\");\n\n/** @hidden */\nfunction blessDefinition(definition) {\n return {\n identifier: definition.identifier,\n controllerConstructor: Object(_blessing__WEBPACK_IMPORTED_MODULE_0__[\"bless\"])(definition.controllerConstructor)\n };\n}\n//# sourceMappingURL=definition.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/definition.js?");
241
+
242
+ /***/ }),
243
+
244
+ /***/ "./node_modules/@stimulus/core/dist/dispatcher.js":
245
+ /*!********************************************************!*\
246
+ !*** ./node_modules/@stimulus/core/dist/dispatcher.js ***!
247
+ \********************************************************/
248
+ /*! exports provided: Dispatcher */
249
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
250
+
251
+ "use strict";
252
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Dispatcher\", function() { return Dispatcher; });\n/* harmony import */ var _event_listener__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./event_listener */ \"./node_modules/@stimulus/core/dist/event_listener.js\");\n\nvar Dispatcher = /** @class */ (function () {\n function Dispatcher(application) {\n this.application = application;\n this.eventListenerMaps = new Map;\n this.started = false;\n }\n Dispatcher.prototype.start = function () {\n if (!this.started) {\n this.started = true;\n this.eventListeners.forEach(function (eventListener) { return eventListener.connect(); });\n }\n };\n Dispatcher.prototype.stop = function () {\n if (this.started) {\n this.started = false;\n this.eventListeners.forEach(function (eventListener) { return eventListener.disconnect(); });\n }\n };\n Object.defineProperty(Dispatcher.prototype, \"eventListeners\", {\n get: function () {\n return Array.from(this.eventListenerMaps.values())\n .reduce(function (listeners, map) { return listeners.concat(Array.from(map.values())); }, []);\n },\n enumerable: false,\n configurable: true\n });\n // Binding observer delegate\n /** @hidden */\n Dispatcher.prototype.bindingConnected = function (binding) {\n this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n };\n /** @hidden */\n Dispatcher.prototype.bindingDisconnected = function (binding) {\n this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n };\n // Error handling\n Dispatcher.prototype.handleError = function (error, message, detail) {\n if (detail === void 0) { detail = {}; }\n this.application.handleError(error, \"Error \" + message, detail);\n };\n Dispatcher.prototype.fetchEventListenerForBinding = function (binding) {\n var eventTarget = binding.eventTarget, eventName = binding.eventName, eventOptions = binding.eventOptions;\n return this.fetchEventListener(eventTarget, eventName, eventOptions);\n };\n Dispatcher.prototype.fetchEventListener = function (eventTarget, eventName, eventOptions) {\n var eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n var cacheKey = this.cacheKey(eventName, eventOptions);\n var eventListener = eventListenerMap.get(cacheKey);\n if (!eventListener) {\n eventListener = this.createEventListener(eventTarget, eventName, eventOptions);\n eventListenerMap.set(cacheKey, eventListener);\n }\n return eventListener;\n };\n Dispatcher.prototype.createEventListener = function (eventTarget, eventName, eventOptions) {\n var eventListener = new _event_listener__WEBPACK_IMPORTED_MODULE_0__[\"EventListener\"](eventTarget, eventName, eventOptions);\n if (this.started) {\n eventListener.connect();\n }\n return eventListener;\n };\n Dispatcher.prototype.fetchEventListenerMapForEventTarget = function (eventTarget) {\n var eventListenerMap = this.eventListenerMaps.get(eventTarget);\n if (!eventListenerMap) {\n eventListenerMap = new Map;\n this.eventListenerMaps.set(eventTarget, eventListenerMap);\n }\n return eventListenerMap;\n };\n Dispatcher.prototype.cacheKey = function (eventName, eventOptions) {\n var parts = [eventName];\n Object.keys(eventOptions).sort().forEach(function (key) {\n parts.push(\"\" + (eventOptions[key] ? \"\" : \"!\") + key);\n });\n return parts.join(\":\");\n };\n return Dispatcher;\n}());\n\n//# sourceMappingURL=dispatcher.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/dispatcher.js?");
253
+
254
+ /***/ }),
255
+
256
+ /***/ "./node_modules/@stimulus/core/dist/event_listener.js":
257
+ /*!************************************************************!*\
258
+ !*** ./node_modules/@stimulus/core/dist/event_listener.js ***!
259
+ \************************************************************/
260
+ /*! exports provided: EventListener */
261
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
262
+
263
+ "use strict";
264
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EventListener\", function() { return EventListener; });\nvar EventListener = /** @class */ (function () {\n function EventListener(eventTarget, eventName, eventOptions) {\n this.eventTarget = eventTarget;\n this.eventName = eventName;\n this.eventOptions = eventOptions;\n this.unorderedBindings = new Set();\n }\n EventListener.prototype.connect = function () {\n this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);\n };\n EventListener.prototype.disconnect = function () {\n this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);\n };\n // Binding observer delegate\n /** @hidden */\n EventListener.prototype.bindingConnected = function (binding) {\n this.unorderedBindings.add(binding);\n };\n /** @hidden */\n EventListener.prototype.bindingDisconnected = function (binding) {\n this.unorderedBindings.delete(binding);\n };\n EventListener.prototype.handleEvent = function (event) {\n var extendedEvent = extendEvent(event);\n for (var _i = 0, _a = this.bindings; _i < _a.length; _i++) {\n var binding = _a[_i];\n if (extendedEvent.immediatePropagationStopped) {\n break;\n }\n else {\n binding.handleEvent(extendedEvent);\n }\n }\n };\n Object.defineProperty(EventListener.prototype, \"bindings\", {\n get: function () {\n return Array.from(this.unorderedBindings).sort(function (left, right) {\n var leftIndex = left.index, rightIndex = right.index;\n return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n });\n },\n enumerable: false,\n configurable: true\n });\n return EventListener;\n}());\n\nfunction extendEvent(event) {\n if (\"immediatePropagationStopped\" in event) {\n return event;\n }\n else {\n var stopImmediatePropagation_1 = event.stopImmediatePropagation;\n return Object.assign(event, {\n immediatePropagationStopped: false,\n stopImmediatePropagation: function () {\n this.immediatePropagationStopped = true;\n stopImmediatePropagation_1.call(this);\n }\n });\n }\n}\n//# sourceMappingURL=event_listener.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/event_listener.js?");
265
+
266
+ /***/ }),
267
+
268
+ /***/ "./node_modules/@stimulus/core/dist/guide.js":
269
+ /*!***************************************************!*\
270
+ !*** ./node_modules/@stimulus/core/dist/guide.js ***!
271
+ \***************************************************/
272
+ /*! exports provided: Guide */
273
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
274
+
275
+ "use strict";
276
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Guide\", function() { return Guide; });\nvar Guide = /** @class */ (function () {\n function Guide(logger) {\n this.warnedKeysByObject = new WeakMap;\n this.logger = logger;\n }\n Guide.prototype.warn = function (object, key, message) {\n var warnedKeys = this.warnedKeysByObject.get(object);\n if (!warnedKeys) {\n warnedKeys = new Set;\n this.warnedKeysByObject.set(object, warnedKeys);\n }\n if (!warnedKeys.has(key)) {\n warnedKeys.add(key);\n this.logger.warn(message, object);\n }\n };\n return Guide;\n}());\n\n//# sourceMappingURL=guide.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/guide.js?");
277
+
278
+ /***/ }),
279
+
280
+ /***/ "./node_modules/@stimulus/core/dist/index.js":
281
+ /*!***************************************************!*\
282
+ !*** ./node_modules/@stimulus/core/dist/index.js ***!
283
+ \***************************************************/
284
+ /*! exports provided: Application, Context, Controller, defaultSchema */
285
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
286
+
287
+ "use strict";
288
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _application__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./application */ \"./node_modules/@stimulus/core/dist/application.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Application\", function() { return _application__WEBPACK_IMPORTED_MODULE_0__[\"Application\"]; });\n\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./context */ \"./node_modules/@stimulus/core/dist/context.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Context\", function() { return _context__WEBPACK_IMPORTED_MODULE_1__[\"Context\"]; });\n\n/* harmony import */ var _controller__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./controller */ \"./node_modules/@stimulus/core/dist/controller.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Controller\", function() { return _controller__WEBPACK_IMPORTED_MODULE_2__[\"Controller\"]; });\n\n/* harmony import */ var _schema__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./schema */ \"./node_modules/@stimulus/core/dist/schema.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"defaultSchema\", function() { return _schema__WEBPACK_IMPORTED_MODULE_3__[\"defaultSchema\"]; });\n\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/index.js?");
289
+
290
+ /***/ }),
291
+
292
+ /***/ "./node_modules/@stimulus/core/dist/inheritable_statics.js":
293
+ /*!*****************************************************************!*\
294
+ !*** ./node_modules/@stimulus/core/dist/inheritable_statics.js ***!
295
+ \*****************************************************************/
296
+ /*! exports provided: readInheritableStaticArrayValues, readInheritableStaticObjectPairs */
297
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
298
+
299
+ "use strict";
300
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"readInheritableStaticArrayValues\", function() { return readInheritableStaticArrayValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"readInheritableStaticObjectPairs\", function() { return readInheritableStaticObjectPairs; });\nfunction readInheritableStaticArrayValues(constructor, propertyName) {\n var ancestors = getAncestorsForConstructor(constructor);\n return Array.from(ancestors.reduce(function (values, constructor) {\n getOwnStaticArrayValues(constructor, propertyName).forEach(function (name) { return values.add(name); });\n return values;\n }, new Set));\n}\nfunction readInheritableStaticObjectPairs(constructor, propertyName) {\n var ancestors = getAncestorsForConstructor(constructor);\n return ancestors.reduce(function (pairs, constructor) {\n pairs.push.apply(pairs, getOwnStaticObjectPairs(constructor, propertyName));\n return pairs;\n }, []);\n}\nfunction getAncestorsForConstructor(constructor) {\n var ancestors = [];\n while (constructor) {\n ancestors.push(constructor);\n constructor = Object.getPrototypeOf(constructor);\n }\n return ancestors.reverse();\n}\nfunction getOwnStaticArrayValues(constructor, propertyName) {\n var definition = constructor[propertyName];\n return Array.isArray(definition) ? definition : [];\n}\nfunction getOwnStaticObjectPairs(constructor, propertyName) {\n var definition = constructor[propertyName];\n return definition ? Object.keys(definition).map(function (key) { return [key, definition[key]]; }) : [];\n}\n//# sourceMappingURL=inheritable_statics.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/inheritable_statics.js?");
301
+
302
+ /***/ }),
303
+
304
+ /***/ "./node_modules/@stimulus/core/dist/module.js":
305
+ /*!****************************************************!*\
306
+ !*** ./node_modules/@stimulus/core/dist/module.js ***!
307
+ \****************************************************/
308
+ /*! exports provided: Module */
309
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
310
+
311
+ "use strict";
312
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Module\", function() { return Module; });\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./context */ \"./node_modules/@stimulus/core/dist/context.js\");\n/* harmony import */ var _definition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./definition */ \"./node_modules/@stimulus/core/dist/definition.js\");\n\n\nvar Module = /** @class */ (function () {\n function Module(application, definition) {\n this.application = application;\n this.definition = Object(_definition__WEBPACK_IMPORTED_MODULE_1__[\"blessDefinition\"])(definition);\n this.contextsByScope = new WeakMap;\n this.connectedContexts = new Set;\n }\n Object.defineProperty(Module.prototype, \"identifier\", {\n get: function () {\n return this.definition.identifier;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Module.prototype, \"controllerConstructor\", {\n get: function () {\n return this.definition.controllerConstructor;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Module.prototype, \"contexts\", {\n get: function () {\n return Array.from(this.connectedContexts);\n },\n enumerable: false,\n configurable: true\n });\n Module.prototype.connectContextForScope = function (scope) {\n var context = this.fetchContextForScope(scope);\n this.connectedContexts.add(context);\n context.connect();\n };\n Module.prototype.disconnectContextForScope = function (scope) {\n var context = this.contextsByScope.get(scope);\n if (context) {\n this.connectedContexts.delete(context);\n context.disconnect();\n }\n };\n Module.prototype.fetchContextForScope = function (scope) {\n var context = this.contextsByScope.get(scope);\n if (!context) {\n context = new _context__WEBPACK_IMPORTED_MODULE_0__[\"Context\"](this, scope);\n this.contextsByScope.set(scope, context);\n }\n return context;\n };\n return Module;\n}());\n\n//# sourceMappingURL=module.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/module.js?");
313
+
314
+ /***/ }),
315
+
316
+ /***/ "./node_modules/@stimulus/core/dist/router.js":
317
+ /*!****************************************************!*\
318
+ !*** ./node_modules/@stimulus/core/dist/router.js ***!
319
+ \****************************************************/
320
+ /*! exports provided: Router */
321
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
322
+
323
+ "use strict";
324
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Router\", function() { return Router; });\n/* harmony import */ var _module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./module */ \"./node_modules/@stimulus/core/dist/module.js\");\n/* harmony import */ var _stimulus_multimap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stimulus/multimap */ \"./node_modules/@stimulus/multimap/dist/index.js\");\n/* harmony import */ var _scope__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scope */ \"./node_modules/@stimulus/core/dist/scope.js\");\n/* harmony import */ var _scope_observer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scope_observer */ \"./node_modules/@stimulus/core/dist/scope_observer.js\");\n\n\n\n\nvar Router = /** @class */ (function () {\n function Router(application) {\n this.application = application;\n this.scopeObserver = new _scope_observer__WEBPACK_IMPORTED_MODULE_3__[\"ScopeObserver\"](this.element, this.schema, this);\n this.scopesByIdentifier = new _stimulus_multimap__WEBPACK_IMPORTED_MODULE_1__[\"Multimap\"];\n this.modulesByIdentifier = new Map;\n }\n Object.defineProperty(Router.prototype, \"element\", {\n get: function () {\n return this.application.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"schema\", {\n get: function () {\n return this.application.schema;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"logger\", {\n get: function () {\n return this.application.logger;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"controllerAttribute\", {\n get: function () {\n return this.schema.controllerAttribute;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"modules\", {\n get: function () {\n return Array.from(this.modulesByIdentifier.values());\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"contexts\", {\n get: function () {\n return this.modules.reduce(function (contexts, module) { return contexts.concat(module.contexts); }, []);\n },\n enumerable: false,\n configurable: true\n });\n Router.prototype.start = function () {\n this.scopeObserver.start();\n };\n Router.prototype.stop = function () {\n this.scopeObserver.stop();\n };\n Router.prototype.loadDefinition = function (definition) {\n this.unloadIdentifier(definition.identifier);\n var module = new _module__WEBPACK_IMPORTED_MODULE_0__[\"Module\"](this.application, definition);\n this.connectModule(module);\n };\n Router.prototype.unloadIdentifier = function (identifier) {\n var module = this.modulesByIdentifier.get(identifier);\n if (module) {\n this.disconnectModule(module);\n }\n };\n Router.prototype.getContextForElementAndIdentifier = function (element, identifier) {\n var module = this.modulesByIdentifier.get(identifier);\n if (module) {\n return module.contexts.find(function (context) { return context.element == element; });\n }\n };\n // Error handler delegate\n /** @hidden */\n Router.prototype.handleError = function (error, message, detail) {\n this.application.handleError(error, message, detail);\n };\n // Scope observer delegate\n /** @hidden */\n Router.prototype.createScopeForElementAndIdentifier = function (element, identifier) {\n return new _scope__WEBPACK_IMPORTED_MODULE_2__[\"Scope\"](this.schema, element, identifier, this.logger);\n };\n /** @hidden */\n Router.prototype.scopeConnected = function (scope) {\n this.scopesByIdentifier.add(scope.identifier, scope);\n var module = this.modulesByIdentifier.get(scope.identifier);\n if (module) {\n module.connectContextForScope(scope);\n }\n };\n /** @hidden */\n Router.prototype.scopeDisconnected = function (scope) {\n this.scopesByIdentifier.delete(scope.identifier, scope);\n var module = this.modulesByIdentifier.get(scope.identifier);\n if (module) {\n module.disconnectContextForScope(scope);\n }\n };\n // Modules\n Router.prototype.connectModule = function (module) {\n this.modulesByIdentifier.set(module.identifier, module);\n var scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach(function (scope) { return module.connectContextForScope(scope); });\n };\n Router.prototype.disconnectModule = function (module) {\n this.modulesByIdentifier.delete(module.identifier);\n var scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach(function (scope) { return module.disconnectContextForScope(scope); });\n };\n return Router;\n}());\n\n//# sourceMappingURL=router.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/router.js?");
325
+
326
+ /***/ }),
327
+
328
+ /***/ "./node_modules/@stimulus/core/dist/schema.js":
329
+ /*!****************************************************!*\
330
+ !*** ./node_modules/@stimulus/core/dist/schema.js ***!
331
+ \****************************************************/
332
+ /*! exports provided: defaultSchema */
333
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
334
+
335
+ "use strict";
336
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultSchema\", function() { return defaultSchema; });\nvar defaultSchema = {\n controllerAttribute: \"data-controller\",\n actionAttribute: \"data-action\",\n targetAttribute: \"data-target\"\n};\n//# sourceMappingURL=schema.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/schema.js?");
337
+
338
+ /***/ }),
339
+
340
+ /***/ "./node_modules/@stimulus/core/dist/scope.js":
341
+ /*!***************************************************!*\
342
+ !*** ./node_modules/@stimulus/core/dist/scope.js ***!
343
+ \***************************************************/
344
+ /*! exports provided: Scope */
345
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
346
+
347
+ "use strict";
348
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Scope\", function() { return Scope; });\n/* harmony import */ var _class_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./class_map */ \"./node_modules/@stimulus/core/dist/class_map.js\");\n/* harmony import */ var _data_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data_map */ \"./node_modules/@stimulus/core/dist/data_map.js\");\n/* harmony import */ var _guide__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./guide */ \"./node_modules/@stimulus/core/dist/guide.js\");\n/* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectors */ \"./node_modules/@stimulus/core/dist/selectors.js\");\n/* harmony import */ var _target_set__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./target_set */ \"./node_modules/@stimulus/core/dist/target_set.js\");\nvar __spreadArrays = (undefined && undefined.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n\n\n\n\n\nvar Scope = /** @class */ (function () {\n function Scope(schema, element, identifier, logger) {\n var _this = this;\n this.targets = new _target_set__WEBPACK_IMPORTED_MODULE_4__[\"TargetSet\"](this);\n this.classes = new _class_map__WEBPACK_IMPORTED_MODULE_0__[\"ClassMap\"](this);\n this.data = new _data_map__WEBPACK_IMPORTED_MODULE_1__[\"DataMap\"](this);\n this.containsElement = function (element) {\n return element.closest(_this.controllerSelector) === _this.element;\n };\n this.schema = schema;\n this.element = element;\n this.identifier = identifier;\n this.guide = new _guide__WEBPACK_IMPORTED_MODULE_2__[\"Guide\"](logger);\n }\n Scope.prototype.findElement = function (selector) {\n return this.element.matches(selector)\n ? this.element\n : this.queryElements(selector).find(this.containsElement);\n };\n Scope.prototype.findAllElements = function (selector) {\n return __spreadArrays(this.element.matches(selector) ? [this.element] : [], this.queryElements(selector).filter(this.containsElement));\n };\n Scope.prototype.queryElements = function (selector) {\n return Array.from(this.element.querySelectorAll(selector));\n };\n Object.defineProperty(Scope.prototype, \"controllerSelector\", {\n get: function () {\n return Object(_selectors__WEBPACK_IMPORTED_MODULE_3__[\"attributeValueContainsToken\"])(this.schema.controllerAttribute, this.identifier);\n },\n enumerable: false,\n configurable: true\n });\n return Scope;\n}());\n\n//# sourceMappingURL=scope.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/scope.js?");
349
+
350
+ /***/ }),
351
+
352
+ /***/ "./node_modules/@stimulus/core/dist/scope_observer.js":
353
+ /*!************************************************************!*\
354
+ !*** ./node_modules/@stimulus/core/dist/scope_observer.js ***!
355
+ \************************************************************/
356
+ /*! exports provided: ScopeObserver */
357
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
358
+
359
+ "use strict";
360
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ScopeObserver\", function() { return ScopeObserver; });\n/* harmony import */ var _stimulus_mutation_observers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stimulus/mutation-observers */ \"./node_modules/@stimulus/mutation-observers/dist/index.js\");\n\nvar ScopeObserver = /** @class */ (function () {\n function ScopeObserver(element, schema, delegate) {\n this.element = element;\n this.schema = schema;\n this.delegate = delegate;\n this.valueListObserver = new _stimulus_mutation_observers__WEBPACK_IMPORTED_MODULE_0__[\"ValueListObserver\"](this.element, this.controllerAttribute, this);\n this.scopesByIdentifierByElement = new WeakMap;\n this.scopeReferenceCounts = new WeakMap;\n }\n ScopeObserver.prototype.start = function () {\n this.valueListObserver.start();\n };\n ScopeObserver.prototype.stop = function () {\n this.valueListObserver.stop();\n };\n Object.defineProperty(ScopeObserver.prototype, \"controllerAttribute\", {\n get: function () {\n return this.schema.controllerAttribute;\n },\n enumerable: false,\n configurable: true\n });\n // Value observer delegate\n /** @hidden */\n ScopeObserver.prototype.parseValueForToken = function (token) {\n var element = token.element, identifier = token.content;\n var scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n var scope = scopesByIdentifier.get(identifier);\n if (!scope) {\n scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);\n scopesByIdentifier.set(identifier, scope);\n }\n return scope;\n };\n /** @hidden */\n ScopeObserver.prototype.elementMatchedValue = function (element, value) {\n var referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n this.scopeReferenceCounts.set(value, referenceCount);\n if (referenceCount == 1) {\n this.delegate.scopeConnected(value);\n }\n };\n /** @hidden */\n ScopeObserver.prototype.elementUnmatchedValue = function (element, value) {\n var referenceCount = this.scopeReferenceCounts.get(value);\n if (referenceCount) {\n this.scopeReferenceCounts.set(value, referenceCount - 1);\n if (referenceCount == 1) {\n this.delegate.scopeDisconnected(value);\n }\n }\n };\n ScopeObserver.prototype.fetchScopesByIdentifierForElement = function (element) {\n var scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n if (!scopesByIdentifier) {\n scopesByIdentifier = new Map;\n this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n }\n return scopesByIdentifier;\n };\n return ScopeObserver;\n}());\n\n//# sourceMappingURL=scope_observer.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/scope_observer.js?");
361
+
362
+ /***/ }),
363
+
364
+ /***/ "./node_modules/@stimulus/core/dist/selectors.js":
365
+ /*!*******************************************************!*\
366
+ !*** ./node_modules/@stimulus/core/dist/selectors.js ***!
367
+ \*******************************************************/
368
+ /*! exports provided: attributeValueContainsToken */
369
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
370
+
371
+ "use strict";
372
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"attributeValueContainsToken\", function() { return attributeValueContainsToken; });\n/** @hidden */\nfunction attributeValueContainsToken(attributeName, token) {\n return \"[\" + attributeName + \"~=\\\"\" + token + \"\\\"]\";\n}\n//# sourceMappingURL=selectors.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/selectors.js?");
373
+
374
+ /***/ }),
375
+
376
+ /***/ "./node_modules/@stimulus/core/dist/string_helpers.js":
377
+ /*!************************************************************!*\
378
+ !*** ./node_modules/@stimulus/core/dist/string_helpers.js ***!
379
+ \************************************************************/
380
+ /*! exports provided: camelize, capitalize, dasherize */
381
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
382
+
383
+ "use strict";
384
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"camelize\", function() { return camelize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"capitalize\", function() { return capitalize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dasherize\", function() { return dasherize; });\nfunction camelize(value) {\n return value.replace(/(?:[_-])([a-z0-9])/g, function (_, char) { return char.toUpperCase(); });\n}\nfunction capitalize(value) {\n return value.charAt(0).toUpperCase() + value.slice(1);\n}\nfunction dasherize(value) {\n return value.replace(/([A-Z])/g, function (_, char) { return \"-\" + char.toLowerCase(); });\n}\n//# sourceMappingURL=string_helpers.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/string_helpers.js?");
385
+
386
+ /***/ }),
387
+
388
+ /***/ "./node_modules/@stimulus/core/dist/target_properties.js":
389
+ /*!***************************************************************!*\
390
+ !*** ./node_modules/@stimulus/core/dist/target_properties.js ***!
391
+ \***************************************************************/
392
+ /*! exports provided: TargetPropertiesBlessing */
393
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
394
+
395
+ "use strict";
396
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TargetPropertiesBlessing\", function() { return TargetPropertiesBlessing; });\n/* harmony import */ var _inheritable_statics__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inheritable_statics */ \"./node_modules/@stimulus/core/dist/inheritable_statics.js\");\n/* harmony import */ var _string_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./string_helpers */ \"./node_modules/@stimulus/core/dist/string_helpers.js\");\n\n\n/** @hidden */\nfunction TargetPropertiesBlessing(constructor) {\n var targets = Object(_inheritable_statics__WEBPACK_IMPORTED_MODULE_0__[\"readInheritableStaticArrayValues\"])(constructor, \"targets\");\n return targets.reduce(function (properties, targetDefinition) {\n return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));\n }, {});\n}\nfunction propertiesForTargetDefinition(name) {\n var _a;\n return _a = {},\n _a[name + \"Target\"] = {\n get: function () {\n var target = this.targets.find(name);\n if (target) {\n return target;\n }\n else {\n throw new Error(\"Missing target element \\\"\" + this.identifier + \".\" + name + \"\\\"\");\n }\n }\n },\n _a[name + \"Targets\"] = {\n get: function () {\n return this.targets.findAll(name);\n }\n },\n _a[\"has\" + Object(_string_helpers__WEBPACK_IMPORTED_MODULE_1__[\"capitalize\"])(name) + \"Target\"] = {\n get: function () {\n return this.targets.has(name);\n }\n },\n _a;\n}\n//# sourceMappingURL=target_properties.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/target_properties.js?");
397
+
398
+ /***/ }),
399
+
400
+ /***/ "./node_modules/@stimulus/core/dist/target_set.js":
401
+ /*!********************************************************!*\
402
+ !*** ./node_modules/@stimulus/core/dist/target_set.js ***!
403
+ \********************************************************/
404
+ /*! exports provided: TargetSet */
405
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
406
+
407
+ "use strict";
408
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TargetSet\", function() { return TargetSet; });\n/* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selectors */ \"./node_modules/@stimulus/core/dist/selectors.js\");\nvar __spreadArrays = (undefined && undefined.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n\nvar TargetSet = /** @class */ (function () {\n function TargetSet(scope) {\n this.scope = scope;\n }\n Object.defineProperty(TargetSet.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TargetSet.prototype, \"identifier\", {\n get: function () {\n return this.scope.identifier;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TargetSet.prototype, \"schema\", {\n get: function () {\n return this.scope.schema;\n },\n enumerable: false,\n configurable: true\n });\n TargetSet.prototype.has = function (targetName) {\n return this.find(targetName) != null;\n };\n TargetSet.prototype.find = function () {\n var _this = this;\n var targetNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n targetNames[_i] = arguments[_i];\n }\n return targetNames.reduce(function (target, targetName) {\n return target\n || _this.findTarget(targetName)\n || _this.findLegacyTarget(targetName);\n }, undefined);\n };\n TargetSet.prototype.findAll = function () {\n var _this = this;\n var targetNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n targetNames[_i] = arguments[_i];\n }\n return targetNames.reduce(function (targets, targetName) { return __spreadArrays(targets, _this.findAllTargets(targetName), _this.findAllLegacyTargets(targetName)); }, []);\n };\n TargetSet.prototype.findTarget = function (targetName) {\n var selector = this.getSelectorForTargetName(targetName);\n return this.scope.findElement(selector);\n };\n TargetSet.prototype.findAllTargets = function (targetName) {\n var selector = this.getSelectorForTargetName(targetName);\n return this.scope.findAllElements(selector);\n };\n TargetSet.prototype.getSelectorForTargetName = function (targetName) {\n var attributeName = \"data-\" + this.identifier + \"-target\";\n return Object(_selectors__WEBPACK_IMPORTED_MODULE_0__[\"attributeValueContainsToken\"])(attributeName, targetName);\n };\n TargetSet.prototype.findLegacyTarget = function (targetName) {\n var selector = this.getLegacySelectorForTargetName(targetName);\n return this.deprecate(this.scope.findElement(selector), targetName);\n };\n TargetSet.prototype.findAllLegacyTargets = function (targetName) {\n var _this = this;\n var selector = this.getLegacySelectorForTargetName(targetName);\n return this.scope.findAllElements(selector).map(function (element) { return _this.deprecate(element, targetName); });\n };\n TargetSet.prototype.getLegacySelectorForTargetName = function (targetName) {\n var targetDescriptor = this.identifier + \".\" + targetName;\n return Object(_selectors__WEBPACK_IMPORTED_MODULE_0__[\"attributeValueContainsToken\"])(this.schema.targetAttribute, targetDescriptor);\n };\n TargetSet.prototype.deprecate = function (element, targetName) {\n if (element) {\n var identifier = this.identifier;\n var attributeName = this.schema.targetAttribute;\n this.guide.warn(element, \"target:\" + targetName, \"Please replace \" + attributeName + \"=\\\"\" + identifier + \".\" + targetName + \"\\\" with data-\" + identifier + \"-target=\\\"\" + targetName + \"\\\". \" +\n (\"The \" + attributeName + \" attribute is deprecated and will be removed in a future version of Stimulus.\"));\n }\n return element;\n };\n Object.defineProperty(TargetSet.prototype, \"guide\", {\n get: function () {\n return this.scope.guide;\n },\n enumerable: false,\n configurable: true\n });\n return TargetSet;\n}());\n\n//# sourceMappingURL=target_set.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/target_set.js?");
409
+
410
+ /***/ }),
411
+
412
+ /***/ "./node_modules/@stimulus/core/dist/value_observer.js":
413
+ /*!************************************************************!*\
414
+ !*** ./node_modules/@stimulus/core/dist/value_observer.js ***!
415
+ \************************************************************/
416
+ /*! exports provided: ValueObserver */
417
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
418
+
419
+ "use strict";
420
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ValueObserver\", function() { return ValueObserver; });\n/* harmony import */ var _stimulus_mutation_observers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stimulus/mutation-observers */ \"./node_modules/@stimulus/mutation-observers/dist/index.js\");\n\nvar ValueObserver = /** @class */ (function () {\n function ValueObserver(context, receiver) {\n this.context = context;\n this.receiver = receiver;\n this.stringMapObserver = new _stimulus_mutation_observers__WEBPACK_IMPORTED_MODULE_0__[\"StringMapObserver\"](this.element, this);\n this.valueDescriptorMap = this.controller.valueDescriptorMap;\n this.invokeChangedCallbacksForDefaultValues();\n }\n ValueObserver.prototype.start = function () {\n this.stringMapObserver.start();\n };\n ValueObserver.prototype.stop = function () {\n this.stringMapObserver.stop();\n };\n Object.defineProperty(ValueObserver.prototype, \"element\", {\n get: function () {\n return this.context.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ValueObserver.prototype, \"controller\", {\n get: function () {\n return this.context.controller;\n },\n enumerable: false,\n configurable: true\n });\n // String map observer delegate\n ValueObserver.prototype.getStringMapKeyForAttribute = function (attributeName) {\n if (attributeName in this.valueDescriptorMap) {\n return this.valueDescriptorMap[attributeName].name;\n }\n };\n ValueObserver.prototype.stringMapValueChanged = function (attributeValue, name) {\n this.invokeChangedCallbackForValue(name);\n };\n ValueObserver.prototype.invokeChangedCallbacksForDefaultValues = function () {\n for (var _i = 0, _a = this.valueDescriptors; _i < _a.length; _i++) {\n var _b = _a[_i], key = _b.key, name_1 = _b.name, defaultValue = _b.defaultValue;\n if (defaultValue != undefined && !this.controller.data.has(key)) {\n this.invokeChangedCallbackForValue(name_1);\n }\n }\n };\n ValueObserver.prototype.invokeChangedCallbackForValue = function (name) {\n var methodName = name + \"Changed\";\n var method = this.receiver[methodName];\n if (typeof method == \"function\") {\n var value = this.receiver[name];\n method.call(this.receiver, value);\n }\n };\n Object.defineProperty(ValueObserver.prototype, \"valueDescriptors\", {\n get: function () {\n var valueDescriptorMap = this.valueDescriptorMap;\n return Object.keys(valueDescriptorMap).map(function (key) { return valueDescriptorMap[key]; });\n },\n enumerable: false,\n configurable: true\n });\n return ValueObserver;\n}());\n\n//# sourceMappingURL=value_observer.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/value_observer.js?");
421
+
422
+ /***/ }),
423
+
424
+ /***/ "./node_modules/@stimulus/core/dist/value_properties.js":
425
+ /*!**************************************************************!*\
426
+ !*** ./node_modules/@stimulus/core/dist/value_properties.js ***!
427
+ \**************************************************************/
428
+ /*! exports provided: ValuePropertiesBlessing, propertiesForValueDefinitionPair */
429
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
430
+
431
+ "use strict";
432
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ValuePropertiesBlessing\", function() { return ValuePropertiesBlessing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"propertiesForValueDefinitionPair\", function() { return propertiesForValueDefinitionPair; });\n/* harmony import */ var _inheritable_statics__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inheritable_statics */ \"./node_modules/@stimulus/core/dist/inheritable_statics.js\");\n/* harmony import */ var _string_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./string_helpers */ \"./node_modules/@stimulus/core/dist/string_helpers.js\");\n\n\n/** @hidden */\nfunction ValuePropertiesBlessing(constructor) {\n var valueDefinitionPairs = Object(_inheritable_statics__WEBPACK_IMPORTED_MODULE_0__[\"readInheritableStaticObjectPairs\"])(constructor, \"values\");\n var propertyDescriptorMap = {\n valueDescriptorMap: {\n get: function () {\n var _this = this;\n return valueDefinitionPairs.reduce(function (result, valueDefinitionPair) {\n var _a;\n var valueDescriptor = parseValueDefinitionPair(valueDefinitionPair);\n var attributeName = _this.data.getAttributeNameForKey(valueDescriptor.key);\n return Object.assign(result, (_a = {}, _a[attributeName] = valueDescriptor, _a));\n }, {});\n }\n }\n };\n return valueDefinitionPairs.reduce(function (properties, valueDefinitionPair) {\n return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));\n }, propertyDescriptorMap);\n}\n/** @hidden */\nfunction propertiesForValueDefinitionPair(valueDefinitionPair) {\n var _a;\n var definition = parseValueDefinitionPair(valueDefinitionPair);\n var type = definition.type, key = definition.key, name = definition.name;\n var read = readers[type], write = writers[type] || writers.default;\n return _a = {},\n _a[name] = {\n get: function () {\n var value = this.data.get(key);\n if (value !== null) {\n return read(value);\n }\n else {\n return definition.defaultValue;\n }\n },\n set: function (value) {\n if (value === undefined) {\n this.data.delete(key);\n }\n else {\n this.data.set(key, write(value));\n }\n }\n },\n _a[\"has\" + Object(_string_helpers__WEBPACK_IMPORTED_MODULE_1__[\"capitalize\"])(name)] = {\n get: function () {\n return this.data.has(key);\n }\n },\n _a;\n}\nfunction parseValueDefinitionPair(_a) {\n var token = _a[0], typeConstant = _a[1];\n var type = parseValueTypeConstant(typeConstant);\n return valueDescriptorForTokenAndType(token, type);\n}\nfunction parseValueTypeConstant(typeConstant) {\n switch (typeConstant) {\n case Array: return \"array\";\n case Boolean: return \"boolean\";\n case Number: return \"number\";\n case Object: return \"object\";\n case String: return \"string\";\n }\n throw new Error(\"Unknown value type constant \\\"\" + typeConstant + \"\\\"\");\n}\nfunction valueDescriptorForTokenAndType(token, type) {\n var key = Object(_string_helpers__WEBPACK_IMPORTED_MODULE_1__[\"dasherize\"])(token) + \"-value\";\n return {\n type: type,\n key: key,\n name: Object(_string_helpers__WEBPACK_IMPORTED_MODULE_1__[\"camelize\"])(key),\n get defaultValue() { return defaultValuesByType[type]; }\n };\n}\nvar defaultValuesByType = {\n get array() { return []; },\n boolean: false,\n number: 0,\n get object() { return {}; },\n string: \"\"\n};\nvar readers = {\n array: function (value) {\n var array = JSON.parse(value);\n if (!Array.isArray(array)) {\n throw new TypeError(\"Expected array\");\n }\n return array;\n },\n boolean: function (value) {\n return !(value == \"0\" || value == \"false\");\n },\n number: function (value) {\n return parseFloat(value);\n },\n object: function (value) {\n var object = JSON.parse(value);\n if (object === null || typeof object != \"object\" || Array.isArray(object)) {\n throw new TypeError(\"Expected object\");\n }\n return object;\n },\n string: function (value) {\n return value;\n }\n};\nvar writers = {\n default: writeString,\n array: writeJSON,\n object: writeJSON\n};\nfunction writeJSON(value) {\n return JSON.stringify(value);\n}\nfunction writeString(value) {\n return \"\" + value;\n}\n//# sourceMappingURL=value_properties.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/core/dist/value_properties.js?");
433
+
434
+ /***/ }),
435
+
436
+ /***/ "./node_modules/@stimulus/multimap/dist/index.js":
437
+ /*!*******************************************************!*\
438
+ !*** ./node_modules/@stimulus/multimap/dist/index.js ***!
439
+ \*******************************************************/
440
+ /*! exports provided: IndexedMultimap, Multimap, add, del, fetch, prune */
441
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
442
+
443
+ "use strict";
444
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _indexed_multimap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./indexed_multimap */ \"./node_modules/@stimulus/multimap/dist/indexed_multimap.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"IndexedMultimap\", function() { return _indexed_multimap__WEBPACK_IMPORTED_MODULE_0__[\"IndexedMultimap\"]; });\n\n/* harmony import */ var _multimap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multimap */ \"./node_modules/@stimulus/multimap/dist/multimap.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Multimap\", function() { return _multimap__WEBPACK_IMPORTED_MODULE_1__[\"Multimap\"]; });\n\n/* harmony import */ var _set_operations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./set_operations */ \"./node_modules/@stimulus/multimap/dist/set_operations.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"add\", function() { return _set_operations__WEBPACK_IMPORTED_MODULE_2__[\"add\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"del\", function() { return _set_operations__WEBPACK_IMPORTED_MODULE_2__[\"del\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fetch\", function() { return _set_operations__WEBPACK_IMPORTED_MODULE_2__[\"fetch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"prune\", function() { return _set_operations__WEBPACK_IMPORTED_MODULE_2__[\"prune\"]; });\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/multimap/dist/index.js?");
445
+
446
+ /***/ }),
447
+
448
+ /***/ "./node_modules/@stimulus/multimap/dist/indexed_multimap.js":
449
+ /*!******************************************************************!*\
450
+ !*** ./node_modules/@stimulus/multimap/dist/indexed_multimap.js ***!
451
+ \******************************************************************/
452
+ /*! exports provided: IndexedMultimap */
453
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
454
+
455
+ "use strict";
456
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"IndexedMultimap\", function() { return IndexedMultimap; });\n/* harmony import */ var _multimap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multimap */ \"./node_modules/@stimulus/multimap/dist/multimap.js\");\n/* harmony import */ var _set_operations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./set_operations */ \"./node_modules/@stimulus/multimap/dist/set_operations.js\");\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\nvar IndexedMultimap = /** @class */ (function (_super) {\n __extends(IndexedMultimap, _super);\n function IndexedMultimap() {\n var _this = _super.call(this) || this;\n _this.keysByValue = new Map;\n return _this;\n }\n Object.defineProperty(IndexedMultimap.prototype, \"values\", {\n get: function () {\n return Array.from(this.keysByValue.keys());\n },\n enumerable: false,\n configurable: true\n });\n IndexedMultimap.prototype.add = function (key, value) {\n _super.prototype.add.call(this, key, value);\n Object(_set_operations__WEBPACK_IMPORTED_MODULE_1__[\"add\"])(this.keysByValue, value, key);\n };\n IndexedMultimap.prototype.delete = function (key, value) {\n _super.prototype.delete.call(this, key, value);\n Object(_set_operations__WEBPACK_IMPORTED_MODULE_1__[\"del\"])(this.keysByValue, value, key);\n };\n IndexedMultimap.prototype.hasValue = function (value) {\n return this.keysByValue.has(value);\n };\n IndexedMultimap.prototype.getKeysForValue = function (value) {\n var set = this.keysByValue.get(value);\n return set ? Array.from(set) : [];\n };\n return IndexedMultimap;\n}(_multimap__WEBPACK_IMPORTED_MODULE_0__[\"Multimap\"]));\n\n//# sourceMappingURL=indexed_multimap.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/multimap/dist/indexed_multimap.js?");
457
+
458
+ /***/ }),
459
+
460
+ /***/ "./node_modules/@stimulus/multimap/dist/multimap.js":
461
+ /*!**********************************************************!*\
462
+ !*** ./node_modules/@stimulus/multimap/dist/multimap.js ***!
463
+ \**********************************************************/
464
+ /*! exports provided: Multimap */
465
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
466
+
467
+ "use strict";
468
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Multimap\", function() { return Multimap; });\n/* harmony import */ var _set_operations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./set_operations */ \"./node_modules/@stimulus/multimap/dist/set_operations.js\");\n\nvar Multimap = /** @class */ (function () {\n function Multimap() {\n this.valuesByKey = new Map();\n }\n Object.defineProperty(Multimap.prototype, \"values\", {\n get: function () {\n var sets = Array.from(this.valuesByKey.values());\n return sets.reduce(function (values, set) { return values.concat(Array.from(set)); }, []);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Multimap.prototype, \"size\", {\n get: function () {\n var sets = Array.from(this.valuesByKey.values());\n return sets.reduce(function (size, set) { return size + set.size; }, 0);\n },\n enumerable: false,\n configurable: true\n });\n Multimap.prototype.add = function (key, value) {\n Object(_set_operations__WEBPACK_IMPORTED_MODULE_0__[\"add\"])(this.valuesByKey, key, value);\n };\n Multimap.prototype.delete = function (key, value) {\n Object(_set_operations__WEBPACK_IMPORTED_MODULE_0__[\"del\"])(this.valuesByKey, key, value);\n };\n Multimap.prototype.has = function (key, value) {\n var values = this.valuesByKey.get(key);\n return values != null && values.has(value);\n };\n Multimap.prototype.hasKey = function (key) {\n return this.valuesByKey.has(key);\n };\n Multimap.prototype.hasValue = function (value) {\n var sets = Array.from(this.valuesByKey.values());\n return sets.some(function (set) { return set.has(value); });\n };\n Multimap.prototype.getValuesForKey = function (key) {\n var values = this.valuesByKey.get(key);\n return values ? Array.from(values) : [];\n };\n Multimap.prototype.getKeysForValue = function (value) {\n return Array.from(this.valuesByKey)\n .filter(function (_a) {\n var key = _a[0], values = _a[1];\n return values.has(value);\n })\n .map(function (_a) {\n var key = _a[0], values = _a[1];\n return key;\n });\n };\n return Multimap;\n}());\n\n//# sourceMappingURL=multimap.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/multimap/dist/multimap.js?");
469
+
470
+ /***/ }),
471
+
472
+ /***/ "./node_modules/@stimulus/multimap/dist/set_operations.js":
473
+ /*!****************************************************************!*\
474
+ !*** ./node_modules/@stimulus/multimap/dist/set_operations.js ***!
475
+ \****************************************************************/
476
+ /*! exports provided: add, del, fetch, prune */
477
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
478
+
479
+ "use strict";
480
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"add\", function() { return add; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"del\", function() { return del; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fetch\", function() { return fetch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prune\", function() { return prune; });\nfunction add(map, key, value) {\n fetch(map, key).add(value);\n}\nfunction del(map, key, value) {\n fetch(map, key).delete(value);\n prune(map, key);\n}\nfunction fetch(map, key) {\n var values = map.get(key);\n if (!values) {\n values = new Set();\n map.set(key, values);\n }\n return values;\n}\nfunction prune(map, key) {\n var values = map.get(key);\n if (values != null && values.size == 0) {\n map.delete(key);\n }\n}\n//# sourceMappingURL=set_operations.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/multimap/dist/set_operations.js?");
481
+
482
+ /***/ }),
483
+
484
+ /***/ "./node_modules/@stimulus/mutation-observers/dist/attribute_observer.js":
485
+ /*!******************************************************************************!*\
486
+ !*** ./node_modules/@stimulus/mutation-observers/dist/attribute_observer.js ***!
487
+ \******************************************************************************/
488
+ /*! exports provided: AttributeObserver */
489
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
490
+
491
+ "use strict";
492
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AttributeObserver\", function() { return AttributeObserver; });\n/* harmony import */ var _element_observer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./element_observer */ \"./node_modules/@stimulus/mutation-observers/dist/element_observer.js\");\n\nvar AttributeObserver = /** @class */ (function () {\n function AttributeObserver(element, attributeName, delegate) {\n this.attributeName = attributeName;\n this.delegate = delegate;\n this.elementObserver = new _element_observer__WEBPACK_IMPORTED_MODULE_0__[\"ElementObserver\"](element, this);\n }\n Object.defineProperty(AttributeObserver.prototype, \"element\", {\n get: function () {\n return this.elementObserver.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AttributeObserver.prototype, \"selector\", {\n get: function () {\n return \"[\" + this.attributeName + \"]\";\n },\n enumerable: false,\n configurable: true\n });\n AttributeObserver.prototype.start = function () {\n this.elementObserver.start();\n };\n AttributeObserver.prototype.stop = function () {\n this.elementObserver.stop();\n };\n AttributeObserver.prototype.refresh = function () {\n this.elementObserver.refresh();\n };\n Object.defineProperty(AttributeObserver.prototype, \"started\", {\n get: function () {\n return this.elementObserver.started;\n },\n enumerable: false,\n configurable: true\n });\n // Element observer delegate\n AttributeObserver.prototype.matchElement = function (element) {\n return element.hasAttribute(this.attributeName);\n };\n AttributeObserver.prototype.matchElementsInTree = function (tree) {\n var match = this.matchElement(tree) ? [tree] : [];\n var matches = Array.from(tree.querySelectorAll(this.selector));\n return match.concat(matches);\n };\n AttributeObserver.prototype.elementMatched = function (element) {\n if (this.delegate.elementMatchedAttribute) {\n this.delegate.elementMatchedAttribute(element, this.attributeName);\n }\n };\n AttributeObserver.prototype.elementUnmatched = function (element) {\n if (this.delegate.elementUnmatchedAttribute) {\n this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n }\n };\n AttributeObserver.prototype.elementAttributeChanged = function (element, attributeName) {\n if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {\n this.delegate.elementAttributeValueChanged(element, attributeName);\n }\n };\n return AttributeObserver;\n}());\n\n//# sourceMappingURL=attribute_observer.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/mutation-observers/dist/attribute_observer.js?");
493
+
494
+ /***/ }),
495
+
496
+ /***/ "./node_modules/@stimulus/mutation-observers/dist/element_observer.js":
497
+ /*!****************************************************************************!*\
498
+ !*** ./node_modules/@stimulus/mutation-observers/dist/element_observer.js ***!
499
+ \****************************************************************************/
500
+ /*! exports provided: ElementObserver */
501
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
502
+
503
+ "use strict";
504
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ElementObserver\", function() { return ElementObserver; });\nvar ElementObserver = /** @class */ (function () {\n function ElementObserver(element, delegate) {\n var _this = this;\n this.element = element;\n this.started = false;\n this.delegate = delegate;\n this.elements = new Set;\n this.mutationObserver = new MutationObserver(function (mutations) { return _this.processMutations(mutations); });\n }\n ElementObserver.prototype.start = function () {\n if (!this.started) {\n this.started = true;\n this.mutationObserver.observe(this.element, { attributes: true, childList: true, subtree: true });\n this.refresh();\n }\n };\n ElementObserver.prototype.stop = function () {\n if (this.started) {\n this.mutationObserver.takeRecords();\n this.mutationObserver.disconnect();\n this.started = false;\n }\n };\n ElementObserver.prototype.refresh = function () {\n if (this.started) {\n var matches = new Set(this.matchElementsInTree());\n for (var _i = 0, _a = Array.from(this.elements); _i < _a.length; _i++) {\n var element = _a[_i];\n if (!matches.has(element)) {\n this.removeElement(element);\n }\n }\n for (var _b = 0, _c = Array.from(matches); _b < _c.length; _b++) {\n var element = _c[_b];\n this.addElement(element);\n }\n }\n };\n // Mutation record processing\n ElementObserver.prototype.processMutations = function (mutations) {\n if (this.started) {\n for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {\n var mutation = mutations_1[_i];\n this.processMutation(mutation);\n }\n }\n };\n ElementObserver.prototype.processMutation = function (mutation) {\n if (mutation.type == \"attributes\") {\n this.processAttributeChange(mutation.target, mutation.attributeName);\n }\n else if (mutation.type == \"childList\") {\n this.processRemovedNodes(mutation.removedNodes);\n this.processAddedNodes(mutation.addedNodes);\n }\n };\n ElementObserver.prototype.processAttributeChange = function (node, attributeName) {\n var element = node;\n if (this.elements.has(element)) {\n if (this.delegate.elementAttributeChanged && this.matchElement(element)) {\n this.delegate.elementAttributeChanged(element, attributeName);\n }\n else {\n this.removeElement(element);\n }\n }\n else if (this.matchElement(element)) {\n this.addElement(element);\n }\n };\n ElementObserver.prototype.processRemovedNodes = function (nodes) {\n for (var _i = 0, _a = Array.from(nodes); _i < _a.length; _i++) {\n var node = _a[_i];\n var element = this.elementFromNode(node);\n if (element) {\n this.processTree(element, this.removeElement);\n }\n }\n };\n ElementObserver.prototype.processAddedNodes = function (nodes) {\n for (var _i = 0, _a = Array.from(nodes); _i < _a.length; _i++) {\n var node = _a[_i];\n var element = this.elementFromNode(node);\n if (element && this.elementIsActive(element)) {\n this.processTree(element, this.addElement);\n }\n }\n };\n // Element matching\n ElementObserver.prototype.matchElement = function (element) {\n return this.delegate.matchElement(element);\n };\n ElementObserver.prototype.matchElementsInTree = function (tree) {\n if (tree === void 0) { tree = this.element; }\n return this.delegate.matchElementsInTree(tree);\n };\n ElementObserver.prototype.processTree = function (tree, processor) {\n for (var _i = 0, _a = this.matchElementsInTree(tree); _i < _a.length; _i++) {\n var element = _a[_i];\n processor.call(this, element);\n }\n };\n ElementObserver.prototype.elementFromNode = function (node) {\n if (node.nodeType == Node.ELEMENT_NODE) {\n return node;\n }\n };\n ElementObserver.prototype.elementIsActive = function (element) {\n if (element.isConnected != this.element.isConnected) {\n return false;\n }\n else {\n return this.element.contains(element);\n }\n };\n // Element tracking\n ElementObserver.prototype.addElement = function (element) {\n if (!this.elements.has(element)) {\n if (this.elementIsActive(element)) {\n this.elements.add(element);\n if (this.delegate.elementMatched) {\n this.delegate.elementMatched(element);\n }\n }\n }\n };\n ElementObserver.prototype.removeElement = function (element) {\n if (this.elements.has(element)) {\n this.elements.delete(element);\n if (this.delegate.elementUnmatched) {\n this.delegate.elementUnmatched(element);\n }\n }\n };\n return ElementObserver;\n}());\n\n//# sourceMappingURL=element_observer.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/mutation-observers/dist/element_observer.js?");
505
+
506
+ /***/ }),
507
+
508
+ /***/ "./node_modules/@stimulus/mutation-observers/dist/index.js":
509
+ /*!*****************************************************************!*\
510
+ !*** ./node_modules/@stimulus/mutation-observers/dist/index.js ***!
511
+ \*****************************************************************/
512
+ /*! exports provided: AttributeObserver, ElementObserver, StringMapObserver, TokenListObserver, ValueListObserver */
513
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
514
+
515
+ "use strict";
516
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _attribute_observer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./attribute_observer */ \"./node_modules/@stimulus/mutation-observers/dist/attribute_observer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"AttributeObserver\", function() { return _attribute_observer__WEBPACK_IMPORTED_MODULE_0__[\"AttributeObserver\"]; });\n\n/* harmony import */ var _element_observer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./element_observer */ \"./node_modules/@stimulus/mutation-observers/dist/element_observer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ElementObserver\", function() { return _element_observer__WEBPACK_IMPORTED_MODULE_1__[\"ElementObserver\"]; });\n\n/* harmony import */ var _string_map_observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./string_map_observer */ \"./node_modules/@stimulus/mutation-observers/dist/string_map_observer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StringMapObserver\", function() { return _string_map_observer__WEBPACK_IMPORTED_MODULE_2__[\"StringMapObserver\"]; });\n\n/* harmony import */ var _token_list_observer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./token_list_observer */ \"./node_modules/@stimulus/mutation-observers/dist/token_list_observer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TokenListObserver\", function() { return _token_list_observer__WEBPACK_IMPORTED_MODULE_3__[\"TokenListObserver\"]; });\n\n/* harmony import */ var _value_list_observer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./value_list_observer */ \"./node_modules/@stimulus/mutation-observers/dist/value_list_observer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ValueListObserver\", function() { return _value_list_observer__WEBPACK_IMPORTED_MODULE_4__[\"ValueListObserver\"]; });\n\n\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/mutation-observers/dist/index.js?");
517
+
518
+ /***/ }),
519
+
520
+ /***/ "./node_modules/@stimulus/mutation-observers/dist/string_map_observer.js":
521
+ /*!*******************************************************************************!*\
522
+ !*** ./node_modules/@stimulus/mutation-observers/dist/string_map_observer.js ***!
523
+ \*******************************************************************************/
524
+ /*! exports provided: StringMapObserver */
525
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
526
+
527
+ "use strict";
528
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"StringMapObserver\", function() { return StringMapObserver; });\nvar StringMapObserver = /** @class */ (function () {\n function StringMapObserver(element, delegate) {\n var _this = this;\n this.element = element;\n this.delegate = delegate;\n this.started = false;\n this.stringMap = new Map;\n this.mutationObserver = new MutationObserver(function (mutations) { return _this.processMutations(mutations); });\n }\n StringMapObserver.prototype.start = function () {\n if (!this.started) {\n this.started = true;\n this.mutationObserver.observe(this.element, { attributes: true });\n this.refresh();\n }\n };\n StringMapObserver.prototype.stop = function () {\n if (this.started) {\n this.mutationObserver.takeRecords();\n this.mutationObserver.disconnect();\n this.started = false;\n }\n };\n StringMapObserver.prototype.refresh = function () {\n if (this.started) {\n for (var _i = 0, _a = this.knownAttributeNames; _i < _a.length; _i++) {\n var attributeName = _a[_i];\n this.refreshAttribute(attributeName);\n }\n }\n };\n // Mutation record processing\n StringMapObserver.prototype.processMutations = function (mutations) {\n if (this.started) {\n for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {\n var mutation = mutations_1[_i];\n this.processMutation(mutation);\n }\n }\n };\n StringMapObserver.prototype.processMutation = function (mutation) {\n var attributeName = mutation.attributeName;\n if (attributeName) {\n this.refreshAttribute(attributeName);\n }\n };\n // State tracking\n StringMapObserver.prototype.refreshAttribute = function (attributeName) {\n var key = this.delegate.getStringMapKeyForAttribute(attributeName);\n if (key != null) {\n if (!this.stringMap.has(attributeName)) {\n this.stringMapKeyAdded(key, attributeName);\n }\n var value = this.element.getAttribute(attributeName);\n if (this.stringMap.get(attributeName) != value) {\n this.stringMapValueChanged(value, key);\n }\n if (value == null) {\n this.stringMap.delete(attributeName);\n this.stringMapKeyRemoved(key, attributeName);\n }\n else {\n this.stringMap.set(attributeName, value);\n }\n }\n };\n StringMapObserver.prototype.stringMapKeyAdded = function (key, attributeName) {\n if (this.delegate.stringMapKeyAdded) {\n this.delegate.stringMapKeyAdded(key, attributeName);\n }\n };\n StringMapObserver.prototype.stringMapValueChanged = function (value, key) {\n if (this.delegate.stringMapValueChanged) {\n this.delegate.stringMapValueChanged(value, key);\n }\n };\n StringMapObserver.prototype.stringMapKeyRemoved = function (key, attributeName) {\n if (this.delegate.stringMapKeyRemoved) {\n this.delegate.stringMapKeyRemoved(key, attributeName);\n }\n };\n Object.defineProperty(StringMapObserver.prototype, \"knownAttributeNames\", {\n get: function () {\n return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StringMapObserver.prototype, \"currentAttributeNames\", {\n get: function () {\n return Array.from(this.element.attributes).map(function (attribute) { return attribute.name; });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StringMapObserver.prototype, \"recordedAttributeNames\", {\n get: function () {\n return Array.from(this.stringMap.keys());\n },\n enumerable: false,\n configurable: true\n });\n return StringMapObserver;\n}());\n\n//# sourceMappingURL=string_map_observer.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/mutation-observers/dist/string_map_observer.js?");
529
+
530
+ /***/ }),
531
+
532
+ /***/ "./node_modules/@stimulus/mutation-observers/dist/token_list_observer.js":
533
+ /*!*******************************************************************************!*\
534
+ !*** ./node_modules/@stimulus/mutation-observers/dist/token_list_observer.js ***!
535
+ \*******************************************************************************/
536
+ /*! exports provided: TokenListObserver */
537
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
538
+
539
+ "use strict";
540
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TokenListObserver\", function() { return TokenListObserver; });\n/* harmony import */ var _attribute_observer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./attribute_observer */ \"./node_modules/@stimulus/mutation-observers/dist/attribute_observer.js\");\n/* harmony import */ var _stimulus_multimap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stimulus/multimap */ \"./node_modules/@stimulus/multimap/dist/index.js\");\n\n\nvar TokenListObserver = /** @class */ (function () {\n function TokenListObserver(element, attributeName, delegate) {\n this.attributeObserver = new _attribute_observer__WEBPACK_IMPORTED_MODULE_0__[\"AttributeObserver\"](element, attributeName, this);\n this.delegate = delegate;\n this.tokensByElement = new _stimulus_multimap__WEBPACK_IMPORTED_MODULE_1__[\"Multimap\"];\n }\n Object.defineProperty(TokenListObserver.prototype, \"started\", {\n get: function () {\n return this.attributeObserver.started;\n },\n enumerable: false,\n configurable: true\n });\n TokenListObserver.prototype.start = function () {\n this.attributeObserver.start();\n };\n TokenListObserver.prototype.stop = function () {\n this.attributeObserver.stop();\n };\n TokenListObserver.prototype.refresh = function () {\n this.attributeObserver.refresh();\n };\n Object.defineProperty(TokenListObserver.prototype, \"element\", {\n get: function () {\n return this.attributeObserver.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TokenListObserver.prototype, \"attributeName\", {\n get: function () {\n return this.attributeObserver.attributeName;\n },\n enumerable: false,\n configurable: true\n });\n // Attribute observer delegate\n TokenListObserver.prototype.elementMatchedAttribute = function (element) {\n this.tokensMatched(this.readTokensForElement(element));\n };\n TokenListObserver.prototype.elementAttributeValueChanged = function (element) {\n var _a = this.refreshTokensForElement(element), unmatchedTokens = _a[0], matchedTokens = _a[1];\n this.tokensUnmatched(unmatchedTokens);\n this.tokensMatched(matchedTokens);\n };\n TokenListObserver.prototype.elementUnmatchedAttribute = function (element) {\n this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n };\n TokenListObserver.prototype.tokensMatched = function (tokens) {\n var _this = this;\n tokens.forEach(function (token) { return _this.tokenMatched(token); });\n };\n TokenListObserver.prototype.tokensUnmatched = function (tokens) {\n var _this = this;\n tokens.forEach(function (token) { return _this.tokenUnmatched(token); });\n };\n TokenListObserver.prototype.tokenMatched = function (token) {\n this.delegate.tokenMatched(token);\n this.tokensByElement.add(token.element, token);\n };\n TokenListObserver.prototype.tokenUnmatched = function (token) {\n this.delegate.tokenUnmatched(token);\n this.tokensByElement.delete(token.element, token);\n };\n TokenListObserver.prototype.refreshTokensForElement = function (element) {\n var previousTokens = this.tokensByElement.getValuesForKey(element);\n var currentTokens = this.readTokensForElement(element);\n var firstDifferingIndex = zip(previousTokens, currentTokens)\n .findIndex(function (_a) {\n var previousToken = _a[0], currentToken = _a[1];\n return !tokensAreEqual(previousToken, currentToken);\n });\n if (firstDifferingIndex == -1) {\n return [[], []];\n }\n else {\n return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];\n }\n };\n TokenListObserver.prototype.readTokensForElement = function (element) {\n var attributeName = this.attributeName;\n var tokenString = element.getAttribute(attributeName) || \"\";\n return parseTokenString(tokenString, element, attributeName);\n };\n return TokenListObserver;\n}());\n\nfunction parseTokenString(tokenString, element, attributeName) {\n return tokenString.trim().split(/\\s+/).filter(function (content) { return content.length; })\n .map(function (content, index) { return ({ element: element, attributeName: attributeName, content: content, index: index }); });\n}\nfunction zip(left, right) {\n var length = Math.max(left.length, right.length);\n return Array.from({ length: length }, function (_, index) { return [left[index], right[index]]; });\n}\nfunction tokensAreEqual(left, right) {\n return left && right && left.index == right.index && left.content == right.content;\n}\n//# sourceMappingURL=token_list_observer.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/mutation-observers/dist/token_list_observer.js?");
541
+
542
+ /***/ }),
543
+
544
+ /***/ "./node_modules/@stimulus/mutation-observers/dist/value_list_observer.js":
545
+ /*!*******************************************************************************!*\
546
+ !*** ./node_modules/@stimulus/mutation-observers/dist/value_list_observer.js ***!
547
+ \*******************************************************************************/
548
+ /*! exports provided: ValueListObserver */
549
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
550
+
551
+ "use strict";
552
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ValueListObserver\", function() { return ValueListObserver; });\n/* harmony import */ var _token_list_observer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./token_list_observer */ \"./node_modules/@stimulus/mutation-observers/dist/token_list_observer.js\");\n\nvar ValueListObserver = /** @class */ (function () {\n function ValueListObserver(element, attributeName, delegate) {\n this.tokenListObserver = new _token_list_observer__WEBPACK_IMPORTED_MODULE_0__[\"TokenListObserver\"](element, attributeName, this);\n this.delegate = delegate;\n this.parseResultsByToken = new WeakMap;\n this.valuesByTokenByElement = new WeakMap;\n }\n Object.defineProperty(ValueListObserver.prototype, \"started\", {\n get: function () {\n return this.tokenListObserver.started;\n },\n enumerable: false,\n configurable: true\n });\n ValueListObserver.prototype.start = function () {\n this.tokenListObserver.start();\n };\n ValueListObserver.prototype.stop = function () {\n this.tokenListObserver.stop();\n };\n ValueListObserver.prototype.refresh = function () {\n this.tokenListObserver.refresh();\n };\n Object.defineProperty(ValueListObserver.prototype, \"element\", {\n get: function () {\n return this.tokenListObserver.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ValueListObserver.prototype, \"attributeName\", {\n get: function () {\n return this.tokenListObserver.attributeName;\n },\n enumerable: false,\n configurable: true\n });\n ValueListObserver.prototype.tokenMatched = function (token) {\n var element = token.element;\n var value = this.fetchParseResultForToken(token).value;\n if (value) {\n this.fetchValuesByTokenForElement(element).set(token, value);\n this.delegate.elementMatchedValue(element, value);\n }\n };\n ValueListObserver.prototype.tokenUnmatched = function (token) {\n var element = token.element;\n var value = this.fetchParseResultForToken(token).value;\n if (value) {\n this.fetchValuesByTokenForElement(element).delete(token);\n this.delegate.elementUnmatchedValue(element, value);\n }\n };\n ValueListObserver.prototype.fetchParseResultForToken = function (token) {\n var parseResult = this.parseResultsByToken.get(token);\n if (!parseResult) {\n parseResult = this.parseToken(token);\n this.parseResultsByToken.set(token, parseResult);\n }\n return parseResult;\n };\n ValueListObserver.prototype.fetchValuesByTokenForElement = function (element) {\n var valuesByToken = this.valuesByTokenByElement.get(element);\n if (!valuesByToken) {\n valuesByToken = new Map;\n this.valuesByTokenByElement.set(element, valuesByToken);\n }\n return valuesByToken;\n };\n ValueListObserver.prototype.parseToken = function (token) {\n try {\n var value = this.delegate.parseValueForToken(token);\n return { value: value };\n }\n catch (error) {\n return { error: error };\n }\n };\n return ValueListObserver;\n}());\n\n//# sourceMappingURL=value_list_observer.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/mutation-observers/dist/value_list_observer.js?");
553
+
554
+ /***/ }),
555
+
556
+ /***/ "./node_modules/@stimulus/webpack-helpers/dist/index.js":
557
+ /*!**************************************************************!*\
558
+ !*** ./node_modules/@stimulus/webpack-helpers/dist/index.js ***!
559
+ \**************************************************************/
560
+ /*! exports provided: definitionsFromContext, identifierForContextKey */
561
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
562
+
563
+ "use strict";
564
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"definitionsFromContext\", function() { return definitionsFromContext; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identifierForContextKey\", function() { return identifierForContextKey; });\nfunction definitionsFromContext(context) {\n return context.keys()\n .map(function (key) { return definitionForModuleWithContextAndKey(context, key); })\n .filter(function (value) { return value; });\n}\nfunction definitionForModuleWithContextAndKey(context, key) {\n var identifier = identifierForContextKey(key);\n if (identifier) {\n return definitionForModuleAndIdentifier(context(key), identifier);\n }\n}\nfunction definitionForModuleAndIdentifier(module, identifier) {\n var controllerConstructor = module.default;\n if (typeof controllerConstructor == \"function\") {\n return { identifier: identifier, controllerConstructor: controllerConstructor };\n }\n}\nfunction identifierForContextKey(key) {\n var logicalName = (key.match(/^(?:\\.\\/)?(.+)(?:[_-]controller\\..+?)$/) || [])[1];\n if (logicalName) {\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n }\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@stimulus/webpack-helpers/dist/index.js?");
565
+
566
+ /***/ }),
567
+
568
+ /***/ "./node_modules/bootstrap/dist/js/bootstrap.bundle.js":
569
+ /*!************************************************************!*\
570
+ !*** ./node_modules/bootstrap/dist/js/bootstrap.bundle.js ***!
571
+ \************************************************************/
572
+ /*! no static exports found */
573
+ /***/ (function(module, exports, __webpack_require__) {
574
+
575
+ eval("/*!\n * Bootstrap v5.0.0-beta2 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n true ? module.exports = factory() :\n undefined;\n}(this, (function () { 'use strict';\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n }\n\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n var MAX_UID = 1000000;\n var MILLISECONDS_MULTIPLIER = 1000;\n var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)\n\n var toType = function toType(obj) {\n if (obj === null || obj === undefined) {\n return \"\" + obj;\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase();\n };\n /**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\n\n var getUID = function getUID(prefix) {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n\n return prefix;\n };\n\n var getSelector = function getSelector(element) {\n var selector = element.getAttribute('data-bs-target');\n\n if (!selector || selector === '#') {\n var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n\n if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {\n return null;\n } // Just in case some CMS puts out a full URL with the anchor appended\n\n\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1];\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;\n }\n\n return selector;\n };\n\n var getSelectorFromElement = function getSelectorFromElement(element) {\n var selector = getSelector(element);\n\n if (selector) {\n return document.querySelector(selector) ? selector : null;\n }\n\n return null;\n };\n\n var getElementFromSelector = function getElementFromSelector(element) {\n var selector = getSelector(element);\n return selector ? document.querySelector(selector) : null;\n };\n\n var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {\n if (!element) {\n return 0;\n } // Get transition-duration of the element\n\n\n var _window$getComputedSt = window.getComputedStyle(element),\n transitionDuration = _window$getComputedSt.transitionDuration,\n transitionDelay = _window$getComputedSt.transitionDelay;\n\n var floatTransitionDuration = Number.parseFloat(transitionDuration);\n var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found\n\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n } // If multiple durations are defined, take the first\n\n\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;\n };\n\n var triggerTransitionEnd = function triggerTransitionEnd(element) {\n element.dispatchEvent(new Event(TRANSITION_END));\n };\n\n var isElement = function isElement(obj) {\n return (obj[0] || obj).nodeType;\n };\n\n var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {\n var called = false;\n var durationPadding = 5;\n var emulatedDuration = duration + durationPadding;\n\n function listener() {\n called = true;\n element.removeEventListener(TRANSITION_END, listener);\n }\n\n element.addEventListener(TRANSITION_END, listener);\n setTimeout(function () {\n if (!called) {\n triggerTransitionEnd(element);\n }\n }, emulatedDuration);\n };\n\n var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {\n Object.keys(configTypes).forEach(function (property) {\n var expectedTypes = configTypes[property];\n var value = config[property];\n var valueType = value && isElement(value) ? 'element' : toType(value);\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(componentName.toUpperCase() + \": \" + (\"Option \\\"\" + property + \"\\\" provided type \\\"\" + valueType + \"\\\" \") + (\"but expected type \\\"\" + expectedTypes + \"\\\".\"));\n }\n });\n };\n\n var isVisible = function isVisible(element) {\n if (!element) {\n return false;\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n var elementStyle = getComputedStyle(element);\n var parentNodeStyle = getComputedStyle(element.parentNode);\n return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';\n }\n\n return false;\n };\n\n var findShadowRoot = function findShadowRoot(element) {\n if (!document.documentElement.attachShadow) {\n return null;\n } // Can find the shadow root otherwise it'll return the document\n\n\n if (typeof element.getRootNode === 'function') {\n var root = element.getRootNode();\n return root instanceof ShadowRoot ? root : null;\n }\n\n if (element instanceof ShadowRoot) {\n return element;\n } // when we don't find a shadow root\n\n\n if (!element.parentNode) {\n return null;\n }\n\n return findShadowRoot(element.parentNode);\n };\n\n var noop = function noop() {\n return function () {};\n };\n\n var reflow = function reflow(element) {\n return element.offsetHeight;\n };\n\n var getjQuery = function getjQuery() {\n var _window = window,\n jQuery = _window.jQuery;\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery;\n }\n\n return null;\n };\n\n var onDOMContentLoaded = function onDOMContentLoaded(callback) {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback);\n } else {\n callback();\n }\n };\n\n var isRTL = document.documentElement.dir === 'rtl';\n\n var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) {\n onDOMContentLoaded(function () {\n var $ = getjQuery();\n /* istanbul ignore if */\n\n if ($) {\n var JQUERY_NO_CONFLICT = $.fn[name];\n $.fn[name] = plugin.jQueryInterface;\n $.fn[name].Constructor = plugin;\n\n $.fn[name].noConflict = function () {\n $.fn[name] = JQUERY_NO_CONFLICT;\n return plugin.jQueryInterface;\n };\n }\n });\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n var mapData = function () {\n var storeData = {};\n var id = 1;\n return {\n set: function set(element, key, data) {\n if (typeof element.bsKey === 'undefined') {\n element.bsKey = {\n key: key,\n id: id\n };\n id++;\n }\n\n storeData[element.bsKey.id] = data;\n },\n get: function get(element, key) {\n if (!element || typeof element.bsKey === 'undefined') {\n return null;\n }\n\n var keyProperties = element.bsKey;\n\n if (keyProperties.key === key) {\n return storeData[keyProperties.id];\n }\n\n return null;\n },\n delete: function _delete(element, key) {\n if (typeof element.bsKey === 'undefined') {\n return;\n }\n\n var keyProperties = element.bsKey;\n\n if (keyProperties.key === key) {\n delete storeData[keyProperties.id];\n delete element.bsKey;\n }\n }\n };\n }();\n\n var Data = {\n setData: function setData(instance, key, data) {\n mapData.set(instance, key, data);\n },\n getData: function getData(instance, key) {\n return mapData.get(instance, key);\n },\n removeData: function removeData(instance, key) {\n mapData.delete(instance, key);\n }\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n var namespaceRegex = /[^.]*(?=\\..*)\\.|.*/;\n var stripNameRegex = /\\..*/;\n var stripUidRegex = /::\\d+$/;\n var eventRegistry = {}; // Events storage\n\n var uidEvent = 1;\n var customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n };\n var nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);\n /**\n * ------------------------------------------------------------------------\n * Private methods\n * ------------------------------------------------------------------------\n */\n\n function getUidEvent(element, uid) {\n return uid && uid + \"::\" + uidEvent++ || element.uidEvent || uidEvent++;\n }\n\n function getEvent(element) {\n var uid = getUidEvent(element);\n element.uidEvent = uid;\n eventRegistry[uid] = eventRegistry[uid] || {};\n return eventRegistry[uid];\n }\n\n function bootstrapHandler(element, fn) {\n return function handler(event) {\n event.delegateTarget = element;\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(element, [event]);\n };\n }\n\n function bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n var domElements = element.querySelectorAll(selector);\n\n for (var target = event.target; target && target !== this; target = target.parentNode) {\n for (var i = domElements.length; i--;) {\n if (domElements[i] === target) {\n event.delegateTarget = target;\n\n if (handler.oneOff) {\n // eslint-disable-next-line unicorn/consistent-destructuring\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(target, [event]);\n }\n }\n } // To please ESLint\n\n\n return null;\n };\n }\n\n function findHandler(events, handler, delegationSelector) {\n if (delegationSelector === void 0) {\n delegationSelector = null;\n }\n\n var uidEventList = Object.keys(events);\n\n for (var i = 0, len = uidEventList.length; i < len; i++) {\n var event = events[uidEventList[i]];\n\n if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {\n return event;\n }\n }\n\n return null;\n }\n\n function normalizeParams(originalTypeEvent, handler, delegationFn) {\n var delegation = typeof handler === 'string';\n var originalHandler = delegation ? delegationFn : handler; // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n\n var typeEvent = originalTypeEvent.replace(stripNameRegex, '');\n var custom = customEvents[typeEvent];\n\n if (custom) {\n typeEvent = custom;\n }\n\n var isNative = nativeEvents.has(typeEvent);\n\n if (!isNative) {\n typeEvent = originalTypeEvent;\n }\n\n return [delegation, originalHandler, typeEvent];\n }\n\n function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n if (!handler) {\n handler = delegationFn;\n delegationFn = null;\n }\n\n var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),\n delegation = _normalizeParams[0],\n originalHandler = _normalizeParams[1],\n typeEvent = _normalizeParams[2];\n\n var events = getEvent(element);\n var handlers = events[typeEvent] || (events[typeEvent] = {});\n var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);\n\n if (previousFn) {\n previousFn.oneOff = previousFn.oneOff && oneOff;\n return;\n }\n\n var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));\n var fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);\n fn.delegationSelector = delegation ? handler : null;\n fn.originalHandler = originalHandler;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n element.addEventListener(typeEvent, fn, delegation);\n }\n\n function removeHandler(element, events, typeEvent, handler, delegationSelector) {\n var fn = findHandler(events[typeEvent], handler, delegationSelector);\n\n if (!fn) {\n return;\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));\n delete events[typeEvent][fn.uidEvent];\n }\n\n function removeNamespacedHandlers(element, events, typeEvent, namespace) {\n var storeElementEvent = events[typeEvent] || {};\n Object.keys(storeElementEvent).forEach(function (handlerKey) {\n if (handlerKey.includes(namespace)) {\n var event = storeElementEvent[handlerKey];\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n }\n\n var EventHandler = {\n on: function on(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, false);\n },\n one: function one(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, true);\n },\n off: function off(element, originalTypeEvent, handler, delegationFn) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn),\n delegation = _normalizeParams2[0],\n originalHandler = _normalizeParams2[1],\n typeEvent = _normalizeParams2[2];\n\n var inNamespace = typeEvent !== originalTypeEvent;\n var events = getEvent(element);\n var isNamespace = originalTypeEvent.startsWith('.');\n\n if (typeof originalHandler !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!events || !events[typeEvent]) {\n return;\n }\n\n removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);\n return;\n }\n\n if (isNamespace) {\n Object.keys(events).forEach(function (elementEvent) {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n });\n }\n\n var storeElementEvent = events[typeEvent] || {};\n Object.keys(storeElementEvent).forEach(function (keyHandlers) {\n var handlerKey = keyHandlers.replace(stripUidRegex, '');\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n var event = storeElementEvent[keyHandlers];\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n },\n trigger: function trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null;\n }\n\n var $ = getjQuery();\n var typeEvent = event.replace(stripNameRegex, '');\n var inNamespace = event !== typeEvent;\n var isNative = nativeEvents.has(typeEvent);\n var jQueryEvent;\n var bubbles = true;\n var nativeDispatch = true;\n var defaultPrevented = false;\n var evt = null;\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args);\n $(element).trigger(jQueryEvent);\n bubbles = !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n\n if (isNative) {\n evt = document.createEvent('HTMLEvents');\n evt.initEvent(typeEvent, bubbles, true);\n } else {\n evt = new CustomEvent(event, {\n bubbles: bubbles,\n cancelable: true\n });\n } // merge custom information in our event\n\n\n if (typeof args !== 'undefined') {\n Object.keys(args).forEach(function (key) {\n Object.defineProperty(evt, key, {\n get: function get() {\n return args[key];\n }\n });\n });\n }\n\n if (defaultPrevented) {\n evt.preventDefault();\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n\n if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {\n jQueryEvent.preventDefault();\n }\n\n return evt;\n }\n };\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n var VERSION = '5.0.0-beta2';\n\n var BaseComponent = /*#__PURE__*/function () {\n function BaseComponent(element) {\n if (!element) {\n return;\n }\n\n this._element = element;\n Data.setData(element, this.constructor.DATA_KEY, this);\n }\n\n var _proto = BaseComponent.prototype;\n\n _proto.dispose = function dispose() {\n Data.removeData(this._element, this.constructor.DATA_KEY);\n this._element = null;\n }\n /** Static */\n ;\n\n BaseComponent.getInstance = function getInstance(element) {\n return Data.getData(element, this.DATA_KEY);\n };\n\n _createClass(BaseComponent, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }]);\n\n return BaseComponent;\n }();\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n var NAME = 'alert';\n var DATA_KEY = 'bs.alert';\n var EVENT_KEY = \".\" + DATA_KEY;\n var DATA_API_KEY = '.data-api';\n var SELECTOR_DISMISS = '[data-bs-dismiss=\"alert\"]';\n var EVENT_CLOSE = \"close\" + EVENT_KEY;\n var EVENT_CLOSED = \"closed\" + EVENT_KEY;\n var EVENT_CLICK_DATA_API = \"click\" + EVENT_KEY + DATA_API_KEY;\n var CLASS_NAME_ALERT = 'alert';\n var CLASS_NAME_FADE = 'fade';\n var CLASS_NAME_SHOW = 'show';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n var Alert = /*#__PURE__*/function (_BaseComponent) {\n _inheritsLoose(Alert, _BaseComponent);\n\n function Alert() {\n return _BaseComponent.apply(this, arguments) || this;\n }\n\n var _proto = Alert.prototype;\n\n // Public\n _proto.close = function close(element) {\n var rootElement = element ? this._getRootElement(element) : this._element;\n\n var customEvent = this._triggerCloseEvent(rootElement);\n\n if (customEvent === null || customEvent.defaultPrevented) {\n return;\n }\n\n this._removeElement(rootElement);\n } // Private\n ;\n\n _proto._getRootElement = function _getRootElement(element) {\n return getElementFromSelector(element) || element.closest(\".\" + CLASS_NAME_ALERT);\n };\n\n _proto._triggerCloseEvent = function _triggerCloseEvent(element) {\n return EventHandler.trigger(element, EVENT_CLOSE);\n };\n\n _proto._removeElement = function _removeElement(element) {\n var _this = this;\n\n element.classList.remove(CLASS_NAME_SHOW);\n\n if (!element.classList.contains(CLASS_NAME_FADE)) {\n this._destroyElement(element);\n\n return;\n }\n\n var transitionDuration = getTransitionDurationFromElement(element);\n EventHandler.one(element, 'transitionend', function () {\n return _this._destroyElement(element);\n });\n emulateTransitionEnd(element, transitionDuration);\n };\n\n _proto._destroyElement = function _destroyElement(element) {\n if (element.parentNode) {\n element.parentNode.removeChild(element);\n }\n\n EventHandler.trigger(element, EVENT_CLOSED);\n } // Static\n ;\n\n Alert.jQueryInterface = function jQueryInterface(config) {\n return this.each(function () {\n var data = Data.getData(this, DATA_KEY);\n\n if (!data) {\n data = new Alert(this);\n }\n\n if (config === 'close') {\n data[config](this);\n }\n });\n };\n\n Alert.handleDismiss = function handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault();\n }\n\n alertInstance.close(this);\n };\n };\n\n _createClass(Alert, null, [{\n key: \"DATA_KEY\",\n get: // Getters\n function get() {\n return DATA_KEY;\n }\n }]);\n\n return Alert;\n }(BaseComponent);\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Alert to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(NAME, Alert);\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n var NAME$1 = 'button';\n var DATA_KEY$1 = 'bs.button';\n var EVENT_KEY$1 = \".\" + DATA_KEY$1;\n var DATA_API_KEY$1 = '.data-api';\n var CLASS_NAME_ACTIVE = 'active';\n var SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]';\n var EVENT_CLICK_DATA_API$1 = \"click\" + EVENT_KEY$1 + DATA_API_KEY$1;\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n var Button = /*#__PURE__*/function (_BaseComponent) {\n _inheritsLoose(Button, _BaseComponent);\n\n function Button() {\n return _BaseComponent.apply(this, arguments) || this;\n }\n\n var _proto = Button.prototype;\n\n // Public\n _proto.toggle = function toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE));\n } // Static\n ;\n\n Button.jQueryInterface = function jQueryInterface(config) {\n return this.each(function () {\n var data = Data.getData(this, DATA_KEY$1);\n\n if (!data) {\n data = new Button(this);\n }\n\n if (config === 'toggle') {\n data[config]();\n }\n });\n };\n\n _createClass(Button, null, [{\n key: \"DATA_KEY\",\n get: // Getters\n function get() {\n return DATA_KEY$1;\n }\n }]);\n\n return Button;\n }(BaseComponent);\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE, function (event) {\n event.preventDefault();\n var button = event.target.closest(SELECTOR_DATA_TOGGLE);\n var data = Data.getData(button, DATA_KEY$1);\n\n if (!data) {\n data = new Button(button);\n }\n\n data.toggle();\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Button to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(NAME$1, Button);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n function normalizeData(val) {\n if (val === 'true') {\n return true;\n }\n\n if (val === 'false') {\n return false;\n }\n\n if (val === Number(val).toString()) {\n return Number(val);\n }\n\n if (val === '' || val === 'null') {\n return null;\n }\n\n return val;\n }\n\n function normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, function (chr) {\n return \"-\" + chr.toLowerCase();\n });\n }\n\n var Manipulator = {\n setDataAttribute: function setDataAttribute(element, key, value) {\n element.setAttribute(\"data-bs-\" + normalizeDataKey(key), value);\n },\n removeDataAttribute: function removeDataAttribute(element, key) {\n element.removeAttribute(\"data-bs-\" + normalizeDataKey(key));\n },\n getDataAttributes: function getDataAttributes(element) {\n if (!element) {\n return {};\n }\n\n var attributes = {};\n Object.keys(element.dataset).filter(function (key) {\n return key.startsWith('bs');\n }).forEach(function (key) {\n var pureKey = key.replace(/^bs/, '');\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);\n attributes[pureKey] = normalizeData(element.dataset[key]);\n });\n return attributes;\n },\n getDataAttribute: function getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(\"data-bs-\" + normalizeDataKey(key)));\n },\n offset: function offset(element) {\n var rect = element.getBoundingClientRect();\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n };\n },\n position: function position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n };\n }\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n var NODE_TEXT = 3;\n var SelectorEngine = {\n find: function find(selector, element) {\n var _ref;\n\n if (element === void 0) {\n element = document.documentElement;\n }\n\n return (_ref = []).concat.apply(_ref, Element.prototype.querySelectorAll.call(element, selector));\n },\n findOne: function findOne(selector, element) {\n if (element === void 0) {\n element = document.documentElement;\n }\n\n return Element.prototype.querySelector.call(element, selector);\n },\n children: function children(element, selector) {\n var _ref2;\n\n return (_ref2 = []).concat.apply(_ref2, element.children).filter(function (child) {\n return child.matches(selector);\n });\n },\n parents: function parents(element, selector) {\n var parents = [];\n var ancestor = element.parentNode;\n\n while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {\n if (ancestor.matches(selector)) {\n parents.push(ancestor);\n }\n\n ancestor = ancestor.parentNode;\n }\n\n return parents;\n },\n prev: function prev(element, selector) {\n var previous = element.previousElementSibling;\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous];\n }\n\n previous = previous.previousElementSibling;\n }\n\n return [];\n },\n next: function next(element, selector) {\n var next = element.nextElementSibling;\n\n while (next) {\n if (next.matches(selector)) {\n return [next];\n }\n\n next = next.nextElementSibling;\n }\n\n return [];\n }\n };\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n var NAME$2 = 'carousel';\n var DATA_KEY$2 = 'bs.carousel';\n var EVENT_KEY$2 = \".\" + DATA_KEY$2;\n var DATA_API_KEY$2 = '.data-api';\n var ARROW_LEFT_KEY = 'ArrowLeft';\n var ARROW_RIGHT_KEY = 'ArrowRight';\n var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch\n\n var SWIPE_THRESHOLD = 40;\n var Default = {\n interval: 5000,\n keyboard: true,\n slide: false,\n pause: 'hover',\n wrap: true,\n touch: true\n };\n var DefaultType = {\n interval: '(number|boolean)',\n keyboard: 'boolean',\n slide: '(boolean|string)',\n pause: '(string|boolean)',\n wrap: 'boolean',\n touch: 'boolean'\n };\n var DIRECTION_NEXT = 'next';\n var DIRECTION_PREV = 'prev';\n var DIRECTION_LEFT = 'left';\n var DIRECTION_RIGHT = 'right';\n var EVENT_SLIDE = \"slide\" + EVENT_KEY$2;\n var EVENT_SLID = \"slid\" + EVENT_KEY$2;\n var EVENT_KEYDOWN = \"keydown\" + EVENT_KEY$2;\n var EVENT_MOUSEENTER = \"mouseenter\" + EVENT_KEY$2;\n var EVENT_MOUSELEAVE = \"mouseleave\" + EVENT_KEY$2;\n var EVENT_TOUCHSTART = \"touchstart\" + EVENT_KEY$2;\n var EVENT_TOUCHMOVE = \"touchmove\" + EVENT_KEY$2;\n var EVENT_TOUCHEND = \"touchend\" + EVENT_KEY$2;\n var EVENT_POINTERDOWN = \"pointerdown\" + EVENT_KEY$2;\n var EVENT_POINTERUP = \"pointerup\" + EVENT_KEY$2;\n var EVENT_DRAG_START = \"dragstart\" + EVENT_KEY$2;\n var EVENT_LOAD_DATA_API = \"load\" + EVENT_KEY$2 + DATA_API_KEY$2;\n var EVENT_CLICK_DATA_API$2 = \"click\" + EVENT_KEY$2 + DATA_API_KEY$2;\n var CLASS_NAME_CAROUSEL = 'carousel';\n var CLASS_NAME_ACTIVE$1 = 'active';\n var CLASS_NAME_SLIDE = 'slide';\n var CLASS_NAME_END = 'carousel-item-end';\n var CLASS_NAME_START = 'carousel-item-start';\n var CLASS_NAME_NEXT = 'carousel-item-next';\n var CLASS_NAME_PREV = 'carousel-item-prev';\n var CLASS_NAME_POINTER_EVENT = 'pointer-event';\n var SELECTOR_ACTIVE = '.active';\n var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';\n var SELECTOR_ITEM = '.carousel-item';\n var SELECTOR_ITEM_IMG = '.carousel-item img';\n var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';\n var SELECTOR_INDICATORS = '.carousel-indicators';\n var SELECTOR_INDICATOR = '[data-bs-target]';\n var SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';\n var SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]';\n var POINTER_TYPE_TOUCH = 'touch';\n var POINTER_TYPE_PEN = 'pen';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n var Carousel = /*#__PURE__*/function (_BaseComponent) {\n _inheritsLoose(Carousel, _BaseComponent);\n\n function Carousel(element, config) {\n var _this;\n\n _this = _BaseComponent.call(this, element) || this;\n _this._items = null;\n _this._interval = null;\n _this._activeElement = null;\n _this._isPaused = false;\n _this._isSliding = false;\n _this.touchTimeout = null;\n _this.touchStartX = 0;\n _this.touchDeltaX = 0;\n _this._config = _this._getConfig(config);\n _this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, _this._element);\n _this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;\n _this._pointerEvent = Boolean(window.PointerEvent);\n\n _this._addEventListeners();\n\n return _this;\n } // Getters\n\n\n var _proto = Carousel.prototype;\n\n // Public\n _proto.next = function next() {\n if (!this._isSliding) {\n this._slide(DIRECTION_NEXT);\n }\n };\n\n _proto.nextWhenVisible = function nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next();\n }\n };\n\n _proto.prev = function prev() {\n if (!this._isSliding) {\n this._slide(DIRECTION_PREV);\n }\n };\n\n _proto.pause = function pause(event) {\n if (!event) {\n this._isPaused = true;\n }\n\n if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {\n triggerTransitionEnd(this._element);\n this.cycle(true);\n }\n\n clearInterval(this._interval);\n this._interval = null;\n };\n\n _proto.cycle = function cycle(event) {\n if (!event) {\n this._isPaused = false;\n }\n\n if (this._interval) {\n clearInterval(this._interval);\n this._interval = null;\n }\n\n if (this._config && this._config.interval && !this._isPaused) {\n this._updateInterval();\n\n this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);\n }\n };\n\n _proto.to = function to(index) {\n var _this2 = this;\n\n this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n\n var activeIndex = this._getItemIndex(this._activeElement);\n\n if (index > this._items.length - 1 || index < 0) {\n return;\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, function () {\n return _this2.to(index);\n });\n return;\n }\n\n if (activeIndex === index) {\n this.pause();\n this.cycle();\n return;\n }\n\n var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;\n\n this._slide(direction, this._items[index]);\n };\n\n _proto.dispose = function dispose() {\n _BaseComponent.prototype.dispose.call(this);\n\n EventHandler.off(this._element, EVENT_KEY$2);\n this._items = null;\n this._config = null;\n this._interval = null;\n this._isPaused = null;\n this._isSliding = null;\n this._activeElement = null;\n this._indicatorsElement = null;\n } // Private\n ;\n\n _proto._getConfig = function _getConfig(config) {\n config = _extends({}, Default, config);\n typeCheckConfig(NAME$2, config, DefaultType);\n return config;\n };\n\n _proto._handleSwipe = function _handleSwipe() {\n var absDeltax = Math.abs(this.touchDeltaX);\n\n if (absDeltax <= SWIPE_THRESHOLD) {\n return;\n }\n\n var direction = absDeltax / this.touchDeltaX;\n this.touchDeltaX = 0; // swipe left\n\n if (direction > 0) {\n if (isRTL) {\n this.next();\n } else {\n this.prev();\n }\n } // swipe right\n\n\n if (direction < 0) {\n if (isRTL) {\n this.prev();\n } else {\n this.next();\n }\n }\n };\n\n _proto._addEventListeners = function _addEventListeners() {\n var _this3 = this;\n\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN, function (event) {\n return _this3._keydown(event);\n });\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER, function (event) {\n return _this3.pause(event);\n });\n EventHandler.on(this._element, EVENT_MOUSELEAVE, function (event) {\n return _this3.cycle(event);\n });\n }\n\n if (this._config.touch && this._touchSupported) {\n this._addTouchEventListeners();\n }\n };\n\n _proto._addTouchEventListeners = function _addTouchEventListeners() {\n var _this4 = this;\n\n var start = function start(event) {\n if (_this4._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {\n _this4.touchStartX = event.clientX;\n } else if (!_this4._pointerEvent) {\n _this4.touchStartX = event.touches[0].clientX;\n }\n };\n\n var move = function move(event) {\n // ensure swiping with one touch and not pinching\n if (event.touches && event.touches.length > 1) {\n _this4.touchDeltaX = 0;\n } else {\n _this4.touchDeltaX = event.touches[0].clientX - _this4.touchStartX;\n }\n };\n\n var end = function end(event) {\n if (_this4._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {\n _this4.touchDeltaX = event.clientX - _this4.touchStartX;\n }\n\n _this4._handleSwipe();\n\n if (_this4._config.pause === 'hover') {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n _this4.pause();\n\n if (_this4.touchTimeout) {\n clearTimeout(_this4.touchTimeout);\n }\n\n _this4.touchTimeout = setTimeout(function (event) {\n return _this4.cycle(event);\n }, TOUCHEVENT_COMPAT_WAIT + _this4._config.interval);\n }\n };\n\n SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(function (itemImg) {\n EventHandler.on(itemImg, EVENT_DRAG_START, function (e) {\n return e.preventDefault();\n });\n });\n\n if (this._pointerEvent) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, function (event) {\n return start(event);\n });\n EventHandler.on(this._element, EVENT_POINTERUP, function (event) {\n return end(event);\n });\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT);\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, function (event) {\n return start(event);\n });\n EventHandler.on(this._element, EVENT_TOUCHMOVE, function (event) {\n return move(event);\n });\n EventHandler.on(this._element, EVENT_TOUCHEND, function (event) {\n return end(event);\n });\n }\n };\n\n _proto._keydown = function _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return;\n }\n\n if (event.key === ARROW_LEFT_KEY) {\n event.preventDefault();\n\n if (isRTL) {\n this.next();\n } else {\n this.prev();\n }\n } else if (event.key === ARROW_RIGHT_KEY) {\n event.preventDefault();\n\n if (isRTL) {\n this.prev();\n } else {\n this.next();\n }\n }\n };\n\n _proto._getItemIndex = function _getItemIndex(element) {\n this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : [];\n return this._items.indexOf(element);\n };\n\n _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {\n var isNextDirection = direction === DIRECTION_NEXT;\n var isPrevDirection = direction === DIRECTION_PREV;\n\n var activeIndex = this._getItemIndex(activeElement);\n\n var lastItemIndex = this._items.length - 1;\n var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;\n\n if (isGoingToWrap && !this._config.wrap) {\n return activeElement;\n }\n\n var delta = direction === DIRECTION_PREV ? -1 : 1;\n var itemIndex = (activeIndex + delta) % this._items.length;\n return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];\n };\n\n _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {\n var targetIndex = this._getItemIndex(relatedTarget);\n\n var fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element));\n\n return EventHandler.trigger(this._element, EVENT_SLIDE, {\n relatedTarget: relatedTarget,\n direction: eventDirectionName,\n from: fromIndex,\n to: targetIndex\n });\n };\n\n _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n var activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement);\n activeIndicator.classList.remove(CLASS_NAME_ACTIVE$1);\n activeIndicator.removeAttribute('aria-current');\n var indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement);\n\n for (var i = 0; i < indicators.length; i++) {\n if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {\n indicators[i].classList.add(CLASS_NAME_ACTIVE$1);\n indicators[i].setAttribute('aria-current', 'true');\n break;\n }\n }\n }\n };\n\n _proto._updateInterval = function _updateInterval() {\n var element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n\n if (!element) {\n return;\n }\n\n var elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);\n\n if (elementInterval) {\n this._config.defaultInterval = this._config.defaultInterval || this._config.interval;\n this._config.interval = elementInterval;\n } else {\n this._config.interval = this._config.defaultInterval || this._config.interval;\n }\n };\n\n _proto._slide = function _slide(direction, element) {\n var _this5 = this;\n\n var activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n\n var activeElementIndex = this._getItemIndex(activeElement);\n\n var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);\n\n var nextElementIndex = this._getItemIndex(nextElement);\n\n var isCycling = Boolean(this._interval);\n var directionalClassName = direction === DIRECTION_NEXT ? CLASS_NAME_START : CLASS_NAME_END;\n var orderClassName = direction === DIRECTION_NEXT ? CLASS_NAME_NEXT : CLASS_NAME_PREV;\n var eventDirectionName = direction === DIRECTION_NEXT ? DIRECTION_LEFT : DIRECTION_RIGHT;\n\n if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$1)) {\n this._isSliding = false;\n return;\n }\n\n var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);\n\n if (slideEvent.defaultPrevented) {\n return;\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n return;\n }\n\n this._isSliding = true;\n\n if (isCycling) {\n this.pause();\n }\n\n this._setActiveIndicatorElement(nextElement);\n\n this._activeElement = nextElement;\n\n if (this._element.classList.contains(CLASS_NAME_SLIDE)) {\n nextElement.classList.add(orderClassName);\n reflow(nextElement);\n activeElement.classList.add(directionalClassName);\n nextElement.classList.add(directionalClassName);\n var transitionDuration = getTransitionDurationFromElement(activeElement);\n EventHandler.one(activeElement, 'transitionend', function () {\n nextElement.classList.remove(directionalClassName, orderClassName);\n nextElement.classList.add(CLASS_NAME_ACTIVE$1);\n activeElement.classList.remove(CLASS_NAME_ACTIVE$1, orderClassName, directionalClassName);\n _this5._isSliding = false;\n setTimeout(function () {\n EventHandler.trigger(_this5._element, EVENT_SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n });\n }, 0);\n });\n emulateTransitionEnd(activeElement, transitionDuration);\n } else {\n activeElement.classList.remove(CLASS_NAME_ACTIVE$1);\n nextElement.classList.add(CLASS_NAME_ACTIVE$1);\n this._isSliding = false;\n EventHandler.trigger(this._element, EVENT_SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n });\n }\n\n if (isCycling) {\n this.cycle();\n }\n } // Static\n ;\n\n Carousel.carouselInterface = function carouselInterface(element, config) {\n var data = Data.getData(element, DATA_KEY$2);\n\n var _config = _extends({}, Default, Manipulator.getDataAttributes(element));\n\n if (typeof config === 'object') {\n _config = _extends({}, _config, config);\n }\n\n var action = typeof config === 'string' ? config : _config.slide;\n\n if (!data) {\n data = new Carousel(element, _config);\n }\n\n if (typeof config === 'number') {\n data.to(config);\n } else if (typeof action === 'string') {\n if (typeof data[action] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + action + \"\\\"\");\n }\n\n data[action]();\n } else if (_config.interval && _config.ride) {\n data.pause();\n data.cycle();\n }\n };\n\n Carousel.jQueryInterface = function jQueryInterface(config) {\n return this.each(function () {\n Carousel.carouselInterface(this, config);\n });\n };\n\n Carousel.dataApiClickHandler = function dataApiClickHandler(event) {\n var target = getElementFromSelector(this);\n\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return;\n }\n\n var config = _extends({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));\n\n var slideIndex = this.getAttribute('data-bs-slide-to');\n\n if (slideIndex) {\n config.interval = false;\n }\n\n Carousel.carouselInterface(target, config);\n\n if (slideIndex) {\n Data.getData(target, DATA_KEY$2).to(slideIndex);\n }\n\n event.preventDefault();\n };\n\n _createClass(Carousel, null, [{\n key: \"Default\",\n get: function get() {\n return Default;\n }\n }, {\n key: \"DATA_KEY\",\n get: function get() {\n return DATA_KEY$2;\n }\n }]);\n\n return Carousel;\n }(BaseComponent);\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);\n EventHandler.on(window, EVENT_LOAD_DATA_API, function () {\n var carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);\n\n for (var i = 0, len = carousels.length; i < len; i++) {\n Carousel.carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY$2));\n }\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Carousel to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(NAME$2, Carousel);\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n var NAME$3 = 'collapse';\n var DATA_KEY$3 = 'bs.collapse';\n var EVENT_KEY$3 = \".\" + DATA_KEY$3;\n var DATA_API_KEY$3 = '.data-api';\n var Default$1 = {\n toggle: true,\n parent: ''\n };\n var DefaultType$1 = {\n toggle: 'boolean',\n parent: '(string|element)'\n };\n var EVENT_SHOW = \"show\" + EVENT_KEY$3;\n var EVENT_SHOWN = \"shown\" + EVENT_KEY$3;\n var EVENT_HIDE = \"hide\" + EVENT_KEY$3;\n var EVENT_HIDDEN = \"hidden\" + EVENT_KEY$3;\n var EVENT_CLICK_DATA_API$3 = \"click\" + EVENT_KEY$3 + DATA_API_KEY$3;\n var CLASS_NAME_SHOW$1 = 'show';\n var CLASS_NAME_COLLAPSE = 'collapse';\n var CLASS_NAME_COLLAPSING = 'collapsing';\n var CLASS_NAME_COLLAPSED = 'collapsed';\n var WIDTH = 'width';\n var HEIGHT = 'height';\n var SELECTOR_ACTIVES = '.show, .collapsing';\n var SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle=\"collapse\"]';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n var Collapse = /*#__PURE__*/function (_BaseComponent) {\n _inheritsLoose(Collapse, _BaseComponent);\n\n function Collapse(element, config) {\n var _this;\n\n _this = _BaseComponent.call(this, element) || this;\n _this._isTransitioning = false;\n _this._config = _this._getConfig(config);\n _this._triggerArray = SelectorEngine.find(SELECTOR_DATA_TOGGLE$1 + \"[href=\\\"#\" + element.id + \"\\\"],\" + (SELECTOR_DATA_TOGGLE$1 + \"[data-bs-target=\\\"#\" + element.id + \"\\\"]\"));\n var toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$1);\n\n for (var i = 0, len = toggleList.length; i < len; i++) {\n var elem = toggleList[i];\n var selector = getSelectorFromElement(elem);\n var filterElement = SelectorEngine.find(selector).filter(function (foundElem) {\n return foundElem === element;\n });\n\n if (selector !== null && filterElement.length) {\n _this._selector = selector;\n\n _this._triggerArray.push(elem);\n }\n }\n\n _this._parent = _this._config.parent ? _this._getParent() : null;\n\n if (!_this._config.parent) {\n _this._addAriaAndCollapsedClass(_this._element, _this._triggerArray);\n }\n\n if (_this._config.toggle) {\n _this.toggle();\n }\n\n return _this;\n } // Getters\n\n\n var _proto = Collapse.prototype;\n\n // Public\n _proto.toggle = function toggle() {\n if (this._element.classList.contains(CLASS_NAME_SHOW$1)) {\n this.hide();\n } else {\n this.show();\n }\n };\n\n _proto.show = function show() {\n var _this2 = this;\n\n if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW$1)) {\n return;\n }\n\n var actives;\n var activesData;\n\n if (this._parent) {\n actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(function (elem) {\n if (typeof _this2._config.parent === 'string') {\n return elem.getAttribute('data-bs-parent') === _this2._config.parent;\n }\n\n return elem.classList.contains(CLASS_NAME_COLLAPSE);\n });\n\n if (actives.length === 0) {\n actives = null;\n }\n }\n\n var container = SelectorEngine.findOne(this._selector);\n\n if (actives) {\n var tempActiveData = actives.find(function (elem) {\n return container !== elem;\n });\n activesData = tempActiveData ? Data.getData(tempActiveData, DATA_KEY$3) : null;\n\n if (activesData && activesData._isTransitioning) {\n return;\n }\n }\n\n var startEvent = EventHandler.trigger(this._element, EVENT_SHOW);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n if (actives) {\n actives.forEach(function (elemActive) {\n if (container !== elemActive) {\n Collapse.collapseInterface(elemActive, 'hide');\n }\n\n if (!activesData) {\n Data.setData(elemActive, DATA_KEY$3, null);\n }\n });\n }\n\n var dimension = this._getDimension();\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.style[dimension] = 0;\n\n if (this._triggerArray.length) {\n this._triggerArray.forEach(function (element) {\n element.classList.remove(CLASS_NAME_COLLAPSED);\n element.setAttribute('aria-expanded', true);\n });\n }\n\n this.setTransitioning(true);\n\n var complete = function complete() {\n _this2._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n _this2._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$1);\n\n _this2._element.style[dimension] = '';\n\n _this2.setTransitioning(false);\n\n EventHandler.trigger(_this2._element, EVENT_SHOWN);\n };\n\n var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);\n var scrollSize = \"scroll\" + capitalizedDimension;\n var transitionDuration = getTransitionDurationFromElement(this._element);\n EventHandler.one(this._element, 'transitionend', complete);\n emulateTransitionEnd(this._element, transitionDuration);\n this._element.style[dimension] = this._element[scrollSize] + \"px\";\n };\n\n _proto.hide = function hide() {\n var _this3 = this;\n\n if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW$1)) {\n return;\n }\n\n var startEvent = EventHandler.trigger(this._element, EVENT_HIDE);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n var dimension = this._getDimension();\n\n this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + \"px\";\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$1);\n\n var triggerArrayLength = this._triggerArray.length;\n\n if (triggerArrayLength > 0) {\n for (var i = 0; i < triggerArrayLength; i++) {\n var trigger = this._triggerArray[i];\n var elem = getElementFromSelector(trigger);\n\n if (elem && !elem.classList.contains(CLASS_NAME_SHOW$1)) {\n trigger.classList.add(CLASS_NAME_COLLAPSED);\n trigger.setAttribute('aria-expanded', false);\n }\n }\n }\n\n this.setTransitioning(true);\n\n var complete = function complete() {\n _this3.setTransitioning(false);\n\n _this3._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n _this3._element.classList.add(CLASS_NAME_COLLAPSE);\n\n EventHandler.trigger(_this3._element, EVENT_HIDDEN);\n };\n\n this._element.style[dimension] = '';\n var transitionDuration = getTransitionDurationFromElement(this._element);\n EventHandler.one(this._element, 'transitionend', complete);\n emulateTransitionEnd(this._element, transitionDuration);\n };\n\n _proto.setTransitioning = function setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning;\n };\n\n _proto.dispose = function dispose() {\n _BaseComponent.prototype.dispose.call(this);\n\n this._config = null;\n this._parent = null;\n this._triggerArray = null;\n this._isTransitioning = null;\n } // Private\n ;\n\n _proto._getConfig = function _getConfig(config) {\n config = _extends({}, Default$1, config);\n config.toggle = Boolean(config.toggle); // Coerce string values\n\n typeCheckConfig(NAME$3, config, DefaultType$1);\n return config;\n };\n\n _proto._getDimension = function _getDimension() {\n return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT;\n };\n\n _proto._getParent = function _getParent() {\n var _this4 = this;\n\n var parent = this._config.parent;\n\n if (isElement(parent)) {\n // it's a jQuery object\n if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {\n parent = parent[0];\n }\n } else {\n parent = SelectorEngine.findOne(parent);\n }\n\n var selector = SELECTOR_DATA_TOGGLE$1 + \"[data-bs-parent=\\\"\" + parent + \"\\\"]\";\n SelectorEngine.find(selector, parent).forEach(function (element) {\n var selected = getElementFromSelector(element);\n\n _this4._addAriaAndCollapsedClass(selected, [element]);\n });\n return parent;\n };\n\n _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {\n if (!element || !triggerArray.length) {\n return;\n }\n\n var isOpen = element.classList.contains(CLASS_NAME_SHOW$1);\n triggerArray.forEach(function (elem) {\n if (isOpen) {\n elem.classList.remove(CLASS_NAME_COLLAPSED);\n } else {\n elem.classList.add(CLASS_NAME_COLLAPSED);\n }\n\n elem.setAttribute('aria-expanded', isOpen);\n });\n } // Static\n ;\n\n Collapse.collapseInterface = function collapseInterface(element, config) {\n var data = Data.getData(element, DATA_KEY$3);\n\n var _config = _extends({}, Default$1, Manipulator.getDataAttributes(element), typeof config === 'object' && config ? config : {});\n\n if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false;\n }\n\n if (!data) {\n data = new Collapse(element, _config);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n\n data[config]();\n }\n };\n\n Collapse.jQueryInterface = function jQueryInterface(config) {\n return this.each(function () {\n Collapse.collapseInterface(this, config);\n });\n };\n\n _createClass(Collapse, null, [{\n key: \"Default\",\n get: function get() {\n return Default$1;\n }\n }, {\n key: \"DATA_KEY\",\n get: function get() {\n return DATA_KEY$3;\n }\n }]);\n\n return Collapse;\n }(BaseComponent);\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$1, function (event) {\n // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {\n event.preventDefault();\n }\n\n var triggerData = Manipulator.getDataAttributes(this);\n var selector = getSelectorFromElement(this);\n var selectorElements = SelectorEngine.find(selector);\n selectorElements.forEach(function (element) {\n var data = Data.getData(element, DATA_KEY$3);\n var config;\n\n if (data) {\n // update parent attribute\n if (data._parent === null && typeof triggerData.parent === 'string') {\n data._config.parent = triggerData.parent;\n data._parent = data._getParent();\n }\n\n config = 'toggle';\n } else {\n config = triggerData;\n }\n\n Collapse.collapseInterface(element, config);\n });\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Collapse to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(NAME$3, Collapse);\n\n var top = 'top';\n var bottom = 'bottom';\n var right = 'right';\n var left = 'left';\n var auto = 'auto';\n var basePlacements = [top, bottom, right, left];\n var start = 'start';\n var end = 'end';\n var clippingParents = 'clippingParents';\n var viewport = 'viewport';\n var popper = 'popper';\n var reference = 'reference';\n var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n }, []);\n var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n }, []); // modifiers that need to read the DOM\n\n var beforeRead = 'beforeRead';\n var read = 'read';\n var afterRead = 'afterRead'; // pure-logic modifiers\n\n var beforeMain = 'beforeMain';\n var main = 'main';\n var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\n var beforeWrite = 'beforeWrite';\n var write = 'write';\n var afterWrite = 'afterWrite';\n var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];\n\n function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n }\n\n /*:: import type { Window } from '../types'; */\n\n /*:: declare function getWindow(node: Node | Window): Window; */\n function getWindow(node) {\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n }\n\n /*:: declare function isElement(node: mixed): boolean %checks(node instanceof\n Element); */\n\n function isElement$1(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n }\n /*:: declare function isHTMLElement(node: mixed): boolean %checks(node instanceof\n HTMLElement); */\n\n\n function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n }\n /*:: declare function isShadowRoot(node: mixed): boolean %checks(node instanceof\n ShadowRoot); */\n\n\n function isShadowRoot(node) {\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n }\n\n // and applies them to the HTMLElements such as popper and arrow\n\n function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }\n\n function effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n } // eslint-disable-next-line import/no-unused-modules\n\n\n var applyStyles$1 = {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n };\n\n function getBasePlacement(placement) {\n return placement.split('-')[0];\n }\n\n // Returns the layout rect of an element relative to its offsetParent. Layout\n // means it doesn't take into account transforms.\n function getLayoutRect(element) {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n }\n\n function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n }\n\n function getComputedStyle$1(element) {\n return getWindow(element).getComputedStyle(element);\n }\n\n function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n }\n\n function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement$1(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n }\n\n function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || // DOM Element detected\n // $FlowFixMe[incompatible-return]: need a better way to handle this...\n element.host || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n }\n\n function getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n\n var offsetParent = element.offsetParent;\n\n if (offsetParent) {\n var html = getDocumentElement(offsetParent);\n\n if (getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && getComputedStyle$1(html).position !== 'static') {\n return html;\n }\n }\n\n return offsetParent;\n } // `.offsetParent` reports `null` for fixed elements, while absolute elements\n // return the containing block\n\n\n function getContainingBlock(element) {\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n } // Gets the closest ancestor positioned element. Handles some edge cases,\n // such as table ancestors and cross browser bugs.\n\n\n function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static') {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n }\n\n function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n }\n\n function within(min, value, max) {\n return Math.max(min, Math.min(value, max));\n }\n\n function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n }\n\n function mergePaddingObject(paddingObject) {\n return Object.assign(Object.assign({}, getFreshSideObject()), paddingObject);\n }\n\n function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n }\n\n function arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = state.modifiersData[name + \"#persistent\"].padding;\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n }\n\n function effect$1(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element,\n _options$padding = options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n state.modifiersData[name + \"#persistent\"] = {\n padding: mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements))\n };\n } // eslint-disable-next-line import/no-unused-modules\n\n\n var arrow$1 = {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect$1,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n };\n\n var unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n }; // Round the offsets to the nearest suitable subpixel based on the DPR.\n // Zooming can change the DPR, but it seems to report a value that will\n // cleanly divide the values into the appropriate subpixels.\n\n function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n }\n\n function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets;\n\n var _ref3 = roundOffsets ? roundOffsetsByDPR(offsets) : offsets,\n _ref3$x = _ref3.x,\n x = _ref3$x === void 0 ? 0 : _ref3$x,\n _ref3$y = _ref3.y,\n y = _ref3$y === void 0 ? 0 : _ref3$y;\n\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n /*:: offsetParent = (offsetParent: Element); */\n\n\n if (placement === top) {\n sideY = bottom;\n y -= offsetParent.clientHeight - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left) {\n sideX = right;\n x -= offsetParent.clientWidth - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n }\n\n function computeStyles(_ref4) {\n var state = _ref4.state,\n options = _ref4.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign(Object.assign({}, state.styles.popper), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign(Object.assign({}, state.styles.arrow), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, {\n 'data-popper-placement': state.placement\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n var computeStyles$1 = {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n };\n\n var passive = {\n passive: true\n };\n\n function effect$2(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n } // eslint-disable-next-line import/no-unused-modules\n\n\n var eventListeners = {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect$2,\n data: {}\n };\n\n var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n };\n function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n }\n\n var hash$1 = {\n start: 'end',\n end: 'start'\n };\n function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash$1[matched];\n });\n }\n\n function getBoundingClientRect(element) {\n var rect = element.getBoundingClientRect();\n return {\n width: rect.width,\n height: rect.height,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n x: rect.left,\n y: rect.top\n };\n }\n\n function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n }\n\n function getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n }\n\n function getViewportRect(element) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n }\n\n // of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\n function getDocumentRect(element) {\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = element.ownerDocument.body;\n var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n }\n\n function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle$1(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n }\n\n function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n }\n\n /*\n given a DOM element, return the list of all scroll parents, up the list of ancesors\n until we get to the top window object. This list is what we attach scroll listeners\n to, because if any of these parent elements scroll, we'll need to re-calculate the\n reference element's position.\n */\n\n function listScrollParents(element, list) {\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = getNodeName(scrollParent) === 'body';\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n }\n\n function rectToClientRect(rect) {\n return Object.assign(Object.assign({}, rect), {}, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n }\n\n function getInnerBoundingClientRect(element) {\n var rect = getBoundingClientRect(element);\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n }\n\n function getClientRectFromMixedType(element, clippingParent) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n } // A \"clipping parent\" is an overflowable container with the characteristic of\n // clipping (or hiding) overflowing elements with a position different from\n // `initial`\n\n\n function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement$1(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement$1(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of\n // clipping parents\n\n\n function getClippingRect(element, boundary, rootBoundary) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent);\n accRect.top = Math.max(rect.top, accRect.top);\n accRect.right = Math.min(rect.right, accRect.right);\n accRect.bottom = Math.min(rect.bottom, accRect.bottom);\n accRect.left = Math.max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n }\n\n function getVariation(placement) {\n return placement.split('-')[1];\n }\n\n function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n }\n }\n\n return offsets;\n }\n\n function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var referenceElement = state.elements.reference;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement$1(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n var referenceClientRect = getBoundingClientRect(referenceElement);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign(Object.assign({}, popperRect), popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n }\n\n /*:: type OverflowsMap = { [ComputedPlacement]: number }; */\n\n /*;; type OverflowsMap = { [key in ComputedPlacement]: number }; */\n function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements$1.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements$1;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n }\n\n function getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n }\n\n function flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n } // eslint-disable-next-line import/no-unused-modules\n\n\n var flip$1 = {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n };\n\n function getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n }\n\n function isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n }\n\n function hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n var hide$1 = {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n };\n\n function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign(Object.assign({}, rects), {}, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n }\n\n function offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n var offset$1 = {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n };\n\n function popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n var popperOffsets$1 = {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n };\n\n function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n }\n\n function preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign(Object.assign({}, state.rects), {}, {\n placement: state.placement\n })) : tetherOffset;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = popperOffsets[mainAxis] + overflow[mainSide];\n var max = popperOffsets[mainAxis] - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;\n var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? Math.min(min, tetherMin) : min, offset, tether ? Math.max(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var _preventedOffset = within(_min, _offset, _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n var preventOverflow$1 = {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n };\n\n function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n\n function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n }\n\n // Composite means it takes into account transforms as well as layout.\n\n function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }\n\n function order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n }\n\n function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n }\n\n function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n }\n\n function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign(Object.assign(Object.assign({}, existing), current), {}, {\n options: Object.assign(Object.assign({}, existing.options), current.options),\n data: Object.assign(Object.assign({}, existing.data), current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n }\n\n var DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n };\n\n function areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n }\n\n function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign(Object.assign({}, DEFAULT_OPTIONS), defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(options) {\n cleanupModifierEffects();\n state.options = Object.assign(Object.assign(Object.assign({}, defaultOptions), state.options), options);\n state.scrollParents = {\n reference: isElement$1(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n }\n var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\n var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];\n var createPopper$1 = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n }); // eslint-disable-next-line import/no-unused-modules\n\n var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];\n var createPopper$2 = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers$1\n }); // eslint-disable-next-line import/no-unused-modules\n\n var Popper = /*#__PURE__*/Object.freeze({\n __proto__: null,\n popperGenerator: popperGenerator,\n detectOverflow: detectOverflow,\n createPopperBase: createPopper,\n createPopper: createPopper$2,\n createPopperLite: createPopper$1,\n top: top,\n bottom: bottom,\n right: right,\n left: left,\n auto: auto,\n basePlacements: basePlacements,\n start: start,\n end: end,\n clippingParents: clippingParents,\n viewport: viewport,\n popper: popper,\n reference: reference,\n variationPlacements: variationPlacements,\n placements: placements,\n beforeRead: beforeRead,\n read: read,\n afterRead: afterRead,\n beforeMain: beforeMain,\n main: main,\n afterMain: afterMain,\n beforeWrite: beforeWrite,\n write: write,\n afterWrite: afterWrite,\n modifierPhases: modifierPhases,\n applyStyles: applyStyles$1,\n arrow: arrow$1,\n computeStyles: computeStyles$1,\n eventListeners: eventListeners,\n flip: flip$1,\n hide: hide$1,\n offset: offset$1,\n popperOffsets: popperOffsets$1,\n preventOverflow: preventOverflow$1\n });\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n var NAME$4 = 'dropdown';\n var DATA_KEY$4 = 'bs.dropdown';\n var EVENT_KEY$4 = \".\" + DATA_KEY$4;\n var DATA_API_KEY$4 = '.data-api';\n var ESCAPE_KEY = 'Escape';\n var SPACE_KEY = 'Space';\n var TAB_KEY = 'Tab';\n var ARROW_UP_KEY = 'ArrowUp';\n var ARROW_DOWN_KEY = 'ArrowDown';\n var RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button\n\n var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEY + \"|\" + ARROW_DOWN_KEY + \"|\" + ESCAPE_KEY);\n var EVENT_HIDE$1 = \"hide\" + EVENT_KEY$4;\n var EVENT_HIDDEN$1 = \"hidden\" + EVENT_KEY$4;\n var EVENT_SHOW$1 = \"show\" + EVENT_KEY$4;\n var EVENT_SHOWN$1 = \"shown\" + EVENT_KEY$4;\n var EVENT_CLICK = \"click\" + EVENT_KEY$4;\n var EVENT_CLICK_DATA_API$4 = \"click\" + EVENT_KEY$4 + DATA_API_KEY$4;\n var EVENT_KEYDOWN_DATA_API = \"keydown\" + EVENT_KEY$4 + DATA_API_KEY$4;\n var EVENT_KEYUP_DATA_API = \"keyup\" + EVENT_KEY$4 + DATA_API_KEY$4;\n var CLASS_NAME_DISABLED = 'disabled';\n var CLASS_NAME_SHOW$2 = 'show';\n var CLASS_NAME_DROPUP = 'dropup';\n var CLASS_NAME_DROPEND = 'dropend';\n var CLASS_NAME_DROPSTART = 'dropstart';\n var CLASS_NAME_NAVBAR = 'navbar';\n var SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle=\"dropdown\"]';\n var SELECTOR_FORM_CHILD = '.dropdown form';\n var SELECTOR_MENU = '.dropdown-menu';\n var SELECTOR_NAVBAR_NAV = '.navbar-nav';\n var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';\n var PLACEMENT_TOP = isRTL ? 'top-end' : 'top-start';\n var PLACEMENT_TOPEND = isRTL ? 'top-start' : 'top-end';\n var PLACEMENT_BOTTOM = isRTL ? 'bottom-end' : 'bottom-start';\n var PLACEMENT_BOTTOMEND = isRTL ? 'bottom-start' : 'bottom-end';\n var PLACEMENT_RIGHT = isRTL ? 'left-start' : 'right-start';\n var PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start';\n var Default$2 = {\n offset: [0, 2],\n flip: true,\n boundary: 'clippingParents',\n reference: 'toggle',\n display: 'dynamic',\n popperConfig: null\n };\n var DefaultType$2 = {\n offset: '(array|string|function)',\n flip: 'boolean',\n boundary: '(string|element)',\n reference: '(string|element|object)',\n display: 'string',\n popperConfig: '(null|object|function)'\n };\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n var Dropdown = /*#__PURE__*/function (_BaseComponent) {\n _inheritsLoose(Dropdown, _BaseComponent);\n\n function Dropdown(element, config) {\n var _this;\n\n _this = _BaseComponent.call(this, element) || this;\n _this._popper = null;\n _this._config = _this._getConfig(config);\n _this._menu = _this._getMenuElement();\n _this._inNavbar = _this._detectNavbar();\n\n _this._addEventListeners();\n\n return _this;\n } // Getters\n\n\n var _proto = Dropdown.prototype;\n\n // Public\n _proto.toggle = function toggle() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {\n return;\n }\n\n var isActive = this._element.classList.contains(CLASS_NAME_SHOW$2);\n\n Dropdown.clearMenus();\n\n if (isActive) {\n return;\n }\n\n this.show();\n };\n\n _proto.show = function show() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW$2)) {\n return;\n }\n\n var parent = Dropdown.getParentFromElement(this._element);\n var relatedTarget = {\n relatedTarget: this._element\n };\n var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$1, relatedTarget);\n\n if (showEvent.defaultPrevented) {\n return;\n } // Totally disable Popper for Dropdowns in Navbar\n\n\n if (this._inNavbar) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'none');\n } else {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)');\n }\n\n var referenceElement = this._element;\n\n if (this._config.reference === 'parent') {\n referenceElement = parent;\n } else if (isElement(this._config.reference)) {\n referenceElement = this._config.reference; // Check if it's jQuery element\n\n if (typeof this._config.reference.jquery !== 'undefined') {\n referenceElement = this._config.reference[0];\n }\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference;\n }\n\n var popperConfig = this._getPopperConfig();\n\n var isDisplayStatic = popperConfig.modifiers.find(function (modifier) {\n return modifier.name === 'applyStyles' && modifier.enabled === false;\n });\n this._popper = createPopper$2(referenceElement, this._menu, popperConfig);\n\n if (isDisplayStatic) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static');\n }\n } // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {\n var _ref;\n\n (_ref = []).concat.apply(_ref, document.body.children).forEach(function (elem) {\n return EventHandler.on(elem, 'mouseover', null, noop());\n });\n }\n\n this._element.focus();\n\n this._element.setAttribute('aria-expanded', true);\n\n this._menu.classList.toggle(CLASS_NAME_SHOW$2);\n\n this._element.classList.toggle(CLASS_NAME_SHOW$2);\n\n EventHandler.trigger(this._element, EVENT_SHOWN$1, relatedTarget);\n };\n\n _proto.hide = function hide() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW$2)) {\n return;\n }\n\n var relatedTarget = {\n relatedTarget: this._element\n };\n var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$1, relatedTarget);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n if (this._popper) {\n this._popper.destroy();\n }\n\n this._menu.classList.toggle(CLASS_NAME_SHOW$2);\n\n this._element.classList.toggle(CLASS_NAME_SHOW$2);\n\n Manipulator.removeDataAttribute(this._menu, 'popper');\n EventHandler.trigger(this._element, EVENT_HIDDEN$1, relatedTarget);\n };\n\n _proto.dispose = function dispose() {\n _BaseComponent.prototype.dispose.call(this);\n\n EventHandler.off(this._element, EVENT_KEY$4);\n this._menu = null;\n\n if (this._popper) {\n this._popper.destroy();\n\n this._popper = null;\n }\n };\n\n _proto.update = function update() {\n this._inNavbar = this._detectNavbar();\n\n if (this._popper) {\n this._popper.update();\n }\n } // Private\n ;\n\n _proto._addEventListeners = function _addEventListeners() {\n var _this2 = this;\n\n EventHandler.on(this._element, EVENT_CLICK, function (event) {\n event.preventDefault();\n event.stopPropagation();\n\n _this2.toggle();\n });\n };\n\n _proto._getConfig = function _getConfig(config) {\n config = _extends({}, this.constructor.Default, Manipulator.getDataAttributes(this._element), config);\n typeCheckConfig(NAME$4, config, this.constructor.DefaultType);\n\n if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(NAME$4.toUpperCase() + \": Option \\\"reference\\\" provided type \\\"object\\\" without a required \\\"getBoundingClientRect\\\" method.\");\n }\n\n return config;\n };\n\n _proto._getMenuElement = function _getMenuElement() {\n return SelectorEngine.next(this._element, SELECTOR_MENU)[0];\n };\n\n _proto._getPlacement = function _getPlacement() {\n var parentDropdown = this._element.parentNode;\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT;\n } // We need to trim the value because custom properties can also include spaces\n\n\n var isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;\n };\n\n _proto._detectNavbar = function _detectNavbar() {\n return this._element.closest(\".\" + CLASS_NAME_NAVBAR) !== null;\n };\n\n _proto._getOffset = function _getOffset() {\n var _this3 = this;\n\n var offset = this._config.offset;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(function (val) {\n return Number.parseInt(val, 10);\n });\n }\n\n if (typeof offset === 'function') {\n return function (popperData) {\n return offset(popperData, _this3._element);\n };\n }\n\n return offset;\n };\n\n _proto._getPopperConfig = function _getPopperConfig() {\n var defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n altBoundary: this._config.flip,\n boundary: this._config.boundary\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n }; // Disable Popper if we have a static display\n\n if (this._config.display === 'static') {\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }];\n }\n\n return _extends({}, defaultBsPopperConfig, typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig);\n } // Static\n ;\n\n Dropdown.dropdownInterface = function dropdownInterface(element, config) {\n var data = Data.getData(element, DATA_KEY$4);\n\n var _config = typeof config === 'object' ? config : null;\n\n if (!data) {\n data = new Dropdown(element, _config);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n\n data[config]();\n }\n };\n\n Dropdown.jQueryInterface = function jQueryInterface(config) {\n return this.each(function () {\n Dropdown.dropdownInterface(this, config);\n });\n };\n\n Dropdown.clearMenus = function clearMenus(event) {\n if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {\n return;\n }\n\n var toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$2);\n\n for (var i = 0, len = toggles.length; i < len; i++) {\n var context = Data.getData(toggles[i], DATA_KEY$4);\n var relatedTarget = {\n relatedTarget: toggles[i]\n };\n\n if (event && event.type === 'click') {\n relatedTarget.clickEvent = event;\n }\n\n if (!context) {\n continue;\n }\n\n var dropdownMenu = context._menu;\n\n if (!toggles[i].classList.contains(CLASS_NAME_SHOW$2)) {\n continue;\n }\n\n if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.key === TAB_KEY) && dropdownMenu.contains(event.target)) {\n continue;\n }\n\n var hideEvent = EventHandler.trigger(toggles[i], EVENT_HIDE$1, relatedTarget);\n\n if (hideEvent.defaultPrevented) {\n continue;\n } // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n\n if ('ontouchstart' in document.documentElement) {\n var _ref2;\n\n (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (elem) {\n return EventHandler.off(elem, 'mouseover', null, noop());\n });\n }\n\n toggles[i].setAttribute('aria-expanded', 'false');\n\n if (context._popper) {\n context._popper.destroy();\n }\n\n dropdownMenu.classList.remove(CLASS_NAME_SHOW$2);\n toggles[i].classList.remove(CLASS_NAME_SHOW$2);\n Manipulator.removeDataAttribute(dropdownMenu, 'popper');\n EventHandler.trigger(toggles[i], EVENT_HIDDEN$1, relatedTarget);\n }\n };\n\n Dropdown.getParentFromElement = function getParentFromElement(element) {\n return getElementFromSelector(element) || element.parentNode;\n };\n\n Dropdown.dataApiKeydownHandler = function dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {\n return;\n }\n\n var parent = Dropdown.getParentFromElement(this);\n var isActive = this.classList.contains(CLASS_NAME_SHOW$2);\n\n if (event.key === ESCAPE_KEY) {\n var button = this.matches(SELECTOR_DATA_TOGGLE$2) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$2)[0];\n button.focus();\n Dropdown.clearMenus();\n return;\n }\n\n if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {\n var _button = this.matches(SELECTOR_DATA_TOGGLE$2) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$2)[0];\n\n _button.click();\n\n return;\n }\n\n if (!isActive || event.key === SPACE_KEY) {\n Dropdown.clearMenus();\n return;\n }\n\n var items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible);\n\n if (!items.length) {\n return;\n }\n\n var index = items.indexOf(event.target); // Up\n\n if (event.key === ARROW_UP_KEY && index > 0) {\n index--;\n } // Down\n\n\n if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {\n index++;\n } // index is -1 if the first keydown is an ArrowUp\n\n\n index = index === -1 ? 0 : index;\n items[index].focus();\n };\n\n _createClass(Dropdown, null, [{\n key: \"Default\",\n get: function get() {\n return Default$2;\n }\n }, {\n key: \"DefaultType\",\n get: function get() {\n return DefaultType$2;\n }\n }, {\n key: \"DATA_KEY\",\n get: function get() {\n return DATA_KEY$4;\n }\n }]);\n\n return Dropdown;\n }(BaseComponent);\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown.dataApiKeydownHandler);\n EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);\n EventHandler.on(document, EVENT_CLICK_DATA_API$4, Dropdown.clearMenus);\n EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);\n EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$2, function (event) {\n event.preventDefault();\n event.stopPropagation();\n Dropdown.dropdownInterface(this, 'toggle');\n });\n EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_FORM_CHILD, function (e) {\n return e.stopPropagation();\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Dropdown to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(NAME$4, Dropdown);\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n var NAME$5 = 'modal';\n var DATA_KEY$5 = 'bs.modal';\n var EVENT_KEY$5 = \".\" + DATA_KEY$5;\n var DATA_API_KEY$5 = '.data-api';\n var ESCAPE_KEY$1 = 'Escape';\n var Default$3 = {\n backdrop: true,\n keyboard: true,\n focus: true\n };\n var DefaultType$3 = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n focus: 'boolean'\n };\n var EVENT_HIDE$2 = \"hide\" + EVENT_KEY$5;\n var EVENT_HIDE_PREVENTED = \"hidePrevented\" + EVENT_KEY$5;\n var EVENT_HIDDEN$2 = \"hidden\" + EVENT_KEY$5;\n var EVENT_SHOW$2 = \"show\" + EVENT_KEY$5;\n var EVENT_SHOWN$2 = \"shown\" + EVENT_KEY$5;\n var EVENT_FOCUSIN = \"focusin\" + EVENT_KEY$5;\n var EVENT_RESIZE = \"resize\" + EVENT_KEY$5;\n var EVENT_CLICK_DISMISS = \"click.dismiss\" + EVENT_KEY$5;\n var EVENT_KEYDOWN_DISMISS = \"keydown.dismiss\" + EVENT_KEY$5;\n var EVENT_MOUSEUP_DISMISS = \"mouseup.dismiss\" + EVENT_KEY$5;\n var EVENT_MOUSEDOWN_DISMISS = \"mousedown.dismiss\" + EVENT_KEY$5;\n var EVENT_CLICK_DATA_API$5 = \"click\" + EVENT_KEY$5 + DATA_API_KEY$5;\n var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';\n var CLASS_NAME_BACKDROP = 'modal-backdrop';\n var CLASS_NAME_OPEN = 'modal-open';\n var CLASS_NAME_FADE$1 = 'fade';\n var CLASS_NAME_SHOW$3 = 'show';\n var CLASS_NAME_STATIC = 'modal-static';\n var SELECTOR_DIALOG = '.modal-dialog';\n var SELECTOR_MODAL_BODY = '.modal-body';\n var SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle=\"modal\"]';\n var SELECTOR_DATA_DISMISS = '[data-bs-dismiss=\"modal\"]';\n var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';\n var SELECTOR_STICKY_CONTENT = '.sticky-top';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n var Modal = /*#__PURE__*/function (_BaseComponent) {\n _inheritsLoose(Modal, _BaseComponent);\n\n function Modal(element, config) {\n var _this;\n\n _this = _BaseComponent.call(this, element) || this;\n _this._config = _this._getConfig(config);\n _this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, element);\n _this._backdrop = null;\n _this._isShown = false;\n _this._isBodyOverflowing = false;\n _this._ignoreBackdropClick = false;\n _this._isTransitioning = false;\n _this._scrollbarWidth = 0;\n return _this;\n } // Getters\n\n\n var _proto = Modal.prototype;\n\n // Public\n _proto.toggle = function toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n };\n\n _proto.show = function show(relatedTarget) {\n var _this2 = this;\n\n if (this._isShown || this._isTransitioning) {\n return;\n }\n\n if (this._element.classList.contains(CLASS_NAME_FADE$1)) {\n this._isTransitioning = true;\n }\n\n var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$2, {\n relatedTarget: relatedTarget\n });\n\n if (this._isShown || showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n\n this._checkScrollbar();\n\n this._setScrollbar();\n\n this._adjustDialog();\n\n this._setEscapeEvent();\n\n this._setResizeEvent();\n\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {\n return _this2.hide(event);\n });\n EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, function () {\n EventHandler.one(_this2._element, EVENT_MOUSEUP_DISMISS, function (event) {\n if (event.target === _this2._element) {\n _this2._ignoreBackdropClick = true;\n }\n });\n });\n\n this._showBackdrop(function () {\n return _this2._showElement(relatedTarget);\n });\n };\n\n _proto.hide = function hide(event) {\n var _this3 = this;\n\n if (event) {\n event.preventDefault();\n }\n\n if (!this._isShown || this._isTransitioning) {\n return;\n }\n\n var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$2);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = false;\n\n var transition = this._element.classList.contains(CLASS_NAME_FADE$1);\n\n if (transition) {\n this._isTransitioning = true;\n }\n\n this._setEscapeEvent();\n\n this._setResizeEvent();\n\n EventHandler.off(document, EVENT_FOCUSIN);\n\n this._element.classList.remove(CLASS_NAME_SHOW$3);\n\n EventHandler.off(this._element, EVENT_CLICK_DISMISS);\n EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);\n\n if (transition) {\n var transitionDuration = getTransitionDurationFromElement(this._element);\n EventHandler.one(this._element, 'transitionend', function (event) {\n return _this3._hideModal(event);\n });\n emulateTransitionEnd(this._element, transitionDuration);\n } else {\n this._hideModal();\n }\n };\n\n _proto.dispose = function dispose() {\n [window, this._element, this._dialog].forEach(function (htmlElement) {\n return EventHandler.off(htmlElement, EVENT_KEY$5);\n });\n\n _BaseComponent.prototype.dispose.call(this);\n /**\n * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`\n * Do not move `document` in `htmlElements` array\n * It will remove `EVENT_CLICK_DATA_API` event that should remain\n */\n\n\n EventHandler.off(document, EVENT_FOCUSIN);\n this._config = null;\n this._dialog = null;\n this._backdrop = null;\n this._isShown = null;\n this._isBodyOverflowing = null;\n this._ignoreBackdropClick = null;\n this._isTransitioning = null;\n this._scrollbarWidth = null;\n };\n\n _proto.handleUpdate = function handleUpdate() {\n this._adjustDialog();\n } // Private\n ;\n\n _proto._getConfig = function _getConfig(config) {\n config = _extends({}, Default$3, config);\n typeCheckConfig(NAME$5, config, DefaultType$3);\n return config;\n };\n\n _proto._showElement = function _showElement(relatedTarget) {\n var _this4 = this;\n\n var transition = this._element.classList.contains(CLASS_NAME_FADE$1);\n\n var modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);\n\n if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.appendChild(this._element);\n }\n\n this._element.style.display = 'block';\n\n this._element.removeAttribute('aria-hidden');\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.scrollTop = 0;\n\n if (modalBody) {\n modalBody.scrollTop = 0;\n }\n\n if (transition) {\n reflow(this._element);\n }\n\n this._element.classList.add(CLASS_NAME_SHOW$3);\n\n if (this._config.focus) {\n this._enforceFocus();\n }\n\n var transitionComplete = function transitionComplete() {\n if (_this4._config.focus) {\n _this4._element.focus();\n }\n\n _this4._isTransitioning = false;\n EventHandler.trigger(_this4._element, EVENT_SHOWN$2, {\n relatedTarget: relatedTarget\n });\n };\n\n if (transition) {\n var transitionDuration = getTransitionDurationFromElement(this._dialog);\n EventHandler.one(this._dialog, 'transitionend', transitionComplete);\n emulateTransitionEnd(this._dialog, transitionDuration);\n } else {\n transitionComplete();\n }\n };\n\n _proto._enforceFocus = function _enforceFocus() {\n var _this5 = this;\n\n EventHandler.off(document, EVENT_FOCUSIN); // guard against infinite focus loop\n\n EventHandler.on(document, EVENT_FOCUSIN, function (event) {\n if (document !== event.target && _this5._element !== event.target && !_this5._element.contains(event.target)) {\n _this5._element.focus();\n }\n });\n };\n\n _proto._setEscapeEvent = function _setEscapeEvent() {\n var _this6 = this;\n\n if (this._isShown) {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, function (event) {\n if (_this6._config.keyboard && event.key === ESCAPE_KEY$1) {\n event.preventDefault();\n\n _this6.hide();\n } else if (!_this6._config.keyboard && event.key === ESCAPE_KEY$1) {\n _this6._triggerBackdropTransition();\n }\n });\n } else {\n EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS);\n }\n };\n\n _proto._setResizeEvent = function _setResizeEvent() {\n var _this7 = this;\n\n if (this._isShown) {\n EventHandler.on(window, EVENT_RESIZE, function () {\n return _this7._adjustDialog();\n });\n } else {\n EventHandler.off(window, EVENT_RESIZE);\n }\n };\n\n _proto._hideModal = function _hideModal() {\n var _this8 = this;\n\n this._element.style.display = 'none';\n\n this._element.setAttribute('aria-hidden', true);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n this._isTransitioning = false;\n\n this._showBackdrop(function () {\n document.body.classList.remove(CLASS_NAME_OPEN);\n\n _this8._resetAdjustments();\n\n _this8._resetScrollbar();\n\n EventHandler.trigger(_this8._element, EVENT_HIDDEN$2);\n });\n };\n\n _proto._removeBackdrop = function _removeBackdrop() {\n this._backdrop.parentNode.removeChild(this._backdrop);\n\n this._backdrop = null;\n };\n\n _proto._showBackdrop = function _showBackdrop(callback) {\n var _this9 = this;\n\n var animate = this._element.classList.contains(CLASS_NAME_FADE$1) ? CLASS_NAME_FADE$1 : '';\n\n if (this._isShown && this._config.backdrop) {\n this._backdrop = document.createElement('div');\n this._backdrop.className = CLASS_NAME_BACKDROP;\n\n if (animate) {\n this._backdrop.classList.add(animate);\n }\n\n document.body.appendChild(this._backdrop);\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, function (event) {\n if (_this9._ignoreBackdropClick) {\n _this9._ignoreBackdropClick = false;\n return;\n }\n\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (_this9._config.backdrop === 'static') {\n _this9._triggerBackdropTransition();\n } else {\n _this9.hide();\n }\n });\n\n if (animate) {\n reflow(this._backdrop);\n }\n\n this._backdrop.classList.add(CLASS_NAME_SHOW$3);\n\n if (!animate) {\n callback();\n return;\n }\n\n var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);\n EventHandler.one(this._backdrop, 'transitionend', callback);\n emulateTransitionEnd(this._backdrop, backdropTransitionDuration);\n } else if (!this._isShown && this._backdrop) {\n this._backdrop.classList.remove(CLASS_NAME_SHOW$3);\n\n var callbackRemove = function callbackRemove() {\n _this9._removeBackdrop();\n\n callback();\n };\n\n if (this._element.classList.contains(CLASS_NAME_FADE$1)) {\n var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);\n\n EventHandler.one(this._backdrop, 'transitionend', callbackRemove);\n emulateTransitionEnd(this._backdrop, _backdropTransitionDuration);\n } else {\n callbackRemove();\n }\n } else {\n callback();\n }\n };\n\n _proto._triggerBackdropTransition = function _triggerBackdropTransition() {\n var _this10 = this;\n\n var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n if (!isModalOverflowing) {\n this._element.style.overflowY = 'hidden';\n }\n\n this._element.classList.add(CLASS_NAME_STATIC);\n\n var modalTransitionDuration = getTransitionDurationFromElement(this._dialog);\n EventHandler.off(this._element, 'transitionend');\n EventHandler.one(this._element, 'transitionend', function () {\n _this10._element.classList.remove(CLASS_NAME_STATIC);\n\n if (!isModalOverflowing) {\n EventHandler.one(_this10._element, 'transitionend', function () {\n _this10._element.style.overflowY = '';\n });\n emulateTransitionEnd(_this10._element, modalTransitionDuration);\n }\n });\n emulateTransitionEnd(this._element, modalTransitionDuration);\n\n this._element.focus();\n } // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // ----------------------------------------------------------------------\n ;\n\n _proto._adjustDialog = function _adjustDialog() {\n var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n if (!this._isBodyOverflowing && isModalOverflowing && !isRTL || this._isBodyOverflowing && !isModalOverflowing && isRTL) {\n this._element.style.paddingLeft = this._scrollbarWidth + \"px\";\n }\n\n if (this._isBodyOverflowing && !isModalOverflowing && !isRTL || !this._isBodyOverflowing && isModalOverflowing && isRTL) {\n this._element.style.paddingRight = this._scrollbarWidth + \"px\";\n }\n };\n\n _proto._resetAdjustments = function _resetAdjustments() {\n this._element.style.paddingLeft = '';\n this._element.style.paddingRight = '';\n };\n\n _proto._checkScrollbar = function _checkScrollbar() {\n var rect = document.body.getBoundingClientRect();\n this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;\n this._scrollbarWidth = this._getScrollbarWidth();\n };\n\n _proto._setScrollbar = function _setScrollbar() {\n var _this11 = this;\n\n if (this._isBodyOverflowing) {\n this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', function (calculatedValue) {\n return calculatedValue + _this11._scrollbarWidth;\n });\n\n this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', function (calculatedValue) {\n return calculatedValue - _this11._scrollbarWidth;\n });\n\n this._setElementAttributes('body', 'paddingRight', function (calculatedValue) {\n return calculatedValue + _this11._scrollbarWidth;\n });\n }\n\n document.body.classList.add(CLASS_NAME_OPEN);\n };\n\n _proto._setElementAttributes = function _setElementAttributes(selector, styleProp, callback) {\n SelectorEngine.find(selector).forEach(function (element) {\n var actualValue = element.style[styleProp];\n var calculatedValue = window.getComputedStyle(element)[styleProp];\n Manipulator.setDataAttribute(element, styleProp, actualValue);\n element.style[styleProp] = callback(Number.parseFloat(calculatedValue)) + 'px';\n });\n };\n\n _proto._resetScrollbar = function _resetScrollbar() {\n this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');\n\n this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');\n\n this._resetElementAttributes('body', 'paddingRight');\n };\n\n _proto._resetElementAttributes = function _resetElementAttributes(selector, styleProp) {\n SelectorEngine.find(selector).forEach(function (element) {\n var value = Manipulator.getDataAttribute(element, styleProp);\n\n if (typeof value === 'undefined' && element === document.body) {\n element.style[styleProp] = '';\n } else {\n Manipulator.removeDataAttribute(element, styleProp);\n element.style[styleProp] = value;\n }\n });\n };\n\n _proto._getScrollbarWidth = function _getScrollbarWidth() {\n // thx d.walsh\n var scrollDiv = document.createElement('div');\n scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;\n document.body.appendChild(scrollDiv);\n var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n } // Static\n ;\n\n Modal.jQueryInterface = function jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n var data = Data.getData(this, DATA_KEY$5);\n\n var _config = _extends({}, Default$3, Manipulator.getDataAttributes(this), typeof config === 'object' && config ? config : {});\n\n if (!data) {\n data = new Modal(this, _config);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n\n data[config](relatedTarget);\n }\n });\n };\n\n _createClass(Modal, null, [{\n key: \"Default\",\n get: function get() {\n return Default$3;\n }\n }, {\n key: \"DATA_KEY\",\n get: function get() {\n return DATA_KEY$5;\n }\n }]);\n\n return Modal;\n }(BaseComponent);\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE$3, function (event) {\n var _this12 = this;\n\n var target = getElementFromSelector(this);\n\n if (this.tagName === 'A' || this.tagName === 'AREA') {\n event.preventDefault();\n }\n\n EventHandler.one(target, EVENT_SHOW$2, function (showEvent) {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$2, function () {\n if (isVisible(_this12)) {\n _this12.focus();\n }\n });\n });\n var data = Data.getData(target, DATA_KEY$5);\n\n if (!data) {\n var config = _extends({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));\n\n data = new Modal(target, config);\n }\n\n data.toggle(this);\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Modal to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(NAME$5, Modal);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n var uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);\n var ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i;\n /**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\n\n var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;\n /**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\n\n var DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i;\n\n var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {\n var attrName = attr.nodeName.toLowerCase();\n\n if (allowedAttributeList.includes(attrName)) {\n if (uriAttrs.has(attrName)) {\n return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));\n }\n\n return true;\n }\n\n var regExp = allowedAttributeList.filter(function (attrRegex) {\n return attrRegex instanceof RegExp;\n }); // Check if a regular expression validates the attribute.\n\n for (var i = 0, len = regExp.length; i < len; i++) {\n if (regExp[i].test(attrName)) {\n return true;\n }\n }\n\n return false;\n };\n\n var DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n };\n function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {\n var _ref;\n\n if (!unsafeHtml.length) {\n return unsafeHtml;\n }\n\n if (sanitizeFn && typeof sanitizeFn === 'function') {\n return sanitizeFn(unsafeHtml);\n }\n\n var domParser = new window.DOMParser();\n var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');\n var allowlistKeys = Object.keys(allowList);\n\n var elements = (_ref = []).concat.apply(_ref, createdDocument.body.querySelectorAll('*'));\n\n var _loop = function _loop(i, len) {\n var _ref2;\n\n var el = elements[i];\n var elName = el.nodeName.toLowerCase();\n\n if (!allowlistKeys.includes(elName)) {\n el.parentNode.removeChild(el);\n return \"continue\";\n }\n\n var attributeList = (_ref2 = []).concat.apply(_ref2, el.attributes);\n\n var allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);\n attributeList.forEach(function (attr) {\n if (!allowedAttribute(attr, allowedAttributes)) {\n el.removeAttribute(attr.nodeName);\n }\n });\n };\n\n for (var i = 0, len = elements.length; i < len; i++) {\n var _ret = _loop(i);\n\n if (_ret === \"continue\") continue;\n }\n\n return createdDocument.body.innerHTML;\n }\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n var NAME$6 = 'tooltip';\n var DATA_KEY$6 = 'bs.tooltip';\n var EVENT_KEY$6 = \".\" + DATA_KEY$6;\n var CLASS_PREFIX = 'bs-tooltip';\n var BSCLS_PREFIX_REGEX = new RegExp(\"(^|\\\\s)\" + CLASS_PREFIX + \"\\\\S+\", 'g');\n var DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);\n var DefaultType$4 = {\n animation: 'boolean',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string',\n delay: '(number|object)',\n html: 'boolean',\n selector: '(string|boolean)',\n placement: '(string|function)',\n offset: '(array|string|function)',\n container: '(string|element|boolean)',\n fallbackPlacements: 'array',\n boundary: '(string|element)',\n customClass: '(string|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n allowList: 'object',\n popperConfig: '(null|object|function)'\n };\n var AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL ? 'right' : 'left'\n };\n var Default$4 = {\n animation: true,\n template: '<div class=\"tooltip\" role=\"tooltip\">' + '<div class=\"tooltip-arrow\"></div>' + '<div class=\"tooltip-inner\"></div>' + '</div>',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n selector: false,\n placement: 'top',\n offset: [0, 0],\n container: false,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n boundary: 'clippingParents',\n customClass: '',\n sanitize: true,\n sanitizeFn: null,\n allowList: DefaultAllowlist,\n popperConfig: null\n };\n var Event$1 = {\n HIDE: \"hide\" + EVENT_KEY$6,\n HIDDEN: \"hidden\" + EVENT_KEY$6,\n SHOW: \"show\" + EVENT_KEY$6,\n SHOWN: \"shown\" + EVENT_KEY$6,\n INSERTED: \"inserted\" + EVENT_KEY$6,\n CLICK: \"click\" + EVENT_KEY$6,\n FOCUSIN: \"focusin\" + EVENT_KEY$6,\n FOCUSOUT: \"focusout\" + EVENT_KEY$6,\n MOUSEENTER: \"mouseenter\" + EVENT_KEY$6,\n MOUSELEAVE: \"mouseleave\" + EVENT_KEY$6\n };\n var CLASS_NAME_FADE$2 = 'fade';\n var CLASS_NAME_MODAL = 'modal';\n var CLASS_NAME_SHOW$4 = 'show';\n var HOVER_STATE_SHOW = 'show';\n var HOVER_STATE_OUT = 'out';\n var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';\n var TRIGGER_HOVER = 'hover';\n var TRIGGER_FOCUS = 'focus';\n var TRIGGER_CLICK = 'click';\n var TRIGGER_MANUAL = 'manual';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n var Tooltip = /*#__PURE__*/function (_BaseComponent) {\n _inheritsLoose(Tooltip, _BaseComponent);\n\n function Tooltip(element, config) {\n var _this;\n\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)');\n }\n\n _this = _BaseComponent.call(this, element) || this; // private\n\n _this._isEnabled = true;\n _this._timeout = 0;\n _this._hoverState = '';\n _this._activeTrigger = {};\n _this._popper = null; // Protected\n\n _this.config = _this._getConfig(config);\n _this.tip = null;\n\n _this._setListeners();\n\n return _this;\n } // Getters\n\n\n var _proto = Tooltip.prototype;\n\n // Public\n _proto.enable = function enable() {\n this._isEnabled = true;\n };\n\n _proto.disable = function disable() {\n this._isEnabled = false;\n };\n\n _proto.toggleEnabled = function toggleEnabled() {\n this._isEnabled = !this._isEnabled;\n };\n\n _proto.toggle = function toggle(event) {\n if (!this._isEnabled) {\n return;\n }\n\n if (event) {\n var context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger.click = !context._activeTrigger.click;\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context);\n } else {\n context._leave(null, context);\n }\n } else {\n if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$4)) {\n this._leave(null, this);\n\n return;\n }\n\n this._enter(null, this);\n }\n };\n\n _proto.dispose = function dispose() {\n clearTimeout(this._timeout);\n EventHandler.off(this._element, this.constructor.EVENT_KEY);\n EventHandler.off(this._element.closest(\".\" + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);\n\n if (this.tip && this.tip.parentNode) {\n this.tip.parentNode.removeChild(this.tip);\n }\n\n this._isEnabled = null;\n this._timeout = null;\n this._hoverState = null;\n this._activeTrigger = null;\n\n if (this._popper) {\n this._popper.destroy();\n }\n\n this._popper = null;\n this.config = null;\n this.tip = null;\n\n _BaseComponent.prototype.dispose.call(this);\n };\n\n _proto.show = function show() {\n var _this2 = this;\n\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements');\n }\n\n if (!(this.isWithContent() && this._isEnabled)) {\n return;\n }\n\n var showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW);\n var shadowRoot = findShadowRoot(this._element);\n var isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return;\n }\n\n var tip = this.getTipElement();\n var tipId = getUID(this.constructor.NAME);\n tip.setAttribute('id', tipId);\n\n this._element.setAttribute('aria-describedby', tipId);\n\n this.setContent();\n\n if (this.config.animation) {\n tip.classList.add(CLASS_NAME_FADE$2);\n }\n\n var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement;\n\n var attachment = this._getAttachment(placement);\n\n this._addAttachmentClass(attachment);\n\n var container = this._getContainer();\n\n Data.setData(tip, this.constructor.DATA_KEY, this);\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.appendChild(tip);\n }\n\n EventHandler.trigger(this._element, this.constructor.Event.INSERTED);\n this._popper = createPopper$2(this._element, tip, this._getPopperConfig(attachment));\n tip.classList.add(CLASS_NAME_SHOW$4);\n var customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass;\n\n if (customClass) {\n var _tip$classList;\n\n (_tip$classList = tip.classList).add.apply(_tip$classList, customClass.split(' '));\n } // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n if ('ontouchstart' in document.documentElement) {\n var _ref;\n\n (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) {\n EventHandler.on(element, 'mouseover', noop());\n });\n }\n\n var complete = function complete() {\n var prevHoverState = _this2._hoverState;\n _this2._hoverState = null;\n EventHandler.trigger(_this2._element, _this2.constructor.Event.SHOWN);\n\n if (prevHoverState === HOVER_STATE_OUT) {\n _this2._leave(null, _this2);\n }\n };\n\n if (this.tip.classList.contains(CLASS_NAME_FADE$2)) {\n var transitionDuration = getTransitionDurationFromElement(this.tip);\n EventHandler.one(this.tip, 'transitionend', complete);\n emulateTransitionEnd(this.tip, transitionDuration);\n } else {\n complete();\n }\n };\n\n _proto.hide = function hide() {\n var _this3 = this;\n\n if (!this._popper) {\n return;\n }\n\n var tip = this.getTipElement();\n\n var complete = function complete() {\n if (_this3._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {\n tip.parentNode.removeChild(tip);\n }\n\n _this3._cleanTipClass();\n\n _this3._element.removeAttribute('aria-describedby');\n\n EventHandler.trigger(_this3._element, _this3.constructor.Event.HIDDEN);\n\n if (_this3._popper) {\n _this3._popper.destroy();\n\n _this3._popper = null;\n }\n };\n\n var hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n tip.classList.remove(CLASS_NAME_SHOW$4); // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n if ('ontouchstart' in document.documentElement) {\n var _ref2;\n\n (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (element) {\n return EventHandler.off(element, 'mouseover', noop);\n });\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false;\n this._activeTrigger[TRIGGER_FOCUS] = false;\n this._activeTrigger[TRIGGER_HOVER] = false;\n\n if (this.tip.classList.contains(CLASS_NAME_FADE$2)) {\n var transitionDuration = getTransitionDurationFromElement(tip);\n EventHandler.one(tip, 'transitionend', complete);\n emulateTransitionEnd(tip, transitionDuration);\n } else {\n complete();\n }\n\n this._hoverState = '';\n };\n\n _proto.update = function update() {\n if (this._popper !== null) {\n this._popper.update();\n }\n } // Protected\n ;\n\n _proto.isWithContent = function isWithContent() {\n return Boolean(this.getTitle());\n };\n\n _proto.getTipElement = function getTipElement() {\n if (this.tip) {\n return this.tip;\n }\n\n var element = document.createElement('div');\n element.innerHTML = this.config.template;\n this.tip = element.children[0];\n return this.tip;\n };\n\n _proto.setContent = function setContent() {\n var tip = this.getTipElement();\n this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());\n tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$4);\n };\n\n _proto.setElementContent = function setElementContent(element, content) {\n if (element === null) {\n return;\n }\n\n if (typeof content === 'object' && isElement(content)) {\n if (content.jquery) {\n content = content[0];\n } // content is a DOM node or a jQuery\n\n\n if (this.config.html) {\n if (content.parentNode !== element) {\n element.innerHTML = '';\n element.appendChild(content);\n }\n } else {\n element.textContent = content.textContent;\n }\n\n return;\n }\n\n if (this.config.html) {\n if (this.config.sanitize) {\n content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn);\n }\n\n element.innerHTML = content;\n } else {\n element.textContent = content;\n }\n };\n\n _proto.getTitle = function getTitle() {\n var title = this._element.getAttribute('data-bs-original-title');\n\n if (!title) {\n title = typeof this.config.title === 'function' ? this.config.title.call(this._element) : this.config.title;\n }\n\n return title;\n };\n\n _proto.updateAttachment = function updateAttachment(attachment) {\n if (attachment === 'right') {\n return 'end';\n }\n\n if (attachment === 'left') {\n return 'start';\n }\n\n return attachment;\n } // Private\n ;\n\n _proto._initializeOnDelegatedTarget = function _initializeOnDelegatedTarget(event, context) {\n var dataKey = this.constructor.DATA_KEY;\n context = context || Data.getData(event.delegateTarget, dataKey);\n\n if (!context) {\n context = new this.constructor(event.delegateTarget, this._getDelegateConfig());\n Data.setData(event.delegateTarget, dataKey, context);\n }\n\n return context;\n };\n\n _proto._getOffset = function _getOffset() {\n var _this4 = this;\n\n var offset = this.config.offset;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(function (val) {\n return Number.parseInt(val, 10);\n });\n }\n\n if (typeof offset === 'function') {\n return function (popperData) {\n return offset(popperData, _this4._element);\n };\n }\n\n return offset;\n };\n\n _proto._getPopperConfig = function _getPopperConfig(attachment) {\n var _this5 = this;\n\n var defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [{\n name: 'flip',\n options: {\n altBoundary: true,\n fallbackPlacements: this.config.fallbackPlacements\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }, {\n name: 'preventOverflow',\n options: {\n boundary: this.config.boundary\n }\n }, {\n name: 'arrow',\n options: {\n element: \".\" + this.constructor.NAME + \"-arrow\"\n }\n }, {\n name: 'onChange',\n enabled: true,\n phase: 'afterWrite',\n fn: function fn(data) {\n return _this5._handlePopperPlacementChange(data);\n }\n }],\n onFirstUpdate: function onFirstUpdate(data) {\n if (data.options.placement !== data.placement) {\n _this5._handlePopperPlacementChange(data);\n }\n }\n };\n return _extends({}, defaultBsPopperConfig, typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig);\n };\n\n _proto._addAttachmentClass = function _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(CLASS_PREFIX + \"-\" + this.updateAttachment(attachment));\n };\n\n _proto._getContainer = function _getContainer() {\n if (this.config.container === false) {\n return document.body;\n }\n\n if (isElement(this.config.container)) {\n return this.config.container;\n }\n\n return SelectorEngine.findOne(this.config.container);\n };\n\n _proto._getAttachment = function _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()];\n };\n\n _proto._setListeners = function _setListeners() {\n var _this6 = this;\n\n var triggers = this.config.trigger.split(' ');\n triggers.forEach(function (trigger) {\n if (trigger === 'click') {\n EventHandler.on(_this6._element, _this6.constructor.Event.CLICK, _this6.config.selector, function (event) {\n return _this6.toggle(event);\n });\n } else if (trigger !== TRIGGER_MANUAL) {\n var eventIn = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSEENTER : _this6.constructor.Event.FOCUSIN;\n var eventOut = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSELEAVE : _this6.constructor.Event.FOCUSOUT;\n EventHandler.on(_this6._element, eventIn, _this6.config.selector, function (event) {\n return _this6._enter(event);\n });\n EventHandler.on(_this6._element, eventOut, _this6.config.selector, function (event) {\n return _this6._leave(event);\n });\n }\n });\n\n this._hideModalHandler = function () {\n if (_this6._element) {\n _this6.hide();\n }\n };\n\n EventHandler.on(this._element.closest(\".\" + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);\n\n if (this.config.selector) {\n this.config = _extends({}, this.config, {\n trigger: 'manual',\n selector: ''\n });\n } else {\n this._fixTitle();\n }\n };\n\n _proto._fixTitle = function _fixTitle() {\n var title = this._element.getAttribute('title');\n\n var originalTitleType = typeof this._element.getAttribute('data-bs-original-title');\n\n if (title || originalTitleType !== 'string') {\n this._element.setAttribute('data-bs-original-title', title || '');\n\n if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {\n this._element.setAttribute('aria-label', title);\n }\n\n this._element.setAttribute('title', '');\n }\n };\n\n _proto._enter = function _enter(event, context) {\n context = this._initializeOnDelegatedTarget(event, context);\n\n if (event) {\n context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;\n }\n\n if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$4) || context._hoverState === HOVER_STATE_SHOW) {\n context._hoverState = HOVER_STATE_SHOW;\n return;\n }\n\n clearTimeout(context._timeout);\n context._hoverState = HOVER_STATE_SHOW;\n\n if (!context.config.delay || !context.config.delay.show) {\n context.show();\n return;\n }\n\n context._timeout = setTimeout(function () {\n if (context._hoverState === HOVER_STATE_SHOW) {\n context.show();\n }\n }, context.config.delay.show);\n };\n\n _proto._leave = function _leave(event, context) {\n context = this._initializeOnDelegatedTarget(event, context);\n\n if (event) {\n context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;\n }\n\n if (context._isWithActiveTrigger()) {\n return;\n }\n\n clearTimeout(context._timeout);\n context._hoverState = HOVER_STATE_OUT;\n\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide();\n return;\n }\n\n context._timeout = setTimeout(function () {\n if (context._hoverState === HOVER_STATE_OUT) {\n context.hide();\n }\n }, context.config.delay.hide);\n };\n\n _proto._isWithActiveTrigger = function _isWithActiveTrigger() {\n for (var trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true;\n }\n }\n\n return false;\n };\n\n _proto._getConfig = function _getConfig(config) {\n var dataAttributes = Manipulator.getDataAttributes(this._element);\n Object.keys(dataAttributes).forEach(function (dataAttr) {\n if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {\n delete dataAttributes[dataAttr];\n }\n });\n\n if (config && typeof config.container === 'object' && config.container.jquery) {\n config.container = config.container[0];\n }\n\n config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n };\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString();\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString();\n }\n\n typeCheckConfig(NAME$6, config, this.constructor.DefaultType);\n\n if (config.sanitize) {\n config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn);\n }\n\n return config;\n };\n\n _proto._getDelegateConfig = function _getDelegateConfig() {\n var config = {};\n\n if (this.config) {\n for (var key in this.config) {\n if (this.constructor.Default[key] !== this.config[key]) {\n config[key] = this.config[key];\n }\n }\n }\n\n return config;\n };\n\n _proto._cleanTipClass = function _cleanTipClass() {\n var tip = this.getTipElement();\n var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);\n\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(function (token) {\n return token.trim();\n }).forEach(function (tClass) {\n return tip.classList.remove(tClass);\n });\n }\n };\n\n _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {\n var state = popperData.state;\n\n if (!state) {\n return;\n }\n\n this.tip = state.elements.popper;\n\n this._cleanTipClass();\n\n this._addAttachmentClass(this._getAttachment(state.placement));\n } // Static\n ;\n\n Tooltip.jQueryInterface = function jQueryInterface(config) {\n return this.each(function () {\n var data = Data.getData(this, DATA_KEY$6);\n\n var _config = typeof config === 'object' && config;\n\n if (!data && /dispose|hide/.test(config)) {\n return;\n }\n\n if (!data) {\n data = new Tooltip(this, _config);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n\n data[config]();\n }\n });\n };\n\n _createClass(Tooltip, null, [{\n key: \"Default\",\n get: function get() {\n return Default$4;\n }\n }, {\n key: \"NAME\",\n get: function get() {\n return NAME$6;\n }\n }, {\n key: \"DATA_KEY\",\n get: function get() {\n return DATA_KEY$6;\n }\n }, {\n key: \"Event\",\n get: function get() {\n return Event$1;\n }\n }, {\n key: \"EVENT_KEY\",\n get: function get() {\n return EVENT_KEY$6;\n }\n }, {\n key: \"DefaultType\",\n get: function get() {\n return DefaultType$4;\n }\n }]);\n\n return Tooltip;\n }(BaseComponent);\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Tooltip to jQuery only if jQuery is present\n */\n\n\n defineJQueryPlugin(NAME$6, Tooltip);\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n var NAME$7 = 'popover';\n var DATA_KEY$7 = 'bs.popover';\n var EVENT_KEY$7 = \".\" + DATA_KEY$7;\n var CLASS_PREFIX$1 = 'bs-popover';\n var BSCLS_PREFIX_REGEX$1 = new RegExp(\"(^|\\\\s)\" + CLASS_PREFIX$1 + \"\\\\S+\", 'g');\n\n var Default$5 = _extends({}, Tooltip.Default, {\n placement: 'right',\n offset: [0, 8],\n trigger: 'click',\n content: '',\n template: '<div class=\"popover\" role=\"tooltip\">' + '<div class=\"popover-arrow\"></div>' + '<h3 class=\"popover-header\"></h3>' + '<div class=\"popover-body\"></div>' + '</div>'\n });\n\n var DefaultType$5 = _extends({}, Tooltip.DefaultType, {\n content: '(string|element|function)'\n });\n\n var Event$2 = {\n HIDE: \"hide\" + EVENT_KEY$7,\n HIDDEN: \"hidden\" + EVENT_KEY$7,\n SHOW: \"show\" + EVENT_KEY$7,\n SHOWN: \"shown\" + EVENT_KEY$7,\n INSERTED: \"inserted\" + EVENT_KEY$7,\n CLICK: \"click\" + EVENT_KEY$7,\n FOCUSIN: \"focusin\" + EVENT_KEY$7,\n FOCUSOUT: \"focusout\" + EVENT_KEY$7,\n MOUSEENTER: \"mouseenter\" + EVENT_KEY$7,\n MOUSELEAVE: \"mouseleave\" + EVENT_KEY$7\n };\n var CLASS_NAME_FADE$3 = 'fade';\n var CLASS_NAME_SHOW$5 = 'show';\n var SELECTOR_TITLE = '.popover-header';\n var SELECTOR_CONTENT = '.popover-body';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n var Popover = /*#__PURE__*/function (_Tooltip) {\n _inheritsLoose(Popover, _Tooltip);\n\n function Popover() {\n return _Tooltip.apply(this, arguments) || this;\n }\n\n var _proto = Popover.prototype;\n\n // Overrides\n _proto.isWithContent = function isWithContent() {\n return this.getTitle() || this._getContent();\n };\n\n _proto.setContent = function setContent() {\n var tip = this.getTipElement(); // we use append for html objects to maintain js events\n\n this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());\n\n var content = this._getContent();\n\n if (typeof content === 'function') {\n content = content.call(this._element);\n }\n\n this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);\n tip.classList.remove(CLASS_NAME_FADE$3, CLASS_NAME_SHOW$5);\n } // Private\n ;\n\n _proto._addAttachmentClass = function _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(CLASS_PREFIX$1 + \"-\" + this.updateAttachment(attachment));\n };\n\n _proto._getContent = function _getContent() {\n return this._element.getAttribute('data-bs-content') || this.config.content;\n };\n\n _proto._cleanTipClass = function _cleanTipClass() {\n var tip = this.getTipElement();\n var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);\n\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(function (token) {\n return token.trim();\n }).forEach(function (tClass) {\n return tip.classList.remove(tClass);\n });\n }\n } // Static\n ;\n\n Popover.jQueryInterface = function jQueryInterface(config) {\n return this.each(function () {\n var data = Data.getData(this, DATA_KEY$7);\n\n var _config = typeof config === 'object' ? config : null;\n\n if (!data && /dispose|hide/.test(config)) {\n return;\n }\n\n if (!data) {\n data = new Popover(this, _config);\n Data.setData(this, DATA_KEY$7, data);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n\n data[config]();\n }\n });\n };\n\n _createClass(Popover, null, [{\n key: \"Default\",\n get: // Getters\n function get() {\n return Default$5;\n }\n }, {\n key: \"NAME\",\n get: function get() {\n return NAME$7;\n }\n }, {\n key: \"DATA_KEY\",\n get: function get() {\n return DATA_KEY$7;\n }\n }, {\n key: \"Event\",\n get: function get() {\n return Event$2;\n }\n }, {\n key: \"EVENT_KEY\",\n get: function get() {\n return EVENT_KEY$7;\n }\n }, {\n key: \"DefaultType\",\n get: function get() {\n return DefaultType$5;\n }\n }]);\n\n return Popover;\n }(Tooltip);\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Popover to jQuery only if jQuery is present\n */\n\n\n defineJQueryPlugin(NAME$7, Popover);\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n var NAME$8 = 'scrollspy';\n var DATA_KEY$8 = 'bs.scrollspy';\n var EVENT_KEY$8 = \".\" + DATA_KEY$8;\n var DATA_API_KEY$6 = '.data-api';\n var Default$6 = {\n offset: 10,\n method: 'auto',\n target: ''\n };\n var DefaultType$6 = {\n offset: 'number',\n method: 'string',\n target: '(string|element)'\n };\n var EVENT_ACTIVATE = \"activate\" + EVENT_KEY$8;\n var EVENT_SCROLL = \"scroll\" + EVENT_KEY$8;\n var EVENT_LOAD_DATA_API$1 = \"load\" + EVENT_KEY$8 + DATA_API_KEY$6;\n var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';\n var CLASS_NAME_ACTIVE$2 = 'active';\n var SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]';\n var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';\n var SELECTOR_NAV_LINKS = '.nav-link';\n var SELECTOR_NAV_ITEMS = '.nav-item';\n var SELECTOR_LIST_ITEMS = '.list-group-item';\n var SELECTOR_DROPDOWN = '.dropdown';\n var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';\n var METHOD_OFFSET = 'offset';\n var METHOD_POSITION = 'position';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n var ScrollSpy = /*#__PURE__*/function (_BaseComponent) {\n _inheritsLoose(ScrollSpy, _BaseComponent);\n\n function ScrollSpy(element, config) {\n var _this;\n\n _this = _BaseComponent.call(this, element) || this;\n _this._scrollElement = element.tagName === 'BODY' ? window : element;\n _this._config = _this._getConfig(config);\n _this._selector = _this._config.target + \" \" + SELECTOR_NAV_LINKS + \", \" + _this._config.target + \" \" + SELECTOR_LIST_ITEMS + \", \" + _this._config.target + \" .\" + CLASS_NAME_DROPDOWN_ITEM;\n _this._offsets = [];\n _this._targets = [];\n _this._activeTarget = null;\n _this._scrollHeight = 0;\n EventHandler.on(_this._scrollElement, EVENT_SCROLL, function () {\n return _this._process();\n });\n\n _this.refresh();\n\n _this._process();\n\n return _this;\n } // Getters\n\n\n var _proto = ScrollSpy.prototype;\n\n // Public\n _proto.refresh = function refresh() {\n var _this2 = this;\n\n var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;\n var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;\n var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;\n this._offsets = [];\n this._targets = [];\n this._scrollHeight = this._getScrollHeight();\n var targets = SelectorEngine.find(this._selector);\n targets.map(function (element) {\n var targetSelector = getSelectorFromElement(element);\n var target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;\n\n if (target) {\n var targetBCR = target.getBoundingClientRect();\n\n if (targetBCR.width || targetBCR.height) {\n return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];\n }\n }\n\n return null;\n }).filter(function (item) {\n return item;\n }).sort(function (a, b) {\n return a[0] - b[0];\n }).forEach(function (item) {\n _this2._offsets.push(item[0]);\n\n _this2._targets.push(item[1]);\n });\n };\n\n _proto.dispose = function dispose() {\n _BaseComponent.prototype.dispose.call(this);\n\n EventHandler.off(this._scrollElement, EVENT_KEY$8);\n this._scrollElement = null;\n this._config = null;\n this._selector = null;\n this._offsets = null;\n this._targets = null;\n this._activeTarget = null;\n this._scrollHeight = null;\n } // Private\n ;\n\n _proto._getConfig = function _getConfig(config) {\n config = _extends({}, Default$6, typeof config === 'object' && config ? config : {});\n\n if (typeof config.target !== 'string' && isElement(config.target)) {\n var id = config.target.id;\n\n if (!id) {\n id = getUID(NAME$8);\n config.target.id = id;\n }\n\n config.target = \"#\" + id;\n }\n\n typeCheckConfig(NAME$8, config, DefaultType$6);\n return config;\n };\n\n _proto._getScrollTop = function _getScrollTop() {\n return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;\n };\n\n _proto._getScrollHeight = function _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);\n };\n\n _proto._getOffsetHeight = function _getOffsetHeight() {\n return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;\n };\n\n _proto._process = function _process() {\n var scrollTop = this._getScrollTop() + this._config.offset;\n\n var scrollHeight = this._getScrollHeight();\n\n var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh();\n }\n\n if (scrollTop >= maxScroll) {\n var target = this._targets[this._targets.length - 1];\n\n if (this._activeTarget !== target) {\n this._activate(target);\n }\n\n return;\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n this._activeTarget = null;\n\n this._clear();\n\n return;\n }\n\n for (var i = this._offsets.length; i--;) {\n var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);\n\n if (isActiveTarget) {\n this._activate(this._targets[i]);\n }\n }\n };\n\n _proto._activate = function _activate(target) {\n this._activeTarget = target;\n\n this._clear();\n\n var queries = this._selector.split(',').map(function (selector) {\n return selector + \"[data-bs-target=\\\"\" + target + \"\\\"],\" + selector + \"[href=\\\"\" + target + \"\\\"]\";\n });\n\n var link = SelectorEngine.findOne(queries.join(','));\n\n if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$2);\n link.classList.add(CLASS_NAME_ACTIVE$2);\n } else {\n // Set triggered link as active\n link.classList.add(CLASS_NAME_ACTIVE$2);\n SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP).forEach(function (listGroup) {\n // Set triggered links parents as active\n // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n SelectorEngine.prev(listGroup, SELECTOR_NAV_LINKS + \", \" + SELECTOR_LIST_ITEMS).forEach(function (item) {\n return item.classList.add(CLASS_NAME_ACTIVE$2);\n }); // Handle special case when .nav-link is inside .nav-item\n\n SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(function (navItem) {\n SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(function (item) {\n return item.classList.add(CLASS_NAME_ACTIVE$2);\n });\n });\n });\n }\n\n EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {\n relatedTarget: target\n });\n };\n\n _proto._clear = function _clear() {\n SelectorEngine.find(this._selector).filter(function (node) {\n return node.classList.contains(CLASS_NAME_ACTIVE$2);\n }).forEach(function (node) {\n return node.classList.remove(CLASS_NAME_ACTIVE$2);\n });\n } // Static\n ;\n\n ScrollSpy.jQueryInterface = function jQueryInterface(config) {\n return this.each(function () {\n var data = Data.getData(this, DATA_KEY$8);\n\n var _config = typeof config === 'object' && config;\n\n if (!data) {\n data = new ScrollSpy(this, _config);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n\n data[config]();\n }\n });\n };\n\n _createClass(ScrollSpy, null, [{\n key: \"Default\",\n get: function get() {\n return Default$6;\n }\n }, {\n key: \"DATA_KEY\",\n get: function get() {\n return DATA_KEY$8;\n }\n }]);\n\n return ScrollSpy;\n }(BaseComponent);\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(window, EVENT_LOAD_DATA_API$1, function () {\n SelectorEngine.find(SELECTOR_DATA_SPY).forEach(function (spy) {\n return new ScrollSpy(spy, Manipulator.getDataAttributes(spy));\n });\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .ScrollSpy to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(NAME$8, ScrollSpy);\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n var NAME$9 = 'tab';\n var DATA_KEY$9 = 'bs.tab';\n var EVENT_KEY$9 = \".\" + DATA_KEY$9;\n var DATA_API_KEY$7 = '.data-api';\n var EVENT_HIDE$3 = \"hide\" + EVENT_KEY$9;\n var EVENT_HIDDEN$3 = \"hidden\" + EVENT_KEY$9;\n var EVENT_SHOW$3 = \"show\" + EVENT_KEY$9;\n var EVENT_SHOWN$3 = \"shown\" + EVENT_KEY$9;\n var EVENT_CLICK_DATA_API$6 = \"click\" + EVENT_KEY$9 + DATA_API_KEY$7;\n var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';\n var CLASS_NAME_ACTIVE$3 = 'active';\n var CLASS_NAME_DISABLED$1 = 'disabled';\n var CLASS_NAME_FADE$4 = 'fade';\n var CLASS_NAME_SHOW$6 = 'show';\n var SELECTOR_DROPDOWN$1 = '.dropdown';\n var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';\n var SELECTOR_ACTIVE$1 = '.active';\n var SELECTOR_ACTIVE_UL = ':scope > li > .active';\n var SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle=\"tab\"], [data-bs-toggle=\"pill\"], [data-bs-toggle=\"list\"]';\n var SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';\n var SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n var Tab = /*#__PURE__*/function (_BaseComponent) {\n _inheritsLoose(Tab, _BaseComponent);\n\n function Tab() {\n return _BaseComponent.apply(this, arguments) || this;\n }\n\n var _proto = Tab.prototype;\n\n // Public\n _proto.show = function show() {\n var _this = this;\n\n if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE$3) || this._element.classList.contains(CLASS_NAME_DISABLED$1)) {\n return;\n }\n\n var previous;\n var target = getElementFromSelector(this._element);\n\n var listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP$1);\n\n if (listElement) {\n var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE$1;\n previous = SelectorEngine.find(itemSelector, listElement);\n previous = previous[previous.length - 1];\n }\n\n var hideEvent = previous ? EventHandler.trigger(previous, EVENT_HIDE$3, {\n relatedTarget: this._element\n }) : null;\n var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {\n relatedTarget: previous\n });\n\n if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {\n return;\n }\n\n this._activate(this._element, listElement);\n\n var complete = function complete() {\n EventHandler.trigger(previous, EVENT_HIDDEN$3, {\n relatedTarget: _this._element\n });\n EventHandler.trigger(_this._element, EVENT_SHOWN$3, {\n relatedTarget: previous\n });\n };\n\n if (target) {\n this._activate(target, target.parentNode, complete);\n } else {\n complete();\n }\n } // Private\n ;\n\n _proto._activate = function _activate(element, container, callback) {\n var _this2 = this;\n\n var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE$1);\n var active = activeElements[0];\n var isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$4);\n\n var complete = function complete() {\n return _this2._transitionComplete(element, active, callback);\n };\n\n if (active && isTransitioning) {\n var transitionDuration = getTransitionDurationFromElement(active);\n active.classList.remove(CLASS_NAME_SHOW$6);\n EventHandler.one(active, 'transitionend', complete);\n emulateTransitionEnd(active, transitionDuration);\n } else {\n complete();\n }\n };\n\n _proto._transitionComplete = function _transitionComplete(element, active, callback) {\n if (active) {\n active.classList.remove(CLASS_NAME_ACTIVE$3);\n var dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);\n\n if (dropdownChild) {\n dropdownChild.classList.remove(CLASS_NAME_ACTIVE$3);\n }\n\n if (active.getAttribute('role') === 'tab') {\n active.setAttribute('aria-selected', false);\n }\n }\n\n element.classList.add(CLASS_NAME_ACTIVE$3);\n\n if (element.getAttribute('role') === 'tab') {\n element.setAttribute('aria-selected', true);\n }\n\n reflow(element);\n\n if (element.classList.contains(CLASS_NAME_FADE$4)) {\n element.classList.add(CLASS_NAME_SHOW$6);\n }\n\n if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {\n var dropdownElement = element.closest(SELECTOR_DROPDOWN$1);\n\n if (dropdownElement) {\n SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE$1).forEach(function (dropdown) {\n return dropdown.classList.add(CLASS_NAME_ACTIVE$3);\n });\n }\n\n element.setAttribute('aria-expanded', true);\n }\n\n if (callback) {\n callback();\n }\n } // Static\n ;\n\n Tab.jQueryInterface = function jQueryInterface(config) {\n return this.each(function () {\n var data = Data.getData(this, DATA_KEY$9) || new Tab(this);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n\n data[config]();\n }\n });\n };\n\n _createClass(Tab, null, [{\n key: \"DATA_KEY\",\n get: // Getters\n function get() {\n return DATA_KEY$9;\n }\n }]);\n\n return Tab;\n }(BaseComponent);\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$4, function (event) {\n event.preventDefault();\n var data = Data.getData(this, DATA_KEY$9) || new Tab(this);\n data.show();\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Tab to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(NAME$9, Tab);\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n var NAME$a = 'toast';\n var DATA_KEY$a = 'bs.toast';\n var EVENT_KEY$a = \".\" + DATA_KEY$a;\n var EVENT_CLICK_DISMISS$1 = \"click.dismiss\" + EVENT_KEY$a;\n var EVENT_HIDE$4 = \"hide\" + EVENT_KEY$a;\n var EVENT_HIDDEN$4 = \"hidden\" + EVENT_KEY$a;\n var EVENT_SHOW$4 = \"show\" + EVENT_KEY$a;\n var EVENT_SHOWN$4 = \"shown\" + EVENT_KEY$a;\n var CLASS_NAME_FADE$5 = 'fade';\n var CLASS_NAME_HIDE = 'hide';\n var CLASS_NAME_SHOW$7 = 'show';\n var CLASS_NAME_SHOWING = 'showing';\n var DefaultType$7 = {\n animation: 'boolean',\n autohide: 'boolean',\n delay: 'number'\n };\n var Default$7 = {\n animation: true,\n autohide: true,\n delay: 5000\n };\n var SELECTOR_DATA_DISMISS$1 = '[data-bs-dismiss=\"toast\"]';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n var Toast = /*#__PURE__*/function (_BaseComponent) {\n _inheritsLoose(Toast, _BaseComponent);\n\n function Toast(element, config) {\n var _this;\n\n _this = _BaseComponent.call(this, element) || this;\n _this._config = _this._getConfig(config);\n _this._timeout = null;\n\n _this._setListeners();\n\n return _this;\n } // Getters\n\n\n var _proto = Toast.prototype;\n\n // Public\n _proto.show = function show() {\n var _this2 = this;\n\n var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4);\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._clearTimeout();\n\n if (this._config.animation) {\n this._element.classList.add(CLASS_NAME_FADE$5);\n }\n\n var complete = function complete() {\n _this2._element.classList.remove(CLASS_NAME_SHOWING);\n\n _this2._element.classList.add(CLASS_NAME_SHOW$7);\n\n EventHandler.trigger(_this2._element, EVENT_SHOWN$4);\n\n if (_this2._config.autohide) {\n _this2._timeout = setTimeout(function () {\n _this2.hide();\n }, _this2._config.delay);\n }\n };\n\n this._element.classList.remove(CLASS_NAME_HIDE);\n\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_SHOWING);\n\n if (this._config.animation) {\n var transitionDuration = getTransitionDurationFromElement(this._element);\n EventHandler.one(this._element, 'transitionend', complete);\n emulateTransitionEnd(this._element, transitionDuration);\n } else {\n complete();\n }\n };\n\n _proto.hide = function hide() {\n var _this3 = this;\n\n if (!this._element.classList.contains(CLASS_NAME_SHOW$7)) {\n return;\n }\n\n var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n var complete = function complete() {\n _this3._element.classList.add(CLASS_NAME_HIDE);\n\n EventHandler.trigger(_this3._element, EVENT_HIDDEN$4);\n };\n\n this._element.classList.remove(CLASS_NAME_SHOW$7);\n\n if (this._config.animation) {\n var transitionDuration = getTransitionDurationFromElement(this._element);\n EventHandler.one(this._element, 'transitionend', complete);\n emulateTransitionEnd(this._element, transitionDuration);\n } else {\n complete();\n }\n };\n\n _proto.dispose = function dispose() {\n this._clearTimeout();\n\n if (this._element.classList.contains(CLASS_NAME_SHOW$7)) {\n this._element.classList.remove(CLASS_NAME_SHOW$7);\n }\n\n EventHandler.off(this._element, EVENT_CLICK_DISMISS$1);\n\n _BaseComponent.prototype.dispose.call(this);\n\n this._config = null;\n } // Private\n ;\n\n _proto._getConfig = function _getConfig(config) {\n config = _extends({}, Default$7, Manipulator.getDataAttributes(this._element), typeof config === 'object' && config ? config : {});\n typeCheckConfig(NAME$a, config, this.constructor.DefaultType);\n return config;\n };\n\n _proto._setListeners = function _setListeners() {\n var _this4 = this;\n\n EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function () {\n return _this4.hide();\n });\n };\n\n _proto._clearTimeout = function _clearTimeout() {\n clearTimeout(this._timeout);\n this._timeout = null;\n } // Static\n ;\n\n Toast.jQueryInterface = function jQueryInterface(config) {\n return this.each(function () {\n var data = Data.getData(this, DATA_KEY$a);\n\n var _config = typeof config === 'object' && config;\n\n if (!data) {\n data = new Toast(this, _config);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n\n data[config](this);\n }\n });\n };\n\n _createClass(Toast, null, [{\n key: \"DefaultType\",\n get: function get() {\n return DefaultType$7;\n }\n }, {\n key: \"Default\",\n get: function get() {\n return Default$7;\n }\n }, {\n key: \"DATA_KEY\",\n get: function get() {\n return DATA_KEY$a;\n }\n }]);\n\n return Toast;\n }(BaseComponent);\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Toast to jQuery only if jQuery is present\n */\n\n\n defineJQueryPlugin(NAME$a, Toast);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): index.umd.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n var index_umd = {\n Alert: Alert,\n Button: Button,\n Carousel: Carousel,\n Collapse: Collapse,\n Dropdown: Dropdown,\n Modal: Modal,\n Popover: Popover,\n ScrollSpy: ScrollSpy,\n Tab: Tab,\n Toast: Toast,\n Tooltip: Tooltip\n };\n\n return index_umd;\n\n})));\n//# sourceMappingURL=bootstrap.bundle.js.map\n\n\n//# sourceURL=webpack:///./node_modules/bootstrap/dist/js/bootstrap.bundle.js?");
576
+
577
+ /***/ }),
578
+
579
+ /***/ "./node_modules/choices.js/public/assets/scripts/choices.js":
580
+ /*!******************************************************************!*\
581
+ !*** ./node_modules/choices.js/public/assets/scripts/choices.js ***!
582
+ \******************************************************************/
583
+ /*! no static exports found */
584
+ /***/ (function(module, exports, __webpack_require__) {
585
+
586
+ eval("/*! choices.js v9.0.1 | © 2019 Josh Johnson | https://github.com/jshjohnson/Choices#readme */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse {}\n})(window, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/public/assets/scripts/\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn target.propertyIsEnumerable(symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\ttry {\n\t\treturn (key in target) // Properties are safe to merge if they don't exist in the target yet,\n\t\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n\t} catch (unused) {\n\t\t// Counterintuitively, it's safe to merge any property on a target that causes the `in` operator to throw.\n\t\t// This happens when trying to copy an object in the source over a plain string in the target.\n\t\treturn false\n\t}\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (!options.isMergeableObject(source[key]) || !target[key]) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* global window */\n\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (true) {\n root = module;\n} else {}\n\nvar result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(root);\n/* harmony default export */ __webpack_exports__[\"a\"] = (result);\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5), __webpack_require__(6)(module)))\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*!\n * Fuse.js v3.4.5 - Lightweight fuzzy-search (http://fusejs.io)\n * \n * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n */\n!function(e,t){ true?module.exports=t():undefined}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=1)}([function(e,t){e.exports=function(e){return Array.isArray?Array.isArray(e):\"[object Array]\"===Object.prototype.toString.call(e)}},function(e,t,n){function r(e){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=n(2),a=n(8),s=n(0),c=function(){function e(t,n){var r=n.location,o=void 0===r?0:r,i=n.distance,s=void 0===i?100:i,c=n.threshold,h=void 0===c?.6:c,l=n.maxPatternLength,u=void 0===l?32:l,f=n.caseSensitive,d=void 0!==f&&f,v=n.tokenSeparator,p=void 0===v?/ +/g:v,g=n.findAllMatches,y=void 0!==g&&g,m=n.minMatchCharLength,k=void 0===m?1:m,S=n.id,x=void 0===S?null:S,b=n.keys,M=void 0===b?[]:b,_=n.shouldSort,L=void 0===_||_,w=n.getFn,A=void 0===w?a:w,C=n.sortFn,I=void 0===C?function(e,t){return e.score-t.score}:C,O=n.tokenize,j=void 0!==O&&O,P=n.matchAllTokens,F=void 0!==P&&P,T=n.includeMatches,z=void 0!==T&&T,E=n.includeScore,K=void 0!==E&&E,$=n.verbose,J=void 0!==$&&$;!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,e),this.options={location:o,distance:s,threshold:h,maxPatternLength:u,isCaseSensitive:d,tokenSeparator:p,findAllMatches:y,minMatchCharLength:k,id:x,keys:M,includeMatches:z,includeScore:K,shouldSort:L,getFn:A,sortFn:I,verbose:J,tokenize:j,matchAllTokens:F},this.setCollection(t)}var t,n,c;return t=e,(n=[{key:\"setCollection\",value:function(e){return this.list=e,e}},{key:\"search\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{limit:!1};this._log('---------\\nSearch pattern: \"'.concat(e,'\"'));var n=this._prepareSearchers(e),r=n.tokenSearchers,o=n.fullSearcher,i=this._search(r,o),a=i.weights,s=i.results;return this._computeScore(a,s),this.options.shouldSort&&this._sort(s),t.limit&&\"number\"==typeof t.limit&&(s=s.slice(0,t.limit)),this._format(s)}},{key:\"_prepareSearchers\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\",t=[];if(this.options.tokenize)for(var n=e.split(this.options.tokenSeparator),r=0,o=n.length;r<o;r+=1)t.push(new i(n[r],this.options));return{tokenSearchers:t,fullSearcher:new i(e,this.options)}}},{key:\"_search\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=this.list,r={},o=[];if(\"string\"==typeof n[0]){for(var i=0,a=n.length;i<a;i+=1)this._analyze({key:\"\",value:n[i],record:i,index:i},{resultMap:r,results:o,tokenSearchers:e,fullSearcher:t});return{weights:null,results:o}}for(var s={},c=0,h=n.length;c<h;c+=1)for(var l=n[c],u=0,f=this.options.keys.length;u<f;u+=1){var d=this.options.keys[u];if(\"string\"!=typeof d){if(s[d.name]={weight:1-d.weight||1},d.weight<=0||d.weight>1)throw new Error(\"Key weight has to be > 0 and <= 1\");d=d.name}else s[d]={weight:1};this._analyze({key:d,value:this.options.getFn(l,d),record:l,index:c},{resultMap:r,results:o,tokenSearchers:e,fullSearcher:t})}return{weights:s,results:o}}},{key:\"_analyze\",value:function(e,t){var n=e.key,r=e.arrayIndex,o=void 0===r?-1:r,i=e.value,a=e.record,c=e.index,h=t.tokenSearchers,l=void 0===h?[]:h,u=t.fullSearcher,f=void 0===u?[]:u,d=t.resultMap,v=void 0===d?{}:d,p=t.results,g=void 0===p?[]:p;if(null!=i){var y=!1,m=-1,k=0;if(\"string\"==typeof i){this._log(\"\\nKey: \".concat(\"\"===n?\"-\":n));var S=f.search(i);if(this._log('Full text: \"'.concat(i,'\", score: ').concat(S.score)),this.options.tokenize){for(var x=i.split(this.options.tokenSeparator),b=[],M=0;M<l.length;M+=1){var _=l[M];this._log('\\nPattern: \"'.concat(_.pattern,'\"'));for(var L=!1,w=0;w<x.length;w+=1){var A=x[w],C=_.search(A),I={};C.isMatch?(I[A]=C.score,y=!0,L=!0,b.push(C.score)):(I[A]=1,this.options.matchAllTokens||b.push(1)),this._log('Token: \"'.concat(A,'\", score: ').concat(I[A]))}L&&(k+=1)}m=b[0];for(var O=b.length,j=1;j<O;j+=1)m+=b[j];m/=O,this._log(\"Token score average:\",m)}var P=S.score;m>-1&&(P=(P+m)/2),this._log(\"Score average:\",P);var F=!this.options.tokenize||!this.options.matchAllTokens||k>=l.length;if(this._log(\"\\nCheck Matches: \".concat(F)),(y||S.isMatch)&&F){var T=v[c];T?T.output.push({key:n,arrayIndex:o,value:i,score:P,matchedIndices:S.matchedIndices}):(v[c]={item:a,output:[{key:n,arrayIndex:o,value:i,score:P,matchedIndices:S.matchedIndices}]},g.push(v[c]))}}else if(s(i))for(var z=0,E=i.length;z<E;z+=1)this._analyze({key:n,arrayIndex:z,value:i[z],record:a,index:c},{resultMap:v,results:g,tokenSearchers:l,fullSearcher:f})}}},{key:\"_computeScore\",value:function(e,t){this._log(\"\\n\\nComputing score:\\n\");for(var n=0,r=t.length;n<r;n+=1){for(var o=t[n].output,i=o.length,a=1,s=1,c=0;c<i;c+=1){var h=e?e[o[c].key].weight:1,l=(1===h?o[c].score:o[c].score||.001)*h;1!==h?s=Math.min(s,l):(o[c].nScore=l,a*=l)}t[n].score=1===s?a:s,this._log(t[n])}}},{key:\"_sort\",value:function(e){this._log(\"\\n\\nSorting....\"),e.sort(this.options.sortFn)}},{key:\"_format\",value:function(e){var t=[];if(this.options.verbose){var n=[];this._log(\"\\n\\nOutput:\\n\\n\",JSON.stringify(e,function(e,t){if(\"object\"===r(t)&&null!==t){if(-1!==n.indexOf(t))return;n.push(t)}return t})),n=null}var o=[];this.options.includeMatches&&o.push(function(e,t){var n=e.output;t.matches=[];for(var r=0,o=n.length;r<o;r+=1){var i=n[r];if(0!==i.matchedIndices.length){var a={indices:i.matchedIndices,value:i.value};i.key&&(a.key=i.key),i.hasOwnProperty(\"arrayIndex\")&&i.arrayIndex>-1&&(a.arrayIndex=i.arrayIndex),t.matches.push(a)}}}),this.options.includeScore&&o.push(function(e,t){t.score=e.score});for(var i=0,a=e.length;i<a;i+=1){var s=e[i];if(this.options.id&&(s.item=this.options.getFn(s.item,this.options.id)[0]),o.length){for(var c={item:s.item},h=0,l=o.length;h<l;h+=1)o[h](s,c);t.push(c)}else t.push(s.item)}return t}},{key:\"_log\",value:function(){var e;this.options.verbose&&(e=console).log.apply(e,arguments)}}])&&o(t.prototype,n),c&&o(t,c),e}();e.exports=c},function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(3),i=n(4),a=n(7),s=function(){function e(t,n){var r=n.location,o=void 0===r?0:r,i=n.distance,s=void 0===i?100:i,c=n.threshold,h=void 0===c?.6:c,l=n.maxPatternLength,u=void 0===l?32:l,f=n.isCaseSensitive,d=void 0!==f&&f,v=n.tokenSeparator,p=void 0===v?/ +/g:v,g=n.findAllMatches,y=void 0!==g&&g,m=n.minMatchCharLength,k=void 0===m?1:m;!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,e),this.options={location:o,distance:s,threshold:h,maxPatternLength:u,isCaseSensitive:d,tokenSeparator:p,findAllMatches:y,minMatchCharLength:k},this.pattern=this.options.isCaseSensitive?t:t.toLowerCase(),this.pattern.length<=u&&(this.patternAlphabet=a(this.pattern))}var t,n,s;return t=e,(n=[{key:\"search\",value:function(e){if(this.options.isCaseSensitive||(e=e.toLowerCase()),this.pattern===e)return{isMatch:!0,score:0,matchedIndices:[[0,e.length-1]]};var t=this.options,n=t.maxPatternLength,r=t.tokenSeparator;if(this.pattern.length>n)return o(e,this.pattern,r);var a=this.options,s=a.location,c=a.distance,h=a.threshold,l=a.findAllMatches,u=a.minMatchCharLength;return i(e,this.pattern,this.patternAlphabet,{location:s,distance:c,threshold:h,findAllMatches:l,minMatchCharLength:u})}}])&&r(t.prototype,n),s&&r(t,s),e}();e.exports=s},function(e,t){var n=/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g;e.exports=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:/ +/g,o=new RegExp(t.replace(n,\"\\\\$&\").replace(r,\"|\")),i=e.match(o),a=!!i,s=[];if(a)for(var c=0,h=i.length;c<h;c+=1){var l=i[c];s.push([e.indexOf(l),l.length-1])}return{score:a?.5:1,isMatch:a,matchedIndices:s}}},function(e,t,n){var r=n(5),o=n(6);e.exports=function(e,t,n,i){for(var a=i.location,s=void 0===a?0:a,c=i.distance,h=void 0===c?100:c,l=i.threshold,u=void 0===l?.6:l,f=i.findAllMatches,d=void 0!==f&&f,v=i.minMatchCharLength,p=void 0===v?1:v,g=s,y=e.length,m=u,k=e.indexOf(t,g),S=t.length,x=[],b=0;b<y;b+=1)x[b]=0;if(-1!==k){var M=r(t,{errors:0,currentLocation:k,expectedLocation:g,distance:h});if(m=Math.min(M,m),-1!==(k=e.lastIndexOf(t,g+S))){var _=r(t,{errors:0,currentLocation:k,expectedLocation:g,distance:h});m=Math.min(_,m)}}k=-1;for(var L=[],w=1,A=S+y,C=1<<S-1,I=0;I<S;I+=1){for(var O=0,j=A;O<j;){r(t,{errors:I,currentLocation:g+j,expectedLocation:g,distance:h})<=m?O=j:A=j,j=Math.floor((A-O)/2+O)}A=j;var P=Math.max(1,g-j+1),F=d?y:Math.min(g+j,y)+S,T=Array(F+2);T[F+1]=(1<<I)-1;for(var z=F;z>=P;z-=1){var E=z-1,K=n[e.charAt(E)];if(K&&(x[E]=1),T[z]=(T[z+1]<<1|1)&K,0!==I&&(T[z]|=(L[z+1]|L[z])<<1|1|L[z+1]),T[z]&C&&(w=r(t,{errors:I,currentLocation:E,expectedLocation:g,distance:h}))<=m){if(m=w,(k=E)<=g)break;P=Math.max(1,2*g-k)}}if(r(t,{errors:I+1,currentLocation:g,expectedLocation:g,distance:h})>m)break;L=T}return{isMatch:k>=0,score:0===w?.001:w,matchedIndices:o(x,p)}}},function(e,t){e.exports=function(e,t){var n=t.errors,r=void 0===n?0:n,o=t.currentLocation,i=void 0===o?0:o,a=t.expectedLocation,s=void 0===a?0:a,c=t.distance,h=void 0===c?100:c,l=r/e.length,u=Math.abs(s-i);return h?l+u/h:u?1:l}},function(e,t){e.exports=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=-1,o=-1,i=0,a=e.length;i<a;i+=1){var s=e[i];s&&-1===r?r=i:s||-1===r||((o=i-1)-r+1>=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}},function(e,t){e.exports=function(e){for(var t={},n=e.length,r=0;r<n;r+=1)t[e.charAt(r)]=0;for(var o=0;o<n;o+=1)t[e.charAt(o)]|=1<<n-o-1;return t}},function(e,t,n){var r=n(0);e.exports=function(e,t){return function e(t,n,o){if(n){var i=n.indexOf(\".\"),a=n,s=null;-1!==i&&(a=n.slice(0,i),s=n.slice(i+1));var c=t[a];if(null!=c)if(s||\"string\"!=typeof c&&\"number\"!=typeof c)if(r(c))for(var h=0,l=c.length;h<l;h+=1)e(c[h],s,o);else s&&e(c,s,o);else o.push(c.toString())}else o.push(t);return o}(e,t,[])}}])});\n\n/***/ }),\n/* 3 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return symbolObservablePonyfill; });\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(7);\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports) {\n\nvar g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\nmodule.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n\n// EXTERNAL MODULE: ./node_modules/fuse.js/dist/fuse.js\nvar dist_fuse = __webpack_require__(2);\nvar fuse_default = /*#__PURE__*/__webpack_require__.n(dist_fuse);\n\n// EXTERNAL MODULE: ./node_modules/deepmerge/dist/cjs.js\nvar cjs = __webpack_require__(0);\nvar cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);\n\n// EXTERNAL MODULE: ./node_modules/symbol-observable/es/index.js\nvar es = __webpack_require__(1);\n\n// CONCATENATED MODULE: ./node_modules/redux/es/redux.js\n\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar randomString = function randomString() {\n return Math.random().toString(36).substring(7).split('').join('.');\n};\n\nvar ActionTypes = {\n INIT: \"@@redux/INIT\" + randomString(),\n REPLACE: \"@@redux/REPLACE\" + randomString(),\n PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {\n return \"@@redux/PROBE_UNKNOWN_ACTION\" + randomString();\n }\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n if (typeof obj !== 'object' || obj === null) return false;\n var proto = obj;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(obj) === proto;\n}\n\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n\nfunction createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {\n throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function.');\n }\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n /**\n * This makes a shallow copy of currentListeners so we can use\n * nextListeners as a temporary list while dispatching.\n *\n * This prevents any bugs around consumers calling\n * subscribe/unsubscribe in the middle of a dispatch.\n */\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n\n\n function getState() {\n if (isDispatching) {\n throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');\n }\n\n return currentState;\n }\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n\n\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected the listener to be a function.');\n }\n\n if (isDispatching) {\n throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n }\n\n var isSubscribed = true;\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n if (isDispatching) {\n throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n }\n\n isSubscribed = false;\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n\n\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n\n\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.\n // Any reducers that existed in both the new and old rootReducer\n // will receive the previous state. This effectively populates\n // the new state tree with any relevant data from the old one.\n\n dispatch({\n type: ActionTypes.REPLACE\n });\n }\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n\n\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object' || observer === null) {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return {\n unsubscribe: unsubscribe\n };\n }\n }, _ref[es[\"a\" /* default */]] = function () {\n return this;\n }, _ref;\n } // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n\n\n dispatch({\n type: ActionTypes.INIT\n });\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[es[\"a\" /* default */]] = observable, _ref2;\n}\n\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n\n\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n } catch (e) {} // eslint-disable-line no-empty\n\n}\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionDescription = actionType && \"action \\\"\" + String(actionType) + \"\\\"\" || 'an action';\n return \"Given \" + actionDescription + \", reducer \\\"\" + key + \"\\\" returned undefined. \" + \"To ignore an action, you must explicitly return the previous state. \" + \"If you want this reducer to hold no value, you can return null instead of undefined.\";\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return \"The \" + argumentName + \" has unexpected type of \\\"\" + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + \"\\\". Expected argument to be an object with the following \" + (\"keys: \\\"\" + reducerKeys.join('\", \"') + \"\\\"\");\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n if (action && action.type === ActionTypes.REPLACE) return;\n\n if (unexpectedKeys.length > 0) {\n return \"Unexpected \" + (unexpectedKeys.length > 1 ? 'keys' : 'key') + \" \" + (\"\\\"\" + unexpectedKeys.join('\", \"') + \"\\\" found in \" + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + (\"\\\"\" + reducerKeys.join('\", \"') + \"\\\". Unexpected keys will be ignored.\");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined during initialization. \" + \"If the state passed to the reducer is undefined, you must \" + \"explicitly return the initial state. The initial state may \" + \"not be undefined. If you don't want to set a value for this reducer, \" + \"you can use null instead of undefined.\");\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined when probed with a random type. \" + (\"Don't try to handle \" + ActionTypes.INIT + \" or other actions in \\\"redux/*\\\" \") + \"namespace. They are considered private. Instead, you must return the \" + \"current state for any unknown actions, unless it is undefined, \" + \"in which case you must return the initial state, regardless of the \" + \"action type. The initial state may not be undefined, but can be null.\");\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (false) {}\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same\n // keys multiple times.\n\n var unexpectedKeyCache;\n\n if (false) {}\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (false) { var warningMessage; }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error(\"bindActionCreators expected an object or a function, instead received \" + (actionCreators === null ? 'null' : typeof actionCreators) + \". \" + \"Did you write \\\"import ActionCreators from\\\" instead of \\\"import * as ActionCreators from\\\"?\");\n }\n\n var boundActionCreators = {};\n\n for (var key in actionCreators) {\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n keys.push.apply(keys, Object.getOwnPropertySymbols(object));\n }\n\n if (enumerableOnly) keys = keys.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread2({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\n\nfunction isCrushed() {}\n\nif (false) {}\n\n\n\n// CONCATENATED MODULE: ./src/scripts/reducers/items.js\nvar defaultState = [];\nfunction items_items(state, action) {\n if (state === void 0) {\n state = defaultState;\n }\n\n switch (action.type) {\n case 'ADD_ITEM':\n {\n // Add object to items array\n var newState = [].concat(state, [{\n id: action.id,\n choiceId: action.choiceId,\n groupId: action.groupId,\n value: action.value,\n label: action.label,\n active: true,\n highlighted: false,\n customProperties: action.customProperties,\n placeholder: action.placeholder || false,\n keyCode: null\n }]);\n return newState.map(function (obj) {\n var item = obj;\n item.highlighted = false;\n return item;\n });\n }\n\n case 'REMOVE_ITEM':\n {\n // Set item to inactive\n return state.map(function (obj) {\n var item = obj;\n\n if (item.id === action.id) {\n item.active = false;\n }\n\n return item;\n });\n }\n\n case 'HIGHLIGHT_ITEM':\n {\n return state.map(function (obj) {\n var item = obj;\n\n if (item.id === action.id) {\n item.highlighted = action.highlighted;\n }\n\n return item;\n });\n }\n\n default:\n {\n return state;\n }\n }\n}\n// CONCATENATED MODULE: ./src/scripts/reducers/groups.js\nvar groups_defaultState = [];\nfunction groups(state, action) {\n if (state === void 0) {\n state = groups_defaultState;\n }\n\n switch (action.type) {\n case 'ADD_GROUP':\n {\n return [].concat(state, [{\n id: action.id,\n value: action.value,\n active: action.active,\n disabled: action.disabled\n }]);\n }\n\n case 'CLEAR_CHOICES':\n {\n return [];\n }\n\n default:\n {\n return state;\n }\n }\n}\n// CONCATENATED MODULE: ./src/scripts/reducers/choices.js\nvar choices_defaultState = [];\nfunction choices_choices(state, action) {\n if (state === void 0) {\n state = choices_defaultState;\n }\n\n switch (action.type) {\n case 'ADD_CHOICE':\n {\n /*\n A disabled choice appears in the choice dropdown but cannot be selected\n A selected choice has been added to the passed input's value (added as an item)\n An active choice appears within the choice dropdown\n */\n return [].concat(state, [{\n id: action.id,\n elementId: action.elementId,\n groupId: action.groupId,\n value: action.value,\n label: action.label || action.value,\n disabled: action.disabled || false,\n selected: false,\n active: true,\n score: 9999,\n customProperties: action.customProperties,\n placeholder: action.placeholder || false,\n keyCode: null\n }]);\n }\n\n case 'ADD_ITEM':\n {\n // If all choices need to be activated\n if (action.activateOptions) {\n return state.map(function (obj) {\n var choice = obj;\n choice.active = action.active;\n return choice;\n });\n } // When an item is added and it has an associated choice,\n // we want to disable it so it can't be chosen again\n\n\n if (action.choiceId > -1) {\n return state.map(function (obj) {\n var choice = obj;\n\n if (choice.id === parseInt(action.choiceId, 10)) {\n choice.selected = true;\n }\n\n return choice;\n });\n }\n\n return state;\n }\n\n case 'REMOVE_ITEM':\n {\n // When an item is removed and it has an associated choice,\n // we want to re-enable it so it can be chosen again\n if (action.choiceId > -1) {\n return state.map(function (obj) {\n var choice = obj;\n\n if (choice.id === parseInt(action.choiceId, 10)) {\n choice.selected = false;\n }\n\n return choice;\n });\n }\n\n return state;\n }\n\n case 'FILTER_CHOICES':\n {\n return state.map(function (obj) {\n var choice = obj; // Set active state based on whether choice is\n // within filtered results\n\n choice.active = action.results.some(function (_ref) {\n var item = _ref.item,\n score = _ref.score;\n\n if (item.id === choice.id) {\n choice.score = score;\n return true;\n }\n\n return false;\n });\n return choice;\n });\n }\n\n case 'ACTIVATE_CHOICES':\n {\n return state.map(function (obj) {\n var choice = obj;\n choice.active = action.active;\n return choice;\n });\n }\n\n case 'CLEAR_CHOICES':\n {\n return choices_defaultState;\n }\n\n default:\n {\n return state;\n }\n }\n}\n// CONCATENATED MODULE: ./src/scripts/reducers/general.js\nvar general_defaultState = {\n loading: false\n};\n\nvar general = function general(state, action) {\n if (state === void 0) {\n state = general_defaultState;\n }\n\n switch (action.type) {\n case 'SET_IS_LOADING':\n {\n return {\n loading: action.isLoading\n };\n }\n\n default:\n {\n return state;\n }\n }\n};\n\n/* harmony default export */ var reducers_general = (general);\n// CONCATENATED MODULE: ./src/scripts/lib/utils.js\n/**\n * @param {number} min\n * @param {number} max\n * @returns {number}\n */\nvar getRandomNumber = function getRandomNumber(min, max) {\n return Math.floor(Math.random() * (max - min) + min);\n};\n/**\n * @param {number} length\n * @returns {string}\n */\n\nvar generateChars = function generateChars(length) {\n return Array.from({\n length: length\n }, function () {\n return getRandomNumber(0, 36).toString(36);\n }).join('');\n};\n/**\n * @param {HTMLInputElement | HTMLSelectElement} element\n * @param {string} prefix\n * @returns {string}\n */\n\nvar generateId = function generateId(element, prefix) {\n var id = element.id || element.name && element.name + \"-\" + generateChars(2) || generateChars(4);\n id = id.replace(/(:|\\.|\\[|\\]|,)/g, '');\n id = prefix + \"-\" + id;\n return id;\n};\n/**\n * @param {any} obj\n * @returns {string}\n */\n\nvar getType = function getType(obj) {\n return Object.prototype.toString.call(obj).slice(8, -1);\n};\n/**\n * @param {string} type\n * @param {any} obj\n * @returns {boolean}\n */\n\nvar isType = function isType(type, obj) {\n return obj !== undefined && obj !== null && getType(obj) === type;\n};\n/**\n * @param {HTMLElement} element\n * @param {HTMLElement} [wrapper={HTMLDivElement}]\n * @returns {HTMLElement}\n */\n\nvar utils_wrap = function wrap(element, wrapper) {\n if (wrapper === void 0) {\n wrapper = document.createElement('div');\n }\n\n if (element.nextSibling) {\n element.parentNode.insertBefore(wrapper, element.nextSibling);\n } else {\n element.parentNode.appendChild(wrapper);\n }\n\n return wrapper.appendChild(element);\n};\n/**\n * @param {Element} startEl\n * @param {string} selector\n * @param {1 | -1} direction\n * @returns {Element | undefined}\n */\n\nvar getAdjacentEl = function getAdjacentEl(startEl, selector, direction) {\n if (direction === void 0) {\n direction = 1;\n }\n\n if (!(startEl instanceof Element) || typeof selector !== 'string') {\n return undefined;\n }\n\n var prop = (direction > 0 ? 'next' : 'previous') + \"ElementSibling\";\n var sibling = startEl[prop];\n\n while (sibling) {\n if (sibling.matches(selector)) {\n return sibling;\n }\n\n sibling = sibling[prop];\n }\n\n return sibling;\n};\n/**\n * @param {Element} element\n * @param {Element} parent\n * @param {-1 | 1} direction\n * @returns {boolean}\n */\n\nvar isScrolledIntoView = function isScrolledIntoView(element, parent, direction) {\n if (direction === void 0) {\n direction = 1;\n }\n\n if (!element) {\n return false;\n }\n\n var isVisible;\n\n if (direction > 0) {\n // In view from bottom\n isVisible = parent.scrollTop + parent.offsetHeight >= element.offsetTop + element.offsetHeight;\n } else {\n // In view from top\n isVisible = element.offsetTop >= parent.scrollTop;\n }\n\n return isVisible;\n};\n/**\n * @param {any} value\n * @returns {any}\n */\n\nvar sanitise = function sanitise(value) {\n if (typeof value !== 'string') {\n return value;\n }\n\n return value.replace(/&/g, '&amp;').replace(/>/g, '&rt;').replace(/</g, '&lt;').replace(/\"/g, '&quot;');\n};\n/**\n * @returns {() => (str: string) => Element}\n */\n\nvar strToEl = function () {\n var tmpEl = document.createElement('div');\n return function (str) {\n var cleanedInput = str.trim();\n tmpEl.innerHTML = cleanedInput;\n var firldChild = tmpEl.children[0];\n\n while (tmpEl.firstChild) {\n tmpEl.removeChild(tmpEl.firstChild);\n }\n\n return firldChild;\n };\n}();\n/**\n * @param {{ label?: string, value: string }} a\n * @param {{ label?: string, value: string }} b\n * @returns {number}\n */\n\nvar sortByAlpha = function sortByAlpha(_ref, _ref2) {\n var value = _ref.value,\n _ref$label = _ref.label,\n label = _ref$label === void 0 ? value : _ref$label;\n var value2 = _ref2.value,\n _ref2$label = _ref2.label,\n label2 = _ref2$label === void 0 ? value2 : _ref2$label;\n return label.localeCompare(label2, [], {\n sensitivity: 'base',\n ignorePunctuation: true,\n numeric: true\n });\n};\n/**\n * @param {{ score: number }} a\n * @param {{ score: number }} b\n */\n\nvar sortByScore = function sortByScore(a, b) {\n return a.score - b.score;\n};\n/**\n * @param {HTMLElement} element\n * @param {string} type\n * @param {object} customArgs\n */\n\nvar dispatchEvent = function dispatchEvent(element, type, customArgs) {\n if (customArgs === void 0) {\n customArgs = null;\n }\n\n var event = new CustomEvent(type, {\n detail: customArgs,\n bubbles: true,\n cancelable: true\n });\n return element.dispatchEvent(event);\n};\n/**\n * @param {array} array\n * @param {any} value\n * @param {string} [key=\"value\"]\n * @returns {boolean}\n */\n\nvar existsInArray = function existsInArray(array, value, key) {\n if (key === void 0) {\n key = 'value';\n }\n\n return array.some(function (item) {\n if (typeof value === 'string') {\n return item[key] === value.trim();\n }\n\n return item[key] === value;\n });\n};\n/**\n * @param {any} obj\n * @returns {any}\n */\n\nvar cloneObject = function cloneObject(obj) {\n return JSON.parse(JSON.stringify(obj));\n};\n/**\n * Returns an array of keys present on the first but missing on the second object\n * @param {object} a\n * @param {object} b\n * @returns {string[]}\n */\n\nvar diff = function diff(a, b) {\n var aKeys = Object.keys(a).sort();\n var bKeys = Object.keys(b).sort();\n return aKeys.filter(function (i) {\n return bKeys.indexOf(i) < 0;\n });\n};\n// CONCATENATED MODULE: ./src/scripts/reducers/index.js\n\n\n\n\n\n\nvar appReducer = combineReducers({\n items: items_items,\n groups: groups,\n choices: choices_choices,\n general: reducers_general\n});\n\nvar reducers_rootReducer = function rootReducer(passedState, action) {\n var state = passedState; // If we are clearing all items, groups and options we reassign\n // state and then pass that state to our proper reducer. This isn't\n // mutating our actual state\n // See: http://stackoverflow.com/a/35641992\n\n if (action.type === 'CLEAR_ALL') {\n state = undefined;\n } else if (action.type === 'RESET_TO') {\n return cloneObject(action.state);\n }\n\n return appReducer(state, action);\n};\n\n/* harmony default export */ var reducers = (reducers_rootReducer);\n// CONCATENATED MODULE: ./src/scripts/store/store.js\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n/**\n * @typedef {import('../../../types/index').Choices.Choice} Choice\n * @typedef {import('../../../types/index').Choices.Group} Group\n * @typedef {import('../../../types/index').Choices.Item} Item\n */\n\nvar store_Store =\n/*#__PURE__*/\nfunction () {\n function Store() {\n this._store = createStore(reducers, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__());\n }\n /**\n * Subscribe store to function call (wrapped Redux method)\n * @param {Function} onChange Function to trigger when state changes\n * @return\n */\n\n\n var _proto = Store.prototype;\n\n _proto.subscribe = function subscribe(onChange) {\n this._store.subscribe(onChange);\n }\n /**\n * Dispatch event to store (wrapped Redux method)\n * @param {{ type: string, [x: string]: any }} action Action to trigger\n * @return\n */\n ;\n\n _proto.dispatch = function dispatch(action) {\n this._store.dispatch(action);\n }\n /**\n * Get store object (wrapping Redux method)\n * @returns {object} State\n */\n ;\n\n /**\n * Get loading state from store\n * @returns {boolean} Loading State\n */\n _proto.isLoading = function isLoading() {\n return this.state.general.loading;\n }\n /**\n * Get single choice by it's ID\n * @param {string} id\n * @returns {Choice | undefined} Found choice\n */\n ;\n\n _proto.getChoiceById = function getChoiceById(id) {\n return this.activeChoices.find(function (choice) {\n return choice.id === parseInt(id, 10);\n });\n }\n /**\n * Get group by group id\n * @param {number} id Group ID\n * @returns {Group | undefined} Group data\n */\n ;\n\n _proto.getGroupById = function getGroupById(id) {\n return this.groups.find(function (group) {\n return group.id === id;\n });\n };\n\n _createClass(Store, [{\n key: \"state\",\n get: function get() {\n return this._store.getState();\n }\n /**\n * Get items from store\n * @returns {Item[]} Item objects\n */\n\n }, {\n key: \"items\",\n get: function get() {\n return this.state.items;\n }\n /**\n * Get active items from store\n * @returns {Item[]} Item objects\n */\n\n }, {\n key: \"activeItems\",\n get: function get() {\n return this.items.filter(function (item) {\n return item.active === true;\n });\n }\n /**\n * Get highlighted items from store\n * @returns {Item[]} Item objects\n */\n\n }, {\n key: \"highlightedActiveItems\",\n get: function get() {\n return this.items.filter(function (item) {\n return item.active && item.highlighted;\n });\n }\n /**\n * Get choices from store\n * @returns {Choice[]} Option objects\n */\n\n }, {\n key: \"choices\",\n get: function get() {\n return this.state.choices;\n }\n /**\n * Get active choices from store\n * @returns {Choice[]} Option objects\n */\n\n }, {\n key: \"activeChoices\",\n get: function get() {\n return this.choices.filter(function (choice) {\n return choice.active === true;\n });\n }\n /**\n * Get selectable choices from store\n * @returns {Choice[]} Option objects\n */\n\n }, {\n key: \"selectableChoices\",\n get: function get() {\n return this.choices.filter(function (choice) {\n return choice.disabled !== true;\n });\n }\n /**\n * Get choices that can be searched (excluding placeholders)\n * @returns {Choice[]} Option objects\n */\n\n }, {\n key: \"searchableChoices\",\n get: function get() {\n return this.selectableChoices.filter(function (choice) {\n return choice.placeholder !== true;\n });\n }\n /**\n * Get placeholder choice from store\n * @returns {Choice | undefined} Found placeholder\n */\n\n }, {\n key: \"placeholderChoice\",\n get: function get() {\n return [].concat(this.choices).reverse().find(function (choice) {\n return choice.placeholder === true;\n });\n }\n /**\n * Get groups from store\n * @returns {Group[]} Group objects\n */\n\n }, {\n key: \"groups\",\n get: function get() {\n return this.state.groups;\n }\n /**\n * Get active groups from store\n * @returns {Group[]} Group objects\n */\n\n }, {\n key: \"activeGroups\",\n get: function get() {\n var groups = this.groups,\n choices = this.choices;\n return groups.filter(function (group) {\n var isActive = group.active === true && group.disabled === false;\n var hasActiveOptions = choices.some(function (choice) {\n return choice.active === true && choice.disabled === false;\n });\n return isActive && hasActiveOptions;\n }, []);\n }\n }]);\n\n return Store;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/dropdown.js\nfunction dropdown_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction dropdown_createClass(Constructor, protoProps, staticProps) { if (protoProps) dropdown_defineProperties(Constructor.prototype, protoProps); if (staticProps) dropdown_defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\n * @typedef {import('../../../types/index').Choices.passedElement} passedElement\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n */\nvar Dropdown =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{\n * element: HTMLElement,\n * type: passedElement['type'],\n * classNames: ClassNames,\n * }} args\n */\n function Dropdown(_ref) {\n var element = _ref.element,\n type = _ref.type,\n classNames = _ref.classNames;\n this.element = element;\n this.classNames = classNames;\n this.type = type;\n this.isActive = false;\n }\n /**\n * Bottom position of dropdown in viewport coordinates\n * @returns {number} Vertical position\n */\n\n\n var _proto = Dropdown.prototype;\n\n /**\n * Find element that matches passed selector\n * @param {string} selector\n * @returns {HTMLElement | null}\n */\n _proto.getChild = function getChild(selector) {\n return this.element.querySelector(selector);\n }\n /**\n * Show dropdown to user by adding active state class\n * @returns {this}\n */\n ;\n\n _proto.show = function show() {\n this.element.classList.add(this.classNames.activeState);\n this.element.setAttribute('aria-expanded', 'true');\n this.isActive = true;\n return this;\n }\n /**\n * Hide dropdown from user\n * @returns {this}\n */\n ;\n\n _proto.hide = function hide() {\n this.element.classList.remove(this.classNames.activeState);\n this.element.setAttribute('aria-expanded', 'false');\n this.isActive = false;\n return this;\n };\n\n dropdown_createClass(Dropdown, [{\n key: \"distanceFromTopWindow\",\n get: function get() {\n return this.element.getBoundingClientRect().bottom;\n }\n }]);\n\n return Dropdown;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/constants.js\n\n/**\n * @typedef {import('../../types/index').Choices.ClassNames} ClassNames\n * @typedef {import('../../types/index').Choices.Options} Options\n */\n\n/** @type {ClassNames} */\n\nvar DEFAULT_CLASSNAMES = {\n containerOuter: 'choices',\n containerInner: 'choices__inner',\n input: 'choices__input',\n inputCloned: 'choices__input--cloned',\n list: 'choices__list',\n listItems: 'choices__list--multiple',\n listSingle: 'choices__list--single',\n listDropdown: 'choices__list--dropdown',\n item: 'choices__item',\n itemSelectable: 'choices__item--selectable',\n itemDisabled: 'choices__item--disabled',\n itemChoice: 'choices__item--choice',\n placeholder: 'choices__placeholder',\n group: 'choices__group',\n groupHeading: 'choices__heading',\n button: 'choices__button',\n activeState: 'is-active',\n focusState: 'is-focused',\n openState: 'is-open',\n disabledState: 'is-disabled',\n highlightedState: 'is-highlighted',\n selectedState: 'is-selected',\n flippedState: 'is-flipped',\n loadingState: 'is-loading',\n noResults: 'has-no-results',\n noChoices: 'has-no-choices'\n};\n/** @type {Options} */\n\nvar DEFAULT_CONFIG = {\n items: [],\n choices: [],\n silent: false,\n renderChoiceLimit: -1,\n maxItemCount: -1,\n addItems: true,\n addItemFilter: null,\n removeItems: true,\n removeItemButton: false,\n editItems: false,\n duplicateItemsAllowed: true,\n delimiter: ',',\n paste: true,\n searchEnabled: true,\n searchChoices: true,\n searchFloor: 1,\n searchResultLimit: 4,\n searchFields: ['label', 'value'],\n position: 'auto',\n resetScrollPosition: true,\n shouldSort: true,\n shouldSortItems: false,\n sorter: sortByAlpha,\n placeholder: true,\n placeholderValue: null,\n searchPlaceholderValue: null,\n prependValue: null,\n appendValue: null,\n renderSelectedChoices: 'auto',\n loadingText: 'Loading...',\n noResultsText: 'No results found',\n noChoicesText: 'No choices to choose from',\n itemSelectText: 'Press to select',\n uniqueItemText: 'Only unique values can be added',\n customAddItemText: 'Only values matching specific conditions can be added',\n addItemText: function addItemText(value) {\n return \"Press Enter to add <b>\\\"\" + sanitise(value) + \"\\\"</b>\";\n },\n maxItemText: function maxItemText(maxItemCount) {\n return \"Only \" + maxItemCount + \" values can be added\";\n },\n valueComparer: function valueComparer(value1, value2) {\n return value1 === value2;\n },\n fuseOptions: {\n includeScore: true\n },\n callbackOnInit: null,\n callbackOnCreateTemplates: null,\n classNames: DEFAULT_CLASSNAMES\n};\nvar EVENTS = {\n showDropdown: 'showDropdown',\n hideDropdown: 'hideDropdown',\n change: 'change',\n choice: 'choice',\n search: 'search',\n addItem: 'addItem',\n removeItem: 'removeItem',\n highlightItem: 'highlightItem',\n highlightChoice: 'highlightChoice'\n};\nvar ACTION_TYPES = {\n ADD_CHOICE: 'ADD_CHOICE',\n FILTER_CHOICES: 'FILTER_CHOICES',\n ACTIVATE_CHOICES: 'ACTIVATE_CHOICES',\n CLEAR_CHOICES: 'CLEAR_CHOICES',\n ADD_GROUP: 'ADD_GROUP',\n ADD_ITEM: 'ADD_ITEM',\n REMOVE_ITEM: 'REMOVE_ITEM',\n HIGHLIGHT_ITEM: 'HIGHLIGHT_ITEM',\n CLEAR_ALL: 'CLEAR_ALL'\n};\nvar KEY_CODES = {\n BACK_KEY: 46,\n DELETE_KEY: 8,\n ENTER_KEY: 13,\n A_KEY: 65,\n ESC_KEY: 27,\n UP_KEY: 38,\n DOWN_KEY: 40,\n PAGE_UP_KEY: 33,\n PAGE_DOWN_KEY: 34\n};\nvar TEXT_TYPE = 'text';\nvar SELECT_ONE_TYPE = 'select-one';\nvar SELECT_MULTIPLE_TYPE = 'select-multiple';\nvar SCROLLING_SPEED = 4;\n// CONCATENATED MODULE: ./src/scripts/components/container.js\n\n\n/**\n * @typedef {import('../../../types/index').Choices.passedElement} passedElement\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n */\n\nvar container_Container =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{\n * element: HTMLElement,\n * type: passedElement['type'],\n * classNames: ClassNames,\n * position\n * }} args\n */\n function Container(_ref) {\n var element = _ref.element,\n type = _ref.type,\n classNames = _ref.classNames,\n position = _ref.position;\n this.element = element;\n this.classNames = classNames;\n this.type = type;\n this.position = position;\n this.isOpen = false;\n this.isFlipped = false;\n this.isFocussed = false;\n this.isDisabled = false;\n this.isLoading = false;\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n }\n\n var _proto = Container.prototype;\n\n _proto.addEventListeners = function addEventListeners() {\n this.element.addEventListener('focus', this._onFocus);\n this.element.addEventListener('blur', this._onBlur);\n };\n\n _proto.removeEventListeners = function removeEventListeners() {\n this.element.removeEventListener('focus', this._onFocus);\n this.element.removeEventListener('blur', this._onBlur);\n }\n /**\n * Determine whether container should be flipped based on passed\n * dropdown position\n * @param {number} dropdownPos\n * @returns {boolean}\n */\n ;\n\n _proto.shouldFlip = function shouldFlip(dropdownPos) {\n if (typeof dropdownPos !== 'number') {\n return false;\n } // If flip is enabled and the dropdown bottom position is\n // greater than the window height flip the dropdown.\n\n\n var shouldFlip = false;\n\n if (this.position === 'auto') {\n shouldFlip = !window.matchMedia(\"(min-height: \" + (dropdownPos + 1) + \"px)\").matches;\n } else if (this.position === 'top') {\n shouldFlip = true;\n }\n\n return shouldFlip;\n }\n /**\n * @param {string} activeDescendantID\n */\n ;\n\n _proto.setActiveDescendant = function setActiveDescendant(activeDescendantID) {\n this.element.setAttribute('aria-activedescendant', activeDescendantID);\n };\n\n _proto.removeActiveDescendant = function removeActiveDescendant() {\n this.element.removeAttribute('aria-activedescendant');\n }\n /**\n * @param {number} dropdownPos\n */\n ;\n\n _proto.open = function open(dropdownPos) {\n this.element.classList.add(this.classNames.openState);\n this.element.setAttribute('aria-expanded', 'true');\n this.isOpen = true;\n\n if (this.shouldFlip(dropdownPos)) {\n this.element.classList.add(this.classNames.flippedState);\n this.isFlipped = true;\n }\n };\n\n _proto.close = function close() {\n this.element.classList.remove(this.classNames.openState);\n this.element.setAttribute('aria-expanded', 'false');\n this.removeActiveDescendant();\n this.isOpen = false; // A dropdown flips if it does not have space within the page\n\n if (this.isFlipped) {\n this.element.classList.remove(this.classNames.flippedState);\n this.isFlipped = false;\n }\n };\n\n _proto.focus = function focus() {\n if (!this.isFocussed) {\n this.element.focus();\n }\n };\n\n _proto.addFocusState = function addFocusState() {\n this.element.classList.add(this.classNames.focusState);\n };\n\n _proto.removeFocusState = function removeFocusState() {\n this.element.classList.remove(this.classNames.focusState);\n };\n\n _proto.enable = function enable() {\n this.element.classList.remove(this.classNames.disabledState);\n this.element.removeAttribute('aria-disabled');\n\n if (this.type === SELECT_ONE_TYPE) {\n this.element.setAttribute('tabindex', '0');\n }\n\n this.isDisabled = false;\n };\n\n _proto.disable = function disable() {\n this.element.classList.add(this.classNames.disabledState);\n this.element.setAttribute('aria-disabled', 'true');\n\n if (this.type === SELECT_ONE_TYPE) {\n this.element.setAttribute('tabindex', '-1');\n }\n\n this.isDisabled = true;\n }\n /**\n * @param {HTMLElement} element\n */\n ;\n\n _proto.wrap = function wrap(element) {\n utils_wrap(element, this.element);\n }\n /**\n * @param {Element} element\n */\n ;\n\n _proto.unwrap = function unwrap(element) {\n // Move passed element outside this element\n this.element.parentNode.insertBefore(element, this.element); // Remove this element\n\n this.element.parentNode.removeChild(this.element);\n };\n\n _proto.addLoadingState = function addLoadingState() {\n this.element.classList.add(this.classNames.loadingState);\n this.element.setAttribute('aria-busy', 'true');\n this.isLoading = true;\n };\n\n _proto.removeLoadingState = function removeLoadingState() {\n this.element.classList.remove(this.classNames.loadingState);\n this.element.removeAttribute('aria-busy');\n this.isLoading = false;\n };\n\n _proto._onFocus = function _onFocus() {\n this.isFocussed = true;\n };\n\n _proto._onBlur = function _onBlur() {\n this.isFocussed = false;\n };\n\n return Container;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/input.js\nfunction input_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction input_createClass(Constructor, protoProps, staticProps) { if (protoProps) input_defineProperties(Constructor.prototype, protoProps); if (staticProps) input_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n/**\n * @typedef {import('../../../types/index').Choices.passedElement} passedElement\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n */\n\nvar input_Input =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{\n * element: HTMLInputElement,\n * type: passedElement['type'],\n * classNames: ClassNames,\n * preventPaste: boolean\n * }} args\n */\n function Input(_ref) {\n var element = _ref.element,\n type = _ref.type,\n classNames = _ref.classNames,\n preventPaste = _ref.preventPaste;\n this.element = element;\n this.type = type;\n this.classNames = classNames;\n this.preventPaste = preventPaste;\n this.isFocussed = this.element === document.activeElement;\n this.isDisabled = element.disabled;\n this._onPaste = this._onPaste.bind(this);\n this._onInput = this._onInput.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n }\n /**\n * @param {string} placeholder\n */\n\n\n var _proto = Input.prototype;\n\n _proto.addEventListeners = function addEventListeners() {\n this.element.addEventListener('paste', this._onPaste);\n this.element.addEventListener('input', this._onInput, {\n passive: true\n });\n this.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n };\n\n _proto.removeEventListeners = function removeEventListeners() {\n this.element.removeEventListener('input', this._onInput, {\n passive: true\n });\n this.element.removeEventListener('paste', this._onPaste);\n this.element.removeEventListener('focus', this._onFocus, {\n passive: true\n });\n this.element.removeEventListener('blur', this._onBlur, {\n passive: true\n });\n };\n\n _proto.enable = function enable() {\n this.element.removeAttribute('disabled');\n this.isDisabled = false;\n };\n\n _proto.disable = function disable() {\n this.element.setAttribute('disabled', '');\n this.isDisabled = true;\n };\n\n _proto.focus = function focus() {\n if (!this.isFocussed) {\n this.element.focus();\n }\n };\n\n _proto.blur = function blur() {\n if (this.isFocussed) {\n this.element.blur();\n }\n }\n /**\n * Set value of input to blank\n * @param {boolean} setWidth\n * @returns {this}\n */\n ;\n\n _proto.clear = function clear(setWidth) {\n if (setWidth === void 0) {\n setWidth = true;\n }\n\n if (this.element.value) {\n this.element.value = '';\n }\n\n if (setWidth) {\n this.setWidth();\n }\n\n return this;\n }\n /**\n * Set the correct input width based on placeholder\n * value or input value\n */\n ;\n\n _proto.setWidth = function setWidth() {\n // Resize input to contents or placeholder\n var _this$element = this.element,\n style = _this$element.style,\n value = _this$element.value,\n placeholder = _this$element.placeholder;\n style.minWidth = placeholder.length + 1 + \"ch\";\n style.width = value.length + 1 + \"ch\";\n }\n /**\n * @param {string} activeDescendantID\n */\n ;\n\n _proto.setActiveDescendant = function setActiveDescendant(activeDescendantID) {\n this.element.setAttribute('aria-activedescendant', activeDescendantID);\n };\n\n _proto.removeActiveDescendant = function removeActiveDescendant() {\n this.element.removeAttribute('aria-activedescendant');\n };\n\n _proto._onInput = function _onInput() {\n if (this.type !== SELECT_ONE_TYPE) {\n this.setWidth();\n }\n }\n /**\n * @param {Event} event\n */\n ;\n\n _proto._onPaste = function _onPaste(event) {\n if (this.preventPaste) {\n event.preventDefault();\n }\n };\n\n _proto._onFocus = function _onFocus() {\n this.isFocussed = true;\n };\n\n _proto._onBlur = function _onBlur() {\n this.isFocussed = false;\n };\n\n input_createClass(Input, [{\n key: \"placeholder\",\n set: function set(placeholder) {\n this.element.placeholder = placeholder;\n }\n /**\n * @returns {string}\n */\n\n }, {\n key: \"value\",\n get: function get() {\n return sanitise(this.element.value);\n }\n /**\n * @param {string} value\n */\n ,\n set: function set(value) {\n this.element.value = value;\n }\n }]);\n\n return Input;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/list.js\n\n/**\n * @typedef {import('../../../types/index').Choices.Choice} Choice\n */\n\nvar list_List =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{ element: HTMLElement }} args\n */\n function List(_ref) {\n var element = _ref.element;\n this.element = element;\n this.scrollPos = this.element.scrollTop;\n this.height = this.element.offsetHeight;\n }\n\n var _proto = List.prototype;\n\n _proto.clear = function clear() {\n this.element.innerHTML = '';\n }\n /**\n * @param {Element | DocumentFragment} node\n */\n ;\n\n _proto.append = function append(node) {\n this.element.appendChild(node);\n }\n /**\n * @param {string} selector\n * @returns {Element | null}\n */\n ;\n\n _proto.getChild = function getChild(selector) {\n return this.element.querySelector(selector);\n }\n /**\n * @returns {boolean}\n */\n ;\n\n _proto.hasChildren = function hasChildren() {\n return this.element.hasChildNodes();\n };\n\n _proto.scrollToTop = function scrollToTop() {\n this.element.scrollTop = 0;\n }\n /**\n * @param {Element} element\n * @param {1 | -1} direction\n */\n ;\n\n _proto.scrollToChildElement = function scrollToChildElement(element, direction) {\n var _this = this;\n\n if (!element) {\n return;\n }\n\n var listHeight = this.element.offsetHeight; // Scroll position of dropdown\n\n var listScrollPosition = this.element.scrollTop + listHeight;\n var elementHeight = element.offsetHeight; // Distance from bottom of element to top of parent\n\n var elementPos = element.offsetTop + elementHeight; // Difference between the element and scroll position\n\n var destination = direction > 0 ? this.element.scrollTop + elementPos - listScrollPosition : element.offsetTop;\n requestAnimationFrame(function () {\n _this._animateScroll(destination, direction);\n });\n }\n /**\n * @param {number} scrollPos\n * @param {number} strength\n * @param {number} destination\n */\n ;\n\n _proto._scrollDown = function _scrollDown(scrollPos, strength, destination) {\n var easing = (destination - scrollPos) / strength;\n var distance = easing > 1 ? easing : 1;\n this.element.scrollTop = scrollPos + distance;\n }\n /**\n * @param {number} scrollPos\n * @param {number} strength\n * @param {number} destination\n */\n ;\n\n _proto._scrollUp = function _scrollUp(scrollPos, strength, destination) {\n var easing = (scrollPos - destination) / strength;\n var distance = easing > 1 ? easing : 1;\n this.element.scrollTop = scrollPos - distance;\n }\n /**\n * @param {*} destination\n * @param {*} direction\n */\n ;\n\n _proto._animateScroll = function _animateScroll(destination, direction) {\n var _this2 = this;\n\n var strength = SCROLLING_SPEED;\n var choiceListScrollTop = this.element.scrollTop;\n var continueAnimation = false;\n\n if (direction > 0) {\n this._scrollDown(choiceListScrollTop, strength, destination);\n\n if (choiceListScrollTop < destination) {\n continueAnimation = true;\n }\n } else {\n this._scrollUp(choiceListScrollTop, strength, destination);\n\n if (choiceListScrollTop > destination) {\n continueAnimation = true;\n }\n }\n\n if (continueAnimation) {\n requestAnimationFrame(function () {\n _this2._animateScroll(destination, direction);\n });\n }\n };\n\n return List;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/wrapped-element.js\nfunction wrapped_element_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction wrapped_element_createClass(Constructor, protoProps, staticProps) { if (protoProps) wrapped_element_defineProperties(Constructor.prototype, protoProps); if (staticProps) wrapped_element_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n/**\n * @typedef {import('../../../types/index').Choices.passedElement} passedElement\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n */\n\nvar wrapped_element_WrappedElement =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{\n * element: HTMLInputElement | HTMLSelectElement,\n * classNames: ClassNames,\n * }} args\n */\n function WrappedElement(_ref) {\n var element = _ref.element,\n classNames = _ref.classNames;\n this.element = element;\n this.classNames = classNames;\n\n if (!(element instanceof HTMLInputElement) && !(element instanceof HTMLSelectElement)) {\n throw new TypeError('Invalid element passed');\n }\n\n this.isDisabled = false;\n }\n\n var _proto = WrappedElement.prototype;\n\n _proto.conceal = function conceal() {\n // Hide passed input\n this.element.classList.add(this.classNames.input);\n this.element.hidden = true; // Remove element from tab index\n\n this.element.tabIndex = -1; // Backup original styles if any\n\n var origStyle = this.element.getAttribute('style');\n\n if (origStyle) {\n this.element.setAttribute('data-choice-orig-style', origStyle);\n }\n\n this.element.setAttribute('data-choice', 'active');\n };\n\n _proto.reveal = function reveal() {\n // Reinstate passed element\n this.element.classList.remove(this.classNames.input);\n this.element.hidden = false;\n this.element.removeAttribute('tabindex'); // Recover original styles if any\n\n var origStyle = this.element.getAttribute('data-choice-orig-style');\n\n if (origStyle) {\n this.element.removeAttribute('data-choice-orig-style');\n this.element.setAttribute('style', origStyle);\n } else {\n this.element.removeAttribute('style');\n }\n\n this.element.removeAttribute('data-choice'); // Re-assign values - this is weird, I know\n // @todo Figure out why we need to do this\n\n this.element.value = this.element.value; // eslint-disable-line no-self-assign\n };\n\n _proto.enable = function enable() {\n this.element.removeAttribute('disabled');\n this.element.disabled = false;\n this.isDisabled = false;\n };\n\n _proto.disable = function disable() {\n this.element.setAttribute('disabled', '');\n this.element.disabled = true;\n this.isDisabled = true;\n };\n\n _proto.triggerEvent = function triggerEvent(eventType, data) {\n dispatchEvent(this.element, eventType, data);\n };\n\n wrapped_element_createClass(WrappedElement, [{\n key: \"isActive\",\n get: function get() {\n return this.element.dataset.choice === 'active';\n }\n }, {\n key: \"dir\",\n get: function get() {\n return this.element.dir;\n }\n }, {\n key: \"value\",\n get: function get() {\n return this.element.value;\n },\n set: function set(value) {\n // you must define setter here otherwise it will be readonly property\n this.element.value = value;\n }\n }]);\n\n return WrappedElement;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/wrapped-input.js\nfunction wrapped_input_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction wrapped_input_createClass(Constructor, protoProps, staticProps) { if (protoProps) wrapped_input_defineProperties(Constructor.prototype, protoProps); if (staticProps) wrapped_input_defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n\n/**\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n * @typedef {import('../../../types/index').Choices.Item} Item\n */\n\nvar WrappedInput =\n/*#__PURE__*/\nfunction (_WrappedElement) {\n _inheritsLoose(WrappedInput, _WrappedElement);\n\n /**\n * @param {{\n * element: HTMLInputElement,\n * classNames: ClassNames,\n * delimiter: string\n * }} args\n */\n function WrappedInput(_ref) {\n var _this;\n\n var element = _ref.element,\n classNames = _ref.classNames,\n delimiter = _ref.delimiter;\n _this = _WrappedElement.call(this, {\n element: element,\n classNames: classNames\n }) || this;\n _this.delimiter = delimiter;\n return _this;\n }\n /**\n * @returns {string}\n */\n\n\n wrapped_input_createClass(WrappedInput, [{\n key: \"value\",\n get: function get() {\n return this.element.value;\n }\n /**\n * @param {Item[]} items\n */\n ,\n set: function set(items) {\n var itemValues = items.map(function (_ref2) {\n var value = _ref2.value;\n return value;\n });\n var joinedValues = itemValues.join(this.delimiter);\n this.element.setAttribute('value', joinedValues);\n this.element.value = joinedValues;\n }\n }]);\n\n return WrappedInput;\n}(wrapped_element_WrappedElement);\n\n\n// CONCATENATED MODULE: ./src/scripts/components/wrapped-select.js\nfunction wrapped_select_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction wrapped_select_createClass(Constructor, protoProps, staticProps) { if (protoProps) wrapped_select_defineProperties(Constructor.prototype, protoProps); if (staticProps) wrapped_select_defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction wrapped_select_inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n\n/**\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n * @typedef {import('../../../types/index').Choices.Item} Item\n * @typedef {import('../../../types/index').Choices.Choice} Choice\n */\n\nvar WrappedSelect =\n/*#__PURE__*/\nfunction (_WrappedElement) {\n wrapped_select_inheritsLoose(WrappedSelect, _WrappedElement);\n\n /**\n * @param {{\n * element: HTMLSelectElement,\n * classNames: ClassNames,\n * delimiter: string\n * template: function\n * }} args\n */\n function WrappedSelect(_ref) {\n var _this;\n\n var element = _ref.element,\n classNames = _ref.classNames,\n template = _ref.template;\n _this = _WrappedElement.call(this, {\n element: element,\n classNames: classNames\n }) || this;\n _this.template = template;\n return _this;\n }\n\n var _proto = WrappedSelect.prototype;\n\n /**\n * @param {DocumentFragment} fragment\n */\n _proto.appendDocFragment = function appendDocFragment(fragment) {\n this.element.innerHTML = '';\n this.element.appendChild(fragment);\n };\n\n wrapped_select_createClass(WrappedSelect, [{\n key: \"placeholderOption\",\n get: function get() {\n return this.element.querySelector('option[value=\"\"]') || // Backward compatibility layer for the non-standard placeholder attribute supported in older versions.\n this.element.querySelector('option[placeholder]');\n }\n /**\n * @returns {Element[]}\n */\n\n }, {\n key: \"optionGroups\",\n get: function get() {\n return Array.from(this.element.getElementsByTagName('OPTGROUP'));\n }\n /**\n * @returns {Item[] | Choice[]}\n */\n\n }, {\n key: \"options\",\n get: function get() {\n return Array.from(this.element.options);\n }\n /**\n * @param {Item[] | Choice[]} options\n */\n ,\n set: function set(options) {\n var _this2 = this;\n\n var fragment = document.createDocumentFragment();\n\n var addOptionToFragment = function addOptionToFragment(data) {\n // Create a standard select option\n var option = _this2.template(data); // Append it to fragment\n\n\n fragment.appendChild(option);\n }; // Add each list item to list\n\n\n options.forEach(function (optionData) {\n return addOptionToFragment(optionData);\n });\n this.appendDocFragment(fragment);\n }\n }]);\n\n return WrappedSelect;\n}(wrapped_element_WrappedElement);\n\n\n// CONCATENATED MODULE: ./src/scripts/components/index.js\n\n\n\n\n\n\n\n// CONCATENATED MODULE: ./src/scripts/templates.js\n/**\n * Helpers to create HTML elements used by Choices\n * Can be overridden by providing `callbackOnCreateTemplates` option\n * @typedef {import('../../types/index').Choices.Templates} Templates\n * @typedef {import('../../types/index').Choices.ClassNames} ClassNames\n * @typedef {import('../../types/index').Choices.Options} Options\n * @typedef {import('../../types/index').Choices.Item} Item\n * @typedef {import('../../types/index').Choices.Choice} Choice\n * @typedef {import('../../types/index').Choices.Group} Group\n */\nvar TEMPLATES =\n/** @type {Templates} */\n{\n /**\n * @param {Partial<ClassNames>} classNames\n * @param {\"ltr\" | \"rtl\" | \"auto\"} dir\n * @param {boolean} isSelectElement\n * @param {boolean} isSelectOneElement\n * @param {boolean} searchEnabled\n * @param {\"select-one\" | \"select-multiple\" | \"text\"} passedElementType\n */\n containerOuter: function containerOuter(_ref, dir, isSelectElement, isSelectOneElement, searchEnabled, passedElementType) {\n var _containerOuter = _ref.containerOuter;\n var div = Object.assign(document.createElement('div'), {\n className: _containerOuter\n });\n div.dataset.type = passedElementType;\n\n if (dir) {\n div.dir = dir;\n }\n\n if (isSelectOneElement) {\n div.tabIndex = 0;\n }\n\n if (isSelectElement) {\n div.setAttribute('role', searchEnabled ? 'combobox' : 'listbox');\n\n if (searchEnabled) {\n div.setAttribute('aria-autocomplete', 'list');\n }\n }\n\n div.setAttribute('aria-haspopup', 'true');\n div.setAttribute('aria-expanded', 'false');\n return div;\n },\n\n /**\n * @param {Partial<ClassNames>} classNames\n */\n containerInner: function containerInner(_ref2) {\n var _containerInner = _ref2.containerInner;\n return Object.assign(document.createElement('div'), {\n className: _containerInner\n });\n },\n\n /**\n * @param {Partial<ClassNames>} classNames\n * @param {boolean} isSelectOneElement\n */\n itemList: function itemList(_ref3, isSelectOneElement) {\n var list = _ref3.list,\n listSingle = _ref3.listSingle,\n listItems = _ref3.listItems;\n return Object.assign(document.createElement('div'), {\n className: list + \" \" + (isSelectOneElement ? listSingle : listItems)\n });\n },\n\n /**\n * @param {Partial<ClassNames>} classNames\n * @param {string} value\n */\n placeholder: function placeholder(_ref4, value) {\n var _placeholder = _ref4.placeholder;\n return Object.assign(document.createElement('div'), {\n className: _placeholder,\n innerHTML: value\n });\n },\n\n /**\n * @param {Partial<ClassNames>} classNames\n * @param {Item} item\n * @param {boolean} removeItemButton\n */\n item: function item(_ref5, _ref6, removeItemButton) {\n var _item = _ref5.item,\n button = _ref5.button,\n highlightedState = _ref5.highlightedState,\n itemSelectable = _ref5.itemSelectable,\n placeholder = _ref5.placeholder;\n var id = _ref6.id,\n value = _ref6.value,\n label = _ref6.label,\n customProperties = _ref6.customProperties,\n active = _ref6.active,\n disabled = _ref6.disabled,\n highlighted = _ref6.highlighted,\n isPlaceholder = _ref6.placeholder;\n var div = Object.assign(document.createElement('div'), {\n className: _item,\n innerHTML: label\n });\n Object.assign(div.dataset, {\n item: '',\n id: id,\n value: value,\n customProperties: customProperties\n });\n\n if (active) {\n div.setAttribute('aria-selected', 'true');\n }\n\n if (disabled) {\n div.setAttribute('aria-disabled', 'true');\n }\n\n if (isPlaceholder) {\n div.classList.add(placeholder);\n }\n\n div.classList.add(highlighted ? highlightedState : itemSelectable);\n\n if (removeItemButton) {\n if (disabled) {\n div.classList.remove(itemSelectable);\n }\n\n div.dataset.deletable = '';\n /** @todo This MUST be localizable, not hardcoded! */\n\n var REMOVE_ITEM_TEXT = 'Remove item';\n var removeButton = Object.assign(document.createElement('button'), {\n type: 'button',\n className: button,\n innerHTML: REMOVE_ITEM_TEXT\n });\n removeButton.setAttribute('aria-label', REMOVE_ITEM_TEXT + \": '\" + value + \"'\");\n removeButton.dataset.button = '';\n div.appendChild(removeButton);\n }\n\n return div;\n },\n\n /**\n * @param {Partial<ClassNames>} classNames\n * @param {boolean} isSelectOneElement\n */\n choiceList: function choiceList(_ref7, isSelectOneElement) {\n var list = _ref7.list;\n var div = Object.assign(document.createElement('div'), {\n className: list\n });\n\n if (!isSelectOneElement) {\n div.setAttribute('aria-multiselectable', 'true');\n }\n\n div.setAttribute('role', 'listbox');\n return div;\n },\n\n /**\n * @param {Partial<ClassNames>} classNames\n * @param {Group} group\n */\n choiceGroup: function choiceGroup(_ref8, _ref9) {\n var group = _ref8.group,\n groupHeading = _ref8.groupHeading,\n itemDisabled = _ref8.itemDisabled;\n var id = _ref9.id,\n value = _ref9.value,\n disabled = _ref9.disabled;\n var div = Object.assign(document.createElement('div'), {\n className: group + \" \" + (disabled ? itemDisabled : '')\n });\n div.setAttribute('role', 'group');\n Object.assign(div.dataset, {\n group: '',\n id: id,\n value: value\n });\n\n if (disabled) {\n div.setAttribute('aria-disabled', 'true');\n }\n\n div.appendChild(Object.assign(document.createElement('div'), {\n className: groupHeading,\n innerHTML: value\n }));\n return div;\n },\n\n /**\n * @param {Partial<ClassNames>} classNames\n * @param {Choice} choice\n * @param {Options['itemSelectText']} selectText\n */\n choice: function choice(_ref10, _ref11, selectText) {\n var item = _ref10.item,\n itemChoice = _ref10.itemChoice,\n itemSelectable = _ref10.itemSelectable,\n selectedState = _ref10.selectedState,\n itemDisabled = _ref10.itemDisabled,\n placeholder = _ref10.placeholder;\n var id = _ref11.id,\n value = _ref11.value,\n label = _ref11.label,\n groupId = _ref11.groupId,\n elementId = _ref11.elementId,\n isDisabled = _ref11.disabled,\n isSelected = _ref11.selected,\n isPlaceholder = _ref11.placeholder;\n var div = Object.assign(document.createElement('div'), {\n id: elementId,\n innerHTML: label,\n className: item + \" \" + itemChoice\n });\n\n if (isSelected) {\n div.classList.add(selectedState);\n }\n\n if (isPlaceholder) {\n div.classList.add(placeholder);\n }\n\n div.setAttribute('role', groupId > 0 ? 'treeitem' : 'option');\n Object.assign(div.dataset, {\n choice: '',\n id: id,\n value: value,\n selectText: selectText\n });\n\n if (isDisabled) {\n div.classList.add(itemDisabled);\n div.dataset.choiceDisabled = '';\n div.setAttribute('aria-disabled', 'true');\n } else {\n div.classList.add(itemSelectable);\n div.dataset.choiceSelectable = '';\n }\n\n return div;\n },\n\n /**\n * @param {Partial<ClassNames>} classNames\n * @param {string} placeholderValue\n */\n input: function input(_ref12, placeholderValue) {\n var _input = _ref12.input,\n inputCloned = _ref12.inputCloned;\n var inp = Object.assign(document.createElement('input'), {\n type: 'text',\n className: _input + \" \" + inputCloned,\n autocomplete: 'off',\n autocapitalize: 'off',\n spellcheck: false\n });\n inp.setAttribute('role', 'textbox');\n inp.setAttribute('aria-autocomplete', 'list');\n inp.setAttribute('aria-label', placeholderValue);\n return inp;\n },\n\n /**\n * @param {Partial<ClassNames>} classNames\n */\n dropdown: function dropdown(_ref13) {\n var list = _ref13.list,\n listDropdown = _ref13.listDropdown;\n var div = document.createElement('div');\n div.classList.add(list, listDropdown);\n div.setAttribute('aria-expanded', 'false');\n return div;\n },\n\n /**\n *\n * @param {Partial<ClassNames>} classNames\n * @param {string} innerHTML\n * @param {\"no-choices\" | \"no-results\" | \"\"} type\n */\n notice: function notice(_ref14, innerHTML, type) {\n var item = _ref14.item,\n itemChoice = _ref14.itemChoice,\n noResults = _ref14.noResults,\n noChoices = _ref14.noChoices;\n\n if (type === void 0) {\n type = '';\n }\n\n var classes = [item, itemChoice];\n\n if (type === 'no-choices') {\n classes.push(noChoices);\n } else if (type === 'no-results') {\n classes.push(noResults);\n }\n\n return Object.assign(document.createElement('div'), {\n innerHTML: innerHTML,\n className: classes.join(' ')\n });\n },\n\n /**\n * @param {Item} option\n */\n option: function option(_ref15) {\n var label = _ref15.label,\n value = _ref15.value,\n customProperties = _ref15.customProperties,\n active = _ref15.active,\n disabled = _ref15.disabled;\n var opt = new Option(label, value, false, active);\n\n if (customProperties) {\n opt.dataset.customProperties = customProperties;\n }\n\n opt.disabled = disabled;\n return opt;\n }\n};\n/* harmony default export */ var templates = (TEMPLATES);\n// CONCATENATED MODULE: ./src/scripts/actions/choices.js\n/**\n * @typedef {import('redux').Action} Action\n * @typedef {import('../../../types/index').Choices.Choice} Choice\n */\n\n/**\n * @argument {Choice} choice\n * @returns {Action & Choice}\n */\n\nvar choices_addChoice = function addChoice(_ref) {\n var value = _ref.value,\n label = _ref.label,\n id = _ref.id,\n groupId = _ref.groupId,\n disabled = _ref.disabled,\n elementId = _ref.elementId,\n customProperties = _ref.customProperties,\n placeholder = _ref.placeholder,\n keyCode = _ref.keyCode;\n return {\n type: ACTION_TYPES.ADD_CHOICE,\n value: value,\n label: label,\n id: id,\n groupId: groupId,\n disabled: disabled,\n elementId: elementId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n };\n};\n/**\n * @argument {Choice[]} results\n * @returns {Action & { results: Choice[] }}\n */\n\nvar choices_filterChoices = function filterChoices(results) {\n return {\n type: ACTION_TYPES.FILTER_CHOICES,\n results: results\n };\n};\n/**\n * @argument {boolean} active\n * @returns {Action & { active: boolean }}\n */\n\nvar choices_activateChoices = function activateChoices(active) {\n if (active === void 0) {\n active = true;\n }\n\n return {\n type: ACTION_TYPES.ACTIVATE_CHOICES,\n active: active\n };\n};\n/**\n * @returns {Action}\n */\n\nvar choices_clearChoices = function clearChoices() {\n return {\n type: ACTION_TYPES.CLEAR_CHOICES\n };\n};\n// CONCATENATED MODULE: ./src/scripts/actions/items.js\n\n/**\n * @typedef {import('redux').Action} Action\n * @typedef {import('../../../types/index').Choices.Item} Item\n */\n\n/**\n * @param {Item} item\n * @returns {Action & Item}\n */\n\nvar items_addItem = function addItem(_ref) {\n var value = _ref.value,\n label = _ref.label,\n id = _ref.id,\n choiceId = _ref.choiceId,\n groupId = _ref.groupId,\n customProperties = _ref.customProperties,\n placeholder = _ref.placeholder,\n keyCode = _ref.keyCode;\n return {\n type: ACTION_TYPES.ADD_ITEM,\n value: value,\n label: label,\n id: id,\n choiceId: choiceId,\n groupId: groupId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n };\n};\n/**\n * @param {string} id\n * @param {string} choiceId\n * @returns {Action & { id: string, choiceId: string }}\n */\n\nvar items_removeItem = function removeItem(id, choiceId) {\n return {\n type: ACTION_TYPES.REMOVE_ITEM,\n id: id,\n choiceId: choiceId\n };\n};\n/**\n * @param {string} id\n * @param {boolean} highlighted\n * @returns {Action & { id: string, highlighted: boolean }}\n */\n\nvar items_highlightItem = function highlightItem(id, highlighted) {\n return {\n type: ACTION_TYPES.HIGHLIGHT_ITEM,\n id: id,\n highlighted: highlighted\n };\n};\n// CONCATENATED MODULE: ./src/scripts/actions/groups.js\n\n/**\n * @typedef {import('redux').Action} Action\n * @typedef {import('../../../types/index').Choices.Group} Group\n */\n\n/**\n * @param {Group} group\n * @returns {Action & Group}\n */\n\nvar groups_addGroup = function addGroup(_ref) {\n var value = _ref.value,\n id = _ref.id,\n active = _ref.active,\n disabled = _ref.disabled;\n return {\n type: ACTION_TYPES.ADD_GROUP,\n value: value,\n id: id,\n active: active,\n disabled: disabled\n };\n};\n// CONCATENATED MODULE: ./src/scripts/actions/misc.js\n/**\n * @typedef {import('redux').Action} Action\n */\n\n/**\n * @returns {Action}\n */\nvar clearAll = function clearAll() {\n return {\n type: 'CLEAR_ALL'\n };\n};\n/**\n * @param {any} state\n * @returns {Action & { state: object }}\n */\n\nvar resetTo = function resetTo(state) {\n return {\n type: 'RESET_TO',\n state: state\n };\n};\n/**\n * @param {boolean} isLoading\n * @returns {Action & { isLoading: boolean }}\n */\n\nvar setIsLoading = function setIsLoading(isLoading) {\n return {\n type: 'SET_IS_LOADING',\n isLoading: isLoading\n };\n};\n// CONCATENATED MODULE: ./src/scripts/choices.js\nfunction choices_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction choices_createClass(Constructor, protoProps, staticProps) { if (protoProps) choices_defineProperties(Constructor.prototype, protoProps); if (staticProps) choices_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n\n\n\n\n\n\n\n/** @see {@link http://browserhacks.com/#hack-acea075d0ac6954f275a70023906050c} */\n\nvar IS_IE11 = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style;\n/**\n * @typedef {import('../../types/index').Choices.Choice} Choice\n * @typedef {import('../../types/index').Choices.Item} Item\n * @typedef {import('../../types/index').Choices.Group} Group\n * @typedef {import('../../types/index').Choices.Options} Options\n */\n\n/** @type {Partial<Options>} */\n\nvar USER_DEFAULTS = {};\n/**\n * Choices\n * @author Josh Johnson<josh@joshuajohnson.co.uk>\n */\n\nvar choices_Choices =\n/*#__PURE__*/\nfunction () {\n choices_createClass(Choices, null, [{\n key: \"defaults\",\n get: function get() {\n return Object.preventExtensions({\n get options() {\n return USER_DEFAULTS;\n },\n\n get templates() {\n return TEMPLATES;\n }\n\n });\n }\n /**\n * @param {string | HTMLInputElement | HTMLSelectElement} element\n * @param {Partial<Options>} userConfig\n */\n\n }]);\n\n function Choices(element, userConfig) {\n var _this = this;\n\n if (element === void 0) {\n element = '[data-choice]';\n }\n\n if (userConfig === void 0) {\n userConfig = {};\n }\n\n /** @type {Partial<Options>} */\n this.config = cjs_default.a.all([DEFAULT_CONFIG, Choices.defaults.options, userConfig], // When merging array configs, replace with a copy of the userConfig array,\n // instead of concatenating with the default array\n {\n arrayMerge: function arrayMerge(_, sourceArray) {\n return [].concat(sourceArray);\n }\n });\n var invalidConfigOptions = diff(this.config, DEFAULT_CONFIG);\n\n if (invalidConfigOptions.length) {\n console.warn('Unknown config option(s) passed', invalidConfigOptions.join(', '));\n }\n\n var passedElement = typeof element === 'string' ? document.querySelector(element) : element;\n\n if (!(passedElement instanceof HTMLInputElement || passedElement instanceof HTMLSelectElement)) {\n throw TypeError('Expected one of the following types text|select-one|select-multiple');\n }\n\n this._isTextElement = passedElement.type === TEXT_TYPE;\n this._isSelectOneElement = passedElement.type === SELECT_ONE_TYPE;\n this._isSelectMultipleElement = passedElement.type === SELECT_MULTIPLE_TYPE;\n this._isSelectElement = this._isSelectOneElement || this._isSelectMultipleElement;\n this.config.searchEnabled = this._isSelectMultipleElement || this.config.searchEnabled;\n\n if (!['auto', 'always'].includes(this.config.renderSelectedChoices)) {\n this.config.renderSelectedChoices = 'auto';\n }\n\n if (userConfig.addItemFilter && typeof userConfig.addItemFilter !== 'function') {\n var re = userConfig.addItemFilter instanceof RegExp ? userConfig.addItemFilter : new RegExp(userConfig.addItemFilter);\n this.config.addItemFilter = re.test.bind(re);\n }\n\n if (this._isTextElement) {\n this.passedElement = new WrappedInput({\n element: passedElement,\n classNames: this.config.classNames,\n delimiter: this.config.delimiter\n });\n } else {\n this.passedElement = new WrappedSelect({\n element: passedElement,\n classNames: this.config.classNames,\n template: function template(data) {\n return _this._templates.option(data);\n }\n });\n }\n\n this.initialised = false;\n this._store = new store_Store();\n this._initialState = {};\n this._currentState = {};\n this._prevState = {};\n this._currentValue = '';\n this._canSearch = this.config.searchEnabled;\n this._isScrollingOnIe = false;\n this._highlightPosition = 0;\n this._wasTap = true;\n this._placeholderValue = this._generatePlaceholderValue();\n this._baseId = generateId(this.passedElement.element, 'choices-');\n /**\n * setting direction in cases where it's explicitly set on passedElement\n * or when calculated direction is different from the document\n * @type {HTMLElement['dir']}\n */\n\n this._direction = this.passedElement.dir;\n\n if (!this._direction) {\n var _window$getComputedSt = window.getComputedStyle(this.passedElement.element),\n elementDirection = _window$getComputedSt.direction;\n\n var _window$getComputedSt2 = window.getComputedStyle(document.documentElement),\n documentDirection = _window$getComputedSt2.direction;\n\n if (elementDirection !== documentDirection) {\n this._direction = elementDirection;\n }\n }\n\n this._idNames = {\n itemChoice: 'item-choice'\n }; // Assign preset groups from passed element\n\n this._presetGroups = this.passedElement.optionGroups; // Assign preset options from passed element\n\n this._presetOptions = this.passedElement.options; // Assign preset choices from passed object\n\n this._presetChoices = this.config.choices; // Assign preset items from passed object first\n\n this._presetItems = this.config.items; // Add any values passed from attribute\n\n if (this.passedElement.value) {\n this._presetItems = this._presetItems.concat(this.passedElement.value.split(this.config.delimiter));\n } // Create array of choices from option elements\n\n\n if (this.passedElement.options) {\n this.passedElement.options.forEach(function (o) {\n _this._presetChoices.push({\n value: o.value,\n label: o.innerHTML,\n selected: o.selected,\n disabled: o.disabled || o.parentNode.disabled,\n placeholder: o.value === '' || o.hasAttribute('placeholder'),\n customProperties: o.getAttribute('data-custom-properties')\n });\n });\n }\n\n this._render = this._render.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n this._onKeyUp = this._onKeyUp.bind(this);\n this._onKeyDown = this._onKeyDown.bind(this);\n this._onClick = this._onClick.bind(this);\n this._onTouchMove = this._onTouchMove.bind(this);\n this._onTouchEnd = this._onTouchEnd.bind(this);\n this._onMouseDown = this._onMouseDown.bind(this);\n this._onMouseOver = this._onMouseOver.bind(this);\n this._onFormReset = this._onFormReset.bind(this);\n this._onAKey = this._onAKey.bind(this);\n this._onEnterKey = this._onEnterKey.bind(this);\n this._onEscapeKey = this._onEscapeKey.bind(this);\n this._onDirectionKey = this._onDirectionKey.bind(this);\n this._onDeleteKey = this._onDeleteKey.bind(this); // If element has already been initialised with Choices, fail silently\n\n if (this.passedElement.isActive) {\n if (!this.config.silent) {\n console.warn('Trying to initialise Choices on element already initialised');\n }\n\n this.initialised = true;\n return;\n } // Let's go\n\n\n this.init();\n }\n\n var _proto = Choices.prototype;\n\n _proto.init = function init() {\n if (this.initialised) {\n return;\n }\n\n this._createTemplates();\n\n this._createElements();\n\n this._createStructure(); // Set initial state (We need to clone the state because some reducers\n // modify the inner objects properties in the state) 🤢\n\n\n this._initialState = cloneObject(this._store.state);\n\n this._store.subscribe(this._render);\n\n this._render();\n\n this._addEventListeners();\n\n var shouldDisable = !this.config.addItems || this.passedElement.element.hasAttribute('disabled');\n\n if (shouldDisable) {\n this.disable();\n }\n\n this.initialised = true;\n var callbackOnInit = this.config.callbackOnInit; // Run callback if it is a function\n\n if (callbackOnInit && typeof callbackOnInit === 'function') {\n callbackOnInit.call(this);\n }\n };\n\n _proto.destroy = function destroy() {\n if (!this.initialised) {\n return;\n }\n\n this._removeEventListeners();\n\n this.passedElement.reveal();\n this.containerOuter.unwrap(this.passedElement.element);\n this.clearStore();\n\n if (this._isSelectElement) {\n this.passedElement.options = this._presetOptions;\n }\n\n this._templates = null;\n this.initialised = false;\n };\n\n _proto.enable = function enable() {\n if (this.passedElement.isDisabled) {\n this.passedElement.enable();\n }\n\n if (this.containerOuter.isDisabled) {\n this._addEventListeners();\n\n this.input.enable();\n this.containerOuter.enable();\n }\n\n return this;\n };\n\n _proto.disable = function disable() {\n if (!this.passedElement.isDisabled) {\n this.passedElement.disable();\n }\n\n if (!this.containerOuter.isDisabled) {\n this._removeEventListeners();\n\n this.input.disable();\n this.containerOuter.disable();\n }\n\n return this;\n };\n\n _proto.highlightItem = function highlightItem(item, runEvent) {\n if (runEvent === void 0) {\n runEvent = true;\n }\n\n if (!item) {\n return this;\n }\n\n var id = item.id,\n _item$groupId = item.groupId,\n groupId = _item$groupId === void 0 ? -1 : _item$groupId,\n _item$value = item.value,\n value = _item$value === void 0 ? '' : _item$value,\n _item$label = item.label,\n label = _item$label === void 0 ? '' : _item$label;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n this._store.dispatch(items_highlightItem(id, true));\n\n if (runEvent) {\n this.passedElement.triggerEvent(EVENTS.highlightItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group && group.value ? group.value : null\n });\n }\n\n return this;\n };\n\n _proto.unhighlightItem = function unhighlightItem(item) {\n if (!item) {\n return this;\n }\n\n var id = item.id,\n _item$groupId2 = item.groupId,\n groupId = _item$groupId2 === void 0 ? -1 : _item$groupId2,\n _item$value2 = item.value,\n value = _item$value2 === void 0 ? '' : _item$value2,\n _item$label2 = item.label,\n label = _item$label2 === void 0 ? '' : _item$label2;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n this._store.dispatch(items_highlightItem(id, false));\n\n this.passedElement.triggerEvent(EVENTS.highlightItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group && group.value ? group.value : null\n });\n return this;\n };\n\n _proto.highlightAll = function highlightAll() {\n var _this2 = this;\n\n this._store.items.forEach(function (item) {\n return _this2.highlightItem(item);\n });\n\n return this;\n };\n\n _proto.unhighlightAll = function unhighlightAll() {\n var _this3 = this;\n\n this._store.items.forEach(function (item) {\n return _this3.unhighlightItem(item);\n });\n\n return this;\n };\n\n _proto.removeActiveItemsByValue = function removeActiveItemsByValue(value) {\n var _this4 = this;\n\n this._store.activeItems.filter(function (item) {\n return item.value === value;\n }).forEach(function (item) {\n return _this4._removeItem(item);\n });\n\n return this;\n };\n\n _proto.removeActiveItems = function removeActiveItems(excludedId) {\n var _this5 = this;\n\n this._store.activeItems.filter(function (_ref) {\n var id = _ref.id;\n return id !== excludedId;\n }).forEach(function (item) {\n return _this5._removeItem(item);\n });\n\n return this;\n };\n\n _proto.removeHighlightedItems = function removeHighlightedItems(runEvent) {\n var _this6 = this;\n\n if (runEvent === void 0) {\n runEvent = false;\n }\n\n this._store.highlightedActiveItems.forEach(function (item) {\n _this6._removeItem(item); // If this action was performed by the user\n // trigger the event\n\n\n if (runEvent) {\n _this6._triggerChange(item.value);\n }\n });\n\n return this;\n };\n\n _proto.showDropdown = function showDropdown(preventInputFocus) {\n var _this7 = this;\n\n if (this.dropdown.isActive) {\n return this;\n }\n\n requestAnimationFrame(function () {\n _this7.dropdown.show();\n\n _this7.containerOuter.open(_this7.dropdown.distanceFromTopWindow);\n\n if (!preventInputFocus && _this7._canSearch) {\n _this7.input.focus();\n }\n\n _this7.passedElement.triggerEvent(EVENTS.showDropdown, {});\n });\n return this;\n };\n\n _proto.hideDropdown = function hideDropdown(preventInputBlur) {\n var _this8 = this;\n\n if (!this.dropdown.isActive) {\n return this;\n }\n\n requestAnimationFrame(function () {\n _this8.dropdown.hide();\n\n _this8.containerOuter.close();\n\n if (!preventInputBlur && _this8._canSearch) {\n _this8.input.removeActiveDescendant();\n\n _this8.input.blur();\n }\n\n _this8.passedElement.triggerEvent(EVENTS.hideDropdown, {});\n });\n return this;\n };\n\n _proto.getValue = function getValue(valueOnly) {\n if (valueOnly === void 0) {\n valueOnly = false;\n }\n\n var values = this._store.activeItems.reduce(function (selectedItems, item) {\n var itemValue = valueOnly ? item.value : item;\n selectedItems.push(itemValue);\n return selectedItems;\n }, []);\n\n return this._isSelectOneElement ? values[0] : values;\n }\n /**\n * @param {string[] | import('../../types/index').Choices.Item[]} items\n */\n ;\n\n _proto.setValue = function setValue(items) {\n var _this9 = this;\n\n if (!this.initialised) {\n return this;\n }\n\n items.forEach(function (value) {\n return _this9._setChoiceOrItem(value);\n });\n return this;\n };\n\n _proto.setChoiceByValue = function setChoiceByValue(value) {\n var _this10 = this;\n\n if (!this.initialised || this._isTextElement) {\n return this;\n } // If only one value has been passed, convert to array\n\n\n var choiceValue = Array.isArray(value) ? value : [value]; // Loop through each value and\n\n choiceValue.forEach(function (val) {\n return _this10._findAndSelectChoiceByValue(val);\n });\n return this;\n }\n /**\n * Set choices of select input via an array of objects (or function that returns array of object or promise of it),\n * a value field name and a label field name.\n * This behaves the same as passing items via the choices option but can be called after initialising Choices.\n * This can also be used to add groups of choices (see example 2); Optionally pass a true `replaceChoices` value to remove any existing choices.\n * Optionally pass a `customProperties` object to add additional data to your choices (useful when searching/filtering etc).\n *\n * **Input types affected:** select-one, select-multiple\n *\n * @template {Choice[] | ((instance: Choices) => object[] | Promise<object[]>)} T\n * @param {T} [choicesArrayOrFetcher]\n * @param {string} [value = 'value'] - name of `value` field\n * @param {string} [label = 'label'] - name of 'label' field\n * @param {boolean} [replaceChoices = false] - whether to replace of add choices\n * @returns {this | Promise<this>}\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices([\n * {value: 'One', label: 'Label One', disabled: true},\n * {value: 'Two', label: 'Label Two', selected: true},\n * {value: 'Three', label: 'Label Three'},\n * ], 'value', 'label', false);\n * ```\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices(async () => {\n * try {\n * const items = await fetch('/items');\n * return items.json()\n * } catch(err) {\n * console.error(err)\n * }\n * });\n * ```\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices([{\n * label: 'Group one',\n * id: 1,\n * disabled: false,\n * choices: [\n * {value: 'Child One', label: 'Child One', selected: true},\n * {value: 'Child Two', label: 'Child Two', disabled: true},\n * {value: 'Child Three', label: 'Child Three'},\n * ]\n * },\n * {\n * label: 'Group two',\n * id: 2,\n * disabled: false,\n * choices: [\n * {value: 'Child Four', label: 'Child Four', disabled: true},\n * {value: 'Child Five', label: 'Child Five'},\n * {value: 'Child Six', label: 'Child Six', customProperties: {\n * description: 'Custom description about child six',\n * random: 'Another random custom property'\n * }},\n * ]\n * }], 'value', 'label', false);\n * ```\n */\n ;\n\n _proto.setChoices = function setChoices(choicesArrayOrFetcher, value, label, replaceChoices) {\n var _this11 = this;\n\n if (choicesArrayOrFetcher === void 0) {\n choicesArrayOrFetcher = [];\n }\n\n if (value === void 0) {\n value = 'value';\n }\n\n if (label === void 0) {\n label = 'label';\n }\n\n if (replaceChoices === void 0) {\n replaceChoices = false;\n }\n\n if (!this.initialised) {\n throw new ReferenceError(\"setChoices was called on a non-initialized instance of Choices\");\n }\n\n if (!this._isSelectElement) {\n throw new TypeError(\"setChoices can't be used with INPUT based Choices\");\n }\n\n if (typeof value !== 'string' || !value) {\n throw new TypeError(\"value parameter must be a name of 'value' field in passed objects\");\n } // Clear choices if needed\n\n\n if (replaceChoices) {\n this.clearChoices();\n }\n\n if (typeof choicesArrayOrFetcher === 'function') {\n // it's a choices fetcher function\n var fetcher = choicesArrayOrFetcher(this);\n\n if (typeof Promise === 'function' && fetcher instanceof Promise) {\n // that's a promise\n // eslint-disable-next-line compat/compat\n return new Promise(function (resolve) {\n return requestAnimationFrame(resolve);\n }).then(function () {\n return _this11._handleLoadingState(true);\n }).then(function () {\n return fetcher;\n }).then(function (data) {\n return _this11.setChoices(data, value, label, replaceChoices);\n }).catch(function (err) {\n if (!_this11.config.silent) {\n console.error(err);\n }\n }).then(function () {\n return _this11._handleLoadingState(false);\n }).then(function () {\n return _this11;\n });\n } // function returned something else than promise, let's check if it's an array of choices\n\n\n if (!Array.isArray(fetcher)) {\n throw new TypeError(\".setChoices first argument function must return either array of choices or Promise, got: \" + typeof fetcher);\n } // recursion with results, it's sync and choices were cleared already\n\n\n return this.setChoices(fetcher, value, label, false);\n }\n\n if (!Array.isArray(choicesArrayOrFetcher)) {\n throw new TypeError(\".setChoices must be called either with array of choices with a function resulting into Promise of array of choices\");\n }\n\n this.containerOuter.removeLoadingState();\n\n this._startLoading();\n\n choicesArrayOrFetcher.forEach(function (groupOrChoice) {\n if (groupOrChoice.choices) {\n _this11._addGroup({\n id: parseInt(groupOrChoice.id, 10) || null,\n group: groupOrChoice,\n valueKey: value,\n labelKey: label\n });\n } else {\n _this11._addChoice({\n value: groupOrChoice[value],\n label: groupOrChoice[label],\n isSelected: groupOrChoice.selected,\n isDisabled: groupOrChoice.disabled,\n customProperties: groupOrChoice.customProperties,\n placeholder: groupOrChoice.placeholder\n });\n }\n });\n\n this._stopLoading();\n\n return this;\n };\n\n _proto.clearChoices = function clearChoices() {\n this._store.dispatch(choices_clearChoices());\n\n return this;\n };\n\n _proto.clearStore = function clearStore() {\n this._store.dispatch(clearAll());\n\n return this;\n };\n\n _proto.clearInput = function clearInput() {\n var shouldSetInputWidth = !this._isSelectOneElement;\n this.input.clear(shouldSetInputWidth);\n\n if (!this._isTextElement && this._canSearch) {\n this._isSearching = false;\n\n this._store.dispatch(choices_activateChoices(true));\n }\n\n return this;\n };\n\n _proto._render = function _render() {\n if (this._store.isLoading()) {\n return;\n }\n\n this._currentState = this._store.state;\n var stateChanged = this._currentState.choices !== this._prevState.choices || this._currentState.groups !== this._prevState.groups || this._currentState.items !== this._prevState.items;\n var shouldRenderChoices = this._isSelectElement;\n var shouldRenderItems = this._currentState.items !== this._prevState.items;\n\n if (!stateChanged) {\n return;\n }\n\n if (shouldRenderChoices) {\n this._renderChoices();\n }\n\n if (shouldRenderItems) {\n this._renderItems();\n }\n\n this._prevState = this._currentState;\n };\n\n _proto._renderChoices = function _renderChoices() {\n var _this12 = this;\n\n var _this$_store = this._store,\n activeGroups = _this$_store.activeGroups,\n activeChoices = _this$_store.activeChoices;\n var choiceListFragment = document.createDocumentFragment();\n this.choiceList.clear();\n\n if (this.config.resetScrollPosition) {\n requestAnimationFrame(function () {\n return _this12.choiceList.scrollToTop();\n });\n } // If we have grouped options\n\n\n if (activeGroups.length >= 1 && !this._isSearching) {\n // If we have a placeholder choice along with groups\n var activePlaceholders = activeChoices.filter(function (activeChoice) {\n return activeChoice.placeholder === true && activeChoice.groupId === -1;\n });\n\n if (activePlaceholders.length >= 1) {\n choiceListFragment = this._createChoicesFragment(activePlaceholders, choiceListFragment);\n }\n\n choiceListFragment = this._createGroupsFragment(activeGroups, activeChoices, choiceListFragment);\n } else if (activeChoices.length >= 1) {\n choiceListFragment = this._createChoicesFragment(activeChoices, choiceListFragment);\n } // If we have choices to show\n\n\n if (choiceListFragment.childNodes && choiceListFragment.childNodes.length > 0) {\n var activeItems = this._store.activeItems;\n\n var canAddItem = this._canAddItem(activeItems, this.input.value); // ...and we can select them\n\n\n if (canAddItem.response) {\n // ...append them and highlight the first choice\n this.choiceList.append(choiceListFragment);\n\n this._highlightChoice();\n } else {\n // ...otherwise show a notice\n this.choiceList.append(this._getTemplate('notice', canAddItem.notice));\n }\n } else {\n // Otherwise show a notice\n var dropdownItem;\n var notice;\n\n if (this._isSearching) {\n notice = typeof this.config.noResultsText === 'function' ? this.config.noResultsText() : this.config.noResultsText;\n dropdownItem = this._getTemplate('notice', notice, 'no-results');\n } else {\n notice = typeof this.config.noChoicesText === 'function' ? this.config.noChoicesText() : this.config.noChoicesText;\n dropdownItem = this._getTemplate('notice', notice, 'no-choices');\n }\n\n this.choiceList.append(dropdownItem);\n }\n };\n\n _proto._renderItems = function _renderItems() {\n var activeItems = this._store.activeItems || [];\n this.itemList.clear(); // Create a fragment to store our list items\n // (so we don't have to update the DOM for each item)\n\n var itemListFragment = this._createItemsFragment(activeItems); // If we have items to add, append them\n\n\n if (itemListFragment.childNodes) {\n this.itemList.append(itemListFragment);\n }\n };\n\n _proto._createGroupsFragment = function _createGroupsFragment(groups, choices, fragment) {\n var _this13 = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n\n var getGroupChoices = function getGroupChoices(group) {\n return choices.filter(function (choice) {\n if (_this13._isSelectOneElement) {\n return choice.groupId === group.id;\n }\n\n return choice.groupId === group.id && (_this13.config.renderSelectedChoices === 'always' || !choice.selected);\n });\n }; // If sorting is enabled, filter groups\n\n\n if (this.config.shouldSort) {\n groups.sort(this.config.sorter);\n }\n\n groups.forEach(function (group) {\n var groupChoices = getGroupChoices(group);\n\n if (groupChoices.length >= 1) {\n var dropdownGroup = _this13._getTemplate('choiceGroup', group);\n\n fragment.appendChild(dropdownGroup);\n\n _this13._createChoicesFragment(groupChoices, fragment, true);\n }\n });\n return fragment;\n };\n\n _proto._createChoicesFragment = function _createChoicesFragment(choices, fragment, withinGroup) {\n var _this14 = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n\n if (withinGroup === void 0) {\n withinGroup = false;\n }\n\n // Create a fragment to store our list items (so we don't have to update the DOM for each item)\n var _this$config = this.config,\n renderSelectedChoices = _this$config.renderSelectedChoices,\n searchResultLimit = _this$config.searchResultLimit,\n renderChoiceLimit = _this$config.renderChoiceLimit;\n var filter = this._isSearching ? sortByScore : this.config.sorter;\n\n var appendChoice = function appendChoice(choice) {\n var shouldRender = renderSelectedChoices === 'auto' ? _this14._isSelectOneElement || !choice.selected : true;\n\n if (shouldRender) {\n var dropdownItem = _this14._getTemplate('choice', choice, _this14.config.itemSelectText);\n\n fragment.appendChild(dropdownItem);\n }\n };\n\n var rendererableChoices = choices;\n\n if (renderSelectedChoices === 'auto' && !this._isSelectOneElement) {\n rendererableChoices = choices.filter(function (choice) {\n return !choice.selected;\n });\n } // Split array into placeholders and \"normal\" choices\n\n\n var _rendererableChoices$ = rendererableChoices.reduce(function (acc, choice) {\n if (choice.placeholder) {\n acc.placeholderChoices.push(choice);\n } else {\n acc.normalChoices.push(choice);\n }\n\n return acc;\n }, {\n placeholderChoices: [],\n normalChoices: []\n }),\n placeholderChoices = _rendererableChoices$.placeholderChoices,\n normalChoices = _rendererableChoices$.normalChoices; // If sorting is enabled or the user is searching, filter choices\n\n\n if (this.config.shouldSort || this._isSearching) {\n normalChoices.sort(filter);\n }\n\n var choiceLimit = rendererableChoices.length; // Prepend placeholeder\n\n var sortedChoices = this._isSelectOneElement ? [].concat(placeholderChoices, normalChoices) : normalChoices;\n\n if (this._isSearching) {\n choiceLimit = searchResultLimit;\n } else if (renderChoiceLimit && renderChoiceLimit > 0 && !withinGroup) {\n choiceLimit = renderChoiceLimit;\n } // Add each choice to dropdown within range\n\n\n for (var i = 0; i < choiceLimit; i += 1) {\n if (sortedChoices[i]) {\n appendChoice(sortedChoices[i]);\n }\n }\n\n return fragment;\n };\n\n _proto._createItemsFragment = function _createItemsFragment(items, fragment) {\n var _this15 = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n\n // Create fragment to add elements to\n var _this$config2 = this.config,\n shouldSortItems = _this$config2.shouldSortItems,\n sorter = _this$config2.sorter,\n removeItemButton = _this$config2.removeItemButton; // If sorting is enabled, filter items\n\n if (shouldSortItems && !this._isSelectOneElement) {\n items.sort(sorter);\n }\n\n if (this._isTextElement) {\n // Update the value of the hidden input\n this.passedElement.value = items;\n } else {\n // Update the options of the hidden input\n this.passedElement.options = items;\n }\n\n var addItemToFragment = function addItemToFragment(item) {\n // Create new list element\n var listItem = _this15._getTemplate('item', item, removeItemButton); // Append it to list\n\n\n fragment.appendChild(listItem);\n }; // Add each list item to list\n\n\n items.forEach(addItemToFragment);\n return fragment;\n };\n\n _proto._triggerChange = function _triggerChange(value) {\n if (value === undefined || value === null) {\n return;\n }\n\n this.passedElement.triggerEvent(EVENTS.change, {\n value: value\n });\n };\n\n _proto._selectPlaceholderChoice = function _selectPlaceholderChoice() {\n var placeholderChoice = this._store.placeholderChoice;\n\n if (placeholderChoice) {\n this._addItem({\n value: placeholderChoice.value,\n label: placeholderChoice.label,\n choiceId: placeholderChoice.id,\n groupId: placeholderChoice.groupId,\n placeholder: placeholderChoice.placeholder\n });\n\n this._triggerChange(placeholderChoice.value);\n }\n };\n\n _proto._handleButtonAction = function _handleButtonAction(activeItems, element) {\n if (!activeItems || !element || !this.config.removeItems || !this.config.removeItemButton) {\n return;\n }\n\n var itemId = element.parentNode.getAttribute('data-id');\n var itemToRemove = activeItems.find(function (item) {\n return item.id === parseInt(itemId, 10);\n }); // Remove item associated with button\n\n this._removeItem(itemToRemove);\n\n this._triggerChange(itemToRemove.value);\n\n if (this._isSelectOneElement) {\n this._selectPlaceholderChoice();\n }\n };\n\n _proto._handleItemAction = function _handleItemAction(activeItems, element, hasShiftKey) {\n var _this16 = this;\n\n if (hasShiftKey === void 0) {\n hasShiftKey = false;\n }\n\n if (!activeItems || !element || !this.config.removeItems || this._isSelectOneElement) {\n return;\n }\n\n var passedId = element.getAttribute('data-id'); // We only want to select one item with a click\n // so we deselect any items that aren't the target\n // unless shift is being pressed\n\n activeItems.forEach(function (item) {\n if (item.id === parseInt(passedId, 10) && !item.highlighted) {\n _this16.highlightItem(item);\n } else if (!hasShiftKey && item.highlighted) {\n _this16.unhighlightItem(item);\n }\n }); // Focus input as without focus, a user cannot do anything with a\n // highlighted item\n\n this.input.focus();\n };\n\n _proto._handleChoiceAction = function _handleChoiceAction(activeItems, element) {\n if (!activeItems || !element) {\n return;\n } // If we are clicking on an option\n\n\n var id = element.dataset.id;\n\n var choice = this._store.getChoiceById(id);\n\n if (!choice) {\n return;\n }\n\n var passedKeyCode = activeItems[0] && activeItems[0].keyCode ? activeItems[0].keyCode : null;\n var hasActiveDropdown = this.dropdown.isActive; // Update choice keyCode\n\n choice.keyCode = passedKeyCode;\n this.passedElement.triggerEvent(EVENTS.choice, {\n choice: choice\n });\n\n if (!choice.selected && !choice.disabled) {\n var canAddItem = this._canAddItem(activeItems, choice.value);\n\n if (canAddItem.response) {\n this._addItem({\n value: choice.value,\n label: choice.label,\n choiceId: choice.id,\n groupId: choice.groupId,\n customProperties: choice.customProperties,\n placeholder: choice.placeholder,\n keyCode: choice.keyCode\n });\n\n this._triggerChange(choice.value);\n }\n }\n\n this.clearInput(); // We want to close the dropdown if we are dealing with a single select box\n\n if (hasActiveDropdown && this._isSelectOneElement) {\n this.hideDropdown(true);\n this.containerOuter.focus();\n }\n };\n\n _proto._handleBackspace = function _handleBackspace(activeItems) {\n if (!this.config.removeItems || !activeItems) {\n return;\n }\n\n var lastItem = activeItems[activeItems.length - 1];\n var hasHighlightedItems = activeItems.some(function (item) {\n return item.highlighted;\n }); // If editing the last item is allowed and there are not other selected items,\n // we can edit the item value. Otherwise if we can remove items, remove all selected items\n\n if (this.config.editItems && !hasHighlightedItems && lastItem) {\n this.input.value = lastItem.value;\n this.input.setWidth();\n\n this._removeItem(lastItem);\n\n this._triggerChange(lastItem.value);\n } else {\n if (!hasHighlightedItems) {\n // Highlight last item if none already highlighted\n this.highlightItem(lastItem, false);\n }\n\n this.removeHighlightedItems(true);\n }\n };\n\n _proto._startLoading = function _startLoading() {\n this._store.dispatch(setIsLoading(true));\n };\n\n _proto._stopLoading = function _stopLoading() {\n this._store.dispatch(setIsLoading(false));\n };\n\n _proto._handleLoadingState = function _handleLoadingState(setLoading) {\n if (setLoading === void 0) {\n setLoading = true;\n }\n\n var placeholderItem = this.itemList.getChild(\".\" + this.config.classNames.placeholder);\n\n if (setLoading) {\n this.disable();\n this.containerOuter.addLoadingState();\n\n if (this._isSelectOneElement) {\n if (!placeholderItem) {\n placeholderItem = this._getTemplate('placeholder', this.config.loadingText);\n this.itemList.append(placeholderItem);\n } else {\n placeholderItem.innerHTML = this.config.loadingText;\n }\n } else {\n this.input.placeholder = this.config.loadingText;\n }\n } else {\n this.enable();\n this.containerOuter.removeLoadingState();\n\n if (this._isSelectOneElement) {\n placeholderItem.innerHTML = this._placeholderValue || '';\n } else {\n this.input.placeholder = this._placeholderValue || '';\n }\n }\n };\n\n _proto._handleSearch = function _handleSearch(value) {\n if (!value || !this.input.isFocussed) {\n return;\n }\n\n var choices = this._store.choices;\n var _this$config3 = this.config,\n searchFloor = _this$config3.searchFloor,\n searchChoices = _this$config3.searchChoices;\n var hasUnactiveChoices = choices.some(function (option) {\n return !option.active;\n }); // Check that we have a value to search and the input was an alphanumeric character\n\n if (value && value.length >= searchFloor) {\n var resultCount = searchChoices ? this._searchChoices(value) : 0; // Trigger search event\n\n this.passedElement.triggerEvent(EVENTS.search, {\n value: value,\n resultCount: resultCount\n });\n } else if (hasUnactiveChoices) {\n // Otherwise reset choices to active\n this._isSearching = false;\n\n this._store.dispatch(choices_activateChoices(true));\n }\n };\n\n _proto._canAddItem = function _canAddItem(activeItems, value) {\n var canAddItem = true;\n var notice = typeof this.config.addItemText === 'function' ? this.config.addItemText(value) : this.config.addItemText;\n\n if (!this._isSelectOneElement) {\n var isDuplicateValue = existsInArray(activeItems, value);\n\n if (this.config.maxItemCount > 0 && this.config.maxItemCount <= activeItems.length) {\n // If there is a max entry limit and we have reached that limit\n // don't update\n canAddItem = false;\n notice = typeof this.config.maxItemText === 'function' ? this.config.maxItemText(this.config.maxItemCount) : this.config.maxItemText;\n }\n\n if (!this.config.duplicateItemsAllowed && isDuplicateValue && canAddItem) {\n canAddItem = false;\n notice = typeof this.config.uniqueItemText === 'function' ? this.config.uniqueItemText(value) : this.config.uniqueItemText;\n }\n\n if (this._isTextElement && this.config.addItems && canAddItem && typeof this.config.addItemFilter === 'function' && !this.config.addItemFilter(value)) {\n canAddItem = false;\n notice = typeof this.config.customAddItemText === 'function' ? this.config.customAddItemText(value) : this.config.customAddItemText;\n }\n }\n\n return {\n response: canAddItem,\n notice: notice\n };\n };\n\n _proto._searchChoices = function _searchChoices(value) {\n var newValue = typeof value === 'string' ? value.trim() : value;\n var currentValue = typeof this._currentValue === 'string' ? this._currentValue.trim() : this._currentValue;\n\n if (newValue.length < 1 && newValue === currentValue + \" \") {\n return 0;\n } // If new value matches the desired length and is not the same as the current value with a space\n\n\n var haystack = this._store.searchableChoices;\n var needle = newValue;\n var keys = [].concat(this.config.searchFields);\n var options = Object.assign(this.config.fuseOptions, {\n keys: keys\n });\n var fuse = new fuse_default.a(haystack, options);\n var results = fuse.search(needle);\n this._currentValue = newValue;\n this._highlightPosition = 0;\n this._isSearching = true;\n\n this._store.dispatch(choices_filterChoices(results));\n\n return results.length;\n };\n\n _proto._addEventListeners = function _addEventListeners() {\n var _document = document,\n documentElement = _document.documentElement; // capture events - can cancel event processing or propagation\n\n documentElement.addEventListener('touchend', this._onTouchEnd, true);\n this.containerOuter.element.addEventListener('keydown', this._onKeyDown, true);\n this.containerOuter.element.addEventListener('mousedown', this._onMouseDown, true); // passive events - doesn't call `preventDefault` or `stopPropagation`\n\n documentElement.addEventListener('click', this._onClick, {\n passive: true\n });\n documentElement.addEventListener('touchmove', this._onTouchMove, {\n passive: true\n });\n this.dropdown.element.addEventListener('mouseover', this._onMouseOver, {\n passive: true\n });\n\n if (this._isSelectOneElement) {\n this.containerOuter.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.containerOuter.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n }\n\n this.input.element.addEventListener('keyup', this._onKeyUp, {\n passive: true\n });\n this.input.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.input.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n\n if (this.input.element.form) {\n this.input.element.form.addEventListener('reset', this._onFormReset, {\n passive: true\n });\n }\n\n this.input.addEventListeners();\n };\n\n _proto._removeEventListeners = function _removeEventListeners() {\n var _document2 = document,\n documentElement = _document2.documentElement;\n documentElement.removeEventListener('touchend', this._onTouchEnd, true);\n this.containerOuter.element.removeEventListener('keydown', this._onKeyDown, true);\n this.containerOuter.element.removeEventListener('mousedown', this._onMouseDown, true);\n documentElement.removeEventListener('click', this._onClick);\n documentElement.removeEventListener('touchmove', this._onTouchMove);\n this.dropdown.element.removeEventListener('mouseover', this._onMouseOver);\n\n if (this._isSelectOneElement) {\n this.containerOuter.element.removeEventListener('focus', this._onFocus);\n this.containerOuter.element.removeEventListener('blur', this._onBlur);\n }\n\n this.input.element.removeEventListener('keyup', this._onKeyUp);\n this.input.element.removeEventListener('focus', this._onFocus);\n this.input.element.removeEventListener('blur', this._onBlur);\n\n if (this.input.element.form) {\n this.input.element.form.removeEventListener('reset', this._onFormReset);\n }\n\n this.input.removeEventListeners();\n }\n /**\n * @param {KeyboardEvent} event\n */\n ;\n\n _proto._onKeyDown = function _onKeyDown(event) {\n var _keyDownActions;\n\n var target = event.target,\n keyCode = event.keyCode,\n ctrlKey = event.ctrlKey,\n metaKey = event.metaKey;\n var activeItems = this._store.activeItems;\n var hasFocusedInput = this.input.isFocussed;\n var hasActiveDropdown = this.dropdown.isActive;\n var hasItems = this.itemList.hasChildren();\n var keyString = String.fromCharCode(keyCode);\n var BACK_KEY = KEY_CODES.BACK_KEY,\n DELETE_KEY = KEY_CODES.DELETE_KEY,\n ENTER_KEY = KEY_CODES.ENTER_KEY,\n A_KEY = KEY_CODES.A_KEY,\n ESC_KEY = KEY_CODES.ESC_KEY,\n UP_KEY = KEY_CODES.UP_KEY,\n DOWN_KEY = KEY_CODES.DOWN_KEY,\n PAGE_UP_KEY = KEY_CODES.PAGE_UP_KEY,\n PAGE_DOWN_KEY = KEY_CODES.PAGE_DOWN_KEY;\n var hasCtrlDownKeyPressed = ctrlKey || metaKey; // If a user is typing and the dropdown is not active\n\n if (!this._isTextElement && /[a-zA-Z0-9-_ ]/.test(keyString)) {\n this.showDropdown();\n } // Map keys to key actions\n\n\n var keyDownActions = (_keyDownActions = {}, _keyDownActions[A_KEY] = this._onAKey, _keyDownActions[ENTER_KEY] = this._onEnterKey, _keyDownActions[ESC_KEY] = this._onEscapeKey, _keyDownActions[UP_KEY] = this._onDirectionKey, _keyDownActions[PAGE_UP_KEY] = this._onDirectionKey, _keyDownActions[DOWN_KEY] = this._onDirectionKey, _keyDownActions[PAGE_DOWN_KEY] = this._onDirectionKey, _keyDownActions[DELETE_KEY] = this._onDeleteKey, _keyDownActions[BACK_KEY] = this._onDeleteKey, _keyDownActions); // If keycode has a function, run it\n\n if (keyDownActions[keyCode]) {\n keyDownActions[keyCode]({\n event: event,\n target: target,\n keyCode: keyCode,\n metaKey: metaKey,\n activeItems: activeItems,\n hasFocusedInput: hasFocusedInput,\n hasActiveDropdown: hasActiveDropdown,\n hasItems: hasItems,\n hasCtrlDownKeyPressed: hasCtrlDownKeyPressed\n });\n }\n };\n\n _proto._onKeyUp = function _onKeyUp(_ref2) {\n var target = _ref2.target,\n keyCode = _ref2.keyCode;\n var value = this.input.value;\n var activeItems = this._store.activeItems;\n\n var canAddItem = this._canAddItem(activeItems, value);\n\n var backKey = KEY_CODES.BACK_KEY,\n deleteKey = KEY_CODES.DELETE_KEY; // We are typing into a text input and have a value, we want to show a dropdown\n // notice. Otherwise hide the dropdown\n\n if (this._isTextElement) {\n var canShowDropdownNotice = canAddItem.notice && value;\n\n if (canShowDropdownNotice) {\n var dropdownItem = this._getTemplate('notice', canAddItem.notice);\n\n this.dropdown.element.innerHTML = dropdownItem.outerHTML;\n this.showDropdown(true);\n } else {\n this.hideDropdown(true);\n }\n } else {\n var userHasRemovedValue = (keyCode === backKey || keyCode === deleteKey) && !target.value;\n var canReactivateChoices = !this._isTextElement && this._isSearching;\n var canSearch = this._canSearch && canAddItem.response;\n\n if (userHasRemovedValue && canReactivateChoices) {\n this._isSearching = false;\n\n this._store.dispatch(choices_activateChoices(true));\n } else if (canSearch) {\n this._handleSearch(this.input.value);\n }\n }\n\n this._canSearch = this.config.searchEnabled;\n };\n\n _proto._onAKey = function _onAKey(_ref3) {\n var hasItems = _ref3.hasItems,\n hasCtrlDownKeyPressed = _ref3.hasCtrlDownKeyPressed;\n\n // If CTRL + A or CMD + A have been pressed and there are items to select\n if (hasCtrlDownKeyPressed && hasItems) {\n this._canSearch = false;\n var shouldHightlightAll = this.config.removeItems && !this.input.value && this.input.element === document.activeElement;\n\n if (shouldHightlightAll) {\n this.highlightAll();\n }\n }\n };\n\n _proto._onEnterKey = function _onEnterKey(_ref4) {\n var event = _ref4.event,\n target = _ref4.target,\n activeItems = _ref4.activeItems,\n hasActiveDropdown = _ref4.hasActiveDropdown;\n var enterKey = KEY_CODES.ENTER_KEY;\n var targetWasButton = target.hasAttribute('data-button');\n\n if (this._isTextElement && target.value) {\n var value = this.input.value;\n\n var canAddItem = this._canAddItem(activeItems, value);\n\n if (canAddItem.response) {\n this.hideDropdown(true);\n\n this._addItem({\n value: value\n });\n\n this._triggerChange(value);\n\n this.clearInput();\n }\n }\n\n if (targetWasButton) {\n this._handleButtonAction(activeItems, target);\n\n event.preventDefault();\n }\n\n if (hasActiveDropdown) {\n var highlightedChoice = this.dropdown.getChild(\".\" + this.config.classNames.highlightedState);\n\n if (highlightedChoice) {\n // add enter keyCode value\n if (activeItems[0]) {\n activeItems[0].keyCode = enterKey; // eslint-disable-line no-param-reassign\n }\n\n this._handleChoiceAction(activeItems, highlightedChoice);\n }\n\n event.preventDefault();\n } else if (this._isSelectOneElement) {\n this.showDropdown();\n event.preventDefault();\n }\n };\n\n _proto._onEscapeKey = function _onEscapeKey(_ref5) {\n var hasActiveDropdown = _ref5.hasActiveDropdown;\n\n if (hasActiveDropdown) {\n this.hideDropdown(true);\n this.containerOuter.focus();\n }\n };\n\n _proto._onDirectionKey = function _onDirectionKey(_ref6) {\n var event = _ref6.event,\n hasActiveDropdown = _ref6.hasActiveDropdown,\n keyCode = _ref6.keyCode,\n metaKey = _ref6.metaKey;\n var downKey = KEY_CODES.DOWN_KEY,\n pageUpKey = KEY_CODES.PAGE_UP_KEY,\n pageDownKey = KEY_CODES.PAGE_DOWN_KEY; // If up or down key is pressed, traverse through options\n\n if (hasActiveDropdown || this._isSelectOneElement) {\n this.showDropdown();\n this._canSearch = false;\n var directionInt = keyCode === downKey || keyCode === pageDownKey ? 1 : -1;\n var skipKey = metaKey || keyCode === pageDownKey || keyCode === pageUpKey;\n var selectableChoiceIdentifier = '[data-choice-selectable]';\n var nextEl;\n\n if (skipKey) {\n if (directionInt > 0) {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier + \":last-of-type\");\n } else {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier);\n }\n } else {\n var currentEl = this.dropdown.element.querySelector(\".\" + this.config.classNames.highlightedState);\n\n if (currentEl) {\n nextEl = getAdjacentEl(currentEl, selectableChoiceIdentifier, directionInt);\n } else {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier);\n }\n }\n\n if (nextEl) {\n // We prevent default to stop the cursor moving\n // when pressing the arrow\n if (!isScrolledIntoView(nextEl, this.choiceList.element, directionInt)) {\n this.choiceList.scrollToChildElement(nextEl, directionInt);\n }\n\n this._highlightChoice(nextEl);\n } // Prevent default to maintain cursor position whilst\n // traversing dropdown options\n\n\n event.preventDefault();\n }\n };\n\n _proto._onDeleteKey = function _onDeleteKey(_ref7) {\n var event = _ref7.event,\n target = _ref7.target,\n hasFocusedInput = _ref7.hasFocusedInput,\n activeItems = _ref7.activeItems;\n\n // If backspace or delete key is pressed and the input has no value\n if (hasFocusedInput && !target.value && !this._isSelectOneElement) {\n this._handleBackspace(activeItems);\n\n event.preventDefault();\n }\n };\n\n _proto._onTouchMove = function _onTouchMove() {\n if (this._wasTap) {\n this._wasTap = false;\n }\n };\n\n _proto._onTouchEnd = function _onTouchEnd(event) {\n var _ref8 = event || event.touches[0],\n target = _ref8.target;\n\n var touchWasWithinContainer = this._wasTap && this.containerOuter.element.contains(target);\n\n if (touchWasWithinContainer) {\n var containerWasExactTarget = target === this.containerOuter.element || target === this.containerInner.element;\n\n if (containerWasExactTarget) {\n if (this._isTextElement) {\n this.input.focus();\n } else if (this._isSelectMultipleElement) {\n this.showDropdown();\n }\n } // Prevents focus event firing\n\n\n event.stopPropagation();\n }\n\n this._wasTap = true;\n }\n /**\n * Handles mousedown event in capture mode for containetOuter.element\n * @param {MouseEvent} event\n */\n ;\n\n _proto._onMouseDown = function _onMouseDown(event) {\n var target = event.target;\n\n if (!(target instanceof HTMLElement)) {\n return;\n } // If we have our mouse down on the scrollbar and are on IE11...\n\n\n if (IS_IE11 && this.choiceList.element.contains(target)) {\n // check if click was on a scrollbar area\n var firstChoice =\n /** @type {HTMLElement} */\n this.choiceList.element.firstElementChild;\n var isOnScrollbar = this._direction === 'ltr' ? event.offsetX >= firstChoice.offsetWidth : event.offsetX < firstChoice.offsetLeft;\n this._isScrollingOnIe = isOnScrollbar;\n }\n\n if (target === this.input.element) {\n return;\n }\n\n var item = target.closest('[data-button],[data-item],[data-choice]');\n\n if (item instanceof HTMLElement) {\n var hasShiftKey = event.shiftKey;\n var activeItems = this._store.activeItems;\n var dataset = item.dataset;\n\n if ('button' in dataset) {\n this._handleButtonAction(activeItems, item);\n } else if ('item' in dataset) {\n this._handleItemAction(activeItems, item, hasShiftKey);\n } else if ('choice' in dataset) {\n this._handleChoiceAction(activeItems, item);\n }\n }\n\n event.preventDefault();\n }\n /**\n * Handles mouseover event over this.dropdown\n * @param {MouseEvent} event\n */\n ;\n\n _proto._onMouseOver = function _onMouseOver(_ref9) {\n var target = _ref9.target;\n\n if (target instanceof HTMLElement && 'choice' in target.dataset) {\n this._highlightChoice(target);\n }\n };\n\n _proto._onClick = function _onClick(_ref10) {\n var target = _ref10.target;\n var clickWasWithinContainer = this.containerOuter.element.contains(target);\n\n if (clickWasWithinContainer) {\n if (!this.dropdown.isActive && !this.containerOuter.isDisabled) {\n if (this._isTextElement) {\n if (document.activeElement !== this.input.element) {\n this.input.focus();\n }\n } else {\n this.showDropdown();\n this.containerOuter.focus();\n }\n } else if (this._isSelectOneElement && target !== this.input.element && !this.dropdown.element.contains(target)) {\n this.hideDropdown();\n }\n } else {\n var hasHighlightedItems = this._store.highlightedActiveItems.length > 0;\n\n if (hasHighlightedItems) {\n this.unhighlightAll();\n }\n\n this.containerOuter.removeFocusState();\n this.hideDropdown(true);\n }\n };\n\n _proto._onFocus = function _onFocus(_ref11) {\n var _this17 = this,\n _focusActions;\n\n var target = _ref11.target;\n var focusWasWithinContainer = this.containerOuter.element.contains(target);\n\n if (!focusWasWithinContainer) {\n return;\n }\n\n var focusActions = (_focusActions = {}, _focusActions[TEXT_TYPE] = function () {\n if (target === _this17.input.element) {\n _this17.containerOuter.addFocusState();\n }\n }, _focusActions[SELECT_ONE_TYPE] = function () {\n _this17.containerOuter.addFocusState();\n\n if (target === _this17.input.element) {\n _this17.showDropdown(true);\n }\n }, _focusActions[SELECT_MULTIPLE_TYPE] = function () {\n if (target === _this17.input.element) {\n _this17.showDropdown(true); // If element is a select box, the focused element is the container and the dropdown\n // isn't already open, focus and show dropdown\n\n\n _this17.containerOuter.addFocusState();\n }\n }, _focusActions);\n focusActions[this.passedElement.element.type]();\n };\n\n _proto._onBlur = function _onBlur(_ref12) {\n var _this18 = this;\n\n var target = _ref12.target;\n var blurWasWithinContainer = this.containerOuter.element.contains(target);\n\n if (blurWasWithinContainer && !this._isScrollingOnIe) {\n var _blurActions;\n\n var activeItems = this._store.activeItems;\n var hasHighlightedItems = activeItems.some(function (item) {\n return item.highlighted;\n });\n var blurActions = (_blurActions = {}, _blurActions[TEXT_TYPE] = function () {\n if (target === _this18.input.element) {\n _this18.containerOuter.removeFocusState();\n\n if (hasHighlightedItems) {\n _this18.unhighlightAll();\n }\n\n _this18.hideDropdown(true);\n }\n }, _blurActions[SELECT_ONE_TYPE] = function () {\n _this18.containerOuter.removeFocusState();\n\n if (target === _this18.input.element || target === _this18.containerOuter.element && !_this18._canSearch) {\n _this18.hideDropdown(true);\n }\n }, _blurActions[SELECT_MULTIPLE_TYPE] = function () {\n if (target === _this18.input.element) {\n _this18.containerOuter.removeFocusState();\n\n _this18.hideDropdown(true);\n\n if (hasHighlightedItems) {\n _this18.unhighlightAll();\n }\n }\n }, _blurActions);\n blurActions[this.passedElement.element.type]();\n } else {\n // On IE11, clicking the scollbar blurs our input and thus\n // closes the dropdown. To stop this, we refocus our input\n // if we know we are on IE *and* are scrolling.\n this._isScrollingOnIe = false;\n this.input.element.focus();\n }\n };\n\n _proto._onFormReset = function _onFormReset() {\n this._store.dispatch(resetTo(this._initialState));\n };\n\n _proto._highlightChoice = function _highlightChoice(el) {\n var _this19 = this;\n\n if (el === void 0) {\n el = null;\n }\n\n var choices = Array.from(this.dropdown.element.querySelectorAll('[data-choice-selectable]'));\n\n if (!choices.length) {\n return;\n }\n\n var passedEl = el;\n var highlightedChoices = Array.from(this.dropdown.element.querySelectorAll(\".\" + this.config.classNames.highlightedState)); // Remove any highlighted choices\n\n highlightedChoices.forEach(function (choice) {\n choice.classList.remove(_this19.config.classNames.highlightedState);\n choice.setAttribute('aria-selected', 'false');\n });\n\n if (passedEl) {\n this._highlightPosition = choices.indexOf(passedEl);\n } else {\n // Highlight choice based on last known highlight location\n if (choices.length > this._highlightPosition) {\n // If we have an option to highlight\n passedEl = choices[this._highlightPosition];\n } else {\n // Otherwise highlight the option before\n passedEl = choices[choices.length - 1];\n }\n\n if (!passedEl) {\n passedEl = choices[0];\n }\n }\n\n passedEl.classList.add(this.config.classNames.highlightedState);\n passedEl.setAttribute('aria-selected', 'true');\n this.passedElement.triggerEvent(EVENTS.highlightChoice, {\n el: passedEl\n });\n\n if (this.dropdown.isActive) {\n // IE11 ignores aria-label and blocks virtual keyboard\n // if aria-activedescendant is set without a dropdown\n this.input.setActiveDescendant(passedEl.id);\n this.containerOuter.setActiveDescendant(passedEl.id);\n }\n };\n\n _proto._addItem = function _addItem(_ref13) {\n var value = _ref13.value,\n _ref13$label = _ref13.label,\n label = _ref13$label === void 0 ? null : _ref13$label,\n _ref13$choiceId = _ref13.choiceId,\n choiceId = _ref13$choiceId === void 0 ? -1 : _ref13$choiceId,\n _ref13$groupId = _ref13.groupId,\n groupId = _ref13$groupId === void 0 ? -1 : _ref13$groupId,\n _ref13$customProperti = _ref13.customProperties,\n customProperties = _ref13$customProperti === void 0 ? null : _ref13$customProperti,\n _ref13$placeholder = _ref13.placeholder,\n placeholder = _ref13$placeholder === void 0 ? false : _ref13$placeholder,\n _ref13$keyCode = _ref13.keyCode,\n keyCode = _ref13$keyCode === void 0 ? null : _ref13$keyCode;\n var passedValue = typeof value === 'string' ? value.trim() : value;\n var passedKeyCode = keyCode;\n var passedCustomProperties = customProperties;\n var items = this._store.items;\n var passedLabel = label || passedValue;\n var passedOptionId = choiceId || -1;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n var id = items ? items.length + 1 : 1; // If a prepended value has been passed, prepend it\n\n if (this.config.prependValue) {\n passedValue = this.config.prependValue + passedValue.toString();\n } // If an appended value has been passed, append it\n\n\n if (this.config.appendValue) {\n passedValue += this.config.appendValue.toString();\n }\n\n this._store.dispatch(items_addItem({\n value: passedValue,\n label: passedLabel,\n id: id,\n choiceId: passedOptionId,\n groupId: groupId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: passedKeyCode\n }));\n\n if (this._isSelectOneElement) {\n this.removeActiveItems(id);\n } // Trigger change event\n\n\n this.passedElement.triggerEvent(EVENTS.addItem, {\n id: id,\n value: passedValue,\n label: passedLabel,\n customProperties: passedCustomProperties,\n groupValue: group && group.value ? group.value : undefined,\n keyCode: passedKeyCode\n });\n return this;\n };\n\n _proto._removeItem = function _removeItem(item) {\n if (!item || !isType('Object', item)) {\n return this;\n }\n\n var id = item.id,\n value = item.value,\n label = item.label,\n choiceId = item.choiceId,\n groupId = item.groupId;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n this._store.dispatch(items_removeItem(id, choiceId));\n\n if (group && group.value) {\n this.passedElement.triggerEvent(EVENTS.removeItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group.value\n });\n } else {\n this.passedElement.triggerEvent(EVENTS.removeItem, {\n id: id,\n value: value,\n label: label\n });\n }\n\n return this;\n };\n\n _proto._addChoice = function _addChoice(_ref14) {\n var value = _ref14.value,\n _ref14$label = _ref14.label,\n label = _ref14$label === void 0 ? null : _ref14$label,\n _ref14$isSelected = _ref14.isSelected,\n isSelected = _ref14$isSelected === void 0 ? false : _ref14$isSelected,\n _ref14$isDisabled = _ref14.isDisabled,\n isDisabled = _ref14$isDisabled === void 0 ? false : _ref14$isDisabled,\n _ref14$groupId = _ref14.groupId,\n groupId = _ref14$groupId === void 0 ? -1 : _ref14$groupId,\n _ref14$customProperti = _ref14.customProperties,\n customProperties = _ref14$customProperti === void 0 ? null : _ref14$customProperti,\n _ref14$placeholder = _ref14.placeholder,\n placeholder = _ref14$placeholder === void 0 ? false : _ref14$placeholder,\n _ref14$keyCode = _ref14.keyCode,\n keyCode = _ref14$keyCode === void 0 ? null : _ref14$keyCode;\n\n if (typeof value === 'undefined' || value === null) {\n return;\n } // Generate unique id\n\n\n var choices = this._store.choices;\n var choiceLabel = label || value;\n var choiceId = choices ? choices.length + 1 : 1;\n var choiceElementId = this._baseId + \"-\" + this._idNames.itemChoice + \"-\" + choiceId;\n\n this._store.dispatch(choices_addChoice({\n id: choiceId,\n groupId: groupId,\n elementId: choiceElementId,\n value: value,\n label: choiceLabel,\n disabled: isDisabled,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n }));\n\n if (isSelected) {\n this._addItem({\n value: value,\n label: choiceLabel,\n choiceId: choiceId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n });\n }\n };\n\n _proto._addGroup = function _addGroup(_ref15) {\n var _this20 = this;\n\n var group = _ref15.group,\n id = _ref15.id,\n _ref15$valueKey = _ref15.valueKey,\n valueKey = _ref15$valueKey === void 0 ? 'value' : _ref15$valueKey,\n _ref15$labelKey = _ref15.labelKey,\n labelKey = _ref15$labelKey === void 0 ? 'label' : _ref15$labelKey;\n var groupChoices = isType('Object', group) ? group.choices : Array.from(group.getElementsByTagName('OPTION'));\n var groupId = id || Math.floor(new Date().valueOf() * Math.random());\n var isDisabled = group.disabled ? group.disabled : false;\n\n if (groupChoices) {\n this._store.dispatch(groups_addGroup({\n value: group.label,\n id: groupId,\n active: true,\n disabled: isDisabled\n }));\n\n var addGroupChoices = function addGroupChoices(choice) {\n var isOptDisabled = choice.disabled || choice.parentNode && choice.parentNode.disabled;\n\n _this20._addChoice({\n value: choice[valueKey],\n label: isType('Object', choice) ? choice[labelKey] : choice.innerHTML,\n isSelected: choice.selected,\n isDisabled: isOptDisabled,\n groupId: groupId,\n customProperties: choice.customProperties,\n placeholder: choice.placeholder\n });\n };\n\n groupChoices.forEach(addGroupChoices);\n } else {\n this._store.dispatch(groups_addGroup({\n value: group.label,\n id: group.id,\n active: false,\n disabled: group.disabled\n }));\n }\n };\n\n _proto._getTemplate = function _getTemplate(template) {\n var _this$_templates$temp;\n\n if (!template) {\n return null;\n }\n\n var classNames = this.config.classNames;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return (_this$_templates$temp = this._templates[template]).call.apply(_this$_templates$temp, [this, classNames].concat(args));\n };\n\n _proto._createTemplates = function _createTemplates() {\n var callbackOnCreateTemplates = this.config.callbackOnCreateTemplates;\n var userTemplates = {};\n\n if (callbackOnCreateTemplates && typeof callbackOnCreateTemplates === 'function') {\n userTemplates = callbackOnCreateTemplates.call(this, strToEl);\n }\n\n this._templates = cjs_default()(TEMPLATES, userTemplates);\n };\n\n _proto._createElements = function _createElements() {\n this.containerOuter = new container_Container({\n element: this._getTemplate('containerOuter', this._direction, this._isSelectElement, this._isSelectOneElement, this.config.searchEnabled, this.passedElement.element.type),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n position: this.config.position\n });\n this.containerInner = new container_Container({\n element: this._getTemplate('containerInner'),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n position: this.config.position\n });\n this.input = new input_Input({\n element: this._getTemplate('input', this._placeholderValue),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n preventPaste: !this.config.paste\n });\n this.choiceList = new list_List({\n element: this._getTemplate('choiceList', this._isSelectOneElement)\n });\n this.itemList = new list_List({\n element: this._getTemplate('itemList', this._isSelectOneElement)\n });\n this.dropdown = new Dropdown({\n element: this._getTemplate('dropdown'),\n classNames: this.config.classNames,\n type: this.passedElement.element.type\n });\n };\n\n _proto._createStructure = function _createStructure() {\n // Hide original element\n this.passedElement.conceal(); // Wrap input in container preserving DOM ordering\n\n this.containerInner.wrap(this.passedElement.element); // Wrapper inner container with outer container\n\n this.containerOuter.wrap(this.containerInner.element);\n\n if (this._isSelectOneElement) {\n this.input.placeholder = this.config.searchPlaceholderValue || '';\n } else if (this._placeholderValue) {\n this.input.placeholder = this._placeholderValue;\n this.input.setWidth();\n }\n\n this.containerOuter.element.appendChild(this.containerInner.element);\n this.containerOuter.element.appendChild(this.dropdown.element);\n this.containerInner.element.appendChild(this.itemList.element);\n\n if (!this._isTextElement) {\n this.dropdown.element.appendChild(this.choiceList.element);\n }\n\n if (!this._isSelectOneElement) {\n this.containerInner.element.appendChild(this.input.element);\n } else if (this.config.searchEnabled) {\n this.dropdown.element.insertBefore(this.input.element, this.dropdown.element.firstChild);\n }\n\n if (this._isSelectElement) {\n this._highlightPosition = 0;\n this._isSearching = false;\n\n this._startLoading();\n\n if (this._presetGroups.length) {\n this._addPredefinedGroups(this._presetGroups);\n } else {\n this._addPredefinedChoices(this._presetChoices);\n }\n\n this._stopLoading();\n }\n\n if (this._isTextElement) {\n this._addPredefinedItems(this._presetItems);\n }\n };\n\n _proto._addPredefinedGroups = function _addPredefinedGroups(groups) {\n var _this21 = this;\n\n // If we have a placeholder option\n var placeholderChoice = this.passedElement.placeholderOption;\n\n if (placeholderChoice && placeholderChoice.parentNode.tagName === 'SELECT') {\n this._addChoice({\n value: placeholderChoice.value,\n label: placeholderChoice.innerHTML,\n isSelected: placeholderChoice.selected,\n isDisabled: placeholderChoice.disabled,\n placeholder: true\n });\n }\n\n groups.forEach(function (group) {\n return _this21._addGroup({\n group: group,\n id: group.id || null\n });\n });\n };\n\n _proto._addPredefinedChoices = function _addPredefinedChoices(choices) {\n var _this22 = this;\n\n // If sorting is enabled or the user is searching, filter choices\n if (this.config.shouldSort) {\n choices.sort(this.config.sorter);\n }\n\n var hasSelectedChoice = choices.some(function (choice) {\n return choice.selected;\n });\n var firstEnabledChoiceIndex = choices.findIndex(function (choice) {\n return choice.disabled === undefined || !choice.disabled;\n });\n choices.forEach(function (choice, index) {\n var value = choice.value,\n label = choice.label,\n customProperties = choice.customProperties,\n placeholder = choice.placeholder;\n\n if (_this22._isSelectElement) {\n // If the choice is actually a group\n if (choice.choices) {\n _this22._addGroup({\n group: choice,\n id: choice.id || null\n });\n } else {\n /**\n * If there is a selected choice already or the choice is not the first in\n * the array, add each choice normally.\n *\n * Otherwise we pre-select the first enabled choice in the array (\"select-one\" only)\n */\n var shouldPreselect = _this22._isSelectOneElement && !hasSelectedChoice && index === firstEnabledChoiceIndex;\n var isSelected = shouldPreselect ? true : choice.selected;\n var isDisabled = choice.disabled;\n\n _this22._addChoice({\n value: value,\n label: label,\n isSelected: isSelected,\n isDisabled: isDisabled,\n customProperties: customProperties,\n placeholder: placeholder\n });\n }\n } else {\n _this22._addChoice({\n value: value,\n label: label,\n isSelected: choice.selected,\n isDisabled: choice.disabled,\n customProperties: customProperties,\n placeholder: placeholder\n });\n }\n });\n }\n /**\n * @param {Item[]} items\n */\n ;\n\n _proto._addPredefinedItems = function _addPredefinedItems(items) {\n var _this23 = this;\n\n items.forEach(function (item) {\n if (typeof item === 'object' && item.value) {\n _this23._addItem({\n value: item.value,\n label: item.label,\n choiceId: item.id,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n }\n\n if (typeof item === 'string') {\n _this23._addItem({\n value: item\n });\n }\n });\n };\n\n _proto._setChoiceOrItem = function _setChoiceOrItem(item) {\n var _this24 = this;\n\n var itemType = getType(item).toLowerCase();\n var handleType = {\n object: function object() {\n if (!item.value) {\n return;\n } // If we are dealing with a select input, we need to create an option first\n // that is then selected. For text inputs we can just add items normally.\n\n\n if (!_this24._isTextElement) {\n _this24._addChoice({\n value: item.value,\n label: item.label,\n isSelected: true,\n isDisabled: false,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n } else {\n _this24._addItem({\n value: item.value,\n label: item.label,\n choiceId: item.id,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n }\n },\n string: function string() {\n if (!_this24._isTextElement) {\n _this24._addChoice({\n value: item,\n label: item,\n isSelected: true,\n isDisabled: false\n });\n } else {\n _this24._addItem({\n value: item\n });\n }\n }\n };\n handleType[itemType]();\n };\n\n _proto._findAndSelectChoiceByValue = function _findAndSelectChoiceByValue(val) {\n var _this25 = this;\n\n var choices = this._store.choices; // Check 'value' property exists and the choice isn't already selected\n\n var foundChoice = choices.find(function (choice) {\n return _this25.config.valueComparer(choice.value, val);\n });\n\n if (foundChoice && !foundChoice.selected) {\n this._addItem({\n value: foundChoice.value,\n label: foundChoice.label,\n choiceId: foundChoice.id,\n groupId: foundChoice.groupId,\n customProperties: foundChoice.customProperties,\n placeholder: foundChoice.placeholder,\n keyCode: foundChoice.keyCode\n });\n }\n };\n\n _proto._generatePlaceholderValue = function _generatePlaceholderValue() {\n if (this._isSelectElement) {\n var placeholderOption = this.passedElement.placeholderOption;\n return placeholderOption ? placeholderOption.text : false;\n }\n\n var _this$config4 = this.config,\n placeholder = _this$config4.placeholder,\n placeholderValue = _this$config4.placeholderValue;\n var dataset = this.passedElement.element.dataset;\n\n if (placeholder) {\n if (placeholderValue) {\n return placeholderValue;\n }\n\n if (dataset.placeholder) {\n return dataset.placeholder;\n }\n }\n\n return false;\n };\n\n return Choices;\n}();\n\n/* harmony default export */ var scripts_choices = __webpack_exports__[\"default\"] = (choices_Choices);\n\n/***/ })\n/******/ ])[\"default\"];\n});\n\n//# sourceURL=webpack:///./node_modules/choices.js/public/assets/scripts/choices.js?");
587
+
588
+ /***/ }),
589
+
590
+ /***/ "./node_modules/ckeditor5-build-classic-simple-upload-adapter-image-resize/build/ckeditor.js":
591
+ /*!***************************************************************************************************!*\
592
+ !*** ./node_modules/ckeditor5-build-classic-simple-upload-adapter-image-resize/build/ckeditor.js ***!
593
+ \***************************************************************************************************/
594
+ /*! no static exports found */
595
+ /***/ (function(module, exports, __webpack_require__) {
596
+
597
+ eval("/*!\n * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n!function(t){t.en=Object.assign(t.en||{},{a:\"Cannot upload file:\",b:\"Image toolbar\",c:\"Table toolbar\",d:\"Upload in progress\",e:\"Block quote\",f:\"Bold\",g:\"Choose heading\",h:\"Heading\",i:\"Italic\",j:\"image widget\",k:\"Full size image\",l:\"Side image\",m:\"Left aligned image\",n:\"Centered image\",o:\"Right aligned image\",p:\"Enter image caption\",q:\"Insert image\",r:\"Upload failed\",s:\"Increase indent\",t:\"Decrease indent\",u:\"Numbered List\",v:\"Bulleted List\",w:\"Link\",x:\"media widget\",y:\"Insert media\",z:\"The URL must not be empty.\",aa:\"This media URL is not supported.\",ab:\"Insert table\",ac:\"Header column\",ad:\"Insert column left\",ae:\"Insert column right\",af:\"Delete column\",ag:\"Column\",ah:\"Header row\",ai:\"Insert row below\",aj:\"Insert row above\",ak:\"Delete row\",al:\"Row\",am:\"Merge cell up\",an:\"Merge cell right\",ao:\"Merge cell down\",ap:\"Merge cell left\",aq:\"Split cell vertically\",ar:\"Split cell horizontally\",as:\"Merge cells\",at:\"Widget toolbar\",au:\"Change image text alternative\",av:\"Editor toolbar\",aw:\"Show more items\",ax:\"Rich Text Editor\",ay:\"Rich Text Editor, %0\",az:\"%0 of %1\",ba:\"Previous\",bb:\"Next\",bc:\"Save\",bd:\"Cancel\",be:\"Text alternative\",bf:\"Dropdown toolbar\",bg:\"Undo\",bh:\"Redo\",bi:\"Open in a new tab\",bj:\"Downloadable\",bk:\"Paste the media URL in the input.\",bl:\"Tip: Paste the URL into the content to embed faster.\",bm:\"Media URL\",bn:\"Unlink\",bo:\"Edit link\",bp:\"Open link in new tab\",bq:\"This link has no URL\",br:\"Link URL\",bs:\"Paragraph\",bt:\"Heading 1\",bu:\"Heading 2\",bv:\"Heading 3\",bw:\"Heading 4\",bx:\"Heading 5\",by:\"Heading 6\"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),function(t,e){ true?module.exports=e():undefined}(window,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,\"a\",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p=\"\",i(i.s=95)}([function(t,e,i){\"use strict\";i.d(e,\"b\",function(){return o}),i.d(e,\"a\",function(){return r});const n=\"https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html\";class o extends Error{constructor(t,e,i){t=r(t),i&&(t+=\" \"+JSON.stringify(i)),super(t),this.name=\"CKEditorError\",this.context=e,this.data=i}is(t){return\"CKEditorError\"===t}static rethrowUnexpectedError(t,e){if(t.is&&t.is(\"CKEditorError\"))throw t;throw new o(\"unexpected-error\",e,{originalError:{message:t.message,stack:t.stack,name:t.name}})}}function r(t){const e=t.match(/^([^:]+):/);return e?t+` Read more: ${n}#error-${e[1]}\\n`:t}},function(t,e,i){\"use strict\";var n={},o=function(){var t;return function(){return void 0===t&&(t=Boolean(window&&document&&document.all&&!window.atob)),t}}(),r=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}();function s(t,e){for(var i=[],n={},o=0;o<t.length;o++){var r=t[o],s=e.base?r[0]+e.base:r[0],a={css:r[1],media:r[2],sourceMap:r[3]};n[s]?n[s].parts.push(a):i.push(n[s]={id:s,parts:[a]})}return i}function a(t,e){for(var i=0;i<t.length;i++){var o=t[i],r=n[o.id],s=0;if(r){for(r.refs++;s<r.parts.length;s++)r.parts[s](o.parts[s]);for(;s<o.parts.length;s++)r.parts.push(f(o.parts[s],e))}else{for(var a=[];s<o.parts.length;s++)a.push(f(o.parts[s],e));n[o.id]={id:o.id,refs:1,parts:a}}}}function c(t){var e=document.createElement(\"style\");if(void 0===t.attributes.nonce){var n=i.nc;n&&(t.attributes.nonce=n)}if(Object.keys(t.attributes).forEach(function(i){e.setAttribute(i,t.attributes[i])}),\"function\"==typeof t.insert)t.insert(e);else{var o=r(t.insert||\"head\");if(!o)throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");o.appendChild(e)}return e}var l=function(){var t=[];return function(e,i){return t[e]=i,t.filter(Boolean).join(\"\\n\")}}();function d(t,e,i,n){var o=i?\"\":n.css;if(t.styleSheet)t.styleSheet.cssText=l(e,o);else{var r=document.createTextNode(o),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}var h=null,u=0;function f(t,e){var i,n,o;if(e.singleton){var r=u++;i=h||(h=c(e)),n=d.bind(null,i,r,!1),o=d.bind(null,i,r,!0)}else i=c(e),n=function(t,e,i){var n=i.css,o=i.media,r=i.sourceMap;if(o&&t.setAttribute(\"media\",o),r&&btoa&&(n+=\"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r)))),\" */\")),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,i,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}t.exports=function(t,e){(e=e||{}).attributes=\"object\"==typeof e.attributes?e.attributes:{},e.singleton||\"boolean\"==typeof e.singleton||(e.singleton=o());var i=s(t,e);return a(i,e),function(t){for(var o=[],r=0;r<i.length;r++){var c=i[r],l=n[c.id];l&&(l.refs--,o.push(l))}t&&a(s(t,e),e);for(var d=0;d<o.length;d++){var h=o[d];if(0===h.refs){for(var u=0;u<h.parts.length;u++)h.parts[u]();delete n[h.id]}}}}},,function(t,e,i){\"use strict\";var n=i(7),o=\"object\"==typeof self&&self&&self.Object===Object&&self,r=n.a||o||Function(\"return this\")();e.a=r},function(t,e,i){\"use strict\";(function(t){var n=i(7),o= true&&exports&&!exports.nodeType&&exports,r=o&&\"object\"==typeof t&&t&&!t.nodeType&&t,s=r&&r.exports===o&&n.a.process,a=function(){try{var t=r&&r.require&&r.require(\"util\").types;return t||s&&s.binding&&s.binding(\"util\")}catch(t){}}();e.a=a}).call(this,i(8)(t))},function(t,e,i){\"use strict\";(function(t){var n=i(3),o=i(11),r= true&&exports&&!exports.nodeType&&exports,s=r&&\"object\"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===r?n.a.Buffer:void 0,c=(a?a.isBuffer:void 0)||o.a;e.a=c}).call(this,i(8)(t))},function(t,e,i){\"use strict\";(function(t){var e=i(13),n=i(0);const o=\"object\"==typeof window?window:t;if(o.CKEDITOR_VERSION)throw new n.b(\"ckeditor-duplicated-modules: Some CKEditor 5 modules are duplicated.\",null);o.CKEDITOR_VERSION=e.a}).call(this,i(9))},function(t,e,i){\"use strict\";(function(t){var i=\"object\"==typeof t&&t&&t.Object===Object&&t;e.a=i}).call(this,i(9))},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,\"loaded\",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,\"id\",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,\"exports\",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e){var i;i=function(){return this}();try{i=i||new Function(\"return this\")()}catch(t){\"object\"==typeof window&&(i=window)}t.exports=i},function(t,e,i){var n=i(46);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e,i){\"use strict\";e.a=function(){return!1}},function(t,e,i){\"use strict\";(function(t){var n=i(3),o= true&&exports&&!exports.nodeType&&exports,r=o&&\"object\"==typeof t&&t&&!t.nodeType&&t,s=r&&r.exports===o?n.a.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var i=t.length,n=a?a(i):new t.constructor(i);return t.copy(n),n}}).call(this,i(8)(t))},function(t){t.exports=JSON.parse('{\"a\":\"15.0.0\"}')},function(t,e,i){var n=i(15);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-placeholder:before,.ck .ck-placeholder:before{content:attr(data-placeholder);pointer-events:none}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-placeholder:before,.ck .ck-placeholder:before{cursor:text;color:var(--ck-color-engine-placeholder-text)}\"},function(t,e,i){var n=i(17);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck-hidden{display:none!important}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{box-sizing:border-box;width:auto;height:auto;position:static}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999);--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#c4c4c4;--ck-color-base-action:#61b045;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#198cf0;--ck-color-base-active-focus:#0e7fe1;--ck-color-base-error:#db3700;--ck-color-focus-border:#47a4f5;--ck-color-focus-shadow:rgba(119,186,248,0.5);--ck-color-focus-disabled-shadow:rgba(119,186,248,0.3);--ck-color-focus-error-shadow:rgba(255,64,31,0.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,0.15);--ck-color-shadow-drop-active:rgba(0,0,0,0.2);--ck-color-shadow-inner:rgba(0,0,0,0.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#e6e6e6;--ck-color-button-default-active-background:#d9d9d9;--ck-color-button-default-active-shadow:#bfbfbf;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#dedede;--ck-color-button-on-hover-background:#c4c4c4;--ck-color-button-on-active-background:#bababa;--ck-color-button-on-active-shadow:#a1a1a1;--ck-color-button-on-disabled-background:#dedede;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#579e3d;--ck-color-button-action-active-background:#53973b;--ck-color-button-action-active-shadow:#498433;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#b0b0b0;--ck-color-switch-button-off-hover-background:#a3a3a3;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#579e3d;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,0.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:#c7c7c7;--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:#c7c7c7;--ck-color-input-disabled-text:#5c5c5c;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-base-active);--ck-color-list-button-on-background-focus:var(--ck-color-base-active-focus);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-foreground);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,177,255,0.1);--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;vertical-align:middle;transition:none;word-wrap:break-word}.ck.ck-reset_all,.ck.ck-reset_all *{border-collapse:collapse;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);color:var(--ck-color-text);text-align:left;white-space:nowrap;cursor:auto;float:none}.ck.ck-reset_all .ck-rtl *{text-align:right}.ck.ck-reset_all iframe{vertical-align:inherit}.ck.ck-reset_all textarea{white-space:pre-wrap}.ck.ck-reset_all input[type=password],.ck.ck-reset_all input[type=text],.ck.ck-reset_all textarea{cursor:text}.ck.ck-reset_all input[type=password][disabled],.ck.ck-reset_all input[type=text][disabled],.ck.ck-reset_all textarea[disabled]{cursor:default}.ck.ck-reset_all fieldset{padding:10px;border:2px groove #dfdee3}.ck.ck-reset_all button::-moz-focus-inner{padding:0;border:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}\"},function(t,e,i){var n=i(19);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0}.ck.ck-editor__editable_inline{overflow:auto;padding:0 var(--ck-spacing-standard);border:1px solid transparent}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}\"},function(t,e,i){var n=i(21);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}\"},function(t,e,i){var n=i(23);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{z-index:var(--ck-z-modal);position:fixed;top:0}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{top:auto;position:absolute}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{box-shadow:var(--ck-drop-shadow),0 0;border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}\"},function(t,e,i){var n=i(25);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on .ck-tooltip{display:none}.ck.ck-dropdown .ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:var(--ck-z-modal);position:absolute}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block;will-change:transform}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{transform:translate3d(0,100%,0)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}:root{--ck-dropdown-arrow-size:calc(0.5*var(--ck-icon-size))}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck.ck-dropdown__panel{box-shadow:var(--ck-drop-shadow),0 0;border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}\"},function(t,e,i){var n=i(27);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{width:var(--ck-icon-size);height:var(--ck-icon-size);font-size:.8333350694em;will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}\"},function(t,e,i){var n=i(29);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck-tooltip .ck-tooltip__text{display:inline-block}.ck-tooltip .ck-tooltip__text:after{content:\"\";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0}.ck.ck-tooltip.ck-tooltip_s{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:var(--ck-color-tooltip-background);border-right-color:transparent;border-top-color:transparent;border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:0}.ck.ck-tooltip.ck-tooltip_n{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;border-top-color:var(--ck-color-tooltip-background);border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:0;border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}.ck.ck-tooltip .ck-tooltip__text{border-radius:0}.ck-rounded-corners .ck.ck-tooltip .ck-tooltip__text,.ck.ck-tooltip .ck-tooltip__text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-tooltip .ck-tooltip__text{font-size:.9em;line-height:1.5;color:var(--ck-color-tooltip-text);padding:var(--ck-spacing-small) var(--ck-spacing-medium);background:var(--ck-color-tooltip-background);position:relative;left:-50%}.ck.ck-tooltip .ck-tooltip__text:after{border-style:solid;left:50%}.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s}'},function(t,e,i){var n=i(31);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-button,a.ck.ck-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:block}@media (hover:none){.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:none}}.ck.ck-button,a.ck.ck-button{position:relative;display:inline-flex;align-items:center;justify-content:left}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button .ck-button__label,.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button .ck-button__label,a.ck.ck-button:focus:not(:hover) .ck-tooltip{display:none}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-default-active-shadow)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{white-space:nowrap;cursor:default;vertical-align:middle;padding:var(--ck-spacing-tiny);text-align:center;min-width:var(--ck-ui-component-min-height);min-height:var(--ck-ui-component-min-height);line-height:1;font-size:inherit;border:1px solid transparent;transition:box-shadow .2s ease-in-out;-webkit-appearance:none}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;border-color:transparent}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__icon{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(-1*var(--ck-spacing-small));margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-right:calc(-1*var(--ck-spacing-small));margin-left:var(--ck-spacing-small)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-on-active-shadow)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{font-size:inherit;font-weight:inherit;color:inherit;cursor:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-action-active-shadow)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}\"},function(t,e,i){var n=i(33);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{list-style-type:none;background:var(--ck-color-list-background)}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{min-height:unset;width:100%;text-align:left;border-radius:0;border:0;padding:calc(0.2*var(--ck-line-height-base)*var(--ck-font-size-base)) calc(0.4*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(1.2*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:hover:not(ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{height:1px;width:100%;background:var(--ck-color-base-border)}\"},function(t,e,i){var n=i(35);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:1.0769230769em;--ck-switch-button-toggle-spacing:1px;--ck-switch-button-translation:1.3846153847em}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(2*var(--ck-spacing-large))}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(2*var(--ck-spacing-large))}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{transition:background .4s ease;width:var(--ck-switch-button-toggle-width);background:var(--ck-color-switch-button-off-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(0.5*var(--ck-border-radius))}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{margin:var(--ck-switch-button-toggle-spacing);width:var(--ck-switch-button-toggle-inner-size);height:var(--ck-switch-button-toggle-inner-size);background:var(--ck-color-switch-button-inner-background);transition:all .3s ease}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var(--ck-switch-button-translation))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(-1*var(--ck-switch-button-translation)))}\"},function(t,e,i){var n=i(37);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-toolbar-dropdown .ck.ck-toolbar .ck.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar-dropdown .ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}\"},function(t,e,i){var n=i(39);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}\"},function(t,e,i){var n=i(41);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row nowrap;align-items:center}.ck.ck-toolbar>.ck-toolbar__items{display:flex;flex-flow:row wrap;align-items:center;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);padding:0 var(--ck-spacing-small);border:1px solid var(--ck-color-toolbar-border)}.ck.ck-toolbar>.ck-toolbar__items>*{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{width:100%;margin:0;border-radius:0;border:0}.ck.ck-toolbar>.ck-toolbar__items>*,.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;width:1px;min-width:1px;margin-top:0;margin-bottom:0;background:var(--ck-color-toolbar-border)}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__grouped-dropdown,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{padding-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__items>:last-child,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__items>:last-child{margin-right:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_grouping>.ck-toolbar__items,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__grouped-dropdown,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{padding-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__items>*,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__items>*{margin-left:var(--ck-spacing-small);margin-right:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__items>:last-child,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__items>:last-child{margin-left:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_grouping>.ck-toolbar__items,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{margin-left:var(--ck-spacing-small)}\"},function(t,e,i){var n=i(43);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}\"},function(t,e,i){var n=i(45);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;margin-right:0;font-style:italic;border-left:5px solid #ccc}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}\"},function(t,e){t.exports=\".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}\"},function(t,e,i){var n=i(48);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-resizer-size:10px;--ck-resizer-border-width:1px;--ck-resizer-border-radius:2px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-tooltip-offset:10px;--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2}.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{visibility:visible}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);color:var(--ck-color-resizer-tooltip-text);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);font-size:var(--ck-font-size-tiny);display:block;padding:var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{top:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{top:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-width:var(--ck-widget-outline-thickness);outline-style:solid;outline-color:transparent;transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;background-color:var(--ck-color-widget-editable-focus-background)}.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child,.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{padding:4px;box-sizing:border-box;background-color:transparent;opacity:0;transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;transform:translateY(-100%);left:calc(0px - var(--ck-widget-outline-thickness))}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{width:var(--ck-widget-handler-icon-size);height:var(--ck-widget-handler-icon-size);color:var(--ck-color-widget-drag-handler-icon-color)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-focus-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-widget-hover-border)}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected .ck-widget__selection-handle,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected .ck-widget__selection-handle:hover,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover .ck-widget__selection-handle,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck-editor__editable.ck-read-only .ck-widget{--ck-widget-outline-thickness:0}\"},function(t,e,i){var n=i(50);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-labeled-input .ck-labeled-input__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-input .ck-labeled-input__status_error{color:var(--ck-color-base-error)}\"},function(t,e,i){var n=i(52);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\":root{--ck-input-text-width:18em}.ck.ck-input-text{border-radius:0}.ck-rounded-corners .ck.ck-input-text,.ck.ck-input-text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-text{box-shadow:var(--ck-inner-shadow),0 0;background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);min-width:var(--ck-input-text-width);min-height:var(--ck-ui-component-min-height);transition-property:box-shadow,border;transition:.2s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text[readonly]{border:1px solid var(--ck-color-input-disabled-border);background:var(--ck-color-input-disabled-background);color:var(--ck-color-input-disabled-text)}.ck.ck-input-text[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text.ck-error{border-color:var(--ck-color-input-error-border);animation:ck-text-input-shake .3s ease both}.ck.ck-input-text.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),var(--ck-inner-shadow)}@keyframes ck-text-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}\"},function(t,e,i){var n=i(54);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-input{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-input{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}.ck.ck-text-alternative-form{padding:var(--ck-spacing-standard)}.ck.ck-text-alternative-form:focus{outline:none}[dir=ltr] .ck.ck-text-alternative-form>:not(:first-child),[dir=rtl] .ck.ck-text-alternative-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-text-alternative-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-text-alternative-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-text-alternative-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-text-alternative-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-text-alternative-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-text-alternative-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}\"},function(t,e,i){var n=i(56);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:\"\";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{width:0;height:0;border-style:solid}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:var(--ck-balloon-arrow-height);border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:0}.ck.ck-balloon-panel[class*=arrow_n]:before{border-bottom-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-color:transparent;border-right-color:transparent;border-top-color:transparent}.ck.ck-balloon-panel[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background);margin-top:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:0;border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-top-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent}.ck.ck-balloon-panel[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background);margin-bottom:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(-1*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{left:50%;margin-left:calc(-1*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}'},function(t,e,i){var n=i(58);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck .ck-balloon-rotator__navigation{display:flex;align-items:center;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}\"},function(t,e,i){var n=i(60);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);width:100%;height:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}\"},function(t,e,i){var n=i(62);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck-content .image{display:table;clear:both;text-align:center;margin:1em auto}.ck-content .image>img{display:block;margin:0 auto;max-width:100%;min-width:50px}\"},function(t,e,i){var n=i(64);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}\"},function(t,e,i){var n=i(66);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\":root{--ck-image-style-spacing:1.5em}.ck-content .image-style-align-center,.ck-content .image-style-align-left,.ck-content .image-style-align-right,.ck-content .image-style-side{max-width:50%}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}\"},function(t,e,i){var n=i(68);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-editor__editable .image{position:relative}.ck.ck-editor__editable .image .ck-progress-bar{position:absolute;top:0;left:0}.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}\"},function(t,e,i){var n=i(70);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports='.ck-image-upload-complete-icon{display:block;position:absolute;top:10px;right:10px;border-radius:50%}.ck-image-upload-complete-icon:after{content:\"\";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20px;--ck-image-upload-icon-width:2px}.ck-image-upload-complete-icon{width:var(--ck-image-upload-icon-size);height:var(--ck-image-upload-icon-size);opacity:0;background:var(--ck-color-image-upload-icon-background);animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;animation-fill-mode:forwards,forwards;animation-duration:.5s,.5s;font-size:var(--ck-image-upload-icon-size);animation-delay:0ms,3s}.ck-image-upload-complete-icon:after{left:25%;top:50%;opacity:0;height:0;width:0;transform:scaleX(-1) rotate(135deg);transform-origin:left top;border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);animation-name:ck-upload-complete-icon-check;animation-duration:.5s;animation-delay:.5s;animation-fill-mode:forwards;box-sizing:border-box}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{opacity:1;width:0;height:0}33%{width:.3em;height:0}to{opacity:1;width:.3em;height:.45em}}'},function(t,e,i){var n=i(72);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports='.ck .ck-upload-placeholder-loader{position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0}.ck .ck-upload-placeholder-loader:before{content:\"\";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px}.ck .ck-image-upload-placeholder{width:100%;margin:0}.ck .ck-upload-placeholder-loader{width:100%;height:100%}.ck .ck-upload-placeholder-loader:before{width:var(--ck-upload-placeholder-loader-size);height:var(--ck-upload-placeholder-loader-size);border-radius:50%;border-top:3px solid var(--ck-color-upload-placeholder-loader);border-right:2px solid transparent;animation:ck-upload-placeholder-loader 1s linear infinite}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}'},function(t,e,i){var n=i(74);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}\"},function(t,e,i){var n=i(76);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-input{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form{padding:var(--ck-spacing-standard)}.ck.ck-link-form:focus{outline:none}[dir=ltr] .ck.ck-link-form>:not(:first-child),[dir=rtl] .ck.ck-link-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-link-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}.ck.ck-link-form_layout-vertical{padding:0;min-width:var(--ck-input-text-width)}.ck.ck-link-form_layout-vertical .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical .ck-button{padding:var(--ck-spacing-standard);margin:0;border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border);width:50%}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin-left:0}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}\"},function(t,e,i){var n=i(78);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions{padding:var(--ck-spacing-standard)}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{padding:0 var(--ck-spacing-medium);color:var(--ck-color-link-default);text-overflow:ellipsis;cursor:pointer;max-width:var(--ck-input-text-width);min-width:3em;text-align:center}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions:focus{outline:none}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{min-width:0;max-width:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):last-of-type{border-right:1px solid var(--ck-color-base-border)}}\"},function(t,e,i){var n=i(80);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports='.ck-media__wrapper .ck-media__placeholder{display:flex;flex-direction:column;align-items:center}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:block}@media (hover:none){.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:none}}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url:hover .ck-tooltip{visibility:visible;opacity:1}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{overflow:hidden;display:block}.ck-media__wrapper[data-oembed-url*=\"facebook.com\"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*=\"google.com/maps\"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*=\"instagram.com\"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*=\"twitter.com\"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder),.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{padding:calc(3*var(--ck-spacing-standard));background:var(--ck-color-base-foreground)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon{min-width:var(--ck-media-embed-placeholder-icon-size);height:var(--ck-media-embed-placeholder-icon-size);margin-bottom:var(--ck-spacing-large);background-position:50%;background-size:cover}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon .ck-icon{width:100%;height:100%}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{color:var(--ck-color-media-embed-placeholder-url-text);white-space:nowrap;text-align:center;font-style:italic;text-overflow:ellipsis}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text:hover{color:var(--ck-color-media-embed-placeholder-url-text-hover);cursor:pointer;text-decoration:underline}.ck-media__wrapper[data-oembed-url*=\"open.spotify.com\"]{max-width:300px;max-height:380px}.ck-media__wrapper[data-oembed-url*=\"twitter.com\"] .ck.ck-media__placeholder{background:linear-gradient(90deg,#71c6f4,#0d70a5)}.ck-media__wrapper[data-oembed-url*=\"twitter.com\"] .ck.ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIj48cGF0aCBkPSJNNDAwIDIwMGMwIDExMC41LTg5LjUgMjAwLTIwMCAyMDBTMCAzMTAuNSAwIDIwMCA4OS41IDAgMjAwIDBzMjAwIDg5LjUgMjAwIDIwMHpNMTYzLjQgMzA1LjVjODguNyAwIDEzNy4yLTczLjUgMTM3LjItMTM3LjIgMC0yLjEgMC00LjItLjEtNi4yIDkuNC02LjggMTcuNi0xNS4zIDI0LjEtMjUtOC42IDMuOC0xNy45IDYuNC0yNy43IDcuNiAxMC02IDE3LjYtMTUuNCAyMS4yLTI2LjctOS4zIDUuNS0xOS42IDkuNS0zMC42IDExLjctOC44LTkuNC0yMS4zLTE1LjItMzUuMi0xNS4yLTI2LjYgMC00OC4yIDIxLjYtNDguMiA0OC4yIDAgMy44LjQgNy41IDEuMyAxMS00MC4xLTItNzUuNi0yMS4yLTk5LjQtNTAuNC00LjEgNy4xLTYuNSAxNS40LTYuNSAyNC4yIDAgMTYuNyA4LjUgMzEuNSAyMS41IDQwLjEtNy45LS4yLTE1LjMtMi40LTIxLjgtNnYuNmMwIDIzLjQgMTYuNiA0Mi44IDM4LjcgNDcuMy00IDEuMS04LjMgMS43LTEyLjcgMS43LTMuMSAwLTYuMS0uMy05LjEtLjkgNi4xIDE5LjIgMjMuOSAzMy4xIDQ1IDMzLjUtMTYuNSAxMi45LTM3LjMgMjAuNi01OS45IDIwLjYtMy45IDAtNy43LS4yLTExLjUtLjcgMjEuMSAxMy44IDQ2LjUgMjEuOCA3My43IDIxLjgiIGZpbGw9IiNmZmYiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*=\"twitter.com\"] .ck.ck-media__placeholder .ck-media__placeholder__url__text{color:#b8e6ff}.ck-media__wrapper[data-oembed-url*=\"twitter.com\"] .ck.ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*=\"google.com/maps\"] .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMDAzLjc4IDEuNjFoNDkuNjIxYzEuNjk0IDAgMy4xOS0uNzk4IDQuMTQ2LTIuMDM3eiIgZmlsbD0iIzVjODhjNSIvPjxwYXRoIGQ9Ik0yMjYuNzQyIDIyMi45ODhjLTkuMjY2IDAtMTYuNzc3IDcuMTctMTYuNzc3IDE2LjAxNC4wMDcgMi43NjIuNjYzIDUuNDc0IDIuMDkzIDcuODc1LjQzLjcwMy44MyAxLjQwOCAxLjE5IDIuMTA3LjMzMy41MDIuNjUgMS4wMDUuOTUgMS41MDguMzQzLjQ3Ny42NzMuOTU3Ljk4OCAxLjQ0IDEuMzEgMS43NjkgMi41IDMuNTAyIDMuNjM3IDUuMTY4Ljc5MyAxLjI3NSAxLjY4MyAyLjY0IDIuNDY2IDMuOTkgMi4zNjMgNC4wOTQgNC4wMDcgOC4wOTIgNC42IDEzLjkxNHYuMDEyYy4xODIuNDEyLjUxNi42NjYuODc5LjY2Ny40MDMtLjAwMS43NjgtLjMxNC45My0uNzk5LjYwMy01Ljc1NiAyLjIzOC05LjcyOSA0LjU4NS0xMy43OTQuNzgyLTEuMzUgMS42NzMtMi43MTUgMi40NjUtMy45OSAxLjEzNy0xLjY2NiAyLjMyOC0zLjQgMy42MzgtNS4xNjkuMzE1LS40ODIuNjQ1LS45NjIuOTg4LTEuNDM5LjMtLjUwMy42MTctMS4wMDYuOTUtMS41MDguMzU5LS43Ljc2LTEuNDA0IDEuMTktMi4xMDcgMS40MjYtMi40MDIgMi01LjExNCAyLjAwNC03Ljg3NSAwLTguODQ0LTcuNTExLTE2LjAxNC0xNi43NzYtMTYuMDE0eiIgZmlsbD0iI2RkNGIzZSIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48ZWxsaXBzZSByeT0iNS41NjQiIHJ4PSI1LjgyOCIgY3k9IjIzOS4wMDIiIGN4PSIyMjYuNzQyIiBmaWxsPSIjODAyZDI3IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0xOTAuMzAxIDIzNy4yODNjLTQuNjcgMC04LjQ1NyAzLjg1My04LjQ1NyA4LjYwNnMzLjc4NiA4LjYwNyA4LjQ1NyA4LjYwN2MzLjA0MyAwIDQuODA2LS45NTggNi4zMzctMi41MTYgMS41My0xLjU1NyAyLjA4Ny0zLjkxMyAyLjA4Ny02LjI5IDAtLjM2Mi0uMDIzLS43MjItLjA2NC0xLjA3OWgtOC4yNTd2My4wNDNoNC44NWMtLjE5Ny43NTktLjUzMSAxLjQ1LTEuMDU4IDEuOTg2LS45NDIuOTU4LTIuMDI4IDEuNTQ4LTMuOTAxIDEuNTQ4LTIuODc2IDAtNS4yMDgtMi4zNzItNS4yMDgtNS4yOTkgMC0yLjkyNiAyLjMzMi01LjI5OSA1LjIwOC01LjI5OSAxLjM5OSAwIDIuNjE4LjQwNyAzLjU4NCAxLjI5M2wyLjM4MS0yLjM4YzAtLjAwMi0uMDAzLS4wMDQtLjAwNC0uMDA1LTEuNTg4LTEuNTI0LTMuNjItMi4yMTUtNS45NTUtMi4yMTV6bTQuNDMgNS42NmwuMDAzLjAwNnYtLjAwM3oiIGZpbGw9IiNmZmYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxNS4xODQgMjUxLjkyOWwtNy45OCA3Ljk3OSAyOC40NzcgMjguNDc1YTUuMjMzIDUuMjMzIDAgMDAuNDQ5LTIuMTIzdi0zMS4xNjVjLS40NjkuNjc1LS45MzQgMS4zNDktMS4zODIgMi4wMDUtLjc5MiAxLjI3NS0xLjY4MiAyLjY0LTIuNDY1IDMuOTktMi4zNDcgNC4wNjUtMy45ODIgOC4wMzgtNC41ODUgMTMuNzk0LS4xNjIuNDg1LS41MjcuNzk4LS45My43OTktLjM2My0uMDAxLS42OTctLjI1NS0uODc5LS42Njd2LS4wMTJjLS41OTMtNS44MjItMi4yMzctOS44Mi00LjYtMTMuOTE0LS43ODMtMS4zNS0xLjY3My0yLjcxNS0yLjQ2Ni0zLjk5LTEuMTM3LTEuNjY2LTIuMzI3LTMuNC0zLjYzNy01LjE2OWwtLjAwMi0uMDAzeiIgZmlsbD0iI2MzYzNjMyIvPjxwYXRoIGQ9Ik0yMTIuOTgzIDI0OC40OTVsLTM2Ljk1MiAzNi45NTN2LjgxMmE1LjIyNyA1LjIyNyAwIDAwNS4yMzggNS4yMzhoMS4wMTVsMzUuNjY2LTM1LjY2NmExMzYuMjc1IDEzNi4yNzUgMCAwMC0yLjc2NC0zLjkgMzcuNTc1IDM3LjU3NSAwIDAwLS45ODktMS40NCAzNS4xMjcgMzUuMTI3IDAgMDAtLjk1LTEuNTA4Yy0uMDgzLS4xNjItLjE3Ni0uMzI2LS4yNjQtLjQ4OXoiIGZpbGw9IiNmZGRjNGYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxMS45OTggMjYxLjA4M2wtNi4xNTIgNi4xNTEgMjQuMjY0IDI0LjI2NGguNzgxYTUuMjI3IDUuMjI3IDAgMDA1LjIzOS01LjIzOHYtMS4wNDV6IiBmaWxsPSIjZmZmIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjwvZz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*=\"facebook.com\"] .ck-media__placeholder{background:#4268b3}.ck-media__wrapper[data-oembed-url*=\"facebook.com\"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NjcuNDg0IDBINTYuNTE3QzI1LjMwNCAwIDAgMjUuMzA0IDAgNTYuNTE3djkxMC45NjZDMCA5OTguNjk0IDI1LjI5NyAxMDI0IDU2LjUyMiAxMDI0SDU0N1Y2MjhINDE0VjQ3M2gxMzNWMzU5LjAyOWMwLTEzMi4yNjIgODAuNzczLTIwNC4yODIgMTk4Ljc1Ni0yMDQuMjgyIDU2LjUxMyAwIDEwNS4wODYgNC4yMDggMTE5LjI0NCA2LjA4OVYyOTlsLTgxLjYxNi4wMzdjLTYzLjk5MyAwLTc2LjM4NCAzMC40OTItNzYuMzg0IDc1LjIzNlY0NzNoMTUzLjQ4N2wtMTkuOTg2IDE1NUg3MDd2Mzk2aDI2MC40ODRjMzEuMjEzIDAgNTYuNTE2LTI1LjMwMyA1Ni41MTYtNTYuNTE2VjU2LjUxNUMxMDI0IDI1LjMwMyA5OTguNjk3IDAgOTY3LjQ4NCAwIiBmaWxsPSIjRkZGRkZFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*=\"facebook.com\"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#cdf}.ck-media__wrapper[data-oembed-url*=\"facebook.com\"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*=\"instagram.com\"] .ck-media__placeholder{background:linear-gradient(-135deg,#1400c8,#b900b4,#f50000)}.ck-media__wrapper[data-oembed-url*=\"instagram.com\"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA0IiBoZWlnaHQ9IjUwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIC4xNTloNTAzLjg0MVY1MDMuOTRIMHoiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48cGF0aCBkPSJNMjUxLjkyMS4xNTljLTY4LjQxOCAwLTc2Ljk5Ny4yOS0xMDMuODY3IDEuNTE2LTI2LjgxNCAxLjIyMy00NS4xMjcgNS40ODItNjEuMTUxIDExLjcxLTE2LjU2NiA2LjQzNy0zMC42MTUgMTUuMDUxLTQ0LjYyMSAyOS4wNTYtMTQuMDA1IDE0LjAwNi0yMi42MTkgMjguMDU1LTI5LjA1NiA0NC42MjEtNi4yMjggMTYuMDI0LTEwLjQ4NyAzNC4zMzctMTEuNzEgNjEuMTUxQy4yOSAxNzUuMDgzIDAgMTgzLjY2MiAwIDI1Mi4wOGMwIDY4LjQxNy4yOSA3Ni45OTYgMS41MTYgMTAzLjg2NiAxLjIyMyAyNi44MTQgNS40ODIgNDUuMTI3IDExLjcxIDYxLjE1MSA2LjQzNyAxNi41NjYgMTUuMDUxIDMwLjYxNSAyOS4wNTYgNDQuNjIxIDE0LjAwNiAxNC4wMDUgMjguMDU1IDIyLjYxOSA0NC42MjEgMjkuMDU3IDE2LjAyNCA2LjIyNyAzNC4zMzcgMTAuNDg2IDYxLjE1MSAxMS43MDkgMjYuODcgMS4yMjYgMzUuNDQ5IDEuNTE2IDEwMy44NjcgMS41MTYgNjguNDE3IDAgNzYuOTk2LS4yOSAxMDMuODY2LTEuNTE2IDI2LjgxNC0xLjIyMyA0NS4xMjctNS40ODIgNjEuMTUxLTExLjcwOSAxNi41NjYtNi40MzggMzAuNjE1LTE1LjA1MiA0NC42MjEtMjkuMDU3IDE0LjAwNS0xNC4wMDYgMjIuNjE5LTI4LjA1NSAyOS4wNTctNDQuNjIxIDYuMjI3LTE2LjAyNCAxMC40ODYtMzQuMzM3IDExLjcwOS02MS4xNTEgMS4yMjYtMjYuODcgMS41MTYtMzUuNDQ5IDEuNTE2LTEwMy44NjYgMC02OC40MTgtLjI5LTc2Ljk5Ny0xLjUxNi0xMDMuODY3LTEuMjIzLTI2LjgxNC01LjQ4Mi00NS4xMjctMTEuNzA5LTYxLjE1MS02LjQzOC0xNi41NjYtMTUuMDUyLTMwLjYxNS0yOS4wNTctNDQuNjIxLTE0LjAwNi0xNC4wMDUtMjguMDU1LTIyLjYxOS00NC42MjEtMjkuMDU2LTE2LjAyNC02LjIyOC0zNC4zMzctMTAuNDg3LTYxLjE1MS0xMS43MUMzMjguOTE3LjQ0OSAzMjAuMzM4LjE1OSAyNTEuOTIxLjE1OXptMCA0NS4zOTFjNjcuMjY1IDAgNzUuMjMzLjI1NyAxMDEuNzk3IDEuNDY5IDI0LjU2MiAxLjEyIDM3LjkwMSA1LjIyNCA0Ni43NzggOC42NzQgMTEuNzU5IDQuNTcgMjAuMTUxIDEwLjAyOSAyOC45NjYgMTguODQ1IDguODE2IDguODE1IDE0LjI3NSAxNy4yMDcgMTguODQ1IDI4Ljk2NiAzLjQ1IDguODc3IDcuNTU0IDIyLjIxNiA4LjY3NCA0Ni43NzggMS4yMTIgMjYuNTY0IDEuNDY5IDM0LjUzMiAxLjQ2OSAxMDEuNzk4IDAgNjcuMjY1LS4yNTcgNzUuMjMzLTEuNDY5IDEwMS43OTctMS4xMiAyNC41NjItNS4yMjQgMzcuOTAxLTguNjc0IDQ2Ljc3OC00LjU3IDExLjc1OS0xMC4wMjkgMjAuMTUxLTE4Ljg0NSAyOC45NjYtOC44MTUgOC44MTYtMTcuMjA3IDE0LjI3NS0yOC45NjYgMTguODQ1LTguODc3IDMuNDUtMjIuMjE2IDcuNTU0LTQ2Ljc3OCA4LjY3NC0yNi41NiAxLjIxMi0zNC41MjcgMS40NjktMTAxLjc5NyAxLjQ2OS02Ny4yNzEgMC03NS4yMzctLjI1Ny0xMDEuNzk4LTEuNDY5LTI0LjU2Mi0xLjEyLTM3LjkwMS01LjIyNC00Ni43NzgtOC42NzQtMTEuNzU5LTQuNTctMjAuMTUxLTEwLjAyOS0yOC45NjYtMTguODQ1LTguODE1LTguODE1LTE0LjI3NS0xNy4yMDctMTguODQ1LTI4Ljk2Ni0zLjQ1LTguODc3LTcuNTU0LTIyLjIxNi04LjY3NC00Ni43NzgtMS4yMTItMjYuNTY0LTEuNDY5LTM0LjUzMi0xLjQ2OS0xMDEuNzk3IDAtNjcuMjY2LjI1Ny03NS4yMzQgMS40NjktMTAxLjc5OCAxLjEyLTI0LjU2MiA1LjIyNC0zNy45MDEgOC42NzQtNDYuNzc4IDQuNTctMTEuNzU5IDEwLjAyOS0yMC4xNTEgMTguODQ1LTI4Ljk2NiA4LjgxNS04LjgxNiAxNy4yMDctMTQuMjc1IDI4Ljk2Ni0xOC44NDUgOC44NzctMy40NSAyMi4yMTYtNy41NTQgNDYuNzc4LTguNjc0IDI2LjU2NC0xLjIxMiAzNC41MzItMS40NjkgMTAxLjc5OC0xLjQ2OXoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48cGF0aCBkPSJNMjUxLjkyMSAzMzYuMDUzYy00Ni4zNzggMC04My45NzQtMzcuNTk2LTgzLjk3NC04My45NzMgMC00Ni4zNzggMzcuNTk2LTgzLjk3NCA4My45NzQtODMuOTc0IDQ2LjM3NyAwIDgzLjk3MyAzNy41OTYgODMuOTczIDgzLjk3NCAwIDQ2LjM3Ny0zNy41OTYgODMuOTczLTgzLjk3MyA4My45NzN6bTAtMjEzLjMzOGMtNzEuNDQ3IDAtMTI5LjM2NSA1Ny45MTgtMTI5LjM2NSAxMjkuMzY1IDAgNzEuNDQ2IDU3LjkxOCAxMjkuMzY0IDEyOS4zNjUgMTI5LjM2NCA3MS40NDYgMCAxMjkuMzY0LTU3LjkxOCAxMjkuMzY0LTEyOS4zNjQgMC03MS40NDctNTcuOTE4LTEyOS4zNjUtMTI5LjM2NC0xMjkuMzY1ek00MTYuNjI3IDExNy42MDRjMCAxNi42OTYtMTMuNTM1IDMwLjIzLTMwLjIzMSAzMC4yMy0xNi42OTUgMC0zMC4yMy0xMy41MzQtMzAuMjMtMzAuMjMgMC0xNi42OTYgMTMuNTM1LTMwLjIzMSAzMC4yMy0zMC4yMzEgMTYuNjk2IDAgMzAuMjMxIDEzLjUzNSAzMC4yMzEgMzAuMjMxIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*=\"instagram.com\"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#ffe0fe}.ck-media__wrapper[data-oembed-url*=\"instagram.com\"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}'},function(t,e,i){var n=i(82);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck.ck-media-form{display:flex;align-items:flex-start;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-input{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{flex-wrap:wrap}.ck.ck-media-form .ck-labeled-input{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}.ck.ck-media-form{padding:var(--ck-spacing-standard)}.ck.ck-media-form:focus{outline:none}[dir=ltr] .ck.ck-media-form>:not(:first-child),[dir=rtl] .ck.ck-media-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-media-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-media-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-media-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-media-form .ck-labeled-input .ck-labeled-input__error{white-space:normal}.ck.ck-media-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-media-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-media-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-media-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-media-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}\"},function(t,e,i){var n=i(84);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck-content .media{clear:both;margin:1em 0;display:block;min-width:15em}\"},function(t,e,i){var n=i(86);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\":root{--ck-color-table-focused-cell-background:#f5fafe}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}\"},function(t,e,i){var n=i(88);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\":root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px;--ck-insert-table-dropdown-box-border-color:#bfbfbf;--ck-insert-table-dropdown-box-border-active-color:#53a0e4;--ck-insert-table-dropdown-box-active-background:#c7e5ff}.ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2);padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{width:var(--ck-insert-table-dropdown-box-width);height:var(--ck-insert-table-dropdown-box-height);margin:var(--ck-insert-table-dropdown-box-margin);border:1px solid var(--ck-insert-table-dropdown-box-border-color);border-radius:1px}.ck .ck-insert-table-dropdown-grid-box.ck-on{border-color:var(--ck-insert-table-dropdown-box-border-active-color);background:var(--ck-insert-table-dropdown-box-active-background)}\"},function(t,e,i){var n=i(90);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck-content .table{margin:1em auto;display:table}.ck-content .table table{border-collapse:collapse;border-spacing:0;border:1px double #b3b3b3}.ck-content .table table td,.ck-content .table table th{min-width:2em;padding:.4em;border-color:#d9d9d9}.ck-content .table table th{font-weight:700;background:#fafafa}\"},function(t,e,i){var n=i(92);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;position:absolute;pointer-events:none;left:0;top:0;outline:1px solid var(--ck-color-resizer)}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{position:absolute;pointer-events:all;width:var(--ck-resizer-size);height:var(--ck-resizer-size);background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{top:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{top:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nesw-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nesw-resize}\"},function(t,e,i){var n=i(94);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var o={injectType:\"singletonStyleTag\",insert:\"head\",singleton:!0};i(1)(n,o);n.locals&&(t.exports=n.locals)},function(t,e){t.exports=\".ck-content .image.image_resized{max-width:100%;display:block;box-sizing:border-box}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}\"},function(t,e,i){\"use strict\";i.r(e);var n=i(3),o=n.a.Symbol,r=Object.prototype,s=r.hasOwnProperty,a=r.toString,c=o?o.toStringTag:void 0;var l=function(t){var e=s.call(t,c),i=t[c];try{t[c]=void 0;var n=!0}catch(t){}var o=a.call(t);return n&&(e?t[c]=i:delete t[c]),o},d=Object.prototype.toString;var h=function(t){return d.call(t)},u=\"[object Null]\",f=\"[object Undefined]\",g=o?o.toStringTag:void 0;var m=function(t){return null==t?void 0===t?f:u:g&&g in Object(t)?l(t):h(t)};var p=function(t,e){return function(i){return t(e(i))}},b=p(Object.getPrototypeOf,Object);var w=function(t){return null!=t&&\"object\"==typeof t},_=\"[object Object]\",k=Function.prototype,v=Object.prototype,y=k.toString,x=v.hasOwnProperty,A=y.call(Object);var T=function(t){if(!w(t)||m(t)!=_)return!1;var e=b(t);if(null===e)return!0;var i=x.call(e,\"constructor\")&&e.constructor;return\"function\"==typeof i&&i instanceof i&&y.call(i)==A};var C=function(){this.__data__=[],this.size=0};var P=function(t,e){return t===e||t!=t&&e!=e};var S=function(t,e){for(var i=t.length;i--;)if(P(t[i][0],e))return i;return-1},M=Array.prototype.splice;var E=function(t){var e=this.__data__,i=S(e,t);return!(i<0||(i==e.length-1?e.pop():M.call(e,i,1),--this.size,0))};var I=function(t){var e=this.__data__,i=S(e,t);return i<0?void 0:e[i][1]};var N=function(t){return S(this.__data__,t)>-1};var O=function(t,e){var i=this.__data__,n=S(i,t);return n<0?(++this.size,i.push([t,e])):i[n][1]=e,this};function R(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}R.prototype.clear=C,R.prototype.delete=E,R.prototype.get=I,R.prototype.has=N,R.prototype.set=O;var D=R;var L=function(){this.__data__=new D,this.size=0};var j=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i};var V=function(t){return this.__data__.get(t)};var z=function(t){return this.__data__.has(t)};var B=function(t){var e=typeof t;return null!=t&&(\"object\"==e||\"function\"==e)},F=\"[object AsyncFunction]\",U=\"[object Function]\",H=\"[object GeneratorFunction]\",W=\"[object Proxy]\";var q=function(t){if(!B(t))return!1;var e=m(t);return e==U||e==H||e==F||e==W},Y=n.a[\"__core-js_shared__\"],$=function(){var t=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||\"\");return t?\"Symbol(src)_1.\"+t:\"\"}();var G=function(t){return!!$&&$ in t},Q=Function.prototype.toString;var K=function(t){if(null!=t){try{return Q.call(t)}catch(t){}try{return t+\"\"}catch(t){}}return\"\"},J=/^\\[object .+?Constructor\\]$/,Z=Function.prototype,X=Object.prototype,tt=Z.toString,et=X.hasOwnProperty,it=RegExp(\"^\"+tt.call(et).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");var nt=function(t){return!(!B(t)||G(t))&&(q(t)?it:J).test(K(t))};var ot=function(t,e){return null==t?void 0:t[e]};var rt=function(t,e){var i=ot(t,e);return nt(i)?i:void 0},st=rt(n.a,\"Map\"),at=rt(Object,\"create\");var ct=function(){this.__data__=at?at(null):{},this.size=0};var lt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},dt=\"__lodash_hash_undefined__\",ht=Object.prototype.hasOwnProperty;var ut=function(t){var e=this.__data__;if(at){var i=e[t];return i===dt?void 0:i}return ht.call(e,t)?e[t]:void 0},ft=Object.prototype.hasOwnProperty;var gt=function(t){var e=this.__data__;return at?void 0!==e[t]:ft.call(e,t)},mt=\"__lodash_hash_undefined__\";var pt=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=at&&void 0===e?mt:e,this};function bt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}bt.prototype.clear=ct,bt.prototype.delete=lt,bt.prototype.get=ut,bt.prototype.has=gt,bt.prototype.set=pt;var wt=bt;var _t=function(){this.size=0,this.__data__={hash:new wt,map:new(st||D),string:new wt}};var kt=function(t){var e=typeof t;return\"string\"==e||\"number\"==e||\"symbol\"==e||\"boolean\"==e?\"__proto__\"!==t:null===t};var vt=function(t,e){var i=t.__data__;return kt(e)?i[\"string\"==typeof e?\"string\":\"hash\"]:i.map};var yt=function(t){var e=vt(this,t).delete(t);return this.size-=e?1:0,e};var xt=function(t){return vt(this,t).get(t)};var At=function(t){return vt(this,t).has(t)};var Tt=function(t,e){var i=vt(this,t),n=i.size;return i.set(t,e),this.size+=i.size==n?0:1,this};function Ct(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}Ct.prototype.clear=_t,Ct.prototype.delete=yt,Ct.prototype.get=xt,Ct.prototype.has=At,Ct.prototype.set=Tt;var Pt=Ct,St=200;var Mt=function(t,e){var i=this.__data__;if(i instanceof D){var n=i.__data__;if(!st||n.length<St-1)return n.push([t,e]),this.size=++i.size,this;i=this.__data__=new Pt(n)}return i.set(t,e),this.size=i.size,this};function Et(t){var e=this.__data__=new D(t);this.size=e.size}Et.prototype.clear=L,Et.prototype.delete=j,Et.prototype.get=V,Et.prototype.has=z,Et.prototype.set=Mt;var It=Et;var Nt=function(t,e){for(var i=-1,n=null==t?0:t.length;++i<n&&!1!==e(t[i],i,t););return t},Ot=function(){try{var t=rt(Object,\"defineProperty\");return t({},\"\",{}),t}catch(t){}}();var Rt=function(t,e,i){\"__proto__\"==e&&Ot?Ot(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i},Dt=Object.prototype.hasOwnProperty;var Lt=function(t,e,i){var n=t[e];Dt.call(t,e)&&P(n,i)&&(void 0!==i||e in t)||Rt(t,e,i)};var jt=function(t,e,i,n){var o=!i;i||(i={});for(var r=-1,s=e.length;++r<s;){var a=e[r],c=n?n(i[a],t[a],a,i,t):void 0;void 0===c&&(c=t[a]),o?Rt(i,a,c):Lt(i,a,c)}return i};var Vt=function(t,e){for(var i=-1,n=Array(t);++i<t;)n[i]=e(i);return n},zt=\"[object Arguments]\";var Bt=function(t){return w(t)&&m(t)==zt},Ft=Object.prototype,Ut=Ft.hasOwnProperty,Ht=Ft.propertyIsEnumerable,Wt=Bt(function(){return arguments}())?Bt:function(t){return w(t)&&Ut.call(t,\"callee\")&&!Ht.call(t,\"callee\")},qt=Array.isArray,Yt=i(5),$t=9007199254740991,Gt=/^(?:0|[1-9]\\d*)$/;var Qt=function(t,e){var i=typeof t;return!!(e=null==e?$t:e)&&(\"number\"==i||\"symbol\"!=i&&Gt.test(t))&&t>-1&&t%1==0&&t<e},Kt=9007199254740991;var Jt=function(t){return\"number\"==typeof t&&t>-1&&t%1==0&&t<=Kt},Zt={};Zt[\"[object Float32Array]\"]=Zt[\"[object Float64Array]\"]=Zt[\"[object Int8Array]\"]=Zt[\"[object Int16Array]\"]=Zt[\"[object Int32Array]\"]=Zt[\"[object Uint8Array]\"]=Zt[\"[object Uint8ClampedArray]\"]=Zt[\"[object Uint16Array]\"]=Zt[\"[object Uint32Array]\"]=!0,Zt[\"[object Arguments]\"]=Zt[\"[object Array]\"]=Zt[\"[object ArrayBuffer]\"]=Zt[\"[object Boolean]\"]=Zt[\"[object DataView]\"]=Zt[\"[object Date]\"]=Zt[\"[object Error]\"]=Zt[\"[object Function]\"]=Zt[\"[object Map]\"]=Zt[\"[object Number]\"]=Zt[\"[object Object]\"]=Zt[\"[object RegExp]\"]=Zt[\"[object Set]\"]=Zt[\"[object String]\"]=Zt[\"[object WeakMap]\"]=!1;var Xt=function(t){return w(t)&&Jt(t.length)&&!!Zt[m(t)]};var te=function(t){return function(e){return t(e)}},ee=i(4),ie=ee.a&&ee.a.isTypedArray,ne=ie?te(ie):Xt,oe=Object.prototype.hasOwnProperty;var re=function(t,e){var i=qt(t),n=!i&&Wt(t),o=!i&&!n&&Object(Yt.a)(t),r=!i&&!n&&!o&&ne(t),s=i||n||o||r,a=s?Vt(t.length,String):[],c=a.length;for(var l in t)!e&&!oe.call(t,l)||s&&(\"length\"==l||o&&(\"offset\"==l||\"parent\"==l)||r&&(\"buffer\"==l||\"byteLength\"==l||\"byteOffset\"==l)||Qt(l,c))||a.push(l);return a},se=Object.prototype;var ae=function(t){var e=t&&t.constructor;return t===(\"function\"==typeof e&&e.prototype||se)},ce=p(Object.keys,Object),le=Object.prototype.hasOwnProperty;var de=function(t){if(!ae(t))return ce(t);var e=[];for(var i in Object(t))le.call(t,i)&&\"constructor\"!=i&&e.push(i);return e};var he=function(t){return null!=t&&Jt(t.length)&&!q(t)};var ue=function(t){return he(t)?re(t):de(t)};var fe=function(t,e){return t&&jt(e,ue(e),t)};var ge=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e},me=Object.prototype.hasOwnProperty;var pe=function(t){if(!B(t))return ge(t);var e=ae(t),i=[];for(var n in t)(\"constructor\"!=n||!e&&me.call(t,n))&&i.push(n);return i};var be=function(t){return he(t)?re(t,!0):pe(t)};var we=function(t,e){return t&&jt(e,be(e),t)},_e=i(12);var ke=function(t,e){var i=-1,n=t.length;for(e||(e=Array(n));++i<n;)e[i]=t[i];return e};var ve=function(t,e){for(var i=-1,n=null==t?0:t.length,o=0,r=[];++i<n;){var s=t[i];e(s,i,t)&&(r[o++]=s)}return r};var ye=function(){return[]},xe=Object.prototype.propertyIsEnumerable,Ae=Object.getOwnPropertySymbols,Te=Ae?function(t){return null==t?[]:(t=Object(t),ve(Ae(t),function(e){return xe.call(t,e)}))}:ye;var Ce=function(t,e){return jt(t,Te(t),e)};var Pe=function(t,e){for(var i=-1,n=e.length,o=t.length;++i<n;)t[o+i]=e[i];return t},Se=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Pe(e,Te(t)),t=b(t);return e}:ye;var Me=function(t,e){return jt(t,Se(t),e)};var Ee=function(t,e,i){var n=e(t);return qt(t)?n:Pe(n,i(t))};var Ie=function(t){return Ee(t,ue,Te)};var Ne=function(t){return Ee(t,be,Se)},Oe=rt(n.a,\"DataView\"),Re=rt(n.a,\"Promise\"),De=rt(n.a,\"Set\"),Le=rt(n.a,\"WeakMap\"),je=K(Oe),Ve=K(st),ze=K(Re),Be=K(De),Fe=K(Le),Ue=m;(Oe&&\"[object DataView]\"!=Ue(new Oe(new ArrayBuffer(1)))||st&&\"[object Map]\"!=Ue(new st)||Re&&\"[object Promise]\"!=Ue(Re.resolve())||De&&\"[object Set]\"!=Ue(new De)||Le&&\"[object WeakMap]\"!=Ue(new Le))&&(Ue=function(t){var e=m(t),i=\"[object Object]\"==e?t.constructor:void 0,n=i?K(i):\"\";if(n)switch(n){case je:return\"[object DataView]\";case Ve:return\"[object Map]\";case ze:return\"[object Promise]\";case Be:return\"[object Set]\";case Fe:return\"[object WeakMap]\"}return e});var He=Ue,We=Object.prototype.hasOwnProperty;var qe=function(t){var e=t.length,i=new t.constructor(e);return e&&\"string\"==typeof t[0]&&We.call(t,\"index\")&&(i.index=t.index,i.input=t.input),i},Ye=n.a.Uint8Array;var $e=function(t){var e=new t.constructor(t.byteLength);return new Ye(e).set(new Ye(t)),e};var Ge=function(t,e){var i=e?$e(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)},Qe=/\\w*$/;var Ke=function(t){var e=new t.constructor(t.source,Qe.exec(t));return e.lastIndex=t.lastIndex,e},Je=o?o.prototype:void 0,Ze=Je?Je.valueOf:void 0;var Xe=function(t){return Ze?Object(Ze.call(t)):{}};var ti=function(t,e){var i=e?$e(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)},ei=\"[object Boolean]\",ii=\"[object Date]\",ni=\"[object Map]\",oi=\"[object Number]\",ri=\"[object RegExp]\",si=\"[object Set]\",ai=\"[object String]\",ci=\"[object Symbol]\",li=\"[object ArrayBuffer]\",di=\"[object DataView]\",hi=\"[object Float32Array]\",ui=\"[object Float64Array]\",fi=\"[object Int8Array]\",gi=\"[object Int16Array]\",mi=\"[object Int32Array]\",pi=\"[object Uint8Array]\",bi=\"[object Uint8ClampedArray]\",wi=\"[object Uint16Array]\",_i=\"[object Uint32Array]\";var ki=function(t,e,i){var n=t.constructor;switch(e){case li:return $e(t);case ei:case ii:return new n(+t);case di:return Ge(t,i);case hi:case ui:case fi:case gi:case mi:case pi:case bi:case wi:case _i:return ti(t,i);case ni:return new n;case oi:case ai:return new n(t);case ri:return Ke(t);case si:return new n;case ci:return Xe(t)}},vi=Object.create,yi=function(){function t(){}return function(e){if(!B(e))return{};if(vi)return vi(e);t.prototype=e;var i=new t;return t.prototype=void 0,i}}();var xi=function(t){return\"function\"!=typeof t.constructor||ae(t)?{}:yi(b(t))},Ai=\"[object Map]\";var Ti=function(t){return w(t)&&He(t)==Ai},Ci=ee.a&&ee.a.isMap,Pi=Ci?te(Ci):Ti,Si=\"[object Set]\";var Mi=function(t){return w(t)&&He(t)==Si},Ei=ee.a&&ee.a.isSet,Ii=Ei?te(Ei):Mi,Ni=1,Oi=2,Ri=4,Di=\"[object Arguments]\",Li=\"[object Function]\",ji=\"[object GeneratorFunction]\",Vi=\"[object Object]\",zi={};zi[Di]=zi[\"[object Array]\"]=zi[\"[object ArrayBuffer]\"]=zi[\"[object DataView]\"]=zi[\"[object Boolean]\"]=zi[\"[object Date]\"]=zi[\"[object Float32Array]\"]=zi[\"[object Float64Array]\"]=zi[\"[object Int8Array]\"]=zi[\"[object Int16Array]\"]=zi[\"[object Int32Array]\"]=zi[\"[object Map]\"]=zi[\"[object Number]\"]=zi[Vi]=zi[\"[object RegExp]\"]=zi[\"[object Set]\"]=zi[\"[object String]\"]=zi[\"[object Symbol]\"]=zi[\"[object Uint8Array]\"]=zi[\"[object Uint8ClampedArray]\"]=zi[\"[object Uint16Array]\"]=zi[\"[object Uint32Array]\"]=!0,zi[\"[object Error]\"]=zi[Li]=zi[\"[object WeakMap]\"]=!1;var Bi=function t(e,i,n,o,r,s){var a,c=i&Ni,l=i&Oi,d=i&Ri;if(n&&(a=r?n(e,o,r,s):n(e)),void 0!==a)return a;if(!B(e))return e;var h=qt(e);if(h){if(a=qe(e),!c)return ke(e,a)}else{var u=He(e),f=u==Li||u==ji;if(Object(Yt.a)(e))return Object(_e.a)(e,c);if(u==Vi||u==Di||f&&!r){if(a=l||f?{}:xi(e),!c)return l?Me(e,we(a,e)):Ce(e,fe(a,e))}else{if(!zi[u])return r?e:{};a=ki(e,u,c)}}s||(s=new It);var g=s.get(e);if(g)return g;s.set(e,a),Ii(e)?e.forEach(function(o){a.add(t(o,i,n,o,e,s))}):Pi(e)&&e.forEach(function(o,r){a.set(r,t(o,i,n,r,e,s))});var m=d?l?Ne:Ie:l?keysIn:ue,p=h?void 0:m(e);return Nt(p||e,function(o,r){p&&(o=e[r=o]),Lt(a,r,t(o,i,n,r,e,s))}),a},Fi=1,Ui=4;var Hi=function(t,e){return Bi(t,Fi|Ui,e=\"function\"==typeof e?e:void 0)};var Wi=function(t){return w(t)&&1===t.nodeType&&!T(t)};class qi{constructor(t,e){this._config={},e&&this.define(e),t&&this._setObjectToTarget(this._config,t)}set(t,e){this._setToTarget(this._config,t,e)}define(t,e){this._setToTarget(this._config,t,e,!0)}get(t){return this._getFromSource(this._config,t)}_setToTarget(t,e,i,n=!1){if(T(e))return void this._setObjectToTarget(t,e,n);const o=e.split(\".\");e=o.pop();for(const e of o)T(t[e])||(t[e]={}),t=t[e];if(T(i))return T(t[e])||(t[e]={}),t=t[e],void this._setObjectToTarget(t,i,n);n&&void 0!==t[e]||(t[e]=i)}_getFromSource(t,e){const i=e.split(\".\");e=i.pop();for(const e of i){if(!T(t[e])){t=null;break}t=t[e]}return t?function(t){return Hi(t,Yi)}(t[e]):void 0}_setObjectToTarget(t,e,i){Object.keys(e).forEach(n=>{this._setToTarget(t,n,e[n],i)})}}function Yi(t){return Wi(t)?t:void 0}var $i=i(0);var Gi=function(){return function t(){t.called=!0}};class Qi{constructor(t,e){this.source=t,this.name=e,this.path=[],this.stop=Gi(),this.off=Gi()}}function Ki(){let t=\"e\";for(let e=0;e<8;e++)t+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return t}var Ji={get(t){return\"number\"!=typeof t?this[t]||this.normal:t},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};i(6);const Zi=Symbol(\"listeningTo\"),Xi=Symbol(\"emitterId\");var tn={on(t,e,i={}){this.listenTo(this,t,e,i)},once(t,e,i){let n=!1;this.listenTo(this,t,function(t,...i){n||(n=!0,t.off(),e.call(this,t,...i))},i)},off(t,e){this.stopListening(this,t,e)},listenTo(t,e,i,n={}){let o,r;this[Zi]||(this[Zi]={});const s=this[Zi];nn(t)||en(t);const a=nn(t);(o=s[a])||(o=s[a]={emitter:t,callbacks:{}}),(r=o.callbacks[e])||(r=o.callbacks[e]=[]),r.push(i),function(t,e){const i=on(t);if(i[e])return;let n=e,o=null;const r=[];for(;\"\"!==n&&!i[n];)i[n]={callbacks:[],childEvents:[]},r.push(i[n]),o&&i[n].childEvents.push(o),o=n,n=n.substr(0,n.lastIndexOf(\":\"));if(\"\"!==n){for(const t of r)t.callbacks=i[n].callbacks.slice();i[n].childEvents.push(o)}}(t,e);const c=rn(t,e),l=Ji.get(n.priority),d={callback:i,priority:l};for(const t of c){let e=!1;for(let i=0;i<t.length;i++)if(t[i].priority<l){t.splice(i,0,d),e=!0;break}e||t.push(d)}},stopListening(t,e,i){const n=this[Zi];let o=t&&nn(t);const r=n&&o&&n[o],s=r&&e&&r.callbacks[e];if(!(!n||t&&!r||e&&!s))if(i)an(t,e,i);else if(s){for(;i=s.pop();)an(t,e,i);delete r.callbacks[e]}else if(r){for(e in r.callbacks)this.stopListening(t,e);delete n[o]}else{for(o in n)this.stopListening(n[o].emitter);delete this[Zi]}},fire(t,...e){try{const i=t instanceof Qi?t:new Qi(this,t),n=i.name;let o=function t(e,i){let n;if(!e._events||!(n=e._events[i])||!n.callbacks.length)return i.indexOf(\":\")>-1?t(e,i.substr(0,i.lastIndexOf(\":\"))):null;return n.callbacks}(this,n);if(i.path.push(this),o){const t=[i,...e];o=Array.from(o);for(let e=0;e<o.length&&(o[e].callback.apply(this,t),i.off.called&&(delete i.off.called,an(this,n,o[e].callback)),!i.stop.called);e++);}if(this._delegations){const t=this._delegations.get(n),o=this._delegations.get(\"*\");t&&sn(t,i,e),o&&sn(o,i,e)}return i.return}catch(t){$i.b.rethrowUnexpectedError(t,this)}},delegate(...t){return{to:(e,i)=>{this._delegations||(this._delegations=new Map),t.forEach(t=>{const n=this._delegations.get(t);n?n.set(e,i):this._delegations.set(t,new Map([[e,i]]))})}}},stopDelegating(t,e){if(this._delegations)if(t)if(e){const i=this._delegations.get(t);i&&i.delete(e)}else this._delegations.delete(t);else this._delegations.clear()}};function en(t,e){t[Xi]||(t[Xi]=e||Ki())}function nn(t){return t[Xi]}function on(t){return t._events||Object.defineProperty(t,\"_events\",{value:{}}),t._events}function rn(t,e){const i=on(t)[e];if(!i)return[];let n=[i.callbacks];for(let e=0;e<i.childEvents.length;e++){const o=rn(t,i.childEvents[e]);n=n.concat(o)}return n}function sn(t,e,i){for(let[n,o]of t){o?\"function\"==typeof o&&(o=o(e.name)):o=e.name;const t=new Qi(e.source,o);t.path=[...e.path],n.fire(t,...i)}}function an(t,e,i){const n=rn(t,e);for(const t of n)for(let e=0;e<t.length;e++)t[e].callback==i&&(t.splice(e,1),e--)}function cn(t,...e){e.forEach(e=>{Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)).forEach(i=>{if(i in t.prototype)return;const n=Object.getOwnPropertyDescriptor(e,i);n.enumerable=!1,Object.defineProperty(t.prototype,i,n)})})}function ln(t,e){const i=Math.min(t.length,e.length);for(let n=0;n<i;n++)if(t[n]!=e[n])return n;return t.length==e.length?\"same\":t.length<e.length?\"prefix\":\"extension\"}var dn=4;var hn=function(t){return Bi(t,dn)};class un{constructor(){this.parent=null}get index(){let t;if(!this.parent)return null;if(-1==(t=this.parent.getChildIndex(this)))throw new $i.b(\"view-node-not-found-in-parent: The node's parent does not contain this node.\",this);return t}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}get document(){return this.parent instanceof un?this.parent.document:null}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.index),e=e.parent;return t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let i=t.includeSelf?this:this.parent;for(;i;)e[t.parentFirst?\"push\":\"unshift\"](i),i=i.parent;return e}getCommonAncestor(t,e={}){const i=this.getAncestors(e),n=t.getAncestors(e);let o=0;for(;i[o]==n[o]&&i[o];)o++;return 0===o?null:i[o-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),i=t.getPath(),n=ln(e,i);switch(n){case\"prefix\":return!0;case\"extension\":return!1;default:return e[n]<i[n]}}isAfter(t){return this!=t&&(this.root===t.root&&!this.isBefore(t))}_remove(){this.parent._removeChildren(this.index)}_fireChange(t,e){this.fire(\"change:\"+t,e),this.parent&&this.parent._fireChange(t,e)}toJSON(){const t=hn(this);return delete t.parent,t}is(t){return\"node\"==t||\"view:node\"==t}}cn(un,tn);class fn extends un{constructor(t){super(),this._textData=t}is(t){return\"text\"==t||\"view:text\"==t||super.is(t)}get data(){return this._textData}get _data(){return this.data}set _data(t){this._fireChange(\"text\",this),this._textData=t}isSimilar(t){return t instanceof fn&&(this===t||this.data===t.data)}_clone(){return new fn(this.data)}}class gn{constructor(t,e,i){if(this.textNode=t,e<0||e>t.data.length)throw new $i.b(\"view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.\",this);if(i<0||e+i>t.data.length)throw new $i.b(\"view-textproxy-wrong-length: Given length value is incorrect.\",this);this.data=t.data.substring(e,e+i),this.offsetInText=e}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(t){return\"textProxy\"==t||\"view:textProxy\"==t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let i=t.includeSelf?this.textNode:this.parent;for(;null!==i;)e[t.parentFirst?\"push\":\"unshift\"](i),i=i.parent;return e}}function mn(t){const e=new Map;for(const i in t)e.set(i,t[i]);return e}function pn(t){return!(!t||!t[Symbol.iterator])}class bn{constructor(...t){this._patterns=[],this.add(...t)}add(...t){for(let e of t)(\"string\"==typeof e||e instanceof RegExp)&&(e={name:e}),e.classes&&(\"string\"==typeof e.classes||e.classes instanceof RegExp)&&(e.classes=[e.classes]),this._patterns.push(e)}match(...t){for(const e of t)for(const t of this._patterns){const i=wn(e,t);if(i)return{element:e,pattern:t,match:i}}return null}matchAll(...t){const e=[];for(const i of t)for(const t of this._patterns){const n=wn(i,t);n&&e.push({element:i,pattern:t,match:n})}return e.length>0?e:null}getElementName(){if(1!==this._patterns.length)return null;const t=this._patterns[0],e=t.name;return\"function\"==typeof t||!e||e instanceof RegExp?null:e}}function wn(t,e){if(\"function\"==typeof e)return e(t);const i={};return e.name&&(i.name=function(t,e){if(t instanceof RegExp)return t.test(e);return t===e}(e.name,t.name),!i.name)?null:e.attributes&&(i.attributes=function(t,e){const i=[];for(const n in t){const o=t[n];if(!e.hasAttribute(n))return null;{const t=e.getAttribute(n);if(!0===o)i.push(n);else if(o instanceof RegExp){if(!o.test(t))return null;i.push(n)}else{if(t!==o)return null;i.push(n)}}}return i}(e.attributes,t),!i.attributes)?null:!(e.classes&&(i.classes=function(t,e){const i=[];for(const n of t)if(n instanceof RegExp){const t=e.getClassNames();for(const e of t)n.test(e)&&i.push(e);if(0===i.length)return null}else{if(!e.hasClass(n))return null;i.push(n)}return i}(e.classes,t),!i.classes))&&(!(e.styles&&(i.styles=function(t,e){const i=[];for(const n in t){const o=t[n];if(!e.hasStyle(n))return null;{const t=e.getStyle(n);if(o instanceof RegExp){if(!o.test(t))return null;i.push(n)}else{if(t!==o)return null;i.push(n)}}}return i}(e.styles,t),!i.styles))&&i)}class _n extends un{constructor(t,e,i){if(super(),this.name=t,this._attrs=function(t){t=T(t)?mn(t):new Map(t);for(const[e,i]of t)null===i?t.delete(e):\"string\"!=typeof i&&t.set(e,String(i));return t}(e),this._children=[],i&&this._insertChild(0,i),this._classes=new Set,this._attrs.has(\"class\")){const t=this._attrs.get(\"class\");vn(this._classes,t),this._attrs.delete(\"class\")}this._styles=new Map,this._attrs.has(\"style\")&&(kn(this._styles,this._attrs.get(\"style\")),this._attrs.delete(\"style\")),this._customProperties=new Map}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(t,e=null){const i=t.replace(/^view:/,\"\");return e?\"element\"==i&&e==this.name:\"element\"==i||i==this.name||super.is(t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield\"class\"),this._styles.size>0&&(yield\"style\"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield[\"class\",this.getAttribute(\"class\")]),this._styles.size>0&&(yield[\"style\",this.getAttribute(\"style\")])}getAttribute(t){if(\"class\"==t)return this._classes.size>0?[...this._classes].join(\" \"):void 0;if(\"style\"!=t)return this._attrs.get(t);if(this._styles.size>0){let t=\"\";for(const[e,i]of this._styles)t+=`${e}:${i};`;return t}}hasAttribute(t){return\"class\"==t?this._classes.size>0:\"style\"==t?this._styles.size>0:this._attrs.has(t)}isSimilar(t){if(!(t instanceof _n))return!1;if(this===t)return!0;if(this.name!=t.name)return!1;if(this._attrs.size!==t._attrs.size||this._classes.size!==t._classes.size||this._styles.size!==t._styles.size)return!1;for(const[e,i]of this._attrs)if(!t._attrs.has(e)||t._attrs.get(e)!==i)return!1;for(const e of this._classes)if(!t._classes.has(e))return!1;for(const[e,i]of this._styles)if(!t._styles.has(e)||t._styles.get(e)!==i)return!1;return!0}hasClass(...t){for(const e of t)if(!this._classes.has(e))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(t){return this._styles.get(t)}getStyleNames(){return this._styles.keys()}hasStyle(...t){for(const e of t)if(!this._styles.has(e))return!1;return!0}findAncestor(...t){const e=new bn(...t);let i=this.parent;for(;i;){if(e.match(i))return i;i=i.parent}return null}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const t=Array.from(this._classes).sort().join(\",\"),e=Array.from(this._styles).map(t=>`${t[0]}:${t[1]}`).sort().join(\";\"),i=Array.from(this._attrs).map(t=>`${t[0]}=\"${t[1]}\"`).sort().join(\" \");return this.name+(\"\"==t?\"\":` class=\"${t}\"`)+(\"\"==e?\"\":` style=\"${e}\"`)+(\"\"==i?\"\":` ${i}`)}_clone(t=!1){const e=[];if(t)for(const i of this.getChildren())e.push(i._clone(t));const i=new this.constructor(this.name,this._attrs,e);return i._classes=new Set(this._classes),i._styles=new Map(this._styles),i._customProperties=new Map(this._customProperties),i.getFillerOffset=this.getFillerOffset,i}_appendChild(t){return this._insertChild(this.childCount,t)}_insertChild(t,e){this._fireChange(\"children\",this);let i=0;const n=function(t){if(\"string\"==typeof t)return[new fn(t)];pn(t)||(t=[t]);return Array.from(t).map(t=>\"string\"==typeof t?new fn(t):t instanceof gn?new fn(t.data):t)}(e);for(const e of n)null!==e.parent&&e._remove(),e.parent=this,this._children.splice(t,0,e),t++,i++;return i}_removeChildren(t,e=1){this._fireChange(\"children\",this);for(let i=t;i<t+e;i++)this._children[i].parent=null;return this._children.splice(t,e)}_setAttribute(t,e){e=String(e),this._fireChange(\"attributes\",this),\"class\"==t?vn(this._classes,e):\"style\"==t?kn(this._styles,e):this._attrs.set(t,e)}_removeAttribute(t){return this._fireChange(\"attributes\",this),\"class\"==t?this._classes.size>0&&(this._classes.clear(),!0):\"style\"==t?this._styles.size>0&&(this._styles.clear(),!0):this._attrs.delete(t)}_addClass(t){this._fireChange(\"attributes\",this),(t=Array.isArray(t)?t:[t]).forEach(t=>this._classes.add(t))}_removeClass(t){this._fireChange(\"attributes\",this),(t=Array.isArray(t)?t:[t]).forEach(t=>this._classes.delete(t))}_setStyle(t,e){if(this._fireChange(\"attributes\",this),T(t)){const e=Object.keys(t);for(const i of e)this._styles.set(i,t[i])}else this._styles.set(t,e)}_removeStyle(t){this._fireChange(\"attributes\",this),(t=Array.isArray(t)?t:[t]).forEach(t=>this._styles.delete(t))}_setCustomProperty(t,e){this._customProperties.set(t,e)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function kn(t,e){let i=null,n=0,o=0,r=null;if(t.clear(),\"\"!==e){\";\"!=e.charAt(e.length-1)&&(e+=\";\");for(let s=0;s<e.length;s++){const a=e.charAt(s);if(null===i)switch(a){case\":\":r||(r=e.substr(n,s-n),o=s+1);break;case'\"':case\"'\":i=a;break;case\";\":{const i=e.substr(o,s-o);r&&t.set(r.trim(),i.trim()),r=null,n=s+1;break}}else a===i&&(i=null)}}}function vn(t,e){const i=e.split(/\\s+/);t.clear(),i.forEach(e=>t.add(e))}class yn extends _n{constructor(t,e,i){super(t,e,i),this.getFillerOffset=xn}is(t,e=null){const i=t&&t.replace(/^view:/,\"\");return e?\"containerElement\"==i&&e==this.name||super.is(t,e):\"containerElement\"==i||super.is(t)}}function xn(){const t=[...this.getChildren()],e=t[this.childCount-1];if(e&&e.is(\"element\",\"br\"))return this.childCount;for(const e of t)if(!e.is(\"uiElement\"))return null;return this.childCount}var An=function(t){return t};var Tn=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)},Cn=Math.max;var Pn=function(t,e,i){return e=Cn(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,r=Cn(n.length-e,0),s=Array(r);++o<r;)s[o]=n[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=n[o];return a[e]=i(s),Tn(t,this,a)}};var Sn=function(t){return function(){return t}},Mn=Ot?function(t,e){return Ot(t,\"toString\",{configurable:!0,enumerable:!1,value:Sn(e),writable:!0})}:An,En=800,In=16,Nn=Date.now;var On=function(t){var e=0,i=0;return function(){var n=Nn(),o=In-(n-i);if(i=n,o>0){if(++e>=En)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Mn);var Rn=function(t,e){return On(Pn(t,e,An),t+\"\")};var Dn=function(t,e,i){if(!B(i))return!1;var n=typeof e;return!!(\"number\"==n?he(i)&&Qt(e,i.length):\"string\"==n&&e in i)&&P(i[e],t)};var Ln=function(t){return Rn(function(e,i){var n=-1,o=i.length,r=o>1?i[o-1]:void 0,s=o>2?i[2]:void 0;for(r=t.length>3&&\"function\"==typeof r?(o--,r):void 0,s&&Dn(i[0],i[1],s)&&(r=o<3?void 0:r,o=1),e=Object(e);++n<o;){var a=i[n];a&&t(e,a,n,r)}return e})}(function(t,e){jt(e,be(e),t)});const jn=Symbol(\"observableProperties\"),Vn=Symbol(\"boundObservables\"),zn=Symbol(\"boundProperties\"),Bn={set(t,e){if(B(t))return void Object.keys(t).forEach(e=>{this.set(e,t[e])},this);Un(this);const i=this[jn];if(t in this&&!i.has(t))throw new $i.b(\"observable-set-cannot-override: Cannot override an existing property.\",this);Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get:()=>i.get(t),set(e){const n=i.get(t);let o=this.fire(\"set:\"+t,t,e,n);void 0===o&&(o=e),n===o&&i.has(t)||(i.set(t,o),this.fire(\"change:\"+t,t,o,n))}}),this[t]=e},bind(...t){if(!t.length||!qn(t))throw new $i.b(\"observable-bind-wrong-properties: All properties must be strings.\",this);if(new Set(t).size!==t.length)throw new $i.b(\"observable-bind-duplicate-properties: Properties must be unique.\",this);Un(this);const e=this[zn];t.forEach(t=>{if(e.has(t))throw new $i.b(\"observable-bind-rebind: Cannot bind the same property more that once.\",this)});const i=new Map;return t.forEach(t=>{const n={property:t,to:[]};e.set(t,n),i.set(t,n)}),{to:Hn,toMany:Wn,_observable:this,_bindProperties:t,_to:[],_bindings:i}},unbind(...t){if(!(jn in this))return;const e=this[zn],i=this[Vn];if(t.length){if(!qn(t))throw new $i.b(\"observable-unbind-wrong-properties: Properties must be strings.\",this);t.forEach(t=>{const n=e.get(t);if(!n)return;let o,r,s,a;n.to.forEach(t=>{o=t[0],r=t[1],s=i.get(o),(a=s[r]).delete(n),a.size||delete s[r],Object.keys(s).length||(i.delete(o),this.stopListening(o,\"change\"))}),e.delete(t)})}else i.forEach((t,e)=>{this.stopListening(e,\"change\")}),i.clear(),e.clear()},decorate(t){const e=this[t];if(!e)throw new $i.b(\"observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.\",this,{object:this,methodName:t});this.on(t,(t,i)=>{t.return=e.apply(this,i)}),this[t]=function(...e){return this.fire(t,e)}}};Ln(Bn,tn);var Fn=Bn;function Un(t){jn in t||(Object.defineProperty(t,jn,{value:new Map}),Object.defineProperty(t,Vn,{value:new Map}),Object.defineProperty(t,zn,{value:new Map}))}function Hn(...t){const e=function(...t){if(!t.length)throw new $i.b(\"observable-bind-to-parse-error: Invalid argument syntax in `to()`.\",null);const e={to:[]};let i;\"function\"==typeof t[t.length-1]&&(e.callback=t.pop());return t.forEach(t=>{if(\"string\"==typeof t)i.properties.push(t);else{if(\"object\"!=typeof t)throw new $i.b(\"observable-bind-to-parse-error: Invalid argument syntax in `to()`.\",null);i={observable:t,properties:[]},e.to.push(i)}}),e}(...t),i=Array.from(this._bindings.keys()),n=i.length;if(!e.callback&&e.to.length>1)throw new $i.b(\"observable-bind-to-no-callback: Binding multiple observables only possible with callback.\",this);if(n>1&&e.callback)throw new $i.b(\"observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.\",this);e.to.forEach(t=>{if(t.properties.length&&t.properties.length!==n)throw new $i.b(\"observable-bind-to-properties-length: The number of properties must match.\",this);t.properties.length||(t.properties=this._bindProperties)}),this._to=e.to,e.callback&&(this._bindings.get(i[0]).callback=e.callback),function(t,e){e.forEach(e=>{const i=t[Vn];let n;i.get(e.observable)||t.listenTo(e.observable,\"change\",(o,r)=>{(n=i.get(e.observable)[r])&&n.forEach(e=>{Yn(t,e.property)})})})}(this._observable,this._to),function(t){let e;t._bindings.forEach((i,n)=>{t._to.forEach(o=>{e=o.properties[i.callback?0:t._bindProperties.indexOf(n)],i.to.push([o.observable,e]),function(t,e,i,n){const o=t[Vn],r=o.get(i),s=r||{};s[n]||(s[n]=new Set);s[n].add(e),r||o.set(i,s)}(t._observable,i,o.observable,e)})})}(this),this._bindProperties.forEach(t=>{Yn(this._observable,t)})}function Wn(t,e,i){if(this._bindings.size>1)throw new $i.b(\"observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().\",this);this.to(...function(t,e){const i=t.map(t=>[t,e]);return Array.prototype.concat.apply([],i)}(t,e),i)}function qn(t){return t.every(t=>\"string\"==typeof t)}function Yn(t,e){const i=t[zn].get(e);let n;n=i.callback?i.callback.apply(t,i.to.map(t=>t[0][t[1]])):(n=i.to[0])[0][n[1]],t.hasOwnProperty(e)?t[e]=n:t.set(e,n)}const $n=Symbol(\"document\");class Gn extends yn{constructor(t,e,i){super(t,e,i),this.set(\"isReadOnly\",!1),this.set(\"isFocused\",!1)}is(t,e=null){const i=t&&t.replace(/^view:/,\"\");return e?\"editableElement\"==i&&e==this.name||super.is(t,e):\"editableElement\"==i||super.is(t)}destroy(){this.stopListening()}get document(){return this.getCustomProperty($n)}set _document(t){if(this.getCustomProperty($n))throw new $i.b(\"view-editableelement-document-already-set: View document is already set.\",this);this._setCustomProperty($n,t),this.bind(\"isReadOnly\").to(t),this.bind(\"isFocused\").to(t,\"isFocused\",e=>e&&t.selection.editableElement==this),this.listenTo(t.selection,\"change\",()=>{this.isFocused=t.isFocused&&t.selection.editableElement==this})}}cn(Gn,Fn);const Qn=Symbol(\"rootName\");class Kn extends Gn{constructor(t){super(t),this.rootName=\"main\"}is(t,e=null){const i=t.replace(/^view:/,\"\");return e?\"rootElement\"==i&&e==this.name||super.is(t,e):\"rootElement\"==i||super.is(t)}get rootName(){return this.getCustomProperty(Qn)}set rootName(t){this._setCustomProperty(Qn,t)}set _name(t){this.name=t}}class Jn{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new $i.b(\"view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.\",null);if(t.direction&&\"forward\"!=t.direction&&\"backward\"!=t.direction)throw new $i.b(\"view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.\",t.startPosition,{direction:t.direction});this.boundaries=t.boundaries||null,t.startPosition?this.position=Zn._createAt(t.startPosition):this.position=Zn._createAt(t.boundaries[\"backward\"==t.direction?\"end\":\"start\"]),this.direction=t.direction||\"forward\",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(t){let e,i,n;do{n=this.position,({done:e,value:i}=this.next())}while(!e&&t(i));e||(this.position=n)}next(){return\"forward\"==this.direction?this._next():this._previous()}_next(){let t=this.position.clone();const e=this.position,i=t.parent;if(null===i.parent&&t.offset===i.childCount)return{done:!0};if(i===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};let n;if(i instanceof fn){if(t.isAtEnd)return this.position=Zn._createAfter(i),this._next();n=i.data[t.offset]}else n=i.getChild(t.offset);if(n instanceof _n)return this.shallow?t.offset++:t=new Zn(n,0),this.position=t,this._formatReturnValue(\"elementStart\",n,e,t,1);if(n instanceof fn){if(this.singleCharacters)return t=new Zn(n,0),this.position=t,this._next();{let i,o=n.data.length;return n==this._boundaryEndParent?(o=this.boundaries.end.offset,i=new gn(n,0,o),t=Zn._createAfter(i)):(i=new gn(n,0,n.data.length),t.offset++),this.position=t,this._formatReturnValue(\"text\",i,e,t,o)}}if(\"string\"==typeof n){let n;if(this.singleCharacters)n=1;else{n=(i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length)-t.offset}const o=new gn(i,t.offset,n);return t.offset+=n,this.position=t,this._formatReturnValue(\"text\",o,e,t,n)}return t=Zn._createAfter(i),this.position=t,this.ignoreElementEnd?this._next():this._formatReturnValue(\"elementEnd\",i,e,t)}_previous(){let t=this.position.clone();const e=this.position,i=t.parent;if(null===i.parent&&0===t.offset)return{done:!0};if(i==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0};let n;if(i instanceof fn){if(t.isAtStart)return this.position=Zn._createBefore(i),this._previous();n=i.data[t.offset-1]}else n=i.getChild(t.offset-1);if(n instanceof _n)return this.shallow?(t.offset--,this.position=t,this._formatReturnValue(\"elementStart\",n,e,t,1)):(t=new Zn(n,n.childCount),this.position=t,this.ignoreElementEnd?this._previous():this._formatReturnValue(\"elementEnd\",n,e,t));if(n instanceof fn){if(this.singleCharacters)return t=new Zn(n,n.data.length),this.position=t,this._previous();{let i,o=n.data.length;if(n==this._boundaryStartParent){const e=this.boundaries.start.offset;o=(i=new gn(n,e,n.data.length-e)).data.length,t=Zn._createBefore(i)}else i=new gn(n,0,n.data.length),t.offset--;return this.position=t,this._formatReturnValue(\"text\",i,e,t,o)}}if(\"string\"==typeof n){let n;if(this.singleCharacters)n=1;else{const e=i===this._boundaryStartParent?this.boundaries.start.offset:0;n=t.offset-e}t.offset-=n;const o=new gn(i,t.offset,n);return this.position=t,this._formatReturnValue(\"text\",o,e,t,n)}return t=Zn._createBefore(i),this.position=t,this._formatReturnValue(\"elementStart\",i,e,t,1)}_formatReturnValue(t,e,i,n,o){return e instanceof gn&&(e.offsetInText+e.data.length==e.textNode.data.length&&(\"forward\"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?i=Zn._createAfter(e.textNode):(n=Zn._createAfter(e.textNode),this.position=n)),0===e.offsetInText&&(\"backward\"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?i=Zn._createBefore(e.textNode):(n=Zn._createBefore(e.textNode),this.position=n))),{done:!1,value:{type:t,item:e,previousPosition:i,nextPosition:n,length:o}}}}class Zn{constructor(t,e){this.parent=t,this.offset=e}get nodeAfter(){return this.parent.is(\"text\")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is(\"text\")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const t=this.parent.is(\"text\")?this.parent.data.length:this.parent.childCount;return this.offset===t}get root(){return this.parent.root}get editableElement(){let t=this.parent;for(;!(t instanceof Gn);){if(!t.parent)return null;t=t.parent}return t}getShiftedBy(t){const e=Zn._createAt(this),i=e.offset+t;return e.offset=i<0?0:i,e}getLastMatchingPosition(t,e={}){e.startPosition=this;const i=new Jn(e);return i.skip(t),i.position}getAncestors(){return this.parent.is(\"documentFragment\")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(t){const e=this.getAncestors(),i=t.getAncestors();let n=0;for(;e[n]==i[n]&&e[n];)n++;return 0===n?null:e[n-1]}is(t){return\"position\"==t||\"view:position\"==t}isEqual(t){return this.parent==t.parent&&this.offset==t.offset}isBefore(t){return\"before\"==this.compareWith(t)}isAfter(t){return\"after\"==this.compareWith(t)}compareWith(t){if(this.root!==t.root)return\"different\";if(this.isEqual(t))return\"same\";const e=this.parent.is(\"node\")?this.parent.getPath():[],i=t.parent.is(\"node\")?t.parent.getPath():[];e.push(this.offset),i.push(t.offset);const n=ln(e,i);switch(n){case\"prefix\":return\"before\";case\"extension\":return\"after\";default:return e[n]<i[n]?\"before\":\"after\"}}getWalker(t={}){return t.startPosition=this,new Jn(t)}clone(){return new Zn(this.parent,this.offset)}static _createAt(t,e){if(t instanceof Zn)return new this(t.parent,t.offset);{const i=t;if(\"end\"==e)e=i.is(\"text\")?i.data.length:i.childCount;else{if(\"before\"==e)return this._createBefore(i);if(\"after\"==e)return this._createAfter(i);if(0!==e&&!e)throw new $i.b(\"view-createPositionAt-offset-required: View#createPositionAt() requires the offset when the first parameter is a view item.\",i)}return new Zn(i,e)}}static _createAfter(t){if(t.is(\"textProxy\"))return new Zn(t.textNode,t.offsetInText+t.data.length);if(!t.parent)throw new $i.b(\"view-position-after-root: You can not make position after root.\",t,{root:t});return new Zn(t.parent,t.index+1)}static _createBefore(t){if(t.is(\"textProxy\"))return new Zn(t.textNode,t.offsetInText);if(!t.parent)throw new $i.b(\"view-position-before-root: You can not make position before root.\",t,{root:t});return new Zn(t.parent,t.index)}}class Xn{constructor(t,e=null){this.start=t.clone(),this.end=e?e.clone():t.clone()}*[Symbol.iterator](){yield*new Jn({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let t=this.start.getLastMatchingPosition(to,{direction:\"backward\"}),e=this.end.getLastMatchingPosition(to);return t.parent.is(\"text\")&&t.isAtStart&&(t=Zn._createBefore(t.parent)),e.parent.is(\"text\")&&e.isAtEnd&&(e=Zn._createAfter(e.parent)),new Xn(t,e)}getTrimmed(){let t=this.start.getLastMatchingPosition(to);if(t.isAfter(this.end)||t.isEqual(this.end))return new Xn(t,t);let e=this.end.getLastMatchingPosition(to,{direction:\"backward\"});const i=t.nodeAfter,n=e.nodeBefore;return i&&i.is(\"text\")&&(t=new Zn(i,0)),n&&n.is(\"text\")&&(e=new Zn(n,n.data.length)),new Xn(t,e)}isEqual(t){return this==t||this.start.isEqual(t.start)&&this.end.isEqual(t.end)}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,e=!1){t.isCollapsed&&(e=!1);const i=this.containsPosition(t.start)||e&&this.start.isEqual(t.start),n=this.containsPosition(t.end)||e&&this.end.isEqual(t.end);return i&&n}getDifference(t){const e=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&e.push(new Xn(this.start,t.start)),this.containsPosition(t.end)&&e.push(new Xn(t.end,this.end))):e.push(this.clone()),e}getIntersection(t){if(this.isIntersecting(t)){let e=this.start,i=this.end;return this.containsPosition(t.start)&&(e=t.start),this.containsPosition(t.end)&&(i=t.end),new Xn(e,i)}return null}getWalker(t={}){return t.boundaries=this,new Jn(t)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}clone(){return new Xn(this.start,this.end)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new Jn(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new Jn(t);yield e.position;for(const t of e)yield t.nextPosition}is(t){return\"range\"==t||\"view:range\"==t}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}static _createFromParentsAndOffsets(t,e,i,n){return new this(new Zn(t,e),new Zn(i,n))}static _createFromPositionAndShift(t,e){const i=t,n=t.getShiftedBy(e);return e>0?new this(i,n):new this(n,i)}static _createIn(t){return this._createFromParentsAndOffsets(t,0,t,t.childCount)}static _createOn(t){const e=t.is(\"textProxy\")?t.offsetSize:1;return this._createFromPositionAndShift(Zn._createBefore(t),e)}}function to(t){return!(!t.item.is(\"attributeElement\")&&!t.item.is(\"uiElement\"))}function eo(t){let e=0;for(const i of t)e++;return e}class io{constructor(t=null,e,i){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel=\"\",this.setTo(t,e,i)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.end:t.start).clone()}get focus(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.start:t.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const t of this._ranges)yield t.clone()}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?t.clone():null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?t.clone():null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}isEqual(t){if(this.isFake!=t.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=t.fakeSelectionLabel)return!1;if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let i=!1;for(const n of t._ranges)if(e.isEqual(n)){i=!0;break}if(!i)return!1}return!0}isSimilar(t){if(this.isBackward!=t.isBackward)return!1;const e=eo(this.getRanges());if(e!=eo(t.getRanges()))return!1;if(0==e)return!0;for(let e of this.getRanges()){e=e.getTrimmed();let i=!1;for(let n of t.getRanges())if(n=n.getTrimmed(),e.start.isEqual(n.start)&&e.end.isEqual(n.end)){i=!0;break}if(!i)return!1}return!0}getSelectedElement(){if(1!==this.rangeCount)return null;const t=this.getFirstRange();let e=t.start.nodeAfter,i=t.end.nodeBefore;return t.start.parent.is(\"text\")&&t.start.isAtEnd&&t.start.parent.nextSibling&&(e=t.start.parent.nextSibling),t.end.parent.is(\"text\")&&t.end.isAtStart&&t.end.parent.previousSibling&&(i=t.end.parent.previousSibling),e instanceof _n&&e==i?e:null}setTo(t,e,i){if(null===t)this._setRanges([]),this._setFakeOptions(e);else if(t instanceof io||t instanceof no)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof Xn)this._setRanges([t],e&&e.backward),this._setFakeOptions(e);else if(t instanceof Zn)this._setRanges([new Xn(t)]),this._setFakeOptions(e);else if(t instanceof un){const n=!!i&&!!i.backward;let o;if(void 0===e)throw new $i.b(\"view-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.\",this);o=\"in\"==e?Xn._createIn(t):\"on\"==e?Xn._createOn(t):new Xn(Zn._createAt(t,e)),this._setRanges([o],n),this._setFakeOptions(i)}else{if(!pn(t))throw new $i.b(\"view-selection-setTo-not-selectable: Cannot set selection to given place.\",this);this._setRanges(t,e&&e.backward),this._setFakeOptions(e)}this.fire(\"change\")}setFocus(t,e){if(null===this.anchor)throw new $i.b(\"view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.\",this);const i=Zn._createAt(t,e);if(\"same\"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.pop(),\"before\"==i.compareWith(n)?this._addRange(new Xn(i,n),!0):this._addRange(new Xn(n,i)),this.fire(\"change\")}is(t){return\"selection\"==t||\"view:selection\"==t}_setRanges(t,e=!1){t=Array.from(t),this._ranges=[];for(const e of t)this._addRange(e);this._lastRangeBackward=!!e}_setFakeOptions(t={}){this._isFake=!!t.fake,this._fakeSelectionLabel=t.fake&&t.label||\"\"}_addRange(t,e=!1){if(!(t instanceof Xn))throw new $i.b(\"view-selection-add-range-not-range: Selection range set to an object that is not an instance of view.Range\",this);this._pushRange(t),this._lastRangeBackward=!!e}_pushRange(t){for(const e of this._ranges)if(t.isIntersecting(e))throw new $i.b(\"view-selection-range-intersects: Trying to add a range that intersects with another range from selection.\",this,{addedRange:t,intersectingRange:e});this._ranges.push(new Xn(t.start,t.end))}}cn(io,tn);class no{constructor(t=null,e,i){this._selection=new io,this._selection.delegate(\"change\").to(this),this._selection.setTo(t,e,i)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(t){return this._selection.isEqual(t)}isSimilar(t){return this._selection.isSimilar(t)}is(t){return\"selection\"==t||\"documentSelection\"==t||\"view:selection\"==t||\"view:documentSelection\"==t}_setTo(t,e,i){this._selection.setTo(t,e,i)}_setFocus(t,e){this._selection.setFocus(t,e)}}cn(no,tn);class oo{constructor(t={}){this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||\"id\",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[]}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(t,e){let i;const n=this._idProperty;if(n in t){if(\"string\"!=typeof(i=t[n]))throw new $i.b(\"collection-add-invalid-id\",this);if(this.get(i))throw new $i.b(\"collection-add-item-already-exists\",this)}else t[n]=i=Ki();if(void 0===e)e=this._items.length;else if(e>this._items.length||e<0)throw new $i.b(\"collection-add-item-invalid-index\",this);return this._items.splice(e,0,t),this._itemMap.set(i,t),this.fire(\"add\",t,e),this}get(t){let e;if(\"string\"==typeof t)e=this._itemMap.get(t);else{if(\"number\"!=typeof t)throw new $i.b(\"collection-get-invalid-arg: Index or id must be given.\",this);e=this._items[t]}return e||null}has(t){if(\"string\"==typeof t)return this._itemMap.has(t);{const e=t[this._idProperty];return this._itemMap.has(e)}}getIndex(t){let e;return e=\"string\"==typeof t?this._itemMap.get(t):t,this._items.indexOf(e)}remove(t){let e,i,n,o=!1;const r=this._idProperty;if(\"string\"==typeof t?(i=t,o=!(n=this._itemMap.get(i)),n&&(e=this._items.indexOf(n))):\"number\"==typeof t?(e=t,o=!(n=this._items[e]),n&&(i=n[r])):(i=(n=t)[r],o=-1==(e=this._items.indexOf(n))||!this._itemMap.get(i)),o)throw new $i.b(\"collection-remove-404: Item not found.\",this);this._items.splice(e,1),this._itemMap.delete(i);const s=this._bindToInternalToExternalMap.get(n);return this._bindToInternalToExternalMap.delete(n),this._bindToExternalToInternalMap.delete(s),this.fire(\"remove\",n,e),n}map(t,e){return this._items.map(t,e)}find(t,e){return this._items.find(t,e)}filter(t,e){return this._items.filter(t,e)}clear(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}bindTo(t){if(this._bindToCollection)throw new $i.b(\"collection-bind-to-rebind: The collection cannot be bound more than once.\",this);return this._bindToCollection=t,{as:t=>{this._setUpBindToBinding(e=>new t(e))},using:t=>{\"function\"==typeof t?this._setUpBindToBinding(e=>t(e)):this._setUpBindToBinding(e=>e[t])}}}_setUpBindToBinding(t){const e=this._bindToCollection,i=(i,n,o)=>{const r=e._bindToCollection==this,s=e._bindToInternalToExternalMap.get(n);if(r&&s)this._bindToExternalToInternalMap.set(n,s),this._bindToInternalToExternalMap.set(s,n);else{const i=t(n);if(!i)return void this._skippedIndexesFromExternal.push(o);let r=o;for(const t of this._skippedIndexesFromExternal)o>t&&r--;for(const t of e._skippedIndexesFromExternal)r>=t&&r++;this._bindToExternalToInternalMap.set(n,i),this._bindToInternalToExternalMap.set(i,n),this.add(i,r);for(let t=0;t<e._skippedIndexesFromExternal.length;t++)r<=e._skippedIndexesFromExternal[t]&&e._skippedIndexesFromExternal[t]++}};for(const t of e)i(0,t,e.getIndex(t));this.listenTo(e,\"add\",i),this.listenTo(e,\"remove\",(t,e,i)=>{const n=this._bindToExternalToInternalMap.get(e);n&&this.remove(n),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((t,e)=>(i<e&&t.push(e-1),i>e&&t.push(e),t),[])})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}cn(oo,tn);class ro{constructor(){this.selection=new no,this.roots=new oo({idProperty:\"rootName\"}),this.set(\"isReadOnly\",!1),this.set(\"isFocused\",!1),this.set(\"isComposing\",!1),this._postFixers=new Set}getRoot(t=\"main\"){return this.roots.get(t)}registerPostFixer(t){this._postFixers.add(t)}destroy(){this.roots.map(t=>t.destroy()),this.stopListening()}_callPostFixers(t){let e=!1;do{for(const i of this._postFixers)if(e=i(t))break}while(e)}}cn(ro,Fn);const so=10;class ao extends _n{constructor(t,e,i){super(t,e,i),this.getFillerOffset=co,this._priority=so,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new $i.b(\"attribute-element-get-elements-with-same-id-no-id: Cannot get elements with the same id for an attribute element without id.\",this);return new Set(this._clonesGroup)}is(t,e=null){const i=t&&t.replace(/^view:/,\"\");return e?\"attributeElement\"==i&&e==this.name||super.is(t,e):\"attributeElement\"==i||super.is(t)}isSimilar(t){return null!==this.id||null!==t.id?this.id===t.id:super.isSimilar(t)&&this.priority==t.priority}_clone(t){const e=super._clone(t);return e._priority=this._priority,e._id=this._id,e}}function co(){if(lo(this))return null;let t=this.parent;for(;t&&t.is(\"attributeElement\");){if(lo(t)>1)return null;t=t.parent}return!t||lo(t)>1?null:this.childCount}function lo(t){return Array.from(t.getChildren()).filter(t=>!t.is(\"uiElement\")).length}ao.DEFAULT_PRIORITY=so;class ho extends _n{constructor(t,e,i){super(t,e,i),this.getFillerOffset=uo}is(t,e=null){const i=t.replace(/^view:/,\"\");return e?\"emptyElement\"==i&&e==this.name||super.is(t,e):\"emptyElement\"==i||super.is(t)}_insertChild(t,e){if(e&&(e instanceof un||Array.from(e).length>0))throw new $i.b(\"view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.\",[this,e])}}function uo(){return null}const fo=navigator.userAgent.toLowerCase();var go={isMac:function(t){return t.indexOf(\"macintosh\")>-1}(fo),isEdge:function(t){return!!t.match(/edge\\/(\\d+.?\\d*)/)}(fo),isGecko:function(t){return!!t.match(/gecko\\/\\d+/)}(fo),isSafari:function(t){return t.indexOf(\" applewebkit/\")>-1&&-1===t.indexOf(\"chrome\")}(fo),isAndroid:function(t){return t.indexOf(\"android\")>-1}(fo),features:{isRegExpUnicodePropertySupported:function(){let t=!1;try{t=0===\"ć\".search(new RegExp(\"[\\\\p{L}]\",\"u\"))}catch(t){}return t}()}};const mo={\"⌘\":\"ctrl\",\"⇧\":\"shift\",\"⌥\":\"alt\"},po={ctrl:\"⌘\",shift:\"⇧\",alt:\"⌥\"},bo=function(){const t={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let e=65;e<=90;e++){const i=String.fromCharCode(e);t[i.toLowerCase()]=e}for(let e=48;e<=57;e++)t[e-48]=e;for(let e=112;e<=123;e++)t[\"f\"+(e-111)]=e;return t}();function wo(t){let e;if(\"string\"==typeof t){if(!(e=bo[t.toLowerCase()]))throw new $i.b(\"keyboard-unknown-key: Unknown key name.\",null,{key:t})}else e=t.keyCode+(t.altKey?bo.alt:0)+(t.ctrlKey?bo.ctrl:0)+(t.shiftKey?bo.shift:0);return e}function _o(t){return\"string\"==typeof t&&(t=ko(t)),t.map(t=>\"string\"==typeof t?wo(t):t).reduce((t,e)=>e+t,0)}function ko(t){return t.split(/\\s*\\+\\s*/)}class vo extends _n{constructor(t,e,i){super(t,e,i),this.getFillerOffset=xo}is(t,e=null){const i=t.replace(/^view:/,\"\");return e?\"uiElement\"==i&&e==this.name||super.is(t,e):\"uiElement\"==i||super.is(t)}_insertChild(t,e){if(e&&(e instanceof un||Array.from(e).length>0))throw new $i.b(\"view-uielement-cannot-add: Cannot add child nodes to UIElement instance.\",this)}render(t){return this.toDomElement(t)}toDomElement(t){const e=t.createElement(this.name);for(const t of this.getAttributeKeys())e.setAttribute(t,this.getAttribute(t));return e}}function yo(t){t.document.on(\"keydown\",(e,i)=>(function(t,e,i){if(e.keyCode==bo.arrowright){const t=e.domTarget.ownerDocument.defaultView.getSelection(),n=1==t.rangeCount&&t.getRangeAt(0).collapsed;if(n||e.shiftKey){const e=t.focusNode,o=t.focusOffset,r=i.domPositionToView(e,o);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition(t=>(t.item.is(\"uiElement\")&&(s=!0),!(!t.item.is(\"uiElement\")&&!t.item.is(\"attributeElement\"))));if(s){const e=i.viewPositionToDom(a);n?t.collapse(e.parent,e.offset):t.extend(e.parent,e.offset)}}}})(0,i,t.domConverter))}function xo(){return null}class Ao{constructor(t){this._children=[],t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(t){return\"documentFragment\"==t||\"view:documentFragment\"==t}_appendChild(t){return this._insertChild(this.childCount,t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(t,e){this._fireChange(\"children\",this);let i=0;const n=function(t){if(\"string\"==typeof t)return[new fn(t)];pn(t)||(t=[t]);return Array.from(t).map(t=>\"string\"==typeof t?new fn(t):t instanceof gn?new fn(t.data):t)}(e);for(const e of n)null!==e.parent&&e._remove(),e.parent=this,this._children.splice(t,0,e),t++,i++;return i}_removeChildren(t,e=1){this._fireChange(\"children\",this);for(let i=t;i<t+e;i++)this._children[i].parent=null;return this._children.splice(t,e)}_fireChange(t,e){this.fire(\"change:\"+t,e)}}cn(Ao,tn);class To{constructor(t){this.document=t,this._cloneGroups=new Map}setSelection(t,e,i){this.document.selection._setTo(t,e,i)}setSelectionFocus(t,e){this.document.selection._setFocus(t,e)}createText(t){return new fn(t)}createAttributeElement(t,e,i={}){const n=new ao(t,e);return i.priority&&(n._priority=i.priority),i.id&&(n._id=i.id),n}createContainerElement(t,e){return new yn(t,e)}createEditableElement(t,e){const i=new Gn(t,e);return i._document=this.document,i}createEmptyElement(t,e){return new ho(t,e)}createUIElement(t,e,i){const n=new vo(t,e);return i&&(n.render=i),n}setAttribute(t,e,i){i._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,i){T(t)&&void 0===i&&(i=e),i._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,i){i._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}breakAttributes(t){return t instanceof Zn?this._breakAttributes(t):this._breakAttributesRange(t)}breakContainer(t){const e=t.parent;if(!e.is(\"containerElement\"))throw new $i.b(\"view-writer-break-non-container-element: Trying to break an element which is not a container element.\",this.document);if(!e.parent)throw new $i.b(\"view-writer-break-root: Trying to break root element.\",this.document);if(t.isAtStart)return Zn._createBefore(e);if(!t.isAtEnd){const i=e._clone(!1);this.insert(Zn._createAfter(e),i);const n=new Xn(t,Zn._createAt(e,\"end\")),o=new Zn(i,0);this.move(n,o)}return Zn._createAfter(e)}mergeAttributes(t){const e=t.offset,i=t.parent;if(i.is(\"text\"))return t;if(i.is(\"attributeElement\")&&0===i.childCount){const t=i.parent,e=i.index;return i._remove(),this._removeFromClonedElementsGroup(i),this.mergeAttributes(new Zn(t,e))}const n=i.getChild(e-1),o=i.getChild(e);if(!n||!o)return t;if(n.is(\"text\")&&o.is(\"text\"))return Eo(n,o);if(n.is(\"attributeElement\")&&o.is(\"attributeElement\")&&n.isSimilar(o)){const t=n.childCount;return n._appendChild(o.getChildren()),o._remove(),this._removeFromClonedElementsGroup(o),this.mergeAttributes(new Zn(n,t))}return t}mergeContainers(t){const e=t.nodeBefore,i=t.nodeAfter;if(!(e&&i&&e.is(\"containerElement\")&&i.is(\"containerElement\")))throw new $i.b(\"view-writer-merge-containers-invalid-position: Element before and after given position cannot be merged.\",this.document);const n=e.getChild(e.childCount-1),o=n instanceof fn?Zn._createAt(n,\"end\"):Zn._createAt(e,\"end\");return this.move(Xn._createIn(i),Zn._createAt(e,\"end\")),this.remove(Xn._createOn(i)),o}insert(t,e){(function t(e,i){for(const n of e){if(!Io.some(t=>n instanceof t))throw new $i.b(\"view-writer-insert-invalid-node\",i);n.is(\"text\")||t(n.getChildren(),i)}})(e=pn(e)?[...e]:[e],this.document);const i=Co(t);if(!i)throw new $i.b(\"view-writer-invalid-position-container\",this.document);const n=this._breakAttributes(t,!0),o=i._insertChild(n.offset,e);for(const t of e)this._addToClonedElementsGroup(t);const r=n.getShiftedBy(o),s=this.mergeAttributes(n);if(0===o)return new Xn(s,s);{s.isEqual(n)||r.offset--;const t=this.mergeAttributes(r);return new Xn(s,t)}}remove(t){const e=t instanceof Xn?t:Xn._createOn(t);if(Oo(e,this.document),e.isCollapsed)return new Ao;const{start:i,end:n}=this._breakAttributesRange(e,!0),o=i.parent,r=n.offset-i.offset,s=o._removeChildren(i.offset,r);for(const t of s)this._removeFromClonedElementsGroup(t);const a=this.mergeAttributes(i);return e.start=a,e.end=a.clone(),new Ao(s)}clear(t,e){Oo(t,this.document);const i=t.getWalker({direction:\"backward\",ignoreElementEnd:!0});for(const n of i){const i=n.item;let o;if(i.is(\"element\")&&e.isSimilar(i))o=Xn._createOn(i);else if(!n.nextPosition.isAfter(t.start)&&i.is(\"textProxy\")){const t=i.getAncestors().find(t=>t.is(\"element\")&&e.isSimilar(t));t&&(o=Xn._createIn(t))}o&&(o.end.isAfter(t.end)&&(o.end=t.end),o.start.isBefore(t.start)&&(o.start=t.start),this.remove(o))}}move(t,e){let i;if(e.isAfter(t.end)){const n=(e=this._breakAttributes(e,!0)).parent,o=n.childCount;t=this._breakAttributesRange(t,!0),i=this.remove(t),e.offset+=n.childCount-o}else i=this.remove(t);return this.insert(e,i)}wrap(t,e){if(!(e instanceof ao))throw new $i.b(\"view-writer-wrap-invalid-attribute\",this.document);if(Oo(t,this.document),t.isCollapsed){let i=t.start;i.parent.is(\"element\")&&!function(t){return Array.from(t.getChildren()).some(t=>!t.is(\"uiElement\"))}(i.parent)&&(i=i.getLastMatchingPosition(t=>t.item.is(\"uiElement\"))),i=this._wrapPosition(i,e);const n=this.document.selection;return n.isCollapsed&&n.getFirstPosition().isEqual(t.start)&&this.setSelection(i),new Xn(i)}return this._wrapRange(t,e)}unwrap(t,e){if(!(e instanceof ao))throw new $i.b(\"view-writer-unwrap-invalid-attribute\",this.document);if(Oo(t,this.document),t.isCollapsed)return t;const{start:i,end:n}=this._breakAttributesRange(t,!0),o=i.parent,r=this._unwrapChildren(o,i.offset,n.offset,e),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new Xn(s,a)}rename(t,e){const i=new yn(t,e.getAttributes());return this.insert(Zn._createAfter(e),i),this.move(Xn._createIn(e),Zn._createAt(i,0)),this.remove(Xn._createOn(e)),i}clearClonedElementsGroup(t){this._cloneGroups.delete(t)}createPositionAt(t,e){return Zn._createAt(t,e)}createPositionAfter(t){return Zn._createAfter(t)}createPositionBefore(t){return Zn._createBefore(t)}createRange(t,e){return new Xn(t,e)}createRangeOn(t){return Xn._createOn(t)}createRangeIn(t){return Xn._createIn(t)}createSelection(t,e,i){return new io(t,e,i)}_wrapChildren(t,e,i,n){let o=e;const r=[];for(;o<i;){const e=t.getChild(o),i=e.is(\"text\"),s=e.is(\"attributeElement\"),a=e.is(\"emptyElement\"),c=e.is(\"uiElement\");if(s&&this._wrapAttributeElement(n,e))r.push(new Zn(t,o));else if(i||a||c||s&&Po(n,e)){const i=n._clone();e._remove(),i._appendChild(e),t._insertChild(o,i),this._addToClonedElementsGroup(i),r.push(new Zn(t,o))}else s&&this._wrapChildren(e,0,e.childCount,n);o++}let s=0;for(const t of r){if(t.offset-=s,t.offset==e)continue;this.mergeAttributes(t).isEqual(t)||(s++,i--)}return Xn._createFromParentsAndOffsets(t,e,t,i)}_unwrapChildren(t,e,i,n){let o=e;const r=[];for(;o<i;){const e=t.getChild(o);if(e.is(\"attributeElement\"))if(e.isSimilar(n)){const n=e.getChildren(),s=e.childCount;e._remove(),t._insertChild(o,n),this._removeFromClonedElementsGroup(e),r.push(new Zn(t,o),new Zn(t,o+s)),o+=s,i+=s-1}else this._unwrapAttributeElement(n,e)?(r.push(new Zn(t,o),new Zn(t,o+1)),o++):(this._unwrapChildren(e,0,e.childCount,n),o++);else o++}let s=0;for(const t of r){if(t.offset-=s,t.offset==e||t.offset==i)continue;this.mergeAttributes(t).isEqual(t)||(s++,i--)}return Xn._createFromParentsAndOffsets(t,e,t,i)}_wrapRange(t,e){const{start:i,end:n}=this._breakAttributesRange(t,!0),o=i.parent,r=this._wrapChildren(o,i.offset,n.offset,e),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new Xn(s,a)}_wrapPosition(t,e){if(e.isSimilar(t.parent))return So(t.clone());t.parent.is(\"text\")&&(t=Mo(t));const i=this.createAttributeElement();i._priority=Number.POSITIVE_INFINITY,i.isSimilar=(()=>!1),t.parent._insertChild(t.offset,i);const n=new Xn(t,t.getShiftedBy(1));this.wrap(n,e);const o=new Zn(i.parent,i.index);i._remove();const r=o.nodeBefore,s=o.nodeAfter;return r instanceof fn&&s instanceof fn?Eo(r,s):So(o)}_wrapAttributeElement(t,e){if(!Ro(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const i of t.getAttributeKeys())if(\"class\"!==i&&\"style\"!==i&&e.hasAttribute(i)&&e.getAttribute(i)!==t.getAttribute(i))return!1;for(const i of t.getStyleNames())if(e.hasStyle(i)&&e.getStyle(i)!==t.getStyle(i))return!1;for(const i of t.getAttributeKeys())\"class\"!==i&&\"style\"!==i&&(e.hasAttribute(i)||this.setAttribute(i,t.getAttribute(i),e));for(const i of t.getStyleNames())e.hasStyle(i)||this.setStyle(i,t.getStyle(i),e);for(const i of t.getClassNames())e.hasClass(i)||this.addClass(i,e);return!0}_unwrapAttributeElement(t,e){if(!Ro(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const i of t.getAttributeKeys())if(\"class\"!==i&&\"style\"!==i&&(!e.hasAttribute(i)||e.getAttribute(i)!==t.getAttribute(i)))return!1;if(!e.hasClass(...t.getClassNames()))return!1;for(const i of t.getStyleNames())if(!e.hasStyle(i)||e.getStyle(i)!==t.getStyle(i))return!1;for(const i of t.getAttributeKeys())\"class\"!==i&&\"style\"!==i&&this.removeAttribute(i,e);return this.removeClass(Array.from(t.getClassNames()),e),this.removeStyle(Array.from(t.getStyleNames()),e),!0}_breakAttributesRange(t,e=!1){const i=t.start,n=t.end;if(Oo(t,this.document),t.isCollapsed){const i=this._breakAttributes(t.start,e);return new Xn(i,i)}const o=this._breakAttributes(n,e),r=o.parent.childCount,s=this._breakAttributes(i,e);return o.offset+=o.parent.childCount-r,new Xn(s,o)}_breakAttributes(t,e=!1){const i=t.offset,n=t.parent;if(t.parent.is(\"emptyElement\"))throw new $i.b(\"view-writer-cannot-break-empty-element\",this.document);if(t.parent.is(\"uiElement\"))throw new $i.b(\"view-writer-cannot-break-ui-element\",this.document);if(!e&&n.is(\"text\")&&No(n.parent))return t.clone();if(No(n))return t.clone();if(n.is(\"text\"))return this._breakAttributes(Mo(t),e);if(i==n.childCount){const t=new Zn(n.parent,n.index+1);return this._breakAttributes(t,e)}if(0===i){const t=new Zn(n.parent,n.index);return this._breakAttributes(t,e)}{const t=n.index+1,o=n._clone();n.parent._insertChild(t,o),this._addToClonedElementsGroup(o);const r=n.childCount-i,s=n._removeChildren(i,r);o._appendChild(s);const a=new Zn(n.parent,t);return this._breakAttributes(a,e)}}_addToClonedElementsGroup(t){if(!t.root.is(\"rootElement\"))return;if(t.is(\"element\"))for(const e of t.getChildren())this._addToClonedElementsGroup(e);const e=t.id;if(!e)return;let i=this._cloneGroups.get(e);i||(i=new Set,this._cloneGroups.set(e,i)),i.add(t),t._clonesGroup=i}_removeFromClonedElementsGroup(t){if(t.is(\"element\"))for(const e of t.getChildren())this._removeFromClonedElementsGroup(e);const e=t.id;if(!e)return;const i=this._cloneGroups.get(e);i&&i.delete(t)}}function Co(t){let e=t.parent;for(;!No(e);){if(!e)return;e=e.parent}return e}function Po(t,e){return t.priority<e.priority||!(t.priority>e.priority)&&t.getIdentity()<e.getIdentity()}function So(t){const e=t.nodeBefore;if(e&&e.is(\"text\"))return new Zn(e,e.data.length);const i=t.nodeAfter;return i&&i.is(\"text\")?new Zn(i,0):t}function Mo(t){if(t.offset==t.parent.data.length)return new Zn(t.parent.parent,t.parent.index+1);if(0===t.offset)return new Zn(t.parent.parent,t.parent.index);const e=t.parent.data.slice(t.offset);return t.parent._data=t.parent.data.slice(0,t.offset),t.parent.parent._insertChild(t.parent.index+1,new fn(e)),new Zn(t.parent.parent,t.parent.index+1)}function Eo(t,e){const i=t.data.length;return t._data+=e.data,e._remove(),new Zn(t,i)}const Io=[fn,ao,yn,ho,vo];function No(t){return t&&(t.is(\"containerElement\")||t.is(\"documentFragment\"))}function Oo(t,e){const i=Co(t.start),n=Co(t.end);if(!i||!n||i!==n)throw new $i.b(\"view-writer-invalid-range-container\",e)}function Ro(t,e){return null===t.id&&null===e.id}function Do(t){return\"[object Text]\"==Object.prototype.toString.call(t)}const Lo=t=>t.createTextNode(\" \"),jo=t=>{const e=t.createElement(\"br\");return e.dataset.ckeFiller=!0,e},Vo=7,zo=(()=>{let t=\"\";for(let e=0;e<Vo;e++)t+=\"​\";return t})();function Bo(t){return Do(t)&&t.data.substr(0,Vo)===zo}function Fo(t){return t.data.length==Vo&&Bo(t)}function Uo(t){return Bo(t)?t.data.slice(Vo):t.data}function Ho(t,e){if(e.keyCode==bo.arrowleft){const t=e.domTarget.ownerDocument.defaultView.getSelection();if(1==t.rangeCount&&t.getRangeAt(0).collapsed){const e=t.getRangeAt(0).startContainer,i=t.getRangeAt(0).startOffset;Bo(e)&&i<=Vo&&t.collapse(e,0)}}}function Wo(t,e,i,n=!1){i=i||function(t,e){return t===e},Array.isArray(t)||(t=Array.from(t)),Array.isArray(e)||(e=Array.from(e));const o=function(t,e,i){const n=qo(t,e,i);if(-1===n)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const o=Yo(t,n),r=Yo(e,n),s=qo(o,r,i),a=t.length-s,c=e.length-s;return{firstIndex:n,lastIndexOld:a,lastIndexNew:c}}(t,e,i);return n?function(t,e){const{firstIndex:i,lastIndexOld:n,lastIndexNew:o}=t;if(-1===i)return Array(e).fill(\"equal\");let r=[];i>0&&(r=r.concat(Array(i).fill(\"equal\")));o-i>0&&(r=r.concat(Array(o-i).fill(\"insert\")));n-i>0&&(r=r.concat(Array(n-i).fill(\"delete\")));o<e&&(r=r.concat(Array(e-o).fill(\"equal\")));return r}(o,e.length):function(t,e){const i=[],{firstIndex:n,lastIndexOld:o,lastIndexNew:r}=e;r-n>0&&i.push({index:n,type:\"insert\",values:t.slice(n,r)});o-n>0&&i.push({index:n+(r-n),type:\"delete\",howMany:o-n});return i}(e,o)}function qo(t,e,i){for(let n=0;n<Math.max(t.length,e.length);n++)if(void 0===t[n]||void 0===e[n]||!i(t[n],e[n]))return n;return-1}function Yo(t,e){return t.slice(e).reverse()}function $o(t,e,i){i=i||function(t,e){return t===e};const n=t.length,o=e.length;if(n>200||o>200||n+o>300)return $o.fastDiff(t,e,i,!0);let r,s;if(o<n){const i=t;t=e,e=i,r=\"delete\",s=\"insert\"}else r=\"insert\",s=\"delete\";const a=t.length,c=e.length,l=c-a,d={},h={};function u(n){const o=(void 0!==h[n-1]?h[n-1]:-1)+1,l=void 0!==h[n+1]?h[n+1]:-1,u=o>l?-1:1;d[n+u]&&(d[n]=d[n+u].slice(0)),d[n]||(d[n]=[]),d[n].push(o>l?r:s);let f=Math.max(o,l),g=f-n;for(;g<a&&f<c&&i(t[g],e[f]);)g++,f++,d[n].push(\"equal\");return f}let f,g=0;do{for(f=-g;f<l;f++)h[f]=u(f);for(f=l+g;f>l;f--)h[f]=u(f);h[l]=u(l),g++}while(h[l]!==c);return d[l].slice(1)}function Go(t,e,i){t.insertBefore(i,t.childNodes[e]||null)}function Qo(t){const e=t.parentNode;e&&e.removeChild(t)}function Ko(t){if(t){if(t.defaultView)return t instanceof t.defaultView.Document;if(t.ownerDocument&&t.ownerDocument.defaultView)return t instanceof t.ownerDocument.defaultView.Node}return!1}$o.fastDiff=Wo;class Jo{constructor(t,e){this.domDocuments=new Set,this.domConverter=t,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=e,this.isFocused=!1,this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(t,e){if(\"text\"===t)this.domConverter.mapViewToDom(e.parent)&&this.markedTexts.add(e);else{if(!this.domConverter.mapViewToDom(e))return;if(\"attributes\"===t)this.markedAttributes.add(e);else{if(\"children\"!==t)throw new $i.b(\"view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.\",this);this.markedChildren.add(e)}}}render(){let t;for(const t of this.markedChildren)this._updateChildrenMappings(t);this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?t=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(t=this.selection.getFirstPosition(),this.markedChildren.add(t.parent));for(const t of this.markedAttributes)this._updateAttrs(t);for(const e of this.markedChildren)this._updateChildren(e,{inlineFillerPosition:t});for(const e of this.markedTexts)!this.markedChildren.has(e.parent)&&this.domConverter.mapViewToDom(e.parent)&&this._updateText(e,{inlineFillerPosition:t});if(t){const e=this.domConverter.viewPositionToDom(t),i=e.parent.ownerDocument;Bo(e.parent)?this._inlineFiller=e.parent:this._inlineFiller=Zo(i,e.parent,e.offset)}else this._inlineFiller=null;this._updateSelection(),this._updateFocus(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const i=this.domConverter.mapViewToDom(t).childNodes,n=Array.from(this.domConverter.viewChildrenToDom(t,e.ownerDocument,{withChildren:!1})),o=this._diffNodeLists(i,n),r=this._findReplaceActions(o,i,n);if(-1!==r.indexOf(\"replace\")){const e={equal:0,insert:0,delete:0};for(const o of r)if(\"replace\"===o){const o=e.equal+e.insert,r=e.equal+e.delete,s=t.getChild(o);s&&!s.is(\"uiElement\")&&this._updateElementMappings(s,i[r]),Qo(n[o]),e.equal++}else e[o]++}}_updateElementMappings(t,e){this.domConverter.unbindDomElement(e),this.domConverter.bindElements(e,t),this.markedChildren.add(t),this.markedAttributes.add(t)}_getInlineFillerPosition(){const t=this.selection.getFirstPosition();return t.parent.is(\"text\")?Zn._createBefore(this.selection.getFirstPosition().parent):t}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=this.domConverter.viewPositionToDom(t);return!!(e&&Do(e.parent)&&Bo(e.parent))}_removeInlineFiller(){const t=this._inlineFiller;if(!Bo(t))throw new $i.b(\"view-renderer-filler-was-lost: The inline filler node was lost.\",this);Fo(t)?t.parentNode.removeChild(t):t.data=t.data.substr(Vo),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=t.parent,i=t.offset;if(!this.domConverter.mapViewToDom(e.root))return!1;if(!e.is(\"element\"))return!1;if(!function(t){if(\"false\"==t.getAttribute(\"contenteditable\"))return!1;const e=t.findAncestor(t=>t.hasAttribute(\"contenteditable\"));return!e||\"true\"==e.getAttribute(\"contenteditable\")}(e))return!1;if(i===e.getFillerOffset())return!1;const n=t.nodeBefore,o=t.nodeAfter;return!(n instanceof fn||o instanceof fn)}_updateText(t,e){const i=this.domConverter.findCorrespondingDomText(t),n=this.domConverter.viewToDom(t,i.ownerDocument),o=i.data;let r=n.data;const s=e.inlineFillerPosition;if(s&&s.parent==t.parent&&s.offset==t.index&&(r=zo+r),o!=r){const t=Wo(o,r);for(const e of t)\"insert\"===e.type?i.insertData(e.index,e.values.join(\"\")):i.deleteData(e.index,e.howMany)}}_updateAttrs(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const i=Array.from(e.attributes).map(t=>t.name),n=t.getAttributeKeys();for(const i of n)e.setAttribute(i,t.getAttribute(i));for(const n of i)t.hasAttribute(n)||e.removeAttribute(n)}_updateChildren(t,e){const i=this.domConverter.mapViewToDom(t);if(!i)return;const n=e.inlineFillerPosition,o=this.domConverter.mapViewToDom(t).childNodes,r=Array.from(this.domConverter.viewChildrenToDom(t,i.ownerDocument,{bind:!0,inlineFillerPosition:n}));n&&n.parent===t&&Zo(i.ownerDocument,r,n.offset);const s=this._diffNodeLists(o,r);let a=0;const c=new Set;for(const t of s)\"insert\"===t?(Go(i,a,r[a]),a++):\"delete\"===t?(c.add(o[a]),Qo(o[a])):(this._markDescendantTextToSync(this.domConverter.domToView(r[a])),a++);for(const t of c)t.parentNode||this.domConverter.unbindDomElement(t)}_diffNodeLists(t,e){return $o(t=function(t,e){const i=Array.from(t);if(0==i.length||!e)return i;i[i.length-1]==e&&i.pop();return i}(t,this._fakeSelectionContainer),e,function(t,e,i){if(e===i)return!0;if(Do(e)&&Do(i))return e.data===i.data;if(t.isBlockFiller(e)&&t.isBlockFiller(i))return!0;return!1}.bind(null,this.domConverter))}_findReplaceActions(t,e,i){if(-1===t.indexOf(\"insert\")||-1===t.indexOf(\"delete\"))return t;let n=[],o=[],r=[];const s={equal:0,insert:0,delete:0};for(const a of t)\"insert\"===a?r.push(i[s.equal+s.insert]):\"delete\"===a?o.push(e[s.equal+s.delete]):((n=n.concat($o(o,r,Xo).map(t=>\"equal\"===t?\"replace\":t))).push(\"equal\"),o=[],r=[]),s[a]++;return n.concat($o(o,r,Xo).map(t=>\"equal\"===t?\"replace\":t))}_markDescendantTextToSync(t){if(t)if(t.is(\"text\"))this.markedTexts.add(t);else if(t.is(\"element\"))for(const e of t.getChildren())this._markDescendantTextToSync(e)}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const t=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&t&&(this.selection.isFake?this._updateFakeSelection(t):(this._removeFakeSelection(),this._updateDomSelection(t)))}_updateFakeSelection(t){const e=t.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(t){const e=t.createElement(\"div\");return Object.assign(e.style,{position:\"fixed\",top:0,left:\"-9999px\",width:\"42px\"}),e.textContent=\" \",e}(e));const i=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(i,this.selection),!this._fakeSelectionNeedsUpdate(t))return;i.parentElement&&i.parentElement==t||t.appendChild(i),i.textContent=this.selection.fakeSelectionLabel||\" \";const n=e.getSelection(),o=e.createRange();n.removeAllRanges(),o.selectNodeContents(i),n.addRange(o)}_updateDomSelection(t){const e=t.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(e))return;const i=this.domConverter.viewPositionToDom(this.selection.anchor),n=this.domConverter.viewPositionToDom(this.selection.focus);t.focus(),e.collapse(i.parent,i.offset),e.extend(n.parent,n.offset),go.isGecko&&function(t,e){const i=t.parent;if(i.nodeType!=Node.ELEMENT_NODE||t.offset!=i.childNodes.length-1)return;const n=i.childNodes[t.offset];n&&\"BR\"==n.tagName&&e.addRange(e.getRangeAt(0))}(n,e)}_domSelectionNeedsUpdate(t){if(!this.domConverter.isDomSelectionCorrect(t))return!0;const e=t&&this.domConverter.domSelectionToView(t);return(!e||!this.selection.isEqual(e))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(e))}_fakeSelectionNeedsUpdate(t){const e=this._fakeSelectionContainer,i=t.ownerDocument.getSelection();return!e||e.parentElement!==t||(i.anchorNode!==e&&!e.contains(i.anchorNode)||e.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const t of this.domDocuments){if(t.getSelection().rangeCount){const e=t.activeElement,i=this.domConverter.mapDomToView(e);e&&i&&t.getSelection().removeAllRanges()}}}_removeFakeSelection(){const t=this._fakeSelectionContainer;t&&t.remove()}_updateFocus(){if(this.isFocused){const t=this.selection.editableElement;t&&this.domConverter.focus(t)}}}function Zo(t,e,i){const n=e instanceof Array?e:e.childNodes,o=n[i];if(Do(o))return o.data=zo+o.data,o;{const o=t.createTextNode(zo);return Array.isArray(e)?n.splice(i,0,o):Go(e,i,o),o}}function Xo(t,e){return Ko(t)&&Ko(e)&&!Do(t)&&!Do(e)&&t.tagName.toLowerCase()===e.tagName.toLowerCase()}cn(Jo,Fn);var tr={window:window,document:document};function er(t){let e=0;for(;t.previousSibling;)t=t.previousSibling,e++;return e}function ir(t){const e=[];for(;t&&t.nodeType!=Node.DOCUMENT_NODE;)e.unshift(t),t=t.parentNode;return e}const nr=jo(document);class or{constructor(t={}){this.blockFillerMode=t.blockFillerMode||\"br\",this.preElements=[\"pre\"],this.blockElements=[\"p\",\"div\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"li\",\"dd\",\"dt\",\"figcaption\"],this._blockFiller=\"br\"==this.blockFillerMode?jo:Lo,this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(t,e){this._fakeSelectionMapping.set(t,new io(e))}fakeSelectionToView(t){return this._fakeSelectionMapping.get(t)}bindElements(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}unbindDomElement(t){const e=this._domToViewMapping.get(t);if(e){this._domToViewMapping.delete(t),this._viewToDomMapping.delete(e);for(const e of Array.from(t.childNodes))this.unbindDomElement(e)}}bindDocumentFragments(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}viewToDom(t,e,i={}){if(t.is(\"text\")){const i=this._processDataFromViewText(t);return e.createTextNode(i)}{if(this.mapViewToDom(t))return this.mapViewToDom(t);let n;if(t.is(\"documentFragment\"))n=e.createDocumentFragment(),i.bind&&this.bindDocumentFragments(n,t);else{if(t.is(\"uiElement\"))return n=t.render(e),i.bind&&this.bindElements(n,t),n;n=t.hasAttribute(\"xmlns\")?e.createElementNS(t.getAttribute(\"xmlns\"),t.name):e.createElement(t.name),i.bind&&this.bindElements(n,t);for(const e of t.getAttributeKeys())n.setAttribute(e,t.getAttribute(e))}if(i.withChildren||void 0===i.withChildren)for(const o of this.viewChildrenToDom(t,e,i))n.appendChild(o);return n}}*viewChildrenToDom(t,e,i={}){const n=t.getFillerOffset&&t.getFillerOffset();let o=0;for(const r of t.getChildren())n===o&&(yield this._blockFiller(e)),yield this.viewToDom(r,e,i),o++;n===o&&(yield this._blockFiller(e))}viewRangeToDom(t){const e=this.viewPositionToDom(t.start),i=this.viewPositionToDom(t.end),n=document.createRange();return n.setStart(e.parent,e.offset),n.setEnd(i.parent,i.offset),n}viewPositionToDom(t){const e=t.parent;if(e.is(\"text\")){const i=this.findCorrespondingDomText(e);if(!i)return null;let n=t.offset;return Bo(i)&&(n+=Vo),{parent:i,offset:n}}{let i,n,o;if(0===t.offset){if(!(i=this.mapViewToDom(e)))return null;o=i.childNodes[0]}else{const e=t.nodeBefore;if(!(n=e.is(\"text\")?this.findCorrespondingDomText(e):this.mapViewToDom(t.nodeBefore)))return null;i=n.parentNode,o=n.nextSibling}if(Do(o)&&Bo(o))return{parent:o,offset:Vo};return{parent:i,offset:n?er(n)+1:0}}}domToView(t,e={}){if(this.isBlockFiller(t,this.blockFillerMode))return null;const i=this.getParentUIElement(t,this._domToViewMapping);if(i)return i;if(Do(t)){if(Fo(t))return null;{const e=this._processDataFromDomText(t);return\"\"===e?null:new fn(e)}}if(this.isComment(t))return null;{if(this.mapDomToView(t))return this.mapDomToView(t);let i;if(this.isDocumentFragment(t))i=new Ao,e.bind&&this.bindDocumentFragments(t,i);else{const n=e.keepOriginalCase?t.tagName:t.tagName.toLowerCase();i=new _n(n),e.bind&&this.bindElements(t,i);const o=t.attributes;for(let t=o.length-1;t>=0;t--)i._setAttribute(o[t].name,o[t].value)}if(e.withChildren||void 0===e.withChildren)for(const n of this.domChildrenToView(t,e))i._appendChild(n);return i}}*domChildrenToView(t,e={}){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i],o=this.domToView(n,e);null!==o&&(yield o)}}domSelectionToView(t){if(1===t.rangeCount){let e=t.getRangeAt(0).startContainer;Do(e)&&(e=e.parentNode);const i=this.fakeSelectionToView(e);if(i)return i}const e=this.isDomSelectionBackward(t),i=[];for(let e=0;e<t.rangeCount;e++){const n=t.getRangeAt(e),o=this.domRangeToView(n);o&&i.push(o)}return new io(i,{backward:e})}domRangeToView(t){const e=this.domPositionToView(t.startContainer,t.startOffset),i=this.domPositionToView(t.endContainer,t.endOffset);return e&&i?new Xn(e,i):null}domPositionToView(t,e){if(this.isBlockFiller(t,this.blockFillerMode))return this.domPositionToView(t.parentNode,er(t));const i=this.mapDomToView(t);if(i&&i.is(\"uiElement\"))return Zn._createBefore(i);if(Do(t)){if(Fo(t))return this.domPositionToView(t.parentNode,er(t));const i=this.findCorrespondingViewText(t);let n=e;return i?(Bo(t)&&(n=(n-=Vo)<0?0:n),new Zn(i,n)):null}if(0===e){const e=this.mapDomToView(t);if(e)return new Zn(e,0)}else{const i=t.childNodes[e-1],n=Do(i)?this.findCorrespondingViewText(i):this.mapDomToView(i);if(n&&n.parent)return new Zn(n.parent,n.index+1)}return null}mapDomToView(t){return this.getParentUIElement(t)||this._domToViewMapping.get(t)}findCorrespondingViewText(t){if(Fo(t))return null;const e=this.getParentUIElement(t);if(e)return e;const i=t.previousSibling;if(i){if(!this.isElement(i))return null;const t=this.mapDomToView(i);if(t){return t.nextSibling instanceof fn?t.nextSibling:null}}else{const e=this.mapDomToView(t.parentNode);if(e){const t=e.getChild(0);return t instanceof fn?t:null}}return null}mapViewToDom(t){return this._viewToDomMapping.get(t)}findCorrespondingDomText(t){const e=t.previousSibling;return e&&this.mapViewToDom(e)?this.mapViewToDom(e).nextSibling:!e&&t.parent&&this.mapViewToDom(t.parent)?this.mapViewToDom(t.parent).childNodes[0]:null}focus(t){const e=this.mapViewToDom(t);if(e&&e.ownerDocument.activeElement!==e){const{scrollX:t,scrollY:i}=tr.window,n=[];sr(e,t=>{const{scrollLeft:e,scrollTop:i}=t;n.push([e,i])}),e.focus(),sr(e,t=>{const[e,i]=n.shift();t.scrollLeft=e,t.scrollTop=i}),tr.window.scrollTo(t,i)}}isElement(t){return t&&t.nodeType==Node.ELEMENT_NODE}isDocumentFragment(t){return t&&t.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(t){return t&&t.nodeType==Node.COMMENT_NODE}isBlockFiller(t){return\"br\"==this.blockFillerMode?t.isEqualNode(nr):function(t,e){return Do(t)&&\" \"==t.data&&function(t,e){const i=t.parentNode;return i&&i.tagName&&e.includes(i.tagName.toLowerCase())}(t,e)&&1===t.parentNode.childNodes.length}(t,this.blockElements)}isDomSelectionBackward(t){if(t.isCollapsed)return!1;const e=document.createRange();e.setStart(t.anchorNode,t.anchorOffset),e.setEnd(t.focusNode,t.focusOffset);const i=e.collapsed;return e.detach(),i}getParentUIElement(t){const e=ir(t);for(e.pop();e.length;){const t=e.pop(),i=this._domToViewMapping.get(t);if(i&&i.is(\"uiElement\"))return i}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}_isDomSelectionPositionCorrect(t,e){if(Do(t)&&Bo(t)&&e<Vo)return!1;if(this.isElement(t)&&Bo(t.childNodes[e]))return!1;const i=this.mapDomToView(t);return!i||!i.is(\"uiElement\")}_processDataFromViewText(t){let e=t.data;if(t.getAncestors().some(t=>this.preElements.includes(t.name)))return e;if(\" \"==e.charAt(0)){const i=this._getTouchingViewTextNode(t,!1);!(i&&this._nodeEndsWithSpace(i))&&i||(e=\" \"+e.substr(1))}if(\" \"==e.charAt(e.length-1)){const i=this._getTouchingViewTextNode(t,!0);\" \"!=e.charAt(e.length-2)&&i&&\" \"!=i.data.charAt(0)||(e=e.substr(0,e.length-1)+\" \")}return e.replace(/ {2}/g,\"  \")}_nodeEndsWithSpace(t){if(t.getAncestors().some(t=>this.preElements.includes(t.name)))return!1;const e=this._processDataFromViewText(t);return\" \"==e.charAt(e.length-1)}_processDataFromDomText(t){let e=t.data;if(rr(t,this.preElements))return Uo(t);e=e.replace(/[ \\n\\t\\r]{1,}/g,\" \");const i=this._getTouchingInlineDomNode(t,!1),n=this._getTouchingInlineDomNode(t,!0),o=this._checkShouldLeftTrimDomText(i),r=this._checkShouldRightTrimDomText(t,n);return o&&(e=e.replace(/^ /,\"\")),r&&(e=e.replace(/ $/,\"\")),e=(e=Uo(new Text(e))).replace(/ \\u00A0/g,\" \"),(/( |\\u00A0)\\u00A0$/.test(e)||!n||n.data&&\" \"==n.data.charAt(0))&&(e=e.replace(/\\u00A0$/,\" \")),o&&(e=e.replace(/^\\u00A0/,\" \")),e}_checkShouldLeftTrimDomText(t){return!t||(!!Wi(t)||/[^\\S\\u00A0]/.test(t.data.charAt(t.data.length-1)))}_checkShouldRightTrimDomText(t,e){return!e&&!Bo(t)}_getTouchingViewTextNode(t,e){const i=new Jn({startPosition:e?Zn._createAfter(t):Zn._createBefore(t),direction:e?\"forward\":\"backward\"});for(const t of i){if(t.item.is(\"containerElement\"))return null;if(t.item.is(\"br\"))return null;if(t.item.is(\"textProxy\"))return t.item}return null}_getTouchingInlineDomNode(t,e){if(!t.parentNode)return null;const i=e?\"nextNode\":\"previousNode\",n=t.ownerDocument,o=ir(t)[0],r=n.createTreeWalker(o,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:t=>Do(t)?NodeFilter.FILTER_ACCEPT:\"BR\"==t.tagName?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});r.currentNode=t;const s=r[i]();if(null!==s){const e=function(t,e){const i=ir(t),n=ir(e);let o=0;for(;i[o]==n[o]&&i[o];)o++;return 0===o?null:i[o-1]}(t,s);if(e&&!rr(t,this.blockElements,e)&&!rr(s,this.blockElements,e))return s}return null}}function rr(t,e,i){let n=ir(t);return i&&(n=n.slice(n.indexOf(i)+1)),n.some(t=>t.tagName&&e.includes(t.tagName.toLowerCase()))}function sr(t,e){for(;t&&t!=tr.document;)e(t),t=t.parentNode}function ar(t){const e=Object.prototype.toString.apply(t);return\"[object Window]\"==e||\"[object global]\"==e}var cr=Ln({},tn,{listenTo(t,...e){if(Ko(t)||ar(t)){const i=this._getProxyEmitter(t)||new lr(t);i.attach(...e),t=i}tn.listenTo.call(this,t,...e)},stopListening(t,e,i){if(Ko(t)||ar(t)){const e=this._getProxyEmitter(t);if(!e)return;t=e}tn.stopListening.call(this,t,e,i),t instanceof lr&&t.detach(e)},_getProxyEmitter(t){return function(t,e){return t[Zi]&&t[Zi][e]?t[Zi][e].emitter:null}(this,dr(t))}});class lr{constructor(t){en(this,dr(t)),this._domNode=t}}function dr(t){return t[\"data-ck-expando\"]||(t[\"data-ck-expando\"]=Ki())}Ln(lr.prototype,tn,{attach(t,e,i={}){if(this._domListeners&&this._domListeners[t])return;const n=this._createDomListener(t,!!i.useCapture);this._domNode.addEventListener(t,n,!!i.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[t]=n},detach(t){let e;!this._domListeners[t]||(e=this._events[t])&&e.callbacks.length||this._domListeners[t].removeListener()},_createDomListener(t,e){const i=e=>{this.fire(t,e)};return i.removeListener=(()=>{this._domNode.removeEventListener(t,i,e),delete this._domListeners[t]}),i}});class hr{constructor(t){this.view=t,this.document=t.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}}cn(hr,cr);var ur=\"__lodash_hash_undefined__\";var fr=function(t){return this.__data__.set(t,ur),this};var gr=function(t){return this.__data__.has(t)};function mr(t){var e=-1,i=null==t?0:t.length;for(this.__data__=new Pt;++e<i;)this.add(t[e])}mr.prototype.add=mr.prototype.push=fr,mr.prototype.has=gr;var pr=mr;var br=function(t,e){for(var i=-1,n=null==t?0:t.length;++i<n;)if(e(t[i],i,t))return!0;return!1};var wr=function(t,e){return t.has(e)},_r=1,kr=2;var vr=function(t,e,i,n,o,r){var s=i&_r,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var l=r.get(t);if(l&&r.get(e))return l==e;var d=-1,h=!0,u=i&kr?new pr:void 0;for(r.set(t,e),r.set(e,t);++d<a;){var f=t[d],g=e[d];if(n)var m=s?n(g,f,d,e,t,r):n(f,g,d,t,e,r);if(void 0!==m){if(m)continue;h=!1;break}if(u){if(!br(e,function(t,e){if(!wr(u,e)&&(f===t||o(f,t,i,n,r)))return u.push(e)})){h=!1;break}}else if(f!==g&&!o(f,g,i,n,r)){h=!1;break}}return r.delete(t),r.delete(e),h};var yr=function(t){var e=-1,i=Array(t.size);return t.forEach(function(t,n){i[++e]=[n,t]}),i};var xr=function(t){var e=-1,i=Array(t.size);return t.forEach(function(t){i[++e]=t}),i},Ar=1,Tr=2,Cr=\"[object Boolean]\",Pr=\"[object Date]\",Sr=\"[object Error]\",Mr=\"[object Map]\",Er=\"[object Number]\",Ir=\"[object RegExp]\",Nr=\"[object Set]\",Or=\"[object String]\",Rr=\"[object Symbol]\",Dr=\"[object ArrayBuffer]\",Lr=\"[object DataView]\",jr=o?o.prototype:void 0,Vr=jr?jr.valueOf:void 0;var zr=function(t,e,i,n,o,r,s){switch(i){case Lr:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Dr:return!(t.byteLength!=e.byteLength||!r(new Ye(t),new Ye(e)));case Cr:case Pr:case Er:return P(+t,+e);case Sr:return t.name==e.name&&t.message==e.message;case Ir:case Or:return t==e+\"\";case Mr:var a=yr;case Nr:var c=n&Ar;if(a||(a=xr),t.size!=e.size&&!c)return!1;var l=s.get(t);if(l)return l==e;n|=Tr,s.set(t,e);var d=vr(a(t),a(e),n,o,r,s);return s.delete(t),d;case Rr:if(Vr)return Vr.call(t)==Vr.call(e)}return!1},Br=1,Fr=Object.prototype.hasOwnProperty;var Ur=function(t,e,i,n,o,r){var s=i&Br,a=Ie(t),c=a.length;if(c!=Ie(e).length&&!s)return!1;for(var l=c;l--;){var d=a[l];if(!(s?d in e:Fr.call(e,d)))return!1}var h=r.get(t);if(h&&r.get(e))return h==e;var u=!0;r.set(t,e),r.set(e,t);for(var f=s;++l<c;){var g=t[d=a[l]],m=e[d];if(n)var p=s?n(m,g,d,e,t,r):n(g,m,d,t,e,r);if(!(void 0===p?g===m||o(g,m,i,n,r):p)){u=!1;break}f||(f=\"constructor\"==d)}if(u&&!f){var b=t.constructor,w=e.constructor;b!=w&&\"constructor\"in t&&\"constructor\"in e&&!(\"function\"==typeof b&&b instanceof b&&\"function\"==typeof w&&w instanceof w)&&(u=!1)}return r.delete(t),r.delete(e),u},Hr=1,Wr=\"[object Arguments]\",qr=\"[object Array]\",Yr=\"[object Object]\",$r=Object.prototype.hasOwnProperty;var Gr=function(t,e,i,n,o,r){var s=qt(t),a=qt(e),c=s?qr:He(t),l=a?qr:He(e),d=(c=c==Wr?Yr:c)==Yr,h=(l=l==Wr?Yr:l)==Yr,u=c==l;if(u&&Object(Yt.a)(t)){if(!Object(Yt.a)(e))return!1;s=!0,d=!1}if(u&&!d)return r||(r=new It),s||ne(t)?vr(t,e,i,n,o,r):zr(t,e,c,i,n,o,r);if(!(i&Hr)){var f=d&&$r.call(t,\"__wrapped__\"),g=h&&$r.call(e,\"__wrapped__\");if(f||g){var m=f?t.value():t,p=g?e.value():e;return r||(r=new It),o(m,p,i,n,r)}}return!!u&&(r||(r=new It),Ur(t,e,i,n,o,r))};var Qr=function t(e,i,n,o,r){return e===i||(null==e||null==i||!w(e)&&!w(i)?e!=e&&i!=i:Gr(e,i,n,o,t,r))};var Kr=function(t,e,i){var n=(i=\"function\"==typeof i?i:void 0)?i(t,e):void 0;return void 0===n?Qr(t,e,void 0,i):!!n};class Jr extends hr{constructor(t){super(t),this._config={childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},this.domConverter=t.domConverter,this.renderer=t._renderer,this._domElements=[],this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(t){this._domElements.push(t),this.isEnabled&&this._mutationObserver.observe(t,this._config)}enable(){super.enable();for(const t of this._domElements)this._mutationObserver.observe(t,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(t){if(0===t.length)return;const e=this.domConverter,i=new Map,n=new Set;for(const i of t)if(\"childList\"===i.type){const t=e.mapDomToView(i.target);if(t&&t.is(\"uiElement\"))continue;t&&!this._isBogusBrMutation(i)&&n.add(t)}for(const o of t){const t=e.mapDomToView(o.target);if((!t||!t.is(\"uiElement\"))&&\"characterData\"===o.type){const t=e.findCorrespondingViewText(o.target);t&&!n.has(t.parent)?i.set(t,{type:\"text\",oldText:t.data,newText:Uo(o.target),node:t}):!t&&Bo(o.target)&&n.add(e.mapDomToView(o.target.parentNode))}}const o=[];for(const t of i.values())this.renderer.markToSync(\"text\",t.node),o.push(t);for(const t of n){const i=e.mapViewToDom(t),n=Array.from(t.getChildren()),r=Array.from(e.domChildrenToView(i,{withChildren:!1}));Kr(n,r,a)||(this.renderer.markToSync(\"children\",t),o.push({type:\"children\",oldChildren:n,newChildren:r,node:t}))}const r=t[0].target.ownerDocument.getSelection();let s=null;if(r&&r.anchorNode){const t=e.domPositionToView(r.anchorNode,r.anchorOffset),i=e.domPositionToView(r.focusNode,r.focusOffset);t&&i&&(s=new io(t)).setFocus(i)}function a(t,e){if(!Array.isArray(t))return t===e||!(!t.is(\"text\")||!e.is(\"text\"))&&t.data===e.data}this.document.fire(\"mutations\",o,s),this.view.forceRender()}_isBogusBrMutation(t){let e=null;return null===t.nextSibling&&0===t.removedNodes.length&&1==t.addedNodes.length&&(e=this.domConverter.domToView(t.addedNodes[0],{withChildren:!1})),e&&e.is(\"element\",\"br\")}}class Zr{constructor(t,e,i){this.view=t,this.document=t.document,this.domEvent=e,this.domTarget=e.target,Ln(this,i)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Xr extends hr{constructor(t){super(t),this.useCapture=!1}observe(t){(\"string\"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach(e=>{this.listenTo(t,e,(t,e)=>{this.isEnabled&&this.onDomEvent(e)},{useCapture:this.useCapture})})}fire(t,e,i){this.isEnabled&&this.document.fire(t,new Zr(this.view,e,i))}}class ts extends Xr{constructor(t){super(t),this.domEventType=[\"keydown\",\"keyup\"]}onDomEvent(t){this.fire(t.type,t,{keyCode:t.keyCode,altKey:t.altKey,ctrlKey:t.ctrlKey||t.metaKey,shiftKey:t.shiftKey,get keystroke(){return wo(this)}})}}var es=function(){return n.a.Date.now()},is=\"[object Symbol]\";var ns=function(t){return\"symbol\"==typeof t||w(t)&&m(t)==is},os=NaN,rs=/^\\s+|\\s+$/g,ss=/^[-+]0x[0-9a-f]+$/i,as=/^0b[01]+$/i,cs=/^0o[0-7]+$/i,ls=parseInt;var ds=function(t){if(\"number\"==typeof t)return t;if(ns(t))return os;if(B(t)){var e=\"function\"==typeof t.valueOf?t.valueOf():t;t=B(e)?e+\"\":e}if(\"string\"!=typeof t)return 0===t?t:+t;t=t.replace(rs,\"\");var i=as.test(t);return i||cs.test(t)?ls(t.slice(2),i?2:8):ss.test(t)?os:+t},hs=\"Expected a function\",us=Math.max,fs=Math.min;var gs=function(t,e,i){var n,o,r,s,a,c,l=0,d=!1,h=!1,u=!0;if(\"function\"!=typeof t)throw new TypeError(hs);function f(e){var i=n,r=o;return n=o=void 0,l=e,s=t.apply(r,i)}function g(t){var i=t-c;return void 0===c||i>=e||i<0||h&&t-l>=r}function m(){var t=es();if(g(t))return p(t);a=setTimeout(m,function(t){var i=e-(t-c);return h?fs(i,r-(t-l)):i}(t))}function p(t){return a=void 0,u&&n?f(t):(n=o=void 0,s)}function b(){var t=es(),i=g(t);if(n=arguments,o=this,c=t,i){if(void 0===a)return function(t){return l=t,a=setTimeout(m,e),d?f(t):s}(c);if(h)return clearTimeout(a),a=setTimeout(m,e),f(c)}return void 0===a&&(a=setTimeout(m,e)),s}return e=ds(e)||0,B(i)&&(d=!!i.leading,r=(h=\"maxWait\"in i)?us(ds(i.maxWait)||0,e):r,u=\"trailing\"in i?!!i.trailing:u),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=o=a=void 0},b.flush=function(){return void 0===a?s:p(es())},b};class ms extends hr{constructor(t){super(t),this._fireSelectionChangeDoneDebounced=gs(t=>this.document.fire(\"selectionChangeDone\",t),200)}observe(){const t=this.document;t.on(\"keydown\",(e,i)=>{t.selection.isFake&&function(t){return t==bo.arrowright||t==bo.arrowleft||t==bo.arrowup||t==bo.arrowdown}(i.keyCode)&&this.isEnabled&&(i.preventDefault(),this._handleSelectionMove(i.keyCode))},{priority:\"lowest\"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(t){const e=this.document.selection,i=new io(e.getRanges(),{backward:e.isBackward,fake:!1});t!=bo.arrowleft&&t!=bo.arrowup||i.setTo(i.getFirstPosition()),t!=bo.arrowright&&t!=bo.arrowdown||i.setTo(i.getLastPosition());const n={oldSelection:e,newSelection:i,domSelection:null};this.document.fire(\"selectionChange\",n),this._fireSelectionChangeDoneDebounced(n)}}class ps extends hr{constructor(t){super(t),this.mutationObserver=t.getObserver(Jr),this.selection=this.document.selection,this.domConverter=t.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=gs(t=>this.document.fire(\"selectionChangeDone\",t),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(t){const e=t.ownerDocument;this._documents.has(e)||(this.listenTo(e,\"selectionchange\",()=>{this._handleSelectionChange(e)}),this._documents.add(e))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(t){if(!this.isEnabled||!this.document.isFocused&&!this.document.isReadOnly)return;this.mutationObserver.flush();const e=t.defaultView.getSelection(),i=this.domConverter.domSelectionToView(e);if(!(this.selection.isEqual(i)&&this.domConverter.isDomSelectionCorrect(e)||++this._loopbackCounter>60))if(this.selection.isSimilar(i))this.view.forceRender();else{const t={oldSelection:this.selection,newSelection:i,domSelection:e};this.document.fire(\"selectionChange\",t),this._fireSelectionChangeDoneDebounced(t)}}_clearInfiniteLoop(){this._loopbackCounter=0}}class bs extends Xr{constructor(t){super(t),this.domEventType=[\"focus\",\"blur\"],this.useCapture=!0;const e=this.document;e.on(\"focus\",()=>{e.isFocused=!0,this._renderTimeoutId=setTimeout(()=>t.forceRender(),50)}),e.on(\"blur\",(i,n)=>{const o=e.selection.editableElement;null!==o&&o!==n.target||(e.isFocused=!1,t.forceRender())})}onDomEvent(t){this.fire(t.type,t)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class ws extends Xr{constructor(t){super(t),this.domEventType=[\"compositionstart\",\"compositionupdate\",\"compositionend\"];const e=this.document;e.on(\"compositionstart\",()=>{e.isComposing=!0}),e.on(\"compositionend\",()=>{e.isComposing=!1})}onDomEvent(t){this.fire(t.type,t)}}class _s extends Xr{constructor(t){super(t),this.domEventType=[\"beforeinput\"]}onDomEvent(t){this.fire(t.type,t)}}function ks(t){return\"[object Range]\"==Object.prototype.toString.apply(t)}function vs(t){const e=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}const ys=[\"top\",\"right\",\"bottom\",\"left\",\"width\",\"height\"];class xs{constructor(t){const e=ks(t);if(Object.defineProperty(this,\"_source\",{value:t._source||t,writable:!0,enumerable:!1}),Wi(t)||e)As(this,e?xs.getDomRangeRects(t)[0]:t.getBoundingClientRect());else if(ar(t)){const{innerWidth:e,innerHeight:i}=t;As(this,{top:0,right:e,bottom:i,left:0,width:e,height:i})}else As(this,t)}clone(){return new xs(this)}moveTo(t,e){return this.top=e,this.right=t+this.width,this.bottom=e+this.height,this.left=t,this}moveBy(t,e){return this.top+=e,this.right+=t,this.left+=t,this.bottom+=e,this}getIntersection(t){const e={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left)};return e.width=e.right-e.left,e.height=e.bottom-e.top,e.width<0||e.height<0?null:new xs(e)}getIntersectionArea(t){const e=this.getIntersection(t);return e?e.getArea():0}getArea(){return this.width*this.height}getVisible(){const t=this._source;let e=this.clone();if(!Ts(t)){let i=t.parentNode||t.commonAncestorContainer;for(;i&&!Ts(i);){const t=new xs(i),n=e.getIntersection(t);if(!n)return null;n.getArea()<e.getArea()&&(e=n),i=i.parentNode}}return e}isEqual(t){for(const e of ys)if(this[e]!==t[e])return!1;return!0}contains(t){const e=this.getIntersection(t);return!(!e||!e.isEqual(t))}excludeScrollbarsAndBorders(){const t=this._source;let e,i,n;if(ar(t))e=t.innerWidth-t.document.documentElement.clientWidth,i=t.innerHeight-t.document.documentElement.clientHeight,n=t.getComputedStyle(t.document.documentElement).direction;else{const o=vs(this._source);e=t.offsetWidth-t.clientWidth-o.left-o.right,i=t.offsetHeight-t.clientHeight-o.top-o.bottom,n=t.ownerDocument.defaultView.getComputedStyle(t).direction,this.left+=o.left,this.top+=o.top,this.right-=o.right,this.bottom-=o.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=e,\"ltr\"===n?this.right-=e:this.left+=e,this.height-=i,this.bottom-=i,this}static getDomRangeRects(t){const e=[],i=Array.from(t.getClientRects());if(i.length)for(const t of i)e.push(new xs(t));else{let i=t.startContainer;Do(i)&&(i=i.parentNode);const n=new xs(i.getBoundingClientRect());n.right=n.left,n.width=0,e.push(n)}return e}}function As(t,e){for(const i of ys)t[i]=e[i]}function Ts(t){return!!Wi(t)&&t===t.ownerDocument.body}function Cs({target:t,viewportOffset:e=0}){const i=Os(t);let n=i,o=null;for(;n;){let r;Ss(r=Rs(n==i?t:o),()=>Ds(t,n));const s=Ds(t,n);if(Ps(n,s,e),n.parent!=n){if(o=n.frameElement,n=n.parent,!o)return}else n=null}}function Ps(t,e,i){const n=e.clone().moveBy(0,i),o=e.clone().moveBy(0,-i),r=new xs(t).excludeScrollbarsAndBorders();if(![o,n].every(t=>r.contains(t))){let{scrollX:s,scrollY:a}=t;Es(o,r)?a-=r.top-e.top+i:Ms(n,r)&&(a+=e.bottom-r.bottom+i),Is(e,r)?s-=r.left-e.left+i:Ns(e,r)&&(s+=e.right-r.right+i),t.scrollTo(s,a)}}function Ss(t,e){const i=Os(t);let n,o;for(;t!=i.document.body;)o=e(),(n=new xs(t).excludeScrollbarsAndBorders()).contains(o)||(Es(o,n)?t.scrollTop-=n.top-o.top:Ms(o,n)&&(t.scrollTop+=o.bottom-n.bottom),Is(o,n)?t.scrollLeft-=n.left-o.left:Ns(o,n)&&(t.scrollLeft+=o.right-n.right)),t=t.parentNode}function Ms(t,e){return t.bottom>e.bottom}function Es(t,e){return t.top<e.top}function Is(t,e){return t.left<e.left}function Ns(t,e){return t.right>e.right}function Os(t){return ks(t)?t.startContainer.ownerDocument.defaultView:t.ownerDocument.defaultView}function Rs(t){if(ks(t)){let e=t.commonAncestorContainer;return Do(e)&&(e=e.parentNode),e}return t.parentNode}function Ds(t,e){const i=Os(t),n=new xs(t);if(i===e)return n;{let t=i;for(;t!=e;){const e=t.frameElement,i=new xs(e).excludeScrollbarsAndBorders();n.moveBy(i.left,i.top),t=t.parent}}return n}Object.assign({},{scrollViewportToShowTarget:Cs,scrollAncestorsToShowTarget:function(t){Ss(Rs(t),()=>new xs(t))}});class Ls{constructor(){this.document=new ro,this.domConverter=new or,this.domRoots=new Map,this.set(\"isRenderingInProgress\",!1),this._renderer=new Jo(this.domConverter,this.document.selection),this._renderer.bind(\"isFocused\").to(this.document),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new To(this.document),this.addObserver(Jr),this.addObserver(ps),this.addObserver(bs),this.addObserver(ts),this.addObserver(ms),this.addObserver(ws),go.isAndroid&&this.addObserver(_s),function(t){t.document.on(\"keydown\",Ho)}(this),yo(this),this.on(\"render\",()=>{this._render(),this.document.fire(\"layoutChanged\"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,\"change\",()=>{this._hasChangedSinceTheLastRendering=!0})}attachDomRoot(t,e=\"main\"){const i=this.document.getRoot(e);i._name=t.tagName.toLowerCase();const n={};for(const{name:e,value:o}of Array.from(t.attributes))n[e]=o,\"class\"===e?this._writer.addClass(o.split(\" \"),i):this._writer.setAttribute(e,o,i);this._initialDomRootAttributes.set(t,n);const o=()=>{this._writer.setAttribute(\"contenteditable\",!i.isReadOnly,i),i.isReadOnly?this._writer.addClass(\"ck-read-only\",i):this._writer.removeClass(\"ck-read-only\",i)};o(),this.domRoots.set(e,t),this.domConverter.bindElements(t,i),this._renderer.markToSync(\"children\",i),this._renderer.markToSync(\"attributes\",i),this._renderer.domDocuments.add(t.ownerDocument),i.on(\"change:children\",(t,e)=>this._renderer.markToSync(\"children\",e)),i.on(\"change:attributes\",(t,e)=>this._renderer.markToSync(\"attributes\",e)),i.on(\"change:text\",(t,e)=>this._renderer.markToSync(\"text\",e)),i.on(\"change:isReadOnly\",()=>this.change(o)),i.on(\"change\",()=>{this._hasChangedSinceTheLastRendering=!0});for(const i of this._observers.values())i.observe(t,e)}detachDomRoot(t){const e=this.domRoots.get(t);Array.from(e.attributes).forEach(({name:t})=>e.removeAttribute(t));const i=this._initialDomRootAttributes.get(e);for(const t in i)e.setAttribute(t,i[t]);this.domRoots.delete(t),this.domConverter.unbindDomElement(e)}getDomRoot(t=\"main\"){return this.domRoots.get(t)}addObserver(t){let e=this._observers.get(t);if(e)return e;e=new t(this),this._observers.set(t,e);for(const[t,i]of this.domRoots)e.observe(i,t);return e.enable(),e}getObserver(t){return this._observers.get(t)}disableObservers(){for(const t of this._observers.values())t.disable()}enableObservers(){for(const t of this._observers.values())t.enable()}scrollToTheSelection(){const t=this.document.selection.getFirstRange();t&&Cs({target:this.domConverter.viewRangeToDom(t),viewportOffset:20})}focus(){if(!this.document.isFocused){const t=this.document.selection.editableElement;t&&(this.domConverter.focus(t),this.forceRender())}}change(t){if(this.isRenderingInProgress||this._postFixersInProgress)throw new $i.b(\"cannot-change-view-tree: Attempting to make changes to the view when it is in an incorrect state: rendering or post-fixers are in progress. This may cause some unexpected behavior and inconsistency between the DOM and the view.\",this);try{if(this._ongoingChange)return t(this._writer);this._ongoingChange=!0;const e=t(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire(\"render\")),e}catch(t){$i.b.rethrowUnexpectedError(t,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change(()=>{})}destroy(){for(const t of this._observers.values())t.destroy();this.document.destroy(),this.stopListening()}createPositionAt(t,e){return Zn._createAt(t,e)}createPositionAfter(t){return Zn._createAfter(t)}createPositionBefore(t){return Zn._createBefore(t)}createRange(t,e){return new Xn(t,e)}createRangeOn(t){return Xn._createOn(t)}createRangeIn(t){return Xn._createIn(t)}createSelection(t,e,i){return new io(t,e,i)}_disableRendering(t){this._renderingDisabled=t,0==t&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}function js(t){return T(t)?mn(t):new Map(t)}cn(Ls,Fn);class Vs{constructor(t){this.parent=null,this._attrs=js(t)}get index(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildIndex(this)))throw new $i.b(\"model-node-not-found-in-parent: The node's parent does not contain this node.\",this);return t}get startOffset(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildStartOffset(this)))throw new $i.b(\"model-node-not-found-in-parent: The node's parent does not contain this node.\",this);return t}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}get document(){return this.root==this?null:this.root.document||null}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.startOffset),e=e.parent;return t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let i=t.includeSelf?this:this.parent;for(;i;)e[t.parentFirst?\"push\":\"unshift\"](i),i=i.parent;return e}getCommonAncestor(t,e={}){const i=this.getAncestors(e),n=t.getAncestors(e);let o=0;for(;i[o]==n[o]&&i[o];)o++;return 0===o?null:i[o-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),i=t.getPath(),n=ln(e,i);switch(n){case\"prefix\":return!0;case\"extension\":return!1;default:return e[n]<i[n]}}isAfter(t){return this!=t&&(this.root===t.root&&!this.isBefore(t))}hasAttribute(t){return this._attrs.has(t)}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const t={};return this._attrs.size&&(t.attributes=Array.from(this._attrs).reduce((t,e)=>(t[e[0]]=e[1],t),{})),t}is(t){return\"node\"==t||\"model:node\"==t}_clone(){return new Vs(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(t,e){this._attrs.set(t,e)}_setAttributesTo(t){this._attrs=js(t)}_removeAttribute(t){return this._attrs.delete(t)}_clearAttributes(){this._attrs.clear()}}class zs extends Vs{constructor(t,e){super(e),this._data=t||\"\"}get offsetSize(){return this.data.length}get data(){return this._data}is(t){return\"text\"==t||\"model:text\"==t||super.is(t)}toJSON(){const t=super.toJSON();return t.data=this.data,t}_clone(){return new zs(this.data,this.getAttributes())}static fromJSON(t){return new zs(t.data,t.attributes)}}class Bs{constructor(t,e,i){if(this.textNode=t,e<0||e>t.offsetSize)throw new $i.b(\"model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.\",this);if(i<0||e+i>t.offsetSize)throw new $i.b(\"model-textproxy-wrong-length: Given length value is incorrect.\",this);this.data=t.data.substring(e,e+i),this.offsetInText=e}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(t){return\"textProxy\"==t||\"model:textProxy\"==t}getPath(){const t=this.textNode.getPath();return t.length>0&&(t[t.length-1]+=this.offsetInText),t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let i=t.includeSelf?this:this.parent;for(;i;)e[t.parentFirst?\"push\":\"unshift\"](i),i=i.parent;return e}hasAttribute(t){return this.textNode.hasAttribute(t)}getAttribute(t){return this.textNode.getAttribute(t)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}class Fs{constructor(t){this._nodes=[],t&&this._insertNodes(0,t)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((t,e)=>t+e.offsetSize,0)}getNode(t){return this._nodes[t]||null}getNodeIndex(t){const e=this._nodes.indexOf(t);return-1==e?null:e}getNodeStartOffset(t){const e=this.getNodeIndex(t);return null===e?null:this._nodes.slice(0,e).reduce((t,e)=>t+e.offsetSize,0)}indexToOffset(t){if(t==this._nodes.length)return this.maxOffset;const e=this._nodes[t];if(!e)throw new $i.b(\"model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.\",this);return this.getNodeStartOffset(e)}offsetToIndex(t){let e=0;for(const i of this._nodes){if(t>=e&&t<e+i.offsetSize)return this.getNodeIndex(i);e+=i.offsetSize}if(e!=t)throw new $i.b(\"model-nodelist-offset-out-of-bounds: Given offset cannot be found in the node list.\",this,{offset:t,nodeList:this});return this.length}_insertNodes(t,e){for(const t of e)if(!(t instanceof Vs))throw new $i.b(\"model-nodelist-insertNodes-not-node: Trying to insert an object which is not a Node instance.\",this);this._nodes.splice(t,0,...e)}_removeNodes(t,e=1){return this._nodes.splice(t,e)}toJSON(){return this._nodes.map(t=>t.toJSON())}}class Us extends Vs{constructor(t,e,i){super(e),this.name=t,this._children=new Fs,i&&this._insertChild(0,i)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(t,e=null){const i=t.replace(/^model:/,\"\");return e?\"element\"==i&&e==this.name:\"element\"==i||i==this.name||super.is(t)}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}offsetToIndex(t){return this._children.offsetToIndex(t)}getNodeByPath(t){let e=this;for(const i of t)e=e.getChild(e.offsetToIndex(i));return e}toJSON(){const t=super.toJSON();if(t.name=this.name,this._children.length>0){t.children=[];for(const e of this._children)t.children.push(e.toJSON())}return t}_clone(t=!1){const e=t?Array.from(this._children).map(t=>t._clone(!0)):null;return new Us(this.name,this.getAttributes(),e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const i=function(t){if(\"string\"==typeof t)return[new zs(t)];pn(t)||(t=[t]);return Array.from(t).map(t=>\"string\"==typeof t?new zs(t):t instanceof Bs?new zs(t.data,t.getAttributes()):t)}(e);for(const t of i)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,i)}_removeChildren(t,e=1){const i=this._children._removeNodes(t,e);for(const t of i)t.parent=null;return i}static fromJSON(t){let e=null;if(t.children){e=[];for(const i of t.children)i.name?e.push(Us.fromJSON(i)):e.push(zs.fromJSON(i))}return new Us(t.name,t.attributes,e)}}class Hs{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new $i.b(\"model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.\",null);const e=t.direction||\"forward\";if(\"forward\"!=e&&\"backward\"!=e)throw new $i.b(\"model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.\",t,{direction:e});this.direction=e,this.boundaries=t.boundaries||null,t.startPosition?this.position=t.startPosition.clone():this.position=Ys._createAt(this.boundaries[\"backward\"==this.direction?\"end\":\"start\"]),this.position.stickiness=\"toNone\",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(t){let e,i,n,o;do{n=this.position,o=this._visitedParent,({done:e,value:i}=this.next())}while(!e&&t(i));e||(this.position=n,this._visitedParent=o)}next(){return\"forward\"==this.direction?this._next():this._previous()}_next(){const t=this.position,e=this.position.clone(),i=this._visitedParent;if(null===i.parent&&e.offset===i.maxOffset)return{done:!0};if(i===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};const n=e.textNode?e.textNode:e.nodeAfter;if(n instanceof Us)return this.shallow?e.offset++:(e.path.push(0),this._visitedParent=n),this.position=e,Ws(\"elementStart\",n,t,e,1);if(n instanceof zs){let o;if(this.singleCharacters)o=1;else{let t=n.endOffset;this._boundaryEndParent==i&&this.boundaries.end.offset<t&&(t=this.boundaries.end.offset),o=t-e.offset}const r=e.offset-n.startOffset,s=new Bs(n,r,o);return e.offset+=o,this.position=e,Ws(\"text\",s,t,e,o)}return e.path.pop(),e.offset++,this.position=e,this._visitedParent=i.parent,this.ignoreElementEnd?this._next():Ws(\"elementEnd\",i,t,e)}_previous(){const t=this.position,e=this.position.clone(),i=this._visitedParent;if(null===i.parent&&0===e.offset)return{done:!0};if(i==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};const n=e.textNode?e.textNode:e.nodeBefore;if(n instanceof Us)return e.offset--,this.shallow?(this.position=e,Ws(\"elementStart\",n,t,e,1)):(e.path.push(n.maxOffset),this.position=e,this._visitedParent=n,this.ignoreElementEnd?this._previous():Ws(\"elementEnd\",n,t,e));if(n instanceof zs){let o;if(this.singleCharacters)o=1;else{let t=n.startOffset;this._boundaryStartParent==i&&this.boundaries.start.offset>t&&(t=this.boundaries.start.offset),o=e.offset-t}const r=e.offset-n.startOffset,s=new Bs(n,r-o,o);return e.offset-=o,this.position=e,Ws(\"text\",s,t,e,o)}return e.path.pop(),this.position=e,this._visitedParent=i.parent,Ws(\"elementStart\",i,t,e,1)}}function Ws(t,e,i,n,o){return{done:!1,value:{type:t,item:e,previousPosition:i,nextPosition:n,length:o}}}var qs=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};class Ys{constructor(t,e,i=\"toNone\"){if(!t.is(\"element\")&&!t.is(\"documentFragment\"))throw new $i.b(\"model-position-root-invalid: Position root invalid.\",t);if(!(e instanceof Array)||0===e.length)throw new $i.b(\"model-position-path-incorrect-format: Position path must be an array with at least one item.\",t,{path:e});e=t.getPath().concat(e),t=t.root,this.root=t,this.path=e,this.stickiness=i}get offset(){return qs(this.path)}set offset(t){this.path[this.path.length-1]=t}get parent(){let t=this.root;for(let e=0;e<this.path.length-1;e++)if(!(t=t.getChild(t.offsetToIndex(this.path[e]))))throw new $i.b(\"model-position-path-incorrect: The position's path is incorrect.\",this,{position:this});if(t.is(\"text\"))throw new $i.b(\"model-position-path-incorrect: The position's path is incorrect.\",this,{position:this});return t}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){const t=this.parent.getChild(this.index);return t instanceof zs&&t.startOffset<this.offset?t:null}get nodeAfter(){return null===this.textNode?this.parent.getChild(this.index):null}get nodeBefore(){return null===this.textNode?this.parent.getChild(this.index-1):null}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(t){if(this.root!=t.root)return\"different\";const e=ln(this.path,t.path);switch(e){case\"same\":return\"same\";case\"prefix\":return\"before\";case\"extension\":return\"after\";default:return this.path[e]<t.path[e]?\"before\":\"after\"}}getLastMatchingPosition(t,e={}){e.startPosition=this;const i=new Hs(e);return i.skip(t),i.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){return this.parent.is(\"documentFragment\")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonPath(t){if(this.root!=t.root)return[];const e=ln(this.path,t.path),i=\"string\"==typeof e?Math.min(this.path.length,t.path.length):e;return this.path.slice(0,i)}getCommonAncestor(t){const e=this.getAncestors(),i=t.getAncestors();let n=0;for(;e[n]==i[n]&&e[n];)n++;return 0===n?null:e[n-1]}getShiftedBy(t){const e=this.clone(),i=e.offset+t;return e.offset=i<0?0:i,e}isAfter(t){return\"after\"==this.compareWith(t)}isBefore(t){return\"before\"==this.compareWith(t)}isEqual(t){return\"same\"==this.compareWith(t)}isTouching(t){let e=null,i=null;switch(this.compareWith(t)){case\"same\":return!0;case\"before\":e=Ys._createAt(this),i=Ys._createAt(t);break;case\"after\":e=Ys._createAt(t),i=Ys._createAt(this);break;default:return!1}let n=e.parent;for(;e.path.length+i.path.length;){if(e.isEqual(i))return!0;if(e.path.length>i.path.length){if(e.offset!==n.maxOffset)return!1;e.path=e.path.slice(0,-1),n=n.parent,e.offset++}else{if(0!==i.offset)return!1;i.path=i.path.slice(0,-1)}}}is(t){return\"position\"==t||\"model:position\"==t}hasSameParentAs(t){if(this.root!==t.root)return!1;return\"same\"==ln(this.getParentPath(),t.getParentPath())}getTransformedByOperation(t){let e;switch(t.type){case\"insert\":e=this._getTransformedByInsertOperation(t);break;case\"move\":case\"remove\":case\"reinsert\":e=this._getTransformedByMoveOperation(t);break;case\"split\":e=this._getTransformedBySplitOperation(t);break;case\"merge\":e=this._getTransformedByMergeOperation(t);break;default:e=Ys._createAt(this)}return e}_getTransformedByInsertOperation(t){return this._getTransformedByInsertion(t.position,t.howMany)}_getTransformedByMoveOperation(t){return this._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany)}_getTransformedBySplitOperation(t){const e=t.movedRange;return e.containsPosition(this)||e.start.isEqual(this)&&\"toNext\"==this.stickiness?this._getCombined(t.splitPosition,t.moveTargetPosition):t.graveyardPosition?this._getTransformedByMove(t.graveyardPosition,t.insertionPosition,1):this._getTransformedByInsertion(t.insertionPosition,1)}_getTransformedByMergeOperation(t){const e=t.movedRange;let i;return e.containsPosition(this)||e.start.isEqual(this)?(i=this._getCombined(t.sourcePosition,t.targetPosition),t.sourcePosition.isBefore(t.targetPosition)&&(i=i._getTransformedByDeletion(t.deletionPosition,1))):i=this.isEqual(t.deletionPosition)?Ys._createAt(t.deletionPosition):this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1),i}_getTransformedByDeletion(t,e){const i=Ys._createAt(this);if(this.root!=t.root)return i;if(\"same\"==ln(t.getParentPath(),this.getParentPath())){if(t.offset<this.offset){if(t.offset+e>this.offset)return null;i.offset-=e}}else if(\"prefix\"==ln(t.getParentPath(),this.getParentPath())){const n=t.path.length-1;if(t.offset<=this.path[n]){if(t.offset+e>this.path[n])return null;i.path[n]-=e}}return i}_getTransformedByInsertion(t,e){const i=Ys._createAt(this);if(this.root!=t.root)return i;if(\"same\"==ln(t.getParentPath(),this.getParentPath()))(t.offset<this.offset||t.offset==this.offset&&\"toPrevious\"!=this.stickiness)&&(i.offset+=e);else if(\"prefix\"==ln(t.getParentPath(),this.getParentPath())){const n=t.path.length-1;t.offset<=this.path[n]&&(i.path[n]+=e)}return i}_getTransformedByMove(t,e,i){if(e=e._getTransformedByDeletion(t,i),t.isEqual(e))return Ys._createAt(this);const n=this._getTransformedByDeletion(t,i);return null===n||t.isEqual(this)&&\"toNext\"==this.stickiness||t.getShiftedBy(i).isEqual(this)&&\"toPrevious\"==this.stickiness?this._getCombined(t,e):n._getTransformedByInsertion(e,i)}_getCombined(t,e){const i=t.path.length-1,n=Ys._createAt(e);return n.stickiness=this.stickiness,n.offset=n.offset+this.path[i]-t.offset,n.path=n.path.concat(this.path.slice(i+1)),n}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(t,e,i=\"toNone\"){if(t instanceof Ys)return new Ys(t.root,t.path,t.stickiness);{const n=t;if(\"end\"==e)e=n.maxOffset;else{if(\"before\"==e)return this._createBefore(n,i);if(\"after\"==e)return this._createAfter(n,i);if(0!==e&&!e)throw new $i.b(\"model-createPositionAt-offset-required: Model#createPositionAt() requires the offset when the first parameter is a model item.\",[this,t])}if(!n.is(\"element\")&&!n.is(\"documentFragment\"))throw new $i.b(\"model-position-parent-incorrect: Position parent have to be a element or document fragment.\",[this,t]);const o=n.getPath();return o.push(e),new this(n.root,o,i)}}static _createAfter(t,e){if(!t.parent)throw new $i.b(\"model-position-after-root: You cannot make a position after root.\",[this,t],{root:t});return this._createAt(t.parent,t.endOffset,e)}static _createBefore(t,e){if(!t.parent)throw new $i.b(\"model-position-before-root: You cannot make a position before root.\",t,{root:t});return this._createAt(t.parent,t.startOffset,e)}static fromJSON(t,e){if(\"$graveyard\"===t.root){const i=new Ys(e.graveyard,t.path);return i.stickiness=t.stickiness,i}if(!e.getRoot(t.root))throw new $i.b(\"model-position-fromjson-no-root: Cannot create position for document. Root with specified name does not exist.\",e,{rootName:t.root});return new Ys(e.getRoot(t.root),t.path,t.stickiness)}}class $s{constructor(t,e=null){this.start=Ys._createAt(t),this.end=e?Ys._createAt(e):Ys._createAt(t),this.start.stickiness=this.isCollapsed?\"toNone\":\"toNext\",this.end.stickiness=this.isCollapsed?\"toNone\":\"toPrevious\"}*[Symbol.iterator](){yield*new Hs({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return\"same\"==ln(this.start.getParentPath(),this.end.getParentPath())}get root(){return this.start.root}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,e=!1){t.isCollapsed&&(e=!1);const i=this.containsPosition(t.start)||e&&this.start.isEqual(t.start),n=this.containsPosition(t.end)||e&&this.end.isEqual(t.end);return i&&n}containsItem(t){const e=Ys._createBefore(t);return this.containsPosition(e)||this.start.isEqual(e)}is(t){return\"range\"==t||\"model:range\"==t}isEqual(t){return this.start.isEqual(t.start)&&this.end.isEqual(t.end)}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}getDifference(t){const e=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&e.push(new $s(this.start,t.start)),this.containsPosition(t.end)&&e.push(new $s(t.end,this.end))):e.push(new $s(this.start,this.end)),e}getIntersection(t){if(this.isIntersecting(t)){let e=this.start,i=this.end;return this.containsPosition(t.start)&&(e=t.start),this.containsPosition(t.end)&&(i=t.end),new $s(e,i)}return null}getMinimalFlatRanges(){const t=[],e=this.start.getCommonPath(this.end).length,i=Ys._createAt(this.start);let n=i.parent;for(;i.path.length>e+1;){const e=n.maxOffset-i.offset;0!==e&&t.push(new $s(i,i.getShiftedBy(e))),i.path=i.path.slice(0,-1),i.offset++,n=n.parent}for(;i.path.length<=this.end.path.length;){const e=this.end.path[i.path.length-1],n=e-i.offset;0!==n&&t.push(new $s(i,i.getShiftedBy(n))),i.offset=e,i.path.push(0)}return t}getWalker(t={}){return t.boundaries=this,new Hs(t)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new Hs(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new Hs(t);yield e.position;for(const t of e)yield t.nextPosition}getTransformedByOperation(t){switch(t.type){case\"insert\":return this._getTransformedByInsertOperation(t);case\"move\":case\"remove\":case\"reinsert\":return this._getTransformedByMoveOperation(t);case\"split\":return[this._getTransformedBySplitOperation(t)];case\"merge\":return[this._getTransformedByMergeOperation(t)]}return[new $s(this.start,this.end)]}getTransformedByOperations(t){const e=[new $s(this.start,this.end)];for(const i of t)for(let t=0;t<e.length;t++){const n=e[t].getTransformedByOperation(i);e.splice(t,1,...n),t+=n.length-1}for(let t=0;t<e.length;t++){const i=e[t];for(let n=t+1;n<e.length;n++){const t=e[n];(i.containsRange(t)||t.containsRange(i)||i.isEqual(t))&&e.splice(n,1)}}return e}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(t,e=!1){return this._getTransformedByInsertion(t.position,t.howMany,e)}_getTransformedByMoveOperation(t,e=!1){const i=t.sourcePosition,n=t.howMany,o=t.targetPosition;return this._getTransformedByMove(i,o,n,e)}_getTransformedBySplitOperation(t){const e=this.start._getTransformedBySplitOperation(t);let i=this.end._getTransformedBySplitOperation(t);return this.end.isEqual(t.insertionPosition)&&(i=this.end.getShiftedBy(1)),e.root!=i.root&&(i=this.end.getShiftedBy(-1)),new $s(e,i)}_getTransformedByMergeOperation(t){if(this.start.isEqual(t.targetPosition)&&this.end.isEqual(t.deletionPosition))return new $s(this.start);let e=this.start._getTransformedByMergeOperation(t),i=this.end._getTransformedByMergeOperation(t);return e.root!=i.root&&(i=this.end.getShiftedBy(-1)),e.isAfter(i)?(t.sourcePosition.isBefore(t.targetPosition)?(e=Ys._createAt(i)).offset=0:(t.deletionPosition.isEqual(e)||(i=t.deletionPosition),e=t.targetPosition),new $s(e,i)):new $s(e,i)}_getTransformedByInsertion(t,e,i=!1){if(i&&this.containsPosition(t))return[new $s(this.start,t),new $s(t.getShiftedBy(e),this.end._getTransformedByInsertion(t,e))];{const i=new $s(this.start,this.end);return i.start=i.start._getTransformedByInsertion(t,e),i.end=i.end._getTransformedByInsertion(t,e),[i]}}_getTransformedByMove(t,e,i,n=!1){if(this.isCollapsed){const n=this.start._getTransformedByMove(t,e,i);return[new $s(n)]}const o=$s._createFromPositionAndShift(t,i),r=e._getTransformedByDeletion(t,i);if(this.containsPosition(e)&&!n&&(o.containsPosition(this.start)||o.containsPosition(this.end))){const n=this.start._getTransformedByMove(t,e,i),o=this.end._getTransformedByMove(t,e,i);return[new $s(n,o)]}let s;const a=this.getDifference(o);let c=null;const l=this.getIntersection(o);if(1==a.length?c=new $s(a[0].start._getTransformedByDeletion(t,i),a[0].end._getTransformedByDeletion(t,i)):2==a.length&&(c=new $s(this.start,this.end._getTransformedByDeletion(t,i))),s=c?c._getTransformedByInsertion(r,i,null!==l||n):[],l){const t=new $s(l.start._getCombined(o.start,r),l.end._getCombined(o.start,r));2==s.length?s.splice(1,0,t):s.push(t)}return s}_getTransformedByDeletion(t,e){let i=this.start._getTransformedByDeletion(t,e),n=this.end._getTransformedByDeletion(t,e);return null==i&&null==n?null:(null==i&&(i=t),null==n&&(n=t),new $s(i,n))}static _createFromPositionAndShift(t,e){const i=t,n=t.getShiftedBy(e);return e>0?new this(i,n):new this(n,i)}static _createIn(t){return new this(Ys._createAt(t,0),Ys._createAt(t,t.maxOffset))}static _createOn(t){return this._createFromPositionAndShift(Ys._createBefore(t),t.offsetSize)}static _createFromRanges(t){if(0===t.length)throw new $i.b(\"range-create-from-ranges-empty-array: At least one range has to be passed.\",null);if(1==t.length)return t[0].clone();const e=t[0];t.sort((t,e)=>t.start.isAfter(e.start)?1:-1);const i=t.indexOf(e),n=new this(e.start,e.end);if(i>0)for(let e=i-1;t[e].end.isEqual(n.start);e++)n.start=Ys._createAt(t[e].start);for(let e=i+1;e<t.length&&t[e].start.isEqual(n.end);e++)n.end=Ys._createAt(t[e].end);return n}static fromJSON(t,e){return new this(Ys.fromJSON(t.start,e),Ys.fromJSON(t.end,e))}}class Gs{constructor(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this.on(\"modelToViewPosition\",(t,e)=>{if(e.viewPosition)return;const i=this._modelToViewMapping.get(e.modelPosition.parent);e.viewPosition=this._findPositionIn(i,e.modelPosition.offset)},{priority:\"low\"}),this.on(\"viewToModelPosition\",(t,e)=>{if(e.modelPosition)return;const i=this.findMappedViewAncestor(e.viewPosition),n=this._viewToModelMapping.get(i),o=this._toModelOffset(e.viewPosition.parent,e.viewPosition.offset,i);e.modelPosition=Ys._createAt(n,o)},{priority:\"low\"})}bindElements(t,e){this._modelToViewMapping.set(t,e),this._viewToModelMapping.set(e,t)}unbindViewElement(t){const e=this.toModelElement(t);if(this._viewToModelMapping.delete(t),this._elementToMarkerNames.has(t))for(const e of this._elementToMarkerNames.get(t))this._unboundMarkerNames.add(e);this._modelToViewMapping.get(e)==t&&this._modelToViewMapping.delete(e)}unbindModelElement(t){const e=this.toViewElement(t);this._modelToViewMapping.delete(t),this._viewToModelMapping.get(e)==t&&this._viewToModelMapping.delete(e)}bindElementToMarker(t,e){const i=this._markerNameToElements.get(e)||new Set;i.add(t);const n=this._elementToMarkerNames.get(t)||new Set;n.add(e),this._markerNameToElements.set(e,i),this._elementToMarkerNames.set(t,n)}unbindElementFromMarkerName(t,e){const i=this._markerNameToElements.get(e);i&&(i.delete(t),0==i.size&&this._markerNameToElements.delete(e));const n=this._elementToMarkerNames.get(t);n&&(n.delete(e),0==n.size&&this._elementToMarkerNames.delete(t))}flushUnboundMarkerNames(){const t=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),t}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set}toModelElement(t){return this._viewToModelMapping.get(t)}toViewElement(t){return this._modelToViewMapping.get(t)}toModelRange(t){return new $s(this.toModelPosition(t.start),this.toModelPosition(t.end))}toViewRange(t){return new Xn(this.toViewPosition(t.start),this.toViewPosition(t.end))}toModelPosition(t){const e={viewPosition:t,mapper:this};return this.fire(\"viewToModelPosition\",e),e.modelPosition}toViewPosition(t,e={isPhantom:!1}){const i={modelPosition:t,mapper:this,isPhantom:e.isPhantom};return this.fire(\"modelToViewPosition\",i),i.viewPosition}markerNameToElements(t){const e=this._markerNameToElements.get(t);if(!e)return null;const i=new Set;for(const t of e)if(t.is(\"attributeElement\"))for(const e of t.getElementsWithSameId())i.add(e);else i.add(t);return i}registerViewToModelLength(t,e){this._viewToModelLengthCallbacks.set(t,e)}findMappedViewAncestor(t){let e=t.parent;for(;!this._viewToModelMapping.has(e);)e=e.parent;return e}_toModelOffset(t,e,i){if(i!=t){return this._toModelOffset(t.parent,t.index,i)+this._toModelOffset(t,e,t)}if(t.is(\"text\"))return e;let n=0;for(let i=0;i<e;i++)n+=this.getModelLength(t.getChild(i));return n}getModelLength(t){if(this._viewToModelLengthCallbacks.get(t.name)){return this._viewToModelLengthCallbacks.get(t.name)(t)}if(this._viewToModelMapping.has(t))return 1;if(t.is(\"text\"))return t.data.length;if(t.is(\"uiElement\"))return 0;{let e=0;for(const i of t.getChildren())e+=this.getModelLength(i);return e}}_findPositionIn(t,e){let i,n=0,o=0,r=0;if(t.is(\"text\"))return new Zn(t,e);for(;o<e;)i=t.getChild(r),o+=n=this.getModelLength(i),r++;return o==e?this._moveViewPositionToTextNode(new Zn(t,r)):this._findPositionIn(i,e-(o-n))}_moveViewPositionToTextNode(t){const e=t.nodeBefore,i=t.nodeAfter;return e instanceof fn?new Zn(e,e.data.length):i instanceof fn?new Zn(i,0):t}}cn(Gs,tn);class Qs{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(t,e){e=Ks(e),t instanceof Bs&&(t=this._getSymbolForTextProxy(t)),this._consumable.has(t)||this._consumable.set(t,new Map),this._consumable.get(t).set(e,!0)}consume(t,e){return e=Ks(e),t instanceof Bs&&(t=this._getSymbolForTextProxy(t)),!!this.test(t,e)&&(this._consumable.get(t).set(e,!1),!0)}test(t,e){e=Ks(e),t instanceof Bs&&(t=this._getSymbolForTextProxy(t));const i=this._consumable.get(t);if(void 0===i)return null;const n=i.get(e);return void 0===n?null:n}revert(t,e){e=Ks(e),t instanceof Bs&&(t=this._getSymbolForTextProxy(t));const i=this.test(t,e);return!1===i?(this._consumable.get(t).set(e,!0),!0):!0!==i&&null}_getSymbolForTextProxy(t){let e=null;const i=this._textProxyRegistry.get(t.startOffset);if(i){const n=i.get(t.endOffset);n&&(e=n.get(t.parent))}return e||(e=this._addSymbolForTextProxy(t.startOffset,t.endOffset,t.parent)),e}_addSymbolForTextProxy(t,e,i){const n=Symbol(\"textProxySymbol\");let o,r;return(o=this._textProxyRegistry.get(t))||(o=new Map,this._textProxyRegistry.set(t,o)),(r=o.get(e))||(r=new Map,o.set(e,r)),r.set(i,n),n}}function Ks(t){const e=t.split(\":\");return e.length>1?e[0]+\":\"+e[1]:e[0]}class Js{constructor(t){this.conversionApi=Ln({dispatcher:this},t)}convertChanges(t,e,i){for(const e of t.getMarkersToRemove())this.convertMarkerRemove(e.name,e.range,i);for(const e of t.getChanges())\"insert\"==e.type?this.convertInsert($s._createFromPositionAndShift(e.position,e.length),i):\"remove\"==e.type?this.convertRemove(e.position,e.length,e.name,i):this.convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,i);for(const t of this.conversionApi.mapper.flushUnboundMarkerNames()){const n=e.get(t).getRange();this.convertMarkerRemove(t,n,i),this.convertMarkerAdd(t,n,i)}for(const e of t.getMarkersToAdd())this.convertMarkerAdd(e.name,e.range,i)}convertInsert(t,e){this.conversionApi.writer=e,this.conversionApi.consumable=this._createInsertConsumable(t);for(const e of t){const t=e.item,i={item:t,range:$s._createFromPositionAndShift(e.previousPosition,e.length)};this._testAndFire(\"insert\",i);for(const e of t.getAttributeKeys())i.attributeKey=e,i.attributeOldValue=null,i.attributeNewValue=t.getAttribute(e),this._testAndFire(`attribute:${e}`,i)}this._clearConversionApi()}convertRemove(t,e,i,n){this.conversionApi.writer=n,this.fire(\"remove:\"+i,{position:t,length:e},this.conversionApi),this._clearConversionApi()}convertAttribute(t,e,i,n,o){this.conversionApi.writer=o,this.conversionApi.consumable=this._createConsumableForRange(t,`attribute:${e}`);for(const o of t){const t={item:o.item,range:$s._createFromPositionAndShift(o.previousPosition,o.length),attributeKey:e,attributeOldValue:i,attributeNewValue:n};this._testAndFire(`attribute:${e}`,t)}this._clearConversionApi()}convertSelection(t,e,i){const n=Array.from(e.getMarkersAtPosition(t.getFirstPosition()));if(this.conversionApi.writer=i,this.conversionApi.consumable=this._createSelectionConsumable(t,n),this.fire(\"selection\",{selection:t},this.conversionApi),t.isCollapsed){for(const e of n){const i=e.getRange();if(!Zs(t.getFirstPosition(),e,this.conversionApi.mapper))continue;const n={item:t,markerName:e.name,markerRange:i};this.conversionApi.consumable.test(t,\"addMarker:\"+e.name)&&this.fire(\"addMarker:\"+e.name,n,this.conversionApi)}for(const e of t.getAttributeKeys()){const i={item:t,range:t.getFirstRange(),attributeKey:e,attributeOldValue:null,attributeNewValue:t.getAttribute(e)};this.conversionApi.consumable.test(t,\"attribute:\"+i.attributeKey)&&this.fire(\"attribute:\"+i.attributeKey+\":$text\",i,this.conversionApi)}this._clearConversionApi()}}convertMarkerAdd(t,e,i){if(!e.root.document||\"$graveyard\"==e.root.rootName)return;this.conversionApi.writer=i;const n=\"addMarker:\"+t,o=new Qs;if(o.add(e,n),this.conversionApi.consumable=o,this.fire(n,{markerName:t,markerRange:e},this.conversionApi),o.test(e,n)){this.conversionApi.consumable=this._createConsumableForRange(e,n);for(const i of e.getItems()){if(!this.conversionApi.consumable.test(i,n))continue;const o={item:i,range:$s._createOn(i),markerName:t,markerRange:e};this.fire(n,o,this.conversionApi)}this._clearConversionApi()}}convertMarkerRemove(t,e,i){e.root.document&&\"$graveyard\"!=e.root.rootName&&(this.conversionApi.writer=i,this.fire(\"removeMarker:\"+t,{markerName:t,markerRange:e},this.conversionApi),this._clearConversionApi())}_createInsertConsumable(t){const e=new Qs;for(const i of t){const t=i.item;e.add(t,\"insert\");for(const i of t.getAttributeKeys())e.add(t,\"attribute:\"+i)}return e}_createConsumableForRange(t,e){const i=new Qs;for(const n of t.getItems())i.add(n,e);return i}_createSelectionConsumable(t,e){const i=new Qs;i.add(t,\"selection\");for(const n of e)i.add(t,\"addMarker:\"+n.name);for(const e of t.getAttributeKeys())i.add(t,\"attribute:\"+e);return i}_testAndFire(t,e){if(!this.conversionApi.consumable.test(e.item,t))return;const i=e.item.name||\"$text\";this.fire(t+\":\"+i,e,this.conversionApi)}_clearConversionApi(){delete this.conversionApi.writer,delete this.conversionApi.consumable}}function Zs(t,e,i){const n=e.getRange(),o=Array.from(t.getAncestors());return o.shift(),o.reverse(),!o.some(t=>{if(n.containsItem(t)){return!!i.toViewElement(t).getCustomProperty(\"addHighlight\")}})}cn(Js,tn);class Xs{constructor(t,e,i){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,t&&this.setTo(t,e,i)}get anchor(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.end:t.start}return null}get focus(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.start:t.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(t){if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let i=!1;for(const n of t._ranges)if(e.isEqual(n)){i=!0;break}if(!i)return!1}return!0}*getRanges(){for(const t of this._ranges)yield new $s(t.start,t.end)}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?new $s(t.start,t.end):null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?new $s(t.start,t.end):null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}setTo(t,e,i){if(null===t)this._setRanges([]);else if(t instanceof Xs)this._setRanges(t.getRanges(),t.isBackward);else if(t&&\"function\"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof $s)this._setRanges([t],!!e&&!!e.backward);else if(t instanceof Ys)this._setRanges([new $s(t)]);else if(t instanceof Vs){const n=!!i&&!!i.backward;let o;if(\"in\"==e)o=$s._createIn(t);else if(\"on\"==e)o=$s._createOn(t);else{if(void 0===e)throw new $i.b(\"model-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.\",[this,t]);o=new $s(Ys._createAt(t,e))}this._setRanges([o],n)}else{if(!pn(t))throw new $i.b(\"model-selection-setTo-not-selectable: Cannot set the selection to the given place.\",[this,t]);this._setRanges(t,e&&!!e.backward)}}_setRanges(t,e=!1){const i=(t=Array.from(t)).some(e=>{if(!(e instanceof $s))throw new $i.b(\"model-selection-set-ranges-not-range: Selection range set to an object that is not an instance of model.Range.\",[this,t]);return this._ranges.every(t=>!t.isEqual(e))});if(t.length!==this._ranges.length||i){this._removeAllRanges();for(const e of t)this._pushRange(e);this._lastRangeBackward=!!e,this.fire(\"change:range\",{directChange:!0})}}setFocus(t,e){if(null===this.anchor)throw new $i.b(\"model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.\",[this,t]);const i=Ys._createAt(t,e);if(\"same\"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.length&&this._popRange(),\"before\"==i.compareWith(n)?(this._pushRange(new $s(i,n)),this._lastRangeBackward=!0):(this._pushRange(new $s(n,i)),this._lastRangeBackward=!1),this.fire(\"change:range\",{directChange:!0})}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(t){return this._attrs.has(t)}removeAttribute(t){this.hasAttribute(t)&&(this._attrs.delete(t),this.fire(\"change:attribute\",{attributeKeys:[t],directChange:!0}))}setAttribute(t,e){this.getAttribute(t)!==e&&(this._attrs.set(t,e),this.fire(\"change:attribute\",{attributeKeys:[t],directChange:!0}))}getSelectedElement(){if(1!==this.rangeCount)return null;const t=this.getFirstRange(),e=t.start.nodeAfter,i=t.end.nodeBefore;return e instanceof Us&&e==i?e:null}is(t){return\"selection\"==t||\"model:selection\"==t}*getSelectedBlocks(){const t=new WeakSet;for(const e of this.getRanges()){const i=ia(e.start,t);i&&na(i,e)&&(yield i);for(const i of e.getWalker()){const n=i.item;\"elementEnd\"==i.type&&ea(n,t,e)&&(yield n)}const n=ia(e.end,t);n&&!e.end.isTouching(Ys._createAt(n,0))&&na(n,e)&&(yield n)}}containsEntireContent(t=this.anchor.root){const e=Ys._createAt(t,0),i=Ys._createAt(t,\"end\");return e.isTouching(this.getFirstPosition())&&i.isTouching(this.getLastPosition())}_pushRange(t){this._checkRange(t),this._ranges.push(new $s(t.start,t.end))}_checkRange(t){for(let e=0;e<this._ranges.length;e++)if(t.isIntersecting(this._ranges[e]))throw new $i.b(\"model-selection-range-intersects: Trying to add a range that intersects with another range in the selection.\",[this,t],{addedRange:t,intersectingRange:this._ranges[e]})}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function ta(t,e){return!e.has(t)&&(e.add(t),t.document.model.schema.isBlock(t)&&t.parent)}function ea(t,e,i){return ta(t,e)&&na(t,i)}function ia(t,e){const i=t.parent.document.model.schema,n=t.parent.getAncestors({parentFirst:!0,includeSelf:!0});let o=!1;const r=n.find(t=>!o&&(!(o=i.isLimit(t))&&ta(t,e)));return n.forEach(t=>e.add(t)),r}function na(t,e){const i=function(t){const e=t.document.model.schema;let i=t.parent;for(;i;){if(e.isBlock(i))return i;i=i.parent}}(t);return!i||!e.containsRange($s._createOn(i),!0)}cn(Xs,tn);class oa extends $s{constructor(t,e){super(t,e),function(){this.listenTo(this.root.document.model,\"applyOperation\",(t,e)=>{const i=e[0];i.isDocumentOperation&&function(t){const e=this.getTransformedByOperation(t),i=$s._createFromRanges(e),n=!i.isEqual(this),o=function(t,e){switch(e.type){case\"insert\":return t.containsPosition(e.position);case\"move\":case\"remove\":case\"reinsert\":case\"merge\":return t.containsPosition(e.sourcePosition)||t.start.isEqual(e.sourcePosition)||t.containsPosition(e.targetPosition);case\"split\":return t.containsPosition(e.splitPosition)||t.containsPosition(e.insertionPosition)}return!1}(this,t);let r=null;if(n){\"$graveyard\"==i.root.rootName&&(r=\"remove\"==t.type?t.sourcePosition:t.deletionPosition);const e=this.toRange();this.start=i.start,this.end=i.end,this.fire(\"change:range\",e,{deletionPosition:r})}else o&&this.fire(\"change:content\",this.toRange(),{deletionPosition:r})}.call(this,i)},{priority:\"low\"})}.call(this)}detach(){this.stopListening()}is(t){return\"liveRange\"==t||\"model:liveRange\"==t||super.is(t)}toRange(){return new $s(this.start,this.end)}static fromRange(t){return new oa(t.start,t.end)}}cn(oa,tn);const ra=\"selection:\";class sa{constructor(t){this._selection=new aa(t),this._selection.delegate(\"change:range\").to(this),this._selection.delegate(\"change:attribute\").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(t){return this._selection.containsEntireContent(t)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(t){return this._selection.getAttribute(t)}hasAttribute(t){return this._selection.hasAttribute(t)}refresh(){this._selection._updateMarkers(),this._selection._updateAttributes(!1)}is(t){return\"selection\"==t||\"model:selection\"==t||\"documentSelection\"==t||\"model:documentSelection\"==t}_setFocus(t,e){this._selection.setFocus(t,e)}_setTo(t,e,i){this._selection.setTo(t,e,i)}_setAttribute(t,e){this._selection.setAttribute(t,e)}_removeAttribute(t){this._selection.removeAttribute(t)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(t){this._selection.restoreGravity(t)}static _getStoreAttributeKey(t){return ra+t}static _isStoreAttributeKey(t){return t.startsWith(ra)}}cn(sa,tn);class aa extends Xs{constructor(t){super(),this.markers=new oo({idProperty:\"name\"}),this._model=t.model,this._document=t,this._attributePriority=new Map,this._fixGraveyardRangesData=[],this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this.listenTo(this._model,\"applyOperation\",(t,e)=>{const i=e[0];if(i.isDocumentOperation&&\"marker\"!=i.type&&\"rename\"!=i.type&&\"noop\"!=i.type){for(;this._fixGraveyardRangesData.length;){const{liveRange:t,sourcePosition:e}=this._fixGraveyardRangesData.shift();this._fixGraveyardSelection(t,e)}this._hasChangedRange&&(this._hasChangedRange=!1,this.fire(\"change:range\",{directChange:!1}))}},{priority:\"lowest\"}),this.on(\"change:range\",()=>{for(const t of this.getRanges())if(!this._document._validateSelectionRange(t))throw new $i.b(\"document-selection-wrong-position: Range from document selection starts or ends at incorrect position.\",this,{range:t})}),this.listenTo(this._model.markers,\"update\",()=>this._updateMarkers()),this.listenTo(this._document,\"change\",(t,e)=>{!function(t,e){const i=t.document.differ;for(const n of i.getChanges()){if(\"insert\"!=n.type)continue;const i=n.position.parent,o=n.length===i.maxOffset;o&&t.enqueueChange(e,t=>{const e=Array.from(i.getAttributeKeys()).filter(t=>t.startsWith(ra));for(const n of e)t.removeAttribute(n,i)})}}(this._model,e)})}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let t=0;t<this._ranges.length;t++)this._ranges[t].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(t,e,i){super.setTo(t,e,i),this._updateAttributes(!0)}setFocus(t,e){super.setFocus(t,e),this._updateAttributes(!0)}setAttribute(t,e){if(this._setAttribute(t,e)){const e=[t];this.fire(\"change:attribute\",{attributeKeys:e,directChange:!0})}}removeAttribute(t){if(this._removeAttribute(t)){const e=[t];this.fire(\"change:attribute\",{attributeKeys:e,directChange:!0})}}overrideGravity(){const t=Ki();return this._overriddenGravityRegister.add(t),1===this._overriddenGravityRegister.size&&this._updateAttributes(!0),t}restoreGravity(t){if(!this._overriddenGravityRegister.has(t))throw new $i.b(\"document-selection-gravity-wrong-restore: Attempting to restore the selection gravity for an unknown UID.\",this,{uid:t});this._overriddenGravityRegister.delete(t),this.isGravityOverridden||this._updateAttributes(!0)}_popRange(){this._ranges.pop().detach()}_pushRange(t){const e=this._prepareRange(t);e&&this._ranges.push(e)}_prepareRange(t){if(this._checkRange(t),t.root==this._document.graveyard)return;const e=oa.fromRange(t);return e.on(\"change:range\",(t,i,n)=>{this._hasChangedRange=!0,e.root==this._document.graveyard&&this._fixGraveyardRangesData.push({liveRange:e,sourcePosition:n.deletionPosition})}),e}_updateMarkers(){const t=[];for(const e of this._model.markers){const i=e.getRange();for(const n of this.getRanges())i.containsRange(n,!n.isCollapsed)&&t.push(e)}for(const e of t)this.markers.has(e)||this.markers.add(e);for(const e of Array.from(this.markers))t.includes(e)||this.markers.remove(e)}_updateAttributes(t){const e=js(this._getSurroundingAttributes()),i=js(this.getAttributes());if(t)this._attributePriority=new Map,this._attrs=new Map;else for(const[t,e]of this._attributePriority)\"low\"==e&&(this._attrs.delete(t),this._attributePriority.delete(t));this._setAttributesTo(e);const n=[];for(const[t,e]of this.getAttributes())i.has(t)&&i.get(t)===e||n.push(t);for(const[t]of i)this.hasAttribute(t)||n.push(t);n.length>0&&this.fire(\"change:attribute\",{attributeKeys:n,directChange:!1})}_setAttribute(t,e,i=!0){const n=i?\"normal\":\"low\";return(\"low\"!=n||\"normal\"!=this._attributePriority.get(t))&&(super.getAttribute(t)!==e&&(this._attrs.set(t,e),this._attributePriority.set(t,n),!0))}_removeAttribute(t,e=!0){const i=e?\"normal\":\"low\";return(\"low\"!=i||\"normal\"!=this._attributePriority.get(t))&&(this._attributePriority.set(t,i),!!super.hasAttribute(t)&&(this._attrs.delete(t),!0))}_setAttributesTo(t){const e=new Set;for(const[e,i]of this.getAttributes())t.get(e)!==i&&this._removeAttribute(e,!1);for(const[i,n]of t){this._setAttribute(i,n,!1)&&e.add(i)}return e}*_getStoredAttributes(){const t=this.getFirstPosition().parent;if(this.isCollapsed&&t.isEmpty)for(const e of t.getAttributeKeys())if(e.startsWith(ra)){yield[e.substr(ra.length),t.getAttribute(e)]}}_getSurroundingAttributes(){const t=this.getFirstPosition(),e=this._model.schema;let i=null;if(this.isCollapsed){const e=t.textNode?t.textNode:t.nodeBefore,n=t.textNode?t.textNode:t.nodeAfter;if(this.isGravityOverridden||(i=ca(e)),i||(i=ca(n)),!this.isGravityOverridden&&!i){let t=e;for(;t&&!i;)i=ca(t=t.previousSibling)}if(!i){let t=n;for(;t&&!i;)i=ca(t=t.nextSibling)}i||(i=this._getStoredAttributes())}else{const t=this.getFirstRange();for(const n of t){if(n.item.is(\"element\")&&e.isObject(n.item))break;if(\"text\"==n.type){i=n.item.getAttributes();break}}}return i}_fixGraveyardSelection(t,e){const i=e.clone(),n=this._model.schema.getNearestSelectionRange(i),o=this._ranges.indexOf(t);if(this._ranges.splice(o,1),t.detach(),n){const t=this._prepareRange(n);this._ranges.splice(o,0,t)}}}function ca(t){return t instanceof Bs||t instanceof zs?t.getAttributes():null}class la{constructor(t){this._dispatchers=t}add(t){for(const e of this._dispatchers)t(e);return this}}var da=1,ha=4;var ua=function(t){return Bi(t,da|ha)};class fa extends la{elementToElement(t){return this.add(function(t){return(t=ua(t)).view=ma(t.view,\"container\"),e=>{e.on(\"insert:\"+t.model,function(t){return(e,i,n)=>{const o=t(i.item,n.writer);if(!o)return;if(!n.consumable.consume(i.item,\"insert\"))return;const r=n.mapper.toViewPosition(i.range.start);n.mapper.bindElements(i.item,o),n.writer.insert(r,o)}}(t.view),{priority:t.converterPriority||\"normal\"})}}(t))}attributeToElement(t){return this.add(function(t){let e=\"attribute:\"+((t=ua(t)).model.key?t.model.key:t.model);t.model.name&&(e+=\":\"+t.model.name);if(t.model.values)for(const e of t.model.values)t.view[e]=ma(t.view[e],\"attribute\");else t.view=ma(t.view,\"attribute\");const i=pa(t);return n=>{n.on(e,function(t){return(e,i,n)=>{const o=t(i.attributeOldValue,n.writer),r=t(i.attributeNewValue,n.writer);if(!o&&!r)return;if(!n.consumable.consume(i.item,e.name))return;const s=n.writer,a=s.document.selection;if(i.item instanceof Xs||i.item instanceof sa)s.wrap(a.getFirstRange(),r);else{let t=n.mapper.toViewRange(i.range);null!==i.attributeOldValue&&o&&(t=s.unwrap(t,o)),null!==i.attributeNewValue&&r&&s.wrap(t,r)}}}(i),{priority:t.converterPriority||\"normal\"})}}(t))}attributeToAttribute(t){return this.add(function(t){let e=\"attribute:\"+((t=ua(t)).model.key?t.model.key:t.model);t.model.name&&(e+=\":\"+t.model.name);if(t.model.values)for(const e of t.model.values)t.view[e]=ba(t.view[e]);else t.view=ba(t.view);const i=pa(t);return n=>{n.on(e,function(t){return(e,i,n)=>{const o=t(i.attributeOldValue,i),r=t(i.attributeNewValue,i);if(!o&&!r)return;if(!n.consumable.consume(i.item,e.name))return;const s=n.mapper.toViewElement(i.item),a=n.writer;if(!s)throw new $i.b(\"conversion-attribute-to-attribute-on-text: Trying to convert text node's attribute with attribute-to-attribute converter.\",[i,n]);if(null!==i.attributeOldValue&&o)if(\"class\"==o.key){const t=Array.isArray(o.value)?o.value:[o.value];for(const e of t)a.removeClass(e,s)}else if(\"style\"==o.key){const t=Object.keys(o.value);for(const e of t)a.removeStyle(e,s)}else a.removeAttribute(o.key,s);if(null!==i.attributeNewValue&&r)if(\"class\"==r.key){const t=Array.isArray(r.value)?r.value:[r.value];for(const e of t)a.addClass(e,s)}else if(\"style\"==r.key){const t=Object.keys(r.value);for(const e of t)a.setStyle(e,r.value[e],s)}else a.setAttribute(r.key,r.value,s)}}(i),{priority:t.converterPriority||\"normal\"})}}(t))}markerToElement(t){return this.add(function(t){return(t=ua(t)).view=ma(t.view,\"ui\"),e=>{e.on(\"addMarker:\"+t.model,function(t){return(e,i,n)=>{i.isOpening=!0;const o=t(i,n.writer);i.isOpening=!1;const r=t(i,n.writer);if(!o||!r)return;const s=i.markerRange;if(s.isCollapsed&&!n.consumable.consume(s,e.name))return;for(const t of s)if(!n.consumable.consume(t.item,e.name))return;const a=n.mapper,c=n.writer;c.insert(a.toViewPosition(s.start),o),n.mapper.bindElementToMarker(o,i.markerName),s.isCollapsed||(c.insert(a.toViewPosition(s.end),r),n.mapper.bindElementToMarker(r,i.markerName)),e.stop()}}(t.view),{priority:t.converterPriority||\"normal\"}),e.on(\"removeMarker:\"+t.model,(t.view,(t,e,i)=>{const n=i.mapper.markerNameToElements(e.markerName);if(n){for(const t of n)i.mapper.unbindElementFromMarkerName(t,e.markerName),i.writer.clear(i.writer.createRangeOn(t),t);i.writer.clearClonedElementsGroup(e.markerName),t.stop()}}),{priority:t.converterPriority||\"normal\"})}}(t))}markerToHighlight(t){return this.add(function(t){return e=>{e.on(\"addMarker:\"+t.model,function(t){return(e,i,n)=>{if(!i.item)return;if(!(i.item instanceof Xs||i.item instanceof sa||i.item.is(\"textProxy\")))return;const o=wa(t,i,n);if(!o)return;if(!n.consumable.consume(i.item,e.name))return;const r=ga(o),s=n.writer,a=s.document.selection;if(i.item instanceof Xs||i.item instanceof sa)s.wrap(a.getFirstRange(),r,a);else{const t=n.mapper.toViewRange(i.range),e=s.wrap(t,r);for(const t of e.getItems())if(t.is(\"attributeElement\")&&t.isSimilar(r)){n.mapper.bindElementToMarker(t,i.markerName);break}}}}(t.view),{priority:t.converterPriority||\"normal\"}),e.on(\"addMarker:\"+t.model,function(t){return(e,i,n)=>{if(!i.item)return;if(!(i.item instanceof Us))return;const o=wa(t,i,n);if(!o)return;if(!n.consumable.test(i.item,e.name))return;const r=n.mapper.toViewElement(i.item);if(r&&r.getCustomProperty(\"addHighlight\")){n.consumable.consume(i.item,e.name);for(const t of $s._createIn(i.item))n.consumable.consume(t.item,e.name);r.getCustomProperty(\"addHighlight\")(r,o,n.writer),n.mapper.bindElementToMarker(r,i.markerName)}}}(t.view),{priority:t.converterPriority||\"normal\"}),e.on(\"removeMarker:\"+t.model,function(t){return(e,i,n)=>{if(i.markerRange.isCollapsed)return;const o=wa(t,i,n);if(!o)return;const r=ga(o),s=n.mapper.markerNameToElements(i.markerName);if(s){for(const t of s)n.mapper.unbindElementFromMarkerName(t,i.markerName),t.is(\"attributeElement\")?n.writer.unwrap(n.writer.createRangeOn(t),r):t.getCustomProperty(\"removeHighlight\")(t,o.id,n.writer);n.writer.clearClonedElementsGroup(i.markerName),e.stop()}}}(t.view),{priority:t.converterPriority||\"normal\"})}}(t))}}function ga(t){const e=new ao(\"span\",t.attributes);return t.classes&&e._addClass(t.classes),t.priority&&(e._priority=t.priority),e._id=t.id,e}function ma(t,e){return\"function\"==typeof t?t:(i,n)=>(function(t,e,i){\"string\"==typeof t&&(t={name:t});let n;const o=Object.assign({},t.attributes);if(\"container\"==i)n=e.createContainerElement(t.name,o);else if(\"attribute\"==i){const i={priority:t.priority||ao.DEFAULT_PRIORITY};n=e.createAttributeElement(t.name,o,i)}else n=e.createUIElement(t.name,o);if(t.styles){const i=Object.keys(t.styles);for(const o of i)e.setStyle(o,t.styles[o],n)}if(t.classes){const i=t.classes;if(\"string\"==typeof i)e.addClass(i,n);else for(const t of i)e.addClass(t,n)}return n})(t,n,e)}function pa(t){return t.model.values?(e,i)=>{const n=t.view[e];return n?n(e,i):null}:t.view}function ba(t){return\"string\"==typeof t?e=>({key:t,value:e}):\"object\"==typeof t?t.value?()=>t:e=>({key:t.key,value:e}):t}function wa(t,e,i){const n=\"function\"==typeof t?t(e,i):t;return n?(n.priority||(n.priority=10),n.id||(n.id=e.markerName),n):null}class _a extends la{elementToElement(t){return this.add(ka(t))}elementToAttribute(t){return this.add(function(t){ya(t=ua(t));const e=xa(t,!1),i=va(t.view),n=i?\"element:\"+i:\"element\";return i=>{i.on(n,e,{priority:t.converterPriority||\"low\"})}}(t))}attributeToAttribute(t){return this.add(function(t){let e=null;(\"string\"==typeof(t=ua(t)).view||t.view.key)&&(e=function(t){\"string\"==typeof t.view&&(t.view={key:t.view});const e=t.view.key;let i;if(\"class\"==e||\"style\"==e){const n=\"class\"==e?\"classes\":\"styles\";i={[n]:t.view.value}}else{const n=void 0===t.view.value?/[\\s\\S]*/:t.view.value;i={attributes:{[e]:n}}}t.view.name&&(i.name=t.view.name);return t.view=i,e}(t));ya(t,e);const i=xa(t,!0);return e=>{e.on(\"element\",i,{priority:t.converterPriority||\"low\"})}}(t))}elementToMarker(t){return this.add(function(t){return function(t){const e=t.model;t.model=((t,i)=>{const n=\"string\"==typeof e?e:e(t);return i.createElement(\"$marker\",{\"data-name\":n})})}(t=ua(t)),ka(t)}(t))}}function ka(t){const e=function(t){const e=t.view?new bn(t.view):null;return(i,n,o)=>{let r={};if(e){const t=e.match(n.viewItem);if(!t)return;r=t.match}r.name=!0;const s=function(t,e,i){return t instanceof Function?t(e,i):i.createElement(t)}(t.model,n.viewItem,o.writer);if(!s)return;if(!o.consumable.test(n.viewItem,r))return;const a=o.splitToAllowedParent(s,n.modelCursor);if(!a)return;o.writer.insert(s,a.position),o.convertChildren(n.viewItem,o.writer.createPositionAt(s,0)),o.consumable.consume(n.viewItem,r);const c=o.getSplitParts(s);n.modelRange=new $s(o.writer.createPositionBefore(s),o.writer.createPositionAfter(c[c.length-1])),a.cursorParent?n.modelCursor=o.writer.createPositionAt(a.cursorParent,0):n.modelCursor=n.modelRange.end}}(t=ua(t)),i=va(t.view),n=i?\"element:\"+i:\"element\";return i=>{i.on(n,e,{priority:t.converterPriority||\"normal\"})}}function va(t){return\"string\"==typeof t?t:\"object\"==typeof t&&\"string\"==typeof t.name?t.name:null}function ya(t,e=null){const i=null===e||(t=>t.getAttribute(e)),n=\"object\"!=typeof t.model?t.model:t.model.key,o=\"object\"!=typeof t.model||void 0===t.model.value?i:t.model.value;t.model={key:n,value:o}}function xa(t,e){const i=new bn(t.view);return(n,o,r)=>{const s=i.match(o.viewItem);if(!s)return;const a=t.model.key,c=\"function\"==typeof t.model.value?t.model.value(o.viewItem):t.model.value;null!==c&&(!function(t,e){const i=\"function\"==typeof t?t(e):t;if(\"object\"==typeof i&&!va(i))return!1;return!i.classes&&!i.attributes&&!i.styles}(t.view,o.viewItem)?delete s.match.name:s.match.name=!0,r.consumable.test(o.viewItem,s.match)&&(o.modelRange||(o=Object.assign(o,r.convertChildren(o.viewItem,o.modelCursor))),function(t,e,i,n){let o=!1;for(const r of Array.from(t.getItems({shallow:i})))n.schema.checkAttribute(r,e.key)&&(n.writer.setAttribute(e.key,e.value,r),o=!0);return o}(o.modelRange,{key:a,value:c},e,r)&&r.consumable.consume(o.viewItem,s.match)))}}class Aa{constructor(t){this.model=t,this.view=new Ls,this.mapper=new Gs,this.downcastDispatcher=new Js({mapper:this.mapper});const e=this.model.document,i=e.selection,n=this.model.markers;this.listenTo(this.model,\"_beforeChanges\",()=>{this.view._disableRendering(!0)},{priority:\"highest\"}),this.listenTo(this.model,\"_afterChanges\",()=>{this.view._disableRendering(!1)},{priority:\"lowest\"}),this.listenTo(e,\"change\",()=>{this.view.change(t=>{this.downcastDispatcher.convertChanges(e.differ,n,t),this.downcastDispatcher.convertSelection(i,n,t)})},{priority:\"low\"}),this.listenTo(this.view.document,\"selectionChange\",function(t,e){return(i,n)=>{const o=n.newSelection,r=new Xs,s=[];for(const t of o.getRanges())s.push(e.toModelRange(t));r.setTo(s,{backward:o.isBackward}),r.isEqual(t.document.selection)||t.change(t=>{t.setSelection(r)})}}(this.model,this.mapper)),this.downcastDispatcher.on(\"insert:$text\",(t,e,i)=>{if(!i.consumable.consume(e.item,\"insert\"))return;const n=i.writer,o=i.mapper.toViewPosition(e.range.start),r=n.createText(e.item.data);n.insert(o,r)},{priority:\"lowest\"}),this.downcastDispatcher.on(\"remove\",(t,e,i)=>{const n=i.mapper.toViewPosition(e.position),o=e.position.getShiftedBy(e.length),r=i.mapper.toViewPosition(o,{isPhantom:!0}),s=i.writer.createRange(n,r),a=i.writer.remove(s.getTrimmed());for(const t of i.writer.createRangeIn(a).getItems())i.mapper.unbindViewElement(t)},{priority:\"low\"}),this.downcastDispatcher.on(\"selection\",(t,e,i)=>{const n=i.writer,o=n.document.selection;for(const t of o.getRanges())t.isCollapsed&&t.end.parent.document&&i.writer.mergeAttributes(t.start);n.setSelection(null)},{priority:\"low\"}),this.downcastDispatcher.on(\"selection\",(t,e,i)=>{const n=e.selection;if(n.isCollapsed)return;if(!i.consumable.consume(n,\"selection\"))return;const o=[];for(const t of n.getRanges()){const e=i.mapper.toViewRange(t);o.push(e)}i.writer.setSelection(o,{backward:n.isBackward})},{priority:\"low\"}),this.downcastDispatcher.on(\"selection\",(t,e,i)=>{const n=e.selection;if(!n.isCollapsed)return;if(!i.consumable.consume(n,\"selection\"))return;const o=i.writer,r=n.getFirstPosition(),s=i.mapper.toViewPosition(r),a=o.breakAttributes(s);o.setSelection(a)},{priority:\"low\"}),this.view.document.roots.bindTo(this.model.document.roots).using(t=>{if(\"$graveyard\"==t.rootName)return null;const e=new Kn(t.name);return e.rootName=t.rootName,e._document=this.view.document,this.mapper.bindElements(t,e),e})}destroy(){this.view.destroy(),this.stopListening()}}cn(Aa,Fn);class Ta{constructor(t,e=[]){this._editor=t,this._availablePlugins=new Map,this._plugins=new Map;for(const t of e)this._availablePlugins.set(t,t),t.pluginName&&this._availablePlugins.set(t.pluginName,t)}*[Symbol.iterator](){for(const t of this._plugins)\"function\"==typeof t[0]&&(yield t)}get(t){const e=this._plugins.get(t);if(!e){const e=\"plugincollection-plugin-not-loaded: The requested plugin is not loaded.\";let i=t;throw\"function\"==typeof t&&(i=t.pluginName||t.name),new $i.b(e,this._editor,{plugin:i})}return e}has(t){return this._plugins.has(t)}init(t,e=[]){const i=this,n=this._editor,o=new Set,r=[],s=u(t),a=u(e),c=function(t){const e=[];for(const i of t)h(i)||e.push(i);return e.length?e:null}(t);if(c){const t=\"plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.\";return console.error(Object($i.a)(t),{plugins:c}),Promise.reject(new $i.b(t,this._editor,{plugins:c}))}return Promise.all(s.map(l)).then(()=>d(r,\"init\")).then(()=>d(r,\"afterInit\")).then(()=>r);function l(t){if(!a.includes(t)&&!i._plugins.has(t)&&!o.has(t))return function(t){return new Promise(s=>{o.add(t),t.requires&&t.requires.forEach(i=>{const o=h(i);if(e.includes(o))throw new $i.b(\"plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.\",n,{plugin:o,requiredBy:t});l(o)});const a=new t(n);i._add(t,a),r.push(a),s()})}(t).catch(e=>{throw console.error(Object($i.a)(\"plugincollection-load: It was not possible to load the plugin.\"),{plugin:t}),e})}function d(t,e){return t.reduce((t,i)=>i[e]?t.then(i[e].bind(i)):t,Promise.resolve())}function h(t){return\"function\"==typeof t?t:i._availablePlugins.get(t)}function u(t){return t.map(t=>h(t)).filter(t=>!!t)}}destroy(){const t=Array.from(this).map(([,t])=>t).filter(t=>\"function\"==typeof t.destroy).map(t=>t.destroy());return Promise.all(t)}_add(t,e){this._plugins.set(t,e);const i=t.pluginName;if(i){if(this._plugins.has(i))throw new $i.b(\"plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.\",null,{pluginName:i,plugin1:this._plugins.get(i).constructor,plugin2:t});this._plugins.set(i,e)}}}cn(Ta,tn);class Ca{constructor(){this._commands=new Map}add(t,e){this._commands.set(t,e)}get(t){return this._commands.get(t)}execute(t,...e){const i=this.get(t);if(!i)throw new $i.b(\"commandcollection-command-not-found: Command does not exist.\",this,{commandName:t});i.execute(...e)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const t of this.commands())t.destroy()}}function Pa(t,e){const i=Object.keys(window.CKEDITOR_TRANSLATIONS).length;return 1===i&&(t=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]),0!==i&&function(t,e){return t in window.CKEDITOR_TRANSLATIONS&&e in window.CKEDITOR_TRANSLATIONS[t]}(t,e)?window.CKEDITOR_TRANSLATIONS[t][e].replace(/ \\[context: [^\\]]+\\]$/,\"\"):e.replace(/ \\[context: [^\\]]+\\]$/,\"\")}window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});const Sa=[\"ar\",\"fa\",\"he\",\"ku\",\"ug\"];class Ma{constructor(t={}){this.uiLanguage=t.uiLanguage||\"en\",this.contentLanguage=t.contentLanguage||this.uiLanguage,this.uiLanguageDirection=Ea(this.uiLanguage),this.contentLanguageDirection=Ea(this.contentLanguage),this.t=((...t)=>this._t(...t))}get language(){return console.warn(\"locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead.\"),this.uiLanguage}_t(t,e){let i=Pa(this.uiLanguage,t);return e&&(i=i.replace(/%(\\d+)/g,(t,i)=>i<e.length?e[i]:t)),i}}function Ea(t){return Sa.includes(t)?\"rtl\":\"ltr\"}class Ia{constructor(){this._consumables=new Map}add(t,e){let i;t.is(\"text\")||t.is(\"documentFragment\")?this._consumables.set(t,!0):(this._consumables.has(t)?i=this._consumables.get(t):(i=new Na,this._consumables.set(t,i)),i.add(e))}test(t,e){const i=this._consumables.get(t);return void 0===i?null:t.is(\"text\")||t.is(\"documentFragment\")?i:i.test(e)}consume(t,e){return!!this.test(t,e)&&(t.is(\"text\")||t.is(\"documentFragment\")?this._consumables.set(t,!1):this._consumables.get(t).consume(e),!0)}revert(t,e){const i=this._consumables.get(t);void 0!==i&&(t.is(\"text\")||t.is(\"documentFragment\")?this._consumables.set(t,!0):i.revert(e))}static consumablesFromElement(t){const e={name:!0,attributes:[],classes:[],styles:[]},i=t.getAttributeKeys();for(const t of i)\"style\"!=t&&\"class\"!=t&&e.attributes.push(t);const n=t.getClassNames();for(const t of n)e.classes.push(t);const o=t.getStyleNames();for(const t of o)e.styles.push(t);return e}static createFrom(t,e){if(e||(e=new Ia),t.is(\"text\"))return e.add(t),e;t.is(\"element\")&&e.add(t,Ia.consumablesFromElement(t)),t.is(\"documentFragment\")&&e.add(t);for(const i of t.getChildren())e=Ia.createFrom(i,e);return e}}class Na{constructor(){this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(t){t.name&&(this._canConsumeName=!0);for(const e in this._consumables)e in t&&this._add(e,t[e])}test(t){if(t.name&&!this._canConsumeName)return this._canConsumeName;for(const e in this._consumables)if(e in t){const i=this._test(e,t[e]);if(!0!==i)return i}return!0}consume(t){t.name&&(this._canConsumeName=!1);for(const e in this._consumables)e in t&&this._consume(e,t[e])}revert(t){t.name&&(this._canConsumeName=!0);for(const e in this._consumables)e in t&&this._revert(e,t[e])}_add(t,e){const i=qt(e)?e:[e],n=this._consumables[t];for(const e of i){if(\"attributes\"===t&&(\"class\"===e||\"style\"===e))throw new $i.b(\"viewconsumable-invalid-attribute: Classes and styles should be handled separately.\",this);n.set(e,!0)}}_test(t,e){const i=qt(e)?e:[e],n=this._consumables[t];for(const e of i)if(\"attributes\"!==t||\"class\"!==e&&\"style\"!==e){const t=n.get(e);if(void 0===t)return null;if(!t)return!1}else{const t=\"class\"==e?\"classes\":\"styles\",i=this._test(t,[...this._consumables[t].keys()]);if(!0!==i)return i}return!0}_consume(t,e){const i=qt(e)?e:[e],n=this._consumables[t];for(const e of i)if(\"attributes\"!==t||\"class\"!==e&&\"style\"!==e)n.set(e,!1);else{const t=\"class\"==e?\"classes\":\"styles\";this._consume(t,[...this._consumables[t].keys()])}}_revert(t,e){const i=qt(e)?e:[e],n=this._consumables[t];for(const e of i)if(\"attributes\"!==t||\"class\"!==e&&\"style\"!==e){!1===n.get(e)&&n.set(e,!0)}else{const t=\"class\"==e?\"classes\":\"styles\";this._revert(t,[...this._consumables[t].keys()])}}}class Oa{constructor(){this._sourceDefinitions={},this._attributeProperties={},this.decorate(\"checkChild\"),this.decorate(\"checkAttribute\"),this.on(\"checkAttribute\",(t,e)=>{e[0]=new Ra(e[0])},{priority:\"highest\"}),this.on(\"checkChild\",(t,e)=>{e[0]=new Ra(e[0]),e[1]=this.getDefinition(e[1])},{priority:\"highest\"})}register(t,e){if(this._sourceDefinitions[t])throw new $i.b(\"schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.\",this,{itemName:t});this._sourceDefinitions[t]=[Object.assign({},e)],this._clearCache()}extend(t,e){if(!this._sourceDefinitions[t])throw new $i.b(\"schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.\",this,{itemName:t});this._sourceDefinitions[t].push(Object.assign({},e)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(t){let e;return e=\"string\"==typeof t?t:t.is&&(t.is(\"text\")||t.is(\"textProxy\"))?\"$text\":t.name,this.getDefinitions()[e]}isRegistered(t){return!!this.getDefinition(t)}isBlock(t){const e=this.getDefinition(t);return!(!e||!e.isBlock)}isLimit(t){const e=this.getDefinition(t);return!!e&&!(!e.isLimit&&!e.isObject)}isObject(t){const e=this.getDefinition(t);return!(!e||!e.isObject)}isInline(t){const e=this.getDefinition(t);return!(!e||!e.isInline)}checkChild(t,e){return!!e&&this._checkContextMatch(e,t)}checkAttribute(t,e){const i=this.getDefinition(t.last);return!!i&&i.allowAttributes.includes(e)}checkMerge(t,e=null){if(t instanceof Ys){const e=t.nodeBefore,i=t.nodeAfter;if(!(e instanceof Us))throw new $i.b(\"schema-check-merge-no-element-before: The node before the merge position must be an element.\",this);if(!(i instanceof Us))throw new $i.b(\"schema-check-merge-no-element-after: The node after the merge position must be an element.\",this);return this.checkMerge(e,i)}for(const i of e.getChildren())if(!this.checkChild(t,i))return!1;return!0}addChildCheck(t){this.on(\"checkChild\",(e,[i,n])=>{if(!n)return;const o=t(i,n);\"boolean\"==typeof o&&(e.stop(),e.return=o)},{priority:\"high\"})}addAttributeCheck(t){this.on(\"checkAttribute\",(e,[i,n])=>{const o=t(i,n);\"boolean\"==typeof o&&(e.stop(),e.return=o)},{priority:\"high\"})}setAttributeProperties(t,e){this._attributeProperties[t]=Object.assign(this.getAttributeProperties(t),e)}getAttributeProperties(t){return this._attributeProperties[t]||{}}getLimitElement(t){let e;if(t instanceof Ys)e=t.parent;else{e=(t instanceof $s?[t]:Array.from(t.getRanges())).reduce((t,e)=>{const i=e.getCommonAncestor();return t?t.getCommonAncestor(i,{includeSelf:!0}):i},null)}for(;!this.isLimit(e)&&e.parent;)e=e.parent;return e}checkAttributeInSelection(t,e){if(t.isCollapsed){const i=[...t.getFirstPosition().getAncestors(),new zs(\"\",t.getAttributes())];return this.checkAttribute(i,e)}{const i=t.getRanges();for(const t of i)for(const i of t)if(this.checkAttribute(i.item,e))return!0}return!1}*getValidRanges(t,e){t=function*(t){for(const e of t)yield*e.getMinimalFlatRanges()}(t);for(const i of t)yield*this._getValidRangesForRange(i,e)}getNearestSelectionRange(t,e=\"both\"){if(this.checkChild(t,\"$text\"))return new $s(t);let i,n;\"both\"!=e&&\"backward\"!=e||(i=new Hs({startPosition:t,direction:\"backward\"})),\"both\"!=e&&\"forward\"!=e||(n=new Hs({startPosition:t}));for(const t of function*(t,e){let i=!1;for(;!i;){if(i=!0,t){const e=t.next();e.done||(i=!1,yield{walker:t,value:e.value})}if(e){const t=e.next();t.done||(i=!1,yield{walker:e,value:t.value})}}}(i,n)){const e=t.walker==i?\"elementEnd\":\"elementStart\",n=t.value;if(n.type==e&&this.isObject(n.item))return $s._createOn(n.item);if(this.checkChild(n.nextPosition,\"$text\"))return new $s(n.nextPosition)}return null}findAllowedParent(t,e){let i=t.parent;for(;i;){if(this.checkChild(i,e))return i;if(this.isLimit(i))return null;i=i.parent}return null}removeDisallowedAttributes(t,e){for(const i of t)if(i.is(\"text\"))qa(this,i,e);else{const t=$s._createIn(i).getPositions();for(const i of t){qa(this,i.nodeBefore||i.parent,e)}}}createContext(t){return new Ra(t)}_clearCache(){this._compiledDefinitions=null}_compile(){const t={},e=this._sourceDefinitions,i=Object.keys(e);for(const n of i)t[n]=Da(e[n],n);for(const e of i)La(t,e);for(const e of i)ja(t,e);for(const e of i)Va(t,e),za(t,e);for(const e of i)Ba(t,e),Fa(t,e);this._compiledDefinitions=t}_checkContextMatch(t,e,i=e.length-1){const n=e.getItem(i);if(t.allowIn.includes(n.name)){if(0==i)return!0;{const t=this.getDefinition(n);return this._checkContextMatch(t,e,i-1)}}return!1}*_getValidRangesForRange(t,e){let i=t.start,n=t.start;for(const o of t.getItems({shallow:!0}))o.is(\"element\")&&(yield*this._getValidRangesForRange($s._createIn(o),e)),this.checkAttribute(o,e)||(i.isEqual(n)||(yield new $s(i,n)),i=Ys._createAfter(o)),n=Ys._createAfter(o);i.isEqual(n)||(yield new $s(i,n))}}cn(Oa,Fn);class Ra{constructor(t){if(t instanceof Ra)return t;\"string\"==typeof t?t=[t]:Array.isArray(t)||(t=t.getAncestors({includeSelf:!0})),t[0]&&\"string\"!=typeof t[0]&&t[0].is(\"documentFragment\")&&t.shift(),this._items=t.map(Wa)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(t){const e=new Ra([t]);return e._items=[...this._items,...e._items],e}getItem(t){return this._items[t]}*getNames(){yield*this._items.map(t=>t.name)}endsWith(t){return Array.from(this.getNames()).join(\" \").endsWith(t)}}function Da(t,e){const i={name:e,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};return function(t,e){for(const i of t){const t=Object.keys(i).filter(t=>t.startsWith(\"is\"));for(const n of t)e[n]=i[n]}}(t,i),Ua(t,i,\"allowIn\"),Ua(t,i,\"allowContentOf\"),Ua(t,i,\"allowWhere\"),Ua(t,i,\"allowAttributes\"),Ua(t,i,\"allowAttributesOf\"),Ua(t,i,\"inheritTypesFrom\"),function(t,e){for(const i of t){const t=i.inheritAllFrom;t&&(e.allowContentOf.push(t),e.allowWhere.push(t),e.allowAttributesOf.push(t),e.inheritTypesFrom.push(t))}}(t,i),i}function La(t,e){for(const i of t[e].allowContentOf)if(t[i]){Ha(t,i).forEach(t=>{t.allowIn.push(e)})}delete t[e].allowContentOf}function ja(t,e){for(const i of t[e].allowWhere){const n=t[i];if(n){const i=n.allowIn;t[e].allowIn.push(...i)}}delete t[e].allowWhere}function Va(t,e){for(const i of t[e].allowAttributesOf){const n=t[i];if(n){const i=n.allowAttributes;t[e].allowAttributes.push(...i)}}delete t[e].allowAttributesOf}function za(t,e){const i=t[e];for(const e of i.inheritTypesFrom){const n=t[e];if(n){const t=Object.keys(n).filter(t=>t.startsWith(\"is\"));for(const e of t)e in i||(i[e]=n[e])}}delete i.inheritTypesFrom}function Ba(t,e){const i=t[e],n=i.allowIn.filter(e=>t[e]);i.allowIn=Array.from(new Set(n))}function Fa(t,e){const i=t[e];i.allowAttributes=Array.from(new Set(i.allowAttributes))}function Ua(t,e,i){for(const n of t)\"string\"==typeof n[i]?e[i].push(n[i]):Array.isArray(n[i])&&e[i].push(...n[i])}function Ha(t,e){const i=t[e];return function(t){return Object.keys(t).map(e=>t[e])}(t).filter(t=>t.allowIn.includes(i.name))}function Wa(t){return\"string\"==typeof t?{name:t,*getAttributeKeys(){},getAttribute(){}}:{name:t.is(\"element\")?t.name:\"$text\",*getAttributeKeys(){yield*t.getAttributeKeys()},getAttribute:e=>t.getAttribute(e)}}function qa(t,e,i){for(const n of e.getAttributeKeys())t.checkAttribute(e,n)||i.removeAttribute(n,e)}class Ya{constructor(t={}){this._splitParts=new Map,this._modelCursor=null,this.conversionApi=Object.assign({},t),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this),this.conversionApi.getSplitParts=this._getSplitParts.bind(this)}convert(t,e,i=[\"$root\"]){this.fire(\"viewCleanup\",t),this._modelCursor=function(t,e){let i;for(const n of new Ra(t)){const t={};for(const e of n.getAttributeKeys())t[e]=n.getAttribute(e);const o=e.createElement(n.name,t);i&&e.append(o,i),i=Ys._createAt(o,0)}return i}(i,e),this.conversionApi.writer=e,this.conversionApi.consumable=Ia.createFrom(t),this.conversionApi.store={};const{modelRange:n}=this._convertItem(t,this._modelCursor),o=e.createDocumentFragment();if(n){this._removeEmptyElements();for(const t of Array.from(this._modelCursor.parent.getChildren()))e.append(t,o);o.markers=function(t,e){const i=new Set,n=new Map,o=$s._createIn(t).getItems();for(const t of o)\"$marker\"==t.name&&i.add(t);for(const t of i){const i=t.getAttribute(\"data-name\"),o=e.createPositionBefore(t);n.has(i)?n.get(i).end=o.clone():n.set(i,new $s(o.clone())),e.remove(t)}return n}(o,e)}return this._modelCursor=null,this._splitParts.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,o}_convertItem(t,e){const i=Object.assign({viewItem:t,modelCursor:e,modelRange:null});if(t.is(\"element\")?this.fire(\"element:\"+t.name,i,this.conversionApi):t.is(\"text\")?this.fire(\"text\",i,this.conversionApi):this.fire(\"documentFragment\",i,this.conversionApi),i.modelRange&&!(i.modelRange instanceof $s))throw new $i.b(\"view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.\",this);return{modelRange:i.modelRange,modelCursor:i.modelCursor}}_convertChildren(t,e){const i=new $s(e);let n=e;for(const e of Array.from(t.getChildren())){const t=this._convertItem(e,n);t.modelRange instanceof $s&&(i.end=t.modelRange.end,n=t.modelCursor)}return{modelRange:i,modelCursor:n}}_splitToAllowedParent(t,e){const i=this.conversionApi.schema.findAllowedParent(e,t);if(!i)return null;if(i===e.parent)return{position:e};if(this._modelCursor.parent.getAncestors().includes(i))return null;const n=this.conversionApi.writer.split(e,i),o=[];for(const t of n.range.getWalker())if(\"elementEnd\"==t.type)o.push(t.item);else{const e=o.pop(),i=t.item;this._registerSplitPair(e,i)}return{position:n.position,cursorParent:n.range.end.parent}}_registerSplitPair(t,e){this._splitParts.has(t)||this._splitParts.set(t,[t]);const i=this._splitParts.get(t);this._splitParts.set(e,i),i.push(e)}_getSplitParts(t){let e;return e=this._splitParts.has(t)?this._splitParts.get(t):[t]}_removeEmptyElements(){let t=!1;for(const e of this._splitParts.keys())e.isEmpty&&(this.conversionApi.writer.remove(e),this._splitParts.delete(e),t=!0);t&&this._removeEmptyElements()}}cn(Ya,tn);class $a{constructor(t,e){this.model=t,this.processor=e,this.mapper=new Gs,this.downcastDispatcher=new Js({mapper:this.mapper}),this.downcastDispatcher.on(\"insert:$text\",(t,e,i)=>{if(!i.consumable.consume(e.item,\"insert\"))return;const n=i.writer,o=i.mapper.toViewPosition(e.range.start),r=n.createText(e.item.data);n.insert(o,r)},{priority:\"lowest\"}),this.upcastDispatcher=new Ya({schema:t.schema}),this.upcastDispatcher.on(\"text\",(t,e,i)=>{if(i.schema.checkChild(e.modelCursor,\"$text\")&&i.consumable.consume(e.viewItem)){const t=i.writer.createText(e.viewItem.data);i.writer.insert(t,e.modelCursor),e.modelRange=$s._createFromPositionAndShift(e.modelCursor,t.offsetSize),e.modelCursor=e.modelRange.end}},{priority:\"lowest\"}),this.upcastDispatcher.on(\"element\",(t,e,i)=>{if(!e.modelRange&&i.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:n}=i.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=n}},{priority:\"lowest\"}),this.upcastDispatcher.on(\"documentFragment\",(t,e,i)=>{if(!e.modelRange&&i.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:n}=i.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=n}},{priority:\"lowest\"}),this.decorate(\"init\"),this.on(\"init\",()=>{this.fire(\"ready\")},{priority:\"lowest\"})}get(t){const{rootName:e=\"main\",trim:i=\"empty\"}=t||{};if(!this._checkIfRootsExists([e]))throw new $i.b(\"datacontroller-get-non-existent-root: Attempting to get data from a non-existing root.\",this);const n=this.model.document.getRoot(e);return\"empty\"!==i||this.model.hasContent(n,{ignoreWhitespaces:!0})?this.stringify(n):\"\"}stringify(t){const e=this.toView(t);return this.processor.toData(e)}toView(t){this.mapper.clearBindings();const e=$s._createIn(t),i=new Ao,n=new To(new ro);if(this.mapper.bindElements(t,i),this.downcastDispatcher.convertInsert(e,n),!t.is(\"documentFragment\")){const e=function(t){const e=[],i=t.root.document;if(!i)return[];const n=$s._createIn(t);for(const t of i.model.markers){const i=n.getIntersection(t.getRange());i&&e.push([t.name,i])}return e}(t);for(const[t,i]of e)this.downcastDispatcher.convertMarkerAdd(t,i,n)}return i}init(t){if(this.model.document.version)throw new $i.b(\"datacontroller-init-document-not-empty: Trying to set initial data to not empty document.\",this);let e={};if(\"string\"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new $i.b(\"datacontroller-init-non-existent-root: Attempting to init data on a non-existing root.\",this);return this.model.enqueueChange(\"transparent\",t=>{for(const i of Object.keys(e)){const n=this.model.document.getRoot(i);t.insert(this.parse(e[i],n),n,0)}}),Promise.resolve()}set(t){let e={};if(\"string\"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new $i.b(\"datacontroller-set-non-existent-root: Attempting to set data on a non-existing root.\",this);this.model.enqueueChange(\"transparent\",t=>{t.setSelection(null),t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const i of Object.keys(e)){const n=this.model.document.getRoot(i);t.remove(t.createRangeIn(n)),t.insert(this.parse(e[i],n),n,0)}})}parse(t,e=\"$root\"){const i=this.processor.toView(t);return this.toModel(i,e)}toModel(t,e=\"$root\"){return this.model.change(i=>this.upcastDispatcher.convert(t,i,e))}destroy(){this.stopListening()}_checkIfRootsExists(t){for(const e of t)if(!this.model.document.getRootNames().includes(e))return!1;return!0}}cn($a,Fn);class Ga{constructor(t,e){this._helpers=new Map,this._downcast=Array.isArray(t)?t:[t],this._createConversionHelpers({name:\"downcast\",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Array.isArray(e)?e:[e],this._createConversionHelpers({name:\"upcast\",dispatchers:this._upcast,isDowncast:!1})}addAlias(t,e){const i=this._downcast.includes(e);if(!this._upcast.includes(e)&&!i)throw new $i.b(\"conversion-add-alias-dispatcher-not-registered: Trying to register and alias for a dispatcher that nas not been registered.\",this);this._createConversionHelpers({name:t,dispatchers:[e],isDowncast:i})}for(t){if(!this._helpers.has(t))throw new $i.b(\"conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.\",this);return this._helpers.get(t)}elementToElement(t){this.for(\"downcast\").elementToElement(t);for(const{model:e,view:i}of Qa(t))this.for(\"upcast\").elementToElement({model:e,view:i,converterPriority:t.converterPriority})}attributeToElement(t){this.for(\"downcast\").attributeToElement(t);for(const{model:e,view:i}of Qa(t))this.for(\"upcast\").elementToAttribute({view:i,model:e,converterPriority:t.converterPriority})}attributeToAttribute(t){this.for(\"downcast\").attributeToAttribute(t);for(const{model:e,view:i}of Qa(t))this.for(\"upcast\").attributeToAttribute({view:i,model:e})}_createConversionHelpers({name:t,dispatchers:e,isDowncast:i}){if(this._helpers.has(t))throw new $i.b(\"conversion-group-exists: Trying to register a group name that has already been registered.\",this);const n=i?new fa(e):new _a(e);this._helpers.set(t,n)}}function*Qa(t){if(t.model.values)for(const e of t.model.values){yield*Ka({key:t.model.key,value:e},t.view[e],t.upcastAlso?t.upcastAlso[e]:void 0)}else yield*Ka(t.model,t.view,t.upcastAlso)}function*Ka(t,e,i){if(yield{model:t,view:e},i){i=Array.isArray(i)?i:[i];for(const e of i)yield{model:t,view:e}}}class Ja{constructor(t=\"default\"){this.operations=[],this.type=t}get baseVersion(){for(const t of this.operations)if(null!==t.baseVersion)return t.baseVersion;return null}addOperation(t){return t.batch=this,this.operations.push(t),t}}class Za{constructor(t){this.baseVersion=t,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const t=Object.assign({},this);return t.__className=this.constructor.className,delete t.batch,delete t.isDocumentOperation,t}static get className(){return\"Operation\"}static fromJSON(t){return new this(t.baseVersion)}}class Xa{constructor(t){this.markers=new Map,this._children=new Fs,t&&this._insertChild(0,t)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(t){return\"documentFragment\"==t||\"model:documentFragment\"==t}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}getPath(){return[]}getNodeByPath(t){let e=this;for(const i of t)e=e.getChild(e.offsetToIndex(i));return e}offsetToIndex(t){return this._children.offsetToIndex(t)}toJSON(){const t=[];for(const e of this._children)t.push(e.toJSON());return t}static fromJSON(t){const e=[];for(const i of t)i.name?e.push(Us.fromJSON(i)):e.push(zs.fromJSON(i));return new Xa(e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const i=function(t){if(\"string\"==typeof t)return[new zs(t)];pn(t)||(t=[t]);return Array.from(t).map(t=>\"string\"==typeof t?new zs(t):t instanceof Bs?new zs(t.data,t.getAttributes()):t)}(e);for(const t of i)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,i)}_removeChildren(t,e=1){const i=this._children._removeNodes(t,e);for(const t of i)t.parent=null;return i}}function tc(t,e){const i=(e=nc(e)).reduce((t,e)=>t+e.offsetSize,0),n=t.parent;rc(t);const o=t.index;return n._insertChild(o,e),oc(n,o+e.length),oc(n,o),new $s(t,t.getShiftedBy(i))}function ec(t){if(!t.isFlat)throw new $i.b(\"operation-utils-remove-range-not-flat: Trying to remove a range which starts and ends in different element.\",this);const e=t.start.parent;rc(t.start),rc(t.end);const i=e._removeChildren(t.start.index,t.end.index-t.start.index);return oc(e,t.start.index),i}function ic(t,e){if(!t.isFlat)throw new $i.b(\"operation-utils-move-range-not-flat: Trying to move a range which starts and ends in different element.\",this);const i=ec(t);return tc(e=e._getTransformedByDeletion(t.start,t.end.offset-t.start.offset),i)}function nc(t){const e=[];t instanceof Array||(t=[t]);for(let i=0;i<t.length;i++)if(\"string\"==typeof t[i])e.push(new zs(t[i]));else if(t[i]instanceof Bs)e.push(new zs(t[i].data,t[i].getAttributes()));else if(t[i]instanceof Xa||t[i]instanceof Fs)for(const n of t[i])e.push(n);else t[i]instanceof Vs&&e.push(t[i]);for(let t=1;t<e.length;t++){const i=e[t],n=e[t-1];i instanceof zs&&n instanceof zs&&sc(i,n)&&(e.splice(t-1,2,new zs(n.data+i.data,n.getAttributes())),t--)}return e}function oc(t,e){const i=t.getChild(e-1),n=t.getChild(e);if(i&&n&&i.is(\"text\")&&n.is(\"text\")&&sc(i,n)){const o=new zs(i.data+n.data,i.getAttributes());t._removeChildren(e-1,2),t._insertChild(e-1,o)}}function rc(t){const e=t.textNode,i=t.parent;if(e){const n=t.offset-e.startOffset,o=e.index;i._removeChildren(o,1);const r=new zs(e.data.substr(0,n),e.getAttributes()),s=new zs(e.data.substr(n),e.getAttributes());i._insertChild(o,[r,s])}}function sc(t,e){const i=t.getAttributes(),n=e.getAttributes();for(const t of i){if(t[1]!==e.getAttribute(t[0]))return!1;n.next()}return n.next().done}var ac=function(t,e){return Qr(t,e)};class cc extends Za{constructor(t,e,i,n,o){super(o),this.range=t.clone(),this.key=e,this.oldValue=void 0===i?null:i,this.newValue=void 0===n?null:n}get type(){return null===this.oldValue?\"addAttribute\":null===this.newValue?\"removeAttribute\":\"changeAttribute\"}clone(){return new cc(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new cc(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const t=super.toJSON();return t.range=this.range.toJSON(),t}_validate(){if(!this.range.isFlat)throw new $i.b(\"attribute-operation-range-not-flat: The range to change is not flat.\",this);for(const t of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!ac(t.getAttribute(this.key),this.oldValue))throw new $i.b(\"attribute-operation-wrong-old-value: Changed node has different attribute value than operation's old attribute value.\",this,{item:t,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&t.hasAttribute(this.key))throw new $i.b(\"attribute-operation-attribute-exists: The attribute with given key already exists.\",this,{node:t,key:this.key})}}_execute(){ac(this.oldValue,this.newValue)||function(t,e,i){rc(t.start),rc(t.end);for(const n of t.getItems({shallow:!0})){const t=n.is(\"textProxy\")?n.textNode:n;null!==i?t._setAttribute(e,i):t._removeAttribute(e),oc(t.parent,t.index)}oc(t.end.parent,t.end.index)}(this.range,this.key,this.newValue)}static get className(){return\"AttributeOperation\"}static fromJSON(t,e){return new cc($s.fromJSON(t.range,e),t.key,t.oldValue,t.newValue,t.baseVersion)}}class lc extends Za{constructor(t,e){super(null),this.sourcePosition=t.clone(),this.howMany=e}get type(){return\"detach\"}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t}_validate(){if(this.sourcePosition.root.document)throw new $i.b(\"detach-operation-on-document-node: Cannot detach document node.\",this)}_execute(){ec($s._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return\"DetachOperation\"}}class dc extends Za{constructor(t,e,i,n){super(n),this.sourcePosition=t.clone(),this.sourcePosition.stickiness=\"toNext\",this.howMany=e,this.targetPosition=i.clone(),this.targetPosition.stickiness=\"toNone\"}get type(){return\"$graveyard\"==this.targetPosition.root.rootName?\"remove\":\"$graveyard\"==this.sourcePosition.root.rootName?\"reinsert\":\"move\"}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const t=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new this.constructor(this.getMovedRangeStart(),this.howMany,t,this.baseVersion+1)}_validate(){const t=this.sourcePosition.parent,e=this.targetPosition.parent,i=this.sourcePosition.offset,n=this.targetPosition.offset;if(i+this.howMany>t.maxOffset)throw new $i.b(\"move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.\",this);if(t===e&&i<n&&n<i+this.howMany)throw new $i.b(\"move-operation-range-into-itself: Trying to move a range of nodes to the inside of that range.\",this);if(this.sourcePosition.root==this.targetPosition.root&&\"prefix\"==ln(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const t=this.sourcePosition.path.length-1;if(this.targetPosition.path[t]>=i&&this.targetPosition.path[t]<i+this.howMany)throw new $i.b(\"move-operation-node-into-itself: Trying to move a range of nodes into one of nodes from that range.\",this)}}_execute(){ic($s._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t.targetPosition=this.targetPosition.toJSON(),t}static get className(){return\"MoveOperation\"}static fromJSON(t,e){const i=Ys.fromJSON(t.sourcePosition,e),n=Ys.fromJSON(t.targetPosition,e);return new this(i,t.howMany,n,t.baseVersion)}}class hc extends Za{constructor(t,e,i){super(i),this.position=t.clone(),this.position.stickiness=\"toNone\",this.nodes=new Fs(nc(e)),this.shouldReceiveAttributes=!1}get type(){return\"insert\"}get howMany(){return this.nodes.maxOffset}clone(){const t=new Fs([...this.nodes].map(t=>t._clone(!0))),e=new hc(this.position,t,this.baseVersion);return e.shouldReceiveAttributes=this.shouldReceiveAttributes,e}getReversed(){const t=this.position.root.document.graveyard,e=new Ys(t,[0]);return new dc(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){const t=this.position.parent;if(!t||t.maxOffset<this.position.offset)throw new $i.b(\"insert-operation-position-invalid: Insertion position is invalid.\",this)}_execute(){const t=this.nodes;this.nodes=new Fs([...t].map(t=>t._clone(!0))),tc(this.position,t)}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t.nodes=this.nodes.toJSON(),t}static get className(){return\"InsertOperation\"}static fromJSON(t,e){const i=[];for(const e of t.nodes)e.name?i.push(Us.fromJSON(e)):i.push(zs.fromJSON(e));const n=new hc(Ys.fromJSON(t.position,e),i,t.baseVersion);return n.shouldReceiveAttributes=t.shouldReceiveAttributes,n}}class uc extends Za{constructor(t,e,i,n,o,r){super(r),this.name=t,this.oldRange=e?e.clone():null,this.newRange=i?i.clone():null,this.affectsData=o,this._markers=n}get type(){return\"marker\"}clone(){return new uc(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new uc(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const t=this.newRange?\"_set\":\"_remove\";this._markers[t](this.name,this.newRange,!0,this.affectsData)}toJSON(){const t=super.toJSON();return this.oldRange&&(t.oldRange=this.oldRange.toJSON()),this.newRange&&(t.newRange=this.newRange.toJSON()),delete t._markers,t}static get className(){return\"MarkerOperation\"}static fromJSON(t,e){return new uc(t.name,t.oldRange?$s.fromJSON(t.oldRange,e):null,t.newRange?$s.fromJSON(t.newRange,e):null,e.model.markers,t.affectsData,t.baseVersion)}}class fc extends Za{constructor(t,e,i,n){super(n),this.position=t,this.position.stickiness=\"toNext\",this.oldName=e,this.newName=i}get type(){return\"rename\"}clone(){return new fc(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new fc(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const t=this.position.nodeAfter;if(!(t instanceof Us))throw new $i.b(\"rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.\",this);if(t.name!==this.oldName)throw new $i.b(\"rename-operation-wrong-name: Element to change has different name than operation's old name.\",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t}static get className(){return\"RenameOperation\"}static fromJSON(t,e){return new fc(Ys.fromJSON(t.position,e),t.oldName,t.newName,t.baseVersion)}}class gc extends Za{constructor(t,e,i,n,o){super(o),this.root=t,this.key=e,this.oldValue=i,this.newValue=n}get type(){return null===this.oldValue?\"addRootAttribute\":null===this.newValue?\"removeRootAttribute\":\"changeRootAttribute\"}clone(){return new gc(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new gc(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is(\"documentFragment\"))throw new $i.b(\"rootattribute-operation-not-a-root: The element to change is not a root element.\",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new $i.b(\"rootattribute-operation-wrong-old-value: Changed node has different attribute value than operation's old attribute value.\",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new $i.b(\"rootattribute-operation-attribute-exists: The attribute with given key already exists.\",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const t=super.toJSON();return t.root=this.root.toJSON(),t}static get className(){return\"RootAttributeOperation\"}static fromJSON(t,e){if(!e.getRoot(t.root))throw new $i.b(\"rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.\",this,{rootName:t.root});return new gc(e.getRoot(t.root),t.key,t.oldValue,t.newValue,t.baseVersion)}}class mc extends Za{constructor(t,e,i,n,o){super(o),this.sourcePosition=t.clone(),this.sourcePosition.stickiness=\"toPrevious\",this.howMany=e,this.targetPosition=i.clone(),this.targetPosition.stickiness=\"toNext\",this.graveyardPosition=n.clone()}get type(){return\"merge\"}get deletionPosition(){return new Ys(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const t=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new $s(this.sourcePosition,t)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.targetPosition._getTransformedByMergeOperation(this),e=this.sourcePosition.path.slice(0,-1),i=new Ys(this.sourcePosition.root,e)._getTransformedByMergeOperation(this),n=new pc(t,this.howMany,this.graveyardPosition,this.baseVersion+1);return n.insertionPosition=i,n}_validate(){const t=this.sourcePosition.parent,e=this.targetPosition.parent;if(!t.parent)throw new $i.b(\"merge-operation-source-position-invalid: Merge source position is invalid.\",this);if(!e.parent)throw new $i.b(\"merge-operation-target-position-invalid: Merge target position is invalid.\",this);if(this.howMany!=t.maxOffset)throw new $i.b(\"merge-operation-how-many-invalid: Merge operation specifies wrong number of nodes to move.\",this)}_execute(){const t=this.sourcePosition.parent;ic($s._createIn(t),this.targetPosition),ic($s._createOn(t),this.graveyardPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=t.sourcePosition.toJSON(),t.targetPosition=t.targetPosition.toJSON(),t.graveyardPosition=t.graveyardPosition.toJSON(),t}static get className(){return\"MergeOperation\"}static fromJSON(t,e){const i=Ys.fromJSON(t.sourcePosition,e),n=Ys.fromJSON(t.targetPosition,e),o=Ys.fromJSON(t.graveyardPosition,e);return new this(i,t.howMany,n,o,t.baseVersion)}}class pc extends Za{constructor(t,e,i,n){super(n),this.splitPosition=t.clone(),this.splitPosition.stickiness=\"toNext\",this.howMany=e,this.insertionPosition=pc.getInsertionPosition(t),this.insertionPosition.stickiness=\"toNone\",this.graveyardPosition=i?i.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness=\"toNext\")}get type(){return\"split\"}get moveTargetPosition(){const t=this.insertionPosition.path.slice();return t.push(0),new Ys(this.insertionPosition.root,t)}get movedRange(){const t=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new $s(this.splitPosition,t)}clone(){const t=new this.constructor(this.splitPosition,this.howMany,this.graveyardPosition,this.baseVersion);return t.insertionPosition=this.insertionPosition,t}getReversed(){const t=this.splitPosition.root.document.graveyard,e=new Ys(t,[0]);return new mc(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){const t=this.splitPosition.parent,e=this.splitPosition.offset;if(!t||t.maxOffset<e)throw new $i.b(\"split-operation-position-invalid: Split position is invalid.\",this);if(!t.parent)throw new $i.b(\"split-operation-split-in-root: Cannot split root element.\",this);if(this.howMany!=t.maxOffset-this.splitPosition.offset)throw new $i.b(\"split-operation-how-many-invalid: Split operation specifies wrong number of nodes to move.\",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new $i.b(\"split-operation-graveyard-position-invalid: Graveyard position invalid.\",this)}_execute(){const t=this.splitPosition.parent;if(this.graveyardPosition)ic($s._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const e=t._clone();tc(this.insertionPosition,e)}ic(new $s(Ys._createAt(t,this.splitPosition.offset),Ys._createAt(t,t.maxOffset)),this.moveTargetPosition)}toJSON(){const t=super.toJSON();return t.splitPosition=this.splitPosition.toJSON(),t.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(t.graveyardPosition=this.graveyardPosition.toJSON()),t}static get className(){return\"SplitOperation\"}static getInsertionPosition(t){const e=t.path.slice(0,-1);return e[e.length-1]++,new Ys(t.root,e)}static fromJSON(t,e){const i=Ys.fromJSON(t.splitPosition,e),n=Ys.fromJSON(t.insertionPosition,e),o=t.graveyardPosition?Ys.fromJSON(t.graveyardPosition,e):null,r=new this(i,t.howMany,o,t.baseVersion);return r.insertionPosition=n,r}}class bc extends Us{constructor(t,e,i=\"main\"){super(e),this._doc=t,this.rootName=i}get document(){return this._doc}is(t,e){const i=t.replace(\"model:\",\"\");return e?\"rootElement\"==i&&e==this.name||super.is(t,e):\"rootElement\"==i||super.is(t)}toJSON(){return this.rootName}}class wc{constructor(t,e){this.model=t,this.batch=e}createText(t,e){return new zs(t,e)}createElement(t,e){return new Us(t,e)}createDocumentFragment(){return new Xa}insert(t,e,i=0){if(this._assertWriterUsedCorrectly(),t instanceof zs&&\"\"==t.data)return;const n=Ys._createAt(e,i);if(t.parent){if(xc(t.root,n.root))return void this.move($s._createOn(t),n);if(t.root.document)throw new $i.b(\"model-writer-insert-forbidden-move: Cannot move a node from a document to a different tree. It is forbidden to move a node that was already in a document outside of it.\",this);this.remove(t)}const o=n.root.document?n.root.document.version:null,r=new hc(n,t,o);if(t instanceof zs&&(r.shouldReceiveAttributes=!0),this.batch.addOperation(r),this.model.applyOperation(r),t instanceof Xa)for(const[e,i]of t.markers){const t=Ys._createAt(i.root,0),o={range:new $s(i.start._getCombined(t,n),i.end._getCombined(t,n)),usingOperation:!0,affectsData:!0};this.model.markers.has(e)?this.updateMarker(e,o):this.addMarker(e,o)}}insertText(t,e,i,n){e instanceof Xa||e instanceof Us||e instanceof Ys?this.insert(this.createText(t),e,i):this.insert(this.createText(t,e),i,n)}insertElement(t,e,i,n){e instanceof Xa||e instanceof Us||e instanceof Ys?this.insert(this.createElement(t),e,i):this.insert(this.createElement(t,e),i,n)}append(t,e){this.insert(t,e,\"end\")}appendText(t,e,i){e instanceof Xa||e instanceof Us?this.insert(this.createText(t),e,\"end\"):this.insert(this.createText(t,e),i,\"end\")}appendElement(t,e,i){e instanceof Xa||e instanceof Us?this.insert(this.createElement(t),e,\"end\"):this.insert(this.createElement(t,e),i,\"end\")}setAttribute(t,e,i){if(this._assertWriterUsedCorrectly(),i instanceof $s){const n=i.getMinimalFlatRanges();for(const i of n)_c(this,t,e,i)}else kc(this,t,e,i)}setAttributes(t,e){for(const[i,n]of js(t))this.setAttribute(i,n,e)}removeAttribute(t,e){if(this._assertWriterUsedCorrectly(),e instanceof $s){const i=e.getMinimalFlatRanges();for(const e of i)_c(this,t,null,e)}else kc(this,t,null,e)}clearAttributes(t){this._assertWriterUsedCorrectly();const e=t=>{for(const e of t.getAttributeKeys())this.removeAttribute(e,t)};if(t instanceof $s)for(const i of t.getItems())e(i);else e(t)}move(t,e,i){if(this._assertWriterUsedCorrectly(),!(t instanceof $s))throw new $i.b(\"writer-move-invalid-range: Invalid range to move.\",this);if(!t.isFlat)throw new $i.b(\"writer-move-range-not-flat: Range to move is not flat.\",this);const n=Ys._createAt(e,i);if(n.isEqual(t.start))return;if(this._addOperationForAffectedMarkers(\"move\",t),!xc(t.root,n.root))throw new $i.b(\"writer-move-different-document: Range is going to be moved between different documents.\",this);const o=t.root.document?t.root.document.version:null,r=new dc(t.start,t.end.offset-t.start.offset,n,o);this.batch.addOperation(r),this.model.applyOperation(r)}remove(t){this._assertWriterUsedCorrectly();const e=(t instanceof $s?t:$s._createOn(t)).getMinimalFlatRanges().reverse();for(const t of e)this._addOperationForAffectedMarkers(\"move\",t),yc(t.start,t.end.offset-t.start.offset,this.batch,this.model)}merge(t){this._assertWriterUsedCorrectly();const e=t.nodeBefore,i=t.nodeAfter;if(this._addOperationForAffectedMarkers(\"merge\",t),!(e instanceof Us))throw new $i.b(\"writer-merge-no-element-before: Node before merge position must be an element.\",this);if(!(i instanceof Us))throw new $i.b(\"writer-merge-no-element-after: Node after merge position must be an element.\",this);t.root.document?this._merge(t):this._mergeDetached(t)}createPositionFromPath(t,e,i){return this.model.createPositionFromPath(t,e,i)}createPositionAt(t,e){return this.model.createPositionAt(t,e)}createPositionAfter(t){return this.model.createPositionAfter(t)}createPositionBefore(t){return this.model.createPositionBefore(t)}createRange(t,e){return this.model.createRange(t,e)}createRangeIn(t){return this.model.createRangeIn(t)}createRangeOn(t){return this.model.createRangeOn(t)}createSelection(t,e,i){return this.model.createSelection(t,e,i)}_mergeDetached(t){const e=t.nodeBefore,i=t.nodeAfter;this.move($s._createIn(i),Ys._createAt(e,\"end\")),this.remove(i)}_merge(t){const e=Ys._createAt(t.nodeBefore,\"end\"),i=Ys._createAt(t.nodeAfter,0),n=t.root.document.graveyard,o=new Ys(n,[0]),r=t.root.document.version,s=new mc(i,t.nodeAfter.maxOffset,e,o,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(t,e){if(this._assertWriterUsedCorrectly(),!(t instanceof Us))throw new $i.b(\"writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.\",this);const i=t.root.document?t.root.document.version:null,n=new fc(Ys._createBefore(t),t.name,e,i);this.batch.addOperation(n),this.model.applyOperation(n)}split(t,e){this._assertWriterUsedCorrectly();let i,n,o=t.parent;if(!o.parent)throw new $i.b(\"writer-split-element-no-parent: Element with no parent can not be split.\",this);if(e||(e=o.parent),!t.parent.getAncestors({includeSelf:!0}).includes(e))throw new $i.b(\"writer-split-invalid-limit-element: Limit element is not a position ancestor.\",this);do{const e=o.root.document?o.root.document.version:null,r=o.maxOffset-t.offset,s=new pc(t,r,null,e);this.batch.addOperation(s),this.model.applyOperation(s),i||n||(i=o,n=t.parent.nextSibling),o=(t=this.createPositionAfter(t.parent)).parent}while(o!==e);return{position:t,range:new $s(Ys._createAt(i,\"end\"),Ys._createAt(n,0))}}wrap(t,e){if(this._assertWriterUsedCorrectly(),!t.isFlat)throw new $i.b(\"writer-wrap-range-not-flat: Range to wrap is not flat.\",this);const i=e instanceof Us?e:new Us(e);if(i.childCount>0)throw new $i.b(\"writer-wrap-element-not-empty: Element to wrap with is not empty.\",this);if(null!==i.parent)throw new $i.b(\"writer-wrap-element-attached: Element to wrap with is already attached to tree model.\",this);this.insert(i,t.start);const n=new $s(t.start.getShiftedBy(1),t.end.getShiftedBy(1));this.move(n,Ys._createAt(i,0))}unwrap(t){if(this._assertWriterUsedCorrectly(),null===t.parent)throw new $i.b(\"writer-unwrap-element-no-parent: Trying to unwrap an element which has no parent.\",this);this.move($s._createIn(t),this.createPositionAfter(t)),this.remove(t)}addMarker(t,e){if(this._assertWriterUsedCorrectly(),!e||\"boolean\"!=typeof e.usingOperation)throw new $i.b(\"writer-addMarker-no-usingOperation: The options.usingOperation parameter is required when adding a new marker.\",this);const i=e.usingOperation,n=e.range,o=void 0!==e.affectsData&&e.affectsData;if(this.model.markers.has(t))throw new $i.b(\"writer-addMarker-marker-exists: Marker with provided name already exists.\",this);if(!n)throw new $i.b(\"writer-addMarker-no-range: Range parameter is required when adding a new marker.\",this);return i?(vc(this,t,null,n,o),this.model.markers.get(t)):this.model.markers._set(t,n,i,o)}updateMarker(t,e){this._assertWriterUsedCorrectly();const i=\"string\"==typeof t?t:t.name,n=this.model.markers.get(i);if(!n)throw new $i.b(\"writer-updateMarker-marker-not-exists: Marker with provided name does not exists.\",this);if(!e)return void this.model.markers._refresh(n);const o=\"boolean\"==typeof e.usingOperation,r=\"boolean\"==typeof e.affectsData,s=r?e.affectsData:n.affectsData;if(!o&&!e.range&&!r)throw new $i.b(\"writer-updateMarker-wrong-options: One of the options is required - provide range, usingOperations or affectsData.\",this);const a=n.getRange(),c=e.range?e.range:a;o&&e.usingOperation!==n.managedUsingOperations?e.usingOperation?vc(this,i,null,c,s):(vc(this,i,a,null,s),this.model.markers._set(i,c,void 0,s)):n.managedUsingOperations?vc(this,i,a,c,s):this.model.markers._set(i,c,void 0,s)}removeMarker(t){this._assertWriterUsedCorrectly();const e=\"string\"==typeof t?t:t.name;if(!this.model.markers.has(e))throw new $i.b(\"writer-removeMarker-no-marker: Trying to remove marker which does not exist.\",this);const i=this.model.markers.get(e);i.managedUsingOperations?vc(this,e,i.getRange(),null,i.affectsData):this.model.markers._remove(e)}setSelection(t,e,i){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(t,e,i)}setSelectionFocus(t,e){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(t,e)}setSelectionAttribute(t,e){if(this._assertWriterUsedCorrectly(),\"string\"==typeof t)this._setSelectionAttribute(t,e);else for(const[e,i]of js(t))this._setSelectionAttribute(e,i)}removeSelectionAttribute(t){if(this._assertWriterUsedCorrectly(),\"string\"==typeof t)this._removeSelectionAttribute(t);else for(const e of t)this._removeSelectionAttribute(e)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(t){this.model.document.selection._restoreGravity(t)}_setSelectionAttribute(t,e){const i=this.model.document.selection;if(i.isCollapsed&&i.anchor.parent.isEmpty){const n=sa._getStoreAttributeKey(t);this.setAttribute(n,e,i.anchor.parent)}i._setAttribute(t,e)}_removeSelectionAttribute(t){const e=this.model.document.selection;if(e.isCollapsed&&e.anchor.parent.isEmpty){const i=sa._getStoreAttributeKey(t);this.removeAttribute(i,e.anchor.parent)}e._removeAttribute(t)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new $i.b(\"writer-incorrect-use: Trying to use a writer outside the change() block.\",this)}_addOperationForAffectedMarkers(t,e){for(const i of this.model.markers){if(!i.managedUsingOperations)continue;const n=i.getRange();let o=!1;if(\"move\"==t)o=e.containsPosition(n.start)||e.start.isEqual(n.start)||e.containsPosition(n.end)||e.end.isEqual(n.end);else{const t=e.nodeBefore,i=e.nodeAfter,r=n.start.parent==t&&n.start.isAtEnd,s=n.end.parent==i&&0==n.end.offset,a=n.end.nodeAfter==i,c=n.start.nodeAfter==i;o=r||s||a||c}o&&this.updateMarker(i.name,{range:n})}}}function _c(t,e,i,n){const o=t.model,r=o.document;let s,a,c,l=n.start;for(const t of n.getWalker({shallow:!0}))c=t.item.getAttribute(e),s&&a!=c&&(a!=i&&d(),l=s),s=t.nextPosition,a=c;function d(){const n=new $s(l,s),c=n.root.document?r.version:null,d=new cc(n,e,a,i,c);t.batch.addOperation(d),o.applyOperation(d)}s instanceof Ys&&s!=l&&a!=i&&d()}function kc(t,e,i,n){const o=t.model,r=o.document,s=n.getAttribute(e);let a,c;if(s!=i){if(n.root===n){const t=n.document?r.version:null;c=new gc(n,e,s,i,t)}else{const o=(a=new $s(Ys._createBefore(n),t.createPositionAfter(n))).root.document?r.version:null;c=new cc(a,e,s,i,o)}t.batch.addOperation(c),o.applyOperation(c)}}function vc(t,e,i,n,o){const r=t.model,s=r.document,a=new uc(e,i,n,r.markers,o,s.version);t.batch.addOperation(a),r.applyOperation(a)}function yc(t,e,i,n){let o;if(t.root.document){const i=n.document,r=new Ys(i.graveyard,[0]);o=new dc(t,e,r,i.version)}else o=new lc(t,e);i.addOperation(o),n.applyOperation(o)}function xc(t,e){return t===e||t instanceof bc&&e instanceof bc}class Ac{constructor(t){this._markerCollection=t,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}refreshItem(t){if(this._isInInsertedElement(t.parent))return;this._markRemove(t.parent,t.startOffset,t.offsetSize),this._markInsert(t.parent,t.startOffset,t.offsetSize);const e=$s._createOn(t);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}this._cachedChanges=null}bufferOperation(t){switch(t.type){case\"insert\":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case\"addAttribute\":case\"removeAttribute\":case\"changeAttribute\":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case\"remove\":case\"move\":case\"reinsert\":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),i=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),i||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case\"rename\":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=$s._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}break}case\"split\":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case\"merge\":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const i=t.graveyardPosition.parent;this._markInsert(i,t.graveyardPosition.offset,1);const n=t.targetPosition.parent;this._isInInsertedElement(n)||this._markInsert(n,t.targetPosition.offset,e.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(t,e,i,n){const o=this._changedMarkers.get(t);o?(o.newRange=i,o.affectsData=n,null==o.oldRange&&null==o.newRange&&this._changedMarkers.delete(t)):this._changedMarkers.set(t,{oldRange:e,newRange:i,affectsData:n})}getMarkersToRemove(){const t=[];for(const[e,i]of this._changedMarkers)null!=i.oldRange&&t.push({name:e,range:i.oldRange});return t}getMarkersToAdd(){const t=[];for(const[e,i]of this._changedMarkers)null!=i.newRange&&t.push({name:e,range:i.newRange});return t}getChangedMarkers(){return Array.from(this._changedMarkers).map(t=>({name:t[0],data:{oldRange:t[1].oldRange,newRange:t[1].newRange}}))}hasDataChanges(){for(const[,t]of this._changedMarkers)if(t.affectsData)return!0;return this._changesInElement.size>0}getChanges(t={includeChangesInGraveyard:!1}){if(this._cachedChanges)return t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();const e=[];for(const t of this._changesInElement.keys()){const i=this._changesInElement.get(t).sort((t,e)=>t.offset===e.offset?t.type!=e.type?\"remove\"==t.type?-1:1:0:t.offset<e.offset?-1:1),n=this._elementSnapshots.get(t),o=Tc(t.getChildren()),r=Cc(n.length,i);let s=0,a=0;for(const i of r)if(\"i\"===i)e.push(this._getInsertDiff(t,s,o[s].name)),s++;else if(\"r\"===i)e.push(this._getRemoveDiff(t,s,n[a].name)),a++;else if(\"a\"===i){const i=o[s].attributes,r=n[a].attributes;let c;if(\"$text\"==o[s].name)c=new $s(Ys._createAt(t,s),Ys._createAt(t,s+1));else{const e=t.offsetToIndex(s);c=new $s(Ys._createAt(t,s),Ys._createAt(t.getChild(e),0))}e.push(...this._getAttributesDiff(c,r,i)),s++,a++}else s++,a++}e.sort((t,e)=>t.position.root!=e.position.root?t.position.root.rootName<e.position.root.rootName?-1:1:t.position.isEqual(e.position)?t.changeCount-e.changeCount:t.position.isBefore(e.position)?-1:1);for(let t=1;t<e.length;t++){const i=e[t-1],n=e[t],o=\"remove\"==i.type&&\"remove\"==n.type&&\"$text\"==i.name&&\"$text\"==n.name&&i.position.isEqual(n.position),r=\"insert\"==i.type&&\"insert\"==n.type&&\"$text\"==i.name&&\"$text\"==n.name&&i.position.parent==n.position.parent&&i.position.offset+i.length==n.position.offset,s=\"attribute\"==i.type&&\"attribute\"==n.type&&i.position.parent==n.position.parent&&i.range.isFlat&&n.range.isFlat&&i.position.offset+i.length==n.position.offset&&i.attributeKey==n.attributeKey&&i.attributeOldValue==n.attributeOldValue&&i.attributeNewValue==n.attributeNewValue;(o||r||s)&&(e[t-1].length++,s&&(e[t-1].range.end=e[t-1].range.end.getShiftedBy(1)),e.splice(t,1),t--)}for(const t of e)delete t.changeCount,\"attribute\"==t.type&&(delete t.position,delete t.length);return this._changeCount=0,this._cachedChangesWithGraveyard=e.slice(),this._cachedChanges=e.slice().filter(Pc),t.includeChangesInGraveyard?this._cachedChangesWithGraveyard:this._cachedChanges}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._cachedChanges=null}_markInsert(t,e,i){const n={type:\"insert\",offset:e,howMany:i,count:this._changeCount++};this._markChange(t,n)}_markRemove(t,e,i){const n={type:\"remove\",offset:e,howMany:i,count:this._changeCount++};this._markChange(t,n),this._removeAllNestedChanges(t,e,i)}_markAttribute(t){const e={type:\"attribute\",offset:t.startOffset,howMany:t.offsetSize,count:this._changeCount++};this._markChange(t.parent,e)}_markChange(t,e){this._makeSnapshot(t);const i=this._getChangesForElement(t);this._handleChange(e,i),i.push(e);for(let t=0;t<i.length;t++)i[t].howMany<1&&(i.splice(t,1),t--)}_getChangesForElement(t){let e;return this._changesInElement.has(t)?e=this._changesInElement.get(t):(e=[],this._changesInElement.set(t,e)),e}_makeSnapshot(t){this._elementSnapshots.has(t)||this._elementSnapshots.set(t,Tc(t.getChildren()))}_handleChange(t,e){t.nodesToHandle=t.howMany;for(const i of e){const n=t.offset+t.howMany,o=i.offset+i.howMany;if(\"insert\"==t.type&&(\"insert\"==i.type&&(t.offset<=i.offset?i.offset+=t.howMany:t.offset<o&&(i.howMany+=t.nodesToHandle,t.nodesToHandle=0)),\"remove\"==i.type&&t.offset<i.offset&&(i.offset+=t.howMany),\"attribute\"==i.type))if(t.offset<=i.offset)i.offset+=t.howMany;else if(t.offset<o){const o=i.howMany;i.howMany=t.offset-i.offset,e.unshift({type:\"attribute\",offset:n,howMany:o-i.howMany,count:this._changeCount++})}if(\"remove\"==t.type){if(\"insert\"==i.type)if(n<=i.offset)i.offset-=t.howMany;else if(n<=o)if(t.offset<i.offset){const e=n-i.offset;i.offset=t.offset,i.howMany-=e,t.nodesToHandle-=e}else i.howMany-=t.nodesToHandle,t.nodesToHandle=0;else if(t.offset<=i.offset)t.nodesToHandle-=i.howMany,i.howMany=0;else if(t.offset<o){const e=o-t.offset;i.howMany-=e,t.nodesToHandle-=e}if(\"remove\"==i.type&&(n<=i.offset?i.offset-=t.howMany:t.offset<i.offset&&(t.nodesToHandle+=i.howMany,i.howMany=0)),\"attribute\"==i.type)if(n<=i.offset)i.offset-=t.howMany;else if(t.offset<i.offset){const e=n-i.offset;i.offset=t.offset,i.howMany-=e}else if(t.offset<o)if(n<=o){const n=i.howMany;i.howMany=t.offset-i.offset;const o=n-i.howMany-t.nodesToHandle;e.unshift({type:\"attribute\",offset:t.offset,howMany:o,count:this._changeCount++})}else i.howMany-=o-t.offset}if(\"attribute\"==t.type){if(\"insert\"==i.type)if(t.offset<i.offset&&n>i.offset){if(n>o){const t={type:\"attribute\",offset:o,howMany:n-o,count:this._changeCount++};this._handleChange(t,e),e.push(t)}t.nodesToHandle=i.offset-t.offset,t.howMany=t.nodesToHandle}else t.offset>=i.offset&&t.offset<o&&(n>o?(t.nodesToHandle=n-o,t.offset=o):t.nodesToHandle=0);if(\"remove\"==i.type&&t.offset<i.offset&&n>i.offset){const o={type:\"attribute\",offset:i.offset,howMany:n-i.offset,count:this._changeCount++};this._handleChange(o,e),e.push(o),t.nodesToHandle=i.offset-t.offset,t.howMany=t.nodesToHandle}\"attribute\"==i.type&&(t.offset>=i.offset&&n<=o?(t.nodesToHandle=0,t.howMany=0,t.offset=0):t.offset<=i.offset&&n>=o&&(i.howMany=0))}}t.howMany=t.nodesToHandle,delete t.nodesToHandle}_getInsertDiff(t,e,i){return{type:\"insert\",position:Ys._createAt(t,e),name:i,length:1,changeCount:this._changeCount++}}_getRemoveDiff(t,e,i){return{type:\"remove\",position:Ys._createAt(t,e),name:i,length:1,changeCount:this._changeCount++}}_getAttributesDiff(t,e,i){const n=[];i=new Map(i);for(const[o,r]of e){const e=i.has(o)?i.get(o):null;e!==r&&n.push({type:\"attribute\",position:t.start,range:t.clone(),length:1,attributeKey:o,attributeOldValue:r,attributeNewValue:e,changeCount:this._changeCount++}),i.delete(o)}for(const[e,o]of i)n.push({type:\"attribute\",position:t.start,range:t.clone(),length:1,attributeKey:e,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++});return n}_isInInsertedElement(t){const e=t.parent;if(!e)return!1;const i=this._changesInElement.get(e),n=t.startOffset;if(i)for(const t of i)if(\"insert\"==t.type&&n>=t.offset&&n<t.offset+t.howMany)return!0;return this._isInInsertedElement(e)}_removeAllNestedChanges(t,e,i){const n=new $s(Ys._createAt(t,e),Ys._createAt(t,e+i));for(const t of n.getItems({shallow:!0}))t.is(\"element\")&&(this._elementSnapshots.delete(t),this._changesInElement.delete(t),this._removeAllNestedChanges(t,0,t.maxOffset))}}function Tc(t){const e=[];for(const i of t)if(i.is(\"text\"))for(let t=0;t<i.data.length;t++)e.push({name:\"$text\",attributes:new Map(i.getAttributes())});else e.push({name:i.name,attributes:new Map(i.getAttributes())});return e}function Cc(t,e){const i=[];let n=0,o=0;for(const t of e){if(t.offset>n){for(let e=0;e<t.offset-n;e++)i.push(\"e\");o+=t.offset-n}if(\"insert\"==t.type){for(let e=0;e<t.howMany;e++)i.push(\"i\");n=t.offset+t.howMany}else if(\"remove\"==t.type){for(let e=0;e<t.howMany;e++)i.push(\"r\");n=t.offset,o+=t.howMany}else i.push(...\"a\".repeat(t.howMany).split(\"\")),n=t.offset+t.howMany,o+=t.howMany}if(o<t)for(let e=0;e<t-o-n;e++)i.push(\"e\");return i}function Pc(t){const e=t.position&&\"$graveyard\"==t.position.root.rootName,i=t.range&&\"$graveyard\"==t.range.root.rootName;return!e&&!i}class Sc{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set}addOperation(t){this._operations.includes(t)||this._operations.push(t)}getOperations(t=0,e=Number.POSITIVE_INFINITY){return t<0?[]:this._operations.slice(t,e)}getOperation(t){return this._operations[t]}setOperationAsUndone(t,e){this._undoPairs.set(e,t),this._undoneOperations.add(t)}isUndoingOperation(t){return this._undoPairs.has(t)}isUndoneOperation(t){return this._undoneOperations.has(t)}getUndoneOperation(t){return this._undoPairs.get(t)}}function Mc(t,e){return function(t){return!!t&&1==t.length&&/[\\ud800-\\udbff]/.test(t)}(t.charAt(e-1))&&function(t){return!!t&&1==t.length&&/[\\udc00-\\udfff]/.test(t)}(t.charAt(e))}function Ec(t,e){return function(t){return!!t&&1==t.length&&/[\\u0300-\\u036f\\u1ab0-\\u1aff\\u1dc0-\\u1dff\\u20d0-\\u20ff\\ufe20-\\ufe2f]/.test(t)}(t.charAt(e))}const Ic=\"$graveyard\";class Nc{constructor(t){this.model=t,this.version=0,this.history=new Sc(this),this.selection=new sa(this),this.roots=new oo({idProperty:\"rootName\"}),this.differ=new Ac(t.markers),this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot(\"$root\",Ic),this.listenTo(t,\"applyOperation\",(t,e)=>{const i=e[0];if(i.isDocumentOperation&&i.baseVersion!==this.version)throw new $i.b(\"model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.\",this,{operation:i})},{priority:\"highest\"}),this.listenTo(t,\"applyOperation\",(t,e)=>{const i=e[0];i.isDocumentOperation&&this.differ.bufferOperation(i)},{priority:\"high\"}),this.listenTo(t,\"applyOperation\",(t,e)=>{const i=e[0];i.isDocumentOperation&&(this.version++,this.history.addOperation(i))},{priority:\"low\"}),this.listenTo(this.selection,\"change\",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(t.markers,\"update\",(t,e,i,n)=>{this.differ.bufferMarkerChange(e.name,i,n,e.affectsData),null===i&&e.on(\"change\",(t,i)=>{this.differ.bufferMarkerChange(e.name,i,e.getRange(),e.affectsData)})})}get graveyard(){return this.getRoot(Ic)}createRoot(t=\"$root\",e=\"main\"){if(this.roots.get(e))throw new $i.b(\"model-document-createRoot-name-exists: Root with specified name already exists.\",this,{name:e});const i=new bc(this,t,e);return this.roots.add(i),i}destroy(){this.selection.destroy(),this.stopListening()}getRoot(t=\"main\"){return this.roots.get(t)}getRootNames(){return Array.from(this.roots,t=>t.rootName).filter(t=>t!=Ic)}registerPostFixer(t){this._postFixers.add(t)}toJSON(){const t=hn(this);return t.selection=\"[engine.model.DocumentSelection]\",t.model=\"[engine.model.Model]\",t}_handleChangeBlock(t){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(t),this.selection.refresh(),this.differ.hasDataChanges()?this.fire(\"change:data\",t.batch):this.fire(\"change\",t.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const t of this.roots)if(t!==this.graveyard)return t;return this.graveyard}_getDefaultRange(){const t=this._getDefaultRoot(),e=this.model,i=e.schema,n=e.createPositionFromPath(t,[0]);return i.getNearestSelectionRange(n)||e.createRange(n)}_validateSelectionRange(t){return Oc(t.start)&&Oc(t.end)}_callPostFixers(t){let e=!1;do{for(const i of this._postFixers)if(this.selection.refresh(),e=i(t))break}while(e)}}function Oc(t){const e=t.textNode;if(e){const i=e.data,n=t.offset-e.startOffset;return!Mc(i,n)&&!Ec(i,n)}return!0}cn(Nc,tn);class Rc{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(t){return this._markers.has(t)}get(t){return this._markers.get(t)||null}_set(t,e,i=!1,n=!1){const o=t instanceof Dc?t.name:t,r=this._markers.get(o);if(r){const t=r.getRange();let s=!1;return t.isEqual(e)||(r._attachLiveRange(oa.fromRange(e)),s=!0),i!=r.managedUsingOperations&&(r._managedUsingOperations=i,s=!0),\"boolean\"==typeof n&&n!=r.affectsData&&(r._affectsData=n,s=!0),s&&this.fire(\"update:\"+o,r,t,e),r}const s=oa.fromRange(e),a=new Dc(o,s,i,n);return this._markers.set(o,a),this.fire(\"update:\"+o,a,null,e),a}_remove(t){const e=t instanceof Dc?t.name:t,i=this._markers.get(e);return!!i&&(this._markers.delete(e),this.fire(\"update:\"+e,i,i.getRange(),null),this._destroyMarker(i),!0)}_refresh(t){const e=t instanceof Dc?t.name:t,i=this._markers.get(e);if(!i)throw new $i.b(\"markercollection-refresh-marker-not-exists: Marker with provided name does not exists.\",this);const n=i.getRange();this.fire(\"update:\"+e,i,n,n,i.managedUsingOperations,i.affectsData)}*getMarkersAtPosition(t){for(const e of this)e.getRange().containsPosition(t)&&(yield e)}*getMarkersIntersectingRange(t){for(const e of this)null!==e.getRange().getIntersection(t)&&(yield e)}destroy(){for(const t of this._markers.values())this._destroyMarker(t);this._markers=null,this.stopListening()}*getMarkersGroup(t){for(const e of this._markers.values())e.name.startsWith(t+\":\")&&(yield e)}_destroyMarker(t){t.stopListening(),t._detachLiveRange()}}cn(Rc,tn);class Dc{constructor(t,e,i,n){this.name=t,this._liveRange=this._attachLiveRange(e),this._managedUsingOperations=i,this._affectsData=n}get managedUsingOperations(){if(!this._liveRange)throw new $i.b(\"marker-destroyed: Cannot use a destroyed marker instance.\",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new $i.b(\"marker-destroyed: Cannot use a destroyed marker instance.\",this);return this._affectsData}getStart(){if(!this._liveRange)throw new $i.b(\"marker-destroyed: Cannot use a destroyed marker instance.\",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new $i.b(\"marker-destroyed: Cannot use a destroyed marker instance.\",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new $i.b(\"marker-destroyed: Cannot use a destroyed marker instance.\",this);return this._liveRange.toRange()}is(t){return\"marker\"==t||\"model:marker\"==t}_attachLiveRange(t){return this._liveRange&&this._detachLiveRange(),t.delegate(\"change:range\").to(this),t.delegate(\"change:content\").to(this),this._liveRange=t,t}_detachLiveRange(){this._liveRange.stopDelegating(\"change:range\",this),this._liveRange.stopDelegating(\"change:content\",this),this._liveRange.detach(),this._liveRange=null}}cn(Dc,tn);class Lc extends Ys{constructor(t,e,i=\"toNone\"){if(super(t,e,i),!this.root.is(\"rootElement\"))throw new $i.b(\"model-liveposition-root-not-rootelement: LivePosition's root has to be an instance of RootElement.\",t);(function(){this.listenTo(this.root.document.model,\"applyOperation\",(t,e)=>{const i=e[0];i.isDocumentOperation&&function(t){const e=this.getTransformedByOperation(t);if(!this.isEqual(e)){const t=this.toPosition();this.path=e.path,this.root=e.root,this.fire(\"change\",t)}}.call(this,i)},{priority:\"low\"})}).call(this)}detach(){this.stopListening()}is(t){return\"livePosition\"==t||\"model:livePosition\"==t||super.is(t)}toPosition(){return new Ys(this.root,this.path.slice(),this.stickiness)}static fromPosition(t,e){return new this(t.root,t.path.slice(),e||t.stickiness)}}cn(Lc,tn);class jc{constructor(t,e,i){this.model=t,this.writer=e,this.position=i,this.canMergeWith=new Set([this.position.parent]),this.schema=t.schema,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(t,e){t=Array.from(t);for(let i=0;i<t.length;i++){const n=t[i];this._handleNode(n,{isFirst:0===i&&e.isFirst,isLast:i===t.length-1&&e.isLast})}this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}getSelectionRange(){return this.nodeToSelect?$s._createOn(this.nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new $s(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(t,e){if(this.schema.isObject(t))return void this._handleObject(t,e);this._checkAndSplitToAllowedPosition(t,e)?(this._insert(t),this._mergeSiblingsOf(t,e)):this._handleDisallowedNode(t,e)}_handleObject(t,e){this._checkAndSplitToAllowedPosition(t)?this._insert(t):this._tryAutoparagraphing(t,e)}_handleDisallowedNode(t,e){t.is(\"element\")?this.handleNodes(t.getChildren(),e):this._tryAutoparagraphing(t,e)}_insert(t){if(!this.schema.checkChild(this.position,t))throw new $i.b(\"insertcontent-wrong-position: Given node cannot be inserted on the given position.\",this,{node:t,position:this.position});const e=Lc.fromPosition(this.position,\"toNext\");this._setAffectedBoundaries(this.position),this.writer.insert(t,this.position),this.position=e.toPosition(),e.detach(),this.schema.isObject(t)&&!this.schema.checkChild(this.position,\"$text\")?this.nodeToSelect=t:this.nodeToSelect=null,this._filterAttributesOf.push(t)}_setAffectedBoundaries(t){this._affectedStart||(this._affectedStart=Lc.fromPosition(t,\"toPrevious\")),this._affectedEnd&&!this._affectedEnd.isBefore(t)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=Lc.fromPosition(t,\"toNext\"))}_mergeSiblingsOf(t,e){if(!(t instanceof Us))return;const i=this._canMergeLeft(t,e),n=this._canMergeRight(t,e),o=Lc._createBefore(t);o.stickiness=\"toNext\";const r=Lc._createAfter(t);if(r.stickiness=\"toNext\",i){const t=Lc.fromPosition(this.position);t.stickiness=\"toNext\",this._affectedStart.isEqual(o)&&(this._affectedStart.detach(),this._affectedStart=Lc._createAt(o.nodeBefore,\"end\",\"toPrevious\")),this.writer.merge(o),o.isEqual(this._affectedEnd)&&e.isLast&&(this._affectedEnd.detach(),this._affectedEnd=Lc._createAt(o.nodeBefore,\"end\",\"toNext\")),this.position=t.toPosition(),t.detach()}if(n){if(!this.position.isEqual(r))throw new $i.b(\"insertcontent-invalid-insertion-position\",this);this.position=Ys._createAt(r.nodeBefore,\"end\");const t=Lc.fromPosition(this.position,\"toPrevious\");this._affectedEnd.isEqual(r)&&(this._affectedEnd.detach(),this._affectedEnd=Lc._createAt(r.nodeBefore,\"end\",\"toNext\")),this.writer.merge(r),r.getShiftedBy(-1).isEqual(this._affectedStart)&&e.isFirst&&(this._affectedStart.detach(),this._affectedStart=Lc._createAt(r.nodeBefore,0,\"toPrevious\")),this.position=t.toPosition(),t.detach()}(i||n)&&this._filterAttributesOf.push(this.position.parent),o.detach(),r.detach()}_canMergeLeft(t,e){const i=t.previousSibling;return e.isFirst&&i instanceof Us&&this.canMergeWith.has(i)&&this.model.schema.checkMerge(i,t)}_canMergeRight(t,e){const i=t.nextSibling;return e.isLast&&i instanceof Us&&this.canMergeWith.has(i)&&this.model.schema.checkMerge(t,i)}_tryAutoparagraphing(t,e){const i=this.writer.createElement(\"paragraph\");this._getAllowedIn(i,this.position.parent)&&this.schema.checkChild(i,t)&&(i._appendChild(t),this._handleNode(i,e))}_checkAndSplitToAllowedPosition(t){const e=this._getAllowedIn(t,this.position.parent);if(!e)return!1;for(;e!=this.position.parent;){if(this.schema.isLimit(this.position.parent))return!1;if(this.position.isAtStart){const t=this.position.parent;this.position=this.writer.createPositionBefore(t),t.isEmpty&&t.parent===e&&this.writer.remove(t)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const t=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=t,this.canMergeWith.add(this.position.nodeAfter)}}return!0}_getAllowedIn(t,e){return this.schema.checkChild(e,t)?e:e.parent?this._getAllowedIn(t,e.parent):null}}function Vc(t,e,i={}){if(e.isCollapsed)return;const n=e.getFirstRange();if(\"$graveyard\"==n.root.rootName)return;const o=t.schema;t.change(t=>{if(!i.doNotResetEntireContent&&function(t,e){const i=t.getLimitElement(e);if(!e.containsEntireContent(i))return!1;const n=e.getFirstRange();if(n.start.parent==n.end.parent)return!1;return t.checkChild(i,\"paragraph\")}(o,e))return void function(t,e){const i=t.model.schema.getLimitElement(e);t.remove(t.createRangeIn(i)),zc(t,t.createPositionAt(i,0),e)}(t,e);const r=n.start,s=Lc.fromPosition(n.end,\"toNext\");if(n.start.isTouching(n.end)||t.remove(n),i.leaveUnmerged||(!function t(e,i,n){const o=i.parent;const r=n.parent;if(o==r)return;if(e.model.schema.isLimit(o)||e.model.schema.isLimit(r))return;if(!function(t,e,i){const n=new $s(t,e);for(const t of n.getWalker())if(i.isLimit(t.item))return!1;return!0}(i,n,e.model.schema))return;i=e.createPositionAfter(o);n=e.createPositionBefore(r);n.isEqual(i)||e.insert(r,i);e.merge(i);for(;n.parent.isEmpty;){const t=n.parent;n=e.createPositionBefore(t),e.remove(t)}t(e,i,n)}(t,r,s),o.removeDisallowedAttributes(r.parent.getChildren(),t)),Bc(t,e,r),function(t,e){const i=t.checkChild(e,\"$text\"),n=t.checkChild(e,\"paragraph\");return!i&&n}(o,r)){const n=o.getNearestSelectionRange(r);i.doNotAutoparagraph&&n?Bc(t,e,n):zc(t,r,e)}s.detach()})}function zc(t,e,i){const n=t.createElement(\"paragraph\");t.insert(n,e),Bc(t,i,t.createPositionAt(n,0))}function Bc(t,e,i){e instanceof sa?t.setSelection(i):e.setTo(i)}const Fc=' ,.?!:;\"-()';function Uc(t,e,i={}){const n=t.schema,o=\"backward\"!=i.direction,r=i.unit?i.unit:\"character\",s=e.focus,a=new Hs({boundaries:function(t,e){const i=t.root,n=Ys._createAt(i,e?\"end\":0);return e?new $s(t,n):new $s(n,t)}(s,o),singleCharacters:!0,direction:o?\"forward\":\"backward\"}),c={walker:a,schema:n,isForward:o,unit:r};let l;for(;l=a.next();){if(l.done)return;const i=Hc(c,l.value);if(i)return void(e instanceof sa?t.change(t=>{t.setSelectionFocus(i)}):e.setFocus(i))}}function Hc(t,e){if(\"text\"==e.type)return\"word\"===t.unit?function(t,e){let i=t.position.textNode;if(i){let n=t.position.offset-i.startOffset;for(;!Wc(i.data,n,e)&&!qc(i,n,e);){t.next();const o=e?t.position.nodeAfter:t.position.nodeBefore;if(o&&o.is(\"text\")){const n=o.data.charAt(e?0:o.data.length-1);Fc.includes(n)||(t.next(),i=t.position.textNode)}n=t.position.offset-i.startOffset}}return t.position}(t.walker,t.isForward):function(t,e){const i=t.position.textNode;if(i){const n=i.data;let o=t.position.offset-i.startOffset;for(;Mc(n,o)||\"character\"==e&&Ec(n,o);)t.next(),o=t.position.offset-i.startOffset}return t.position}(t.walker,t.unit,t.isForward);if(e.type==(t.isForward?\"elementStart\":\"elementEnd\")){if(t.schema.isObject(e.item))return Ys._createAt(e.item,t.isForward?\"after\":\"before\");if(t.schema.checkChild(e.nextPosition,\"$text\"))return e.nextPosition}else{if(t.schema.isLimit(e.item))return void t.walker.skip(()=>!0);if(t.schema.checkChild(e.nextPosition,\"$text\"))return e.nextPosition}}function Wc(t,e,i){const n=e+(i?0:-1);return Fc.includes(t.charAt(n))}function qc(t,e,i){return e===(i?t.endOffset:0)}function Yc(t,e){const i=[];Array.from(t.getItems({direction:\"backward\"})).map(t=>e.createRangeOn(t)).filter(e=>{return(e.start.isAfter(t.start)||e.start.isEqual(t.start))&&(e.end.isBefore(t.end)||e.end.isEqual(t.end))}).forEach(t=>{i.push(t.start.parent),e.remove(t)}),i.forEach(t=>{let i=t;for(;i.parent&&i.isEmpty;){const t=e.createRangeOn(i);i=i.parent,e.remove(t)}})}function $c(t){t.document.registerPostFixer(e=>(function(t,e){const i=e.document.selection,n=e.schema,o=[];let r=!1;for(const t of i.getRanges()){const e=Gc(t,n);e?(o.push(e),r=!0):o.push(t)}if(r){let e=o;if(o.length>1){const t=o[0].start,i=o[o.length-1].end;e=[new $s(t,i)]}t.setSelection(e,{backward:i.isBackward})}})(e,t))}function Gc(t,e){return t.isCollapsed?function(t,e){const i=t.start,n=e.getNearestSelectionRange(i);if(!n)return null;const o=n.start;if(i.isEqual(o))return null;if(o.nodeAfter&&e.isLimit(o.nodeAfter))return new $s(o,Ys._createAfter(o.nodeAfter));return new $s(o)}(t,e):function(t,e){const i=t.start,n=t.end,o=e.checkChild(i,\"$text\"),r=e.checkChild(n,\"$text\"),s=e.getLimitElement(i),a=e.getLimitElement(n);if(s===a){if(o&&r)return null;if(function(t,e,i){const n=t.nodeAfter&&!i.isLimit(t.nodeAfter)||i.checkChild(t,\"$text\"),o=e.nodeBefore&&!i.isLimit(e.nodeBefore)||i.checkChild(e,\"$text\");return n||o}(i,n,e)){const t=i.nodeAfter&&e.isObject(i.nodeAfter),o=t?null:e.getNearestSelectionRange(i,\"forward\"),r=n.nodeBefore&&e.isObject(n.nodeBefore),s=r?null:e.getNearestSelectionRange(n,\"backward\"),a=o?o.start:i,c=s?s.start:n;return new $s(a,c)}}const c=s&&!s.is(\"rootElement\"),l=a&&!a.is(\"rootElement\");if(c||l){const t=i.nodeAfter&&n.nodeBefore&&i.nodeAfter.parent===n.nodeBefore.parent,o=c&&(!t||!Kc(i.nodeAfter,e)),r=l&&(!t||!Kc(n.nodeBefore,e));let d=i,h=n;return o&&(d=Ys._createBefore(Qc(s,e))),r&&(h=Ys._createAfter(Qc(a,e))),new $s(d,h)}return null}(t,e)}function Qc(t,e){let i=t,n=i;for(;e.isLimit(n)&&n.parent;)i=n,n=n.parent;return i}function Kc(t,e){return t&&e.isObject(t)}class Jc{constructor(){this.markers=new Rc,this.document=new Nc(this),this.schema=new Oa,this._pendingChanges=[],this._currentWriter=null,[\"insertContent\",\"deleteContent\",\"modifySelection\",\"getSelectedContent\",\"applyOperation\"].forEach(t=>this.decorate(t)),this.on(\"applyOperation\",(t,e)=>{e[0]._validate()},{priority:\"highest\"}),this.schema.register(\"$root\",{isLimit:!0}),this.schema.register(\"$block\",{allowIn:\"$root\",isBlock:!0}),this.schema.register(\"$text\",{allowIn:\"$block\",isInline:!0}),this.schema.register(\"$clipboardHolder\",{allowContentOf:\"$root\",isLimit:!0}),this.schema.extend(\"$text\",{allowIn:\"$clipboardHolder\"}),this.schema.register(\"$marker\"),this.schema.addChildCheck((t,e)=>{if(\"$marker\"===e.name)return!0}),$c(this)}change(t){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Ja,callback:t}),this._runPendingChanges()[0]):t(this._currentWriter)}catch(t){$i.b.rethrowUnexpectedError(t,this)}}enqueueChange(t,e){try{\"string\"==typeof t?t=new Ja(t):\"function\"==typeof t&&(e=t,t=new Ja),this._pendingChanges.push({batch:t,callback:e}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(t){$i.b.rethrowUnexpectedError(t,this)}}applyOperation(t){t._execute()}insertContent(t,e,i){return function(t,e,i,n){return t.change(o=>{let r;const s=(r=i?i instanceof Xs||i instanceof sa?i:o.createSelection(i,n):t.document.selection).getFirstPosition();r.isCollapsed||t.deleteContent(r,{doNotAutoparagraph:!0});const a=new jc(t,o,s);let c;c=e.is(\"documentFragment\")?e.getChildren():[e],a.handleNodes(c,{isFirst:!0,isLast:!0});const l=a.getSelectionRange();l&&(r instanceof sa?o.setSelection(l):r.setTo(l));const d=a.getAffectedRange()||t.createRange(s);return a.destroy(),d})}(this,t,e,i)}deleteContent(t,e){Vc(this,t,e)}modifySelection(t,e){Uc(this,t,e)}getSelectedContent(t){return function(t,e){return t.change(t=>{const i=t.createDocumentFragment(),n=e.getFirstRange();if(!n||n.isCollapsed)return i;const o=n.start.root,r=n.start.getCommonPath(n.end),s=o.getNodeByPath(r);let a;const c=(a=n.start.parent==n.end.parent?n:t.createRange(t.createPositionAt(s,n.start.path[r.length]),t.createPositionAt(s,n.end.path[r.length]+1))).end.offset-a.start.offset;for(const e of a.getItems({shallow:!0}))e.is(\"textProxy\")?t.appendText(e.data,e.getAttributes(),i):t.append(e._clone(!0),i);if(a!=n){const e=n._getTransformedByMove(a.start,t.createPositionAt(i,0),c)[0],o=t.createRange(t.createPositionAt(i,0),e.start);Yc(t.createRange(e.end,t.createPositionAt(i,\"end\")),t),Yc(o,t)}return i})}(this,t)}hasContent(t,e){const i=t instanceof Us?$s._createIn(t):t;if(i.isCollapsed)return!1;for(const t of this.markers.getMarkersIntersectingRange(i))if(t.affectsData)return!0;const{ignoreWhitespaces:n=!1}=e||{};for(const t of i.getItems())if(t.is(\"textProxy\")){if(!n)return!0;if(-1!==t.data.search(/\\S/))return!0}else if(this.schema.isObject(t))return!0;return!1}createPositionFromPath(t,e,i){return new Ys(t,e,i)}createPositionAt(t,e){return Ys._createAt(t,e)}createPositionAfter(t){return Ys._createAfter(t)}createPositionBefore(t){return Ys._createBefore(t)}createRange(t,e){return new $s(t,e)}createRangeIn(t){return $s._createIn(t)}createRangeOn(t){return $s._createOn(t)}createSelection(t,e,i){return new Xs(t,e,i)}createBatch(t){return new Ja(t)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const t=[];for(this.fire(\"_beforeChanges\");this._pendingChanges.length;){const e=this._pendingChanges[0].batch;this._currentWriter=new wc(this,e);const i=this._pendingChanges[0].callback(this._currentWriter);t.push(i),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire(\"_afterChanges\"),t}}cn(Jc,Fn);class Zc{constructor(){this._listener=Object.create(cr)}listenTo(t){this._listener.listenTo(t,\"keydown\",(t,e)=>{this._listener.fire(\"_keydown:\"+wo(e),e)})}set(t,e,i={}){const n=_o(t),o=i.priority;this._listener.listenTo(this._listener,\"_keydown:\"+n,(t,i)=>{e(i,()=>{i.preventDefault(),i.stopPropagation(),t.stop()}),t.return=!0},{priority:o})}press(t){return!!this._listener.fire(\"_keydown:\"+wo(t),t)}destroy(){this._listener.stopListening()}}class Xc extends Zc{constructor(t){super(),this.editor=t}set(t,e,i={}){if(\"string\"==typeof e){const t=e;e=((e,i)=>{this.editor.execute(t),i()})}super.set(t,e,i)}}class tl{constructor(t){const e=this.constructor.builtinPlugins;this.config=new qi(t,this.constructor.defaultConfig),this.config.define(\"plugins\",e),this.plugins=new Ta(this,e),this.commands=new Ca;const i=this.config.get(\"language\")||{};this.locale=new Ma({uiLanguage:\"string\"==typeof i?i:i.ui,contentLanguage:this.config.get(\"language.content\")}),this.t=this.locale.t,this.set(\"state\",\"initializing\"),this.once(\"ready\",()=>this.state=\"ready\",{priority:\"high\"}),this.once(\"destroy\",()=>this.state=\"destroyed\",{priority:\"high\"}),this.set(\"isReadOnly\",!1),this.model=new Jc,this.data=new $a(this.model),this.editing=new Aa(this.model),this.editing.view.document.bind(\"isReadOnly\").to(this),this.conversion=new Ga([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias(\"dataDowncast\",this.data.downcastDispatcher),this.conversion.addAlias(\"editingDowncast\",this.editing.downcastDispatcher),this.keystrokes=new Xc(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){const t=this.config,e=t.get(\"plugins\")||[],i=t.get(\"removePlugins\")||[],n=t.get(\"extraPlugins\")||[];return this.plugins.init(e.concat(n),i)}destroy(){let t=Promise.resolve();return\"initializing\"==this.state&&(t=new Promise(t=>this.once(\"ready\",t))),t.then(()=>{this.fire(\"destroy\"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})}execute(...t){try{this.commands.execute(...t)}catch(t){$i.b.rethrowUnexpectedError(t,this)}}}cn(tl,Fn);var el={setData(t){this.data.set(t)},getData(t){return this.data.get(t)}};var il={updateSourceElement(){if(!this.sourceElement)throw new $i.b(\"editor-missing-sourceelement: Cannot update the source element of a detached editor.\",this);!function(t,e){t instanceof HTMLTextAreaElement&&(t.value=e),t.innerHTML=e}(this.sourceElement,this.data.get())}};class nl{getHtml(t){const e=document.implementation.createHTMLDocument(\"\").createElement(\"div\");return e.appendChild(t),e.innerHTML}}class ol{constructor(){this._domParser=new DOMParser,this._domConverter=new or({blockFillerMode:\"nbsp\"}),this._htmlWriter=new nl}toData(t){const e=this._domConverter.viewToDom(t,document);return this._htmlWriter.getHtml(e)}toView(t){const e=this._toDom(t);return this._domConverter.domToView(e)}_toDom(t){const e=this._domParser.parseFromString(t,\"text/html\"),i=e.createDocumentFragment(),n=e.body.childNodes;for(;n.length>0;)i.appendChild(n[0]);return i}}class rl{constructor(t){this.editor=t,this._components=new Map}*names(){for(const t of this._components.values())yield t.originalName}add(t,e){if(this.has(t))throw new $i.b(\"componentfactory-item-exists: The item already exists in the component factory.\",this,{name:t});this._components.set(sl(t),{callback:e,originalName:t})}create(t){if(!this.has(t))throw new $i.b(\"componentfactory-item-missing: The required component is not registered in the factory.\",this,{name:t});return this._components.get(sl(t)).callback(this.editor.locale)}has(t){return this._components.has(sl(t))}}function sl(t){return String(t).toLowerCase()}class al{constructor(){this.set(\"isFocused\",!1),this.set(\"focusedElement\",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(t){if(this._elements.has(t))throw new $i.b(\"focusTracker-add-element-already-exist\",this);this.listenTo(t,\"focus\",()=>this._focus(t),{useCapture:!0}),this.listenTo(t,\"blur\",()=>this._blur(),{useCapture:!0}),this._elements.add(t)}remove(t){t===this.focusedElement&&this._blur(t),this._elements.has(t)&&(this.stopListening(t),this._elements.delete(t))}destroy(){this.stopListening()}_focus(t){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=t,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}cn(al,cr),cn(al,Fn);class cl{constructor(t){this.editor=t,this.componentFactory=new rl(t),this.focusTracker=new al,this._editableElementsMap=new Map,this.listenTo(t.editing.view.document,\"layoutChanged\",()=>this.update())}get element(){return null}update(){this.fire(\"update\")}destroy(){this.stopListening(),this.focusTracker.destroy();for(const t of this._editableElementsMap.values())t.ckeditorInstance=null;this._editableElementsMap=new Map}setEditableElement(t,e){this._editableElementsMap.set(t,e),e.ckeditorInstance||(e.ckeditorInstance=this.editor)}getEditableElement(t=\"main\"){return this._editableElementsMap.get(t)}getEditableElementsNames(){return this._editableElementsMap.keys()}get _editableElements(){return console.warn(\"editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.\",{editorUI:this}),this._editableElementsMap}}cn(cl,tn);i(14);const ll=new WeakMap;function dl(t){const{view:e,element:i,text:n,isDirectHost:o=!0}=t,r=e.document;ll.has(r)||(ll.set(r,new Map),r.registerPostFixer(t=>ul(r,t))),ll.get(r).set(i,{text:n,isDirectHost:o}),e.change(t=>ul(r,t))}function hl(t,e){return!!e.hasClass(\"ck-placeholder\")&&(t.removeClass(\"ck-placeholder\",e),!0)}function ul(t,e){const i=ll.get(t);let n=!1;for(const[t,o]of i)fl(e,t,o)&&(n=!0);return n}function fl(t,e,i){const{text:n,isDirectHost:o}=i,r=o?e:function(t){if(1===t.childCount){const e=t.getChild(0);if(e.is(\"element\")&&!e.is(\"uiElement\"))return e}return null}(e);let s=!1;return!!r&&(i.hostElement=r,r.getAttribute(\"data-placeholder\")!==n&&(t.setAttribute(\"data-placeholder\",n,r),s=!0),!function(t){const e=t.document;if(!e)return!1;const i=!Array.from(t.getChildren()).some(t=>!t.is(\"uiElement\"));if(!e.isFocused&&i)return!0;const n=e.selection.anchor;return!(!i||!n||n.parent===t)}(r)?hl(t,r)&&(s=!0):function(t,e){return!e.hasClass(\"ck-placeholder\")&&(t.addClass(\"ck-placeholder\",e),!0)}(t,r)&&(s=!0),s)}class gl{constructor(){this._replacedElements=[]}replace(t,e){this._replacedElements.push({element:t,newElement:e}),t.style.display=\"none\",e&&t.parentNode.insertBefore(e,t.nextSibling)}restore(){this._replacedElements.forEach(({element:t,newElement:e})=>{t.style.display=\"\",e&&e.remove()}),this._replacedElements=[]}}class ml extends cl{constructor(t,e){super(t),this.view=e,this._toolbarConfig=function(t){return Array.isArray(t)?{items:t}:t?Object.assign({items:[]},t):{items:[]}}(t.config.get(\"toolbar\")),this._elementReplacer=new gl}get element(){return this.view.element}init(t){const e=this.editor,i=this.view,n=e.editing.view,o=i.editable,r=n.document.getRoot();o.name=r.rootName,i.render();const s=o.element;this.setEditableElement(o.name,s),this.focusTracker.add(s),i.editable.bind(\"isFocused\").to(this.focusTracker),n.attachDomRoot(s),t&&this._elementReplacer.replace(t,this.element),this._initPlaceholder(),this._initToolbar(),this.fire(\"ready\")}destroy(){const t=this.view,e=this.editor.editing.view;this._elementReplacer.restore(),e.detachDomRoot(t.editable.name),t.destroy(),super.destroy()}_initToolbar(){const t=this.editor,e=this.view,i=t.editing.view;e.stickyPanel.bind(\"isActive\").to(this.focusTracker,\"isFocused\"),e.stickyPanel.limiterElement=e.element,this._toolbarConfig.viewportTopOffset&&(e.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset),e.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory),function({origin:t,originKeystrokeHandler:e,originFocusTracker:i,toolbar:n,beforeFocus:o,afterBlur:r}){i.add(n.element),e.set(\"Alt+F10\",(t,e)=>{i.isFocused&&!n.focusTracker.isFocused&&(o&&o(),n.focus(),e())}),n.keystrokes.set(\"Esc\",(e,i)=>{n.focusTracker.isFocused&&(t.focus(),r&&r(),i())})}({origin:i,originFocusTracker:this.focusTracker,originKeystrokeHandler:t.keystrokes,toolbar:e.toolbar})}_initPlaceholder(){const t=this.editor,e=t.editing.view,i=e.document.getRoot(),n=t.sourceElement,o=t.config.get(\"placeholder\")||n&&\"textarea\"===n.tagName.toLowerCase()&&n.getAttribute(\"placeholder\");o&&dl({view:e,element:i,text:o,isDirectHost:!1})}}class pl extends oo{constructor(t){super({idProperty:\"viewUid\"}),this.on(\"add\",(t,e,i)=>{e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[i])}),this.on(\"remove\",(t,e)=>{e.element&&this._parentElement&&e.element.remove()}),this.locale=t,this._parentElement=null}destroy(){this.map(t=>t.destroy())}setParent(t){this._parentElement=t}delegate(...t){if(!t.length||!function(t){return t.every(t=>\"string\"==typeof t)}(t))throw new $i.b(\"ui-viewcollection-delegate-wrong-events: All event names must be strings.\",this);return{to:e=>{for(const i of this)for(const n of t)i.delegate(n).to(e);this.on(\"add\",(i,n)=>{for(const i of t)n.delegate(i).to(e)}),this.on(\"remove\",(i,n)=>{for(const i of t)n.stopDelegating(i,e)})}}}}const bl=\"http://www.w3.org/1999/xhtml\";class wl{constructor(t){Object.assign(this,Pl(Cl(t))),this._isRendered=!1,this._revertData=null}render(){const t=this._renderNode({intoFragment:!0});return this._isRendered=!0,t}apply(t){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:t,isApplying:!0,revertData:this._revertData}),t}revert(t){if(!this._revertData)throw new $i.b(\"ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.\",[this,t]);this._revertTemplateFromNode(t,this._revertData)}*getViews(){yield*function*t(e){if(e.children)for(const i of e.children)Nl(i)?yield i:Ol(i)&&(yield*t(i))}(this)}static bind(t,e){return{to:(i,n)=>new kl({eventNameOrFunction:i,attribute:i,observable:t,emitter:e,callback:n}),if:(i,n,o)=>new vl({observable:t,emitter:e,attribute:i,valueIfTrue:n,callback:o})}}static extend(t,e){if(t._isRendered)throw new $i.b(\"template-extend-render: Attempting to extend a template which has already been rendered.\",[this,t]);!function t(e,i){i.attributes&&(e.attributes||(e.attributes={}),El(e.attributes,i.attributes));i.eventListeners&&(e.eventListeners||(e.eventListeners={}),El(e.eventListeners,i.eventListeners));i.text&&e.text.push(...i.text);if(i.children&&i.children.length){if(e.children.length!=i.children.length)throw new $i.b(\"ui-template-extend-children-mismatch: The number of children in extended definition does not match.\",e);let n=0;for(const o of i.children)t(e.children[n++],o)}}(t,Pl(Cl(e)))}_renderNode(t){let e;if(e=t.node?this.tag&&this.text:this.tag?this.text:!this.text)throw new $i.b('ui-template-wrong-syntax: Node definition must have either \"tag\" or \"text\" when rendering a new Node.',this);return this.text?this._renderText(t):this._renderElement(t)}_renderElement(t){let e=t.node;return e||(e=t.node=document.createElementNS(this.ns||bl,this.tag)),this._renderAttributes(t),this._renderElementChildren(t),this._setUpListeners(t),e}_renderText(t){let e=t.node;return e?t.revertData.text=e.textContent:e=t.node=document.createTextNode(\"\"),yl(this.text)?this._bindToObservable({schema:this.text,updater:function(t){return{set(e){t.textContent=e},remove(){t.textContent=\"\"}}}(e),data:t}):e.textContent=this.text.join(\"\"),e}_renderAttributes(t){let e,i,n,o;if(!this.attributes)return;const r=t.node,s=t.revertData;for(e in this.attributes)if(n=r.getAttribute(e),i=this.attributes[e],s&&(s.attributes[e]=n),o=B(i[0])&&i[0].ns?i[0].ns:null,yl(i)){const a=o?i[0].value:i;s&&Dl(e)&&a.unshift(n),this._bindToObservable({schema:a,updater:Al(r,e,o),data:t})}else\"style\"==e&&\"string\"!=typeof i[0]?this._renderStyleAttribute(i[0],t):(s&&n&&Dl(e)&&i.unshift(n),Il(i=i.map(t=>t&&t.value||t).reduce((t,e)=>t.concat(e),[]).reduce(Ml,\"\"))||r.setAttributeNS(o,e,i))}_renderStyleAttribute(t,e){const i=e.node;for(const n in t){const o=t[n];yl(o)?this._bindToObservable({schema:[o],updater:Tl(i,n),data:e}):i.style[n]=o}}_renderElementChildren(t){const e=t.node,i=t.intoFragment?document.createDocumentFragment():e,n=t.isApplying;let o=0;for(const r of this.children)if(Rl(r)){if(!n){r.setParent(e);for(const t of r)i.appendChild(t.element)}}else if(Nl(r))n||(r.isRendered||r.render(),i.appendChild(r.element));else if(Ko(r))i.appendChild(r);else if(n){const e={children:[],bindings:[],attributes:{}};t.revertData.children.push(e),r._renderNode({node:i.childNodes[o++],isApplying:!0,revertData:e})}else i.appendChild(r.render());t.intoFragment&&e.appendChild(i)}_setUpListeners(t){if(this.eventListeners)for(const e in this.eventListeners){const i=this.eventListeners[e].map(i=>{const[n,o]=e.split(\"@\");return i.activateDomEventListener(n,o,t)});t.revertData&&t.revertData.bindings.push(i)}}_bindToObservable({schema:t,updater:e,data:i}){const n=i.revertData;xl(t,e,i);const o=t.filter(t=>!Il(t)).filter(t=>t.observable).map(n=>n.activateAttributeListener(t,e,i));n&&n.bindings.push(o)}_revertTemplateFromNode(t,e){for(const t of e.bindings)for(const e of t)e();if(e.text)t.textContent=e.text;else{for(const i in e.attributes){const n=e.attributes[i];null===n?t.removeAttribute(i):t.setAttribute(i,n)}for(let i=0;i<e.children.length;++i)this._revertTemplateFromNode(t.childNodes[i],e.children[i])}}}cn(wl,tn);class _l{constructor(t){Object.assign(this,t)}getValue(t){const e=this.observable[this.attribute];return this.callback?this.callback(e,t):e}activateAttributeListener(t,e,i){const n=()=>xl(t,e,i);return this.emitter.listenTo(this.observable,\"change:\"+this.attribute,n),()=>{this.emitter.stopListening(this.observable,\"change:\"+this.attribute,n)}}}class kl extends _l{activateDomEventListener(t,e,i){const n=(t,i)=>{e&&!i.target.matches(e)||(\"function\"==typeof this.eventNameOrFunction?this.eventNameOrFunction(i):this.observable.fire(this.eventNameOrFunction,i))};return this.emitter.listenTo(i.node,t,n),()=>{this.emitter.stopListening(i.node,t,n)}}}class vl extends _l{getValue(t){return!Il(super.getValue(t))&&(this.valueIfTrue||!0)}}function yl(t){return!!t&&(t.value&&(t=t.value),Array.isArray(t)?t.some(yl):t instanceof _l)}function xl(t,e,{node:i}){let n=function(t,e){return t.map(t=>t instanceof _l?t.getValue(e):t)}(t,i);Il(n=1==t.length&&t[0]instanceof vl?n[0]:n.reduce(Ml,\"\"))?e.remove():e.set(n)}function Al(t,e,i){return{set(n){t.setAttributeNS(i,e,n)},remove(){t.removeAttributeNS(i,e)}}}function Tl(t,e){return{set(i){t.style[e]=i},remove(){t.style[e]=null}}}function Cl(t){return Hi(t,t=>{if(t&&(t instanceof _l||Ol(t)||Nl(t)||Rl(t)))return t})}function Pl(t){if(\"string\"==typeof t?t=function(t){return{text:[t]}}(t):t.text&&function(t){Array.isArray(t.text)||(t.text=[t.text])}(t),t.on&&(t.eventListeners=function(t){for(const e in t)Sl(t,e);return t}(t.on),delete t.on),!t.text){t.attributes&&function(t){for(const e in t)t[e].value&&(t[e].value=[].concat(t[e].value)),Sl(t,e)}(t.attributes);const e=[];if(t.children)if(Rl(t.children))e.push(t.children);else for(const i of t.children)Ol(i)||Nl(i)||Ko(i)?e.push(i):e.push(new wl(i));t.children=e}return t}function Sl(t,e){Array.isArray(t[e])||(t[e]=[t[e]])}function Ml(t,e){return Il(e)?t:Il(t)?e:`${t} ${e}`}function El(t,e){for(const i in e)t[i]?t[i].push(...e[i]):t[i]=e[i]}function Il(t){return!t&&0!==t}function Nl(t){return t instanceof Ll}function Ol(t){return t instanceof wl}function Rl(t){return t instanceof pl}function Dl(t){return\"class\"==t||\"style\"==t}i(16);class Ll{constructor(t){this.element=null,this.isRendered=!1,this.locale=t,this.t=t&&t.t,this._viewCollections=new oo,this._unboundChildren=this.createCollection(),this._viewCollections.on(\"add\",(e,i)=>{i.locale=t}),this.decorate(\"render\")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=wl.bind(this,this)}createCollection(){const t=new pl;return this._viewCollections.add(t),t}registerChild(t){pn(t)||(t=[t]);for(const e of t)this._unboundChildren.add(e)}deregisterChild(t){pn(t)||(t=[t]);for(const e of t)this._unboundChildren.remove(e)}setTemplate(t){this.template=new wl(t)}extendTemplate(t){wl.extend(this.template,t)}render(){if(this.isRendered)throw new $i.b(\"ui-view-render-already-rendered: This View has already been rendered.\",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(t=>t.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}cn(Ll,cr),cn(Ll,Fn);i(18);class jl extends Ll{constructor(t){super(t),this.body=this.createCollection()}render(){super.render(),this._renderBodyCollection()}destroy(){return this._bodyCollectionContainer.remove(),super.destroy()}_renderBodyCollection(){const t=this.locale,e=this._bodyCollectionContainer=new wl({tag:\"div\",attributes:{class:[\"ck\",\"ck-reset_all\",\"ck-body\",\"ck-rounded-corners\"],dir:t.uiLanguageDirection},children:this.body}).render();document.body.appendChild(e)}}i(20);class Vl extends Ll{constructor(t){super(t),this.set(\"text\"),this.set(\"for\");const e=this.bindTemplate;this.setTemplate({tag:\"label\",attributes:{class:[\"ck\",\"ck-label\"],for:e.to(\"for\")},children:[{text:e.to(\"text\")}]})}}class zl extends jl{constructor(t){super(t);const e=Ki();this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(e),this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-reset\",\"ck-editor\",\"ck-rounded-corners\"],role:\"application\",dir:t.uiLanguageDirection,lang:t.uiLanguage,\"aria-labelledby\":`ck-editor__aria-label_${e}`},children:[this._voiceLabelView,{tag:\"div\",attributes:{class:[\"ck\",\"ck-editor__top\",\"ck-reset_all\"],role:\"presentation\"},children:this.top},{tag:\"div\",attributes:{class:[\"ck\",\"ck-editor__main\"],role:\"presentation\"},children:this.main}]})}_createVoiceLabel(t){const e=this.t,i=new Vl;return i.text=e(\"ax\"),i.extendTemplate({attributes:{id:`ck-editor__aria-label_${t}`,class:\"ck-voice-label\"}}),i}}class Bl extends Ll{constructor(t,e,i){super(t),this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-content\",\"ck-editor__editable\",\"ck-rounded-corners\"],lang:t.contentLanguage,dir:t.contentLanguageDirection}}),this.name=null,this.set(\"isFocused\",!1),this._editableElement=i,this._hasExternalElement=!!this._editableElement,this._editingView=e}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on(\"change:isFocused\",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}_updateIsFocusedClasses(){const t=this._editingView;function e(e){t.change(i=>{const n=t.document.getRoot(e.name);i.addClass(e.isFocused?\"ck-focused\":\"ck-blurred\",n),i.removeClass(e.isFocused?\"ck-blurred\":\"ck-focused\",n)})}t.isRenderingInProgress?function i(n){t.once(\"change:isRenderingInProgress\",(t,o,r)=>{r?i(n):e(n)})}(this):e(this)}}class Fl extends Bl{constructor(t,e,i){super(t,e,i),this.extendTemplate({attributes:{role:\"textbox\",class:\"ck-editor__editable_inline\"}})}render(){super.render();const t=this._editingView,e=this.t;t.change(i=>{const n=t.document.getRoot(this.name);i.setAttribute(\"aria-label\",e(\"ay\",[this.name]),n)})}}function Ul(t){return e=>e+t}i(22);const Hl=Ul(\"px\");class Wl extends Ll{constructor(t){super(t);const e=this.bindTemplate;this.set(\"isActive\",!1),this.set(\"isSticky\",!1),this.set(\"limiterElement\",null),this.set(\"limiterBottomOffset\",50),this.set(\"viewportTopOffset\",0),this.set(\"_marginLeft\",null),this.set(\"_isStickyToTheLimiter\",!1),this.set(\"_hasViewportTopOffset\",!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new wl({tag:\"div\",attributes:{class:[\"ck\",\"ck-sticky-panel__placeholder\"],style:{display:e.to(\"isSticky\",t=>t?\"block\":\"none\"),height:e.to(\"isSticky\",t=>t?Hl(this._panelRect.height):null)}}}).render(),this._contentPanel=new wl({tag:\"div\",attributes:{class:[\"ck\",\"ck-sticky-panel__content\",e.if(\"isSticky\",\"ck-sticky-panel__content_sticky\"),e.if(\"_isStickyToTheLimiter\",\"ck-sticky-panel__content_sticky_bottom-limit\")],style:{width:e.to(\"isSticky\",t=>t?Hl(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:e.to(\"_hasViewportTopOffset\",t=>t?Hl(this.viewportTopOffset):null),bottom:e.to(\"_isStickyToTheLimiter\",t=>t?Hl(this.limiterBottomOffset):null),marginLeft:e.to(\"_marginLeft\")}},children:this.content}).render(),this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-sticky-panel\"]},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(tr.window,\"scroll\",()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,\"change:isActive\",()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const t=this._panelRect=this._contentPanel.getBoundingClientRect();let e;this.limiterElement?(e=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&e.top<this.viewportTopOffset&&this._panelRect.height+this.limiterBottomOffset<e.height):this.isSticky=!1,this.isSticky?(this._isStickyToTheLimiter=e.bottom<t.height+this.limiterBottomOffset+this.viewportTopOffset,this._hasViewportTopOffset=!this._isStickyToTheLimiter&&!!this.viewportTopOffset,this._marginLeft=this._isStickyToTheLimiter?null:Hl(-tr.window.scrollX)):(this._isStickyToTheLimiter=!1,this._hasViewportTopOffset=!1,this._marginLeft=null)}}class ql{constructor(t){if(Object.assign(this,t),t.actions&&t.keystrokeHandler)for(const e in t.actions){let i=t.actions[e];\"string\"==typeof i&&(i=[i]);for(const n of i)t.keystrokeHandler.set(n,(t,i)=>{this[e](),i()})}}get first(){return this.focusables.find(Yl)||null}get last(){return this.focusables.filter(Yl).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let t=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((e,i)=>{const n=e.element===this.focusTracker.focusedElement;return n&&(t=i),n}),t)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(t){t&&t.focus()}_getFocusableItem(t){const e=this.current,i=this.focusables.length;if(!i)return null;if(null===e)return this[1===t?\"first\":\"last\"];let n=(e+i+t)%i;do{const e=this.focusables.get(n);if(Yl(e))return e;n=(n+i+t)%i}while(n!==e);return null}}function Yl(t){return!(!t.focus||\"none\"==tr.window.getComputedStyle(t.element).display)}class $l extends Ll{constructor(t){super(t),this.setTemplate({tag:\"span\",attributes:{class:[\"ck\",\"ck-toolbar__separator\"]}})}}const Gl=100;class Ql{constructor(t){this._callback=t,this._elements=new Set,this._previousRects=new Map,this._periodicCheckTimeout=null}observe(t){this._elements.add(t),1===this._elements.size&&this._startPeriodicCheck()}unobserve(t){this._elements.delete(t),this._previousRects.delete(t),this._elements.size||this._stopPeriodicCheck()}disconnect(){this._elements.forEach(t=>this.unobserve(t))}_startPeriodicCheck(){const t=()=>{this._checkElementRectsAndExecuteCallback(),this._periodicCheckTimeout=setTimeout(t,Gl)};this.listenTo(tr.window,\"resize\",()=>{this._checkElementRectsAndExecuteCallback()}),t()}_stopPeriodicCheck(){clearTimeout(this._periodicCheckTimeout),this.stopListening(),this._previousRects.clear()}_checkElementRectsAndExecuteCallback(){const t=[];for(const e of this._elements)this._hasRectChanged(e)&&t.push({target:e,contentRect:this._previousRects.get(e)});t.length&&this._callback(t)}_hasRectChanged(t){if(!t.ownerDocument.body.contains(t))return!1;const e=new xs(t),i=this._previousRects.get(t),n=!i||!i.isEqual(e);return this._previousRects.set(t,e),n}}cn(Ql,cr);class Kl extends Ll{constructor(t){super(t);const e=this.bindTemplate;this.set(\"isVisible\",!1),this.set(\"position\",\"se\"),this.children=this.createCollection(),this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-reset\",\"ck-dropdown__panel\",e.to(\"position\",t=>`ck-dropdown__panel_${t}`),e.if(\"isVisible\",\"ck-dropdown__panel-visible\")]},children:this.children,on:{selectstart:e.to(t=>t.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const t=this.children.last;\"function\"==typeof t.focusLast?t.focusLast():t.focus()}}}i(24);function Jl({element:t,target:e,positions:i,limiter:n,fitInViewport:o}){q(e)&&(e=e()),q(n)&&(n=n());const r=function(t){for(;t&&\"html\"!=t.tagName.toLowerCase();){if(\"static\"!=tr.window.getComputedStyle(t).position)return t;t=t.parentElement}return null}(t.parentElement),s=new xs(t),a=new xs(e);let c,l;if(n||o){const t=n&&new xs(n).getVisible(),e=o&&new xs(tr.window);[l,c]=function(t,e,i,n,o){let r,s,a=0,c=0;const l=i.getArea();return t.some(t=>{const[d,h]=Zl(t,e,i);let u,f;if(n)if(o){const t=n.getIntersection(o);u=t?t.getIntersectionArea(h):0}else u=n.getIntersectionArea(h);function g(){c=f,a=u,r=h,s=d}return o&&(f=o.getIntersectionArea(h)),o&&!n?f>c&&g():!o&&n?u>a&&g():f>c&&u>=a?g():f>=c&&u>a&&g(),u===l}),r?[s,r]:null}(i,a,s,t,e)||Zl(i[0],a,s)}else[l,c]=Zl(i[0],a,s);let{left:d,top:h}=Xl(c);if(r){const t=Xl(new xs(r)),e=vs(r);d-=t.left,h-=t.top,d+=r.scrollLeft,h+=r.scrollTop,d-=e.left,h-=e.top}return{left:d,top:h,name:l}}function Zl(t,e,i){const{left:n,top:o,name:r}=t(e,i);return[r,i.clone().moveTo(n,o)]}function Xl({left:t,top:e}){const{scrollX:i,scrollY:n}=tr.window;return{left:t+i,top:e+n}}class td extends Ll{constructor(t,e,i){super(t);const n=this.bindTemplate;this.buttonView=e,this.panelView=i,this.set(\"isOpen\",!1),this.set(\"isEnabled\",!0),this.set(\"class\"),this.set(\"panelPosition\",\"auto\"),this.focusTracker=new al,this.keystrokes=new Zc,this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-dropdown\",n.to(\"class\"),n.if(\"isEnabled\",\"ck-disabled\",t=>!t)]},children:[e,i]}),e.extendTemplate({attributes:{class:[\"ck-dropdown__button\"]}})}render(){super.render(),this.listenTo(this.buttonView,\"open\",()=>{this.isOpen=!this.isOpen}),this.panelView.bind(\"isVisible\").to(this,\"isOpen\"),this.on(\"change:isOpen\",()=>{this.isOpen&&(\"auto\"===this.panelPosition?this.panelView.position=td._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)}),this.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const t=(t,e)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,e())};this.keystrokes.set(\"arrowdown\",(t,e)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,e())}),this.keystrokes.set(\"arrowright\",(t,e)=>{this.isOpen&&e()}),this.keystrokes.set(\"arrowleft\",t),this.keystrokes.set(\"esc\",t)}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:t,southWest:e,northEast:i,northWest:n}=td.defaultPanelPositions;return\"ltr\"===this.locale.uiLanguageDirection?[t,e,i,n]:[e,t,n,i]}}td.defaultPanelPositions={southEast:t=>({top:t.bottom,left:t.left,name:\"se\"}),southWest:(t,e)=>({top:t.bottom,left:t.left-e.width+t.width,name:\"sw\"}),northEast:(t,e)=>({top:t.top-e.height,left:t.left,name:\"ne\"}),northWest:(t,e)=>({top:t.bottom-e.height,left:t.left-e.width+t.width,name:\"nw\"})},td._getOptimalPosition=Jl;i(26);class ed extends Ll{constructor(){super();const t=this.bindTemplate;this.set(\"content\",\"\"),this.set(\"viewBox\",\"0 0 20 20\"),this.set(\"fillColor\",\"\"),this.setTemplate({tag:\"svg\",ns:\"http://www.w3.org/2000/svg\",attributes:{class:[\"ck\",\"ck-icon\"],viewBox:t.to(\"viewBox\")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on(\"change:content\",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on(\"change:fillColor\",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const t=(new DOMParser).parseFromString(this.content.trim(),\"image/svg+xml\").querySelector(\"svg\"),e=t.getAttribute(\"viewBox\");for(e&&(this.viewBox=e),this.element.innerHTML=\"\";t.childNodes.length>0;)this.element.appendChild(t.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(\".ck-icon__fill\").forEach(t=>{t.style.fill=this.fillColor})}}i(28);class id extends Ll{constructor(t){super(t),this.set(\"text\",\"\"),this.set(\"position\",\"s\");const e=this.bindTemplate;this.setTemplate({tag:\"span\",attributes:{class:[\"ck\",\"ck-tooltip\",e.to(\"position\",t=>\"ck-tooltip_\"+t),e.if(\"text\",\"ck-hidden\",t=>!t.trim())]},children:[{tag:\"span\",attributes:{class:[\"ck\",\"ck-tooltip__text\"]},children:[{text:e.to(\"text\")}]}]})}}i(30);class nd extends Ll{constructor(t){super(t);const e=this.bindTemplate,i=Ki();this.set(\"class\"),this.set(\"labelStyle\"),this.set(\"icon\"),this.set(\"isEnabled\",!0),this.set(\"isOn\",!1),this.set(\"isVisible\",!0),this.set(\"isToggleable\",!1),this.set(\"keystroke\"),this.set(\"label\"),this.set(\"tabindex\",-1),this.set(\"tooltip\"),this.set(\"tooltipPosition\",\"s\"),this.set(\"type\",\"button\"),this.set(\"withText\",!1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(i),this.iconView=new ed,this.iconView.extendTemplate({attributes:{class:\"ck-button__icon\"}}),this.bind(\"_tooltipString\").to(this,\"tooltip\",this,\"label\",this,\"keystroke\",this._getTooltipString.bind(this)),this.setTemplate({tag:\"button\",attributes:{class:[\"ck\",\"ck-button\",e.to(\"class\"),e.if(\"isEnabled\",\"ck-disabled\",t=>!t),e.if(\"isVisible\",\"ck-hidden\",t=>!t),e.to(\"isOn\",t=>t?\"ck-on\":\"ck-off\"),e.if(\"withText\",\"ck-button_with-text\")],type:e.to(\"type\",t=>t||\"button\"),tabindex:e.to(\"tabindex\"),\"aria-labelledby\":`ck-editor__aria-label_${i}`,\"aria-disabled\":e.if(\"isEnabled\",!0,t=>!t),\"aria-pressed\":e.to(\"isOn\",t=>!!this.isToggleable&&String(t))},children:this.children,on:{mousedown:e.to(t=>{t.preventDefault()}),click:e.to(t=>{this.isEnabled?this.fire(\"execute\"):t.preventDefault()})}})}render(){super.render(),this.icon&&(this.iconView.bind(\"content\").to(this,\"icon\"),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView)}focus(){this.element.focus()}_createTooltipView(){const t=new id;return t.bind(\"text\").to(this,\"_tooltipString\"),t.bind(\"position\").to(this,\"tooltipPosition\"),t}_createLabelView(t){const e=new Ll,i=this.bindTemplate;return e.setTemplate({tag:\"span\",attributes:{class:[\"ck\",\"ck-button__label\"],style:i.to(\"labelStyle\"),id:`ck-editor__aria-label_${t}`},children:[{text:this.bindTemplate.to(\"label\")}]}),e}_getTooltipString(t,e,i){return t?\"string\"==typeof t?t:(i&&(i=function(t){return go.isMac?ko(t).map(t=>po[t.toLowerCase()]||t).reduce((t,e)=>t.slice(-1)in mo?t+e:t+\"+\"+e):t}(i)),t instanceof Function?t(e,i):`${e}${i?` (${i})`:\"\"}`):\"\"}}var od='<svg viewBox=\"0 0 10 10\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z\"/></svg>';class rd extends nd{constructor(t){super(t),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{\"aria-haspopup\":!0}}),this.delegate(\"execute\").to(this,\"open\")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const t=new ed;return t.content=od,t.extendTemplate({attributes:{class:\"ck-dropdown__arrow\"}}),t}}i(32);class sd extends Ll{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new al,this.keystrokes=new Zc,this._focusCycler=new ql({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:\"arrowup\",focusNext:\"arrowdown\"}}),this.setTemplate({tag:\"ul\",attributes:{class:[\"ck\",\"ck-reset\",\"ck-list\"]},children:this.items})}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on(\"add\",(t,e)=>{this.focusTracker.add(e.element)}),this.items.on(\"remove\",(t,e)=>{this.focusTracker.remove(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class ad extends Ll{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:\"li\",attributes:{class:[\"ck\",\"ck-list__item\"]},children:this.children})}focus(){this.children.first.focus()}}class cd extends Ll{constructor(t){super(t),this.setTemplate({tag:\"li\",attributes:{class:[\"ck\",\"ck-list__separator\"]}})}}i(34);class ld extends nd{constructor(t){super(t),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:\"ck-switchbutton\"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const t=new Ll;return t.setTemplate({tag:\"span\",attributes:{class:[\"ck\",\"ck-button__toggle\"]},children:[{tag:\"span\",attributes:{class:[\"ck\",\"ck-button__toggle__inner\"]}}]}),t}}function dd({emitter:t,activator:e,callback:i,contextElements:n}){t.listenTo(document,\"mousedown\",(t,{target:o})=>{if(e()){for(const t of n)if(t.contains(o))return;i()}})}i(36),i(38);function hd(t,e=rd){const i=new e(t),n=new Kl(t),o=new td(t,i,n);return i.bind(\"isEnabled\").to(o),i instanceof rd?i.bind(\"isOn\").to(o,\"isOpen\"):i.arrowView.bind(\"isOn\").to(o,\"isOpen\"),function(t){(function(t){t.on(\"render\",()=>{dd({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=!1},contextElements:[t.element]})})})(t),function(t){t.on(\"execute\",e=>{e.source instanceof ld||(t.isOpen=!1)})}(t),function(t){t.keystrokes.set(\"arrowdown\",(e,i)=>{t.isOpen&&(t.panelView.focus(),i())}),t.keystrokes.set(\"arrowup\",(e,i)=>{t.isOpen&&(t.panelView.focusLast(),i())})}(t)}(o),o}function ud(t,e){const i=t.locale,n=t.listView=new sd(i);n.items.bindTo(e).using(({type:t,model:e})=>{if(\"separator\"===t)return new cd(i);if(\"button\"===t||\"switchbutton\"===t){const n=new ad(i);let o;return(o=\"button\"===t?new nd(i):new ld(i)).bind(...Object.keys(e)).to(e),o.delegate(\"execute\").to(n),n.children.add(o),n}}),t.panelView.children.add(n),n.items.delegate(\"execute\").to(t)}var fd='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"9.5\" cy=\"4.5\" r=\"1.5\"/><circle cx=\"9.5\" cy=\"10.5\" r=\"1.5\"/><circle cx=\"9.5\" cy=\"16.5\" r=\"1.5\"/></svg>\\n';i(40);class gd extends Ll{constructor(t,e){super(t);const i=this.bindTemplate,n=this.t;this.options=e||{},this.set(\"ariaLabel\",n(\"av\")),this.items=this.createCollection(),this.focusTracker=new al,this.keystrokes=new Zc,this.set(\"class\"),this.itemsView=new md(t),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection(),this._focusCycler=new ql({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[\"arrowleft\",\"arrowup\"],focusNext:[\"arrowright\",\"arrowdown\"]}}),this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-toolbar\",i.to(\"class\")],role:\"toolbar\",\"aria-label\":i.to(\"ariaLabel\")},children:this.children,on:{mousedown:function(t){return t.bindTemplate.to(e=>{e.target===t.element&&e.preventDefault()})}(this)}}),this._behavior=this.options.shouldGroupWhenFull?new bd(this):new pd(this)}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on(\"add\",(t,e)=>{this.focusTracker.add(e.element)}),this.items.on(\"remove\",(t,e)=>{this.focusTracker.remove(e.element)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(t,e){t.map(t=>{\"|\"==t?this.items.add(new $l):e.has(t)?this.items.add(e.create(t)):console.warn(Object($i.a)(\"toolbarview-item-unavailable: The requested toolbar item is unavailable.\"),{name:t})})}}class md extends Ll{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-toolbar__items\"]},children:this.children})}}class pd{constructor(t){const e=t.bindTemplate;t.set(\"isVertical\",!1),t.itemsView.children.bindTo(t.items).using(t=>t),t.focusables.bindTo(t.items).using(t=>t),t.extendTemplate({attributes:{class:[e.if(\"isVertical\",\"ck-toolbar_vertical\")]}})}render(){}destroy(){}}class bd{constructor(t){this.viewChildren=t.children,this.viewFocusables=t.focusables,this.viewItemsView=t.itemsView,this.viewFocusTracker=t.focusTracker,this.viewLocale=t.locale,this.ungroupedItems=t.createCollection(),this.groupedItems=t.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),this.resizeObserver=null,this.cachedPadding=null,t.itemsView.children.bindTo(this.ungroupedItems).using(t=>t),this.ungroupedItems.on(\"add\",this._updateFocusCycleableItems.bind(this)),this.ungroupedItems.on(\"remove\",this._updateFocusCycleableItems.bind(this)),t.children.on(\"add\",this._updateFocusCycleableItems.bind(this)),t.children.on(\"remove\",this._updateFocusCycleableItems.bind(this)),t.items.on(\"add\",(t,e,i)=>{i>this.ungroupedItems.length?this.groupedItems.add(e,i-this.ungroupedItems.length):this.ungroupedItems.add(e,i),this._updateGrouping()}),t.items.on(\"remove\",(t,e,i)=>{i>this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e),this._updateGrouping()}),t.extendTemplate({attributes:{class:[\"ck-toolbar_grouping\"]}})}render(t){this.viewElement=t.element,this._enableGroupingOnResize()}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.disconnect()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const t=this.viewElement,e=this.viewLocale.uiLanguageDirection,i=new xs(t.lastChild),n=new xs(t);if(!this.cachedPadding){const i=tr.window.getComputedStyle(t),n=\"ltr\"===e?\"paddingRight\":\"paddingLeft\";this.cachedPadding=Number.parseInt(i[n])}return\"ltr\"===e?i.right>n.right-this.cachedPadding:i.left<n.left+this.cachedPadding}_enableGroupingOnResize(){let t;this.resizeObserver=function(t){return\"function\"==typeof tr.window.ResizeObserver?new tr.window.ResizeObserver(t):new Ql(t)}(([e])=>{t&&t===e.contentRect.width||(this._updateGrouping(),t=e.contentRect.width)}),this.resizeObserver.observe(this.viewElement),this._updateGrouping()}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new $l),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const t=this.viewLocale,e=t.t,i=hd(t);return i.class=\"ck-toolbar__grouped-dropdown\",i.panelPosition=\"ltr\"===t.uiLanguageDirection?\"sw\":\"se\",function(t,e){const i=t.locale,n=i.t,o=t.toolbarView=new gd(i);o.set(\"ariaLabel\",n(\"bf\")),t.extendTemplate({attributes:{class:[\"ck-toolbar-dropdown\"]}}),e.map(t=>o.items.add(t)),t.panelView.children.add(o),o.items.delegate(\"execute\").to(t)}(i,[]),i.buttonView.set({label:e(\"aw\"),tooltip:!0,icon:fd}),i.toolbarView.items.bindTo(this.groupedItems).using(t=>t),i}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(t=>{this.viewFocusables.add(t)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}i(42);class wd extends zl{constructor(t,e){super(t),this.stickyPanel=new Wl(t),this.toolbar=new gd(t,{shouldGroupWhenFull:!0}),this.editable=new Fl(t,e)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class _d extends tl{constructor(t,e){super(e),Wi(t)&&(this.sourceElement=t),this.data.processor=new ol,this.model.document.createRoot(),this.ui=new ml(this,new wd(this.locale,this.editing.view)),function(t){if(!q(t.updateSourceElement))throw new $i.b(\"attachtoform-missing-elementapi-interface: Editor passed to attachToForm() must implement ElementApi.\",t);const e=t.sourceElement;if(e&&\"textarea\"===e.tagName.toLowerCase()&&e.form){let i;const n=e.form,o=()=>t.updateSourceElement();q(n.submit)&&(i=n.submit,n.submit=(()=>{o(),i.apply(n)})),n.addEventListener(\"submit\",o),t.on(\"destroy\",()=>{n.removeEventListener(\"submit\",o),i&&(n.submit=i)})}}(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(t,e={}){return new Promise(i=>{const n=new this(t,e);i(n.initPlugins().then(()=>n.ui.init(Wi(t)?t:null)).then(()=>{if(!Wi(t)&&e.initialData)throw new $i.b(\"editor-create-initial-data: The config.initialData option cannot be used together with initial data passed in Editor.create().\",null);const i=e.initialData||function(t){return Wi(t)?function(t){return t instanceof HTMLTextAreaElement?t.value:t.innerHTML}(t):t}(t);return n.data.init(i)}).then(()=>n.fire(\"ready\")).then(()=>n))})}}cn(_d,el),cn(_d,il);class kd{constructor(t){this.editor=t}destroy(){this.stopListening()}}cn(kd,Fn);class vd{constructor(t){this.files=function(t){const e=t.files?Array.from(t.files):[],i=t.items?Array.from(t.items):[];if(e.length)return e;return i.filter(t=>\"file\"===t.kind).map(t=>t.getAsFile())}(t),this._native=t}get types(){return this._native.types}getData(t){return this._native.getData(t)}setData(t,e){this._native.setData(t,e)}}class yd extends Xr{constructor(t){super(t);const e=this.document;function i(t,i){i.preventDefault();const n=i.dropRange?[i.dropRange]:Array.from(e.selection.getRanges()),o=new Qi(e,\"clipboardInput\");e.fire(o,{dataTransfer:i.dataTransfer,targetRanges:n}),o.stop.called&&i.stopPropagation()}this.domEventType=[\"paste\",\"copy\",\"cut\",\"drop\",\"dragover\"],this.listenTo(e,\"paste\",i,{priority:\"low\"}),this.listenTo(e,\"drop\",i,{priority:\"low\"})}onDomEvent(t){const e={dataTransfer:new vd(t.clipboardData?t.clipboardData:t.dataTransfer)};\"drop\"==t.type&&(e.dropRange=function(t,e){const i=e.target.ownerDocument,n=e.clientX,o=e.clientY;let r;i.caretRangeFromPoint&&i.caretRangeFromPoint(n,o)?r=i.caretRangeFromPoint(n,o):e.rangeParent&&((r=i.createRange()).setStart(e.rangeParent,e.rangeOffset),r.collapse(!0));return r?t.domConverter.domRangeToView(r):t.document.selection.getFirstRange()}(this.view,t)),this.fire(t.type,t,e)}}const xd=[\"figcaption\",\"li\"];class Ad extends kd{static get pluginName(){return\"Clipboard\"}init(){const t=this.editor,e=t.model.document,i=t.editing.view,n=i.document;function o(i,o){const r=o.dataTransfer;o.preventDefault();const s=t.data.toView(t.model.getSelectedContent(e.selection));n.fire(\"clipboardOutput\",{dataTransfer:r,content:s,method:i.name})}this._htmlDataProcessor=new ol,i.addObserver(yd),this.listenTo(n,\"clipboardInput\",e=>{t.isReadOnly&&e.stop()},{priority:\"highest\"}),this.listenTo(n,\"clipboardInput\",(t,e)=>{const n=e.dataTransfer;let o=\"\";n.getData(\"text/html\")?o=function(t){return t.replace(/<span(?: class=\"Apple-converted-space\"|)>(\\s+)<\\/span>/g,(t,e)=>1==e.length?\" \":e)}(n.getData(\"text/html\")):n.getData(\"text/plain\")&&(o=function(t){return(t=t.replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\\n/g,\"</p><p>\").replace(/^\\s/,\"&nbsp;\").replace(/\\s$/,\"&nbsp;\").replace(/\\s\\s/g,\" &nbsp;\")).indexOf(\"</p><p>\")>-1&&(t=`<p>${t}</p>`),t}(n.getData(\"text/plain\"))),o=this._htmlDataProcessor.toView(o),this.fire(\"inputTransformation\",{content:o,dataTransfer:n}),i.scrollToTheSelection()},{priority:\"low\"}),this.listenTo(this,\"inputTransformation\",(t,e)=>{if(!e.content.isEmpty){const t=this.editor.data,i=this.editor.model,n=t.toModel(e.content,\"$clipboardHolder\");if(0==n.childCount)return;i.insertContent(n)}},{priority:\"low\"}),this.listenTo(n,\"copy\",o,{priority:\"low\"}),this.listenTo(n,\"cut\",(e,i)=>{t.isReadOnly?i.preventDefault():o(e,i)},{priority:\"low\"}),this.listenTo(n,\"clipboardOutput\",(i,n)=>{n.content.isEmpty||(n.dataTransfer.setData(\"text/html\",this._htmlDataProcessor.toData(n.content)),n.dataTransfer.setData(\"text/plain\",function t(e){let i=\"\";if(e.is(\"text\")||e.is(\"textProxy\"))i=e.data;else if(e.is(\"img\")&&e.hasAttribute(\"alt\"))i=e.getAttribute(\"alt\");else{let n=null;for(const o of e.getChildren()){const e=t(o);n&&(n.is(\"containerElement\")||o.is(\"containerElement\"))&&(xd.includes(n.name)||xd.includes(o.name)?i+=\"\\n\":i+=\"\\n\\n\"),i+=e,n=o}}return i}(n.content))),\"cut\"==n.method&&t.model.deleteContent(e.selection)},{priority:\"low\"})}}class Td{constructor(t){this.editor=t,this.set(\"value\",void 0),this.set(\"isEnabled\",!1),this._disableStack=new Set,this.decorate(\"execute\"),this.listenTo(this.editor.model.document,\"change\",()=>{this.refresh()}),this.on(\"execute\",t=>{this.isEnabled||t.stop()},{priority:\"high\"}),this.listenTo(t,\"change:isReadOnly\",(t,e,i)=>{i?this.forceDisabled(\"readOnlyMode\"):this.clearForceDisabled(\"readOnlyMode\")})}refresh(){this.isEnabled=!0}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on(\"set:isEnabled\",Cd,{priority:\"highest\"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off(\"set:isEnabled\",Cd),this.refresh())}execute(){}destroy(){this.stopListening()}}function Cd(t){t.return=!1,t.stop()}function*Pd(t,e){for(const i of e)i&&t.getAttributeProperties(i[0]).copyOnEnter&&(yield i)}cn(Td,Fn);class Sd extends Td{execute(){const t=this.editor.model,e=t.document;t.change(i=>{!function(t,e,i,n){const o=i.isCollapsed,r=i.getFirstRange(),s=r.start.parent,a=r.end.parent;if(n.isLimit(s)||n.isLimit(a))return void(o||s!=a||t.deleteContent(i));if(o){const t=Pd(e.model.schema,i.getAttributes());Md(e,r.start),e.setSelectionAttribute(t)}else{const n=!(r.start.isAtStart&&r.end.isAtEnd),o=s==a;t.deleteContent(i,{leaveUnmerged:n}),n&&(o?Md(e,i.focus):e.setSelection(a,0))}}(this.editor.model,i,e.selection,t.schema),this.fire(\"afterExecute\",{writer:i})})}}function Md(t,e){t.split(e),t.setSelection(e.parent.nextSibling,0)}class Ed extends hr{constructor(t){super(t);const e=this.document;e.on(\"keydown\",(t,i)=>{if(this.isEnabled&&i.keyCode==bo.enter){let n;e.once(\"enter\",t=>n=t,{priority:\"highest\"}),e.fire(\"enter\",new Zr(e,i.domEvent,{isSoft:i.shiftKey})),n&&n.stop.called&&t.stop()}})}observe(){}}class Id extends kd{static get pluginName(){return\"Enter\"}init(){const t=this.editor,e=t.editing.view,i=e.document;e.addObserver(Ed),t.commands.add(\"enter\",new Sd(t)),this.listenTo(i,\"enter\",(i,n)=>{n.preventDefault(),n.isSoft||(t.execute(\"enter\"),e.scrollToTheSelection())},{priority:\"low\"})}}class Nd extends Td{execute(){const t=this.editor.model,e=t.document;t.change(i=>{!function(t,e,i){const n=i.isCollapsed,o=i.getFirstRange(),r=o.start.parent,s=o.end.parent,a=r==s;if(n){const n=Pd(t.schema,i.getAttributes());Od(e,o.end),e.removeSelectionAttribute(i.getAttributeKeys()),e.setSelectionAttribute(n)}else{const n=!(o.start.isAtStart&&o.end.isAtEnd);t.deleteContent(i,{leaveUnmerged:n}),a?Od(e,i.focus):n&&e.setSelection(s,0)}}(t,i,e.selection),this.fire(\"afterExecute\",{writer:i})})}refresh(){const t=this.editor.model,e=t.document;this.isEnabled=function(t,e){if(e.rangeCount>1)return!1;const i=e.anchor;if(!i||!t.checkChild(i,\"softBreak\"))return!1;const n=e.getFirstRange(),o=n.start.parent,r=n.end.parent;if((Rd(o,t)||Rd(r,t))&&o!==r)return!1;return!0}(t.schema,e.selection)}}function Od(t,e){const i=t.createElement(\"softBreak\");t.insert(i,e),t.setSelection(i,\"after\")}function Rd(t,e){return!t.is(\"rootElement\")&&(e.isLimit(t)||Rd(t.parent,e))}class Dd extends kd{static get pluginName(){return\"ShiftEnter\"}init(){const t=this.editor,e=t.model.schema,i=t.conversion,n=t.editing.view,o=n.document;e.register(\"softBreak\",{allowWhere:\"$text\",isInline:!0}),i.for(\"upcast\").elementToElement({model:\"softBreak\",view:\"br\"}),i.for(\"downcast\").elementToElement({model:\"softBreak\",view:(t,e)=>e.createEmptyElement(\"br\")}),n.addObserver(Ed),t.commands.add(\"shiftEnter\",new Nd(t)),this.listenTo(o,\"enter\",(e,i)=>{i.preventDefault(),i.isSoft&&(t.execute(\"shiftEnter\"),n.scrollToTheSelection())},{priority:\"low\"})}}class Ld{constructor(t,e=20){this.model=t,this.size=0,this.limit=e,this.isLocked=!1,this._changeCallback=((t,e)=>{\"transparent\"!=e.type&&e!==this._batch&&this._reset(!0)}),this._selectionChangeCallback=(()=>{this._reset()}),this.model.document.on(\"change\",this._changeCallback),this.model.document.selection.on(\"change:range\",this._selectionChangeCallback),this.model.document.selection.on(\"change:attribute\",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch()),this._batch}input(t){this.size+=t,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.model.document.off(\"change\",this._changeCallback),this.model.document.selection.off(\"change:range\",this._selectionChangeCallback),this.model.document.selection.off(\"change:attribute\",this._selectionChangeCallback)}_reset(t){this.isLocked&&!t||(this._batch=null,this.size=0)}}class jd extends Td{constructor(t,e){super(t),this._buffer=new Ld(t.model,e),this._batches=new WeakSet}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(t={}){const e=this.editor.model,i=e.document,n=t.text||\"\",o=n.length,r=t.range||i.selection.getFirstRange(),s=t.resultRange;e.enqueueChange(this._buffer.batch,t=>{const a=r.isCollapsed;this._buffer.lock(),e.deleteContent(e.createSelection(r)),n&&e.insertContent(t.createText(n,i.selection.getAttributes()),r.start),s?t.setSelection(s):a&&t.setSelection(r.start.getShiftedBy(o)),this._buffer.unlock(),this._buffer.input(o),this._batches.add(this._buffer.batch)})}}function Vd(t){let e=null;const i=t.model,n=t.editing.view,o=t.commands.get(\"input\");function r(t){const r=i.document,a=n.document.isComposing,c=e&&e.isEqual(r.selection);e=null,o.isEnabled&&(function(t){if(t.ctrlKey)return!0;return zd.includes(t.keyCode)}(t)||r.selection.isCollapsed||a&&229===t.keyCode||!a&&229===t.keyCode&&c||s())}function s(){const t=o.buffer;t.lock(),i.enqueueChange(t.batch,()=>{i.deleteContent(i.document.selection)}),t.unlock()}go.isAndroid?n.document.on(\"beforeinput\",(t,e)=>r(e),{priority:\"lowest\"}):n.document.on(\"keydown\",(t,e)=>r(e),{priority:\"lowest\"}),n.document.on(\"compositionstart\",function(){const t=i.document,e=1!==t.selection.rangeCount||t.selection.getFirstRange().isFlat;if(t.selection.isCollapsed||e)return;s()},{priority:\"lowest\"}),n.document.on(\"compositionend\",()=>{e=i.createSelection(i.document.selection)},{priority:\"lowest\"})}const zd=[wo(\"arrowUp\"),wo(\"arrowRight\"),wo(\"arrowDown\"),wo(\"arrowLeft\"),9,16,17,18,19,20,27,33,34,35,36,45,91,93,144,145,173,174,175,176,177,178,179,255];for(let t=112;t<=135;t++)zd.push(t);function Bd(t){if(t.newChildren.length-t.oldChildren.length!=1)return;const e=function(t,e){const i=[];let n,o=0;return t.forEach(t=>{\"equal\"==t?(r(),o++):\"insert\"==t?(s(\"insert\")?n.values.push(e[o]):(r(),n={type:\"insert\",index:o,values:[e[o]]}),o++):s(\"delete\")?n.howMany++:(r(),n={type:\"delete\",index:o,howMany:1})}),r(),i;function r(){n&&(i.push(n),n=null)}function s(t){return n&&n.type==t}}($o(t.oldChildren,t.newChildren,Fd),t.newChildren);if(e.length>1)return;const i=e[0];return i.values[0]&&i.values[0].is(\"text\")?i:void 0}function Fd(t,e){return t&&t.is(\"text\")&&e&&e.is(\"text\")?t.data===e.data:t===e}class Ud{constructor(t){this.editor=t,this.editing=this.editor.editing}handle(t,e){if(function(t){if(0==t.length)return!1;for(const e of t)if(\"children\"===e.type&&!Bd(e))return!0;return!1}(t))this._handleContainerChildrenMutations(t,e);else for(const i of t)this._handleTextMutation(i,e),this._handleTextNodeInsertion(i)}_handleContainerChildrenMutations(t,e){const i=function(t){const e=t.map(t=>t.node).reduce((t,e)=>t.getCommonAncestor(e,{includeSelf:!0}));if(!e)return;return e.getAncestors({includeSelf:!0,parentFirst:!0}).find(t=>t.is(\"containerElement\")||t.is(\"rootElement\"))}(t);if(!i)return;const n=this.editor.editing.view.domConverter.mapViewToDom(i),o=new or,r=this.editor.data.toModel(o.domToView(n)).getChild(0),s=this.editor.editing.mapper.toModelElement(i);if(!s)return;const a=Array.from(r.getChildren()),c=Array.from(s.getChildren()),l=a[a.length-1],d=c[c.length-1];l&&l.is(\"softBreak\")&&d&&!d.is(\"softBreak\")&&a.pop();const h=this.editor.model.schema;if(!Hd(a,h)||!Hd(c,h))return;const u=a.map(t=>t.is(\"text\")?t.data:\"@\").join(\"\").replace(/\\u00A0/g,\" \"),f=c.map(t=>t.is(\"text\")?t.data:\"@\").join(\"\").replace(/\\u00A0/g,\" \");if(f===u)return;const g=$o(f,u),{firstChangeAt:m,insertions:p,deletions:b}=Wd(g);let w=null;e&&(w=this.editing.mapper.toModelRange(e.getFirstRange()));const _=u.substr(m,p),k=this.editor.model.createRange(this.editor.model.createPositionAt(s,m),this.editor.model.createPositionAt(s,m+b));this.editor.execute(\"input\",{text:_,range:k,resultRange:w})}_handleTextMutation(t,e){if(\"text\"!=t.type)return;const i=t.newText.replace(/\\u00A0/g,\" \"),n=t.oldText.replace(/\\u00A0/g,\" \");if(n===i)return;const o=$o(n,i),{firstChangeAt:r,insertions:s,deletions:a}=Wd(o);let c=null;e&&(c=this.editing.mapper.toModelRange(e.getFirstRange()));const l=this.editing.view.createPositionAt(t.node,r),d=this.editing.mapper.toModelPosition(l),h=this.editor.model.createRange(d,d.getShiftedBy(a)),u=i.substr(r,s);this.editor.execute(\"input\",{text:u,range:h,resultRange:c})}_handleTextNodeInsertion(t){if(\"children\"!=t.type)return;const e=Bd(t),i=this.editing.view.createPositionAt(t.node,e.index),n=this.editing.mapper.toModelPosition(i),o=e.values[0].data;this.editor.execute(\"input\",{text:o.replace(/\\u00A0/g,\" \"),range:this.editor.model.createRange(n)})}}function Hd(t,e){return t.every(t=>e.isInline(t))}function Wd(t){let e=null,i=null;for(let n=0;n<t.length;n++){\"equal\"!=t[n]&&(e=null===e?n:e,i=n)}let n=0,o=0;for(let r=e;r<=i;r++)\"insert\"!=t[r]&&n++,\"delete\"!=t[r]&&o++;return{insertions:o,deletions:n,firstChangeAt:e}}class qd extends kd{static get pluginName(){return\"Input\"}init(){const t=this.editor,e=new jd(t,t.config.get(\"typing.undoStep\")||20);t.commands.add(\"input\",e),Vd(t),function(t){t.editing.view.document.on(\"mutations\",(e,i,n)=>{new Ud(t).handle(i,n)})}(t)}isInput(t){return this.editor.commands.get(\"input\")._batches.has(t)}}class Yd extends Td{constructor(t,e){super(t),this.direction=e,this._buffer=new Ld(t.model,t.config.get(\"typing.undoStep\"))}get buffer(){return this._buffer}execute(t={}){const e=this.editor.model,i=e.document;e.enqueueChange(this._buffer.batch,n=>{this._buffer.lock();const o=n.createSelection(t.selection||i.selection),r=o.isCollapsed;if(o.isCollapsed&&e.modifySelection(o,{direction:this.direction,unit:t.unit}),this._shouldEntireContentBeReplacedWithParagraph(t.sequence||1))return void this._replaceEntireContentWithParagraph(n);if(o.isCollapsed)return;let s=0;o.getFirstRange().getMinimalFlatRanges().forEach(t=>{s+=eo(t.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),e.deleteContent(o,{doNotResetEntireContent:r}),this._buffer.input(s),n.setSelection(o),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(t){if(t>1)return!1;const e=this.editor.model,i=e.document.selection,n=e.schema.getLimitElement(i);if(!(i.isCollapsed&&i.containsEntireContent(n)))return!1;if(!e.schema.checkChild(n,\"paragraph\"))return!1;const o=n.getChild(0);return!o||\"paragraph\"!==o.name}_replaceEntireContentWithParagraph(t){const e=this.editor.model,i=e.document.selection,n=e.schema.getLimitElement(i),o=t.createElement(\"paragraph\");t.remove(t.createRangeIn(n)),t.insert(o,n),t.setSelection(o,0)}}class $d extends hr{constructor(t){super(t);const e=t.document;let i=0;function n(t,i,n){let o;e.once(\"delete\",t=>o=t,{priority:Number.POSITIVE_INFINITY}),e.fire(\"delete\",new Zr(e,i,n)),o&&o.stop.called&&t.stop()}e.on(\"keyup\",(t,e)=>{e.keyCode!=bo.delete&&e.keyCode!=bo.backspace||(i=0)}),e.on(\"keydown\",(t,e)=>{const o={};if(e.keyCode==bo.delete)o.direction=\"forward\",o.unit=\"character\";else{if(e.keyCode!=bo.backspace)return;o.direction=\"backward\",o.unit=\"codePoint\"}const r=go.isMac?e.altKey:e.ctrlKey;o.unit=r?\"word\":o.unit,o.sequence=++i,n(t,e.domEvent,o)}),go.isAndroid&&e.on(\"beforeinput\",(e,i)=>{if(\"deleteContentBackward\"!=i.domEvent.inputType)return;const o={unit:\"codepoint\",direction:\"backward\",sequence:1},r=i.domTarget.ownerDocument.defaultView.getSelection();r.anchorNode==r.focusNode&&r.anchorOffset+1!=r.focusOffset&&(o.selectionToRemove=t.domConverter.domSelectionToView(r)),n(e,i.domEvent,o)})}observe(){}}class Gd extends kd{static get pluginName(){return\"Delete\"}init(){const t=this.editor,e=t.editing.view,i=e.document;if(e.addObserver($d),t.commands.add(\"forwardDelete\",new Yd(t,\"forward\")),t.commands.add(\"delete\",new Yd(t,\"backward\")),this.listenTo(i,\"delete\",(i,n)=>{const o={unit:n.unit,sequence:n.sequence};if(n.selectionToRemove){const e=t.model.createSelection(),i=[];for(const e of n.selectionToRemove.getRanges())i.push(t.editing.mapper.toModelRange(e));e.setTo(i),o.selection=e}t.execute(\"forward\"==n.direction?\"forwardDelete\":\"delete\",o),n.preventDefault(),e.scrollToTheSelection()}),go.isAndroid){let t=null;this.listenTo(i,\"delete\",(e,i)=>{const n=i.domTarget.ownerDocument.defaultView.getSelection();t={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}},{priority:\"lowest\"}),this.listenTo(i,\"keyup\",(e,i)=>{if(t){const e=i.domTarget.ownerDocument.defaultView.getSelection();e.collapse(t.anchorNode,t.anchorOffset),e.extend(t.focusNode,t.focusOffset),t=null}})}}}class Qd extends kd{static get requires(){return[qd,Gd]}static get pluginName(){return\"Typing\"}}class Kd extends Za{get type(){return\"noop\"}clone(){return new Kd(this.baseVersion)}getReversed(){return new Kd(this.baseVersion+1)}_execute(){}static get className(){return\"NoOperation\"}}const Jd=new Map;function Zd(t,e,i){let n=Jd.get(t);n||(n=new Map,Jd.set(t,n)),n.set(e,i)}function Xd(t){return[t]}function th(t,e,i={}){const n=function(t,e){const i=Jd.get(t);return i&&i.has(e)?i.get(e):Xd}(t.constructor,e.constructor);try{return n(t=t.clone(),e,i)}catch(t){throw t}}function eh(t,e,i){t=t.slice(),e=e.slice();const n=new ih(i.document,i.useRelations,i.forceWeakRemove);n.setOriginalOperations(t),n.setOriginalOperations(e);const o=n.originalOperations;if(0==t.length||0==e.length)return{operationsA:t,operationsB:e,originalOperations:o};const r=new WeakMap;for(const e of t)r.set(e,0);const s={nextBaseVersionA:t[t.length-1].baseVersion+1,nextBaseVersionB:e[e.length-1].baseVersion+1,originalOperationsACount:t.length,originalOperationsBCount:e.length};let a=0;for(;a<t.length;){const i=t[a],o=r.get(i);if(o==e.length){a++;continue}const s=e[o],c=th(i,s,n.getContext(i,s,!0)),l=th(s,i,n.getContext(s,i,!1));n.updateRelation(i,s),n.setOriginalOperations(c,i),n.setOriginalOperations(l,s);for(const t of c)r.set(t,o+l.length);t.splice(a,1,...c),e.splice(o,1,...l)}if(i.padWithNoOps){const i=t.length-s.originalOperationsACount,n=e.length-s.originalOperationsBCount;oh(t,n-i),oh(e,i-n)}return nh(t,s.nextBaseVersionB),nh(e,s.nextBaseVersionA),{operationsA:t,operationsB:e,originalOperations:o}}class ih{constructor(t,e,i=!1){this.originalOperations=new Map,this._history=t.history,this._useRelations=e,this._forceWeakRemove=!!i,this._relations=new Map}setOriginalOperations(t,e=null){const i=e?this.originalOperations.get(e):null;for(const e of t)this.originalOperations.set(e,i||e)}updateRelation(t,e){switch(t.constructor){case dc:switch(e.constructor){case mc:t.targetPosition.isEqual(e.sourcePosition)||e.movedRange.containsPosition(t.targetPosition)?this._setRelation(t,e,\"insertAtSource\"):t.targetPosition.isEqual(e.deletionPosition)?this._setRelation(t,e,\"insertBetween\"):t.targetPosition.isAfter(e.sourcePosition)&&this._setRelation(t,e,\"moveTargetAfter\");break;case dc:t.targetPosition.isEqual(e.sourcePosition)||t.targetPosition.isBefore(e.sourcePosition)?this._setRelation(t,e,\"insertBefore\"):this._setRelation(t,e,\"insertAfter\")}break;case pc:switch(e.constructor){case mc:t.splitPosition.isBefore(e.sourcePosition)&&this._setRelation(t,e,\"splitBefore\");break;case dc:(t.splitPosition.isEqual(e.sourcePosition)||t.splitPosition.isBefore(e.sourcePosition))&&this._setRelation(t,e,\"splitBefore\")}break;case mc:switch(e.constructor){case mc:t.targetPosition.isEqual(e.sourcePosition)||this._setRelation(t,e,\"mergeTargetNotMoved\"),t.sourcePosition.isEqual(e.targetPosition)&&this._setRelation(t,e,\"mergeSourceNotMoved\"),t.sourcePosition.isEqual(e.sourcePosition)&&this._setRelation(t,e,\"mergeSameElement\");break;case pc:t.sourcePosition.isEqual(e.splitPosition)&&this._setRelation(t,e,\"splitAtSource\")}break;case uc:{const i=t.newRange;if(!i)return;switch(e.constructor){case dc:{const n=$s._createFromPositionAndShift(e.sourcePosition,e.howMany),o=n.containsPosition(i.start)||n.start.isEqual(i.start),r=n.containsPosition(i.end)||n.end.isEqual(i.end);!o&&!r||n.containsRange(i)||this._setRelation(t,e,{side:o?\"left\":\"right\",path:o?i.start.path.slice():i.end.path.slice()});break}case mc:{const n=i.start.isEqual(e.targetPosition),o=i.start.isEqual(e.deletionPosition),r=i.end.isEqual(e.deletionPosition),s=i.end.isEqual(e.sourcePosition);(n||o||r||s)&&this._setRelation(t,e,{wasInLeftElement:n,wasStartBeforeMergedElement:o,wasEndBeforeMergedElement:r,wasInRightElement:s});break}}break}}}getContext(t,e,i){return{aIsStrong:i,aWasUndone:this._wasUndone(t),bWasUndone:this._wasUndone(e),abRelation:this._useRelations?this._getRelation(t,e):null,baRelation:this._useRelations?this._getRelation(e,t):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(t){const e=this.originalOperations.get(t);return e.wasUndone||this._history.isUndoneOperation(e)}_getRelation(t,e){const i=this.originalOperations.get(e),n=this._history.getUndoneOperation(i);if(!n)return null;const o=this.originalOperations.get(t),r=this._relations.get(o);return r&&r.get(n)||null}_setRelation(t,e,i){const n=this.originalOperations.get(t),o=this.originalOperations.get(e);let r=this._relations.get(n);r||(r=new Map,this._relations.set(n,r)),r.set(o,i)}}function nh(t,e){for(const i of t)i.baseVersion=e++}function oh(t,e){for(let i=0;i<e;i++)t.push(new Kd(0))}function rh(t,e,i){const n=t.nodes.getNode(0).getAttribute(e);if(n==i)return null;const o=new $s(t.position,t.position.getShiftedBy(t.howMany));return new cc(o,e,n,i,0)}function sh(t,e){return null===t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany)}function ah(t,e){const i=[];for(let n=0;n<t.length;n++){const o=t[n],r=new dc(o.start,o.end.offset-o.start.offset,e,0);i.push(r);for(let e=n+1;e<t.length;e++)t[e]=t[e]._getTransformedByMove(r.sourcePosition,r.targetPosition,r.howMany)[0];e=e._getTransformedByMove(r.sourcePosition,r.targetPosition,r.howMany)}return i}Zd(cc,cc,(t,e,i)=>{if(t.key===e.key){const n=t.range.getDifference(e.range).map(e=>new cc(e,t.key,t.oldValue,t.newValue,0)),o=t.range.getIntersection(e.range);return o&&i.aIsStrong&&n.push(new cc(o,e.key,e.newValue,t.newValue,0)),0==n.length?[new Kd(0)]:n}return[t]}),Zd(cc,hc,(t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const i=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes).map(e=>new cc(e,t.key,t.oldValue,t.newValue,t.baseVersion));if(e.shouldReceiveAttributes){const n=rh(e,t.key,t.oldValue);n&&i.unshift(n)}return i}return t.range=t.range._getTransformedByInsertion(e.position,e.howMany,!1)[0],[t]}),Zd(cc,mc,(t,e)=>{const i=[];t.range.start.hasSameParentAs(e.deletionPosition)&&(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition))&&i.push($s._createFromPositionAndShift(e.graveyardPosition,1));const n=t.range._getTransformedByMergeOperation(e);return n.isCollapsed||i.push(n),i.map(e=>new cc(e,t.key,t.oldValue,t.newValue,t.baseVersion))}),Zd(cc,dc,(t,e)=>{return function(t,e){const i=$s._createFromPositionAndShift(e.sourcePosition,e.howMany);let n=null,o=[];i.containsRange(t,!0)?n=t:t.start.hasSameParentAs(i.start)?(o=t.getDifference(i),n=t.getIntersection(i)):o=[t];const r=[];for(let t of o){t=t._getTransformedByDeletion(e.sourcePosition,e.howMany);const i=e.getMovedRangeStart(),n=t.start.hasSameParentAs(i);t=t._getTransformedByInsertion(i,e.howMany,n),r.push(...t)}n&&r.push(n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,!1)[0]);return r}(t.range,e).map(e=>new cc(e,t.key,t.oldValue,t.newValue,t.baseVersion))}),Zd(cc,pc,(t,e)=>{if(t.range.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.range.end.offset++,[t];if(t.range.start.hasSameParentAs(e.splitPosition)&&t.range.containsPosition(e.splitPosition)){const i=t.clone();return i.range=new $s(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition)),t.range.end=e.splitPosition.clone(),t.range.end.stickiness=\"toPrevious\",[t,i]}return t.range=t.range._getTransformedBySplitOperation(e),[t]}),Zd(hc,cc,(t,e)=>{const i=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const n=rh(t,e.key,e.newValue);n&&i.push(n)}return i}),Zd(hc,hc,(t,e,i)=>t.position.isEqual(e.position)&&i.aIsStrong?[t]:(t.position=t.position._getTransformedByInsertOperation(e),[t])),Zd(hc,dc,(t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t])),Zd(hc,pc,(t,e)=>(t.position=t.position._getTransformedBySplitOperation(e),[t])),Zd(hc,mc,(t,e)=>(t.position=t.position._getTransformedByMergeOperation(e),[t])),Zd(uc,hc,(t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]),t.newRange&&(t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]),[t])),Zd(uc,uc,(t,e,i)=>{if(t.name==e.name){if(!i.aIsStrong)return[new Kd(0)];t.oldRange=e.newRange?e.newRange.clone():null}return[t]}),Zd(uc,mc,(t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByMergeOperation(e)),t.newRange&&(t.newRange=t.newRange._getTransformedByMergeOperation(e)),[t])),Zd(uc,dc,(t,e,i)=>{if(t.oldRange&&(t.oldRange=$s._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))),t.newRange){if(i.abRelation){const n=$s._createFromRanges(t.newRange._getTransformedByMoveOperation(e));if(\"left\"==i.abRelation.side&&e.targetPosition.isEqual(t.newRange.start))return t.newRange.start.path=i.abRelation.path,t.newRange.end=n.end,[t];if(\"right\"==i.abRelation.side&&e.targetPosition.isEqual(t.newRange.end))return t.newRange.start=n.start,t.newRange.end.path=i.abRelation.path,[t]}t.newRange=$s._createFromRanges(t.newRange._getTransformedByMoveOperation(e))}return[t]}),Zd(uc,pc,(t,e,i)=>{if(t.oldRange&&(t.oldRange=t.oldRange._getTransformedBySplitOperation(e)),t.newRange){if(i.abRelation){const n=t.newRange._getTransformedBySplitOperation(e);return t.newRange.start.isEqual(e.splitPosition)&&i.abRelation.wasStartBeforeMergedElement?t.newRange.start=Ys._createAt(e.insertionPosition):t.newRange.start.isEqual(e.splitPosition)&&!i.abRelation.wasInLeftElement&&(t.newRange.start=Ys._createAt(e.moveTargetPosition)),t.newRange.end.isEqual(e.splitPosition)&&i.abRelation.wasInRightElement?t.newRange.end=Ys._createAt(e.moveTargetPosition):t.newRange.end.isEqual(e.splitPosition)&&i.abRelation.wasEndBeforeMergedElement?t.newRange.end=Ys._createAt(e.insertionPosition):t.newRange.end=n.end,[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]}),Zd(mc,hc,(t,e)=>(t.sourcePosition.hasSameParentAs(e.position)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e),t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e),[t])),Zd(mc,mc,(t,e,i)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition)){if(i.bWasUndone){const i=e.graveyardPosition.path.slice();return i.push(0),t.sourcePosition=new Ys(e.graveyardPosition.root,i),t.howMany=0,[t]}return[new Kd(0)]}if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!i.bWasUndone&&\"splitAtSource\"!=i.abRelation){const n=\"$graveyard\"==t.targetPosition.root.rootName,o=\"$graveyard\"==e.targetPosition.root.rootName;if(o&&!n||!(n&&!o)&&i.aIsStrong){const i=e.targetPosition._getTransformedByMergeOperation(e),n=t.targetPosition._getTransformedByMergeOperation(e);return[new dc(i,t.howMany,n,0)]}return[new Kd(0)]}return t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMergeOperation(e),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),t.graveyardPosition.isEqual(e.graveyardPosition)&&i.aIsStrong||(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]}),Zd(mc,dc,(t,e,i)=>{const n=$s._createFromPositionAndShift(e.sourcePosition,e.howMany);return\"remove\"==e.type&&!i.bWasUndone&&!i.forceWeakRemove&&t.deletionPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.sourcePosition)?[new Kd(0)]:(t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition.hasSameParentAs(e.sourcePosition)&&(t.howMany-=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMoveOperation(e),t.targetPosition=t.targetPosition._getTransformedByMoveOperation(e),t.graveyardPosition.isEqual(e.targetPosition)||(t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)),[t])}),Zd(mc,pc,(t,e,i)=>{if(e.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1),t.deletionPosition.isEqual(e.graveyardPosition)&&(t.howMany=e.howMany)),t.targetPosition.isEqual(e.splitPosition)){const n=0!=e.howMany,o=e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition);if(n||o||\"mergeTargetNotMoved\"==i.abRelation)return t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),[t]}if(t.sourcePosition.isEqual(e.splitPosition)){if(\"mergeSourceNotMoved\"==i.abRelation)return t.howMany=0,t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t];if(\"mergeSameElement\"==i.abRelation||t.sourcePosition.offset>0)return t.sourcePosition=e.moveTargetPosition.clone(),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}return t.sourcePosition.hasSameParentAs(e.splitPosition)&&(t.howMany=e.splitPosition.offset),t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}),Zd(dc,hc,(t,e)=>{const i=$s._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByInsertOperation(e,!1)[0];return t.sourcePosition=i.start,t.howMany=i.end.offset-i.start.offset,t.targetPosition.isEqual(e.position)||(t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)),[t]}),Zd(dc,dc,(t,e,i)=>{const n=$s._createFromPositionAndShift(t.sourcePosition,t.howMany),o=$s._createFromPositionAndShift(e.sourcePosition,e.howMany);let r,s=i.aIsStrong,a=!i.aIsStrong;if(\"insertBefore\"==i.abRelation||\"insertAfter\"==i.baRelation?a=!0:\"insertAfter\"!=i.abRelation&&\"insertBefore\"!=i.baRelation||(a=!1),r=t.targetPosition.isEqual(e.targetPosition)&&a?t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany):t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),sh(t,e)&&sh(e,t))return[e.getReversed()];if(n.containsPosition(e.targetPosition)&&n.containsRange(o,!0))return n.start=n.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),n.end=n.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),ah([n],r);if(o.containsPosition(t.targetPosition)&&o.containsRange(n,!0))return n.start=n.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),n.end=n.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),ah([n],r);const c=ln(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if(\"prefix\"==c||\"extension\"==c)return n.start=n.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),n.end=n.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),ah([n],r);\"remove\"!=t.type||\"remove\"==e.type||i.aWasUndone||i.forceWeakRemove?\"remove\"==t.type||\"remove\"!=e.type||i.bWasUndone||i.forceWeakRemove||(s=!1):s=!0;const l=[],d=n.getDifference(o);for(const t of d){t.start=t.start._getTransformedByDeletion(e.sourcePosition,e.howMany),t.end=t.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const i=\"same\"==ln(t.start.getParentPath(),e.getMovedRangeStart().getParentPath()),n=t._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,i);l.push(...n)}const h=n.getIntersection(o);return null!==h&&s&&(h.start=h.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),h.end=h.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),0===l.length?l.push(h):1==l.length?o.start.isBefore(n.start)||o.start.isEqual(n.start)?l.unshift(h):l.push(h):l.splice(1,0,h)),0===l.length?[new Kd(t.baseVersion)]:ah(l,r)}),Zd(dc,pc,(t,e,i)=>{let n=t.targetPosition.clone();t.targetPosition.isEqual(e.insertionPosition)&&e.graveyardPosition&&\"moveTargetAfter\"!=i.abRelation||(n=t.targetPosition._getTransformedBySplitOperation(e));const o=$s._createFromPositionAndShift(t.sourcePosition,t.howMany);if(o.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.howMany++,t.targetPosition=n,[t];if(o.start.hasSameParentAs(e.splitPosition)&&o.containsPosition(e.splitPosition)){let t=new $s(e.splitPosition,o.end);return t=t._getTransformedBySplitOperation(e),ah([new $s(o.start,e.splitPosition),t],n)}t.targetPosition.isEqual(e.splitPosition)&&\"insertAtSource\"==i.abRelation&&(n=e.moveTargetPosition),t.targetPosition.isEqual(e.insertionPosition)&&\"insertBetween\"==i.abRelation&&(n=t.targetPosition);const r=[o._getTransformedBySplitOperation(e)];if(e.graveyardPosition){const n=o.start.isEqual(e.graveyardPosition)||o.containsPosition(e.graveyardPosition);t.howMany>1&&n&&!i.aWasUndone&&r.push($s._createFromPositionAndShift(e.insertionPosition,1))}return ah(r,n)}),Zd(dc,mc,(t,e,i)=>{const n=$s._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.sourcePosition))if(\"remove\"!=t.type||i.forceWeakRemove){if(1==t.howMany)return i.bWasUndone?(t.sourcePosition=e.graveyardPosition.clone(),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]):[new Kd(0)]}else if(!i.aWasUndone){const i=[];let n=e.graveyardPosition.clone(),o=e.targetPosition._getTransformedByMergeOperation(e);t.howMany>1&&(i.push(new dc(t.sourcePosition,t.howMany-1,t.targetPosition,0)),n=n._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1),o=o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1));const r=e.deletionPosition._getCombined(t.sourcePosition,t.targetPosition),s=new dc(n,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);const c=new Ys(s.targetPosition.root,a);o=o._getTransformedByMove(n,r,1);const l=new dc(o,e.howMany,c,0);return i.push(s),i.push(l),i}const o=$s._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByMergeOperation(e);return t.sourcePosition=o.start,t.howMany=o.end.offset-o.start.offset,t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]}),Zd(fc,hc,(t,e)=>(t.position=t.position._getTransformedByInsertOperation(e),[t])),Zd(fc,mc,(t,e)=>t.position.isEqual(e.deletionPosition)?(t.position=e.graveyardPosition.clone(),t.position.stickiness=\"toNext\",[t]):(t.position=t.position._getTransformedByMergeOperation(e),[t])),Zd(fc,dc,(t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t])),Zd(fc,fc,(t,e,i)=>{if(t.position.isEqual(e.position)){if(!i.aIsStrong)return[new Kd(0)];t.oldName=e.newName}return[t]}),Zd(fc,pc,(t,e)=>{if(\"same\"==ln(t.position.path,e.splitPosition.getParentPath())&&!e.graveyardPosition){return[t,new fc(t.position.getShiftedBy(1),t.oldName,t.newName,0)]}return t.position=t.position._getTransformedBySplitOperation(e),[t]}),Zd(gc,gc,(t,e,i)=>{if(t.root===e.root&&t.key===e.key){if(!i.aIsStrong||t.newValue===e.newValue)return[new Kd(0)];t.oldValue=e.newValue}return[t]}),Zd(pc,hc,(t,e)=>(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset<e.position.offset&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByInsertOperation(e),t.insertionPosition=pc.getInsertionPosition(t.splitPosition),[t])),Zd(pc,mc,(t,e,i)=>{if(!t.graveyardPosition&&!i.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const i=e.graveyardPosition.path.slice();i.push(0);const n=new Ys(e.graveyardPosition.root,i),o=pc.getInsertionPosition(new Ys(e.graveyardPosition.root,i)),r=new pc(n,0,null,0);return r.insertionPosition=o,t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=pc.getInsertionPosition(t.splitPosition),t.graveyardPosition=r.insertionPosition.clone(),t.graveyardPosition.stickiness=\"toNext\",[r,t]}return t.splitPosition.hasSameParentAs(e.deletionPosition)&&!t.splitPosition.isAfter(e.deletionPosition)&&t.howMany--,t.splitPosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=pc.getInsertionPosition(t.splitPosition),t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]}),Zd(pc,dc,(t,e,i)=>{const n=$s._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const o=n.start.isEqual(t.graveyardPosition)||n.containsPosition(t.graveyardPosition);if(!i.bWasUndone&&o){const i=t.splitPosition._getTransformedByMoveOperation(e),n=t.graveyardPosition._getTransformedByMoveOperation(e),o=n.path.slice();o.push(0);const r=new Ys(n.root,o);return[new dc(i,t.howMany,r,0)]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.splitPosition)){const i=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);return t.howMany-=i,t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset&&(t.howMany+=e.howMany),t.splitPosition=e.sourcePosition.clone(),t.insertionPosition=pc.getInsertionPosition(t.splitPosition),[t]}return!t.splitPosition.isEqual(e.targetPosition)||\"insertAtSource\"!=i.baRelation&&\"splitBefore\"!=i.abRelation?(e.sourcePosition.isEqual(e.targetPosition)||(t.splitPosition.hasSameParentAs(e.sourcePosition)&&t.splitPosition.offset<=e.sourcePosition.offset&&(t.howMany-=e.howMany),t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset&&(t.howMany+=e.howMany)),t.splitPosition.stickiness=\"toNone\",t.splitPosition=t.splitPosition._getTransformedByMoveOperation(e),t.splitPosition.stickiness=\"toNext\",t.graveyardPosition?t.insertionPosition=t.insertionPosition._getTransformedByMoveOperation(e):t.insertionPosition=pc.getInsertionPosition(t.splitPosition),[t]):(t.howMany+=e.howMany,t.splitPosition=t.splitPosition._getTransformedByDeletion(e.sourcePosition,e.howMany),t.insertionPosition=pc.getInsertionPosition(t.splitPosition),[t])}),Zd(pc,pc,(t,e,i)=>{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition)return[new Kd(0)];if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition))return[new Kd(0)];if(\"splitBefore\"==i.abRelation)return t.howMany=0,t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e),[t]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const n=\"$graveyard\"==t.splitPosition.root.rootName,o=\"$graveyard\"==e.splitPosition.root.rootName;if(o&&!n||!(n&&!o)&&i.aIsStrong){const i=[];return e.howMany&&i.push(new dc(e.moveTargetPosition,e.howMany,e.splitPosition,0)),t.howMany&&i.push(new dc(t.splitPosition,t.howMany,t.moveTargetPosition,0)),i}return[new Kd(0)]}if(t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)),t.splitPosition.isEqual(e.insertionPosition)&&\"splitBefore\"==i.abRelation)return t.howMany++,[t];if(e.splitPosition.isEqual(t.insertionPosition)&&\"splitBefore\"==i.baRelation){const i=e.insertionPosition.path.slice();i.push(0);const n=new Ys(e.insertionPosition.root,i);return[t,new dc(t.insertionPosition,1,n,0)]}return t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset<e.splitPosition.offset&&(t.howMany-=e.howMany),t.splitPosition=t.splitPosition._getTransformedBySplitOperation(e),t.insertionPosition=pc.getInsertionPosition(t.splitPosition),[t]});class ch extends Td{constructor(t){super(t),this._stack=[],this._createdBatches=new WeakSet,this.refresh()}refresh(){this.isEnabled=this._stack.length>0}addBatch(t){const e=this.editor.model.document.selection,i={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:i}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,e,i){const n=this.editor.model,o=n.document,r=[];for(const e of t){const t=lh(e,i).find(t=>t.start.root!=o.graveyard);t&&r.push(t)}r.length&&n.change(t=>{t.setSelection(r,{backward:e})})}_undo(t,e){const i=this.editor.model,n=i.document;this._createdBatches.add(e);const o=t.operations.slice().filter(t=>t.isDocumentOperation);o.reverse();for(const t of o){const o=t.baseVersion+1,r=Array.from(n.history.getOperations(o)),s=eh([t.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const o of s)e.addOperation(o),i.applyOperation(o),n.history.setOperationAsUndone(t,o)}}}function lh(t,e){const i=t.getTransformedByOperations(e);i.sort((t,e)=>t.start.isBefore(e.start)?-1:1);for(let t=1;t<i.length;t++){const e=i[t-1],n=i[t];e.end.isTouching(n.start)&&(e.end=n.end,i.splice(t,1),t--)}return i}class dh extends ch{execute(t=null){const e=t?this._stack.findIndex(e=>e.batch==t):this._stack.length-1,i=this._stack.splice(e,1)[0],n=this.editor.model.createBatch(\"transparent\");this.editor.model.enqueueChange(n,()=>{this._undo(i.batch,n);const t=this.editor.model.document.history.getOperations(i.batch.baseVersion);this._restoreSelection(i.selection.ranges,i.selection.isBackward,t),this.fire(\"revert\",i.batch,n)}),this.refresh()}}class hh extends ch{execute(){const t=this._stack.pop(),e=this.editor.model.createBatch(\"transparent\");this.editor.model.enqueueChange(e,()=>{const i=t.batch.operations[t.batch.operations.length-1].baseVersion+1,n=this.editor.model.document.history.getOperations(i);this._restoreSelection(t.selection.ranges,t.selection.isBackward,n),this._undo(t.batch,e)}),this.refresh()}}class uh extends kd{static get pluginName(){return\"UndoEditing\"}constructor(t){super(t),this._batchRegistry=new WeakSet}init(){const t=this.editor;this._undoCommand=new dh(t),this._redoCommand=new hh(t),t.commands.add(\"undo\",this._undoCommand),t.commands.add(\"redo\",this._redoCommand),this.listenTo(t.model,\"applyOperation\",(t,e)=>{const i=e[0];if(!i.isDocumentOperation)return;const n=i.batch,o=this._redoCommand._createdBatches.has(n),r=this._undoCommand._createdBatches.has(n);this._batchRegistry.has(n)||\"transparent\"==n.type&&!o&&!r||(o?this._undoCommand.addBatch(n):r||(this._undoCommand.addBatch(n),this._redoCommand.clearStack()),this._batchRegistry.add(n))},{priority:\"highest\"}),this.listenTo(this._undoCommand,\"revert\",(t,e,i)=>{this._redoCommand.addBatch(i)}),t.keystrokes.set(\"CTRL+Z\",\"undo\"),t.keystrokes.set(\"CTRL+Y\",\"redo\"),t.keystrokes.set(\"CTRL+SHIFT+Z\",\"redo\")}}var fh='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.042 9.367l2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z\"/></svg>',gh='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M14.958 9.367l-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z\"/></svg>';class mh extends kd{init(){const t=this.editor,e=t.locale,i=t.t,n=\"ltr\"==e.uiLanguageDirection?fh:gh,o=\"ltr\"==e.uiLanguageDirection?gh:fh;this._addButton(\"undo\",i(\"bg\"),\"CTRL+Z\",n),this._addButton(\"redo\",i(\"bh\"),\"CTRL+Y\",o)}_addButton(t,e,i,n){const o=this.editor;o.ui.componentFactory.add(t,r=>{const s=o.commands.get(t),a=new nd(r);return a.set({label:e,icon:n,keystroke:i,tooltip:!0}),a.bind(\"isEnabled\").to(s,\"isEnabled\"),this.listenTo(a,\"execute\",()=>o.execute(t)),a})}}class ph extends kd{static get requires(){return[uh,mh]}static get pluginName(){return\"Undo\"}}class bh extends kd{static get pluginName(){return\"PendingActions\"}init(){this.set(\"hasAny\",!1),this._actions=new oo({idProperty:\"_id\"}),this._actions.delegate(\"add\",\"remove\").to(this)}add(t){if(\"string\"!=typeof t)throw new $i.b(\"pendingactions-add-invalid-message: The message must be a string.\",this);const e=Object.create(Fn);return e.set(\"message\",t),this._actions.add(e),this.hasAny=!0,e}remove(t){this._actions.remove(t),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}class wh{constructor(){const t=new window.FileReader;this._reader=t,this._data=void 0,this.set(\"loaded\",0),t.onprogress=(t=>{this.loaded=t.loaded})}get error(){return this._reader.error}get data(){return this._data}read(t){const e=this._reader;return this.total=t.size,new Promise((i,n)=>{e.onload=(()=>{const t=e.result;this._data=t,i(t)}),e.onerror=(()=>{n(\"error\")}),e.onabort=(()=>{n(\"aborted\")}),this._reader.readAsDataURL(t)})}abort(){this._reader.abort()}}cn(wh,Fn);class _h extends kd{static get pluginName(){return\"FileRepository\"}static get requires(){return[bh]}init(){this.loaders=new oo,this.loaders.on(\"add\",()=>this._updatePendingAction()),this.loaders.on(\"remove\",()=>this._updatePendingAction()),this._loadersMap=new Map,this._pendingAction=null,this.set(\"uploaded\",0),this.set(\"uploadTotal\",null),this.bind(\"uploadedPercent\").to(this,\"uploaded\",this,\"uploadTotal\",(t,e)=>e?t/e*100:0)}getLoader(t){return this._loadersMap.get(t)||null}createLoader(t){if(!this.createUploadAdapter)return console.warn(Object($i.a)(\"filerepository-no-upload-adapter: Upload adapter is not defined.\")),null;const e=new kh(Promise.resolve(t),this.createUploadAdapter);return this.loaders.add(e),this._loadersMap.set(t,e),t instanceof Promise&&e.file.then(t=>{this._loadersMap.set(t,e)}).catch(()=>{}),e.on(\"change:uploaded\",()=>{let t=0;for(const e of this.loaders)t+=e.uploaded;this.uploaded=t}),e.on(\"change:uploadTotal\",()=>{let t=0;for(const e of this.loaders)e.uploadTotal&&(t+=e.uploadTotal);this.uploadTotal=t}),e}destroyLoader(t){const e=t instanceof kh?t:this.getLoader(t);e._destroy(),this.loaders.remove(e),this._loadersMap.forEach((t,i)=>{t===e&&this._loadersMap.delete(i)})}_updatePendingAction(){const t=this.editor.plugins.get(bh);if(this.loaders.length){if(!this._pendingAction){const e=this.editor.t,i=t=>`${e(\"d\")} ${parseInt(t)}%.`;this._pendingAction=t.add(i(this.uploadedPercent)),this._pendingAction.bind(\"message\").to(this,\"uploadedPercent\",i)}}else t.remove(this._pendingAction),this._pendingAction=null}}cn(_h,Fn);class kh{constructor(t,e){this.id=Ki(),this._filePromiseWrapper=this._createFilePromiseWrapper(t),this._adapter=e(this),this._reader=new wh,this.set(\"status\",\"idle\"),this.set(\"uploaded\",0),this.set(\"uploadTotal\",null),this.bind(\"uploadedPercent\").to(this,\"uploaded\",this,\"uploadTotal\",(t,e)=>e?t/e*100:0),this.set(\"uploadResponse\",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(t=>this._filePromiseWrapper?t:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if(\"idle\"!=this.status)throw new $i.b(\"filerepository-read-wrong-status: You cannot call read if the status is different than idle.\",this);return this.status=\"reading\",this.file.then(t=>this._reader.read(t)).then(t=>{if(\"reading\"!==this.status)throw this.status;return this.status=\"idle\",t}).catch(t=>{if(\"aborted\"===t)throw this.status=\"aborted\",\"aborted\";throw this.status=\"error\",this._reader.error?this._reader.error:t})}upload(){if(\"idle\"!=this.status)throw new $i.b(\"filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.\",this);return this.status=\"uploading\",this.file.then(()=>this._adapter.upload()).then(t=>(this.uploadResponse=t,this.status=\"idle\",t)).catch(t=>{if(\"aborted\"===this.status)throw\"aborted\";throw this.status=\"error\",t})}abort(){const t=this.status;this.status=\"aborted\",this._filePromiseWrapper.isFulfilled?\"reading\"==t?this._reader.abort():\"uploading\"==t&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch(()=>{}),this._filePromiseWrapper.rejecter(\"aborted\")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(t){const e={};return e.promise=new Promise((i,n)=>{e.rejecter=n,e.isFulfilled=!1,t.then(t=>{e.isFulfilled=!0,i(t)}).catch(t=>{e.isFulfilled=!0,n(t)})}),e}}cn(kh,Fn);const vh=\"ckCsrfToken\",yh=40,xh=\"abcdefghijklmnopqrstuvwxyz0123456789\";function Ah(){let t=function(t){t=t.toLowerCase();const e=document.cookie.split(\";\");for(const i of e){const e=i.split(\"=\"),n=decodeURIComponent(e[0].trim().toLowerCase());if(n===t)return decodeURIComponent(e[1])}return null}(vh);return t&&t.length==yh||(t=function(t){let e=\"\";const i=new Uint8Array(t);window.crypto.getRandomValues(i);for(let t=0;t<i.length;t++){const n=xh.charAt(i[t]%xh.length);e+=Math.random()>.5?n.toUpperCase():n}return e}(yh),function(t,e){document.cookie=encodeURIComponent(t)+\"=\"+encodeURIComponent(e)+\";path=/\"}(vh,t)),t}class Th{constructor(t,e,i){this.loader=t,this.url=e,this.t=i}upload(){return this.loader.file.then(t=>new Promise((e,i)=>{this._initRequest(),this._initListeners(e,i,t),this._sendRequest(t)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const t=this.xhr=new XMLHttpRequest;t.open(\"POST\",this.url,!0),t.responseType=\"json\"}_initListeners(t,e,i){const n=this.xhr,o=this.loader,r=(0,this.t)(\"a\")+` ${i.name}.`;n.addEventListener(\"error\",()=>e(r)),n.addEventListener(\"abort\",()=>e()),n.addEventListener(\"load\",()=>{const i=n.response;if(!i||!i.uploaded)return e(i&&i.error&&i.error.message?i.error.message:r);t({default:i.url})}),n.upload&&n.upload.addEventListener(\"progress\",t=>{t.lengthComputable&&(o.uploadTotal=t.total,o.uploaded=t.loaded)})}_sendRequest(t){const e=new FormData;e.append(\"upload\",t),e.append(\"ckCsrfToken\",Ah()),this.xhr.send(e)}}class Ch{static get pluginName(){return\"BlockAutoformatEditing\"}constructor(t,e,i){let n,o=null;\"function\"==typeof i?n=i:(o=t.commands.get(i),n=(()=>{t.execute(i)})),t.model.document.on(\"change\",(i,r)=>{if(o&&!o.isEnabled)return;if(\"transparent\"==r.type)return;const s=Array.from(t.model.document.differ.getChanges()),a=s[0];if(1!=s.length||\"insert\"!==a.type||\"$text\"!=a.name||1!=a.length)return;const c=a.position.textNode||a.position.nodeAfter;if(!c.parent.is(\"paragraph\"))return;const l=e.exec(c.data);l&&t.model.enqueueChange(t=>{const e=t.createPositionAt(c.parent,0),i=t.createPositionAt(c.parent,l[0].length),o=new oa(e,i);!1!==n({match:l})&&t.remove(o),o.detach()})})}}class Ph{static get pluginName(){return\"InlineAutoformatEditing\"}constructor(t,e,i){let n,o,r,s;e instanceof RegExp?n=e:r=e,\"string\"==typeof i?o=i:s=i,r=r||(t=>{let e;const i=[],o=[];for(;null!==(e=n.exec(t))&&!(e&&e.length<4);){let{index:t,1:n,2:r,3:s}=e;const a=n+r+s,c=[t+=e[0].length-a.length,t+n.length],l=[t+n.length+r.length,t+n.length+r.length+s.length];i.push(c),i.push(l),o.push([t+n.length,t+n.length+r.length])}return{remove:i,format:o}}),s=s||((e,i)=>{const n=t.model.schema.getValidRanges(i,o);for(const t of n)e.setAttribute(o,!0,t);e.removeSelectionAttribute(o)}),t.model.document.on(\"change\",(e,i)=>{if(\"transparent\"==i.type)return;const n=t.model,o=n.document.selection;if(!o.isCollapsed)return;const a=Array.from(n.document.differ.getChanges()),c=a[0];if(1!=a.length||\"insert\"!==c.type||\"$text\"!=c.name||1!=c.length)return;const l=o.focus,d=l.parent,{text:h,range:u}=function(t,e){let i=t.start;return{text:Array.from(t.getItems()).reduce((t,n)=>n.is(\"text\")||n.is(\"textProxy\")?t+n.data:(i=e.createPositionAfter(n),\"\"),\"\"),range:e.createRange(i,t.end)}}(n.createRange(n.createPositionAt(d,0),l),n),f=r(h),g=Sh(u.start,f.format,n),m=Sh(u.start,f.remove,n);g.length&&m.length&&n.enqueueChange(t=>{if(!1!==s(t,g))for(const e of m.reverse())t.remove(e)})})}}function Sh(t,e,i){return e.filter(t=>void 0!==t[0]&&void 0!==t[1]).map(e=>i.createRange(t.getShiftedBy(e[0]),t.getShiftedBy(e[1])))}function Mh(t,e){return(i,n)=>{if(!t.commands.get(e).isEnabled)return!1;const o=t.model.schema.getValidRanges(n,e);for(const t of o)i.setAttribute(e,!0,t);i.removeSelectionAttribute(e)}}class Eh extends Td{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,i=e.document.selection,n=void 0===t.forceValue?!this.value:t.forceValue;e.change(t=>{if(i.isCollapsed)n?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const o=e.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const e of o)n?t.setAttribute(this.attributeKey,n,e):t.removeAttribute(this.attributeKey,e)}})}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,i=t.document.selection;if(i.isCollapsed)return i.hasAttribute(this.attributeKey);for(const t of i.getRanges())for(const i of t.getItems())if(e.checkAttribute(i,this.attributeKey))return i.hasAttribute(this.attributeKey);return!1}}const Ih=\"bold\";class Nh extends kd{static get pluginName(){return\"BoldEditing\"}init(){const t=this.editor;t.model.schema.extend(\"$text\",{allowAttributes:Ih}),t.model.schema.setAttributeProperties(Ih,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Ih,view:\"strong\",upcastAlso:[\"b\",t=>{const e=t.getStyle(\"font-weight\");return e?\"bold\"==e||Number(e)>=600?{name:!0,styles:[\"font-weight\"]}:void 0:null}]}),t.commands.add(Ih,new Eh(t,Ih)),t.keystrokes.set(\"CTRL+B\",Ih)}}var Oh='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z\"/></svg>';const Rh=\"bold\";class Dh extends kd{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(Rh,i=>{const n=t.commands.get(Rh),o=new nd(i);return o.set({label:e(\"f\"),icon:Oh,keystroke:\"CTRL+B\",tooltip:!0,isToggleable:!0}),o.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\"),this.listenTo(o,\"execute\",()=>t.execute(Rh)),o})}}const Lh=\"italic\";class jh extends kd{static get pluginName(){return\"ItalicEditing\"}init(){const t=this.editor;t.model.schema.extend(\"$text\",{allowAttributes:Lh}),t.model.schema.setAttributeProperties(Lh,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Lh,view:\"i\",upcastAlso:[\"em\",{styles:{\"font-style\":\"italic\"}}]}),t.commands.add(Lh,new Eh(t,Lh)),t.keystrokes.set(\"CTRL+I\",Lh)}}var Vh='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.586 14.633l.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z\"/></svg>';const zh=\"italic\";class Bh extends kd{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(zh,i=>{const n=t.commands.get(zh),o=new nd(i);return o.set({label:e(\"i\"),icon:Vh,keystroke:\"CTRL+I\",tooltip:!0,isToggleable:!0}),o.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\"),this.listenTo(o,\"execute\",()=>t.execute(zh)),o})}}function Fh(t){const e=t.next();return e.done?null:e.value}class Uh extends Td{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.schema,n=e.document.selection,o=Array.from(n.getSelectedBlocks()),r=void 0===t.forceValue?!this.value:t.forceValue;e.change(t=>{if(r){const e=o.filter(t=>Hh(t)||qh(i,t));this._applyQuote(t,e)}else this._removeQuote(t,o.filter(Hh))})}_getValue(){const t=Fh(this.editor.model.document.selection.getSelectedBlocks());return!(!t||!Hh(t))}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,i=Fh(t.getSelectedBlocks());return!!i&&qh(e,i)}_removeQuote(t,e){Wh(t,e).reverse().forEach(e=>{if(e.start.isAtStart&&e.end.isAtEnd)return void t.unwrap(e.start.parent);if(e.start.isAtStart){const i=t.createPositionBefore(e.start.parent);return void t.move(e,i)}e.end.isAtEnd||t.split(e.end);const i=t.createPositionAfter(e.end.parent);t.move(e,i)})}_applyQuote(t,e){const i=[];Wh(t,e).reverse().forEach(e=>{let n=Hh(e.start);n||(n=t.createElement(\"blockQuote\"),t.wrap(e,n)),i.push(n)}),i.reverse().reduce((e,i)=>e.nextSibling==i?(t.merge(t.createPositionAfter(e)),e):i)}}function Hh(t){return\"blockQuote\"==t.parent.name?t.parent:null}function Wh(t,e){let i,n=0;const o=[];for(;n<e.length;){const r=e[n],s=e[n+1];i||(i=t.createPositionBefore(r)),s&&r.nextSibling==s||(o.push(t.createRange(i,t.createPositionAfter(r))),i=null),n++}return o}function qh(t,e){const i=t.checkChild(e.parent,\"blockQuote\"),n=t.checkChild([\"$root\",\"blockQuote\"],e);return i&&n}class Yh extends kd{static get pluginName(){return\"BlockQuoteEditing\"}init(){const t=this.editor,e=t.model.schema;t.commands.add(\"blockQuote\",new Uh(t)),e.register(\"blockQuote\",{allowWhere:\"$block\",allowContentOf:\"$root\"}),e.addChildCheck((t,e)=>{if(t.endsWith(\"blockQuote\")&&\"blockQuote\"==e.name)return!1}),t.conversion.elementToElement({model:\"blockQuote\",view:\"blockquote\"}),t.model.document.registerPostFixer(i=>{const n=t.model.document.differ.getChanges();for(const t of n)if(\"insert\"==t.type){const n=t.position.nodeAfter;if(!n)continue;if(n.is(\"blockQuote\")&&n.isEmpty)return i.remove(n),!0;if(n.is(\"blockQuote\")&&!e.checkChild(t.position,n))return i.unwrap(n),!0;if(n.is(\"element\")){const t=i.createRangeIn(n);for(const n of t.getItems())if(n.is(\"blockQuote\")&&!e.checkChild(i.createPositionBefore(n),n))return i.unwrap(n),!0}}else if(\"remove\"==t.type){const e=t.position.parent;if(e.is(\"blockQuote\")&&e.isEmpty)return i.remove(e),!0}return!1})}afterInit(){const t=this.editor.commands.get(\"blockQuote\");this.listenTo(this.editor.editing.view.document,\"enter\",(e,i)=>{const n=this.editor.model.document,o=n.selection.getLastPosition().parent;n.selection.isCollapsed&&o.isEmpty&&t.value&&(this.editor.execute(\"blockQuote\"),this.editor.editing.view.scrollToTheSelection(),i.preventDefault(),e.stop())})}}var $h='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574z\"/></svg>';i(44);class Gh extends kd{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(\"blockQuote\",i=>{const n=t.commands.get(\"blockQuote\"),o=new nd(i);return o.set({label:e(\"e\"),icon:$h,tooltip:!0,isToggleable:!0}),o.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\"),this.listenTo(o,\"execute\",()=>t.execute(\"blockQuote\")),o})}}class Qh extends Td{refresh(){const t=this.editor.model,e=Fh(t.document.selection.getSelectedBlocks());this.value=!!e&&e.is(\"paragraph\"),this.isEnabled=!!e&&Kh(e,t.schema)}execute(t={}){const e=this.editor.model,i=e.document;e.change(n=>{const o=(t.selection||i.selection).getSelectedBlocks();for(const t of o)!t.is(\"paragraph\")&&Kh(t,e.schema)&&n.rename(t,\"paragraph\")})}}function Kh(t,e){return e.checkChild(t.parent,\"paragraph\")&&!e.isObject(t)}class Jh extends kd{static get pluginName(){return\"Paragraph\"}init(){const t=this.editor,e=t.model,i=t.data;t.commands.add(\"paragraph\",new Qh(t)),e.schema.register(\"paragraph\",{inheritAllFrom:\"$block\"}),t.conversion.elementToElement({model:\"paragraph\",view:\"p\"}),t.conversion.for(\"upcast\").elementToElement({model:(t,e)=>Jh.paragraphLikeElements.has(t.name)?t.isEmpty?null:e.createElement(\"paragraph\"):null,converterPriority:\"low\"}),i.upcastDispatcher.on(\"element\",(t,e,i)=>{i.consumable.test(e.viewItem,{name:e.viewItem.name})&&Xh(e.viewItem,e.modelCursor,i.schema)&&Object.assign(e,Zh(e.viewItem,e.modelCursor,i))},{priority:\"low\"}),i.upcastDispatcher.on(\"text\",(t,e,i)=>{e.modelRange||Xh(e.viewItem,e.modelCursor,i.schema)&&Object.assign(e,Zh(e.viewItem,e.modelCursor,i))},{priority:\"lowest\"}),e.document.registerPostFixer(t=>this._autoparagraphEmptyRoots(t)),t.data.on(\"ready\",()=>{e.enqueueChange(\"transparent\",t=>this._autoparagraphEmptyRoots(t))},{priority:\"lowest\"})}_autoparagraphEmptyRoots(t){const e=this.editor.model;for(const i of e.document.getRootNames()){const n=e.document.getRoot(i);if(n.isEmpty&&\"$graveyard\"!=n.rootName&&e.schema.checkChild(n,\"paragraph\"))return t.insertElement(\"paragraph\",n),!0}}}function Zh(t,e,i){const n=i.writer.createElement(\"paragraph\");return i.writer.insert(n,e),i.convertItem(t,i.writer.createPositionAt(n,0))}function Xh(t,e,i){const n=i.createContext(e);return!!i.checkChild(n,\"paragraph\")&&!!i.checkChild(n.push(\"paragraph\"),t)}Jh.paragraphLikeElements=new Set([\"blockquote\",\"dd\",\"div\",\"dt\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"li\",\"p\",\"td\"]);class tu extends Td{constructor(t,e){super(t),this.modelElements=e}refresh(){const t=Fh(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name,this.isEnabled=!!t&&this.modelElements.some(e=>eu(t,e,this.editor.model.schema))}execute(t){const e=this.editor.model,i=e.document,n=t.value;e.change(t=>{const o=Array.from(i.selection.getSelectedBlocks()).filter(t=>eu(t,n,e.schema));for(const e of o)e.is(n)||t.rename(e,n)})}}function eu(t,e,i){return i.checkChild(t.parent,e)&&!i.isObject(t)}const iu=\"paragraph\";class nu extends kd{static get pluginName(){return\"HeadingEditing\"}constructor(t){super(t),t.config.define(\"heading\",{options:[{model:\"paragraph\",title:\"Paragraph\",class:\"ck-heading_paragraph\"},{model:\"heading1\",view:\"h2\",title:\"Heading 1\",class:\"ck-heading_heading1\"},{model:\"heading2\",view:\"h3\",title:\"Heading 2\",class:\"ck-heading_heading2\"},{model:\"heading3\",view:\"h4\",title:\"Heading 3\",class:\"ck-heading_heading3\"}]})}static get requires(){return[Jh]}init(){const t=this.editor,e=t.config.get(\"heading.options\"),i=[];for(const n of e)n.model!==iu&&(t.model.schema.register(n.model,{inheritAllFrom:\"$block\"}),t.conversion.elementToElement(n),i.push(n.model));this._addDefaultH1Conversion(t),t.commands.add(\"heading\",new tu(t,i))}afterInit(){const t=this.editor,e=t.commands.get(\"enter\"),i=t.config.get(\"heading.options\");e&&this.listenTo(e,\"afterExecute\",(e,n)=>{const o=t.model.document.selection.getFirstPosition().parent;i.some(t=>o.is(t.model))&&!o.is(iu)&&0===o.childCount&&n.writer.rename(o,iu)})}_addDefaultH1Conversion(t){t.conversion.for(\"upcast\").elementToElement({model:\"heading1\",view:\"h1\",converterPriority:Ji.get(\"low\")+1})}}class ou{constructor(t,e){e&&Ln(this,e),t&&this.set(t)}}cn(ou,Fn);i(10);class ru extends kd{init(){const t=this.editor,e=t.t,i=function(t){const e=t.t,i={Paragraph:e(\"bs\"),\"Heading 1\":e(\"bt\"),\"Heading 2\":e(\"bu\"),\"Heading 3\":e(\"bv\"),\"Heading 4\":e(\"bw\"),\"Heading 5\":e(\"bx\"),\"Heading 6\":e(\"by\")};return t.config.get(\"heading.options\").map(t=>{const e=i[t.title];return e&&e!=t.title&&(t.title=e),t})}(t),n=e(\"g\"),o=e(\"h\");t.ui.componentFactory.add(\"heading\",e=>{const r={},s=new oo,a=t.commands.get(\"heading\"),c=t.commands.get(\"paragraph\"),l=[a];for(const t of i){const e={type:\"button\",model:new ou({label:t.title,class:t.class,withText:!0})};\"paragraph\"===t.model?(e.model.bind(\"isOn\").to(c,\"value\"),e.model.set(\"commandName\",\"paragraph\"),l.push(c)):(e.model.bind(\"isOn\").to(a,\"value\",e=>e===t.model),e.model.set({commandName:\"heading\",commandValue:t.model})),s.add(e),r[t.model]=t.title}const d=hd(e);return ud(d,s),d.buttonView.set({isOn:!1,withText:!0,tooltip:o}),d.extendTemplate({attributes:{class:[\"ck-heading-dropdown\"]}}),d.bind(\"isEnabled\").toMany(l,\"isEnabled\",(...t)=>t.some(t=>t)),d.buttonView.bind(\"label\").to(a,\"value\",c,\"value\",(t,e)=>{const i=t||e&&\"paragraph\";return r[i]?r[i]:n}),this.listenTo(d,\"execute\",e=>{t.execute(e.source.commandName,e.source.commandValue?{value:e.source.commandValue}:void 0),t.editing.view.focus()}),d})}}class su extends hr{constructor(t){super(t),this._observedElements=new Set}observe(t,e){this.document.getRoot(e).on(\"change:children\",(e,i)=>{this.view.once(\"render\",()=>this._updateObservedElements(t,i))})}_updateObservedElements(t,e){if(!e.is(\"element\")||e.is(\"attributeElement\"))return;const i=this.view.domConverter.mapViewToDom(e);if(i){for(const t of i.querySelectorAll(\"img\"))this._observedElements.has(t)||(this.listenTo(t,\"load\",(t,e)=>this._fireEvents(e)),this._observedElements.add(t));for(const e of this._observedElements)t.contains(e)||(this.stopListening(e),this._observedElements.delete(e))}}_fireEvents(t){this.isEnabled&&(this.document.fire(\"layoutChanged\"),this.document.fire(\"imageLoaded\",t))}destroy(){this._observedElements.clear(),super.destroy()}}function au(t){return i=>{i.on(`attribute:${t}:image`,e)};function e(t,e,i){if(!i.consumable.consume(e.item,t.name))return;const n=i.writer,o=i.mapper.toViewElement(e.item).getChild(0);null!==e.attributeNewValue?n.setAttribute(e.attributeKey,e.attributeNewValue,o):n.removeAttribute(e.attributeKey,o)}}class cu{constructor(){this._stack=[]}add(t,e){const i=this._stack,n=i[0];this._insertDescriptor(t);const o=i[0];n===o||lu(n,o)||this.fire(\"change:top\",{oldDescriptor:n,newDescriptor:o,writer:e})}remove(t,e){const i=this._stack,n=i[0];this._removeDescriptor(t);const o=i[0];n===o||lu(n,o)||this.fire(\"change:top\",{oldDescriptor:n,newDescriptor:o,writer:e})}_insertDescriptor(t){const e=this._stack,i=e.findIndex(e=>e.id===t.id);if(lu(t,e[i]))return;i>-1&&e.splice(i,1);let n=0;for(;e[n]&&du(e[n],t);)n++;e.splice(n,0,t)}_removeDescriptor(t){const e=this._stack,i=e.findIndex(e=>e.id===t);i>-1&&e.splice(i,1)}}function lu(t,e){return t&&e&&t.priority==e.priority&&hu(t.classes)==hu(e.classes)}function du(t,e){return t.priority>e.priority||!(t.priority<e.priority)&&hu(t.classes)>hu(e.classes)}function hu(t){return Array.isArray(t)?t.sort().join(\",\"):t}cn(cu,tn);var uu='<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z\"/><path fill-opacity=\".256\" d=\"M1 1h14v14H1z\"/><g class=\"ck-icon__selected-indicator\"><path d=\"M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z\"/><path fill-opacity=\".254\" d=\"M1 1h14v14H1z\"/></g></svg>';const fu=\"ck-widget\",gu=\"ck-widget_selected\";function mu(t){return!!t.is(\"element\")&&!!t.getCustomProperty(\"widget\")}function pu(t,e,i={}){return go.isEdge||e.setAttribute(\"contenteditable\",\"false\",t),e.addClass(fu,t),e.setCustomProperty(\"widget\",!0,t),t.getFillerOffset=ku,i.label&&function(t,e,i){i.setCustomProperty(\"widgetLabel\",e,t)}(t,i.label,e),i.hasSelectionHandle&&function(t,e){const i=e.createUIElement(\"div\",{class:\"ck ck-widget__selection-handle\"},function(t){const e=this.toDomElement(t),i=new ed;return i.set(\"content\",uu),i.render(),e.appendChild(i.element),e});e.insert(e.createPositionAt(t,0),i),e.addClass([\"ck-widget_with-selection-handle\"],t)}(t,e),function(t,e,i,n){const o=new cu;o.on(\"change:top\",(e,o)=>{o.oldDescriptor&&n(t,o.oldDescriptor,o.writer),o.newDescriptor&&i(t,o.newDescriptor,o.writer)}),e.setCustomProperty(\"addHighlight\",(t,e,i)=>o.add(e,i),t),e.setCustomProperty(\"removeHighlight\",(t,e,i)=>o.remove(e,i),t)}(t,e,(t,e,i)=>i.addClass(n(e.classes),t),(t,e,i)=>i.removeClass(n(e.classes),t)),t;function n(t){return Array.isArray(t)?t:[t]}}function bu(t){const e=t.getCustomProperty(\"widgetLabel\");return e?\"function\"==typeof e?e():e:\"\"}function wu(t,e){return e.addClass([\"ck-editor__editable\",\"ck-editor__nested-editable\"],t),go.isEdge||(e.setAttribute(\"contenteditable\",t.isReadOnly?\"false\":\"true\",t),t.on(\"change:isReadOnly\",(i,n,o)=>{e.setAttribute(\"contenteditable\",o?\"false\":\"true\",t)})),t.on(\"change:isFocused\",(i,n,o)=>{o?e.addClass(\"ck-editor__nested-editable_focused\",t):e.removeClass(\"ck-editor__nested-editable_focused\",t)}),t}function _u(t,e){const i=t.getSelectedElement();if(i&&e.schema.isBlock(i))return e.createPositionAfter(i);const n=t.getSelectedBlocks().next().value;if(n){if(n.isEmpty)return e.createPositionAt(n,0);const i=e.createPositionAfter(n);return t.focus.isTouching(i)?i:e.createPositionBefore(n)}return t.focus}function ku(){return null}function vu(t){const e=t.getSelectedElement();return e&&function(t){return!!t.getCustomProperty(\"image\")&&mu(t)}(e)?e:null}function yu(t){return!!t&&t.is(\"image\")}function xu(t,e,i={}){const n=t.createElement(\"image\",i),o=_u(e.document.selection,e);e.insertContent(n,o),n.parent&&t.setSelection(n,\"on\")}function Au(t){const e=t.schema,i=t.document.selection;return function(t,e,i){const n=function(t,e){const i=_u(t,e).parent;if(i.isEmpty&&!i.is(\"$root\"))return i.parent;return i}(t,i);return e.checkChild(n,\"image\")}(i,e,t)&&!function(t,e){const i=t.getSelectedElement();return i&&e.isObject(i)}(i,e)&&function(t){return[...t.focus.getAncestors()].every(t=>!t.is(\"image\"))}(i)}class Tu extends Td{refresh(){this.isEnabled=Au(this.editor.model)}execute(t){const e=this.editor.model;e.change(i=>{const n=Array.isArray(t.source)?t.source:[t.source];for(const t of n)xu(i,e,{src:t})})}}class Cu extends kd{static get pluginName(){return\"ImageEditing\"}init(){const t=this.editor,e=t.model.schema,i=t.t,n=t.conversion;t.editing.view.addObserver(su),e.register(\"image\",{isObject:!0,isBlock:!0,allowWhere:\"$block\",allowAttributes:[\"alt\",\"src\",\"srcset\"]}),n.for(\"dataDowncast\").elementToElement({model:\"image\",view:(t,e)=>Pu(e)}),n.for(\"editingDowncast\").elementToElement({model:\"image\",view:(t,e)=>(function(t,e,i){return e.setCustomProperty(\"image\",!0,t),pu(t,e,{label:function(){const e=t.getChild(0).getAttribute(\"alt\");return e?`${e} ${i}`:i}})})(Pu(e),e,i(\"j\"))}),n.for(\"downcast\").add(au(\"src\")).add(au(\"alt\")).add(function(){return e=>{e.on(\"attribute:srcset:image\",t)};function t(t,e,i){if(!i.consumable.consume(e.item,t.name))return;const n=i.writer,o=i.mapper.toViewElement(e.item).getChild(0);if(null===e.attributeNewValue){const t=e.attributeOldValue;t.data&&(n.removeAttribute(\"srcset\",o),n.removeAttribute(\"sizes\",o),t.width&&n.removeAttribute(\"width\",o))}else{const t=e.attributeNewValue;t.data&&(n.setAttribute(\"srcset\",t.data,o),n.setAttribute(\"sizes\",\"100vw\",o),t.width&&n.setAttribute(\"width\",t.width,o))}}}()),n.for(\"upcast\").elementToElement({view:{name:\"img\",attributes:{src:!0}},model:(t,e)=>e.createElement(\"image\",{src:t.getAttribute(\"src\")})}).attributeToAttribute({view:{name:\"img\",key:\"alt\"},model:\"alt\"}).attributeToAttribute({view:{name:\"img\",key:\"srcset\"},model:{key:\"srcset\",value:t=>{const e={data:t.getAttribute(\"srcset\")};return t.hasAttribute(\"width\")&&(e.width=t.getAttribute(\"width\")),e}}}).add(function(){return e=>{e.on(\"element:figure\",t)};function t(t,e,i){if(!i.consumable.test(e.viewItem,{name:!0,classes:\"image\"}))return;const n=Array.from(e.viewItem.getChildren()).find(t=>t.is(\"img\"));if(!n||!n.hasAttribute(\"src\")||!i.consumable.test(n,{name:!0}))return;const o=i.convertItem(n,e.modelCursor),r=Fh(o.modelRange.getItems());r&&(i.convertChildren(e.viewItem,i.writer.createPositionAt(r,0)),e.modelRange=o.modelRange,e.modelCursor=o.modelCursor)}}()),t.commands.add(\"imageInsert\",new Tu(t))}}function Pu(t){const e=t.createEmptyElement(\"img\"),i=t.createContainerElement(\"figure\",{class:\"image\"});return t.insert(t.createPositionAt(i,0),e),i}class Su extends Xr{constructor(t){super(t),this.domEventType=\"mousedown\"}onDomEvent(t){this.fire(t.type,t)}}i(47);const Mu=_o(\"Ctrl+A\");class Eu extends kd{static get pluginName(){return\"Widget\"}init(){const t=this.editor.editing.view,e=t.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on(\"selection\",(t,e,i)=>{this._clearPreviouslySelectedWidgets(i.writer);const n=i.writer,o=n.document.selection,r=o.getSelectedElement();let s=null;for(const t of o.getRanges())for(const e of t){const t=e.item;mu(t)&&!Iu(t,s)&&(n.addClass(gu,t),this._previouslySelected.add(t),s=t,t==r&&n.setSelection(o.getRanges(),{fake:!0,label:bu(r)}))}},{priority:\"low\"}),t.addObserver(Su),this.listenTo(e,\"mousedown\",(...t)=>this._onMousedown(...t)),this.listenTo(e,\"keydown\",(...t)=>this._onKeydown(...t),{priority:\"high\"}),this.listenTo(e,\"delete\",(t,e)=>{this._handleDelete(\"forward\"==e.direction)&&(e.preventDefault(),t.stop())},{priority:\"high\"})}_onMousedown(t,e){const i=this.editor,n=i.editing.view,o=n.document;let r=e.target;if(function(t){for(;t;){if(t.is(\"editableElement\")&&!t.is(\"rootElement\"))return!0;if(mu(t))return!1;t=t.parent}return!1}(r)){if(go.isSafari&&e.domEvent.detail>=3){const t=i.editing.mapper.toModelElement(r);this.editor.model.change(i=>{e.preventDefault(),i.setSelection(t,\"in\")})}return}if(!mu(r)&&!(r=r.findAncestor(mu)))return;e.preventDefault(),o.isFocused||n.focus();const s=i.editing.mapper.toModelElement(r);this._setSelectionOverElement(s)}_onKeydown(t,e){const i=e.keyCode,n=\"ltr\"===this.editor.locale.contentLanguageDirection,o=i==bo.arrowdown||i==bo[n?\"arrowright\":\"arrowleft\"];let r=!1;!function(t){return t==bo.arrowright||t==bo.arrowleft||t==bo.arrowup||t==bo.arrowdown}(i)?!function(t){return wo(t)==Mu}(e)?i===bo.enter&&(r=this._handleEnterKey(e.shiftKey)):r=this._selectAllNestedEditableContent()||this._selectAllContent():r=this._handleArrowKeys(o),r&&(e.preventDefault(),t.stop())}_handleDelete(t){if(this.editor.isReadOnly)return;const e=this.editor.model.document.selection;if(!e.isCollapsed)return;const i=this._getObjectElementNextToSelection(t);return i?(this.editor.model.change(t=>{let n=e.anchor.parent;for(;n.isEmpty;){const e=n;n=e.parent,t.remove(e)}this._setSelectionOverElement(i)}),!0):void 0}_handleArrowKeys(t){const e=this.editor.model,i=e.schema,n=e.document.selection,o=n.getSelectedElement();if(o&&i.isObject(o)){const o=t?n.getLastPosition():n.getFirstPosition(),r=i.getNearestSelectionRange(o,t?\"forward\":\"backward\");return r&&e.change(t=>{t.setSelection(r)}),!0}if(!n.isCollapsed)return;const r=this._getObjectElementNextToSelection(t);return r&&i.isObject(r)?(this._setSelectionOverElement(r),!0):void 0}_handleEnterKey(t){const e=this.editor.model,i=e.document.selection.getSelectedElement();if(function(t,e){return t&&e.isObject(t)&&!e.isInline(t)}(i,e.schema))return e.change(n=>{let o=n.createPositionAt(i,t?\"before\":\"after\");const r=n.createElement(\"paragraph\");if(e.schema.isBlock(i.parent)){const t=e.schema.findAllowedParent(o,r);o=n.split(o,t).position}n.insert(r,o),n.setSelection(r,\"in\")}),!0}_selectAllNestedEditableContent(){const t=this.editor.model,e=t.document.selection,i=t.schema.getLimitElement(e);return e.getFirstRange().root!=i&&(t.change(t=>{t.setSelection(t.createRangeIn(i))}),!0)}_selectAllContent(){const t=this.editor.model,e=this.editor.editing,i=e.view.document.selection.getSelectedElement();if(i&&mu(i)){const n=e.mapper.toModelElement(i.parent);return t.change(t=>{t.setSelection(t.createRangeIn(n))}),!0}return!1}_setSelectionOverElement(t){this.editor.model.change(e=>{e.setSelection(e.createRangeOn(t))})}_getObjectElementNextToSelection(t){const e=this.editor.model,i=e.schema,n=e.document.selection,o=e.createSelection(n);e.modifySelection(o,{direction:t?\"forward\":\"backward\"});const r=t?o.focus.nodeBefore:o.focus.nodeAfter;return r&&i.isObject(r)?r:null}_clearPreviouslySelectedWidgets(t){for(const e of this._previouslySelected)t.removeClass(gu,e);this._previouslySelected.clear()}}function Iu(t,e){return!!e&&Array.from(t.getAncestors()).includes(e)}class Nu extends Td{refresh(){const t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=yu(t),yu(t)&&t.hasAttribute(\"alt\")?this.value=t.getAttribute(\"alt\"):this.value=!1}execute(t){const e=this.editor.model,i=e.document.selection.getSelectedElement();e.change(e=>{e.setAttribute(\"alt\",t.newValue,i)})}}class Ou extends kd{static get pluginName(){return\"ImageTextAlternativeEditing\"}init(){this.editor.commands.add(\"imageTextAlternative\",new Nu(this.editor))}}i(49);class Ru extends Ll{constructor(t,e){super(t);const i=`ck-input-${Ki()}`,n=`ck-status-${Ki()}`;this.set(\"label\"),this.set(\"value\"),this.set(\"isReadOnly\",!1),this.set(\"errorText\",null),this.set(\"infoText\",null),this.labelView=this._createLabelView(i),this.inputView=this._createInputView(e,i,n),this.statusView=this._createStatusView(n),this.bind(\"_statusText\").to(this,\"errorText\",this,\"infoText\",(t,e)=>t||e);const o=this.bindTemplate;this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-labeled-input\",o.if(\"isReadOnly\",\"ck-disabled\")]},children:[this.labelView,this.inputView,this.statusView]})}_createLabelView(t){const e=new Vl(this.locale);return e.for=t,e.bind(\"text\").to(this,\"label\"),e}_createInputView(t,e,i){const n=new t(this.locale,i);return n.id=e,n.ariaDescribedById=i,n.bind(\"value\").to(this),n.bind(\"isReadOnly\").to(this),n.bind(\"hasError\").to(this,\"errorText\",t=>!!t),n.on(\"input\",()=>{this.errorText=null}),n}_createStatusView(t){const e=new Ll(this.locale),i=this.bindTemplate;return e.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-labeled-input__status\",i.if(\"errorText\",\"ck-labeled-input__status_error\"),i.if(\"_statusText\",\"ck-hidden\",t=>!t)],id:t,role:i.if(\"errorText\",\"alert\")},children:[{text:i.to(\"_statusText\")}]}),e}select(){this.inputView.select()}focus(){this.inputView.focus()}}i(51);class Du extends Ll{constructor(t){super(t),this.set(\"value\"),this.set(\"id\"),this.set(\"placeholder\"),this.set(\"isReadOnly\",!1),this.set(\"hasError\",!1),this.set(\"ariaDescribedById\");const e=this.bindTemplate;this.setTemplate({tag:\"input\",attributes:{type:\"text\",class:[\"ck\",\"ck-input\",\"ck-input-text\",e.if(\"hasError\",\"ck-error\")],id:e.to(\"id\"),placeholder:e.to(\"placeholder\"),readonly:e.to(\"isReadOnly\"),\"aria-invalid\":e.if(\"hasError\",!0),\"aria-describedby\":e.to(\"ariaDescribedById\")},on:{input:e.to(\"input\")}})}render(){super.render();const t=t=>{this.element.value=t||0===t?t:\"\"};t(this.value),this.on(\"change:value\",(e,i,n)=>{t(n)})}select(){this.element.select()}focus(){this.element.focus()}}function Lu({view:t}){t.listenTo(t.element,\"submit\",(e,i)=>{i.preventDefault(),t.fire(\"submit\")},{useCapture:!0})}var ju='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z\"/></svg>',Vu='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.591 10.177l4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z\"/></svg>';i(53);class zu extends Ll{constructor(t){super(t);const e=this.locale.t;this.focusTracker=new al,this.keystrokes=new Zc,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(e(\"bc\"),ju,\"ck-button-save\"),this.saveButtonView.type=\"submit\",this.cancelButtonView=this._createButton(e(\"bd\"),Vu,\"ck-button-cancel\",\"cancel\"),this._focusables=new pl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:\"shift + tab\",focusNext:\"tab\"}}),this.setTemplate({tag:\"form\",attributes:{class:[\"ck\",\"ck-text-alternative-form\"],tabindex:\"-1\"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),Lu({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)})}_createButton(t,e,i,n){const o=new nd(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.extendTemplate({attributes:{class:i}}),n&&o.delegate(\"execute\").to(this,n),o}_createLabeledInputView(){const t=this.locale.t,e=new Ru(this.locale,Du);return e.label=t(\"be\"),e.inputView.placeholder=t(\"be\"),e}}i(55);const Bu=Ul(\"px\"),Fu=tr.document.body;class Uu extends Ll{constructor(t){super(t);const e=this.bindTemplate;this.set(\"top\",0),this.set(\"left\",0),this.set(\"position\",\"arrow_nw\"),this.set(\"isVisible\",!1),this.set(\"withArrow\",!0),this.set(\"class\"),this.content=this.createCollection(),this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-balloon-panel\",e.to(\"position\",t=>`ck-balloon-panel_${t}`),e.if(\"isVisible\",\"ck-balloon-panel_visible\"),e.if(\"withArrow\",\"ck-balloon-panel_with-arrow\"),e.to(\"class\")],style:{top:e.to(\"top\",Bu),left:e.to(\"left\",Bu)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(t){this.show();const e=Uu.defaultPositions,i=Object.assign({},{element:this.element,positions:[e.southArrowNorth,e.southArrowNorthWest,e.southArrowNorthEast,e.northArrowSouth,e.northArrowSouthWest,e.northArrowSouthEast],limiter:Fu,fitInViewport:!0},t),n=Uu._getOptimalPosition(i),o=parseInt(n.left),r=parseInt(n.top),s=n.name;Object.assign(this,{top:r,left:o,position:s})}pin(t){this.unpin(),this._pinWhenIsVisibleCallback=(()=>{this.isVisible?this._startPinning(t):this._stopPinning()}),this._startPinning(t),this.listenTo(this,\"change:isVisible\",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,\"change:isVisible\",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(t){this.attachTo(t);const e=Hu(t.target),i=t.limiter?Hu(t.limiter):Fu;this.listenTo(tr.document,\"scroll\",(n,o)=>{const r=o.target,s=e&&r.contains(e),a=i&&r.contains(i);!s&&!a&&e&&i||this.attachTo(t)},{useCapture:!0}),this.listenTo(tr.window,\"resize\",()=>{this.attachTo(t)})}_stopPinning(){this.stopListening(tr.document,\"scroll\"),this.stopListening(tr.window,\"resize\")}}function Hu(t){return Wi(t)?t:ks(t)?t.commonAncestorContainer:\"function\"==typeof t?Hu(t()):null}function Wu(t,e){return t.top-e.height-Uu.arrowVerticalOffset}function qu(t){return t.bottom+Uu.arrowVerticalOffset}Uu.arrowHorizontalOffset=25,Uu.arrowVerticalOffset=10,Uu._getOptimalPosition=Jl,Uu.defaultPositions={northArrowSouth:(t,e)=>({top:Wu(t,e),left:t.left+t.width/2-e.width/2,name:\"arrow_s\"}),northArrowSouthEast:(t,e)=>({top:Wu(t,e),left:t.left+t.width/2-e.width+Uu.arrowHorizontalOffset,name:\"arrow_se\"}),northArrowSouthWest:(t,e)=>({top:Wu(t,e),left:t.left+t.width/2-Uu.arrowHorizontalOffset,name:\"arrow_sw\"}),northWestArrowSouth:(t,e)=>({top:Wu(t,e),left:t.left-e.width/2,name:\"arrow_s\"}),northWestArrowSouthWest:(t,e)=>({top:Wu(t,e),left:t.left-Uu.arrowHorizontalOffset,name:\"arrow_sw\"}),northWestArrowSouthEast:(t,e)=>({top:Wu(t,e),left:t.left-e.width+Uu.arrowHorizontalOffset,name:\"arrow_se\"}),northEastArrowSouth:(t,e)=>({top:Wu(t,e),left:t.right-e.width/2,name:\"arrow_s\"}),northEastArrowSouthEast:(t,e)=>({top:Wu(t,e),left:t.right-e.width+Uu.arrowHorizontalOffset,name:\"arrow_se\"}),northEastArrowSouthWest:(t,e)=>({top:Wu(t,e),left:t.right-Uu.arrowHorizontalOffset,name:\"arrow_sw\"}),southArrowNorth:(t,e)=>({top:qu(t),left:t.left+t.width/2-e.width/2,name:\"arrow_n\"}),southArrowNorthEast:(t,e)=>({top:qu(t),left:t.left+t.width/2-e.width+Uu.arrowHorizontalOffset,name:\"arrow_ne\"}),southArrowNorthWest:(t,e)=>({top:qu(t),left:t.left+t.width/2-Uu.arrowHorizontalOffset,name:\"arrow_nw\"}),southWestArrowNorth:(t,e)=>({top:qu(t),left:t.left-e.width/2,name:\"arrow_n\"}),southWestArrowNorthWest:(t,e)=>({top:qu(t),left:t.left-Uu.arrowHorizontalOffset,name:\"arrow_nw\"}),southWestArrowNorthEast:(t,e)=>({top:qu(t),left:t.left-e.width+Uu.arrowHorizontalOffset,name:\"arrow_ne\"}),southEastArrowNorth:(t,e)=>({top:qu(t),left:t.right-e.width/2,name:\"arrow_n\"}),southEastArrowNorthEast:(t,e)=>({top:qu(t),left:t.right-e.width+Uu.arrowHorizontalOffset,name:\"arrow_ne\"}),southEastArrowNorthWest:(t,e)=>({top:qu(t),left:t.right-Uu.arrowHorizontalOffset,name:\"arrow_nw\"})};var Yu='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z\" /></svg>\\n',$u='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382l-4.043 4.042z\"/></svg>\\n';i(57),i(59);const Gu=Ul(\"px\");class Qu extends kd{static get pluginName(){return\"ContextualBalloon\"}constructor(t){super(t),this.positionLimiter=(()=>{const t=this.editor.editing.view,e=t.document.selection.editableElement;return e?t.domConverter.mapViewToDom(e.root):null}),this.set(\"visibleView\",null),this.view=new Uu(t.locale),t.ui.view.body.add(this.view),t.ui.focusTracker.add(this.view.element),this._viewToStack=new Map,this._idToStack=new Map,this.set(\"_numberOfStacks\",0),this.set(\"_singleViewMode\",!1),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}hasView(t){return Array.from(this._viewToStack.keys()).includes(t)}add(t){if(this.hasView(t.view))throw new $i.b(\"contextualballoon-add-view-exist: Cannot add configuration of the same view twice.\",[this,t]);const e=t.stackId||\"main\";if(!this._idToStack.has(e))return this._idToStack.set(e,new Map([[t.view,t]])),this._viewToStack.set(t.view,this._idToStack.get(e)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!t.singleViewMode||this.showStack(e));const i=this._idToStack.get(e);t.singleViewMode&&this.showStack(e),i.set(t.view,t),this._viewToStack.set(t.view,i),i===this._visibleStack&&this._showView(t)}remove(t){if(!this.hasView(t))throw new $i.b(\"contextualballoon-remove-view-not-exist: Cannot remove the configuration of a non-existent view.\",[this,t]);const e=this._viewToStack.get(t);this._singleViewMode&&this.visibleView===t&&(this._singleViewMode=!1),this.visibleView===t&&(1===e.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(e.values())[e.size-2])),1===e.size?(this._idToStack.delete(this._getStackId(e)),this._numberOfStacks=this._idToStack.size):e.delete(t),this._viewToStack.delete(t)}updatePosition(t){t&&(this._visibleStack.get(this.visibleView).position=t),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(t){this.visibleStack=t;const e=this._idToStack.get(t);if(!e)throw new $i.b(\"contextualballoon-showstack-stack-not-exist: Cannot show a stack that does not exist.\",this);this._visibleStack!==e&&this._showView(Array.from(e.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(t){return Array.from(this._idToStack.entries()).find(e=>e[1]===t)[0]}_showNextStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)+1;t[e]||(e=0),this.showStack(this._getStackId(t[e]))}_showPrevStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)-1;t[e]||(e=t.length-1),this.showStack(this._getStackId(t[e]))}_createRotatorView(){const t=new Ku(this.editor.locale),e=this.editor.locale.t;return this.view.content.add(t),t.bind(\"isNavigationVisible\").to(this,\"_numberOfStacks\",this,\"_singleViewMode\",(t,e)=>!e&&t>1),t.on(\"change:isNavigationVisible\",()=>this.updatePosition(),{priority:\"low\"}),t.bind(\"counter\").to(this,\"visibleView\",this,\"_numberOfStacks\",(t,i)=>{if(i<2)return\"\";const n=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return e(\"az\",[n,i])}),t.buttonNextView.on(\"execute\",()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),t.buttonPrevView.on(\"execute\",()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),t}_createFakePanelsView(){const t=new Ju(this.editor.locale,this.view);return t.bind(\"numberOfPanels\").to(this,\"_numberOfStacks\",this,\"_singleViewMode\",(t,e)=>{return!e&&t>=2?Math.min(t-1,2):0}),t.listenTo(this.view,\"change:top\",()=>t.updatePosition()),t.listenTo(this.view,\"change:left\",()=>t.updatePosition()),this.editor.ui.view.body.add(t),t}_showView({view:t,balloonClassName:e=\"\",withArrow:i=!0,singleViewMode:n=!1}){this.view.class=e,this.view.withArrow=i,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),n&&(this._singleViewMode=!0)}_getBalloonPosition(){let t=Array.from(this._visibleStack.values()).pop().position;return t&&!t.limiter&&(t=Object.assign({},t,{limiter:this.positionLimiter})),t}}class Ku extends Ll{constructor(t){super(t);const e=t.t,i=this.bindTemplate;this.set(\"isNavigationVisible\",!0),this.focusTracker=new al,this.buttonPrevView=this._createButtonView(e(\"ba\"),Yu),this.buttonNextView=this._createButtonView(e(\"bb\"),$u),this.content=this.createCollection(),this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-balloon-rotator\"],\"z-index\":\"-1\"},children:[{tag:\"div\",attributes:{class:[\"ck-balloon-rotator__navigation\",i.to(\"isNavigationVisible\",t=>t?\"\":\"ck-hidden\")]},children:[this.buttonPrevView,{tag:\"span\",attributes:{class:[\"ck-balloon-rotator__counter\"]},children:[{text:i.to(\"counter\")}]},this.buttonNextView]},{tag:\"div\",attributes:{class:\"ck-balloon-rotator__content\"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}showView(t){this.hideView(),this.content.add(t)}hideView(){this.content.clear()}_createButtonView(t,e){const i=new nd(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i}}class Ju extends Ll{constructor(t,e){super(t);const i=this.bindTemplate;this.set(\"top\",0),this.set(\"left\",0),this.set(\"height\",0),this.set(\"width\",0),this.set(\"numberOfPanels\",0),this.content=this.createCollection(),this._balloonPanelView=e,this.setTemplate({tag:\"div\",attributes:{class:[\"ck-fake-panel\",i.to(\"numberOfPanels\",t=>t?\"\":\"ck-hidden\")],style:{top:i.to(\"top\",Gu),left:i.to(\"left\",Gu),width:i.to(\"width\",Gu),height:i.to(\"height\",Gu)}},children:this.content}),this.on(\"change:numberOfPanels\",(t,e,i,n)=>{i>n?this._addPanels(i-n):this._removePanels(n-i),this.updatePosition()})}_addPanels(t){for(;t--;){const t=new Ll;t.setTemplate({tag:\"div\"}),this.content.add(t),this.registerChild(t)}}_removePanels(t){for(;t--;){const t=this.content.last;this.content.remove(t),this.deregisterChild(t),t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:t,left:e}=this._balloonPanelView,{width:i,height:n}=new xs(this._balloonPanelView.element);Object.assign(this,{top:t,left:e,width:i,height:n})}}}var Zu='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.085 6.22L2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21l-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z\"/></svg>';function Xu(t){const e=t.editing.view,i=Uu.defaultPositions;return{target:e.domConverter.viewToDom(e.document.selection.getSelectedElement()),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast]}}class tf extends kd{static get requires(){return[Qu]}static get pluginName(){return\"ImageTextAlternativeUI\"}init(){this._createButton(),this._createForm()}destroy(){super.destroy(),this._form.destroy()}_createButton(){const t=this.editor,e=t.t;t.ui.componentFactory.add(\"imageTextAlternative\",i=>{const n=t.commands.get(\"imageTextAlternative\"),o=new nd(i);return o.set({label:e(\"au\"),icon:Zu,tooltip:!0}),o.bind(\"isEnabled\").to(n,\"isEnabled\"),this.listenTo(o,\"execute\",()=>this._showForm()),o})}_createForm(){const t=this.editor,e=t.editing.view.document;this._balloon=this.editor.plugins.get(\"ContextualBalloon\"),this._form=new zu(t.locale),this._form.render(),this.listenTo(this._form,\"submit\",()=>{t.execute(\"imageTextAlternative\",{newValue:this._form.labeledInput.inputView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,\"cancel\",()=>{this._hideForm(!0)}),this._form.keystrokes.set(\"Esc\",(t,e)=>{this._hideForm(!0),e()}),this.listenTo(t.ui,\"update\",()=>{vu(e.selection)?this._isVisible&&function(t){const e=t.plugins.get(\"ContextualBalloon\");if(vu(t.editing.view.document.selection)){const i=Xu(t);e.updatePosition(i)}}(t):this._hideForm(!0)}),dd({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;const t=this.editor,e=t.commands.get(\"imageTextAlternative\"),i=this._form.labeledInput;this._isInBalloon||this._balloon.add({view:this._form,position:Xu(t)}),i.value=i.inputView.element.value=e.value||\"\",this._form.labeledInput.select()}_hideForm(t){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),t&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}class ef extends kd{static get requires(){return[Ou,tf]}static get pluginName(){return\"ImageTextAlternative\"}}i(61);function nf(t){for(const e of t.getChildren())if(e&&e.is(\"caption\"))return e;return null}function of(t){const e=t.parent;return\"figcaption\"==t.name&&e&&\"figure\"==e.name&&e.hasClass(\"image\")?{name:!0}:null}class rf extends kd{static get pluginName(){return\"ImageCaptionEditing\"}init(){const t=this.editor,e=t.editing.view,i=t.model.schema,n=t.data,o=t.editing,r=t.t;i.register(\"caption\",{allowIn:\"image\",allowContentOf:\"$block\",isLimit:!0}),t.model.document.registerPostFixer(t=>this._insertMissingModelCaptionElement(t)),t.conversion.for(\"upcast\").elementToElement({view:of,model:\"caption\"});n.downcastDispatcher.on(\"insert:caption\",sf(t=>t.createContainerElement(\"figcaption\"),!1));const s=function(t,e){return i=>{const n=i.createEditableElement(\"figcaption\");return i.setCustomProperty(\"imageCaption\",!0,n),dl({view:t,element:n,text:e}),wu(n,i)}}(e,r(\"p\"));o.downcastDispatcher.on(\"insert:caption\",sf(s)),o.downcastDispatcher.on(\"insert\",this._fixCaptionVisibility(t=>t.item),{priority:\"high\"}),o.downcastDispatcher.on(\"remove\",this._fixCaptionVisibility(t=>t.position.parent),{priority:\"high\"}),e.document.registerPostFixer(t=>this._updateCaptionVisibility(t))}_updateCaptionVisibility(t){const e=this.editor.editing.mapper,i=this._lastSelectedCaption;let n;const o=this.editor.model.document.selection,r=o.getSelectedElement();if(r&&r.is(\"image\")){const t=nf(r);n=e.toViewElement(t)}const s=af(o.getFirstPosition().parent);if(s&&(n=e.toViewElement(s)),n)return i?i===n?lf(n,t):(cf(i,t),this._lastSelectedCaption=n,lf(n,t)):(this._lastSelectedCaption=n,lf(n,t));if(i){const e=cf(i,t);return this._lastSelectedCaption=null,e}return!1}_fixCaptionVisibility(t){return(e,i,n)=>{const o=af(t(i)),r=this.editor.editing.mapper,s=n.writer;if(o){const t=r.toViewElement(o);t&&(o.childCount?s.removeClass(\"ck-hidden\",t):s.addClass(\"ck-hidden\",t))}}}_insertMissingModelCaptionElement(t){const e=this.editor.model,i=e.document.differ.getChanges(),n=[];for(const t of i)if(\"insert\"==t.type&&\"$text\"!=t.name){const i=t.position.nodeAfter;if(i.is(\"image\")&&!nf(i)&&n.push(i),!i.is(\"image\")&&i.childCount)for(const t of e.createRangeIn(i).getItems())t.is(\"image\")&&!nf(t)&&n.push(t)}for(const e of n)t.appendElement(\"caption\",e);return!!n.length}}function sf(t,e=!0){return(i,n,o)=>{const r=n.item;if((r.childCount||e)&&yu(r.parent)){if(!o.consumable.consume(n.item,\"insert\"))return;const e=o.mapper.toViewElement(n.range.start.parent),i=t(o.writer),s=o.writer;r.childCount||s.addClass(\"ck-hidden\",i),function(t,e,i,n){const o=n.writer.createPositionAt(i,\"end\");n.writer.insert(o,t),n.mapper.bindElements(e,t)}(i,n.item,e,o)}}}function af(t){const e=t.getAncestors({includeSelf:!0}).find(t=>\"caption\"==t.name);return e&&e.parent&&\"image\"==e.parent.name?e:null}function cf(t,e){return!t.childCount&&!t.hasClass(\"ck-hidden\")&&(e.addClass(\"ck-hidden\",t),!0)}function lf(t,e){return!!t.hasClass(\"ck-hidden\")&&(e.removeClass(\"ck-hidden\",t),!0)}i(63);class df extends Td{constructor(t,e){super(t),this.defaultStyle=!1,this.styles=e.reduce((t,e)=>(t[e.name]=e,e.isDefault&&(this.defaultStyle=e.name),t),{})}refresh(){const t=this.editor.model.document.selection.getSelectedElement();if(this.isEnabled=yu(t),t)if(t.hasAttribute(\"imageStyle\")){const e=t.getAttribute(\"imageStyle\");this.value=!!this.styles[e]&&e}else this.value=this.defaultStyle;else this.value=!1}execute(t){const e=t.value,i=this.editor.model,n=i.document.selection.getSelectedElement();i.change(t=>{this.styles[e].isDefault?t.removeAttribute(\"imageStyle\",n):t.setAttribute(\"imageStyle\",e,n)})}}function hf(t,e){for(const i of e)if(i.name===t)return i}var uf='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 4.5V3h16v1.5zm2.5 3V12h11V7.5h-11zM4.061 6H15.94c.586 0 1.061.407 1.061.91v5.68c0 .503-.475.91-1.061.91H4.06c-.585 0-1.06-.407-1.06-.91V6.91C3 6.406 3.475 6 4.061 6zM2 16.5V15h16v1.5z\"/></svg>',ff='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><path d=\"M18 4.5V3H2v1.5h16zm0 3V6h-5.674v1.5H18zm0 3V9h-5.674v1.5H18zm0 3V12h-5.674v1.5H18zm-8.5-6V12h-6V7.5h6zm.818-1.5H2.682C2.305 6 2 6.407 2 6.91v5.68c0 .503.305.91.682.91h7.636c.377 0 .682-.407.682-.91V6.91c0-.503-.305-.91-.682-.91zM18 16.5V15H2v1.5h16z\"/></svg>',gf='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 4.5V3h16v1.5zm4.5 3V12h7V7.5h-7zM5.758 6h8.484c.419 0 .758.407.758.91v5.681c0 .502-.34.909-.758.909H5.758c-.419 0-.758-.407-.758-.91V6.91c0-.503.34-.91.758-.91zM2 16.5V15h16v1.5z\"/></svg>',mf='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 4.5V3h16v1.5zm0 3V6h5.674v1.5zm0 3V9h5.674v1.5zm0 3V12h5.674v1.5zm8.5-6V12h6V7.5h-6zM9.682 6h7.636c.377 0 .682.407.682.91v5.68c0 .503-.305.91-.682.91H9.682c-.377 0-.682-.407-.682-.91V6.91c0-.503.305-.91.682-.91zM2 16.5V15h16v1.5z\"/></svg>';const pf={full:{name:\"full\",title:\"Full size image\",icon:uf,isDefault:!0},side:{name:\"side\",title:\"Side image\",icon:mf,className:\"image-style-side\"},alignLeft:{name:\"alignLeft\",title:\"Left aligned image\",icon:ff,className:\"image-style-align-left\"},alignCenter:{name:\"alignCenter\",title:\"Centered image\",icon:gf,className:\"image-style-align-center\"},alignRight:{name:\"alignRight\",title:\"Right aligned image\",icon:mf,className:\"image-style-align-right\"}},bf={full:uf,left:ff,right:mf,center:gf};function wf(t=[]){return t.map(_f)}function _f(t){if(\"string\"==typeof t){const e=t;pf[e]?t=Object.assign({},pf[e]):(console.warn(Object($i.a)(\"image-style-not-found: There is no such image style of given name.\"),{name:e}),t={name:e})}else if(pf[t.name]){const e=pf[t.name],i=Object.assign({},t);for(const n in e)t.hasOwnProperty(n)||(i[n]=e[n]);t=i}return\"string\"==typeof t.icon&&bf[t.icon]&&(t.icon=bf[t.icon]),t}class kf extends kd{static get pluginName(){return\"ImageStyleEditing\"}init(){const t=this.editor,e=t.model.schema,i=t.data,n=t.editing;t.config.define(\"image.styles\",[\"full\",\"side\"]);const o=wf(t.config.get(\"image.styles\"));e.extend(\"image\",{allowAttributes:\"imageStyle\"});const r=function(t){return(e,i,n)=>{if(!n.consumable.consume(i.item,e.name))return;const o=hf(i.attributeNewValue,t),r=hf(i.attributeOldValue,t),s=n.mapper.toViewElement(i.item),a=n.writer;r&&a.removeClass(r.className,s),o&&a.addClass(o.className,s)}}(o);n.downcastDispatcher.on(\"attribute:imageStyle:image\",r),i.downcastDispatcher.on(\"attribute:imageStyle:image\",r),i.upcastDispatcher.on(\"element:figure\",function(t){const e=t.filter(t=>!t.isDefault);return(t,i,n)=>{if(!i.modelRange)return;const o=i.viewItem,r=Fh(i.modelRange.getItems());if(n.schema.checkAttribute(r,\"imageStyle\"))for(const t of e)n.consumable.consume(o,{classes:t.className})&&n.writer.setAttribute(\"imageStyle\",t.name,r)}}(o),{priority:\"low\"}),t.commands.add(\"imageStyle\",new df(t,o))}}i(65);class vf extends kd{static get pluginName(){return\"ImageStyleUI\"}get localizedDefaultStylesTitles(){const t=this.editor.t;return{\"Full size image\":t(\"k\"),\"Side image\":t(\"l\"),\"Left aligned image\":t(\"m\"),\"Centered image\":t(\"n\"),\"Right aligned image\":t(\"o\")}}init(){const t=function(t,e){for(const i of t)e[i.title]&&(i.title=e[i.title]);return t}(wf(this.editor.config.get(\"image.styles\")),this.localizedDefaultStylesTitles);for(const e of t)this._createButton(e)}_createButton(t){const e=this.editor,i=`imageStyle:${t.name}`;e.ui.componentFactory.add(i,i=>{const n=e.commands.get(\"imageStyle\"),o=new nd(i);return o.set({label:t.title,icon:t.icon,tooltip:!0,isToggleable:!0}),o.bind(\"isEnabled\").to(n,\"isEnabled\"),o.bind(\"isOn\").to(n,\"value\",e=>e===t.name),this.listenTo(o,\"execute\",()=>e.execute(\"imageStyle\",{value:t.name})),o})}}class yf extends kd{static get requires(){return[Qu]}static get pluginName(){return\"WidgetToolbarRepository\"}init(){const t=this.editor;if(t.plugins.has(\"BalloonToolbar\")){const e=t.plugins.get(\"BalloonToolbar\");this.listenTo(e,\"show\",e=>{(function(t){const e=t.getSelectedElement();return!(!e||!mu(e))})(t.editing.view.document.selection)&&e.stop()},{priority:\"high\"})}this._toolbarDefinitions=new Map,this._balloon=this.editor.plugins.get(\"ContextualBalloon\"),this.listenTo(t.ui,\"update\",()=>{this._updateToolbarsVisibility()}),this.listenTo(t.ui.focusTracker,\"change:isFocused\",()=>{this._updateToolbarsVisibility()},{priority:\"low\"})}destroy(){super.destroy();for(const t of this._toolbarDefinitions.values())t.view.destroy()}register(t,{ariaLabel:e,items:i,getRelatedElement:n,balloonClassName:o=\"ck-toolbar-container\"}){const r=this.editor,s=r.t,a=new gd(r.locale);if(a.ariaLabel=e||s(\"at\"),this._toolbarDefinitions.has(t))throw new $i.b(\"widget-toolbar-duplicated: Toolbar with the given id was already added.\",this,{toolbarId:t});a.fillFromConfig(i,r.ui.componentFactory),this._toolbarDefinitions.set(t,{view:a,getRelatedElement:n,balloonClassName:o})}_updateToolbarsVisibility(){let t=0,e=null,i=null;for(const n of this._toolbarDefinitions.values()){const o=n.getRelatedElement(this.editor.editing.view.document.selection);if(this.editor.ui.focusTracker.isFocused)if(o){const r=o.getAncestors().length;r>t&&(t=r,e=o,i=n)}else this._isToolbarInBalloon(n)&&this._hideToolbar(n);else this._isToolbarVisible(n)&&this._hideToolbar(n)}i&&this._showToolbar(i,e)}_hideToolbar(t){this._balloon.remove(t.view),this.stopListening(this._balloon,\"change:visibleView\")}_showToolbar(t,e){this._isToolbarVisible(t)?xf(this.editor,e):this._isToolbarInBalloon(t)||(this._balloon.add({view:t.view,position:Af(this.editor,e),balloonClassName:t.balloonClassName}),this.listenTo(this._balloon,\"change:visibleView\",()=>{for(const t of this._toolbarDefinitions.values())if(this._isToolbarVisible(t)){const e=t.getRelatedElement(this.editor.editing.view.document.selection);xf(this.editor,e)}}))}_isToolbarVisible(t){return this._balloon.visibleView===t.view}_isToolbarInBalloon(t){return this._balloon.hasView(t.view)}}function xf(t,e){const i=t.plugins.get(\"ContextualBalloon\"),n=Af(t,e);i.updatePosition(n)}function Af(t,e){const i=t.editing.view,n=Uu.defaultPositions;return{target:i.domConverter.mapViewToDom(e),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]}}class Tf extends Ll{constructor(t){super(t),this.buttonView=new nd(t),this._fileInputView=new Cf(t),this._fileInputView.bind(\"acceptedType\").to(this),this._fileInputView.bind(\"allowMultipleFiles\").to(this),this._fileInputView.delegate(\"done\").to(this),this.setTemplate({tag:\"span\",attributes:{class:\"ck-file-dialog-button\"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on(\"execute\",()=>{this._fileInputView.open()})}focus(){this.buttonView.focus()}}class Cf extends Ll{constructor(t){super(t),this.set(\"acceptedType\"),this.set(\"allowMultipleFiles\",!1);const e=this.bindTemplate;this.setTemplate({tag:\"input\",attributes:{class:[\"ck-hidden\"],type:\"file\",tabindex:\"-1\",accept:e.to(\"acceptedType\"),multiple:e.to(\"allowMultipleFiles\")},on:{change:e.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire(\"done\",this.element.files),this.element.value=\"\"})}})}open(){this.element.click()}}var Pf='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6.91 10.54c.26-.23.64-.21.88.03l3.36 3.14 2.23-2.06a.64.64 0 0 1 .87 0l2.52 2.97V4.5H3.2v10.12l3.71-4.08zm10.27-7.51c.6 0 1.09.47 1.09 1.05v11.84c0 .59-.49 1.06-1.09 1.06H2.79c-.6 0-1.09-.47-1.09-1.06V4.08c0-.58.49-1.05 1.1-1.05h14.38zm-5.22 5.56a1.96 1.96 0 1 1 3.4-1.96 1.96 1.96 0 0 1-3.4 1.96z\"/></svg>';function Sf(t){const e=t.map(t=>t.replace(\"+\",\"\\\\+\"));return new RegExp(`^image\\\\/(${e.join(\"|\")})$`)}function Mf(t){return new Promise((e,i)=>{const n=t.getAttribute(\"src\");fetch(n).then(t=>t.blob()).then(t=>{const o=function(t,e){return t.type?t.type:e.match(/data:(image\\/\\w+);base64/)?e.match(/data:(image\\/\\w+);base64/)[1].toLowerCase():\"image/jpeg\"}(t,n),r=function(t,e,i){try{return new File([t],e,{type:i})}catch(t){return null}}(t,`image.${o.replace(\"image/\",\"\")}`,o);r?e(r):i()}).catch(i)})}class Ef extends kd{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(\"imageUpload\",i=>{const n=new Tf(i),o=t.commands.get(\"imageUpload\"),r=t.config.get(\"image.upload.types\"),s=Sf(r);return n.set({acceptedType:r.map(t=>`image/${t}`).join(\",\"),allowMultipleFiles:!0}),n.buttonView.set({label:e(\"q\"),icon:Pf,tooltip:!0}),n.buttonView.bind(\"isEnabled\").to(o),n.on(\"done\",(e,i)=>{const n=Array.from(i).filter(t=>s.test(t.type));n.length&&t.execute(\"imageUpload\",{file:n})}),n})}}var If='<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 700 250\"><rect rx=\"4\"/></svg>';i(67),i(69),i(71);class Nf extends kd{constructor(t){super(t),this.placeholder=\"data:image/svg+xml;utf8,\"+encodeURIComponent(If)}init(){this.editor.editing.downcastDispatcher.on(\"attribute:uploadStatus:image\",(...t)=>this.uploadStatusChange(...t))}uploadStatusChange(t,e,i){const n=this.editor,o=e.item,r=o.getAttribute(\"uploadId\");if(!i.consumable.consume(e.item,t.name))return;const s=n.plugins.get(_h),a=r?e.attributeNewValue:null,c=this.placeholder,l=n.editing.mapper.toViewElement(o),d=i.writer;if(\"reading\"==a)return Of(l,d),void Rf(c,l,d);if(\"uploading\"==a){const t=s.loaders.get(r);return Of(l,d),void(t?(Df(l,d),function(t,e,i,n){const o=function(t){const e=t.createUIElement(\"div\",{class:\"ck-progress-bar\"});return t.setCustomProperty(\"progressBar\",!0,e),e}(e);e.insert(e.createPositionAt(t,\"end\"),o),i.on(\"change:uploadedPercent\",(t,e,i)=>{n.change(t=>{t.setStyle(\"width\",i+\"%\",o)})})}(l,d,t,n.editing.view),function(t,e,i){if(i.data){const n=t.getChild(0);e.setAttribute(\"src\",i.data,n)}}(l,d,t)):Rf(c,l,d))}\"complete\"==a&&s.loaders.get(r)&&!go.isEdge&&function(t,e,i){const n=e.createUIElement(\"div\",{class:\"ck-image-upload-complete-icon\"});e.insert(e.createPositionAt(t,\"end\"),n),setTimeout(()=>{i.change(t=>t.remove(t.createRangeOn(n)))},3e3)}(l,d,n.editing.view),function(t,e){jf(t,e,\"progressBar\")}(l,d),Df(l,d),function(t,e){e.removeClass(\"ck-appear\",t)}(l,d)}}function Of(t,e){t.hasClass(\"ck-appear\")||e.addClass(\"ck-appear\",t)}function Rf(t,e,i){e.hasClass(\"ck-image-upload-placeholder\")||i.addClass(\"ck-image-upload-placeholder\",e);const n=e.getChild(0);n.getAttribute(\"src\")!==t&&i.setAttribute(\"src\",t,n),Lf(e,\"placeholder\")||i.insert(i.createPositionAfter(n),function(t){const e=t.createUIElement(\"div\",{class:\"ck-upload-placeholder-loader\"});return t.setCustomProperty(\"placeholder\",!0,e),e}(i))}function Df(t,e){t.hasClass(\"ck-image-upload-placeholder\")&&e.removeClass(\"ck-image-upload-placeholder\",t),jf(t,e,\"placeholder\")}function Lf(t,e){for(const i of t.getChildren())if(i.getCustomProperty(e))return i}function jf(t,e,i){const n=Lf(t,i);n&&e.remove(e.createRangeOn(n))}class Vf extends kd{static get pluginName(){return\"Notification\"}init(){this.on(\"show:warning\",(t,e)=>{window.alert(e.message)},{priority:\"lowest\"})}showSuccess(t,e={}){this._showNotification({message:t,type:\"success\",namespace:e.namespace,title:e.title})}showInfo(t,e={}){this._showNotification({message:t,type:\"info\",namespace:e.namespace,title:e.title})}showWarning(t,e={}){this._showNotification({message:t,type:\"warning\",namespace:e.namespace,title:e.title})}_showNotification(t){const e=`show:${t.type}`+(t.namespace?`:${t.namespace}`:\"\");this.fire(e,{message:t.message,type:t.type,title:t.title||\"\"})}}class zf{createDocumentFragment(t){return new Ao(t)}createElement(t,e,i){return new _n(t,e,i)}createText(t){return new fn(t)}clone(t,e=!1){return t._clone(e)}appendChild(t,e){return e._appendChild(t)}insertChild(t,e,i){return i._insertChild(t,e)}removeChildren(t,e,i){return i._removeChildren(t,e)}remove(t){const e=t.parent;return e?this.removeChildren(e.getChildIndex(t),1,e):[]}replace(t,e){const i=t.parent;if(i){const n=i.getChildIndex(t);return this.removeChildren(n,1,i),this.insertChild(n,e,i),!0}return!1}unwrapElement(t){const e=t.parent;if(e){const i=e.getChildIndex(t);this.remove(t),this.insertChild(i,t.getChildren(),e)}}rename(t,e){const i=new _n(t,e.getAttributes(),e.getChildren());return this.replace(e,i)?i:null}setAttribute(t,e,i){i._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,i){T(t)&&void 0===i&&(i=e),i._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,i){i._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}createPositionAt(t,e){return Zn._createAt(t,e)}createPositionAfter(t){return Zn._createAfter(t)}createPositionBefore(t){return Zn._createBefore(t)}createRange(t,e){return new Xn(t,e)}createRangeOn(t){return Xn._createOn(t)}createRangeIn(t){return Xn._createIn(t)}createSelection(t,e,i){return new io(t,e,i)}}class Bf extends Td{refresh(){this.isEnabled=Au(this.editor.model)}execute(t){const e=this.editor,i=e.model,n=e.plugins.get(_h);i.change(e=>{const o=Array.isArray(t.file)?t.file:[t.file];for(const t of o)Ff(e,i,n,t)})}}function Ff(t,e,i,n){const o=i.createLoader(n);o&&xu(t,e,{uploadId:o.id})}class Uf extends kd{static get requires(){return[_h,Vf,Ad]}static get pluginName(){return\"ImageUploadEditing\"}constructor(t){super(t),t.config.define(\"image\",{upload:{types:[\"jpeg\",\"png\",\"gif\",\"bmp\",\"webp\",\"tiff\"]}})}init(){const t=this.editor,e=t.model.document,i=t.model.schema,n=t.conversion,o=t.plugins.get(_h),r=Sf(t.config.get(\"image.upload.types\"));i.extend(\"image\",{allowAttributes:[\"uploadId\",\"uploadStatus\"]}),t.commands.add(\"imageUpload\",new Bf(t)),n.for(\"upcast\").attributeToAttribute({view:{name:\"img\",key:\"uploadId\"},model:\"uploadId\"}),this.listenTo(t.editing.view.document,\"clipboardInput\",(e,i)=>{if(function(t){return Array.from(t.types).includes(\"text/html\")&&\"\"!==t.getData(\"text/html\")}(i.dataTransfer))return;const n=Array.from(i.dataTransfer.files).filter(t=>!!t&&r.test(t.type)),o=i.targetRanges.map(e=>t.editing.mapper.toModelRange(e));t.model.change(i=>{i.setSelection(o),n.length&&(e.stop(),t.model.enqueueChange(\"default\",()=>{t.execute(\"imageUpload\",{file:n})}))})}),this.listenTo(t.plugins.get(Ad),\"inputTransformation\",(e,i)=>{const n=Array.from(t.editing.view.createRangeIn(i.content)).filter(t=>(function(t){return!(!t.is(\"element\",\"img\")||!t.getAttribute(\"src\"))&&(t.getAttribute(\"src\").match(/^data:image\\/\\w+;base64,/g)||t.getAttribute(\"src\").match(/^blob:/g))})(t.item)&&!t.item.getAttribute(\"uploadProcessed\")).map(t=>({promise:Mf(t.item),imageElement:t.item}));if(!n.length)return;const r=new zf;for(const t of n){r.setAttribute(\"uploadProcessed\",!0,t.imageElement);const e=o.createLoader(t.promise);e&&(r.setAttribute(\"src\",\"\",t.imageElement),r.setAttribute(\"uploadId\",e.id,t.imageElement))}}),t.editing.view.document.on(\"dragover\",(t,e)=>{e.preventDefault()}),e.on(\"change\",()=>{const i=e.differ.getChanges({includeChangesInGraveyard:!0});for(const e of i)if(\"insert\"==e.type&&\"$text\"!=e.name){const i=e.position.nodeAfter,n=\"$graveyard\"==e.position.root.rootName;for(const e of Hf(t,i)){const t=e.getAttribute(\"uploadId\");if(!t)continue;const i=o.loaders.get(t);i&&(n?i.abort():\"idle\"==i.status&&this._readAndUpload(i,e))}}})}_readAndUpload(t,e){const i=this.editor,n=i.model,o=i.locale.t,r=i.plugins.get(_h),s=i.plugins.get(Vf);return n.enqueueChange(\"transparent\",t=>{t.setAttribute(\"uploadStatus\",\"reading\",e)}),t.read().then(()=>{const o=t.upload();if(go.isSafari){const t=i.editing.mapper.toViewElement(e).getChild(0);i.editing.view.once(\"render\",()=>{if(!t.parent)return;const e=i.editing.view.domConverter.mapViewToDom(t.parent);if(!e)return;const n=e.style.display;e.style.display=\"none\",e._ckHack=e.offsetHeight,e.style.display=n})}return n.enqueueChange(\"transparent\",t=>{t.setAttribute(\"uploadStatus\",\"uploading\",e)}),o}).then(t=>{n.enqueueChange(\"transparent\",i=>{i.setAttributes({uploadStatus:\"complete\",src:t.default},e),this._parseAndSetSrcsetAttributeOnImage(t,e,i)}),a()}).catch(i=>{if(\"error\"!==t.status&&\"aborted\"!==t.status)throw i;\"error\"==t.status&&i&&s.showWarning(i,{title:o(\"r\"),namespace:\"upload\"}),a(),n.enqueueChange(\"transparent\",t=>{t.remove(e)})});function a(){n.enqueueChange(\"transparent\",t=>{t.removeAttribute(\"uploadId\",e),t.removeAttribute(\"uploadStatus\",e)}),r.destroyLoader(t)}}_parseAndSetSrcsetAttributeOnImage(t,e,i){let n=0;const o=Object.keys(t).filter(t=>{const e=parseInt(t,10);if(!isNaN(e))return n=Math.max(n,e),!0}).map(e=>`${t[e]} ${e}w`).join(\", \");\"\"!=o&&i.setAttribute(\"srcset\",{data:o,width:n},e)}}function Hf(t,e){return Array.from(t.model.createRangeOn(e)).filter(t=>t.item.is(\"image\")).map(t=>t.item)}class Wf extends Td{constructor(t){super(t),this._childCommands=[]}refresh(){}execute(...t){this._getFirstEnabledCommand().execute(t)}registerChildCommand(t){this._childCommands.push(t),t.on(\"change:isEnabled\",()=>this._checkEnabled()),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){return this._childCommands.find(t=>t.isEnabled)}}class qf extends kd{static get pluginName(){return\"IndentEditing\"}init(){const t=this.editor;t.commands.add(\"indent\",new Wf(t)),t.commands.add(\"outdent\",new Wf(t))}}var Yf='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5z\"/><path d=\"M1.632 6.95L5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z\"/></svg>\\n',$f='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5z\"/><path d=\"M4.368 6.95L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z\"/></svg>\\n';class Gf extends kd{static get pluginName(){return\"IndentUI\"}init(){const t=this.editor,e=t.locale,i=t.t,n=\"ltr\"==e.uiLanguageDirection?Yf:$f,o=\"ltr\"==e.uiLanguageDirection?$f:Yf;this._defineButton(\"indent\",i(\"s\"),n),this._defineButton(\"outdent\",i(\"t\"),o)}_defineButton(t,e,i){const n=this.editor;n.ui.componentFactory.add(t,o=>{const r=n.commands.get(t),s=new nd(o);return s.set({label:e,icon:i,tooltip:!0}),s.bind(\"isOn\",\"isEnabled\").to(r,\"value\",\"isEnabled\"),this.listenTo(s,\"execute\",()=>n.execute(t)),s})}}function Qf(t,e,i){return i.createRange(Kf(t,e,!0,i),Kf(t,e,!1,i))}function Kf(t,e,i,n){let o=t.textNode||(i?t.nodeBefore:t.nodeAfter),r=null;for(;o&&o.getAttribute(\"linkHref\")==e;)r=o,o=i?o.previousSibling:o.nextSibling;return r?n.createPositionAt(r,i?\"before\":\"after\"):t}class Jf extends Td{constructor(t){super(t),this.manualDecorators=new oo}restoreManualDecoratorStates(){for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}refresh(){const t=this.editor.model,e=t.document;this.value=e.selection.getAttribute(\"linkHref\");for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id);this.isEnabled=t.schema.checkAttributeInSelection(e.selection,\"linkHref\")}execute(t,e={}){const i=this.editor.model,n=i.document.selection,o=[],r=[];for(const t in e)e[t]?o.push(t):r.push(t);i.change(e=>{if(n.isCollapsed){const s=n.getFirstPosition();if(n.hasAttribute(\"linkHref\")){const a=Qf(s,n.getAttribute(\"linkHref\"),i);e.setAttribute(\"linkHref\",t,a),o.forEach(t=>{e.setAttribute(t,!0,a)}),r.forEach(t=>{e.removeAttribute(t,a)}),e.setSelection(a)}else if(\"\"!==t){const r=js(n.getAttributes());r.set(\"linkHref\",t),o.forEach(t=>{r.set(t,!0)});const a=e.createText(t,r);i.insertContent(a,s),e.setSelection(e.createRangeOn(a))}}else{const s=i.schema.getValidRanges(n.getRanges(),\"linkHref\");for(const i of s)e.setAttribute(\"linkHref\",t,i),o.forEach(t=>{e.setAttribute(t,!0,i)}),r.forEach(t=>{e.removeAttribute(t,i)})}})}_getDecoratorStateFromModel(t){return this.editor.model.document.selection.getAttribute(t)||!1}}class Zf extends Td{refresh(){this.isEnabled=this.editor.model.document.selection.hasAttribute(\"linkHref\")}execute(){const t=this.editor,e=this.editor.model,i=e.document.selection,n=t.commands.get(\"link\");e.change(t=>{const o=i.isCollapsed?[Qf(i.getFirstPosition(),i.getAttribute(\"linkHref\"),e)]:i.getRanges();for(const e of o)if(t.removeAttribute(\"linkHref\",e),n)for(const i of n.manualDecorators)t.removeAttribute(i.id,e)})}}var Xf=function(t,e,i){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(i=i>o?o:i)<0&&(i+=o),o=e>i?0:i-e>>>0,e>>>=0;for(var r=Array(o);++n<o;)r[n]=t[n+e];return r};var tg=function(t,e,i){var n=t.length;return i=void 0===i?n:i,!e&&i>=n?t:Xf(t,e,i)},eg=RegExp(\"[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]\");var ig=function(t){return eg.test(t)};var ng=function(t){return t.split(\"\")},og=\"[\\\\ud800-\\\\udfff]\",rg=\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",sg=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",ag=\"[^\\\\ud800-\\\\udfff]\",cg=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",lg=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",dg=\"(?:\"+rg+\"|\"+sg+\")\"+\"?\",hg=\"[\\\\ufe0e\\\\ufe0f]?\"+dg+(\"(?:\\\\u200d(?:\"+[ag,cg,lg].join(\"|\")+\")[\\\\ufe0e\\\\ufe0f]?\"+dg+\")*\"),ug=\"(?:\"+[ag+rg+\"?\",rg,cg,lg,og].join(\"|\")+\")\",fg=RegExp(sg+\"(?=\"+sg+\")|\"+ug+hg,\"g\");var gg=function(t){return t.match(fg)||[]};var mg=function(t){return ig(t)?gg(t):ng(t)};var pg=function(t,e){for(var i=-1,n=null==t?0:t.length,o=Array(n);++i<n;)o[i]=e(t[i],i,t);return o},bg=1/0,wg=o?o.prototype:void 0,_g=wg?wg.toString:void 0;var kg=function t(e){if(\"string\"==typeof e)return e;if(qt(e))return pg(e,t)+\"\";if(ns(e))return _g?_g.call(e):\"\";var i=e+\"\";return\"0\"==i&&1/e==-bg?\"-0\":i};var vg=function(t){return null==t?\"\":kg(t)};var yg=function(t){return function(e){e=vg(e);var i=ig(e)?mg(e):void 0,n=i?i[0]:e.charAt(0),o=i?tg(i,1).join(\"\"):e.slice(1);return n[t]()+o}}(\"toUpperCase\");const xg=/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205f\\u3000]/g,Ag=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function Tg(t,e){const i=e.createAttributeElement(\"a\",{href:t},{priority:5});return e.setCustomProperty(\"link\",!0,i),i}function Cg(t){return function(t){return t.replace(xg,\"\").match(Ag)}(t=String(t))?t:\"#\"}class Pg{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(t){Array.isArray(t)?t.forEach(t=>this._definitions.add(t)):this._definitions.add(t)}getDispatcher(){return t=>{t.on(\"attribute:linkHref\",(t,e,i)=>{if(!i.consumable.test(e.item,\"attribute:linkHref\"))return;const n=i.writer,o=n.document.selection;for(const t of this._definitions){const r=n.createAttributeElement(\"a\",t.attributes,{priority:5});n.setCustomProperty(\"link\",!0,r),t.callback(e.attributeNewValue)?e.item.is(\"selection\")?n.wrap(o.getFirstRange(),r):n.wrap(i.mapper.toViewRange(e.range),r):n.unwrap(i.mapper.toViewRange(e.range),r)}},{priority:\"high\"})}}}class Sg{constructor({id:t,label:e,attributes:i}){this.id=t,this.set(\"value\"),this.label=e,this.attributes=i}}cn(Sg,Fn);class Mg{constructor(t,e,i){this.model=t,this.attribute=i,this._modelSelection=t.document.selection,this._overrideUid=null,this._isNextGravityRestorationSkipped=!1,e.listenTo(this._modelSelection,\"change:range\",(t,e)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!e.directChange&&Eg(this._modelSelection.getFirstPosition(),i)||this._restoreGravity())})}handleForwardMovement(t,e){const i=this.attribute;if(!(this._isGravityOverridden||t.isAtStart&&this._hasSelectionAttribute))return Og(t,i)&&this._hasSelectionAttribute?(this._preventCaretMovement(e),this._removeSelectionAttribute(),!0):Ig(t,i)?(this._preventCaretMovement(e),this._overrideGravity(),!0):Ng(t,i)&&this._hasSelectionAttribute?(this._preventCaretMovement(e),this._overrideGravity(),!0):void 0}handleBackwardMovement(t,e){const i=this.attribute;return this._isGravityOverridden?Og(t,i)&&this._hasSelectionAttribute?(this._preventCaretMovement(e),this._restoreGravity(),this._removeSelectionAttribute(),!0):(this._preventCaretMovement(e),this._restoreGravity(),t.isAtStart&&this._removeSelectionAttribute(),!0):Og(t,i)&&!this._hasSelectionAttribute?(this._preventCaretMovement(e),this._setSelectionAttributeFromTheNodeBefore(t),!0):t.isAtEnd&&Ng(t,i)?this._hasSelectionAttribute?void(Rg(t,i)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity())):(this._preventCaretMovement(e),this._setSelectionAttributeFromTheNodeBefore(t),!0):t.isAtStart?this._hasSelectionAttribute?(this._removeSelectionAttribute(),this._preventCaretMovement(e),!0):void 0:void(Rg(t,i)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity()))}get _isGravityOverridden(){return!!this._overrideUid}get _hasSelectionAttribute(){return this._modelSelection.hasAttribute(this.attribute)}_overrideGravity(){this._overrideUid=this.model.change(t=>t.overrideSelectionGravity())}_restoreGravity(){this.model.change(t=>{t.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}_preventCaretMovement(t){t.preventDefault()}_removeSelectionAttribute(){this.model.change(t=>{t.removeSelectionAttribute(this.attribute)})}_setSelectionAttributeFromTheNodeBefore(t){const e=this.attribute;this.model.change(i=>{i.setSelectionAttribute(this.attribute,t.nodeBefore.getAttribute(e))})}_skipNextAutomaticGravityRestoration(){this._isNextGravityRestorationSkipped=!0}}function Eg(t,e){return Ig(t,e)||Ng(t,e)}function Ig(t,e){const{nodeBefore:i,nodeAfter:n}=t,o=!!i&&i.hasAttribute(e);return!!n&&n.hasAttribute(e)&&(!o||i.getAttribute(e)!==n.getAttribute(e))}function Ng(t,e){const{nodeBefore:i,nodeAfter:n}=t,o=!!i&&i.hasAttribute(e),r=!!n&&n.hasAttribute(e);return o&&(!r||i.getAttribute(e)!==n.getAttribute(e))}function Og(t,e){const{nodeBefore:i,nodeAfter:n}=t,o=!!i&&i.hasAttribute(e);if(!!n&&n.hasAttribute(e)&&o)return n.getAttribute(e)!==i.getAttribute(e)}function Rg(t,e){return Eg(t.getShiftedBy(-1),e)}i(73);const Dg=\"ck-link_selected\",Lg=\"automatic\",jg=\"manual\",Vg=/^(https?:)?\\/\\//;class zg extends kd{static get pluginName(){return\"LinkEditing\"}constructor(t){super(t),t.config.define(\"link\",{addTargetToExternalLinks:!1})}init(){const t=this.editor,e=t.locale;t.model.schema.extend(\"$text\",{allowAttributes:\"linkHref\"}),t.conversion.for(\"dataDowncast\").attributeToElement({model:\"linkHref\",view:Tg}),t.conversion.for(\"editingDowncast\").attributeToElement({model:\"linkHref\",view:(t,e)=>Tg(Cg(t),e)}),t.conversion.for(\"upcast\").elementToAttribute({view:{name:\"a\",attributes:{href:!0}},model:{key:\"linkHref\",value:t=>t.getAttribute(\"href\")}}),t.commands.add(\"link\",new Jf(t)),t.commands.add(\"unlink\",new Zf(t));const i=function(t,e){const i={\"Open in a new tab\":t(\"bi\"),Downloadable:t(\"bj\")};return e.forEach(t=>(t.label&&i[t.label]&&(t.label=i[t.label]),t)),e}(t.t,function(t){const e=[];if(t)for(const[i,n]of Object.entries(t)){const t=Object.assign({},n,{id:`link${yg(i)}`});e.push(t)}return e}(t.config.get(\"link.decorators\")));this._enableAutomaticDecorators(i.filter(t=>t.mode===Lg)),this._enableManualDecorators(i.filter(t=>t.mode===jg)),function({view:t,model:e,emitter:i,attribute:n,locale:o}){const r=new Mg(e,i,n),s=e.document.selection;i.listenTo(t.document,\"keydown\",(t,e)=>{if(!s.isCollapsed)return;if(e.shiftKey||e.altKey||e.ctrlKey)return;const i=e.keyCode==bo.arrowright,n=e.keyCode==bo.arrowleft;if(!i&&!n)return;const a=s.getFirstPosition(),c=o.contentLanguageDirection;let l;(l=\"ltr\"===c&&i||\"rtl\"===c&&n?r.handleForwardMovement(a,e):r.handleBackwardMovement(a,e))&&t.stop()},{priority:Ji.get(\"high\")+1})}({view:t.editing.view,model:t.model,emitter:this,attribute:\"linkHref\",locale:e}),this._setupLinkHighlight()}_enableAutomaticDecorators(t){const e=this.editor,i=new Pg;e.config.get(\"link.addTargetToExternalLinks\")&&i.add({id:\"linkIsExternal\",mode:Lg,callback:t=>Vg.test(t),attributes:{target:\"_blank\",rel:\"noopener noreferrer\"}}),i.add(t),i.length&&e.conversion.for(\"downcast\").add(i.getDispatcher())}_enableManualDecorators(t){if(!t.length)return;const e=this.editor,i=e.commands.get(\"link\").manualDecorators;t.forEach(t=>{e.model.schema.extend(\"$text\",{allowAttributes:t.id}),i.add(new Sg(t)),e.conversion.for(\"downcast\").attributeToElement({model:t.id,view:(e,n)=>{if(e){const e=i.get(t.id).attributes,o=n.createAttributeElement(\"a\",e,{priority:5});return n.setCustomProperty(\"link\",!0,o),o}}}),e.conversion.for(\"upcast\").elementToAttribute({view:{name:\"a\",attributes:i.get(t.id).attributes},model:{key:t.id}})})}_setupLinkHighlight(){const t=this.editor,e=t.editing.view,i=new Set;e.document.registerPostFixer(e=>{const n=t.model.document.selection;let o=!1;if(n.hasAttribute(\"linkHref\")){const r=Qf(n.getFirstPosition(),n.getAttribute(\"linkHref\"),t.model),s=t.editing.mapper.toViewRange(r);for(const t of s.getItems())t.is(\"a\")&&!t.hasClass(Dg)&&(e.addClass(Dg,t),i.add(t),o=!0)}return o}),t.conversion.for(\"editingDowncast\").add(t=>{function n(){e.change(t=>{for(const e of i.values())t.removeClass(Dg,e),i.delete(e)})}t.on(\"insert\",n,{priority:\"highest\"}),t.on(\"remove\",n,{priority:\"highest\"}),t.on(\"attribute\",n,{priority:\"highest\"}),t.on(\"selection\",n,{priority:\"highest\"})})}}class Bg extends Xr{constructor(t){super(t),this.domEventType=\"click\"}onDomEvent(t){this.fire(t.type,t)}}i(75);class Fg extends Ll{constructor(t,e=[]){super(t);const i=t.t;this.focusTracker=new al,this.keystrokes=new Zc,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(i(\"bc\"),ju,\"ck-button-save\"),this.saveButtonView.type=\"submit\",this.cancelButtonView=this._createButton(i(\"bd\"),Vu,\"ck-button-cancel\",\"cancel\"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e),this.children=this._createFormChildren(e),this._focusables=new pl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:\"shift + tab\",focusNext:\"tab\"}});const n=[\"ck\",\"ck-link-form\"];e.length&&n.push(\"ck-link-form_layout-vertical\"),this.setTemplate({tag:\"form\",attributes:{class:n,tabindex:\"-1\"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((t,e)=>(t[e.name]=e.isOn,t),{})}render(){super.render(),Lu({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const t=this.locale.t,e=new Ru(this.locale,Du);return e.label=t(\"br\"),e.inputView.placeholder=\"https://example.com\",e}_createButton(t,e,i,n){const o=new nd(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.extendTemplate({attributes:{class:i}}),n&&o.delegate(\"execute\").to(this,n),o}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const i of t){const t=new ld(this.locale);t.set({name:i.id,label:i.label,withText:!0}),t.bind(\"isOn\").to(i,\"value\"),t.on(\"execute\",()=>{i.set(\"value\",!t.isOn)}),e.add(t)}return e}_createFormChildren(t){const e=this.createCollection();if(e.add(this.urlInputView),t.length){const t=new Ll;t.setTemplate({tag:\"ul\",children:this._manualDecoratorSwitches.map(t=>({tag:\"li\",children:[t],attributes:{class:[\"ck\",\"ck-list__item\"]}})),attributes:{class:[\"ck\",\"ck-reset\",\"ck-list\"]}}),e.add(t)}return e.add(this.saveButtonView),e.add(this.cancelButtonView),e}}var Ug='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.077 15l.991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zm4.919 10.562l-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z\"/></svg>',Hg='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.3 17.37l-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506L13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5L9.375 17H19v1.5H8z\"/></svg>';i(77);class Wg extends Ll{constructor(t){super(t);const e=t.t;this.focusTracker=new al,this.keystrokes=new Zc,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(e(\"bn\"),Ug,\"unlink\"),this.editButtonView=this._createButton(e(\"bo\"),Hg,\"edit\"),this.set(\"href\"),this._focusables=new pl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:\"shift + tab\",focusNext:\"tab\"}}),this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-link-actions\"],tabindex:\"-1\"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render(),[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(t,e,i){const n=new nd(this.locale);return n.set({label:t,icon:e,tooltip:!0}),n.delegate(\"execute\").to(this,i),n}_createPreviewButton(){const t=new nd(this.locale),e=this.bindTemplate,i=this.t;return t.set({withText:!0,tooltip:i(\"bp\")}),t.extendTemplate({attributes:{class:[\"ck\",\"ck-link-actions__preview\"],href:e.to(\"href\",t=>t&&Cg(t)),target:\"_blank\"}}),t.bind(\"label\").to(this,\"href\",t=>t||i(\"bq\")),t.bind(\"isEnabled\").to(this,\"href\",t=>!!t),t.template.tag=\"a\",t.template.eventListeners={},t}}var qg='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.077 15l.991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z\"/></svg>';const Yg=\"Ctrl+K\";class $g extends kd{static get requires(){return[Qu]}static get pluginName(){return\"LinkUI\"}init(){const t=this.editor;t.editing.view.addObserver(Bg),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=t.plugins.get(Qu),this._createToolbarLinkButton(),this._enableUserBalloonInteractions()}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const t=this.editor,e=new Wg(t.locale),i=t.commands.get(\"link\"),n=t.commands.get(\"unlink\");return e.bind(\"href\").to(i,\"value\"),e.editButtonView.bind(\"isEnabled\").to(i),e.unlinkButtonView.bind(\"isEnabled\").to(n),this.listenTo(e,\"edit\",()=>{this._addFormView()}),this.listenTo(e,\"unlink\",()=>{t.execute(\"unlink\"),this._hideUI()}),e.keystrokes.set(\"Esc\",(t,e)=>{this._hideUI(),e()}),e.keystrokes.set(Yg,(t,e)=>{this._addFormView(),e()}),e}_createFormView(){const t=this.editor,e=t.commands.get(\"link\"),i=new Fg(t.locale,e.manualDecorators);return i.urlInputView.bind(\"value\").to(e,\"value\"),i.urlInputView.bind(\"isReadOnly\").to(e,\"isEnabled\",t=>!t),i.saveButtonView.bind(\"isEnabled\").to(e),this.listenTo(i,\"submit\",()=>{t.execute(\"link\",i.urlInputView.inputView.element.value,i.getDecoratorSwitchesState()),this._closeFormView()}),this.listenTo(i,\"cancel\",()=>{this._closeFormView()}),i.keystrokes.set(\"Esc\",(t,e)=>{this._closeFormView(),e()}),i}_createToolbarLinkButton(){const t=this.editor,e=t.commands.get(\"link\"),i=t.t;t.keystrokes.set(Yg,(t,i)=>{i(),e.isEnabled&&this._showUI(!0)}),t.ui.componentFactory.add(\"link\",t=>{const n=new nd(t);return n.isEnabled=!0,n.label=i(\"w\"),n.icon=qg,n.keystroke=Yg,n.tooltip=!0,n.isToggleable=!0,n.bind(\"isEnabled\").to(e,\"isEnabled\"),n.bind(\"isOn\").to(e,\"value\",t=>!!t),this.listenTo(n,\"execute\",()=>this._showUI(!0)),n})}_enableUserBalloonInteractions(){const t=this.editor.editing.view.document;this.listenTo(t,\"click\",()=>{this._getSelectedLinkElement()&&this._showUI()}),this.editor.keystrokes.set(\"Tab\",(t,e)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),e())},{priority:\"high\"}),this.editor.keystrokes.set(\"Esc\",(t,e)=>{this._isUIVisible&&(this._hideUI(),e())}),dd({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel)return;const t=this.editor.commands.get(\"link\");this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.select(),this.formView.urlInputView.inputView.element.value=t.value||\"\"}_closeFormView(){const t=this.editor.commands.get(\"link\");t.restoreManualDecoratorStates(),void 0!==t.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus())}_showUI(t=!1){this.editor.commands.get(\"link\").isEnabled&&(this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),t&&this._balloon.showStack(\"main\")):(this._addActionsView(),t&&this._balloon.showStack(\"main\"),this._addFormView()),this._startUpdatingUI())}_hideUI(){if(!this._isUIInPanel)return;const t=this.editor;this.stopListening(t.ui,\"update\"),this.stopListening(this._balloon,\"change:visibleView\"),t.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView)}_startUpdatingUI(){const t=this.editor,e=t.editing.view.document;let i=this._getSelectedLinkElement(),n=r();const o=()=>{const t=this._getSelectedLinkElement(),e=r();i&&!t||!i&&e!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=t,n=e};function r(){return e.selection.focus.getAncestors().reverse().find(t=>t.is(\"element\"))}this.listenTo(t.ui,\"update\",o),this.listenTo(this._balloon,\"change:visibleView\",o)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){return this._balloon.visibleView==this.formView||this._areActionsVisible}_getBalloonPositionData(){const t=this.editor.editing.view,e=t.document,i=this._getSelectedLinkElement();return{target:i?t.domConverter.mapViewToDom(i):t.domConverter.viewRangeToDom(e.selection.getFirstRange())}}_getSelectedLinkElement(){const t=this.editor.editing.view,e=t.document.selection;if(e.isCollapsed)return Gg(e.getFirstPosition());{const i=e.getFirstRange().getTrimmed(),n=Gg(i.start),o=Gg(i.end);return n&&n==o&&t.createRangeIn(n).getTrimmed().isEqual(i)?n:null}}}function Gg(t){return t.getAncestors().find(t=>(function(t){return t.is(\"attributeElement\")&&!!t.getCustomProperty(\"link\")})(t))}class Qg extends Td{constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document,i=Array.from(e.selection.getSelectedBlocks()).filter(e=>Jg(e,t.schema)),n=!0===this.value;t.change(t=>{if(n){let e=i[i.length-1].nextSibling,n=Number.POSITIVE_INFINITY,o=[];for(;e&&\"listItem\"==e.name&&0!==e.getAttribute(\"listIndent\");){const t=e.getAttribute(\"listIndent\");t<n&&(n=t);const i=t-n;o.push({element:e,listIndent:i}),e=e.nextSibling}o=o.reverse();for(const e of o)t.setAttribute(\"listIndent\",e.listIndent,e.element)}if(!n){let t=Number.POSITIVE_INFINITY;for(const e of i)e.is(\"listItem\")&&e.getAttribute(\"listIndent\")<t&&(t=e.getAttribute(\"listIndent\"));Kg(i,!0,t=0===t?1:t),Kg(i,!1,t)}for(const e of i.reverse())n&&\"listItem\"==e.name?t.rename(e,\"paragraph\"):n||\"listItem\"==e.name?n||\"listItem\"!=e.name||e.getAttribute(\"listType\")==this.type||t.setAttribute(\"listType\",this.type,e):(t.setAttributes({listType:this.type,listIndent:0},e),t.rename(e,\"listItem\"))})}_getValue(){const t=Fh(this.editor.model.document.selection.getSelectedBlocks());return!!t&&t.is(\"listItem\")&&t.getAttribute(\"listType\")==this.type}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,i=Fh(t.getSelectedBlocks());return!!i&&Jg(i,e)}}function Kg(t,e,i){const n=e?t[0]:t[t.length-1];if(n.is(\"listItem\")){let o=n[e?\"previousSibling\":\"nextSibling\"],r=n.getAttribute(\"listIndent\");for(;o&&o.is(\"listItem\")&&o.getAttribute(\"listIndent\")>=i;)r>o.getAttribute(\"listIndent\")&&(r=o.getAttribute(\"listIndent\")),o.getAttribute(\"listIndent\")==r&&t[e?\"unshift\":\"push\"](o),o=o[e?\"previousSibling\":\"nextSibling\"]}}function Jg(t,e){return e.checkChild(t.parent,\"listItem\")&&!e.isObject(t)}class Zg extends Td{constructor(t,e){super(t),this._indentBy=\"forward\"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document;let i=Array.from(e.selection.getSelectedBlocks());t.change(t=>{const e=i[i.length-1];let n=e.nextSibling;for(;n&&\"listItem\"==n.name&&n.getAttribute(\"listIndent\")>e.getAttribute(\"listIndent\");)i.push(n),n=n.nextSibling;this._indentBy<0&&(i=i.reverse());for(const e of i){const i=e.getAttribute(\"listIndent\")+this._indentBy;i<0?t.rename(e,\"paragraph\"):t.setAttribute(\"listIndent\",i,e)}})}_checkEnabled(){const t=Fh(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is(\"listItem\"))return!1;if(this._indentBy>0){const e=t.getAttribute(\"listIndent\"),i=t.getAttribute(\"listType\");let n=t.previousSibling;for(;n&&n.is(\"listItem\")&&n.getAttribute(\"listIndent\")>=e;){if(n.getAttribute(\"listIndent\")==e)return n.getAttribute(\"listType\")==i;n=n.previousSibling}return!1}return!0}}function Xg(t,e){const i=e.mapper,n=e.writer,o=\"numbered\"==t.getAttribute(\"listType\")?\"ol\":\"ul\",r=function(t){const e=t.createContainerElement(\"li\");return e.getFillerOffset=rm,e}(n),s=n.createContainerElement(o,null);return n.insert(n.createPositionAt(s,0),r),i.bindElements(t,r),r}function tm(t,e,i,n){const o=e.parent,r=i.mapper,s=i.writer;let a=r.toViewPosition(n.createPositionBefore(t));const c=nm(t.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:t.getAttribute(\"listIndent\")}),l=t.previousSibling;if(c&&c.getAttribute(\"listIndent\")==t.getAttribute(\"listIndent\")){const t=r.toViewElement(c);a=s.breakContainer(s.createPositionAfter(t))}else a=l&&\"listItem\"==l.name?r.toViewPosition(n.createPositionAt(l,\"end\")):r.toViewPosition(n.createPositionBefore(t));if(a=im(a),s.insert(a,o),l&&\"listItem\"==l.name){const t=r.toViewElement(l),i=s.createRange(s.createPositionAt(t,0),a).getWalker({ignoreElementEnd:!0});for(const t of i)if(t.item.is(\"li\")){const n=s.breakContainer(s.createPositionBefore(t.item)),o=t.item.parent,r=s.createPositionAt(e,\"end\");em(s,r.nodeBefore,r.nodeAfter),s.move(s.createRangeOn(o),r),i.position=n}}else{const i=o.nextSibling;if(i&&(i.is(\"ul\")||i.is(\"ol\"))){let n=null;for(const e of i.getChildren()){const i=r.toModelElement(e);if(!(i&&i.getAttribute(\"listIndent\")>t.getAttribute(\"listIndent\")))break;n=e}n&&(s.breakContainer(s.createPositionAfter(n)),s.move(s.createRangeOn(n.parent),s.createPositionAt(e,\"end\")))}}em(s,o,o.nextSibling),em(s,o.previousSibling,o)}function em(t,e,i){return!e||!i||\"ul\"!=e.name&&\"ol\"!=e.name?null:e.name!=i.name||e.getAttribute(\"class\")!==i.getAttribute(\"class\")?null:t.mergeContainers(t.createPositionAfter(e))}function im(t){return t.getLastMatchingPosition(t=>t.item.is(\"uiElement\"))}function nm(t,e){const i=!!e.sameIndent,n=!!e.smallerIndent,o=e.listIndent;let r=t;for(;r&&\"listItem\"==r.name;){const t=r.getAttribute(\"listIndent\");if(i&&o==t||n&&o>t)return r;r=r.previousSibling}return null}function om(t,e,i,n){t.ui.componentFactory.add(e,o=>{const r=t.commands.get(e),s=new nd(o);return s.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),s.bind(\"isOn\",\"isEnabled\").to(r,\"value\",\"isEnabled\"),s.on(\"execute\",()=>t.execute(e)),s})}function rm(){const t=!this.isEmpty&&(\"ul\"==this.getChild(0).name||\"ol\"==this.getChild(0).name);return this.isEmpty||t?0:xn.call(this)}function sm(t){return(e,i,n)=>{const o=n.consumable;if(!o.test(i.item,\"insert\")||!o.test(i.item,\"attribute:listType\")||!o.test(i.item,\"attribute:listIndent\"))return;o.consume(i.item,\"insert\"),o.consume(i.item,\"attribute:listType\"),o.consume(i.item,\"attribute:listIndent\");const r=i.item;tm(r,Xg(r,n),n,t)}}function am(t,e,i){if(!i.consumable.consume(e.item,\"attribute:listType\"))return;const n=i.mapper.toViewElement(e.item),o=i.writer;o.breakContainer(o.createPositionBefore(n)),o.breakContainer(o.createPositionAfter(n));const r=n.parent,s=\"numbered\"==e.attributeNewValue?\"ol\":\"ul\";o.rename(s,r)}function cm(t,e,i){const n=i.mapper.toViewElement(e.item).parent,o=i.writer;em(o,n,n.nextSibling),em(o,n.previousSibling,n);for(const t of e.item.getChildren())i.consumable.consume(t,\"insert\")}function lm(t,e,i){if(\"listItem\"!=e.item.name){let t=i.mapper.toViewPosition(e.range.start);const n=i.writer,o=[];for(;(\"ul\"==t.parent.name||\"ol\"==t.parent.name)&&\"li\"==(t=n.breakContainer(t)).parent.name;){const e=t,i=n.createPositionAt(t.parent,\"end\");if(!e.isEqual(i)){const t=n.remove(n.createRange(e,i));o.push(t)}t=n.createPositionAfter(t.parent)}if(o.length>0){for(let e=0;e<o.length;e++){const i=t.nodeBefore;if(t=n.insert(t,o[e]).end,e>0){const e=em(n,i,i.nextSibling);e&&e.parent==i&&t.offset--}}em(n,t.nodeBefore,t.nodeAfter)}}}function dm(t,e,i){const n=i.mapper.toViewPosition(e.position),o=n.nodeBefore,r=n.nodeAfter;em(i.writer,o,r)}function hm(t,e,i){if(i.consumable.consume(e.viewItem,{name:!0})){const t=i.writer,n=t.createElement(\"listItem\"),o=function(t){let e=0,i=t.parent;for(;i;){if(i.is(\"li\"))e++;else{const t=i.previousSibling;t&&t.is(\"li\")&&e++}i=i.parent}return e}(e.viewItem);t.setAttribute(\"listIndent\",o,n);const r=e.viewItem.parent&&\"ol\"==e.viewItem.parent.name?\"numbered\":\"bulleted\";t.setAttribute(\"listType\",r,n);const s=i.splitToAllowedParent(n,e.modelCursor);if(!s)return;t.insert(n,s.position);const a=function(t,e,i){const{writer:n,schema:o}=i;let r=n.createPositionAfter(t);for(const s of e)if(\"ul\"==s.name||\"ol\"==s.name)r=i.convertItem(s,r).modelCursor;else{const e=i.convertItem(s,n.createPositionAt(t,\"end\")),a=e.modelRange.start.nodeAfter,c=a&&a.is(\"element\")&&!o.checkChild(t,a.name);c&&(t=e.modelCursor.parent.is(\"listItem\")?e.modelCursor.parent:pm(e.modelCursor),r=n.createPositionAfter(t))}return r}(n,e.viewItem.getChildren(),i);e.modelRange=t.createRange(e.modelCursor,a),s.cursorParent?e.modelCursor=t.createPositionAt(s.cursorParent,0):e.modelCursor=e.modelRange.end}}function um(t,e,i){if(i.consumable.test(e.viewItem,{name:!0})){const t=Array.from(e.viewItem.getChildren());for(const e of t){!(e.is(\"li\")||wm(e))&&e._remove()}}}function fm(t,e,i){if(i.consumable.test(e.viewItem,{name:!0})){if(0===e.viewItem.childCount)return;const t=[...e.viewItem.getChildren()];let i=!1,n=!0;for(const e of t)i&&!wm(e)&&e._remove(),e.is(\"text\")?(n&&(e._data=e.data.replace(/^\\s+/,\"\")),e.nextSibling&&!wm(e.nextSibling)||(e._data=e.data.replace(/\\s+$/,\"\"))):wm(e)&&(i=!0),n=!1}}function gm(t){return(e,i)=>{if(i.isPhantom)return;const n=i.modelPosition.nodeBefore;if(n&&n.is(\"listItem\")){const e=i.mapper.toViewElement(n),o=e.getAncestors().find(wm),r=t.createPositionAt(e,0).getWalker();for(const t of r){if(\"elementStart\"==t.type&&t.item.is(\"li\")){i.viewPosition=t.previousPosition;break}if(\"elementEnd\"==t.type&&t.item==o){i.viewPosition=t.nextPosition;break}}}}}function mm(t,[e,i]){let n,o=e.is(\"documentFragment\")?e.getChild(0):e;if(n=i?this.createSelection(i):this.document.selection,o&&o.is(\"listItem\")){const t=n.getFirstPosition();let e=null;if(t.parent.is(\"listItem\")?e=t.parent:t.nodeBefore&&t.nodeBefore.is(\"listItem\")&&(e=t.nodeBefore),e){const t=e.getAttribute(\"listIndent\");if(t>0)for(;o&&o.is(\"listItem\");)o._setAttribute(\"listIndent\",o.getAttribute(\"listIndent\")+t),o=o.nextSibling}}}function pm(t){const e=new Hs({startPosition:t});let i;do{i=e.next()}while(!i.value.item.is(\"listItem\"));return i.value.item}function bm(t,e,i,n,o,r){const s=nm(e.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:t,foo:\"b\"}),a=o.mapper,c=o.writer,l=s?s.getAttribute(\"listIndent\"):null;let d;if(s)if(l==t){const t=a.toViewElement(s).parent;d=c.createPositionAfter(t)}else{const t=r.createPositionAt(s,\"end\");d=a.toViewPosition(t)}else d=i;d=im(d);for(const t of[...n.getChildren()])wm(t)&&(d=c.move(c.createRangeOn(t),d).end,em(c,t,t.nextSibling),em(c,t.previousSibling,t))}function wm(t){return t.is(\"ol\")||t.is(\"ul\")}class _m extends kd{static get pluginName(){return\"ListEditing\"}static get requires(){return[Jh]}init(){const t=this.editor;t.model.schema.register(\"listItem\",{inheritAllFrom:\"$block\",allowAttributes:[\"listType\",\"listIndent\"]});const e=t.data,i=t.editing;t.model.document.registerPostFixer(e=>(function(t,e){const i=t.document.differ.getChanges(),n=new Map;let o=!1;for(const n of i)if(\"insert\"==n.type&&\"listItem\"==n.name)r(n.position);else if(\"insert\"==n.type&&\"listItem\"!=n.name){if(\"$text\"!=n.name){const i=n.position.nodeAfter;i.hasAttribute(\"listIndent\")&&(e.removeAttribute(\"listIndent\",i),o=!0),i.hasAttribute(\"listType\")&&(e.removeAttribute(\"listType\",i),o=!0);for(const e of Array.from(t.createRangeIn(i)).filter(t=>t.item.is(\"listItem\")))r(e.previousPosition)}r(n.position.getShiftedBy(n.length))}else\"remove\"==n.type&&\"listItem\"==n.name?r(n.position):\"attribute\"==n.type&&\"listIndent\"==n.attributeKey?r(n.range.start):\"attribute\"==n.type&&\"listType\"==n.attributeKey&&r(n.range.start);for(const t of n.values())s(t),a(t);return o;function r(t){const e=t.nodeBefore;if(e&&e.is(\"listItem\")){let i=e;if(n.has(i))return;for(;i.previousSibling&&i.previousSibling.is(\"listItem\");)if(i=i.previousSibling,n.has(i))return;n.set(t.nodeBefore,i)}else{const e=t.nodeAfter;e&&e.is(\"listItem\")&&n.set(e,e)}}function s(t){let i=0,n=null;for(;t&&t.is(\"listItem\");){const r=t.getAttribute(\"listIndent\");if(r>i){let s;null===n?(n=r-i,s=i):(n>r&&(n=r),s=r-n),e.setAttribute(\"listIndent\",s,t),o=!0}else n=null,i=t.getAttribute(\"listIndent\")+1;t=t.nextSibling}}function a(t){let i=[],n=null;for(;t&&t.is(\"listItem\");){const r=t.getAttribute(\"listIndent\");if(n&&n.getAttribute(\"listIndent\")>r&&(i=i.slice(0,r+1)),0!=r)if(i[r]){const n=i[r];t.getAttribute(\"listType\")!=n&&(e.setAttribute(\"listType\",n,t),o=!0)}else i[r]=t.getAttribute(\"listType\");n=t,t=t.nextSibling}}})(t.model,e)),i.mapper.registerViewToModelLength(\"li\",km),e.mapper.registerViewToModelLength(\"li\",km),i.mapper.on(\"modelToViewPosition\",gm(i.view)),i.mapper.on(\"viewToModelPosition\",function(t){return(e,i)=>{const n=i.viewPosition,o=n.parent,r=i.mapper;if(\"ul\"==o.name||\"ol\"==o.name){if(n.isAtEnd){const e=r.toModelElement(n.nodeBefore),o=r.getModelLength(n.nodeBefore);i.modelPosition=t.createPositionBefore(e).getShiftedBy(o)}else{const e=r.toModelElement(n.nodeAfter);i.modelPosition=t.createPositionBefore(e)}e.stop()}else if(\"li\"==o.name&&n.nodeBefore&&(\"ul\"==n.nodeBefore.name||\"ol\"==n.nodeBefore.name)){const s=r.toModelElement(o);let a=1,c=n.nodeBefore;for(;c&&wm(c);)a+=r.getModelLength(c),c=c.previousSibling;i.modelPosition=t.createPositionBefore(s).getShiftedBy(a),e.stop()}}}(t.model)),e.mapper.on(\"modelToViewPosition\",gm(i.view)),i.downcastDispatcher.on(\"insert\",lm,{priority:\"high\"}),i.downcastDispatcher.on(\"insert:listItem\",sm(t.model)),e.downcastDispatcher.on(\"insert\",lm,{priority:\"high\"}),e.downcastDispatcher.on(\"insert:listItem\",sm(t.model)),i.downcastDispatcher.on(\"attribute:listType:listItem\",am,{priority:\"high\"}),i.downcastDispatcher.on(\"attribute:listType:listItem\",cm,{priority:\"low\"}),i.downcastDispatcher.on(\"attribute:listIndent:listItem\",function(t){return(e,i,n)=>{if(!n.consumable.consume(i.item,\"attribute:listIndent\"))return;const o=n.mapper.toViewElement(i.item),r=n.writer;r.breakContainer(r.createPositionBefore(o)),r.breakContainer(r.createPositionAfter(o));const s=o.parent,a=s.previousSibling,c=r.createRangeOn(s);r.remove(c),a&&a.nextSibling&&em(r,a,a.nextSibling),bm(i.attributeOldValue+1,i.range.start,c.start,o,n,t),tm(i.item,o,n,t);for(const t of i.item.getChildren())n.consumable.consume(t,\"insert\")}}(t.model)),i.downcastDispatcher.on(\"remove:listItem\",function(t){return(e,i,n)=>{const o=n.mapper.toViewPosition(i.position).getLastMatchingPosition(t=>!t.item.is(\"li\")).nodeAfter,r=n.writer;r.breakContainer(r.createPositionBefore(o)),r.breakContainer(r.createPositionAfter(o));const s=o.parent,a=s.previousSibling,c=r.createRangeOn(s),l=r.remove(c);a&&a.nextSibling&&em(r,a,a.nextSibling),bm(n.mapper.toModelElement(o).getAttribute(\"listIndent\")+1,i.position,c.start,o,n,t);for(const t of r.createRangeIn(l).getItems())n.mapper.unbindViewElement(t);e.stop()}}(t.model)),i.downcastDispatcher.on(\"remove\",dm,{priority:\"low\"}),e.upcastDispatcher.on(\"element:ul\",um,{priority:\"high\"}),e.upcastDispatcher.on(\"element:ol\",um,{priority:\"high\"}),e.upcastDispatcher.on(\"element:li\",fm,{priority:\"high\"}),e.upcastDispatcher.on(\"element:li\",hm),t.model.on(\"insertContent\",mm,{priority:\"high\"}),t.commands.add(\"numberedList\",new Qg(t,\"numbered\")),t.commands.add(\"bulletedList\",new Qg(t,\"bulleted\")),t.commands.add(\"indentList\",new Zg(t,\"forward\")),t.commands.add(\"outdentList\",new Zg(t,\"backward\"));const n=i.view.document;this.listenTo(n,\"enter\",(t,e)=>{const i=this.editor.model.document,n=i.selection.getLastPosition().parent;i.selection.isCollapsed&&\"listItem\"==n.name&&n.isEmpty&&(this.editor.execute(\"outdentList\"),e.preventDefault(),t.stop())}),this.listenTo(n,\"delete\",(t,e)=>{if(\"backward\"!==e.direction)return;const i=this.editor.model.document.selection;if(!i.isCollapsed)return;const n=i.getFirstPosition();if(!n.isAtStart)return;const o=n.parent;\"listItem\"===o.name&&(o.previousSibling&&\"listItem\"===o.previousSibling.name||(this.editor.execute(\"outdentList\"),e.preventDefault(),t.stop()))},{priority:\"high\"});const o=t=>(e,i)=>{this.editor.commands.get(t).isEnabled&&(this.editor.execute(t),i())};t.keystrokes.set(\"Tab\",o(\"indentList\")),t.keystrokes.set(\"Shift+Tab\",o(\"outdentList\"))}afterInit(){const t=this.editor.commands,e=t.get(\"indent\"),i=t.get(\"outdent\");e&&e.registerChildCommand(t.get(\"indentList\")),i&&i.registerChildCommand(t.get(\"outdentList\"))}}function km(t){let e=1;for(const i of t.getChildren())if(\"ul\"==i.name||\"ol\"==i.name)for(const t of i.getChildren())e+=km(t);return e}var vm='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z\"/></svg>',ym='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z\"/></svg>';class xm extends kd{init(){const t=this.editor.t;om(this.editor,\"numberedList\",t(\"u\"),vm),om(this.editor,\"bulletedList\",t(\"v\"),ym)}}function Am(t,e){return t=>{t.on(\"attribute:url:media\",i)};function i(i,n,o){if(!o.consumable.consume(n.item,i.name))return;const r=n.attributeNewValue,s=o.writer,a=o.mapper.toViewElement(n.item);s.remove(s.createRangeIn(a));const c=t.getMediaViewElement(s,r,e);s.insert(s.createPositionAt(a,0),c)}}function Tm(t,e,i,n){const o=t.createContainerElement(\"figure\",{class:\"media\"});return o.getFillerOffset=Sm,t.insert(t.createPositionAt(o,0),e.getMediaViewElement(t,i,n)),o}function Cm(t){const e=t.getSelectedElement();return e&&e.is(\"media\")?e:null}function Pm(t,e,i){t.change(n=>{const o=n.createElement(\"media\",{url:e});t.insertContent(o,i),n.setSelection(o,\"on\")})}function Sm(){return null}class Mm extends Td{refresh(){const t=this.editor.model,e=t.document.selection,i=t.schema,n=e.getFirstPosition(),o=Cm(e);let r=n.parent;r!=r.root&&(r=r.parent),this.value=o?o.getAttribute(\"url\"):null,this.isEnabled=i.checkChild(r,\"media\")}execute(t){const e=this.editor.model,i=e.document.selection,n=Cm(i);if(n)e.change(e=>{e.setAttribute(\"url\",t,n)});else{const n=_u(i,e);Pm(e,t,n)}}}var Em='<svg viewBox=\"0 0 64 42\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M47.426 17V3.713L63.102 0v19.389h-.001l.001.272c0 1.595-2.032 3.43-4.538 4.098-2.506.668-4.538-.083-4.538-1.678 0-1.594 2.032-3.43 4.538-4.098.914-.244 2.032-.565 2.888-.603V4.516L49.076 7.447v9.556A1.014 1.014 0 0 0 49 17h-1.574zM29.5 17h-8.343a7.073 7.073 0 1 0-4.657 4.06v3.781H3.3a2.803 2.803 0 0 1-2.8-2.804V8.63a2.803 2.803 0 0 1 2.8-2.805h4.082L8.58 2.768A1.994 1.994 0 0 1 10.435 1.5h8.985c.773 0 1.477.448 1.805 1.149l1.488 3.177H26.7c1.546 0 2.8 1.256 2.8 2.805V17zm-11.637 0H17.5a1 1 0 0 0-1 1v.05A4.244 4.244 0 1 1 17.863 17zm29.684 2c.97 0 .953-.048.953.889v20.743c0 .953.016.905-.953.905H19.453c-.97 0-.953.048-.953-.905V19.89c0-.937-.016-.889.97-.889h28.077zm-4.701 19.338V22.183H24.154v16.155h18.692zM20.6 21.375v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616V37.53H20.6zm24.233-16.155v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615V37.53h-1.615zM29.485 25.283a.4.4 0 0 1 .593-.35l9.05 4.977a.4.4 0 0 1 0 .701l-9.05 4.978a.4.4 0 0 1-.593-.35v-9.956z\"/></svg>';const Im=\"0 0 64 42\";class Nm{constructor(t,e){const i=e.providers,n=e.extraProviders||[],o=new Set(e.removeProviders),r=i.concat(n).filter(t=>{const e=t.name;return e?!o.has(e):(console.warn(Object($i.a)(\"media-embed-no-provider-name: The configured media provider has no name and cannot be used.\"),{provider:t}),!1)});this.locale=t,this.providerDefinitions=r}hasMedia(t){return!!this._getMedia(t)}getMediaViewElement(t,e,i){return this._getMedia(e).getViewElement(t,i)}_getMedia(t){if(!t)return new Om(this.locale);t=t.trim();for(const e of this.providerDefinitions){const i=e.html;let n=e.url;Array.isArray(n)||(n=[n]);for(const e of n){const n=this._getUrlMatches(t,e);if(n)return new Om(this.locale,t,n,i)}}return null}_getUrlMatches(t,e){let i=t.match(e);if(i)return i;let n=t.replace(/^https?:\\/\\//,\"\");return(i=n.match(e))?i:(i=(n=n.replace(/^www\\./,\"\")).match(e))||null}}class Om{constructor(t,e,i,n){this.url=this._getValidUrl(e),this._t=t.t,this._match=i,this._previewRenderer=n}getViewElement(t,e){const i={};if(e.renderForEditingView||e.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(i[\"data-oembed-url\"]=this.url),e.renderForEditingView&&(i.class=\"ck-media__wrapper\");const n=this._getPreviewHtml(e);return t.createUIElement(\"div\",i,function(t){const e=this.toDomElement(t);return e.innerHTML=n,e})}return this.url&&(i.url=this.url),t.createEmptyElement(\"oembed\",i)}_getPreviewHtml(t){return this._previewRenderer?this._previewRenderer(this._match):this.url&&t.renderForEditingView?this._getPlaceholderHtml():\"\"}_getPlaceholderHtml(){const t=new id,e=new ed;return t.text=this._t(\"Open media in new tab\"),e.content=Em,e.viewBox=Im,new wl({tag:\"div\",attributes:{class:\"ck ck-reset_all ck-media__placeholder\"},children:[{tag:\"div\",attributes:{class:\"ck-media__placeholder__icon\"},children:[e]},{tag:\"a\",attributes:{class:\"ck-media__placeholder__url\",target:\"_blank\",rel:\"noopener noreferrer\",href:this.url},children:[{tag:\"span\",attributes:{class:\"ck-media__placeholder__url__text\"},children:[this.url]},t]}]}).render().outerHTML}_getValidUrl(t){return t?t.match(/^https?/)?t:\"https://\"+t:null}}i(79);class Rm extends kd{static get pluginName(){return\"MediaEmbedEditing\"}constructor(t){super(t),t.config.define(\"mediaEmbed\",{providers:[{name:\"dailymotion\",url:/^dailymotion\\.com\\/video\\/(\\w+)/,html:t=>{return'<div style=\"position: relative; padding-bottom: 100%; height: 0; \">'+`<iframe src=\"https://www.dailymotion.com/embed/video/${t[1]}\" `+'style=\"position: absolute; width: 100%; height: 100%; top: 0; left: 0;\" frameborder=\"0\" width=\"480\" height=\"270\" allowfullscreen allow=\"autoplay\"></iframe></div>'}},{name:\"spotify\",url:[/^open\\.spotify\\.com\\/(artist\\/\\w+)/,/^open\\.spotify\\.com\\/(album\\/\\w+)/,/^open\\.spotify\\.com\\/(track\\/\\w+)/],html:t=>{return'<div style=\"position: relative; padding-bottom: 100%; height: 0; padding-bottom: 126%;\">'+`<iframe src=\"https://open.spotify.com/embed/${t[1]}\" `+'style=\"position: absolute; width: 100%; height: 100%; top: 0; left: 0;\" frameborder=\"0\" allowtransparency=\"true\" allow=\"encrypted-media\"></iframe></div>'}},{name:\"youtube\",url:[/^(?:m\\.)?youtube\\.com\\/watch\\?v=([\\w-]+)/,/^(?:m\\.)?youtube\\.com\\/v\\/([\\w-]+)/,/^youtube\\.com\\/embed\\/([\\w-]+)/,/^youtu\\.be\\/([\\w-]+)/],html:t=>{return'<div style=\"position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;\">'+`<iframe src=\"https://www.youtube.com/embed/${t[1]}\" `+'style=\"position: absolute; width: 100%; height: 100%; top: 0; left: 0;\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen></iframe></div>'}},{name:\"vimeo\",url:[/^vimeo\\.com\\/(\\d+)/,/^vimeo\\.com\\/[^/]+\\/[^/]+\\/video\\/(\\d+)/,/^vimeo\\.com\\/album\\/[^/]+\\/video\\/(\\d+)/,/^vimeo\\.com\\/channels\\/[^/]+\\/(\\d+)/,/^vimeo\\.com\\/groups\\/[^/]+\\/videos\\/(\\d+)/,/^vimeo\\.com\\/ondemand\\/[^/]+\\/(\\d+)/,/^player\\.vimeo\\.com\\/video\\/(\\d+)/],html:t=>{return'<div style=\"position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;\">'+`<iframe src=\"https://player.vimeo.com/video/${t[1]}\" `+'style=\"position: absolute; width: 100%; height: 100%; top: 0; left: 0;\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>'}},{name:\"instagram\",url:/^instagram\\.com\\/p\\/(\\w+)/},{name:\"twitter\",url:/^twitter\\.com/},{name:\"googleMaps\",url:/^google\\.com\\/maps/},{name:\"flickr\",url:/^flickr\\.com/},{name:\"facebook\",url:/^facebook\\.com/}]}),this.registry=new Nm(t.locale,t.config.get(\"mediaEmbed\"))}init(){const t=this.editor,e=t.model.schema,i=t.t,n=t.conversion,o=t.config.get(\"mediaEmbed.previewsInData\"),r=this.registry;t.commands.add(\"mediaEmbed\",new Mm(t)),e.register(\"media\",{isObject:!0,isBlock:!0,allowWhere:\"$block\",allowAttributes:[\"url\"]}),n.for(\"dataDowncast\").elementToElement({model:\"media\",view:(t,e)=>{const i=t.getAttribute(\"url\");return Tm(e,r,i,{renderMediaPreview:i&&o})}}),n.for(\"dataDowncast\").add(Am(r,{renderMediaPreview:o})),n.for(\"editingDowncast\").elementToElement({model:\"media\",view:(t,e)=>{const n=t.getAttribute(\"url\");return function(t,e,i){return e.setCustomProperty(\"media\",!0,t),pu(t,e,{label:i})}(Tm(e,r,n,{renderForEditingView:!0}),e,i(\"x\"))}}),n.for(\"editingDowncast\").add(Am(r,{renderForEditingView:!0})),n.for(\"upcast\").elementToElement({view:{name:\"oembed\",attributes:{url:!0}},model:(t,e)=>{const i=t.getAttribute(\"url\");if(r.hasMedia(i))return e.createElement(\"media\",{url:i})}}).elementToElement({view:{name:\"div\",attributes:{\"data-oembed-url\":!0}},model:(t,e)=>{const i=t.getAttribute(\"data-oembed-url\");if(r.hasMedia(i))return e.createElement(\"media\",{url:i})}})}}const Dm=/^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w.-]+)+[\\w\\-._~:/?#[\\]@!$&'()*+,;=]+$/;class Lm extends kd{static get requires(){return[Ad,ph]}static get pluginName(){return\"AutoMediaEmbed\"}constructor(t){super(t),this._timeoutId=null,this._positionToInsert=null}init(){const t=this.editor,e=t.model.document;this.listenTo(t.plugins.get(Ad),\"inputTransformation\",()=>{const t=e.selection.getFirstRange(),i=Lc.fromPosition(t.start);i.stickiness=\"toPrevious\";const n=Lc.fromPosition(t.end);n.stickiness=\"toNext\",e.once(\"change:data\",()=>{this._embedMediaBetweenPositions(i,n),i.detach(),n.detach()},{priority:\"high\"})}),t.commands.get(\"undo\").on(\"execute\",()=>{this._timeoutId&&(tr.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:\"high\"})}_embedMediaBetweenPositions(t,e){const i=this.editor,n=i.plugins.get(Rm).registry,o=new oa(t,e),r=o.getWalker({ignoreElementEnd:!0});let s=\"\";for(const t of r)t.item.is(\"textProxy\")&&(s+=t.item.data);if(!(s=s.trim()).match(Dm))return;if(!n.hasMedia(s))return;i.commands.get(\"mediaEmbed\").isEnabled&&(this._positionToInsert=Lc.fromPosition(t),this._timeoutId=tr.window.setTimeout(()=>{i.model.change(t=>{let e;this._timeoutId=null,t.remove(o),\"$graveyard\"!==this._positionToInsert.root.rootName&&(e=this._positionToInsert),Pm(i.model,s,e),this._positionToInsert.detach(),this._positionToInsert=null})},100))}}i(81);class jm extends Ll{constructor(t,e){super(e);const i=e.t;this.focusTracker=new al,this.keystrokes=new Zc,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(i(\"bc\"),ju,\"ck-button-save\"),this.saveButtonView.type=\"submit\",this.cancelButtonView=this._createButton(i(\"bd\"),Vu,\"ck-button-cancel\",\"cancel\"),this._focusables=new pl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:\"shift + tab\",focusNext:\"tab\"}}),this._validators=t,this.setTemplate({tag:\"form\",attributes:{class:[\"ck\",\"ck-media-form\"],tabindex:\"-1\"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),Lu({view:this}),[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element);const t=t=>t.stopPropagation();this.keystrokes.set(\"arrowright\",t),this.keystrokes.set(\"arrowleft\",t),this.keystrokes.set(\"arrowup\",t),this.keystrokes.set(\"arrowdown\",t),this.listenTo(this.urlInputView.element,\"selectstart\",(t,e)=>{e.stopPropagation()},{priority:\"high\"})}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.inputView.element.value.trim()}set url(t){this.urlInputView.inputView.element.value=t.trim()}isValid(){this.resetFormStatus();for(const t of this._validators){const e=t(this);if(e)return this.urlInputView.errorText=e,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const t=this.locale.t,e=new Ru(this.locale,Du),i=e.inputView;return this._urlInputViewInfoDefault=t(\"bk\"),this._urlInputViewInfoTip=t(\"bl\"),e.label=t(\"bm\"),e.infoText=this._urlInputViewInfoDefault,i.placeholder=\"https://example.com\",i.on(\"input\",()=>{e.infoText=i.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault}),e}_createButton(t,e,i,n){const o=new nd(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.extendTemplate({attributes:{class:i}}),n&&o.delegate(\"execute\").to(this,n),o}}var Vm='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M18.68 2.53c.6 0 .59-.03.59.55v12.84c0 .59.01.56-.59.56H1.29c-.6 0-.59.03-.59-.56V3.08c0-.58-.01-.55.6-.55h17.38zM15.77 14.5v-10H4.2v10h11.57zM2 4v1h1V4H2zm0 2v1h1V6H2zm0 2v1h1V8H2zm0 2v1h1v-1H2zm0 2v1h1v-1H2zm0 2v1h1v-1H2zM17 4v1h1V4h-1zm0 2v1h1V6h-1zm0 2v1h1V8h-1zm0 2v1h1v-1h-1zm0 2v1h1v-1h-1zm0 2v1h1v-1h-1zM7.5 6.677a.4.4 0 0 1 .593-.351l5.133 2.824a.4.4 0 0 1 0 .7l-5.133 2.824a.4.4 0 0 1-.593-.35V6.676z\"/></svg>';class zm extends kd{static get requires(){return[Rm]}static get pluginName(){return\"MediaEmbedUI\"}init(){const t=this.editor,e=t.commands.get(\"mediaEmbed\"),i=t.plugins.get(Rm).registry;this.form=new jm(function(t,e){return[e=>{if(!e.url.length)return t(\"z\")},i=>{if(!e.hasMedia(i.url))return t(\"aa\")}]}(t.t,i),t.locale),t.ui.componentFactory.add(\"mediaEmbed\",i=>{const n=hd(i);return this._setUpDropdown(n,this.form,e,t),this._setUpForm(this.form,n,e),n})}_setUpDropdown(t,e,i){const n=this.editor,o=n.t,r=t.buttonView;function s(){n.editing.view.focus(),t.isOpen=!1}t.bind(\"isEnabled\").to(i),t.panelView.children.add(e),r.set({label:o(\"y\"),icon:Vm,tooltip:!0}),r.on(\"open\",()=>{e.url=i.value||\"\",e.urlInputView.select(),e.focus()},{priority:\"low\"}),t.on(\"submit\",()=>{e.isValid()&&(n.execute(\"mediaEmbed\",e.url),s())}),t.on(\"change:isOpen\",()=>e.resetFormStatus()),t.on(\"cancel\",()=>s())}_setUpForm(t,e,i){t.delegate(\"submit\",\"cancel\").to(e),t.urlInputView.bind(\"value\").to(i,\"value\"),t.urlInputView.bind(\"isReadOnly\").to(i,\"isEnabled\",t=>!t),t.saveButtonView.bind(\"isEnabled\").to(i)}}i(83);function Bm(t,e){if(!t.childCount)return;const i=new zf,n=function(t,e){const i=e.createRangeIn(t),n=new bn({name:/^p|h\\d+$/,styles:{\"mso-list\":/.*/}}),o=[];for(const t of i)if(\"elementStart\"===t.type&&n.match(t.item)){const e=Fm(t.item);o.push({element:t.item,id:e.id,order:e.order,indent:e.indent})}return o}(t,i);if(!n.length)return;let o=null;n.forEach((t,r)=>{if(!o||function(t,e){if(t.id!==e.id)return!0;const i=e.element.previousSibling;if(!i)return!0;return!function(t){return t.is(\"ol\")||t.is(\"ul\")}(i)}(n[r-1],t)){const n=function(t,e){const i=/mso-level-number-format:([^;]*);/gi,n=new RegExp(`@list l${t.id}:level${t.indent}\\\\s*({[^}]*)`,\"gi\").exec(e);let o=\"decimal\";if(n&&n[1]){const t=i.exec(n[1]);t&&t[1]&&(o=t[1].trim())}return{type:\"bullet\"!==o&&\"image\"!==o?\"ol\":\"ul\",style:o}}(t,e);o=function(t,e,i){const n=new _n(t.type),o=e.parent.getChildIndex(e);return i.insertChild(o,n,e.parent),n}(n,t.element,i)}const s=function(t,e){return function(t,e){const i=new bn({name:\"span\",styles:{\"mso-list\":\"Ignore\"}}),n=e.createRangeIn(t);for(const t of n)\"elementStart\"===t.type&&i.match(t.item)&&e.remove(t.item)}(t,e),e.rename(\"li\",t)}(t.element,i);i.appendChild(s,o)})}function Fm(t){const e={},i=t.getStyle(\"mso-list\");return i&&(e.id=parseInt(i.match(/(^|\\s+)l(\\d+)/i)[2]),e.order=parseInt(i.match(/\\s*lfo(\\d+)/i)[1]),e.indent=parseInt(i.match(/\\s*level(\\d+)/i)[1])),e}const Um=/id=(\"|')docs-internal-guid-[-0-9a-f]+(\"|')/i;class Hm{isActive(t){return Um.test(t)}execute(t){const e=new zf;!function(t,e){for(const i of t.getChildren())if(i.is(\"b\")&&\"normal\"===i.getStyle(\"font-weight\")){const n=t.getChildIndex(i);e.remove(i),e.insertChild(n,i.getChildren(),t)}}(t.content,e),function(t,e){for(const i of e.createRangeIn(t)){const t=i.item;if(t.is(\"li\")){const i=t.getChild(0);i.is(\"p\")&&e.unwrapElement(i)}}}(t.content,e)}}function Wm(t){return t.replace(/<span(?: class=\"Apple-converted-space\"|)>(\\s+)<\\/span>/g,(t,e)=>1===e.length?\" \":Array(e.length+1).join(\"  \").substr(0,e.length))}function qm(t){const e=new DOMParser,i=function(t){return Wm(Wm(t)).replace(/(<span style=['\"]mso-spacerun:yes['\"]>[\\s]*?)[\\r\\n]+(\\s*<\\/span>)/g,\"$1$2\").replace(/<span style=['\"]mso-spacerun:yes['\"]><\\/span>/g,\"\").replace(/ <\\//g,\" </\").replace(/ <o:p><\\/o:p>/g,\" <o:p></o:p>\").replace(/<o:p>(&nbsp;|\\u00A0)<\\/o:p>/g,\"\").replace(/>(\\s*[\\r\\n]\\s*)</g,\"><\")}(function(t){const e=t.match(/<\\/body>(.*?)(<\\/html>|$)/);e&&e[1]&&(t=t.slice(0,e.index)+t.slice(e.index).replace(e[1],\"\"));return t}(t=t.replace(/<!--\\[if gte vml 1]>/g,\"\"))),n=e.parseFromString(i,\"text/html\");!function(t){t.querySelectorAll(\"span[style*=spacerun]\").forEach(t=>{const e=t.childNodes[0].data.length;t.innerHTML=Array(e+1).join(\"  \").substr(0,e)})}(n);const o=n.body.innerHTML,r=function(t){const e=new or({blockFillerMode:\"nbsp\"}),i=t.createDocumentFragment(),n=t.body.childNodes;for(;n.length>0;)i.appendChild(n[0]);return e.domToView(i)}(n),s=function(t){const e=[],i=[],n=Array.from(t.getElementsByTagName(\"style\"));for(const t of n)t.sheet&&t.sheet.cssRules&&t.sheet.cssRules.length&&(e.push(t.sheet),i.push(t.innerHTML));return{styles:e,stylesString:i.join(\" \")}}(n);return{body:r,bodyString:o,styles:s.styles,stylesString:s.stylesString}}function Ym(t,e){if(!t.childCount)return;const i=new zf;!function(t,e,i){const n=i.createRangeIn(e),o=new bn({name:\"img\"}),r=[];for(const e of n)if(o.match(e.item)){const i=e.item,n=i.getAttribute(\"v:shapes\")?i.getAttribute(\"v:shapes\").split(\" \"):[];n.length&&n.every(e=>t.indexOf(e)>-1)?r.push(i):i.getAttribute(\"src\")||r.push(i)}for(const t of r)i.remove(t)}(function(t,e){const i=e.createRangeIn(t),n=new bn({name:/v:(.+)/}),o=[];for(const t of i){const e=t.item,i=e.previousSibling&&e.previousSibling.name||null;n.match(e)&&e.getAttribute(\"o:gfxdata\")&&\"v:shapetype\"!==i&&o.push(t.item.getAttribute(\"id\"))}return o}(t,i),t,i),function(t,e){const i=e.createRangeIn(t),n=new bn({name:/v:(.+)/}),o=[];for(const t of i)n.match(t.item)&&o.push(t.item);for(const t of o)e.remove(t)}(t,i);const n=function(t,e){const i=e.createRangeIn(t),n=new bn({name:\"img\"}),o=[];for(const t of i)n.match(t.item)&&t.item.getAttribute(\"src\").startsWith(\"file://\")&&o.push(t.item);return o}(t,i);n.length&&function(t,e,i){if(t.length===e.length)for(let n=0;n<t.length;n++){const o=`data:${e[n].type};base64,${$m(e[n].hex)}`;i.setAttribute(\"src\",o,t[n])}}(n,function(t){if(!t)return[];const e=/{\\\\pict[\\s\\S]+?\\\\bliptag-?\\d+(\\\\blipupi-?\\d+)?({\\\\\\*\\\\blipuid\\s?[\\da-fA-F]+)?[\\s}]*?/,i=new RegExp(\"(?:(\"+e.source+\"))([\\\\da-fA-F\\\\s]+)\\\\}\",\"g\"),n=t.match(i),o=[];if(n)for(const t of n){let i=!1;t.includes(\"\\\\pngblip\")?i=\"image/png\":t.includes(\"\\\\jpegblip\")&&(i=\"image/jpeg\"),i&&o.push({hex:t.replace(e,\"\").replace(/[^\\da-fA-F]/g,\"\"),type:i})}return o}(e),i)}function $m(t){return btoa(t.match(/\\w{2}/g).map(t=>String.fromCharCode(parseInt(t,16))).join(\"\"))}const Gm=/<meta\\s*name=\"?generator\"?\\s*content=\"?microsoft\\s*word\\s*\\d+\"?\\/?>/i,Qm=/xmlns:o=\"urn:schemas-microsoft-com/i;class Km{isActive(t){return Gm.test(t)||Qm.test(t)}execute(t){const{body:e,stylesString:i}=qm(t.dataTransfer.getData(\"text/html\"));Bm(e,i),Ym(e,t.dataTransfer.getData(\"text/rtf\")),t.content=e}}function Jm(t,e){let i=e.parent;for(;i;){if(i.name===t)return i;i=i.parent}}function Zm(t,e,i,n,o=1){e>o?n.setAttribute(t,e,i):n.removeAttribute(t,i)}function Xm(t,e,i={}){const n=t.createElement(\"tableCell\",i);t.insertElement(\"paragraph\",n),t.insert(n,e)}function tp(){return t=>{t.on(\"element:table\",(t,e,i)=>{const n=e.viewItem;if(!i.consumable.test(n,{name:!0}))return;const{rows:o,headingRows:r,headingColumns:s}=function(t){const e={headingRows:0,headingColumns:0},i=[],n=[];let o;for(const r of Array.from(t.getChildren()))if(\"tbody\"===r.name||\"thead\"===r.name||\"tfoot\"===r.name){\"thead\"!==r.name||o||(o=r);const t=Array.from(r.getChildren()).filter(t=>t.is(\"element\",\"tr\"));for(const r of t)if(\"thead\"===r.parent.name&&r.parent===o)e.headingRows++,i.push(r);else{n.push(r);const t=ip(r);t>e.headingColumns&&(e.headingColumns=t)}}return e.rows=[...i,...n],e}(n),a={};s&&(a.headingColumns=s),r&&(a.headingRows=r);const c=i.writer.createElement(\"table\",a),l=i.splitToAllowedParent(c,e.modelCursor);if(l){if(i.writer.insert(c,l.position),i.consumable.consume(n,{name:!0}),o.length)o.forEach(t=>i.convertItem(t,i.writer.createPositionAt(c,\"end\")));else{const t=i.writer.createElement(\"tableRow\");i.writer.insert(t,i.writer.createPositionAt(c,\"end\")),Xm(i.writer,i.writer.createPositionAt(t,\"end\"))}e.modelRange=i.writer.createRange(i.writer.createPositionBefore(c),i.writer.createPositionAfter(c)),l.cursorParent?e.modelCursor=i.writer.createPositionAt(l.cursorParent,0):e.modelCursor=e.modelRange.end}})}}function ep(t){return e=>{e.on(`element:${t}`,(t,e,i)=>{const n=e.viewItem;if(!i.consumable.test(n,{name:!0}))return;const o=i.writer.createElement(\"tableCell\"),r=i.splitToAllowedParent(o,e.modelCursor);if(!r)return;i.writer.insert(o,r.position),i.consumable.consume(n,{name:!0});const s=i.writer.createPositionAt(o,0);i.convertChildren(n,s),o.childCount||i.writer.insertElement(\"paragraph\",s),e.modelRange=i.writer.createRange(i.writer.createPositionBefore(o),i.writer.createPositionAfter(o)),e.modelCursor=e.modelRange.end})}}function ip(t){let e=0,i=0;const n=Array.from(t.getChildren()).filter(t=>\"th\"===t.name||\"td\"===t.name);for(;i<n.length&&\"th\"===n[i].name;){const t=n[i];e+=parseInt(t.getAttribute(\"colspan\")||1),i++}return e}class np{constructor(t,e={}){this.table=t,this.startRow=e.startRow||0,this.endRow=\"number\"==typeof e.endRow?e.endRow:void 0,this.includeSpanned=!!e.includeSpanned,this.column=\"number\"==typeof e.column?e.column:void 0,this._skipRows=new Set,this._row=0,this._column=0,this._cellIndex=0,this._spannedCells=new Map,this._nextCellAtColumn=-1}[Symbol.iterator](){return this}next(){const t=this.table.getChild(this._row);if(!t||this._isOverEndRow())return{done:!0};let e,i,n;if(this._isSpanned(this._row,this._column))e=this._getSpanned(this._row,this._column),i=!this.includeSpanned||this._shouldSkipRow()||this._shouldSkipColumn(),n=this._formatOutValue(e,this._column,!0);else{if(!(e=t.getChild(this._cellIndex)))return this._row++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next();const o=parseInt(e.getAttribute(\"colspan\")||1),r=parseInt(e.getAttribute(\"rowspan\")||1);(o>1||r>1)&&this._recordSpans(this._row,this._column,r,o,e),this._nextCellAtColumn=this._column+o,i=this._shouldSkipRow()||this._shouldSkipColumn(),n=this._formatOutValue(e,this._column,!1,r,o)}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,i?this.next():n}skipRow(t){this._skipRows.add(t)}_isOverEndRow(){return void 0!==this.endRow&&this._row>this.endRow}_formatOutValue(t,e,i,n=1,o=1){return{done:!1,value:{cell:t,row:this._row,column:e,isSpanned:i,rowspan:n,colspan:o,cellIndex:this._cellIndex}}}_shouldSkipRow(){const t=this._row<this.startRow,e=this._skipRows.has(this._row);return t||e}_shouldSkipColumn(){return void 0!==this.column&&this.column!=this._column}_isSpanned(t,e){if(!this._spannedCells.has(t))return!1;return this._spannedCells.get(t).has(e)}_getSpanned(t,e){return this._spannedCells.get(t).get(e)}_recordSpans(t,e,i,n,o){for(let i=e+1;i<=e+n-1;i++)this._markSpannedCell(t,i,o);for(let r=t+1;r<t+i;r++)for(let t=e;t<=e+n-1;t++)this._markSpannedCell(r,t,o)}_markSpannedCell(t,e,i){this._spannedCells.has(t)||this._spannedCells.set(t,new Map),this._spannedCells.get(t).set(e,i)}}function op(t){return!!t.getCustomProperty(\"table\")&&mu(t)}function rp(t){const e=t.getSelectedElement();return e&&op(e)?e:null}function sp(t){const e=Jm(\"table\",t.getFirstPosition());return e&&op(e.parent)?e.parent:null}function ap(t={}){return e=>e.on(\"insert:table\",(e,i,n)=>{const o=i.item;if(!n.consumable.consume(o,\"insert\"))return;n.consumable.consume(o,\"attribute:headingRows:table\"),n.consumable.consume(o,\"attribute:headingColumns:table\");const r=t&&t.asWidget,s=n.writer.createContainerElement(\"figure\",{class:\"table\"}),a=n.writer.createContainerElement(\"table\");let c;n.writer.insert(n.writer.createPositionAt(s,0),a),r&&(c=function(t,e){return e.setCustomProperty(\"table\",!0,t),pu(t,e,{hasSelectionHandle:!0})}(s,n.writer));const l=new np(o),d={headingRows:o.getAttribute(\"headingRows\")||0,headingColumns:o.getAttribute(\"headingColumns\")||0},h=new Map;for(const e of l){const{row:i,cell:r}=e,s=wp(bp(i,d),a,n),c=o.getChild(i),l=h.get(i)||mp(c,i,s,n);h.set(i,l),n.consumable.consume(r,\"insert\"),gp(e,d,n.writer.createPositionAt(l,\"end\"),n,t)}const u=n.mapper.toViewPosition(i.range.start);n.mapper.bindElements(o,r?c:s),n.writer.insert(u,r?c:s)})}function cp(t={}){return e=>e.on(\"insert:tableRow\",(e,i,n)=>{const o=i.item;if(!n.consumable.consume(o,\"insert\"))return;const r=o.parent,s=yp(n.mapper.toViewElement(r)),a=r.getChildIndex(o),c=new np(r,{startRow:a,endRow:a}),l={headingRows:r.getAttribute(\"headingRows\")||0,headingColumns:r.getAttribute(\"headingColumns\")||0},d=new Map;for(const e of c){const i=wp(bp(a,l),s,n),r=d.get(a)||mp(o,a,i,n);d.set(a,r),n.consumable.consume(e.cell,\"insert\"),gp(e,l,n.writer.createPositionAt(r,\"end\"),n,t)}})}function lp(t={}){return e=>e.on(\"insert:tableCell\",(e,i,n)=>{const o=i.item;if(!n.consumable.consume(o,\"insert\"))return;const r=o.parent,s=r.parent,a=s.getChildIndex(r),c=new np(s,{startRow:a,endRow:a}),l={headingRows:s.getAttribute(\"headingRows\")||0,headingColumns:s.getAttribute(\"headingColumns\")||0};for(const e of c)if(e.cell===o){const i=n.mapper.toViewElement(r);return void gp(e,l,n.writer.createPositionAt(i,r.getChildIndex(o)),n,t)}})}function dp(t={}){const e=!!t.asWidget;return t=>t.on(\"attribute:headingRows:table\",(t,i,n)=>{const o=i.item;if(!n.consumable.consume(i.item,t.name))return;const r=yp(n.mapper.toViewElement(o)),s=i.attributeOldValue,a=i.attributeNewValue;if(a>s){const t=Array.from(o.getChildren()).filter(({index:t})=>c(t,s-1,a));vp(t,wp(\"thead\",r,n),n,\"end\");for(const i of t)for(const t of i.getChildren())up(t,\"th\",n,e);kp(\"tbody\",r,n)}else{vp(Array.from(o.getChildren()).filter(({index:t})=>c(t,a-1,s)).reverse(),wp(\"tbody\",r,n),n,0);const t=new np(o,{startRow:a?a-1:a,endRow:s-1}),i={headingRows:o.getAttribute(\"headingRows\")||0,headingColumns:o.getAttribute(\"headingColumns\")||0};for(const o of t)fp(o,i,n,e);kp(\"thead\",r,n)}function c(t,e,i){return t>e&&t<i}})}function hp(t={}){const e=!!t.asWidget;return t=>t.on(\"attribute:headingColumns:table\",(t,i,n)=>{const o=i.item;if(!n.consumable.consume(i.item,t.name))return;const r={headingRows:o.getAttribute(\"headingRows\")||0,headingColumns:o.getAttribute(\"headingColumns\")||0},s=i.attributeOldValue,a=i.attributeNewValue,c=(s>a?s:a)-1;for(const t of new np(o))t.column>c||fp(t,r,n,e)})}function up(t,e,i,n){const o=i.writer,r=i.mapper.toViewElement(t);if(!r)return;let s;if(n){s=wu(o.createEditableElement(e,r.getAttributes()),o),o.insert(o.createPositionAfter(r),s),o.move(o.createRangeIn(r),o.createPositionAt(s,0)),o.remove(o.createRangeOn(r))}else s=o.rename(e,r);i.mapper.unbindViewElement(r),i.mapper.bindElements(t,s)}function fp(t,e,i,n){const{cell:o}=t,r=pp(t,e),s=i.mapper.toViewElement(o);s&&s.name!==r&&up(o,r,i,n)}function gp(t,e,i,n,o){const r=o&&o.asWidget,s=pp(t,e),a=r?wu(n.writer.createEditableElement(s),n.writer):n.writer.createContainerElement(s),c=t.cell,l=c.getChild(0),d=1===c.childCount&&\"paragraph\"===l.name;if(n.writer.insert(i,a),d&&!function(t){return!![...t.getAttributeKeys()].length}(l)){const t=c.getChild(0),e=n.writer.createPositionAt(a,\"end\");if(n.consumable.consume(t,\"insert\"),o.asWidget){const i=n.writer.createContainerElement(\"span\");n.mapper.bindElements(t,i),n.writer.insert(e,i),n.mapper.bindElements(c,a)}else n.mapper.bindElements(c,a),n.mapper.bindElements(t,a)}else n.mapper.bindElements(c,a)}function mp(t,e,i,n){n.consumable.consume(t,\"insert\");const o=n.writer.createContainerElement(\"tr\");n.mapper.bindElements(t,o);const r=t.parent.getAttribute(\"headingRows\")||0,s=r>0&&e>=r?e-r:e,a=n.writer.createPositionAt(i,s);return n.writer.insert(a,o),o}function pp(t,e){const{row:i,column:n}=t,{headingColumns:o,headingRows:r}=e;return r&&r>i?\"th\":o&&o>n?\"th\":\"td\"}function bp(t,e){return t<e.headingRows?\"thead\":\"tbody\"}function wp(t,e,i){const n=_p(t,e);return n||function(t,e,i){const n=i.writer.createContainerElement(t),o=i.writer.createPositionAt(e,\"tbody\"==t?\"end\":0);return i.writer.insert(o,n),n}(t,e,i)}function _p(t,e){for(const i of e.getChildren())if(i.name==t)return i}function kp(t,e,i){const n=_p(t,e);n&&0===n.childCount&&i.writer.remove(i.writer.createRangeOn(n))}function vp(t,e,i,n){for(const o of t){const t=i.mapper.toViewElement(o);t&&i.writer.move(i.writer.createRangeOn(t),i.writer.createPositionAt(e,n))}}function yp(t){for(const e of t.getChildren())if(\"table\"===e.name)return e}class xp extends Td{refresh(){const t=this.editor.model,e=t.document.selection,i=t.schema,n=function(t){const e=t.parent;return e===e.root?e:e.parent}(e.getFirstPosition());this.isEnabled=i.checkChild(n,\"table\")}execute(t={}){const e=this.editor.model,i=e.document.selection,n=this.editor.plugins.get(\"TableUtils\"),o=parseInt(t.rows)||2,r=parseInt(t.columns)||2,s=_u(i,e);e.change(t=>{const i=n.createTable(t,o,r);e.insertContent(i,s),t.setSelection(t.createPositionAt(i.getNodeByPath([0,0,0]),0))})}}class Ap extends Td{constructor(t,e={}){super(t),this.order=e.order||\"below\"}refresh(){const t=Jm(\"table\",this.editor.model.document.selection.getFirstPosition());this.isEnabled=!!t}execute(){const t=this.editor,e=t.model.document.selection,i=t.plugins.get(\"TableUtils\"),n=Jm(\"tableCell\",e.getFirstPosition()).parent,o=n.parent,r=o.getChildIndex(n),s=\"below\"===this.order?r+1:r;i.insertRows(o,{rows:1,at:s})}}class Tp extends Td{constructor(t,e={}){super(t),this.order=e.order||\"right\"}refresh(){const t=Jm(\"table\",this.editor.model.document.selection.getFirstPosition());this.isEnabled=!!t}execute(){const t=this.editor,e=t.model.document.selection,i=t.plugins.get(\"TableUtils\"),n=Jm(\"tableCell\",e.getFirstPosition()),o=n.parent.parent,{column:r}=i.getCellLocation(n),s=\"right\"===this.order?r+1:r;i.insertColumns(o,{columns:1,at:s})}}class Cp extends Td{constructor(t,e={}){super(t),this.direction=e.direction||\"horizontally\"}refresh(){const t=Jm(\"tableCell\",this.editor.model.document.selection.getFirstPosition());this.isEnabled=!!t}execute(){const t=Jm(\"tableCell\",this.editor.model.document.selection.getFirstPosition()),e=\"horizontally\"===this.direction,i=this.editor.plugins.get(\"TableUtils\");e?i.splitCellHorizontally(t,2):i.splitCellVertically(t,2)}}class Pp extends Td{constructor(t,e){super(t),this.direction=e.direction,this.isHorizontal=\"right\"==this.direction||\"left\"==this.direction}refresh(){const t=this._getMergeableCell();this.value=t,this.isEnabled=!!t}execute(){const t=this.editor.model,e=Jm(\"tableCell\",t.document.selection.getFirstPosition()),i=this.value,n=this.direction;t.change(t=>{const o=\"right\"==n||\"down\"==n,r=o?e:i,s=o?i:e,a=s.parent;!function(t,e,i){Sp(t)||(Sp(e)&&i.remove(i.createRangeIn(e)),i.move(i.createRangeIn(t),i.createPositionAt(e,\"end\")));i.remove(t)}(s,r,t);const c=this.isHorizontal?\"colspan\":\"rowspan\",l=parseInt(e.getAttribute(c)||1),d=parseInt(i.getAttribute(c)||1);t.setAttribute(c,l+d,r),t.setSelection(t.createRangeIn(r)),a.childCount||function(t,e){const i=t.parent,n=i.getChildIndex(t);for(const{cell:t,row:o,rowspan:r}of new np(i,{endRow:n})){const i=o+r-1>=n;i&&Zm(\"rowspan\",r-1,t,e)}e.remove(t)}(a,t)})}_getMergeableCell(){const t=Jm(\"tableCell\",this.editor.model.document.selection.getFirstPosition());if(!t)return;const e=this.editor.plugins.get(\"TableUtils\"),i=this.isHorizontal?function(t,e,i){const n=\"right\"==e?t.nextSibling:t.previousSibling;if(!n)return;const o=\"right\"==e?t:n,r=\"right\"==e?n:t,{column:s}=i.getCellLocation(o),{column:a}=i.getCellLocation(r),c=parseInt(o.getAttribute(\"colspan\")||1);return s+c===a?n:void 0}(t,this.direction,e):function(t,e){const i=t.parent,n=i.parent,o=n.getChildIndex(i);if(\"down\"==e&&o===n.childCount-1||\"up\"==e&&0===o)return;const r=parseInt(t.getAttribute(\"rowspan\")||1),s=n.getAttribute(\"headingRows\")||0;if(s&&(\"down\"==e&&o+r===s||\"up\"==e&&o===s))return;const a=parseInt(t.getAttribute(\"rowspan\")||1),c=\"down\"==e?o+a:o,l=[...new np(n,{endRow:c})],d=l.find(e=>e.cell===t).column,h=l.find(({row:t,rowspan:i,column:n})=>n===d&&(\"down\"==e?t===c:c===t+i));return h&&h.cell}(t,this.direction);if(!i)return;const n=this.isHorizontal?\"rowspan\":\"colspan\",o=parseInt(t.getAttribute(n)||1);return parseInt(i.getAttribute(n)||1)===o?i:void 0}}function Sp(t){return 1==t.childCount&&t.getChild(0).is(\"paragraph\")&&t.getChild(0).isEmpty}class Mp extends Td{refresh(){const t=Jm(\"tableCell\",this.editor.model.document.selection.getFirstPosition());this.isEnabled=!!t&&t.parent.parent.childCount>1}execute(){const t=this.editor.model,e=Jm(\"tableCell\",t.document.selection.getFirstPosition()).parent,i=e.parent,n=i.getChildIndex(e),o=i.getAttribute(\"headingRows\")||0;t.change(t=>{o&&n<=o&&Zm(\"headingRows\",o-1,i,t,0);const r=[...new np(i,{endRow:n})],s=new Map;r.filter(({row:t,rowspan:e})=>t===n&&e>1).forEach(({column:t,cell:e,rowspan:i})=>s.set(t,{cell:e,rowspanToSet:i-1})),r.filter(({row:t,rowspan:e})=>t<=n-1&&t+e>n).forEach(({cell:e,rowspan:i})=>Zm(\"rowspan\",i-1,e,t));const a=n+1,c=new np(i,{includeSpanned:!0,startRow:a,endRow:a});let l;for(const{row:e,column:n,cell:o}of[...c])if(s.has(n)){const{cell:o,rowspanToSet:r}=s.get(n),a=l?t.createPositionAfter(l):t.createPositionAt(i.getChild(e),0);t.move(t.createRangeOn(o),a),Zm(\"rowspan\",r,o,t),l=o}else l=o;t.remove(e)})}}class Ep extends Td{refresh(){const t=this.editor,e=t.model.document.selection,i=t.plugins.get(\"TableUtils\"),n=Jm(\"tableCell\",e.getFirstPosition());this.isEnabled=!!n&&i.getColumns(n.parent.parent)>1}execute(){const t=this.editor.model,e=Jm(\"tableCell\",t.document.selection.getFirstPosition()),i=e.parent,n=i.parent,o=n.getAttribute(\"headingColumns\")||0,r=n.getChildIndex(i),s=[...new np(n)],a=s.find(t=>t.cell===e).column;t.change(t=>{o&&r<=o&&t.setAttribute(\"headingColumns\",o-1,n);for(const{cell:e,column:i,colspan:n}of s)i<=a&&n>1&&i+n>a?Zm(\"colspan\",n-1,e,t):i===a&&t.remove(e)})}}class Ip extends Td{refresh(){const t=Jm(\"tableCell\",this.editor.model.document.selection.getFirstPosition()),e=!!t;this.isEnabled=e,this.value=e&&this._isInHeading(t,t.parent.parent)}execute(t={}){const e=this.editor.model,i=Jm(\"tableCell\",e.document.selection.getFirstPosition()).parent,n=i.parent,o=n.getAttribute(\"headingRows\")||0,r=i.index;if(t.forceValue===this.value)return;const s=this.value?r:r+1;e.change(t=>{if(s){const e=function(t,e,i){const n=[],o=new np(t,{startRow:e>i?i:0,endRow:e-1});for(const{row:t,rowspan:i,cell:r}of o)i>1&&t+i>e&&n.push(r);return n}(n,s,o);for(const i of e)Np(i,s,t)}Zm(\"headingRows\",s,n,t,0)})}_isInHeading(t,e){const i=parseInt(e.getAttribute(\"headingRows\")||0);return!!i&&t.parent.index<i}}function Np(t,e,i){const n=t.parent,o=n.parent,r=e-n.index,s={},a=parseInt(t.getAttribute(\"rowspan\"))-r;a>1&&(s.rowspan=a);const c=parseInt(t.getAttribute(\"colspan\")||1);c>1&&(s.colspan=c);const l=o.getChildIndex(n),d=l+r,h=[...new np(o,{startRow:l,endRow:d,includeSpanned:!0})];let u;for(const{row:e,column:n,cell:r,cellIndex:a}of h)if(r===t&&void 0===u&&(u=n),void 0!==u&&u===n&&e===d){const t=o.getChild(e);Xm(i,i.createPositionAt(t,a),s)}Zm(\"rowspan\",r,t,i)}class Op extends Td{refresh(){const t=Jm(\"tableCell\",this.editor.model.document.selection.getFirstPosition()),e=!!t;this.isEnabled=e,this.value=e&&this._isInHeading(t,t.parent.parent)}execute(t={}){const e=this.editor.model,i=e.document.selection,n=this.editor.plugins.get(\"TableUtils\"),o=Jm(\"tableCell\",i.getFirstPosition()),r=o.parent.parent,{column:s}=n.getCellLocation(o);if(t.forceValue===this.value)return;const a=this.value?s:s+1;e.change(t=>{Zm(\"headingColumns\",a,r,t,0)})}_isInHeading(t,e){const i=parseInt(e.getAttribute(\"headingColumns\")||0),n=this.editor.plugins.get(\"TableUtils\"),{column:o}=n.getCellLocation(t);return!!i&&o<i}}class Rp extends kd{static get pluginName(){return\"TableUtils\"}getCellLocation(t){const e=t.parent,i=e.parent,n=i.getChildIndex(e),o=new np(i,{startRow:n,endRow:n});for(const{cell:e,row:i,column:n}of o)if(e===t)return{row:i,column:n}}createTable(t,e,i){const n=t.createElement(\"table\");return Dp(t,n,0,e,i),n}insertRows(t,e={}){const i=this.editor.model,n=e.at||0,o=e.rows||1;i.change(e=>{const i=t.getAttribute(\"headingRows\")||0;if(i>n&&e.setAttribute(\"headingRows\",i+o,t),0===n||n===t.childCount)return void Dp(e,t,n,o,this.getColumns(t));const r=new np(t,{endRow:n});let s=0;for(const{row:t,rowspan:i,colspan:a,cell:c}of r){t<n&&t+i>n&&e.setAttribute(\"rowspan\",i+o,c),t===n&&(s+=a)}Dp(e,t,n,o,s)})}insertColumns(t,e={}){const i=this.editor.model,n=e.at||0,o=e.columns||1;i.change(e=>{const i=t.getAttribute(\"headingColumns\");n<i&&e.setAttribute(\"headingColumns\",i+o,t);const r=this.getColumns(t);if(0===n||r===n){for(const i of t.getChildren())Lp(o,e,e.createPositionAt(i,n?\"end\":0));return}const s=new np(t,{column:n,includeSpanned:!0});for(const{row:i,cell:r,cellIndex:a}of s){const c=parseInt(r.getAttribute(\"rowspan\")||1),l=parseInt(r.getAttribute(\"colspan\")||1);if(r.index!==n&&l>1){if(e.setAttribute(\"colspan\",l+o,r),s.skipRow(i),c>1)for(let t=i+1;t<i+c;t++)s.skipRow(t)}else{const n=e.createPositionAt(t.getChild(i),a);Lp(o,e,n)}}})}splitCellVertically(t,e=2){const i=this.editor.model,n=t.parent.parent,o=parseInt(t.getAttribute(\"rowspan\")||1),r=parseInt(t.getAttribute(\"colspan\")||1);i.change(i=>{if(r>1){const{newCellsSpan:n,updatedSpan:s}=jp(r,e);Zm(\"colspan\",s,t,i);const a={};n>1&&(a.colspan=n),o>1&&(a.rowspan=o),Lp(r>e?e-1:r-1,i,i.createPositionAfter(t),a)}if(r<e){const s=e-r,a=[...new np(n)],{column:c}=a.find(({cell:e})=>e===t),l=a.filter(({cell:e,colspan:i,column:n})=>{return e!==t&&n===c||n<c&&n+i>c});for(const{cell:t,colspan:e}of l)i.setAttribute(\"colspan\",e+s,t);const d={};o>1&&(d.rowspan=o),Lp(s,i,i.createPositionAfter(t),d);const h=n.getAttribute(\"headingColumns\")||0;h>c&&Zm(\"headingColumns\",h+s,n,i)}})}splitCellHorizontally(t,e=2){const i=this.editor.model,n=t.parent,o=n.parent,r=o.getChildIndex(n),s=parseInt(t.getAttribute(\"rowspan\")||1),a=parseInt(t.getAttribute(\"colspan\")||1);i.change(i=>{if(s>1){const n=[...new np(o,{startRow:r,endRow:r+s-1,includeSpanned:!0})],{newCellsSpan:c,updatedSpan:l}=jp(s,e);Zm(\"rowspan\",l,t,i);const{column:d}=n.find(({cell:e})=>e===t),h={};c>1&&(h.rowspan=c),a>1&&(h.colspan=a);for(const{column:t,row:e,cellIndex:s}of n){if(e>=r+l&&t===d&&(e+r+l)%c==0){Lp(1,i,i.createPositionAt(o.getChild(e),s),h)}}}if(s<e){const n=e-s,c=[...new np(o,{startRow:0,endRow:r})];for(const{cell:e,rowspan:o,row:s}of c)if(e!==t&&s+o>r){const t=o+n;i.setAttribute(\"rowspan\",t,e)}const l={};a>1&&(l.colspan=a),Dp(i,o,r+1,n,1,l);const d=o.getAttribute(\"headingRows\")||0;d>r&&Zm(\"headingRows\",d+n,o,i)}})}getColumns(t){return[...t.getChild(0).getChildren()].reduce((t,e)=>{return t+parseInt(e.getAttribute(\"colspan\")||1)},0)}}function Dp(t,e,i,n,o,r={}){for(let s=0;s<n;s++){const n=t.createElement(\"tableRow\");t.insert(n,e,i),Lp(o,t,t.createPositionAt(n,\"end\"),r)}}function Lp(t,e,i,n={}){for(let o=0;o<t;o++)Xm(e,i,n)}function jp(t,e){if(t<e)return{newCellsSpan:1,updatedSpan:1};const i=Math.floor(t/e);return{newCellsSpan:i,updatedSpan:t-i*e+i}}function Vp(t){t.document.registerPostFixer(e=>(function(t,e){const i=e.document.differ.getChanges();let n=!1;const o=new Set;for(const e of i){let i;\"table\"==e.name&&\"insert\"==e.type&&(i=e.position.nodeAfter),\"tableRow\"!=e.name&&\"tableCell\"!=e.name||(i=Jm(\"table\",e.position)),Fp(e)&&(i=Jm(\"table\",e.range.start)),i&&!o.has(i)&&(n=zp(i,t)||n,n=Bp(i,t)||n,o.add(i))}return n})(e,t))}function zp(t,e){let i=!1;const n=function(t){const e=parseInt(t.getAttribute(\"headingRows\")||0),i=t.childCount,n=[];for(const{row:o,rowspan:r,cell:s}of new np(t)){if(r<2)continue;const t=o<e,a=t?e:i;if(o+r>a){const t=a-o;n.push({cell:s,rowspan:t})}}return n}(t);if(n.length){i=!0;for(const t of n)Zm(\"rowspan\",t.rowspan,t.cell,e,1)}return i}function Bp(t,e){let i=!1;const n=function(t){const e={};for(const{row:i}of new np(t,{includeSpanned:!0}))e[i]||(e[i]=0),e[i]+=1;return e}(t),o=n[0];if(!Object.values(n).every(t=>t===o)){const o=Object.values(n).reduce((t,e)=>e>t?e:t,0);for(const[r,s]of Object.entries(n)){const n=o-s;if(n){for(let i=0;i<n;i++)Xm(e,e.createPositionAt(t.getChild(r),\"end\"));i=!0}}}return i}function Fp(t){const e=\"attribute\"===t.type,i=t.attributeKey;return e&&(\"headingRows\"===i||\"colspan\"===i||\"rowspan\"===i)}function Up(t){t.document.registerPostFixer(e=>(function(t,e){const i=e.document.differ.getChanges();let n=!1;for(const e of i)\"insert\"==e.type&&\"table\"==e.name&&(n=Hp(e.position.nodeAfter,t)||n),\"insert\"==e.type&&\"tableRow\"==e.name&&(n=Wp(e.position.nodeAfter,t)||n),\"insert\"==e.type&&\"tableCell\"==e.name&&(n=qp(e.position.nodeAfter,t)||n),Yp(e)&&(n=qp(e.position.parent,t)||n);return n})(e,t))}function Hp(t,e){let i=!1;for(const n of t.getChildren())i=Wp(n,e)||i;return i}function Wp(t,e){let i=!1;for(const n of t.getChildren())i=qp(n,e)||i;return i}function qp(t,e){if(0==t.childCount)return e.insertElement(\"paragraph\",t),!0;const i=Array.from(t.getChildren()).filter(t=>t.is(\"text\"));for(const t of i)e.wrap(e.createRangeOn(t),\"paragraph\");return!!i.length}function Yp(t){return!(!t.position||!t.position.parent.is(\"tableCell\"))&&(\"insert\"==t.type&&\"$text\"==t.name||\"remove\"==t.type)}function $p(t){t.document.registerPostFixer(()=>(function(t){const e=t.document.differ,i=new Set;for(const t of e.getChanges()){const e=\"insert\"==t.type||\"remove\"==t.type?t.position.parent:t.range.start.parent;e.is(\"tableCell\")&&Gp(e,t.type)&&i.add(e)}if(i.size){for(const t of i.values())e.refreshItem(t);return!0}return!1})(t))}function Gp(t,e){if(!Array.from(t.getChildren()).some(t=>t.is(\"paragraph\")))return!1;if(\"attribute\"==e){const e=Array.from(t.getChild(0).getAttributeKeys()).length;return 1===t.childCount&&e<2}return t.childCount<=(\"insert\"==e?2:1)}i(85);class Qp extends kd{static get pluginName(){return\"TableEditing\"}init(){const t=this.editor,e=t.model,i=e.schema,n=t.conversion;i.register(\"table\",{allowWhere:\"$block\",allowAttributes:[\"headingRows\",\"headingColumns\"],isLimit:!0,isObject:!0,isBlock:!0}),i.register(\"tableRow\",{allowIn:\"table\",isLimit:!0}),i.register(\"tableCell\",{allowIn:\"tableRow\",allowAttributes:[\"colspan\",\"rowspan\"],isLimit:!0}),i.extend(\"$block\",{allowIn:\"tableCell\"}),i.addChildCheck((t,e)=>{if(\"table\"==e.name&&Array.from(t.getNames()).includes(\"table\"))return!1}),n.for(\"upcast\").add(tp()),n.for(\"editingDowncast\").add(ap({asWidget:!0})),n.for(\"dataDowncast\").add(ap()),n.for(\"upcast\").elementToElement({model:\"tableRow\",view:\"tr\"}),n.for(\"editingDowncast\").add(cp({asWidget:!0})),n.for(\"dataDowncast\").add(cp()),n.for(\"downcast\").add(t=>t.on(\"remove:tableRow\",(t,e,i)=>{t.stop();const n=i.writer,o=i.mapper,r=o.toViewPosition(e.position).getLastMatchingPosition(t=>!t.item.is(\"tr\")).nodeAfter,s=r.parent,a=n.createRangeOn(r),c=n.remove(a);for(const t of n.createRangeIn(c).getItems())o.unbindViewElement(t);s.childCount||n.remove(n.createRangeOn(s))},{priority:\"higher\"})),n.for(\"upcast\").add(ep(\"td\")),n.for(\"upcast\").add(ep(\"th\")),n.for(\"editingDowncast\").add(lp({asWidget:!0})),n.for(\"dataDowncast\").add(lp()),n.attributeToAttribute({model:\"colspan\",view:\"colspan\"}),n.attributeToAttribute({model:\"rowspan\",view:\"rowspan\"}),n.for(\"editingDowncast\").add(hp({asWidget:!0})),n.for(\"dataDowncast\").add(hp()),n.for(\"editingDowncast\").add(dp({asWidget:!0})),n.for(\"dataDowncast\").add(dp()),t.commands.add(\"insertTable\",new xp(t)),t.commands.add(\"insertTableRowAbove\",new Ap(t,{order:\"above\"})),t.commands.add(\"insertTableRowBelow\",new Ap(t,{order:\"below\"})),t.commands.add(\"insertTableColumnLeft\",new Tp(t,{order:\"left\"})),t.commands.add(\"insertTableColumnRight\",new Tp(t,{order:\"right\"})),t.commands.add(\"removeTableRow\",new Mp(t)),t.commands.add(\"removeTableColumn\",new Ep(t)),t.commands.add(\"splitTableCellVertically\",new Cp(t,{direction:\"vertically\"})),t.commands.add(\"splitTableCellHorizontally\",new Cp(t,{direction:\"horizontally\"})),t.commands.add(\"mergeTableCellRight\",new Pp(t,{direction:\"right\"})),t.commands.add(\"mergeTableCellLeft\",new Pp(t,{direction:\"left\"})),t.commands.add(\"mergeTableCellDown\",new Pp(t,{direction:\"down\"})),t.commands.add(\"mergeTableCellUp\",new Pp(t,{direction:\"up\"})),t.commands.add(\"setTableColumnHeader\",new Op(t)),t.commands.add(\"setTableRowHeader\",new Ip(t)),Vp(e),$p(e),Up(e),this.editor.keystrokes.set(\"Tab\",(...t)=>this._handleTabOnSelectedTable(...t),{priority:\"low\"}),this.editor.keystrokes.set(\"Tab\",this._getTabHandler(!0),{priority:\"low\"}),this.editor.keystrokes.set(\"Shift+Tab\",this._getTabHandler(!1),{priority:\"low\"})}static get requires(){return[Rp]}_handleTabOnSelectedTable(t,e){const i=this.editor,n=i.model.document.selection;if(!n.isCollapsed&&1===n.rangeCount&&n.getFirstRange().isFlat){const t=n.getSelectedElement();if(!t||!t.is(\"table\"))return;e(),i.model.change(e=>{e.setSelection(e.createRangeIn(t.getChild(0).getChild(0)))})}}_getTabHandler(t){const e=this.editor;return(i,n)=>{const o=Jm(\"tableCell\",e.model.document.selection.getFirstPosition());if(!o)return;n();const r=o.parent,s=r.parent,a=s.getChildIndex(r),c=r.getChildIndex(o),l=0===c;if(!t&&l&&0===a)return;const d=c===r.childCount-1,h=a===s.childCount-1;if(t&&h&&d&&(e.execute(\"insertTableRowBelow\"),a===s.childCount-1))return;let u;if(t&&d){const t=s.getChild(a+1);u=t.getChild(0)}else if(!t&&l){const t=s.getChild(a-1);u=t.getChild(t.childCount-1)}else u=r.getChild(c+(t?1:-1));e.model.change(t=>{t.setSelection(t.createRangeIn(u))})}}}i(87);class Kp extends Ll{constructor(t){super(t);const e=this.bindTemplate;this.items=this.createCollection(),this.set(\"rows\",0),this.set(\"columns\",0),this.bind(\"label\").to(this,\"columns\",this,\"rows\",(t,e)=>`${e} × ${t}`),this.setTemplate({tag:\"div\",attributes:{class:[\"ck\"]},children:[{tag:\"div\",attributes:{class:[\"ck-insert-table-dropdown__grid\"]},children:this.items},{tag:\"div\",attributes:{class:[\"ck-insert-table-dropdown__label\"]},children:[{text:e.to(\"label\")}]}],on:{mousedown:e.to(t=>{t.preventDefault()}),click:e.to(()=>{this.fire(\"execute\")})}});for(let t=0;t<100;t++){const e=new Jp;e.on(\"over\",()=>{const e=Math.floor(t/10),i=t%10;this.set(\"rows\",e+1),this.set(\"columns\",i+1)}),this.items.add(e)}this.on(\"change:columns\",()=>{this._highlightGridBoxes()}),this.on(\"change:rows\",()=>{this._highlightGridBoxes()})}focus(){}focusLast(){}_highlightGridBoxes(){const t=this.rows,e=this.columns;this.items.map((i,n)=>{const o=Math.floor(n/10)<t&&n%10<e;i.set(\"isOn\",o)})}}class Jp extends Ll{constructor(t){super(t);const e=this.bindTemplate;this.set(\"isOn\",!1),this.setTemplate({tag:\"div\",attributes:{class:[\"ck-insert-table-dropdown-grid-box\",e.if(\"isOn\",\"ck-on\")]},on:{mouseover:e.to(\"over\")}})}}var Zp='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 6v3h4V6H3zm0 4v3h4v-3H3zm0 4v3h4v-3H3zm5 3h4v-3H8v3zm5 0h4v-3h-4v3zm4-4v-3h-4v3h4zm0-4V6h-4v3h4zm1.5 8a1.5 1.5 0 0 1-1.5 1.5H3A1.5 1.5 0 0 1 1.5 17V4c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5v13zM12 13v-3H8v3h4zm0-4V6H8v3h4z\"/></svg>',Xp='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z\" opacity=\".6\"/><path d=\"M18 7v1H2V7h16zm0 5v1H2v-1h16z\" opacity=\".6\"/><path d=\"M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1zm-2 1H8v4h4V2zm0 6H8v4h4V8zm0 6H8v4h4v-4z\"/></svg>',tb='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z\" opacity=\".6\"/><path d=\"M7 2h1v16H7V2zm5 0h1v16h-1V2z\" opacity=\".6\"/><path d=\"M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1 2v4h4V8H2zm6 0v4h4V8H8zm6 0v4h4V8h-4z\"/></svg>',eb='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z\" opacity=\".6\"/><path d=\"M7 2h1v16H7V2zm5 0h1v7h-1V2zm6 5v1H2V7h16zM8 12v1H2v-1h6z\" opacity=\".6\"/><path d=\"M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm1 2v9h10V9H8z\"/></svg>';class ib extends kd{init(){const t=this.editor,e=this.editor.t,i=\"ltr\"===t.locale.contentLanguageDirection;t.ui.componentFactory.add(\"insertTable\",i=>{const n=t.commands.get(\"insertTable\"),o=hd(i);o.bind(\"isEnabled\").to(n),o.buttonView.set({icon:Zp,label:e(\"ab\"),tooltip:!0});const r=new Kp(i);return o.panelView.children.add(r),r.delegate(\"execute\").to(o),o.buttonView.on(\"open\",()=>{r.rows=0,r.columns=0}),o.on(\"execute\",()=>{t.execute(\"insertTable\",{rows:r.rows,columns:r.columns}),t.editing.view.focus()}),o}),t.ui.componentFactory.add(\"tableColumn\",t=>{const n=[{type:\"switchbutton\",model:{commandName:\"setTableColumnHeader\",label:e(\"ac\"),bindIsOn:!0}},{type:\"separator\"},{type:\"button\",model:{commandName:i?\"insertTableColumnLeft\":\"insertTableColumnRight\",label:e(\"ad\")}},{type:\"button\",model:{commandName:i?\"insertTableColumnRight\":\"insertTableColumnLeft\",label:e(\"ae\")}},{type:\"button\",model:{commandName:\"removeTableColumn\",label:e(\"af\")}}];return this._prepareDropdown(e(\"ag\"),Xp,n,t)}),t.ui.componentFactory.add(\"tableRow\",t=>{const i=[{type:\"switchbutton\",model:{commandName:\"setTableRowHeader\",label:e(\"ah\"),bindIsOn:!0}},{type:\"separator\"},{type:\"button\",model:{commandName:\"insertTableRowBelow\",label:e(\"ai\")}},{type:\"button\",model:{commandName:\"insertTableRowAbove\",label:e(\"aj\")}},{type:\"button\",model:{commandName:\"removeTableRow\",label:e(\"ak\")}}];return this._prepareDropdown(e(\"al\"),tb,i,t)}),t.ui.componentFactory.add(\"mergeTableCells\",t=>{const n=[{type:\"button\",model:{commandName:\"mergeTableCellUp\",label:e(\"am\")}},{type:\"button\",model:{commandName:i?\"mergeTableCellRight\":\"mergeTableCellLeft\",label:e(\"an\")}},{type:\"button\",model:{commandName:\"mergeTableCellDown\",label:e(\"ao\")}},{type:\"button\",model:{commandName:i?\"mergeTableCellLeft\":\"mergeTableCellRight\",label:e(\"ap\")}},{type:\"separator\"},{type:\"button\",model:{commandName:\"splitTableCellVertically\",label:e(\"aq\")}},{type:\"button\",model:{commandName:\"splitTableCellHorizontally\",label:e(\"ar\")}}];return this._prepareDropdown(e(\"as\"),eb,n,t)})}_prepareDropdown(t,e,i,n){const o=this.editor,r=hd(n),s=[],a=new oo;for(const t of i)nb(t,o,s,a);return ud(r,a),r.buttonView.set({label:t,icon:e,tooltip:!0}),r.bind(\"isEnabled\").toMany(s,\"isEnabled\",(...t)=>t.some(t=>t)),this.listenTo(r,\"execute\",t=>{o.execute(t.source.commandName),o.editing.view.focus()}),r}}function nb(t,e,i,n){const o=t.model=new ou(t.model),{commandName:r,bindIsOn:s}=t.model;if(\"separator\"!==t.type){const t=e.commands.get(r);i.push(t),o.set({commandName:r}),o.bind(\"isEnabled\").to(t),s&&o.bind(\"isOn\").to(t,\"value\")}o.set({withText:!0}),n.add(t)}i(89);class ob{constructor(t,e){this.loader=t,this.options=e}upload(){return this.loader.file.then(t=>new Promise((e,i)=>{this._initRequest(),this._initListeners(e,i,t),this._sendRequest(t)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const t=this.xhr=new XMLHttpRequest;t.open(\"POST\",this.options.uploadUrl,!0),t.responseType=\"json\"}_initListeners(t,e,i){const n=this.xhr,o=this.loader,r=`Couldn't upload file: ${i.name}.`;n.addEventListener(\"error\",()=>e(r)),n.addEventListener(\"abort\",()=>e()),n.addEventListener(\"load\",()=>{const i=n.response;if(!i||i.error)return e(i&&i.error&&i.error.message?i.error.message:r);t(i.url?{default:i.url}:i.urls)}),n.upload&&n.upload.addEventListener(\"progress\",t=>{t.lengthComputable&&(o.uploadTotal=t.total,o.uploaded=t.loaded)})}_sendRequest(t){const e=this.options.headers||{};for(const t of Object.keys(e))this.xhr.setRequestHeader(t,e[t]);const i=new FormData;i.append(\"upload\",t),this.xhr.send(i)}}class rb{constructor(t){this.set(\"activeHandlePosition\",null),this.set(\"proposedWidthPercents\",null),this.set(\"proposedWidth\",null),this.set(\"proposedHeight\",null),this.set(\"proposedHandleHostWidth\",null),this.set(\"proposedHandleHostHeight\",null),this._options=t,this._referenceCoordinates=null}begin(t,e,i){const n=new xs(e);this.activeHandlePosition=function(t){const e=[\"top-left\",\"top-right\",\"bottom-right\",\"bottom-left\"];for(const i of e)if(t.classList.contains(sb(i)))return i}(t),this._referenceCoordinates=function(t,e){const i=new xs(t),n=e.split(\"-\"),o={x:\"right\"==n[1]?i.right:i.left,y:\"bottom\"==n[0]?i.bottom:i.top};return o.x+=t.ownerDocument.defaultView.scrollX,o.y+=t.ownerDocument.defaultView.scrollY,o}(e,function(t){const e=t.split(\"-\"),i={top:\"bottom\",bottom:\"top\",left:\"right\",right:\"left\"};return`${i[e[0]]}-${i[e[1]]}`}(this.activeHandlePosition)),this.originalWidth=n.width,this.originalHeight=n.height,this.aspectRatio=n.width/n.height;const o=i.style.width;o&&o.match(/^\\d+\\.?\\d*%$/)?this.originalWidthPercents=parseFloat(o):this.originalWidthPercents=function(t,e){const i=t.parentElement,n=parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).width);return e.width/n*100}(i,n)}update(t){this.proposedWidth=t.width,this.proposedHeight=t.height,this.proposedWidthPercents=t.widthPercents,this.proposedHandleHostWidth=t.handleHostWidth,this.proposedHandleHostHeight=t.handleHostHeight}}function sb(t){return`ck-widget__resizer__handle-${t}`}cn(rb,Fn);class ab{constructor(t){this._options=t,this._domResizerWrapper=null,this.set(\"isEnabled\",!0),this.decorate(\"begin\"),this.decorate(\"cancel\"),this.decorate(\"commit\"),this.decorate(\"updateSize\")}attach(){const t=this,e=this._options.viewElement,i=this._options.downcastWriter,n=i.createUIElement(\"div\",{class:\"ck ck-reset_all ck-widget__resizer\"},function(e){const i=this.toDomElement(e);return t._appendHandles(i),t._appendSizeUI(i),t._domResizerWrapper=i,t.on(\"change:isEnabled\",(t,e,n)=>{i.style.display=n?\"\":\"none\"}),i.style.display=t.isEnabled?\"\":\"none\",i});i.insert(i.createPositionAt(e,\"end\"),n),i.addClass(\"ck-widget_with-resizer\",e)}begin(t){this.state=new rb(this._options),this._sizeUI.bindToState(this._options,this.state),this.state.begin(t,this._getHandleHost(),this._getResizeHost())}updateSize(t){const e=this._getHandleHost(),i=this._getResizeHost(),n=this._options.unit,o=this._proposeNewSize(t);i.style.width=(\"%\"===n?o.widthPercents:o.width)+this._options.unit;const r=new xs(e);o.handleHostWidth=Math.round(r.width),o.handleHostHeight=Math.round(r.height);const s=new xs(e);o.width=Math.round(s.width),o.height=Math.round(s.height),this.redraw(r),this.state.update(o)}commit(){const t=(\"%\"===this._options.unit?this.state.proposedWidthPercents:this.state.proposedWidth)+this._options.unit;this._options.onCommit(t),this._cleanup()}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(t){const e=this._domResizerWrapper;if(function(t){return t&&t.ownerDocument&&t.ownerDocument.contains(t)}(e)){const i=e.parentElement,n=this._getHandleHost(),o=t||new xs(n);e.style.width=o.width+\"px\",e.style.height=o.height+\"px\";const r={left:n.offsetLeft,top:n.offsetTop,height:n.offsetHeight,width:n.offsetWidth};i.isSameNode(n)||(e.style.left=r.left+\"px\",e.style.top=r.top+\"px\",e.style.height=r.height+\"px\",e.style.width=r.width+\"px\")}}containsHandle(t){return this._domResizerWrapper.contains(t)}static isResizeHandle(t){return t.classList.contains(\"ck-widget__resizer__handle\")}_cleanup(){this._sizeUI.dismiss(),this._sizeUI.isVisible=!1}_proposeNewSize(t){const e=this.state,i=function(t){return{x:t.pageX,y:t.pageY}}(t),n=!this._options.isCentered||this._options.isCentered(this),o={x:e._referenceCoordinates.x-(i.x+e.originalWidth),y:i.y-e.originalHeight-e._referenceCoordinates.y};n&&e.activeHandlePosition.endsWith(\"-right\")&&(o.x=i.x-(e._referenceCoordinates.x+e.originalWidth)),n&&(o.x*=2);const r={width:Math.abs(e.originalWidth+o.x),height:Math.abs(e.originalHeight+o.y)};r.dominant=r.width/e.aspectRatio>r.height?\"width\":\"height\",r.max=r[r.dominant];const s={width:r.width,height:r.height};return\"width\"==r.dominant?s.height=s.width/e.aspectRatio:s.width=s.height*e.aspectRatio,{width:Math.round(s.width),height:Math.round(s.height),widthPercents:Math.min(Math.round(e.originalWidthPercents/e.originalWidth*s.width*100)/100,100)}}_getResizeHost(){const t=this._domResizerWrapper.parentElement;return this._options.getResizeHost(t)}_getHandleHost(){const t=this._domResizerWrapper.parentElement;return this._options.getHandleHost(t)}_appendHandles(t){const e=[\"top-left\",\"top-right\",\"bottom-right\",\"bottom-left\"];for(const i of e)t.appendChild(new wl({tag:\"div\",attributes:{class:`ck-widget__resizer__handle ${lb(i)}`}}).render())}_appendSizeUI(t){const e=new cb;e.render(),this._sizeUI=e,t.appendChild(e.element)}_getHandlePosition(t){const e=[\"top-left\",\"top-right\",\"bottom-right\",\"bottom-left\"];for(const i of e)if(t.classList.contains(lb(i)))return i}}cn(ab,Fn);class cb extends Ll{constructor(){super();const t=this.bindTemplate;this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-size-view\",t.to(\"activeHandlePosition\",t=>t?`ck-orientation-${t}`:\"\")],style:{display:t.if(\"isVisible\",\"none\",t=>!t)}},children:[{text:t.to(\"label\")}]})}bindToState(t,e){this.bind(\"isVisible\").to(e,\"proposedWidth\",e,\"proposedHeight\",(t,e)=>null!==t&&null!==e),this.bind(\"label\").to(e,\"proposedHandleHostWidth\",e,\"proposedHandleHostHeight\",e,\"proposedWidthPercents\",(e,i,n)=>\"px\"===t.unit?`${e}×${i}`:`${n}%`),this.bind(\"activeHandlePosition\").to(e)}dismiss(){this.unbind(),this.isVisible=!1}}function lb(t){return`ck-widget__resizer__handle-${t}`}var db=\"Expected a function\";var hb=function(t,e,i){var n=!0,o=!0;if(\"function\"!=typeof t)throw new TypeError(db);return B(i)&&(n=\"leading\"in i?!!i.leading:n,o=\"trailing\"in i?!!i.trailing:o),gs(t,e,{leading:n,maxWait:e,trailing:o})};i(91);class ub extends kd{static get pluginName(){return\"WidgetResize\"}init(){this.set(\"_visibleResizer\",null),this.set(\"_activeResizer\",null),this._resizers=new Map;const t=tr.window.document;this.editor.model.schema.setAttributeProperties(\"width\",{isFormatting:!0}),this._observer=Object.create(cr),this._observer.listenTo(t,\"mousedown\",(t,e)=>{if(!ab.isResizeHandle(e.target))return;const i=e.target;this._activeResizer=this._getResizerByHandle(i),this._activeResizer&&this._activeResizer.begin(i)}),this._observer.listenTo(t,\"mousemove\",(t,e)=>{this._activeResizer&&this._activeResizer.updateSize(e)}),this._observer.listenTo(t,\"mouseup\",()=>{this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)});const e=()=>{this._visibleResizer&&this._visibleResizer.redraw()},i=hb(e,200);this.on(\"change:_visibleResizer\",e),this.editor.ui.on(\"update\",i),this._observer.listenTo(tr.window,\"resize\",i);const n=this.editor.editing.view.document.selection;n.on(\"change\",()=>{const t=n.getSelectedElement();this._visibleResizer=this._getResizerByViewElement(t)||null})}destroy(){this._observer.stopListening()}attachTo(t){const e=new ab(t);return e.attach(),this._resizers.set(t.viewElement,e),e}_getResizerByHandle(t){for(const e of this._resizers.values())if(e.containsHandle(t))return e}_getResizerByViewElement(t){return this._resizers.get(t)}}cn(ub,Fn);class fb extends Td{refresh(){const t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=yu(t),t&&t.hasAttribute(\"width\")?this.value={width:t.getAttribute(\"width\"),height:null}:this.value=null}execute(t){const e=this.editor.model,i=e.document.selection.getSelectedElement();e.change(e=>{e.setAttribute(\"width\",t.width,i)})}}i(93);i.d(e,\"default\",function(){return gb});class gb extends _d{}gb.builtinPlugins=[class extends kd{static get requires(){return[Ad,Id,Dd,Qd,ph]}static get pluginName(){return\"Essentials\"}},class extends kd{static get requires(){return[_h]}static get pluginName(){return\"CKFinderUploadAdapter\"}init(){const t=this.editor.config.get(\"ckfinder.uploadUrl\");t&&(this.editor.plugins.get(_h).createUploadAdapter=(e=>new Th(e,t,this.editor.t)))}},class extends kd{static get pluginName(){return\"Autoformat\"}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats()}_addListAutoformats(){const t=this.editor.commands;t.get(\"bulletedList\")&&new Ch(this.editor,/^[*-]\\s$/,\"bulletedList\"),t.get(\"numberedList\")&&new Ch(this.editor,/^1[.|)]\\s$/,\"numberedList\")}_addBasicStylesAutoformats(){const t=this.editor.commands;if(t.get(\"bold\")){const t=Mh(this.editor,\"bold\");new Ph(this.editor,/(\\*\\*)([^*]+)(\\*\\*)$/g,t),new Ph(this.editor,/(__)([^_]+)(__)$/g,t)}if(t.get(\"italic\")){const t=Mh(this.editor,\"italic\");new Ph(this.editor,/(?:^|[^*])(\\*)([^*_]+)(\\*)$/g,t),new Ph(this.editor,/(?:^|[^_])(_)([^_]+)(_)$/g,t)}if(t.get(\"code\")){const t=Mh(this.editor,\"code\");new Ph(this.editor,/(`)([^`]+)(`)$/g,t)}}_addHeadingAutoformats(){const t=this.editor.commands.get(\"heading\");t&&t.modelElements.filter(t=>t.match(/^heading[1-6]$/)).forEach(e=>{const i=e[7],n=new RegExp(`^(#{${i}})\\\\s$`);new Ch(this.editor,n,()=>{if(!t.isEnabled)return!1;this.editor.execute(\"heading\",{value:e})})})}_addBlockQuoteAutoformats(){this.editor.commands.get(\"blockQuote\")&&new Ch(this.editor,/^>\\s$/,\"blockQuote\")}},class extends kd{static get requires(){return[Nh,Dh]}static get pluginName(){return\"Bold\"}},class extends kd{static get requires(){return[jh,Bh]}static get pluginName(){return\"Italic\"}},class extends kd{static get requires(){return[Yh,Gh]}static get pluginName(){return\"BlockQuote\"}},class extends kd{static get requires(){return[nu,ru]}static get pluginName(){return\"Heading\"}},class extends kd{static get requires(){return[Cu,Eu,ef]}static get pluginName(){return\"Image\"}},class extends kd{static get requires(){return[rf]}static get pluginName(){return\"ImageCaption\"}},class extends kd{static get requires(){return[kf,vf]}static get pluginName(){return\"ImageStyle\"}},class extends kd{static get requires(){return[yf]}static get pluginName(){return\"ImageToolbar\"}afterInit(){const t=this.editor,e=t.t;t.plugins.get(yf).register(\"image\",{ariaLabel:e(\"b\"),items:t.config.get(\"image.toolbar\")||[],getRelatedElement:vu})}},class extends kd{static get pluginName(){return\"ImageUpload\"}static get requires(){return[Uf,Ef,Nf]}},class extends kd{static get pluginName(){return\"Indent\"}static get requires(){return[qf,Gf]}},class extends kd{static get requires(){return[zg,$g]}static get pluginName(){return\"Link\"}},class extends kd{static get requires(){return[_m,xm]}static get pluginName(){return\"List\"}},class extends kd{static get requires(){return[Rm,zm,Lm,Eu]}static get pluginName(){return\"MediaEmbed\"}},Jh,class extends kd{static get pluginName(){return\"PasteFromOffice\"}static get requires(){return[Ad]}init(){const t=this.editor,e=[];e.push(new Km),e.push(new Hm),t.plugins.get(\"Clipboard\").on(\"inputTransformation\",(t,i)=>{if(i.isTransformedWithPasteFromOffice)return;const n=i.dataTransfer.getData(\"text/html\"),o=e.find(t=>t.isActive(n));o&&(o.execute(i),i.isTransformedWithPasteFromOffice=!0)},{priority:\"high\"})}},class extends kd{static get requires(){return[Qp,ib,Eu]}static get pluginName(){return\"Table\"}},class extends kd{static get requires(){return[yf]}static get pluginName(){return\"TableToolbar\"}afterInit(){const t=this.editor,e=t.t,i=t.plugins.get(yf),n=t.config.get(\"table.contentToolbar\"),o=t.config.get(\"table.tableToolbar\");n&&i.register(\"tableContent\",{ariaLabel:e(\"c\"),items:n,getRelatedElement:sp}),o&&i.register(\"table\",{ariaLabel:e(\"c\"),items:o,getRelatedElement:rp})}},class extends kd{static get requires(){return[_h]}static get pluginName(){return\"SimpleUploadAdapter\"}init(){const t=this.editor.config.get(\"simpleUpload\");t&&(t.uploadUrl?this.editor.plugins.get(_h).createUploadAdapter=(e=>new ob(e,t)):console.warn(Object($i.a)('simple-upload-adapter-missing-uploadUrl: Missing the \"uploadUrl\" property in the \"simpleUpload\" editor configuration.')))}},class extends kd{static get requires(){return[ub]}static get pluginName(){return\"ImageResize\"}init(){const t=this.editor,e=new fb(t);this._registerSchema(),this._registerConverters(),t.commands.add(\"imageResize\",e),t.editing.downcastDispatcher.on(\"insert:image\",(i,n,o)=>{const r=o.mapper.toViewElement(n.item),s=t.plugins.get(ub).attachTo({unit:t.config.get(\"image.resizeUnit\")||\"%\",modelElement:n.item,viewElement:r,downcastWriter:o.writer,getHandleHost:t=>t.querySelector(\"img\"),getResizeHost:t=>t,isCentered(){const t=n.item.getAttribute(\"imageStyle\");return!t||\"full\"==t||\"alignCenter\"==t},onCommit(e){t.execute(\"imageResize\",{width:e})}});s.on(\"updateSize\",()=>{r.hasClass(\"image_resized\")||t.editing.view.change(t=>{t.addClass(\"image_resized\",r)})}),s.bind(\"isEnabled\").to(e)},{priority:\"low\"})}_registerSchema(){this.editor.model.schema.extend(\"image\",{allowAttributes:\"width\"})}_registerConverters(){const t=this.editor;t.conversion.for(\"downcast\").add(t=>t.on(\"attribute:width:image\",(t,e,i)=>{if(!i.consumable.consume(e.item,t.name))return;const n=i.writer,o=i.mapper.toViewElement(e.item);null!==e.attributeNewValue?(n.setStyle(\"width\",e.attributeNewValue,o),n.addClass(\"image_resized\",o)):(n.removeStyle(\"width\",o),n.removeClass(\"image_resized\",o))})),t.conversion.for(\"upcast\").attributeToAttribute({view:{name:\"figure\",styles:{width:/.+/}},model:{key:\"width\",value:t=>t.getStyle(\"width\")}})}}],gb.defaultConfig={toolbar:{items:[\"heading\",\"|\",\"bold\",\"italic\",\"link\",\"bulletedList\",\"numberedList\",\"|\",\"indent\",\"outdent\",\"|\",\"imageUpload\",\"blockQuote\",\"insertTable\",\"mediaEmbed\",\"undo\",\"redo\"]},image:{toolbar:[\"imageStyle:full\",\"imageStyle:side\",\"|\",\"imageTextAlternative\"]},table:{contentToolbar:[\"tableColumn\",\"tableRow\",\"mergeTableCells\"]},language:\"en\"}}]).default});\n//# sourceMappingURL=ckeditor.js.map\n\n//# sourceURL=webpack:///./node_modules/ckeditor5-build-classic-simple-upload-adapter-image-resize/build/ckeditor.js?");
598
+
599
+ /***/ }),
600
+
601
+ /***/ "./node_modules/flatpickr/dist/esm/index.js":
602
+ /*!**************************************************!*\
603
+ !*** ./node_modules/flatpickr/dist/esm/index.js ***!
604
+ \**************************************************/
605
+ /*! exports provided: default */
606
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
607
+
608
+ "use strict";
609
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _types_options__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./types/options */ \"./node_modules/flatpickr/dist/esm/types/options.js\");\n/* harmony import */ var _l10n_default__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./l10n/default */ \"./node_modules/flatpickr/dist/esm/l10n/default.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ \"./node_modules/flatpickr/dist/esm/utils/index.js\");\n/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/dom */ \"./node_modules/flatpickr/dist/esm/utils/dom.js\");\n/* harmony import */ var _utils_dates__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/dates */ \"./node_modules/flatpickr/dist/esm/utils/dates.js\");\n/* harmony import */ var _utils_formatting__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/formatting */ \"./node_modules/flatpickr/dist/esm/utils/formatting.js\");\n/* harmony import */ var _utils_polyfills__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/polyfills */ \"./node_modules/flatpickr/dist/esm/utils/polyfills.js\");\n/* harmony import */ var _utils_polyfills__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_utils_polyfills__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n\n\nconst DEBOUNCED_CHANGE_MS = 300;\nfunction FlatpickrInstance(element, instanceConfig) {\n const self = {\n config: Object.assign(Object.assign({}, _types_options__WEBPACK_IMPORTED_MODULE_0__[\"defaults\"]), flatpickr.defaultConfig),\n l10n: _l10n_default__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n };\n self.parseDate = Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"createDateParser\"])({ config: self.config, l10n: self.l10n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self._createElement = _utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"];\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth(month = self.currentMonth, yr = self.currentYear) {\n if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n return 29;\n return self.l10n.daysInMonth[month];\n },\n };\n }\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile)\n build();\n bindEvents();\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n }\n updateValue(false);\n }\n setCalendarWidth();\n const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n triggerEvent(\"onReady\");\n }\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n function setCalendarWidth() {\n const config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1) {\n return;\n }\n else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n if (self.daysContainer !== undefined) {\n const daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width =\n daysWidth +\n (self.weekWrapper !== undefined\n ? self.weekWrapper.offsetWidth\n : 0) +\n \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n const defaultDate = self.config.minDate === undefined ||\n Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"compareDates\"])(new Date(), self.config.minDate) >= 0\n ? new Date()\n : new Date(self.config.minDate.getTime());\n const defaults = Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"getDefaultHours\"])(self.config);\n defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n self.selectedDates = [defaultDate];\n self.latestSelectedDateObj = defaultDate;\n }\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n const prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n function ampm2military(hour, amPM) {\n return (hour % 12) + 12 * Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"int\"])(amPM === self.l10n.amPM[1]);\n }\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n default:\n return hour % 12;\n }\n }\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n let hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n const limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"compareDates\"])(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n const limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"compareDates\"])(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (limitMaxHours) {\n const maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n const minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n minutes = minTime.getMinutes();\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n setHours(hours, minutes, seconds);\n }\n function setHoursFromDate(dateObj) {\n const date = dateObj || self.latestSelectedDateObj;\n if (date) {\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n }\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n if (!self.hourElement || !self.minuteElement || self.isMobile)\n return;\n self.hourElement.value = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"pad\"])(!self.config.time_24hr\n ? ((12 + hours) % 12) + 12 * Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"int\"])(hours % 12 === 0)\n : hours);\n self.minuteElement.value = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"pad\"])(minutes);\n if (self.amPM !== undefined)\n self.amPM.textContent = self.l10n.amPM[Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"int\"])(hours >= 12)];\n if (self.secondElement !== undefined)\n self.secondElement.value = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"pad\"])(seconds);\n }\n function onYearInput(event) {\n const eventTarget = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"getEventTarget\"])(event);\n const year = parseInt(eventTarget.value) + (event.delta || 0);\n if (year / 1000 > 1 ||\n (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n changeYear(year);\n }\n }\n function bind(element, event, handler, options) {\n if (event instanceof Array)\n return event.forEach((ev) => bind(element, ev, handler, options));\n if (element instanceof Array)\n return element.forEach((el) => bind(el, event, handler, options));\n element.addEventListener(event, handler, options);\n self._handlers.push({\n remove: () => element.removeEventListener(event, handler),\n });\n }\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach((evt) => {\n Array.prototype.forEach.call(self.element.querySelectorAll(`[data-${evt}]`), (el) => bind(el, \"click\", self[evt]));\n });\n }\n if (self.isMobile) {\n setupMobile();\n return;\n }\n const debouncedResize = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"debounce\"])(onResize, 50);\n self._debouncedChange = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"debounce\"])(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n bind(self.daysContainer, \"mouseover\", (e) => {\n if (self.config.mode === \"range\")\n onMouseOver(Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"getEventTarget\"])(e));\n });\n bind(window.document.body, \"keydown\", onKeyDown);\n if (!self.config.inline && !self.config.static)\n bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined)\n bind(window.document, \"touchstart\", documentClick);\n else\n bind(window.document, \"mousedown\", documentClick);\n bind(window.document, \"focus\", documentClick, { capture: true });\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"click\", onMonthNavClick);\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"click\", selectDate);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n const selText = (e) => Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"getEventTarget\"])(e).select();\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n bind(self.timeContainer, \"click\", timeIncrement);\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined)\n bind(self.secondElement, \"focus\", () => self.secondElement && self.secondElement.select());\n if (self.amPM !== undefined) {\n bind(self.amPM, \"click\", (e) => {\n updateTime(e);\n triggerChange();\n });\n }\n }\n if (self.config.allowInput) {\n bind(self._input, \"blur\", onBlur);\n }\n }\n function jumpToDate(jumpDate, triggerChange) {\n const jumpTo = jumpDate !== undefined\n ? self.parseDate(jumpDate)\n : self.latestSelectedDateObj ||\n (self.config.minDate && self.config.minDate > self.now\n ? self.config.minDate\n : self.config.maxDate && self.config.maxDate < self.now\n ? self.config.maxDate\n : self.now);\n const oldYear = self.currentYear;\n const oldMonth = self.currentMonth;\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n }\n catch (e) {\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n if (triggerChange &&\n (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n self.redraw();\n }\n function timeIncrement(e) {\n const eventTarget = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"getEventTarget\"])(e);\n if (~eventTarget.className.indexOf(\"arrow\"))\n incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n function incrementNumInput(e, delta, inputElem) {\n const target = e && Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"getEventTarget\"])(e);\n const input = inputElem ||\n (target && target.parentNode && target.parentNode.firstChild);\n const event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n function build() {\n const fragment = window.document.createDocumentFragment();\n self.calendarContainer = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) {\n const { weekWrapper, weekNumbers } = buildWeeks();\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n self.rContainer = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n if (!self.daysContainer) {\n self.daysContainer = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(self.calendarContainer, \"animate\", self.config.animate === true);\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n const customAppend = self.config.appendTo !== undefined &&\n self.config.appendTo.nodeType !== undefined;\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode)\n self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n else if (self.config.appendTo !== undefined)\n self.config.appendTo.appendChild(self.calendarContainer);\n }\n if (self.config.static) {\n const wrapper = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode)\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput)\n wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n if (!self.config.static && !self.config.inline)\n (self.config.appendTo !== undefined\n ? self.config.appendTo\n : window.document.body).appendChild(self.calendarContainer);\n }\n function createDay(className, date, dayNumber, i) {\n const dateIsEnabled = isEnabled(date, true), dayElement = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"span\", \"flatpickr-day \" + className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n if (className.indexOf(\"hidden\") === -1 &&\n Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"compareDates\"])(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n if (self.config.mode === \"range\") {\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(dayElement, \"startRange\", self.selectedDates[0] &&\n Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"compareDates\"])(date, self.selectedDates[0], true) === 0);\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(dayElement, \"endRange\", self.selectedDates[1] &&\n Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"compareDates\"])(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\")\n dayElement.classList.add(\"inRange\");\n }\n }\n }\n else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date))\n dayElement.classList.add(\"inRange\");\n }\n if (self.weekNumbers &&\n self.config.showMonths === 1 &&\n className !== \"prevMonthDay\" &&\n dayNumber % 7 === 1) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"<span class='flatpickr-day'>\" + self.config.getWeek(date) + \"</span>\");\n }\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\")\n onMouseOver(targetNode);\n }\n function getFirstAvailableDay(delta) {\n const startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n const endMonth = delta > 0 ? self.config.showMonths : -1;\n for (let m = startMonth; m != endMonth; m += delta) {\n const month = self.daysContainer.children[m];\n const startIndex = delta > 0 ? 0 : month.children.length - 1;\n const endIndex = delta > 0 ? month.children.length : -1;\n for (let i = startIndex; i != endIndex; i += delta) {\n const c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n return c;\n }\n }\n return undefined;\n }\n function getNextAvailableDay(current, delta) {\n const givenMonth = current.className.indexOf(\"Month\") === -1\n ? current.dateObj.getMonth()\n : self.currentMonth;\n const endMonth = delta > 0 ? self.config.showMonths : -1;\n const loopDelta = delta > 0 ? 1 : -1;\n for (let m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n const month = self.daysContainer.children[m];\n const startIndex = givenMonth - self.currentMonth === m\n ? current.$i + delta\n : delta < 0\n ? month.children.length - 1\n : 0;\n const numMonthDays = month.children.length;\n for (let i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n const c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 &&\n isEnabled(c.dateObj) &&\n Math.abs(current.$i - i) >= Math.abs(delta))\n return focusOnDayElem(c);\n }\n }\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n function focusOnDay(current, offset) {\n const dayFocused = isInView(document.activeElement || document.body);\n const startElem = current !== undefined\n ? current\n : dayFocused\n ? document.activeElement\n : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n ? self.selectedDateElem\n : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n ? self.todayDateElem\n : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined) {\n self._input.focus();\n }\n else if (!dayFocused) {\n focusOnDayElem(startElem);\n }\n else {\n getNextAvailableDay(startElem, offset);\n }\n }\n function buildMonthDays(year, month) {\n const firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n const prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n const daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n let dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n for (let dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n const dayContainer = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"clearNode\"])(self.daysContainer);\n if (self.weekNumbers)\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"clearNode\"])(self.weekNumbers);\n const frag = document.createDocumentFragment();\n for (let i = 0; i < self.config.showMonths; i++) {\n const d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType !== \"dropdown\")\n return;\n const shouldBuildMonth = function (month) {\n if (self.config.minDate !== undefined &&\n self.currentYear === self.config.minDate.getFullYear() &&\n month < self.config.minDate.getMonth()) {\n return false;\n }\n return !(self.config.maxDate !== undefined &&\n self.currentYear === self.config.maxDate.getFullYear() &&\n month > self.config.maxDate.getMonth());\n };\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n for (let i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i))\n continue;\n const month = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = Object(_utils_formatting__WEBPACK_IMPORTED_MODULE_5__[\"monthToStr\"])(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n if (self.currentMonth === i) {\n month.selected = true;\n }\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n function buildMonth() {\n const container = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"flatpickr-month\");\n const monthNavFragment = window.document.createDocumentFragment();\n let monthElement;\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n monthElement = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"span\", \"cur-month\");\n }\n else {\n self.monthsDropdownContainer = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"select\", \"flatpickr-monthDropdown-months\");\n self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n bind(self.monthsDropdownContainer, \"change\", (e) => {\n const target = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"getEventTarget\"])(e);\n const selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n const yearInput = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createNumberInput\"])(\"cur-year\", { tabindex: \"-1\" });\n const yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled =\n !!self.config.minDate &&\n self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n const currentMonth = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container,\n yearElement,\n monthElement,\n };\n }\n function buildMonths() {\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"clearNode\"])(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n for (let m = self.config.showMonths; m--;) {\n const month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n self.monthNav.appendChild(self.nextMonthNav);\n }\n function buildMonthNav() {\n self.monthNav = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: () => self.__hidePrevMonthArrow,\n set(bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n },\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: () => self.__hideNextMonthArrow,\n set(bool) {\n if (self.__hideNextMonthArrow !== bool) {\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n },\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar)\n self.calendarContainer.classList.add(\"noCalendar\");\n const defaults = Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"getDefaultHours\"])(self.config);\n self.timeContainer = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n const separator = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"span\", \"flatpickr-time-separator\", \":\");\n const hourInput = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createNumberInput\"])(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel,\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n const minuteInput = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createNumberInput\"])(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel,\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"pad\"])(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getHours()\n : self.config.time_24hr\n ? defaults.hours\n : military2ampm(defaults.hours));\n self.minuteElement.value = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"pad\"])(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getMinutes()\n : defaults.minutes);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.hourElement.setAttribute(\"maxlength\", \"2\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.minuteElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr)\n self.timeContainer.classList.add(\"time24hr\");\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n const secondInput = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createNumberInput\"])(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"pad\"])(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getSeconds()\n : defaults.seconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.secondElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n if (!self.config.time_24hr) {\n self.amPM = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"int\"])((self.latestSelectedDateObj\n ? self.hourElement.value\n : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n return self.timeContainer;\n }\n function buildWeekdays() {\n if (!self.weekdayContainer)\n self.weekdayContainer = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"flatpickr-weekdays\");\n else\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"clearNode\"])(self.weekdayContainer);\n for (let i = self.config.showMonths; i--;) {\n const container = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n updateWeekdays();\n return self.weekdayContainer;\n }\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n const firstDayOfWeek = self.l10n.firstDayOfWeek;\n let weekdays = [...self.l10n.weekdays.shorthand];\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = [\n ...weekdays.splice(firstDayOfWeek, weekdays.length),\n ...weekdays.splice(0, firstDayOfWeek),\n ];\n }\n for (let i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = `\n <span class='flatpickr-weekday'>\n ${weekdays.join(\"</span><span class='flatpickr-weekday'>\")}\n </span>\n `;\n }\n }\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n const weekWrapper = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n const weekNumbers = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper,\n weekNumbers,\n };\n }\n function changeMonth(value, isOffset = true) {\n const delta = isOffset ? value : value - self.currentMonth;\n if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n (delta > 0 && self._hideNextMonthArrow === true))\n return;\n self.currentMonth += delta;\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n function clear(triggerChangeEvent = true, toInitial = true) {\n self.input.value = \"\";\n if (self.altInput !== undefined)\n self.altInput.value = \"\";\n if (self.mobileInput !== undefined)\n self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n if (self.config.enableTime === true) {\n const { hours, minutes, seconds } = Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"getDefaultHours\"])(self.config);\n setHours(hours, minutes, seconds);\n }\n self.redraw();\n if (triggerChangeEvent)\n triggerEvent(\"onChange\");\n }\n function close() {\n self.isOpen = false;\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n triggerEvent(\"onClose\");\n }\n function destroy() {\n if (self.config !== undefined)\n triggerEvent(\"onDestroy\");\n for (let i = self._handlers.length; i--;) {\n self._handlers[i].remove();\n }\n self._handlers = [];\n if (self.mobileInput) {\n if (self.mobileInput.parentNode)\n self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n }\n else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n const wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n if (wrapper.parentNode) {\n while (wrapper.firstChild)\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n }\n }\n else\n self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode)\n self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n }\n [\n \"_showTimeInput\",\n \"latestSelectedDateObj\",\n \"_hideNextMonthArrow\",\n \"_hidePrevMonthArrow\",\n \"__hideNextMonthArrow\",\n \"__hidePrevMonthArrow\",\n \"isMobile\",\n \"isOpen\",\n \"selectedDateElem\",\n \"minDateHasTime\",\n \"maxDateHasTime\",\n \"days\",\n \"daysContainer\",\n \"_input\",\n \"_positionElement\",\n \"innerContainer\",\n \"rContainer\",\n \"monthNav\",\n \"todayDateElem\",\n \"calendarContainer\",\n \"weekdayContainer\",\n \"prevMonthNav\",\n \"nextMonthNav\",\n \"monthsDropdownContainer\",\n \"currentMonthElement\",\n \"currentYearElement\",\n \"navigationCurrentMonth\",\n \"selectedDateElem\",\n \"config\",\n ].forEach((k) => {\n try {\n delete self[k];\n }\n catch (_) { }\n });\n }\n function isCalendarElem(elem) {\n if (self.config.appendTo && self.config.appendTo.contains(elem))\n return true;\n return self.calendarContainer.contains(elem);\n }\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n const eventTarget = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"getEventTarget\"])(e);\n const isCalendarElement = isCalendarElem(eventTarget);\n const isInput = eventTarget === self.input ||\n eventTarget === self.altInput ||\n self.element.contains(eventTarget) ||\n (e.path &&\n e.path.indexOf &&\n (~e.path.indexOf(self.input) ||\n ~e.path.indexOf(self.altInput)));\n const lostFocus = e.type === \"blur\"\n ? isInput &&\n e.relatedTarget &&\n !isCalendarElem(e.relatedTarget)\n : !isInput &&\n !isCalendarElement &&\n !isCalendarElem(e.relatedTarget);\n const isIgnored = !self.config.ignoredFocusElements.some((elem) => elem.contains(eventTarget));\n if (lostFocus && isIgnored) {\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined &&\n self.input.value !== \"\" &&\n self.input.value !== undefined) {\n updateTime();\n }\n self.close();\n if (self.config &&\n self.config.mode === \"range\" &&\n self.selectedDates.length === 1) {\n self.clear(false);\n self.redraw();\n }\n }\n }\n }\n function changeYear(newYear) {\n if (!newYear ||\n (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n return;\n const newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n if (self.config.maxDate &&\n self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n }\n else if (self.config.minDate &&\n self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n function isEnabled(date, timeless = true) {\n var _a;\n const dateToCheck = self.parseDate(date, undefined, timeless);\n if ((self.config.minDate &&\n dateToCheck &&\n Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"compareDates\"])(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n (self.config.maxDate &&\n dateToCheck &&\n Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"compareDates\"])(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n return false;\n if (!self.config.enable && self.config.disable.length === 0)\n return true;\n if (dateToCheck === undefined)\n return false;\n const bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n for (let i = 0, d; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" &&\n d(dateToCheck))\n return bool;\n else if (d instanceof Date &&\n dateToCheck !== undefined &&\n d.getTime() === dateToCheck.getTime())\n return bool;\n else if (typeof d === \"string\") {\n const parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime()\n ? bool\n : !bool;\n }\n else if (typeof d === \"object\" &&\n dateToCheck !== undefined &&\n d.from &&\n d.to &&\n dateToCheck.getTime() >= d.from.getTime() &&\n dateToCheck.getTime() <= d.to.getTime())\n return bool;\n }\n return !bool;\n }\n function isInView(elem) {\n if (self.daysContainer !== undefined)\n return (elem.className.indexOf(\"hidden\") === -1 &&\n elem.className.indexOf(\"flatpickr-disabled\") === -1 &&\n self.daysContainer.contains(elem));\n return false;\n }\n function onBlur(e) {\n const isInput = e.target === self._input;\n if (isInput &&\n (self.selectedDates.length > 0 || self._input.value.length > 0) &&\n !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n self.setDate(self._input.value, true, e.target === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n }\n function onKeyDown(e) {\n const eventTarget = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"getEventTarget\"])(e);\n const isInput = self.config.wrap\n ? element.contains(eventTarget)\n : eventTarget === self._input;\n const allowInput = self.config.allowInput;\n const allowKeydown = self.isOpen && (!allowInput || !isInput);\n const allowInlineKeydown = self.config.inline && isInput && !allowInput;\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, eventTarget === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n return eventTarget.blur();\n }\n else {\n self.open();\n }\n }\n else if (isCalendarElem(eventTarget) ||\n allowKeydown ||\n allowInlineKeydown) {\n const isTimeObj = !!self.timeContainer &&\n self.timeContainer.contains(eventTarget);\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n }\n else\n selectDate(e);\n break;\n case 27:\n e.preventDefault();\n focusAndClose();\n break;\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n break;\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n if (self.daysContainer !== undefined &&\n (allowInput === false ||\n (document.activeElement && isInView(document.activeElement)))) {\n const delta = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey)\n focusOnDay(undefined, delta);\n else {\n e.stopPropagation();\n changeMonth(delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n }\n else if (self.hourElement)\n self.hourElement.focus();\n break;\n case 38:\n case 40:\n e.preventDefault();\n const delta = e.keyCode === 40 ? 1 : -1;\n if ((self.daysContainer &&\n eventTarget.$i !== undefined) ||\n eventTarget === self.input ||\n eventTarget === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n else if (!isTimeObj)\n focusOnDay(undefined, delta * 7);\n }\n else if (eventTarget === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n }\n else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement)\n self.hourElement.focus();\n updateTime(e);\n self._debouncedChange();\n }\n break;\n case 9:\n if (isTimeObj) {\n const elems = [\n self.hourElement,\n self.minuteElement,\n self.secondElement,\n self.amPM,\n ]\n .concat(self.pluginElements)\n .filter((x) => x);\n const i = elems.indexOf(eventTarget);\n if (i !== -1) {\n const target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n (target || self._input).focus();\n }\n }\n else if (!self.config.noCalendar &&\n self.daysContainer &&\n self.daysContainer.contains(eventTarget) &&\n e.shiftKey) {\n e.preventDefault();\n self._input.focus();\n }\n break;\n default:\n break;\n }\n }\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n if (isInput || isCalendarElem(eventTarget)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n function onMouseOver(elem) {\n if (self.selectedDates.length !== 1 ||\n (elem &&\n (!elem.classList.contains(\"flatpickr-day\") ||\n elem.classList.contains(\"flatpickr-disabled\"))))\n return;\n const hoverDate = elem\n ? elem.dateObj.getTime()\n : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n let containsDisabled = false;\n let minRange = 0, maxRange = 0;\n for (let t = rangeStartDate; t < rangeEndDate; t += _utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"duration\"].DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled =\n containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n if (t < initialDate && (!minRange || t > minRange))\n minRange = t;\n else if (t > initialDate && (!maxRange || t < maxRange))\n maxRange = t;\n }\n }\n for (let m = 0; m < self.config.showMonths; m++) {\n const month = self.daysContainer.children[m];\n for (let i = 0, l = month.children.length; i < l; i++) {\n const dayElem = month.children[i], date = dayElem.dateObj;\n const timestamp = date.getTime();\n const outOfRange = (minRange > 0 && timestamp < minRange) ||\n (maxRange > 0 && timestamp > maxRange);\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach((c) => {\n dayElem.classList.remove(c);\n });\n continue;\n }\n else if (containsDisabled && !outOfRange)\n continue;\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach((c) => {\n dayElem.classList.remove(c);\n });\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n ? \"startRange\"\n : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"startRange\");\n else if (initialDate > hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange &&\n (maxRange === 0 || timestamp <= maxRange) &&\n Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"isBetween\"])(timestamp, initialDate, hoverDate))\n dayElem.classList.add(\"inRange\");\n }\n }\n }\n }\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline)\n positionCalendar();\n }\n function open(e, positionElement = self._positionElement) {\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n const eventTarget = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"getEventTarget\"])(e);\n if (eventTarget) {\n eventTarget.blur();\n }\n }\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n triggerEvent(\"onOpen\");\n return;\n }\n else if (self._input.disabled || self.config.inline) {\n return;\n }\n const wasOpen = self.isOpen;\n self.isOpen = true;\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n self._input.classList.add(\"active\");\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.config.allowInput === false &&\n (e === undefined ||\n !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(() => self.hourElement.select(), 50);\n }\n }\n }\n function minMaxDateSetter(type) {\n return (date) => {\n const dateObj = (self.config[`_${type}Date`] = self.parseDate(date, self.config.dateFormat));\n const inverseDateObj = self.config[`_${type === \"min\" ? \"max\" : \"min\"}Date`];\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n dateObj.getHours() > 0 ||\n dateObj.getMinutes() > 0 ||\n dateObj.getSeconds() > 0;\n }\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter((d) => isEnabled(d));\n if (!self.selectedDates.length && type === \"min\")\n setHoursFromDate(dateObj);\n updateValue();\n }\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined)\n self.currentYearElement[type] = dateObj.getFullYear().toString();\n else\n self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled =\n !!inverseDateObj &&\n dateObj !== undefined &&\n inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n function parseConfig() {\n const boolOpts = [\n \"wrap\",\n \"weekNumbers\",\n \"allowInput\",\n \"allowInvalidPreload\",\n \"clickOpens\",\n \"time_24hr\",\n \"enableTime\",\n \"noCalendar\",\n \"altInput\",\n \"shorthandCurrentMonth\",\n \"inline\",\n \"static\",\n \"enableSeconds\",\n \"disableMobile\",\n ];\n const userConfig = Object.assign(Object.assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n const formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: () => self.config._enable,\n set: (dates) => {\n self.config._enable = parseDateRules(dates);\n },\n });\n Object.defineProperty(self.config, \"disable\", {\n get: () => self.config._disable,\n set: (dates) => {\n self.config._disable = parseDateRules(dates);\n },\n });\n const timeMode = userConfig.mode === \"time\";\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n const defaultDateFormat = flatpickr.defaultConfig.dateFormat || _types_options__WEBPACK_IMPORTED_MODULE_0__[\"defaults\"].dateFormat;\n formats.dateFormat =\n userConfig.noCalendar || timeMode\n ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n if (userConfig.altInput &&\n (userConfig.enableTime || timeMode) &&\n !userConfig.altFormat) {\n const defaultAltFormat = flatpickr.defaultConfig.altFormat || _types_options__WEBPACK_IMPORTED_MODULE_0__[\"defaults\"].altFormat;\n formats.altFormat =\n userConfig.noCalendar || timeMode\n ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n : defaultAltFormat + ` h:i${userConfig.enableSeconds ? \":S\" : \"\"} K`;\n }\n Object.defineProperty(self.config, \"minDate\", {\n get: () => self.config._minDate,\n set: minMaxDateSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: () => self.config._maxDate,\n set: minMaxDateSetter(\"max\"),\n });\n const minMaxTimeSetter = (type) => (val) => {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n };\n Object.defineProperty(self.config, \"minTime\", {\n get: () => self.config._minTime,\n set: minMaxTimeSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: () => self.config._maxTime,\n set: minMaxTimeSetter(\"max\"),\n });\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n Object.assign(self.config, formats, userConfig);\n for (let i = 0; i < boolOpts.length; i++)\n self.config[boolOpts[i]] =\n self.config[boolOpts[i]] === true ||\n self.config[boolOpts[i]] === \"true\";\n _types_options__WEBPACK_IMPORTED_MODULE_0__[\"HOOKS\"].filter((hook) => self.config[hook] !== undefined).forEach((hook) => {\n self.config[hook] = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"arrayify\"])(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile =\n !self.config.disableMobile &&\n !self.config.inline &&\n self.config.mode === \"single\" &&\n !self.config.disable.length &&\n !self.config.enable &&\n !self.config.weekNumbers &&\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n for (let i = 0; i < self.config.plugins.length; i++) {\n const pluginConf = self.config.plugins[i](self) || {};\n for (const key in pluginConf) {\n if (_types_options__WEBPACK_IMPORTED_MODULE_0__[\"HOOKS\"].indexOf(key) > -1) {\n self.config[key] = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"arrayify\"])(pluginConf[key])\n .map(bindToInstance)\n .concat(self.config[key]);\n }\n else if (typeof userConfig[key] === \"undefined\")\n self.config[key] = pluginConf[key];\n }\n }\n if (!userConfig.altInputClass) {\n self.config.altInputClass =\n getInputElem().className + \" \" + self.config.altInputClass;\n }\n triggerEvent(\"onParseConfig\");\n }\n function getInputElem() {\n return self.config.wrap\n ? element.querySelector(\"[data-input]\")\n : element;\n }\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" &&\n typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n self.config.errorHandler(new Error(`flatpickr: invalid locale ${self.config.locale}`));\n self.l10n = Object.assign(Object.assign({}, flatpickr.l10ns.default), (typeof self.config.locale === \"object\"\n ? self.config.locale\n : self.config.locale !== \"default\"\n ? flatpickr.l10ns[self.config.locale]\n : undefined));\n _utils_formatting__WEBPACK_IMPORTED_MODULE_5__[\"tokenRegex\"].K = `(${self.l10n.amPM[0]}|${self.l10n.amPM[1]}|${self.l10n.amPM[0].toLowerCase()}|${self.l10n.amPM[1].toLowerCase()})`;\n const userConfig = Object.assign(Object.assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n if (userConfig.time_24hr === undefined &&\n flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n self.formatDate = Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"createDateFormatter\"])(self);\n self.parseDate = Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"createDateParser\"])({ config: self.config, l10n: self.l10n });\n }\n function positionCalendar(customPositionElement) {\n if (typeof self.config.position === \"function\") {\n return void self.config.position(self, customPositionElement);\n }\n if (self.calendarContainer === undefined)\n return;\n triggerEvent(\"onPreCalendarPosition\");\n const positionElement = customPositionElement || self._positionElement;\n const calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, ((acc, child) => acc + child.offsetHeight), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n const top = window.pageYOffset +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(self.calendarContainer, \"arrowTop\", !showOnTop);\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n let left = window.pageXOffset + inputBounds.left;\n let isCenter = false;\n let isRight = false;\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n }\n else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(self.calendarContainer, \"arrowCenter\", isCenter);\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(self.calendarContainer, \"arrowRight\", isRight);\n const right = window.document.body.offsetWidth -\n (window.pageXOffset + inputBounds.right);\n const rightMost = left + calendarWidth > window.document.body.offsetWidth;\n const centerMost = right + calendarWidth > window.document.body.offsetWidth;\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = `${top}px`;\n if (!rightMost) {\n self.calendarContainer.style.left = `${left}px`;\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = `${right}px`;\n }\n else {\n const doc = getDocumentStyleSheet();\n if (doc === undefined)\n return;\n const bodyWidth = window.document.body.offsetWidth;\n const centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n const centerBefore = \".flatpickr-calendar.centerMost:before\";\n const centerAfter = \".flatpickr-calendar.centerMost:after\";\n const centerIndex = doc.cssRules.length;\n const centerStyle = `{left:${inputBounds.left}px;right:auto;}`;\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(self.calendarContainer, \"rightMost\", false);\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"toggleClass\"])(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(`${centerBefore},${centerAfter}${centerStyle}`, centerIndex);\n self.calendarContainer.style.left = `${centerLeft}px`;\n self.calendarContainer.style.right = \"auto\";\n }\n }\n function getDocumentStyleSheet() {\n let editableSheet = null;\n for (let i = 0; i < document.styleSheets.length; i++) {\n const sheet = document.styleSheets[i];\n try {\n sheet.cssRules;\n }\n catch (err) {\n continue;\n }\n editableSheet = sheet;\n break;\n }\n return editableSheet != null ? editableSheet : createStyleSheet();\n }\n function createStyleSheet() {\n const style = document.createElement(\"style\");\n document.head.appendChild(style);\n return style.sheet;\n }\n function redraw() {\n if (self.config.noCalendar || self.isMobile)\n return;\n buildMonthSwitch();\n updateNavigationCurrentMonth();\n buildDays();\n }\n function focusAndClose() {\n self._input.focus();\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n navigator.msMaxTouchPoints !== undefined) {\n setTimeout(self.close, 0);\n }\n else {\n self.close();\n }\n }\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n const isSelectable = (day) => day.classList &&\n day.classList.contains(\"flatpickr-day\") &&\n !day.classList.contains(\"flatpickr-disabled\") &&\n !day.classList.contains(\"notAllowed\");\n const t = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"findParent\"])(Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"getEventTarget\"])(e), isSelectable);\n if (t === undefined)\n return;\n const target = t;\n const selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n const shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n selectedDate.getMonth() >\n self.currentMonth + self.config.showMonths - 1) &&\n self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\")\n self.selectedDates = [selectedDate];\n else if (self.config.mode === \"multiple\") {\n const selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex)\n self.selectedDates.splice(parseInt(selectedIndex), 1);\n else\n self.selectedDates.push(selectedDate);\n }\n else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n if (Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"compareDates\"])(selectedDate, self.selectedDates[0], true) !== 0)\n self.selectedDates.sort((a, b) => a.getTime() - b.getTime());\n }\n setHoursFromInputs();\n if (shouldChangeMonth) {\n const isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n triggerEvent(\"onMonthChange\");\n }\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (!shouldChangeMonth &&\n self.config.mode !== \"range\" &&\n self.config.showMonths === 1)\n focusOnDayElem(target);\n else if (self.selectedDateElem !== undefined &&\n self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined)\n self.hourElement !== undefined && self.hourElement.focus();\n if (self.config.closeOnSelect) {\n const single = self.config.mode === \"single\" && !self.config.enableTime;\n const range = self.config.mode === \"range\" &&\n self.selectedDates.length === 2 &&\n !self.config.enableTime;\n if (single || range) {\n focusAndClose();\n }\n }\n triggerChange();\n }\n const CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate],\n clickOpens: [\n () => {\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n else {\n self._input.removeEventListener(\"focus\", self.open);\n self._input.removeEventListener(\"click\", self.open);\n }\n },\n ],\n };\n function set(option, value) {\n if (option !== null && typeof option === \"object\") {\n Object.assign(self.config, option);\n for (const key in option) {\n if (CALLBACKS[key] !== undefined)\n CALLBACKS[key].forEach((x) => x());\n }\n }\n else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined)\n CALLBACKS[option].forEach((x) => x());\n else if (_types_options__WEBPACK_IMPORTED_MODULE_0__[\"HOOKS\"].indexOf(option) > -1)\n self.config[option] = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"arrayify\"])(value);\n }\n self.redraw();\n updateValue(true);\n }\n function setSelectedDate(inputDate, format) {\n let dates = [];\n if (inputDate instanceof Array)\n dates = inputDate.map((d) => self.parseDate(d, format));\n else if (inputDate instanceof Date || typeof inputDate === \"number\")\n dates = [self.parseDate(inputDate, format)];\n else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n case \"multiple\":\n dates = inputDate\n .split(self.config.conjunction)\n .map((date) => self.parseDate(date, format));\n break;\n case \"range\":\n dates = inputDate\n .split(self.l10n.rangeSeparator)\n .map((date) => self.parseDate(date, format));\n break;\n default:\n break;\n }\n }\n else\n self.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(inputDate)}`));\n self.selectedDates = (self.config.allowInvalidPreload\n ? dates\n : dates.filter((d) => d instanceof Date && isEnabled(d, false)));\n if (self.config.mode === \"range\")\n self.selectedDates.sort((a, b) => a.getTime() - b.getTime());\n }\n function setDate(date, triggerChange = false, format = self.config.dateFormat) {\n if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.latestSelectedDateObj =\n self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate(undefined, triggerChange);\n setHoursFromDate();\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n updateValue(triggerChange);\n if (triggerChange)\n triggerEvent(\"onChange\");\n }\n function parseDateRules(arr) {\n return arr\n .slice()\n .map((rule) => {\n if (typeof rule === \"string\" ||\n typeof rule === \"number\" ||\n rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n }\n else if (rule &&\n typeof rule === \"object\" &&\n rule.from &&\n rule.to)\n return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined),\n };\n return rule;\n })\n .filter((x) => x);\n }\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n const preloadedDate = self.config.defaultDate ||\n ((self.input.nodeName === \"INPUT\" ||\n self.input.nodeName === \"TEXTAREA\") &&\n self.input.placeholder &&\n self.input.value === self.input.placeholder\n ? null\n : self.input.value);\n if (preloadedDate)\n setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate =\n self.selectedDates.length > 0\n ? self.selectedDates[0]\n : self.config.minDate &&\n self.config.minDate.getTime() > self.now.getTime()\n ? self.config.minDate\n : self.config.maxDate &&\n self.config.maxDate.getTime() < self.now.getTime()\n ? self.config.maxDate\n : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0)\n self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined)\n self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined)\n self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime =\n !!self.config.minDate &&\n (self.config.minDate.getHours() > 0 ||\n self.config.minDate.getMinutes() > 0 ||\n self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime =\n !!self.config.maxDate &&\n (self.config.maxDate.getHours() > 0 ||\n self.config.maxDate.getMinutes() > 0 ||\n self.config.maxDate.getSeconds() > 0);\n }\n function setupInputs() {\n self.input = getInputElem();\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n if (self.config.altInput) {\n self.altInput = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode)\n self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n if (!self.config.allowInput)\n self._input.setAttribute(\"readonly\", \"readonly\");\n self._positionElement = self.config.positionElement || self._input;\n }\n function setupMobile() {\n const inputType = self.config.enableTime\n ? self.config.noCalendar\n ? \"time\"\n : \"datetime-local\"\n : \"date\";\n self.mobileInput = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr =\n inputType === \"datetime-local\"\n ? \"Y-m-d\\\\TH:i:S\"\n : inputType === \"date\"\n ? \"Y-m-d\"\n : \"H:i:S\";\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n if (self.config.minDate)\n self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate)\n self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n if (self.input.getAttribute(\"step\"))\n self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n self.input.type = \"hidden\";\n if (self.altInput !== undefined)\n self.altInput.type = \"hidden\";\n try {\n if (self.input.parentNode)\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n }\n catch (_a) { }\n bind(self.mobileInput, \"change\", (e) => {\n self.setDate(Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"getEventTarget\"])(e).value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n function toggle(e) {\n if (self.isOpen === true)\n return self.close();\n self.open(e);\n }\n function triggerEvent(event, data) {\n if (self.config === undefined)\n return;\n const hooks = self.config[event];\n if (hooks !== undefined && hooks.length > 0) {\n for (let i = 0; hooks[i] && i < hooks.length; i++)\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n function createEvent(name) {\n const e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n function isDateSelected(date) {\n for (let i = 0; i < self.selectedDates.length; i++) {\n if (Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"compareDates\"])(self.selectedDates[i], date) === 0)\n return \"\" + i;\n }\n return false;\n }\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n return false;\n return (Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"compareDates\"])(date, self.selectedDates[0]) >= 0 &&\n Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"compareDates\"])(date, self.selectedDates[1]) <= 0);\n }\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav)\n return;\n self.yearElements.forEach((yearElement, i) => {\n const d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent =\n Object(_utils_formatting__WEBPACK_IMPORTED_MODULE_5__[\"monthToStr\"])(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n }\n else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow =\n self.config.minDate !== undefined &&\n (self.currentYear === self.config.minDate.getFullYear()\n ? self.currentMonth <= self.config.minDate.getMonth()\n : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow =\n self.config.maxDate !== undefined &&\n (self.currentYear === self.config.maxDate.getFullYear()\n ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n : self.currentYear > self.config.maxDate.getFullYear());\n }\n function getDateStr(format) {\n return self.selectedDates\n .map((dObj) => self.formatDate(dObj, format))\n .filter((d, i, arr) => self.config.mode !== \"range\" ||\n self.config.enableTime ||\n arr.indexOf(d) === i)\n .join(self.config.mode !== \"range\"\n ? self.config.conjunction\n : self.l10n.rangeSeparator);\n }\n function updateValue(triggerChange = true) {\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value =\n self.latestSelectedDateObj !== undefined\n ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n : \"\";\n }\n self.input.value = getDateStr(self.config.dateFormat);\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n if (triggerChange !== false)\n triggerEvent(\"onValueUpdate\");\n }\n function onMonthNavClick(e) {\n const eventTarget = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"getEventTarget\"])(e);\n const isPrevMonth = self.prevMonthNav.contains(eventTarget);\n const isNextMonth = self.nextMonthNav.contains(eventTarget);\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n }\n else if (self.yearElements.indexOf(eventTarget) >= 0) {\n eventTarget.select();\n }\n else if (eventTarget.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n }\n else if (eventTarget.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n function timeWrapper(e) {\n e.preventDefault();\n const isKeyDown = e.type === \"keydown\", eventTarget = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_3__[\"getEventTarget\"])(e), input = eventTarget;\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n self.amPM.textContent =\n self.l10n.amPM[Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"int\"])(self.amPM.textContent === self.l10n.amPM[0])];\n }\n const min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n let newValue = curValue + step * delta;\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n const isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n if (newValue < min) {\n newValue =\n max +\n newValue +\n Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"int\"])(!isHourElem) +\n (Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"int\"])(isHourElem) && Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"int\"])(!self.amPM));\n if (isMinuteElem)\n incrementNumInput(undefined, -1, self.hourElement);\n }\n else if (newValue > max) {\n newValue =\n input === self.hourElement ? newValue - max - Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"int\"])(!self.amPM) : min;\n if (isMinuteElem)\n incrementNumInput(undefined, 1, self.hourElement);\n }\n if (self.amPM &&\n isHourElem &&\n (step === 1\n ? newValue + curValue === 23\n : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent =\n self.l10n.amPM[Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"int\"])(self.amPM.textContent === self.l10n.amPM[0])];\n }\n input.value = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"pad\"])(newValue);\n }\n }\n init();\n return self;\n}\nfunction _flatpickr(nodeList, config) {\n const nodes = Array.prototype.slice\n .call(nodeList)\n .filter((x) => x instanceof HTMLElement);\n const instances = [];\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null)\n continue;\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n node._flatpickr = undefined;\n }\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n }\n catch (e) {\n console.error(e);\n }\n }\n return instances.length === 1 ? instances[0] : instances;\n}\nif (typeof HTMLElement !== \"undefined\" &&\n typeof HTMLCollection !== \"undefined\" &&\n typeof NodeList !== \"undefined\") {\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n}\nvar flatpickr = function (selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n }\n else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n }\n else {\n return _flatpickr(selector, config);\n }\n};\nflatpickr.defaultConfig = {};\nflatpickr.l10ns = {\n en: Object.assign({}, _l10n_default__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n default: Object.assign({}, _l10n_default__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n};\nflatpickr.localize = (l10n) => {\n flatpickr.l10ns.default = Object.assign(Object.assign({}, flatpickr.l10ns.default), l10n);\n};\nflatpickr.setDefaults = (config) => {\n flatpickr.defaultConfig = Object.assign(Object.assign({}, flatpickr.defaultConfig), config);\n};\nflatpickr.parseDate = Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"createDateParser\"])({});\nflatpickr.formatDate = Object(_utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"createDateFormatter\"])({});\nflatpickr.compareDates = _utils_dates__WEBPACK_IMPORTED_MODULE_4__[\"compareDates\"];\nif (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n}\nDate.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n};\nif (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (flatpickr);\n\n\n//# sourceURL=webpack:///./node_modules/flatpickr/dist/esm/index.js?");
610
+
611
+ /***/ }),
612
+
613
+ /***/ "./node_modules/flatpickr/dist/esm/l10n/default.js":
614
+ /*!*********************************************************!*\
615
+ !*** ./node_modules/flatpickr/dist/esm/l10n/default.js ***!
616
+ \*********************************************************/
617
+ /*! exports provided: english, default */
618
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
619
+
620
+ "use strict";
621
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"english\", function() { return english; });\nconst english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: (nth) => {\n const s = nth % 100;\n if (s > 3 && s < 21)\n return \"th\";\n switch (s % 10) {\n case 1:\n return \"st\";\n case 2:\n return \"nd\";\n case 3:\n return \"rd\";\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n monthAriaLabel: \"Month\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false,\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (english);\n\n\n//# sourceURL=webpack:///./node_modules/flatpickr/dist/esm/l10n/default.js?");
622
+
623
+ /***/ }),
624
+
625
+ /***/ "./node_modules/flatpickr/dist/esm/types/options.js":
626
+ /*!**********************************************************!*\
627
+ !*** ./node_modules/flatpickr/dist/esm/types/options.js ***!
628
+ \**********************************************************/
629
+ /*! exports provided: HOOKS, defaults */
630
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
631
+
632
+ "use strict";
633
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"HOOKS\", function() { return HOOKS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaults\", function() { return defaults; });\nconst HOOKS = [\n \"onChange\",\n \"onClose\",\n \"onDayCreate\",\n \"onDestroy\",\n \"onKeyDown\",\n \"onMonthChange\",\n \"onOpen\",\n \"onParseConfig\",\n \"onReady\",\n \"onValueUpdate\",\n \"onYearChange\",\n \"onPreCalendarPosition\",\n];\nconst defaults = {\n _disable: [],\n allowInput: false,\n allowInvalidPreload: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" &&\n window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n autoFillDefaultTime: true,\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enableSeconds: false,\n enableTime: false,\n errorHandler: (err) => typeof console !== \"undefined\" && console.warn(err),\n getWeek: (givenDate) => {\n const date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n var week1 = new Date(date.getFullYear(), 0, 4);\n return (1 +\n Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n 3 +\n ((week1.getDay() + 6) % 7)) /\n 7));\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false,\n};\n\n\n//# sourceURL=webpack:///./node_modules/flatpickr/dist/esm/types/options.js?");
634
+
635
+ /***/ }),
636
+
637
+ /***/ "./node_modules/flatpickr/dist/esm/utils/dates.js":
638
+ /*!********************************************************!*\
639
+ !*** ./node_modules/flatpickr/dist/esm/utils/dates.js ***!
640
+ \********************************************************/
641
+ /*! exports provided: createDateFormatter, createDateParser, compareDates, compareTimes, isBetween, duration, getDefaultHours */
642
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
643
+
644
+ "use strict";
645
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createDateFormatter\", function() { return createDateFormatter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createDateParser\", function() { return createDateParser; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"compareDates\", function() { return compareDates; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"compareTimes\", function() { return compareTimes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isBetween\", function() { return isBetween; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"duration\", function() { return duration; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getDefaultHours\", function() { return getDefaultHours; });\n/* harmony import */ var _formatting__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatting */ \"./node_modules/flatpickr/dist/esm/utils/formatting.js\");\n/* harmony import */ var _types_options__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../types/options */ \"./node_modules/flatpickr/dist/esm/types/options.js\");\n/* harmony import */ var _l10n_default__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../l10n/default */ \"./node_modules/flatpickr/dist/esm/l10n/default.js\");\n\n\n\nconst createDateFormatter = ({ config = _types_options__WEBPACK_IMPORTED_MODULE_1__[\"defaults\"], l10n = _l10n_default__WEBPACK_IMPORTED_MODULE_2__[\"english\"], isMobile = false, }) => (dateObj, frmt, overrideLocale) => {\n const locale = overrideLocale || l10n;\n if (config.formatDate !== undefined && !isMobile) {\n return config.formatDate(dateObj, frmt, locale);\n }\n return frmt\n .split(\"\")\n .map((c, i, arr) => _formatting__WEBPACK_IMPORTED_MODULE_0__[\"formats\"][c] && arr[i - 1] !== \"\\\\\"\n ? _formatting__WEBPACK_IMPORTED_MODULE_0__[\"formats\"][c](dateObj, locale, config)\n : c !== \"\\\\\"\n ? c\n : \"\")\n .join(\"\");\n};\nconst createDateParser = ({ config = _types_options__WEBPACK_IMPORTED_MODULE_1__[\"defaults\"], l10n = _l10n_default__WEBPACK_IMPORTED_MODULE_2__[\"english\"] }) => (date, givenFormat, timeless, customLocale) => {\n if (date !== 0 && !date)\n return undefined;\n const locale = customLocale || l10n;\n let parsedDate;\n const dateOrig = date;\n if (date instanceof Date)\n parsedDate = new Date(date.getTime());\n else if (typeof date !== \"string\" &&\n date.toFixed !== undefined)\n parsedDate = new Date(date);\n else if (typeof date === \"string\") {\n const format = givenFormat || (config || _types_options__WEBPACK_IMPORTED_MODULE_1__[\"defaults\"]).dateFormat;\n const datestr = String(date).trim();\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n }\n else if (/Z$/.test(datestr) ||\n /GMT$/.test(datestr))\n parsedDate = new Date(date);\n else if (config && config.parseDate)\n parsedDate = config.parseDate(date, format);\n else {\n parsedDate =\n !config || !config.noCalendar\n ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n : new Date(new Date().setHours(0, 0, 0, 0));\n let matched, ops = [];\n for (let i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n const token = format[i];\n const isBackSlash = token === \"\\\\\";\n const escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n if (_formatting__WEBPACK_IMPORTED_MODULE_0__[\"tokenRegex\"][token] && !escaped) {\n regexStr += _formatting__WEBPACK_IMPORTED_MODULE_0__[\"tokenRegex\"][token];\n const match = new RegExp(regexStr).exec(date);\n if (match && (matched = true)) {\n ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: _formatting__WEBPACK_IMPORTED_MODULE_0__[\"revFormat\"][token],\n val: match[++matchIndex],\n });\n }\n }\n else if (!isBackSlash)\n regexStr += \".\";\n ops.forEach(({ fn, val }) => (parsedDate = fn(parsedDate, val, locale) || parsedDate));\n }\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(`Invalid date provided: ${dateOrig}`));\n return undefined;\n }\n if (timeless === true)\n parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n};\nfunction compareDates(date1, date2, timeless = true) {\n if (timeless !== false) {\n return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n new Date(date2.getTime()).setHours(0, 0, 0, 0));\n }\n return date1.getTime() - date2.getTime();\n}\nfunction compareTimes(date1, date2) {\n return (3600 * (date1.getHours() - date2.getHours()) +\n 60 * (date1.getMinutes() - date2.getMinutes()) +\n date1.getSeconds() -\n date2.getSeconds());\n}\nconst isBetween = (ts, ts1, ts2) => {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n};\nconst duration = {\n DAY: 86400000,\n};\nfunction getDefaultHours(config) {\n let hours = config.defaultHour;\n let minutes = config.defaultMinute;\n let seconds = config.defaultSeconds;\n if (config.minDate !== undefined) {\n const minHour = config.minDate.getHours();\n const minMinutes = config.minDate.getMinutes();\n const minSeconds = config.minDate.getSeconds();\n if (hours < minHour) {\n hours = minHour;\n }\n if (hours === minHour && minutes < minMinutes) {\n minutes = minMinutes;\n }\n if (hours === minHour && minutes === minMinutes && seconds < minSeconds)\n seconds = config.minDate.getSeconds();\n }\n if (config.maxDate !== undefined) {\n const maxHr = config.maxDate.getHours();\n const maxMinutes = config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr)\n minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes)\n seconds = config.maxDate.getSeconds();\n }\n return { hours, minutes, seconds };\n}\n\n\n//# sourceURL=webpack:///./node_modules/flatpickr/dist/esm/utils/dates.js?");
646
+
647
+ /***/ }),
648
+
649
+ /***/ "./node_modules/flatpickr/dist/esm/utils/dom.js":
650
+ /*!******************************************************!*\
651
+ !*** ./node_modules/flatpickr/dist/esm/utils/dom.js ***!
652
+ \******************************************************/
653
+ /*! exports provided: toggleClass, createElement, clearNode, findParent, createNumberInput, getEventTarget */
654
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
655
+
656
+ "use strict";
657
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toggleClass\", function() { return toggleClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createElement\", function() { return createElement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clearNode\", function() { return clearNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findParent\", function() { return findParent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createNumberInput\", function() { return createNumberInput; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getEventTarget\", function() { return getEventTarget; });\nfunction toggleClass(elem, className, bool) {\n if (bool === true)\n return elem.classList.add(className);\n elem.classList.remove(className);\n}\nfunction createElement(tag, className, content) {\n const e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined)\n e.textContent = content;\n return e;\n}\nfunction clearNode(node) {\n while (node.firstChild)\n node.removeChild(node.firstChild);\n}\nfunction findParent(node, condition) {\n if (condition(node))\n return node;\n else if (node.parentNode)\n return findParent(node.parentNode, condition);\n return undefined;\n}\nfunction createNumberInput(inputClassName, opts) {\n const wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n }\n else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n if (opts !== undefined)\n for (const key in opts)\n numInput.setAttribute(key, opts[key]);\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n}\nfunction getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n const path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n}\n\n\n//# sourceURL=webpack:///./node_modules/flatpickr/dist/esm/utils/dom.js?");
658
+
659
+ /***/ }),
660
+
661
+ /***/ "./node_modules/flatpickr/dist/esm/utils/formatting.js":
662
+ /*!*************************************************************!*\
663
+ !*** ./node_modules/flatpickr/dist/esm/utils/formatting.js ***!
664
+ \*************************************************************/
665
+ /*! exports provided: monthToStr, revFormat, tokenRegex, formats */
666
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
667
+
668
+ "use strict";
669
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"monthToStr\", function() { return monthToStr; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"revFormat\", function() { return revFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tokenRegex\", function() { return tokenRegex; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formats\", function() { return formats; });\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/flatpickr/dist/esm/utils/index.js\");\n\nconst doNothing = () => undefined;\nconst monthToStr = (monthNumber, shorthand, locale) => locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber];\nconst revFormat = {\n D: doNothing,\n F: function (dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: (dateObj, hour) => {\n dateObj.setHours(parseFloat(hour));\n },\n H: (dateObj, hour) => {\n dateObj.setHours(parseFloat(hour));\n },\n J: (dateObj, day) => {\n dateObj.setDate(parseFloat(day));\n },\n K: (dateObj, amPM, locale) => {\n dateObj.setHours((dateObj.getHours() % 12) +\n 12 * Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"int\"])(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function (dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: (dateObj, seconds) => {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: (_, unixSeconds) => new Date(parseFloat(unixSeconds) * 1000),\n W: function (dateObj, weekNum, locale) {\n const weekNumber = parseInt(weekNum);\n const date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: (dateObj, year) => {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: (_, ISODate) => new Date(ISODate),\n d: (dateObj, day) => {\n dateObj.setDate(parseFloat(day));\n },\n h: (dateObj, hour) => {\n dateObj.setHours(parseFloat(hour));\n },\n i: (dateObj, minutes) => {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: (dateObj, day) => {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: (dateObj, month) => {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: (dateObj, month) => {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: (dateObj, seconds) => {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: (_, unixMillSeconds) => new Date(parseFloat(unixMillSeconds)),\n w: doNothing,\n y: (dateObj, year) => {\n dateObj.setFullYear(2000 + parseFloat(year));\n },\n};\nconst tokenRegex = {\n D: \"(\\\\w+)\",\n F: \"(\\\\w+)\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"(\\\\w+)\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"(\\\\w+)\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\",\n};\nconst formats = {\n Z: (date) => date.toISOString(),\n D: function (date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n F: function (date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n G: function (date, locale, options) {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"pad\"])(formats.h(date, locale, options));\n },\n H: (date) => Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"pad\"])(date.getHours()),\n J: function (date, locale) {\n return locale.ordinal !== undefined\n ? date.getDate() + locale.ordinal(date.getDate())\n : date.getDate();\n },\n K: (date, locale) => locale.amPM[Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"int\"])(date.getHours() > 11)],\n M: function (date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n S: (date) => Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"pad\"])(date.getSeconds()),\n U: (date) => date.getTime() / 1000,\n W: function (date, _, options) {\n return options.getWeek(date);\n },\n Y: (date) => Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"pad\"])(date.getFullYear(), 4),\n d: (date) => Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"pad\"])(date.getDate()),\n h: (date) => (date.getHours() % 12 ? date.getHours() % 12 : 12),\n i: (date) => Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"pad\"])(date.getMinutes()),\n j: (date) => date.getDate(),\n l: function (date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n m: (date) => Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"pad\"])(date.getMonth() + 1),\n n: (date) => date.getMonth() + 1,\n s: (date) => date.getSeconds(),\n u: (date) => date.getTime(),\n w: (date) => date.getDay(),\n y: (date) => String(date.getFullYear()).substring(2),\n};\n\n\n//# sourceURL=webpack:///./node_modules/flatpickr/dist/esm/utils/formatting.js?");
670
+
671
+ /***/ }),
672
+
673
+ /***/ "./node_modules/flatpickr/dist/esm/utils/index.js":
674
+ /*!********************************************************!*\
675
+ !*** ./node_modules/flatpickr/dist/esm/utils/index.js ***!
676
+ \********************************************************/
677
+ /*! exports provided: pad, int, debounce, arrayify */
678
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
679
+
680
+ "use strict";
681
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pad\", function() { return pad; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"int\", function() { return int; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"debounce\", function() { return debounce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"arrayify\", function() { return arrayify; });\nconst pad = (number, length = 2) => `000${number}`.slice(length * -1);\nconst int = (bool) => (bool === true ? 1 : 0);\nfunction debounce(fn, wait) {\n let t;\n return function () {\n clearTimeout(t);\n t = setTimeout(() => fn.apply(this, arguments), wait);\n };\n}\nconst arrayify = (obj) => obj instanceof Array ? obj : [obj];\n\n\n//# sourceURL=webpack:///./node_modules/flatpickr/dist/esm/utils/index.js?");
682
+
683
+ /***/ }),
684
+
685
+ /***/ "./node_modules/flatpickr/dist/esm/utils/polyfills.js":
686
+ /*!************************************************************!*\
687
+ !*** ./node_modules/flatpickr/dist/esm/utils/polyfills.js ***!
688
+ \************************************************************/
689
+ /*! no static exports found */
690
+ /***/ (function(module, exports, __webpack_require__) {
691
+
692
+ "use strict";
693
+ eval("\nif (typeof Object.assign !== \"function\") {\n Object.assign = function (target, ...args) {\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n for (const source of args) {\n if (source) {\n Object.keys(source).forEach((key) => (target[key] = source[key]));\n }\n }\n return target;\n };\n}\n\n\n//# sourceURL=webpack:///./node_modules/flatpickr/dist/esm/utils/polyfills.js?");
694
+
695
+ /***/ }),
696
+
697
+ /***/ "./node_modules/sortablejs/modular/sortable.esm.js":
698
+ /*!*********************************************************!*\
699
+ !*** ./node_modules/sortablejs/modular/sortable.esm.js ***!
700
+ \*********************************************************/
701
+ /*! exports provided: default, MultiDrag, Sortable, Swap */
702
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
703
+
704
+ "use strict";
705
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MultiDrag\", function() { return MultiDragPlugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Sortable\", function() { return Sortable; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Swap\", function() { return SwapPlugin; });\n/**!\n * Sortable 1.13.0\n * @author\tRubaXa <trash@rubaxa.org>\n * @author\towenm <owen23355@gmail.com>\n * @license MIT\n */\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar version = \"1.13.0\";\n\nfunction userAgent(pattern) {\n if (typeof window !== 'undefined' && window.navigator) {\n return !!\n /*@__PURE__*/\n navigator.userAgent.match(pattern);\n }\n}\n\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n capture: false,\n passive: false\n};\n\nfunction on(el, event, fn) {\n el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction off(el, event, fn) {\n el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction matches(\n/**HTMLElement*/\nel,\n/**String*/\nselector) {\n if (!selector) return;\n selector[0] === '>' && (selector = selector.substring(1));\n\n if (el) {\n try {\n if (el.matches) {\n return el.matches(selector);\n } else if (el.msMatchesSelector) {\n return el.msMatchesSelector(selector);\n } else if (el.webkitMatchesSelector) {\n return el.webkitMatchesSelector(selector);\n }\n } catch (_) {\n return false;\n }\n }\n\n return false;\n}\n\nfunction getParentOrHost(el) {\n return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\n\nfunction closest(\n/**HTMLElement*/\nel,\n/**String*/\nselector,\n/**HTMLElement*/\nctx, includeCTX) {\n if (el) {\n ctx = ctx || document;\n\n do {\n if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n return el;\n }\n\n if (el === ctx) break;\n /* jshint boss:true */\n } while (el = getParentOrHost(el));\n }\n\n return null;\n}\n\nvar R_SPACE = /\\s+/g;\n\nfunction toggleClass(el, name, state) {\n if (el && name) {\n if (el.classList) {\n el.classList[state ? 'add' : 'remove'](name);\n } else {\n var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n }\n }\n}\n\nfunction css(el, prop, val) {\n var style = el && el.style;\n\n if (style) {\n if (val === void 0) {\n if (document.defaultView && document.defaultView.getComputedStyle) {\n val = document.defaultView.getComputedStyle(el, '');\n } else if (el.currentStyle) {\n val = el.currentStyle;\n }\n\n return prop === void 0 ? val : val[prop];\n } else {\n if (!(prop in style) && prop.indexOf('webkit') === -1) {\n prop = '-webkit-' + prop;\n }\n\n style[prop] = val + (typeof val === 'string' ? '' : 'px');\n }\n }\n}\n\nfunction matrix(el, selfOnly) {\n var appliedTransforms = '';\n\n if (typeof el === 'string') {\n appliedTransforms = el;\n } else {\n do {\n var transform = css(el, 'transform');\n\n if (transform && transform !== 'none') {\n appliedTransforms = transform + ' ' + appliedTransforms;\n }\n /* jshint boss:true */\n\n } while (!selfOnly && (el = el.parentNode));\n }\n\n var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n /*jshint -W056 */\n\n return matrixFn && new matrixFn(appliedTransforms);\n}\n\nfunction find(ctx, tagName, iterator) {\n if (ctx) {\n var list = ctx.getElementsByTagName(tagName),\n i = 0,\n n = list.length;\n\n if (iterator) {\n for (; i < n; i++) {\n iterator(list[i], i);\n }\n }\n\n return list;\n }\n\n return [];\n}\n\nfunction getWindowScrollingElement() {\n var scrollingElement = document.scrollingElement;\n\n if (scrollingElement) {\n return scrollingElement;\n } else {\n return document.documentElement;\n }\n}\n/**\n * Returns the \"bounding client rect\" of given element\n * @param {HTMLElement} el The element whose boundingClientRect is wanted\n * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container\n * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr\n * @param {[Boolean]} undoScale Whether the container's scale() should be undone\n * @param {[HTMLElement]} container The parent the element will be placed in\n * @return {Object} The boundingClientRect of el, with specified adjustments\n */\n\n\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n if (!el.getBoundingClientRect && el !== window) return;\n var elRect, top, left, bottom, right, height, width;\n\n if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n elRect = el.getBoundingClientRect();\n top = elRect.top;\n left = elRect.left;\n bottom = elRect.bottom;\n right = elRect.right;\n height = elRect.height;\n width = elRect.width;\n } else {\n top = 0;\n left = 0;\n bottom = window.innerHeight;\n right = window.innerWidth;\n height = window.innerHeight;\n width = window.innerWidth;\n }\n\n if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n // Adjust for translate()\n container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n // Not needed on <= IE11\n\n if (!IE11OrLess) {\n do {\n if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container\n\n top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n bottom = top + elRect.height;\n right = left + elRect.width;\n break;\n }\n /* jshint boss:true */\n\n } while (container = container.parentNode);\n }\n }\n\n if (undoScale && el !== window) {\n // Adjust for scale()\n var elMatrix = matrix(container || el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d;\n\n if (elMatrix) {\n top /= scaleY;\n left /= scaleX;\n width /= scaleX;\n height /= scaleY;\n bottom = top + height;\n right = left + width;\n }\n }\n\n return {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n width: width,\n height: height\n };\n}\n/**\n * Checks if a side of an element is scrolled past a side of its parents\n * @param {HTMLElement} el The element who's side being scrolled out of view is in question\n * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')\n * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')\n * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element\n */\n\n\nfunction isScrolledPast(el, elSide, parentSide) {\n var parent = getParentAutoScrollElement(el, true),\n elSideVal = getRect(el)[elSide];\n /* jshint boss:true */\n\n while (parent) {\n var parentSideVal = getRect(parent)[parentSide],\n visible = void 0;\n\n if (parentSide === 'top' || parentSide === 'left') {\n visible = elSideVal >= parentSideVal;\n } else {\n visible = elSideVal <= parentSideVal;\n }\n\n if (!visible) return parent;\n if (parent === getWindowScrollingElement()) break;\n parent = getParentAutoScrollElement(parent, false);\n }\n\n return false;\n}\n/**\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\n * and non-draggable elements\n * @param {HTMLElement} el The parent element\n * @param {Number} childNum The index of the child\n * @param {Object} options Parent Sortable's options\n * @return {HTMLElement} The child at index childNum, or null if not found\n */\n\n\nfunction getChild(el, childNum, options) {\n var currentChild = 0,\n i = 0,\n children = el.children;\n\n while (i < children.length) {\n if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && children[i] !== Sortable.dragged && closest(children[i], options.draggable, el, false)) {\n if (currentChild === childNum) {\n return children[i];\n }\n\n currentChild++;\n }\n\n i++;\n }\n\n return null;\n}\n/**\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\n * @param {HTMLElement} el Parent element\n * @param {selector} selector Any other elements that should be ignored\n * @return {HTMLElement} The last child, ignoring ghostEl\n */\n\n\nfunction lastChild(el, selector) {\n var last = el.lastElementChild;\n\n while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n last = last.previousElementSibling;\n }\n\n return last || null;\n}\n/**\n * Returns the index of an element within its parent for a selected set of\n * elements\n * @param {HTMLElement} el\n * @param {selector} selector\n * @return {number}\n */\n\n\nfunction index(el, selector) {\n var index = 0;\n\n if (!el || !el.parentNode) {\n return -1;\n }\n /* jshint boss:true */\n\n\n while (el = el.previousElementSibling) {\n if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n index++;\n }\n }\n\n return index;\n}\n/**\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\n * The value is returned in real pixels.\n * @param {HTMLElement} el\n * @return {Array} Offsets in the format of [left, top]\n */\n\n\nfunction getRelativeScrollOffset(el) {\n var offsetLeft = 0,\n offsetTop = 0,\n winScroller = getWindowScrollingElement();\n\n if (el) {\n do {\n var elMatrix = matrix(el),\n scaleX = elMatrix.a,\n scaleY = elMatrix.d;\n offsetLeft += el.scrollLeft * scaleX;\n offsetTop += el.scrollTop * scaleY;\n } while (el !== winScroller && (el = el.parentNode));\n }\n\n return [offsetLeft, offsetTop];\n}\n/**\n * Returns the index of the object within the given array\n * @param {Array} arr Array that may or may not hold the object\n * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\n * @return {Number} The index of the object in the array, or -1\n */\n\n\nfunction indexOfObject(arr, obj) {\n for (var i in arr) {\n if (!arr.hasOwnProperty(i)) continue;\n\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n }\n }\n\n return -1;\n}\n\nfunction getParentAutoScrollElement(el, includeSelf) {\n // skip to window\n if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n var elem = el;\n var gotSelf = false;\n\n do {\n // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n var elemCSS = css(elem);\n\n if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n if (gotSelf || includeSelf) return elem;\n gotSelf = true;\n }\n }\n /* jshint boss:true */\n\n } while (elem = elem.parentNode);\n\n return getWindowScrollingElement();\n}\n\nfunction extend(dst, src) {\n if (dst && src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst;\n}\n\nfunction isRectEqual(rect1, rect2) {\n return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\n\nvar _throttleTimeout;\n\nfunction throttle(callback, ms) {\n return function () {\n if (!_throttleTimeout) {\n var args = arguments,\n _this = this;\n\n if (args.length === 1) {\n callback.call(_this, args[0]);\n } else {\n callback.apply(_this, args);\n }\n\n _throttleTimeout = setTimeout(function () {\n _throttleTimeout = void 0;\n }, ms);\n }\n };\n}\n\nfunction cancelThrottle() {\n clearTimeout(_throttleTimeout);\n _throttleTimeout = void 0;\n}\n\nfunction scrollBy(el, x, y) {\n el.scrollLeft += x;\n el.scrollTop += y;\n}\n\nfunction clone(el) {\n var Polymer = window.Polymer;\n var $ = window.jQuery || window.Zepto;\n\n if (Polymer && Polymer.dom) {\n return Polymer.dom(el).cloneNode(true);\n } else if ($) {\n return $(el).clone(true)[0];\n } else {\n return el.cloneNode(true);\n }\n}\n\nfunction setRect(el, rect) {\n css(el, 'position', 'absolute');\n css(el, 'top', rect.top);\n css(el, 'left', rect.left);\n css(el, 'width', rect.width);\n css(el, 'height', rect.height);\n}\n\nfunction unsetRect(el) {\n css(el, 'position', '');\n css(el, 'top', '');\n css(el, 'left', '');\n css(el, 'width', '');\n css(el, 'height', '');\n}\n\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n var animationStates = [],\n animationCallbackId;\n return {\n captureAnimationState: function captureAnimationState() {\n animationStates = [];\n if (!this.options.animation) return;\n var children = [].slice.call(this.el.children);\n children.forEach(function (child) {\n if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n animationStates.push({\n target: child,\n rect: getRect(child)\n });\n\n var fromRect = _objectSpread({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation\n\n\n if (child.thisAnimationDuration) {\n var childMatrix = matrix(child, true);\n\n if (childMatrix) {\n fromRect.top -= childMatrix.f;\n fromRect.left -= childMatrix.e;\n }\n }\n\n child.fromRect = fromRect;\n });\n },\n addAnimationState: function addAnimationState(state) {\n animationStates.push(state);\n },\n removeAnimationState: function removeAnimationState(target) {\n animationStates.splice(indexOfObject(animationStates, {\n target: target\n }), 1);\n },\n animateAll: function animateAll(callback) {\n var _this = this;\n\n if (!this.options.animation) {\n clearTimeout(animationCallbackId);\n if (typeof callback === 'function') callback();\n return;\n }\n\n var animating = false,\n animationTime = 0;\n animationStates.forEach(function (state) {\n var time = 0,\n target = state.target,\n fromRect = target.fromRect,\n toRect = getRect(target),\n prevFromRect = target.prevFromRect,\n prevToRect = target.prevToRect,\n animatingRect = state.rect,\n targetMatrix = matrix(target, true);\n\n if (targetMatrix) {\n // Compensate for current animation\n toRect.top -= targetMatrix.f;\n toRect.left -= targetMatrix.e;\n }\n\n target.toRect = toRect;\n\n if (target.thisAnimationDuration) {\n // Could also check if animatingRect is between fromRect and toRect\n if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect\n (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n // If returning to same place as started from animation and on same axis\n time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n }\n } // if fromRect != toRect: animate\n\n\n if (!isRectEqual(toRect, fromRect)) {\n target.prevFromRect = fromRect;\n target.prevToRect = toRect;\n\n if (!time) {\n time = _this.options.animation;\n }\n\n _this.animate(target, animatingRect, toRect, time);\n }\n\n if (time) {\n animating = true;\n animationTime = Math.max(animationTime, time);\n clearTimeout(target.animationResetTimer);\n target.animationResetTimer = setTimeout(function () {\n target.animationTime = 0;\n target.prevFromRect = null;\n target.fromRect = null;\n target.prevToRect = null;\n target.thisAnimationDuration = null;\n }, time);\n target.thisAnimationDuration = time;\n }\n });\n clearTimeout(animationCallbackId);\n\n if (!animating) {\n if (typeof callback === 'function') callback();\n } else {\n animationCallbackId = setTimeout(function () {\n if (typeof callback === 'function') callback();\n }, animationTime);\n }\n\n animationStates = [];\n },\n animate: function animate(target, currentRect, toRect, duration) {\n if (duration) {\n css(target, 'transition', '');\n css(target, 'transform', '');\n var elMatrix = matrix(this.el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d,\n translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n target.animatingX = !!translateX;\n target.animatingY = !!translateY;\n css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n this.forRepaintDummy = repaint(target); // repaint\n\n css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n css(target, 'transform', 'translate3d(0,0,0)');\n typeof target.animated === 'number' && clearTimeout(target.animated);\n target.animated = setTimeout(function () {\n css(target, 'transition', '');\n css(target, 'transform', '');\n target.animated = false;\n target.animatingX = false;\n target.animatingY = false;\n }, duration);\n }\n }\n };\n}\n\nfunction repaint(target) {\n return target.offsetWidth;\n}\n\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n initializeByDefault: true\n};\nvar PluginManager = {\n mount: function mount(plugin) {\n // Set default static properties\n for (var option in defaults) {\n if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n plugin[option] = defaults[option];\n }\n }\n\n plugins.forEach(function (p) {\n if (p.pluginName === plugin.pluginName) {\n throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n }\n });\n plugins.push(plugin);\n },\n pluginEvent: function pluginEvent(eventName, sortable, evt) {\n var _this = this;\n\n this.eventCanceled = false;\n\n evt.cancel = function () {\n _this.eventCanceled = true;\n };\n\n var eventNameGlobal = eventName + 'Global';\n plugins.forEach(function (plugin) {\n if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable\n\n if (sortable[plugin.pluginName][eventNameGlobal]) {\n sortable[plugin.pluginName][eventNameGlobal](_objectSpread({\n sortable: sortable\n }, evt));\n } // Only fire plugin event if plugin is enabled in this sortable,\n // and plugin has event defined\n\n\n if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n sortable[plugin.pluginName][eventName](_objectSpread({\n sortable: sortable\n }, evt));\n }\n });\n },\n initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n plugins.forEach(function (plugin) {\n var pluginName = plugin.pluginName;\n if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n var initialized = new plugin(sortable, el, sortable.options);\n initialized.sortable = sortable;\n initialized.options = sortable.options;\n sortable[pluginName] = initialized; // Add default options from plugin\n\n _extends(defaults, initialized.defaults);\n });\n\n for (var option in sortable.options) {\n if (!sortable.options.hasOwnProperty(option)) continue;\n var modified = this.modifyOption(sortable, option, sortable.options[option]);\n\n if (typeof modified !== 'undefined') {\n sortable.options[option] = modified;\n }\n }\n },\n getEventProperties: function getEventProperties(name, sortable) {\n var eventProperties = {};\n plugins.forEach(function (plugin) {\n if (typeof plugin.eventProperties !== 'function') return;\n\n _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n });\n return eventProperties;\n },\n modifyOption: function modifyOption(sortable, name, value) {\n var modifiedValue;\n plugins.forEach(function (plugin) {\n // Plugin must exist on the Sortable\n if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n\n if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n }\n });\n return modifiedValue;\n }\n};\n\nfunction dispatchEvent(_ref) {\n var sortable = _ref.sortable,\n rootEl = _ref.rootEl,\n name = _ref.name,\n targetEl = _ref.targetEl,\n cloneEl = _ref.cloneEl,\n toEl = _ref.toEl,\n fromEl = _ref.fromEl,\n oldIndex = _ref.oldIndex,\n newIndex = _ref.newIndex,\n oldDraggableIndex = _ref.oldDraggableIndex,\n newDraggableIndex = _ref.newDraggableIndex,\n originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n extraEventProperties = _ref.extraEventProperties;\n sortable = sortable || rootEl && rootEl[expando];\n if (!sortable) return;\n var evt,\n options = sortable.options,\n onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent(name, {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent(name, true, true);\n }\n\n evt.to = toEl || rootEl;\n evt.from = fromEl || rootEl;\n evt.item = targetEl || rootEl;\n evt.clone = cloneEl;\n evt.oldIndex = oldIndex;\n evt.newIndex = newIndex;\n evt.oldDraggableIndex = oldDraggableIndex;\n evt.newDraggableIndex = newDraggableIndex;\n evt.originalEvent = originalEvent;\n evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n\n var allEventProperties = _objectSpread({}, extraEventProperties, PluginManager.getEventProperties(name, sortable));\n\n for (var option in allEventProperties) {\n evt[option] = allEventProperties[option];\n }\n\n if (rootEl) {\n rootEl.dispatchEvent(evt);\n }\n\n if (options[onName]) {\n options[onName].call(sortable, evt);\n }\n}\n\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n originalEvent = _ref.evt,\n data = _objectWithoutProperties(_ref, [\"evt\"]);\n\n PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread({\n dragEl: dragEl,\n parentEl: parentEl,\n ghostEl: ghostEl,\n rootEl: rootEl,\n nextEl: nextEl,\n lastDownEl: lastDownEl,\n cloneEl: cloneEl,\n cloneHidden: cloneHidden,\n dragStarted: moved,\n putSortable: putSortable,\n activeSortable: Sortable.active,\n originalEvent: originalEvent,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n hideGhostForTarget: _hideGhostForTarget,\n unhideGhostForTarget: _unhideGhostForTarget,\n cloneNowHidden: function cloneNowHidden() {\n cloneHidden = true;\n },\n cloneNowShown: function cloneNowShown() {\n cloneHidden = false;\n },\n dispatchSortableEvent: function dispatchSortableEvent(name) {\n _dispatchEvent({\n sortable: sortable,\n name: name,\n originalEvent: originalEvent\n });\n }\n }, data));\n};\n\nfunction _dispatchEvent(info) {\n dispatchEvent(_objectSpread({\n putSortable: putSortable,\n cloneEl: cloneEl,\n targetEl: dragEl,\n rootEl: rootEl,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex\n }, info));\n}\n\nvar dragEl,\n parentEl,\n ghostEl,\n rootEl,\n nextEl,\n lastDownEl,\n cloneEl,\n cloneHidden,\n oldIndex,\n newIndex,\n oldDraggableIndex,\n newDraggableIndex,\n activeGroup,\n putSortable,\n awaitingDragStarted = false,\n ignoreNextClick = false,\n sortables = [],\n tapEvt,\n touchEvt,\n lastDx,\n lastDy,\n tapDistanceLeft,\n tapDistanceTop,\n moved,\n lastTarget,\n lastDirection,\n pastFirstInvertThresh = false,\n isCircumstantialInvert = false,\n targetMoveDistance,\n // For positioning ghost absolutely\nghostRelativeParent,\n ghostRelativeParentInitialScroll = [],\n // (left, top)\n_silent = false,\n savedInputChecked = [];\n/** @const */\n\nvar documentExists = typeof document !== 'undefined',\n PositionGhostAbsolutely = IOS,\n CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n // This will not pass for IE9, because IE9 DnD only works on anchors\nsupportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n supportCssPointerEvents = function () {\n if (!documentExists) return; // false when <= IE11\n\n if (IE11OrLess) {\n return false;\n }\n\n var el = document.createElement('x');\n el.style.cssText = 'pointer-events:auto';\n return el.style.pointerEvents === 'auto';\n}(),\n _detectDirection = function _detectDirection(el, options) {\n var elCSS = css(el),\n elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n child1 = getChild(el, 0, options),\n child2 = getChild(el, 1, options),\n firstChildCSS = child1 && css(child1),\n secondChildCSS = child2 && css(child2),\n firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n\n if (elCSS.display === 'flex') {\n return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n }\n\n if (elCSS.display === 'grid') {\n return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n }\n\n if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n }\n\n return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n},\n _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n dragElOppLength = vertical ? dragRect.width : dragRect.height,\n targetS1Opp = vertical ? targetRect.left : targetRect.top,\n targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n targetOppLength = vertical ? targetRect.width : targetRect.height;\n return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n},\n\n/**\n * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\n * @param {Number} x X position\n * @param {Number} y Y position\n * @return {HTMLElement} Element of the first found nearest Sortable\n */\n_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n var ret;\n sortables.some(function (sortable) {\n if (lastChild(sortable)) return;\n var rect = getRect(sortable),\n threshold = sortable[expando].options.emptyInsertThreshold,\n insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n\n if (threshold && insideHorizontally && insideVertically) {\n return ret = sortable;\n }\n });\n return ret;\n},\n _prepareGroup = function _prepareGroup(options) {\n function toFn(value, pull) {\n return function (to, from, dragEl, evt) {\n var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n\n if (value == null && (pull || sameGroup)) {\n // Default pull value\n // Default pull and put value if same group\n return true;\n } else if (value == null || value === false) {\n return false;\n } else if (pull && value === 'clone') {\n return value;\n } else if (typeof value === 'function') {\n return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n } else {\n var otherGroup = (pull ? to : from).options.group.name;\n return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n }\n };\n }\n\n var group = {};\n var originalGroup = options.group;\n\n if (!originalGroup || _typeof(originalGroup) != 'object') {\n originalGroup = {\n name: originalGroup\n };\n }\n\n group.name = originalGroup.name;\n group.checkPull = toFn(originalGroup.pull, true);\n group.checkPut = toFn(originalGroup.put);\n group.revertClone = originalGroup.revertClone;\n options.group = group;\n},\n _hideGhostForTarget = function _hideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', 'none');\n }\n},\n _unhideGhostForTarget = function _unhideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', '');\n }\n}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position\n\n\nif (documentExists) {\n document.addEventListener('click', function (evt) {\n if (ignoreNextClick) {\n evt.preventDefault();\n evt.stopPropagation && evt.stopPropagation();\n evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n ignoreNextClick = false;\n return false;\n }\n }, true);\n}\n\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n if (dragEl) {\n evt = evt.touches ? evt.touches[0] : evt;\n\n var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n\n if (nearest) {\n // Create imitation event\n var event = {};\n\n for (var i in evt) {\n if (evt.hasOwnProperty(i)) {\n event[i] = evt[i];\n }\n }\n\n event.target = event.rootEl = nearest;\n event.preventDefault = void 0;\n event.stopPropagation = void 0;\n\n nearest[expando]._onDragOver(event);\n }\n }\n};\n\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n if (dragEl) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n }\n};\n/**\n * @class Sortable\n * @param {HTMLElement} el\n * @param {Object} [options]\n */\n\n\nfunction Sortable(el, options) {\n if (!(el && el.nodeType && el.nodeType === 1)) {\n throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n }\n\n this.el = el; // root element\n\n this.options = options = _extends({}, options); // Export instance\n\n el[expando] = this;\n var defaults = {\n group: null,\n sort: true,\n disabled: false,\n store: null,\n handle: null,\n draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n swapThreshold: 1,\n // percentage; 0 <= x <= 1\n invertSwap: false,\n // invert always\n invertedSwapThreshold: null,\n // will be set to same as swapThreshold if default\n removeCloneOnHide: true,\n direction: function direction() {\n return _detectDirection(el, this.options);\n },\n ghostClass: 'sortable-ghost',\n chosenClass: 'sortable-chosen',\n dragClass: 'sortable-drag',\n ignore: 'a, img',\n filter: null,\n preventOnFilter: true,\n animation: 0,\n easing: null,\n setData: function setData(dataTransfer, dragEl) {\n dataTransfer.setData('Text', dragEl.textContent);\n },\n dropBubble: false,\n dragoverBubble: false,\n dataIdAttr: 'data-id',\n delay: 0,\n delayOnTouchOnly: false,\n touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n forceFallback: false,\n fallbackClass: 'sortable-fallback',\n fallbackOnBody: false,\n fallbackTolerance: 0,\n fallbackOffset: {\n x: 0,\n y: 0\n },\n supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,\n emptyInsertThreshold: 5\n };\n PluginManager.initializePlugins(this, el, defaults); // Set default options\n\n for (var name in defaults) {\n !(name in options) && (options[name] = defaults[name]);\n }\n\n _prepareGroup(options); // Bind all private methods\n\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n } // Setup drag mode\n\n\n this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n\n if (this.nativeDraggable) {\n // Touch start threshold cannot be greater than the native dragstart threshold\n this.options.touchStartThreshold = 1;\n } // Bind events\n\n\n if (options.supportPointer) {\n on(el, 'pointerdown', this._onTapStart);\n } else {\n on(el, 'mousedown', this._onTapStart);\n on(el, 'touchstart', this._onTapStart);\n }\n\n if (this.nativeDraggable) {\n on(el, 'dragover', this);\n on(el, 'dragenter', this);\n }\n\n sortables.push(this.el); // Restore sorting\n\n options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager\n\n _extends(this, AnimationStateManager());\n}\n\nSortable.prototype =\n/** @lends Sortable.prototype */\n{\n constructor: Sortable,\n _isOutsideThisEl: function _isOutsideThisEl(target) {\n if (!this.el.contains(target) && target !== this.el) {\n lastTarget = null;\n }\n },\n _getDirection: function _getDirection(evt, target) {\n return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n },\n _onTapStart: function _onTapStart(\n /** Event|TouchEvent */\n evt) {\n if (!evt.cancelable) return;\n\n var _this = this,\n el = this.el,\n options = this.options,\n preventOnFilter = options.preventOnFilter,\n type = evt.type,\n touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n target = (touch || evt).target,\n originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n filter = options.filter;\n\n _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n\n\n if (dragEl) {\n return;\n }\n\n if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n return; // only left button and enabled\n } // cancel dnd if original target is content editable\n\n\n if (originalTarget.isContentEditable) {\n return;\n } // Safari ignores further event handling after mousedown\n\n\n if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n return;\n }\n\n target = closest(target, options.draggable, el, false);\n\n if (target && target.animated) {\n return;\n }\n\n if (lastDownEl === target) {\n // Ignoring duplicate `down`\n return;\n } // Get the index of the dragged element within its parent\n\n\n oldIndex = index(target);\n oldDraggableIndex = index(target, options.draggable); // Check filter\n\n if (typeof filter === 'function') {\n if (filter.call(this, evt, target, this)) {\n _dispatchEvent({\n sortable: _this,\n rootEl: originalTarget,\n name: 'filter',\n targetEl: target,\n toEl: el,\n fromEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n } else if (filter) {\n filter = filter.split(',').some(function (criteria) {\n criteria = closest(originalTarget, criteria.trim(), el, false);\n\n if (criteria) {\n _dispatchEvent({\n sortable: _this,\n rootEl: criteria,\n name: 'filter',\n targetEl: target,\n fromEl: el,\n toEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n return true;\n }\n });\n\n if (filter) {\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n }\n\n if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n return;\n } // Prepare `dragstart`\n\n\n this._prepareDragStart(evt, touch, target);\n },\n _prepareDragStart: function _prepareDragStart(\n /** Event */\n evt,\n /** Touch */\n touch,\n /** HTMLElement */\n target) {\n var _this = this,\n el = _this.el,\n options = _this.options,\n ownerDocument = el.ownerDocument,\n dragStartFn;\n\n if (target && !dragEl && target.parentNode === el) {\n var dragRect = getRect(target);\n rootEl = el;\n dragEl = target;\n parentEl = dragEl.parentNode;\n nextEl = dragEl.nextSibling;\n lastDownEl = target;\n activeGroup = options.group;\n Sortable.dragged = dragEl;\n tapEvt = {\n target: dragEl,\n clientX: (touch || evt).clientX,\n clientY: (touch || evt).clientY\n };\n tapDistanceLeft = tapEvt.clientX - dragRect.left;\n tapDistanceTop = tapEvt.clientY - dragRect.top;\n this._lastX = (touch || evt).clientX;\n this._lastY = (touch || evt).clientY;\n dragEl.style['will-change'] = 'all';\n\n dragStartFn = function dragStartFn() {\n pluginEvent('delayEnded', _this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n _this._onDrop();\n\n return;\n } // Delayed drag has been triggered\n // we can re-enable the events: touchmove/mousemove\n\n\n _this._disableDelayedDragEvents();\n\n if (!FireFox && _this.nativeDraggable) {\n dragEl.draggable = true;\n } // Bind the events: dragstart/dragend\n\n\n _this._triggerDragStart(evt, touch); // Drag start event\n\n\n _dispatchEvent({\n sortable: _this,\n name: 'choose',\n originalEvent: evt\n }); // Chosen item\n\n\n toggleClass(dragEl, options.chosenClass, true);\n }; // Disable \"draggable\"\n\n\n options.ignore.split(',').forEach(function (criteria) {\n find(dragEl, criteria.trim(), _disableDraggable);\n });\n on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mouseup', _this._onDrop);\n on(ownerDocument, 'touchend', _this._onDrop);\n on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)\n\n if (FireFox && this.nativeDraggable) {\n this.options.touchStartThreshold = 4;\n dragEl.draggable = true;\n }\n\n pluginEvent('delayStart', this, {\n evt: evt\n }); // Delay is impossible for native DnD in Edge or IE\n\n if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n } // If the user moves the pointer or let go the click or touch\n // before the delay has been reached:\n // disable the delayed drag\n\n\n on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n } else {\n dragStartFn();\n }\n }\n },\n _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(\n /** TouchEvent|PointerEvent **/\n e) {\n var touch = e.touches ? e.touches[0] : e;\n\n if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n this._disableDelayedDrag();\n }\n },\n _disableDelayedDrag: function _disableDelayedDrag() {\n dragEl && _disableDraggable(dragEl);\n clearTimeout(this._dragStartTimer);\n\n this._disableDelayedDragEvents();\n },\n _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n off(ownerDocument, 'touchend', this._disableDelayedDrag);\n off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n },\n _triggerDragStart: function _triggerDragStart(\n /** Event */\n evt,\n /** Touch */\n touch) {\n touch = touch || evt.pointerType == 'touch' && evt;\n\n if (!this.nativeDraggable || touch) {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._onTouchMove);\n } else if (touch) {\n on(document, 'touchmove', this._onTouchMove);\n } else {\n on(document, 'mousemove', this._onTouchMove);\n }\n } else {\n on(dragEl, 'dragend', this);\n on(rootEl, 'dragstart', this._onDragStart);\n }\n\n try {\n if (document.selection) {\n // Timeout neccessary for IE9\n _nextTick(function () {\n document.selection.empty();\n });\n } else {\n window.getSelection().removeAllRanges();\n }\n } catch (err) {}\n },\n _dragStarted: function _dragStarted(fallback, evt) {\n\n awaitingDragStarted = false;\n\n if (rootEl && dragEl) {\n pluginEvent('dragStarted', this, {\n evt: evt\n });\n\n if (this.nativeDraggable) {\n on(document, 'dragover', _checkOutsideTargetEl);\n }\n\n var options = this.options; // Apply effect\n\n !fallback && toggleClass(dragEl, options.dragClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n Sortable.active = this;\n fallback && this._appendGhost(); // Drag start event\n\n _dispatchEvent({\n sortable: this,\n name: 'start',\n originalEvent: evt\n });\n } else {\n this._nulling();\n }\n },\n _emulateDragOver: function _emulateDragOver() {\n if (touchEvt) {\n this._lastX = touchEvt.clientX;\n this._lastY = touchEvt.clientY;\n\n _hideGhostForTarget();\n\n var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n var parent = target;\n\n while (target && target.shadowRoot) {\n target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n if (target === parent) break;\n parent = target;\n }\n\n dragEl.parentNode[expando]._isOutsideThisEl(target);\n\n if (parent) {\n do {\n if (parent[expando]) {\n var inserted = void 0;\n inserted = parent[expando]._onDragOver({\n clientX: touchEvt.clientX,\n clientY: touchEvt.clientY,\n target: target,\n rootEl: parent\n });\n\n if (inserted && !this.options.dragoverBubble) {\n break;\n }\n }\n\n target = parent; // store last element\n }\n /* jshint boss:true */\n while (parent = parent.parentNode);\n }\n\n _unhideGhostForTarget();\n }\n },\n _onTouchMove: function _onTouchMove(\n /**TouchEvent*/\n evt) {\n if (tapEvt) {\n var options = this.options,\n fallbackTolerance = options.fallbackTolerance,\n fallbackOffset = options.fallbackOffset,\n touch = evt.touches ? evt.touches[0] : evt,\n ghostMatrix = ghostEl && matrix(ghostEl, true),\n scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging\n\n if (!Sortable.active && !awaitingDragStarted) {\n if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n return;\n }\n\n this._onDragStart(evt, true);\n }\n\n if (ghostEl) {\n if (ghostMatrix) {\n ghostMatrix.e += dx - (lastDx || 0);\n ghostMatrix.f += dy - (lastDy || 0);\n } else {\n ghostMatrix = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: dx,\n f: dy\n };\n }\n\n var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n css(ghostEl, 'webkitTransform', cssMatrix);\n css(ghostEl, 'mozTransform', cssMatrix);\n css(ghostEl, 'msTransform', cssMatrix);\n css(ghostEl, 'transform', cssMatrix);\n lastDx = dx;\n lastDy = dy;\n touchEvt = touch;\n }\n\n evt.cancelable && evt.preventDefault();\n }\n },\n _appendGhost: function _appendGhost() {\n // Bug if using scale(): https://stackoverflow.com/questions/2637058\n // Not being adjusted for\n if (!ghostEl) {\n var container = this.options.fallbackOnBody ? document.body : rootEl,\n rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n options = this.options; // Position absolutely\n\n if (PositionGhostAbsolutely) {\n // Get relatively positioned parent\n ghostRelativeParent = container;\n\n while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n ghostRelativeParent = ghostRelativeParent.parentNode;\n }\n\n if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n rect.top += ghostRelativeParent.scrollTop;\n rect.left += ghostRelativeParent.scrollLeft;\n } else {\n ghostRelativeParent = getWindowScrollingElement();\n }\n\n ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n }\n\n ghostEl = dragEl.cloneNode(true);\n toggleClass(ghostEl, options.ghostClass, false);\n toggleClass(ghostEl, options.fallbackClass, true);\n toggleClass(ghostEl, options.dragClass, true);\n css(ghostEl, 'transition', '');\n css(ghostEl, 'transform', '');\n css(ghostEl, 'box-sizing', 'border-box');\n css(ghostEl, 'margin', 0);\n css(ghostEl, 'top', rect.top);\n css(ghostEl, 'left', rect.left);\n css(ghostEl, 'width', rect.width);\n css(ghostEl, 'height', rect.height);\n css(ghostEl, 'opacity', '0.8');\n css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n css(ghostEl, 'zIndex', '100000');\n css(ghostEl, 'pointerEvents', 'none');\n Sortable.ghost = ghostEl;\n container.appendChild(ghostEl); // Set transform-origin\n\n css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n }\n },\n _onDragStart: function _onDragStart(\n /**Event*/\n evt,\n /**boolean*/\n fallback) {\n var _this = this;\n\n var dataTransfer = evt.dataTransfer;\n var options = _this.options;\n pluginEvent('dragStart', this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n }\n\n pluginEvent('setupClone', this);\n\n if (!Sortable.eventCanceled) {\n cloneEl = clone(dragEl);\n cloneEl.draggable = false;\n cloneEl.style['will-change'] = '';\n\n this._hideClone();\n\n toggleClass(cloneEl, this.options.chosenClass, false);\n Sortable.clone = cloneEl;\n } // #1143: IFrame support workaround\n\n\n _this.cloneId = _nextTick(function () {\n pluginEvent('clone', _this);\n if (Sortable.eventCanceled) return;\n\n if (!_this.options.removeCloneOnHide) {\n rootEl.insertBefore(cloneEl, dragEl);\n }\n\n _this._hideClone();\n\n _dispatchEvent({\n sortable: _this,\n name: 'clone'\n });\n });\n !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events\n\n if (fallback) {\n ignoreNextClick = true;\n _this._loopId = setInterval(_this._emulateDragOver, 50);\n } else {\n // Undo what was set in _prepareDragStart before drag started\n off(document, 'mouseup', _this._onDrop);\n off(document, 'touchend', _this._onDrop);\n off(document, 'touchcancel', _this._onDrop);\n\n if (dataTransfer) {\n dataTransfer.effectAllowed = 'move';\n options.setData && options.setData.call(_this, dataTransfer, dragEl);\n }\n\n on(document, 'drop', _this); // #1276 fix:\n\n css(dragEl, 'transform', 'translateZ(0)');\n }\n\n awaitingDragStarted = true;\n _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n on(document, 'selectstart', _this);\n moved = true;\n\n if (Safari) {\n css(document.body, 'user-select', 'none');\n }\n },\n // Returns true - if no further action is needed (either inserted or another condition)\n _onDragOver: function _onDragOver(\n /**Event*/\n evt) {\n var el = this.el,\n target = evt.target,\n dragRect,\n targetRect,\n revert,\n options = this.options,\n group = options.group,\n activeSortable = Sortable.active,\n isOwner = activeGroup === group,\n canSort = options.sort,\n fromSortable = putSortable || activeSortable,\n vertical,\n _this = this,\n completedFired = false;\n\n if (_silent) return;\n\n function dragOverEvent(name, extra) {\n pluginEvent(name, _this, _objectSpread({\n evt: evt,\n isOwner: isOwner,\n axis: vertical ? 'vertical' : 'horizontal',\n revert: revert,\n dragRect: dragRect,\n targetRect: targetRect,\n canSort: canSort,\n fromSortable: fromSortable,\n target: target,\n completed: completed,\n onMove: function onMove(target, after) {\n return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n },\n changed: changed\n }, extra));\n } // Capture animation state\n\n\n function capture() {\n dragOverEvent('dragOverAnimationCapture');\n\n _this.captureAnimationState();\n\n if (_this !== fromSortable) {\n fromSortable.captureAnimationState();\n }\n } // Return invocation when dragEl is inserted (or completed)\n\n\n function completed(insertion) {\n dragOverEvent('dragOverCompleted', {\n insertion: insertion\n });\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n } else {\n activeSortable._showClone(_this);\n }\n\n if (_this !== fromSortable) {\n // Set ghost class to new sortable's ghost class\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n }\n\n if (putSortable !== _this && _this !== Sortable.active) {\n putSortable = _this;\n } else if (_this === Sortable.active && putSortable) {\n putSortable = null;\n } // Animation\n\n\n if (fromSortable === _this) {\n _this._ignoreWhileAnimating = target;\n }\n\n _this.animateAll(function () {\n dragOverEvent('dragOverAnimationComplete');\n _this._ignoreWhileAnimating = null;\n });\n\n if (_this !== fromSortable) {\n fromSortable.animateAll();\n fromSortable._ignoreWhileAnimating = null;\n }\n } // Null lastTarget if it is not inside a previously swapped element\n\n\n if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n lastTarget = null;\n } // no bubbling and not fallback\n\n\n if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted\n\n\n !insertion && nearestEmptyInsertDetectEvent(evt);\n }\n\n !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n return completedFired = true;\n } // Call when dragEl has been inserted\n\n\n function changed() {\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n _dispatchEvent({\n sortable: _this,\n name: 'change',\n toEl: el,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n originalEvent: evt\n });\n }\n\n if (evt.preventDefault !== void 0) {\n evt.cancelable && evt.preventDefault();\n }\n\n target = closest(target, options.draggable, el, true);\n dragOverEvent('dragOver');\n if (Sortable.eventCanceled) return completedFired;\n\n if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n return completed(false);\n }\n\n ignoreNextClick = false;\n\n if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list\n : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n vertical = this._getDirection(evt, target) === 'vertical';\n dragRect = getRect(dragEl);\n dragOverEvent('dragOverValid');\n if (Sortable.eventCanceled) return completedFired;\n\n if (revert) {\n parentEl = rootEl; // actualization\n\n capture();\n\n this._hideClone();\n\n dragOverEvent('revert');\n\n if (!Sortable.eventCanceled) {\n if (nextEl) {\n rootEl.insertBefore(dragEl, nextEl);\n } else {\n rootEl.appendChild(dragEl);\n }\n }\n\n return completed(true);\n }\n\n var elLastChild = lastChild(el, options.draggable);\n\n if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n // If already at end of list: Do not insert\n if (elLastChild === dragEl) {\n return completed(false);\n } // assign target only if condition is true\n\n\n if (elLastChild && el === evt.target) {\n target = elLastChild;\n }\n\n if (target) {\n targetRect = getRect(target);\n }\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n capture();\n el.appendChild(dragEl);\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (target.parentNode === el) {\n targetRect = getRect(target);\n var direction = 0,\n targetBeforeFirstSwap,\n differentLevel = dragEl.parentNode !== el,\n differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n side1 = vertical ? 'top' : 'left',\n scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n\n if (lastTarget !== target) {\n targetBeforeFirstSwap = targetRect[side1];\n pastFirstInvertThresh = false;\n isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n }\n\n direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n var sibling;\n\n if (direction !== 0) {\n // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n var dragIndex = index(dragEl);\n\n do {\n dragIndex -= direction;\n sibling = parentEl.children[dragIndex];\n } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n } // If dragEl is already beside target: Do not insert\n\n\n if (direction === 0 || sibling === target) {\n return completed(false);\n }\n\n lastTarget = target;\n lastDirection = direction;\n var nextSibling = target.nextElementSibling,\n after = false;\n after = direction === 1;\n\n var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n\n if (moveVector !== false) {\n if (moveVector === 1 || moveVector === -1) {\n after = moveVector === 1;\n }\n\n _silent = true;\n setTimeout(_unsilent, 30);\n capture();\n\n if (after && !nextSibling) {\n el.appendChild(dragEl);\n } else {\n target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n } // Undo chrome's scroll adjustment (has no effect on other browsers)\n\n\n if (scrolledPastTop) {\n scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n }\n\n parentEl = dragEl.parentNode; // actualization\n // must be done before animation\n\n if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n }\n\n changed();\n return completed(true);\n }\n }\n\n if (el.contains(dragEl)) {\n return completed(false);\n }\n }\n\n return false;\n },\n _ignoreWhileAnimating: null,\n _offMoveEvents: function _offMoveEvents() {\n off(document, 'mousemove', this._onTouchMove);\n off(document, 'touchmove', this._onTouchMove);\n off(document, 'pointermove', this._onTouchMove);\n off(document, 'dragover', nearestEmptyInsertDetectEvent);\n off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n },\n _offUpEvents: function _offUpEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._onDrop);\n off(ownerDocument, 'touchend', this._onDrop);\n off(ownerDocument, 'pointerup', this._onDrop);\n off(ownerDocument, 'touchcancel', this._onDrop);\n off(document, 'selectstart', this);\n },\n _onDrop: function _onDrop(\n /**Event*/\n evt) {\n var el = this.el,\n options = this.options; // Get the index of the dragged element within its parent\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n pluginEvent('drop', this, {\n evt: evt\n });\n parentEl = dragEl && dragEl.parentNode; // Get again after plugin event\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n if (Sortable.eventCanceled) {\n this._nulling();\n\n return;\n }\n\n awaitingDragStarted = false;\n isCircumstantialInvert = false;\n pastFirstInvertThresh = false;\n clearInterval(this._loopId);\n clearTimeout(this._dragStartTimer);\n\n _cancelNextTick(this.cloneId);\n\n _cancelNextTick(this._dragStartId); // Unbind events\n\n\n if (this.nativeDraggable) {\n off(document, 'drop', this);\n off(el, 'dragstart', this._onDragStart);\n }\n\n this._offMoveEvents();\n\n this._offUpEvents();\n\n if (Safari) {\n css(document.body, 'user-select', '');\n }\n\n css(dragEl, 'transform', '');\n\n if (evt) {\n if (moved) {\n evt.cancelable && evt.preventDefault();\n !options.dropBubble && evt.stopPropagation();\n }\n\n ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n // Remove clone(s)\n cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n }\n\n if (dragEl) {\n if (this.nativeDraggable) {\n off(dragEl, 'dragend', this);\n }\n\n _disableDraggable(dragEl);\n\n dragEl.style['will-change'] = ''; // Remove classes\n // ghostClass is added in dragStarted\n\n if (moved && !awaitingDragStarted) {\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n }\n\n toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event\n\n _dispatchEvent({\n sortable: this,\n name: 'unchoose',\n toEl: parentEl,\n newIndex: null,\n newDraggableIndex: null,\n originalEvent: evt\n });\n\n if (rootEl !== parentEl) {\n if (newIndex >= 0) {\n // Add event\n _dispatchEvent({\n rootEl: parentEl,\n name: 'add',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n }); // Remove event\n\n\n _dispatchEvent({\n sortable: this,\n name: 'remove',\n toEl: parentEl,\n originalEvent: evt\n }); // drag from one list and drop into another\n\n\n _dispatchEvent({\n rootEl: parentEl,\n name: 'sort',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n\n putSortable && putSortable.save();\n } else {\n if (newIndex !== oldIndex) {\n if (newIndex >= 0) {\n // drag & drop within the same list\n _dispatchEvent({\n sortable: this,\n name: 'update',\n toEl: parentEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n }\n }\n\n if (Sortable.active) {\n /* jshint eqnull:true */\n if (newIndex == null || newIndex === -1) {\n newIndex = oldIndex;\n newDraggableIndex = oldDraggableIndex;\n }\n\n _dispatchEvent({\n sortable: this,\n name: 'end',\n toEl: parentEl,\n originalEvent: evt\n }); // Save sorting\n\n\n this.save();\n }\n }\n }\n\n this._nulling();\n },\n _nulling: function _nulling() {\n pluginEvent('nulling', this);\n rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n savedInputChecked.forEach(function (el) {\n el.checked = true;\n });\n savedInputChecked.length = lastDx = lastDy = 0;\n },\n handleEvent: function handleEvent(\n /**Event*/\n evt) {\n switch (evt.type) {\n case 'drop':\n case 'dragend':\n this._onDrop(evt);\n\n break;\n\n case 'dragenter':\n case 'dragover':\n if (dragEl) {\n this._onDragOver(evt);\n\n _globalDragOver(evt);\n }\n\n break;\n\n case 'selectstart':\n evt.preventDefault();\n break;\n }\n },\n\n /**\n * Serializes the item into an array of string.\n * @returns {String[]}\n */\n toArray: function toArray() {\n var order = [],\n el,\n children = this.el.children,\n i = 0,\n n = children.length,\n options = this.options;\n\n for (; i < n; i++) {\n el = children[i];\n\n if (closest(el, options.draggable, this.el, false)) {\n order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n }\n }\n\n return order;\n },\n\n /**\n * Sorts the elements according to the array.\n * @param {String[]} order order of the items\n */\n sort: function sort(order, useAnimation) {\n var items = {},\n rootEl = this.el;\n this.toArray().forEach(function (id, i) {\n var el = rootEl.children[i];\n\n if (closest(el, this.options.draggable, rootEl, false)) {\n items[id] = el;\n }\n }, this);\n useAnimation && this.captureAnimationState();\n order.forEach(function (id) {\n if (items[id]) {\n rootEl.removeChild(items[id]);\n rootEl.appendChild(items[id]);\n }\n });\n useAnimation && this.animateAll();\n },\n\n /**\n * Save the current sorting\n */\n save: function save() {\n var store = this.options.store;\n store && store.set && store.set(this);\n },\n\n /**\n * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\n * @param {HTMLElement} el\n * @param {String} [selector] default: `options.draggable`\n * @returns {HTMLElement|null}\n */\n closest: function closest$1(el, selector) {\n return closest(el, selector || this.options.draggable, this.el, false);\n },\n\n /**\n * Set/get option\n * @param {string} name\n * @param {*} [value]\n * @returns {*}\n */\n option: function option(name, value) {\n var options = this.options;\n\n if (value === void 0) {\n return options[name];\n } else {\n var modifiedValue = PluginManager.modifyOption(this, name, value);\n\n if (typeof modifiedValue !== 'undefined') {\n options[name] = modifiedValue;\n } else {\n options[name] = value;\n }\n\n if (name === 'group') {\n _prepareGroup(options);\n }\n }\n },\n\n /**\n * Destroy\n */\n destroy: function destroy() {\n pluginEvent('destroy', this);\n var el = this.el;\n el[expando] = null;\n off(el, 'mousedown', this._onTapStart);\n off(el, 'touchstart', this._onTapStart);\n off(el, 'pointerdown', this._onTapStart);\n\n if (this.nativeDraggable) {\n off(el, 'dragover', this);\n off(el, 'dragenter', this);\n } // Remove draggable attributes\n\n\n Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n el.removeAttribute('draggable');\n });\n\n this._onDrop();\n\n this._disableDelayedDragEvents();\n\n sortables.splice(sortables.indexOf(this.el), 1);\n this.el = el = null;\n },\n _hideClone: function _hideClone() {\n if (!cloneHidden) {\n pluginEvent('hideClone', this);\n if (Sortable.eventCanceled) return;\n css(cloneEl, 'display', 'none');\n\n if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n cloneEl.parentNode.removeChild(cloneEl);\n }\n\n cloneHidden = true;\n }\n },\n _showClone: function _showClone(putSortable) {\n if (putSortable.lastPutMode !== 'clone') {\n this._hideClone();\n\n return;\n }\n\n if (cloneHidden) {\n pluginEvent('showClone', this);\n if (Sortable.eventCanceled) return; // show clone at dragEl or original position\n\n if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n rootEl.insertBefore(cloneEl, dragEl);\n } else if (nextEl) {\n rootEl.insertBefore(cloneEl, nextEl);\n } else {\n rootEl.appendChild(cloneEl);\n }\n\n if (this.options.group.revertClone) {\n this.animate(dragEl, cloneEl);\n }\n\n css(cloneEl, 'display', '');\n cloneHidden = false;\n }\n }\n};\n\nfunction _globalDragOver(\n/**Event*/\nevt) {\n if (evt.dataTransfer) {\n evt.dataTransfer.dropEffect = 'move';\n }\n\n evt.cancelable && evt.preventDefault();\n}\n\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n var evt,\n sortable = fromEl[expando],\n onMoveFn = sortable.options.onMove,\n retVal; // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent('move', {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent('move', true, true);\n }\n\n evt.to = toEl;\n evt.from = fromEl;\n evt.dragged = dragEl;\n evt.draggedRect = dragRect;\n evt.related = targetEl || toEl;\n evt.relatedRect = targetRect || getRect(toEl);\n evt.willInsertAfter = willInsertAfter;\n evt.originalEvent = originalEvent;\n fromEl.dispatchEvent(evt);\n\n if (onMoveFn) {\n retVal = onMoveFn.call(sortable, evt, originalEvent);\n }\n\n return retVal;\n}\n\nfunction _disableDraggable(el) {\n el.draggable = false;\n}\n\nfunction _unsilent() {\n _silent = false;\n}\n\nfunction _ghostIsLast(evt, vertical, sortable) {\n var rect = getRect(lastChild(sortable.el, sortable.options.draggable));\n var spacer = 10;\n return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;\n}\n\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n targetLength = vertical ? targetRect.height : targetRect.width,\n targetS1 = vertical ? targetRect.top : targetRect.left,\n targetS2 = vertical ? targetRect.bottom : targetRect.right,\n invert = false;\n\n if (!invertSwap) {\n // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n // check if past first invert threshold on side opposite of lastDirection\n if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n pastFirstInvertThresh = true;\n }\n\n if (!pastFirstInvertThresh) {\n // dragEl shadow (target move distance shadow)\n if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n : mouseOnAxis > targetS2 - targetMoveDistance) {\n return -lastDirection;\n }\n } else {\n invert = true;\n }\n } else {\n // Regular\n if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n return _getInsertDirection(target);\n }\n }\n }\n\n invert = invert || invertSwap;\n\n if (invert) {\n // Invert of regular\n if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n }\n }\n\n return 0;\n}\n/**\n * Gets the direction dragEl must be swapped relative to target in order to make it\n * seem that dragEl has been \"inserted\" into that element's position\n * @param {HTMLElement} target The target whose position dragEl is being inserted at\n * @return {Number} Direction dragEl must be swapped\n */\n\n\nfunction _getInsertDirection(target) {\n if (index(dragEl) < index(target)) {\n return 1;\n } else {\n return -1;\n }\n}\n/**\n * Generate id\n * @param {HTMLElement} el\n * @returns {String}\n * @private\n */\n\n\nfunction _generateId(el) {\n var str = el.tagName + el.className + el.src + el.href + el.textContent,\n i = str.length,\n sum = 0;\n\n while (i--) {\n sum += str.charCodeAt(i);\n }\n\n return sum.toString(36);\n}\n\nfunction _saveInputCheckedState(root) {\n savedInputChecked.length = 0;\n var inputs = root.getElementsByTagName('input');\n var idx = inputs.length;\n\n while (idx--) {\n var el = inputs[idx];\n el.checked && savedInputChecked.push(el);\n }\n}\n\nfunction _nextTick(fn) {\n return setTimeout(fn, 0);\n}\n\nfunction _cancelNextTick(id) {\n return clearTimeout(id);\n} // Fixed #973:\n\n\nif (documentExists) {\n on(document, 'touchmove', function (evt) {\n if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n evt.preventDefault();\n }\n });\n} // Export utils\n\n\nSortable.utils = {\n on: on,\n off: off,\n css: css,\n find: find,\n is: function is(el, selector) {\n return !!closest(el, selector, el, false);\n },\n extend: extend,\n throttle: throttle,\n closest: closest,\n toggleClass: toggleClass,\n clone: clone,\n index: index,\n nextTick: _nextTick,\n cancelNextTick: _cancelNextTick,\n detectDirection: _detectDirection,\n getChild: getChild\n};\n/**\n * Get the Sortable instance of an element\n * @param {HTMLElement} element The element\n * @return {Sortable|undefined} The instance of Sortable\n */\n\nSortable.get = function (element) {\n return element[expando];\n};\n/**\n * Mount a plugin to Sortable\n * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted\n */\n\n\nSortable.mount = function () {\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n\n if (plugins[0].constructor === Array) plugins = plugins[0];\n plugins.forEach(function (plugin) {\n if (!plugin.prototype || !plugin.prototype.constructor) {\n throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n }\n\n if (plugin.utils) Sortable.utils = _objectSpread({}, Sortable.utils, plugin.utils);\n PluginManager.mount(plugin);\n });\n};\n/**\n * Create sortable instance\n * @param {HTMLElement} el\n * @param {Object} [options]\n */\n\n\nSortable.create = function (el, options) {\n return new Sortable(el, options);\n}; // Export\n\n\nSortable.version = version;\n\nvar autoScrolls = [],\n scrollEl,\n scrollRootEl,\n scrolling = false,\n lastAutoScrollX,\n lastAutoScrollY,\n touchEvt$1,\n pointerElemChangedInterval;\n\nfunction AutoScrollPlugin() {\n function AutoScroll() {\n this.defaults = {\n scroll: true,\n scrollSensitivity: 30,\n scrollSpeed: 10,\n bubbleScroll: true\n }; // Bind all private methods\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n }\n\n AutoScroll.prototype = {\n dragStarted: function dragStarted(_ref) {\n var originalEvent = _ref.originalEvent;\n\n if (this.sortable.nativeDraggable) {\n on(document, 'dragover', this._handleAutoScroll);\n } else {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._handleFallbackAutoScroll);\n } else if (originalEvent.touches) {\n on(document, 'touchmove', this._handleFallbackAutoScroll);\n } else {\n on(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref2) {\n var originalEvent = _ref2.originalEvent;\n\n // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n this._handleAutoScroll(originalEvent);\n }\n },\n drop: function drop() {\n if (this.sortable.nativeDraggable) {\n off(document, 'dragover', this._handleAutoScroll);\n } else {\n off(document, 'pointermove', this._handleFallbackAutoScroll);\n off(document, 'touchmove', this._handleFallbackAutoScroll);\n off(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n\n clearPointerElemChangedInterval();\n clearAutoScrolls();\n cancelThrottle();\n },\n nulling: function nulling() {\n touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n autoScrolls.length = 0;\n },\n _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n this._handleAutoScroll(evt, true);\n },\n _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n var _this = this;\n\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n elem = document.elementFromPoint(x, y);\n touchEvt$1 = evt; // IE does not seem to have native autoscroll,\n // Edge's autoscroll seems too conditional,\n // MACOS Safari does not have autoscroll,\n // Firefox and Chrome are good\n\n if (fallback || Edge || IE11OrLess || Safari) {\n autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change\n\n var ogElemScroller = getParentAutoScrollElement(elem, true);\n\n if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour\n\n pointerElemChangedInterval = setInterval(function () {\n var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n\n if (newElem !== ogElemScroller) {\n ogElemScroller = newElem;\n clearAutoScrolls();\n }\n\n autoScroll(evt, _this.options, newElem, fallback);\n }, 10);\n lastAutoScrollX = x;\n lastAutoScrollY = y;\n }\n } else {\n // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n clearAutoScrolls();\n return;\n }\n\n autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n }\n }\n };\n return _extends(AutoScroll, {\n pluginName: 'scroll',\n initializeByDefault: true\n });\n}\n\nfunction clearAutoScrolls() {\n autoScrolls.forEach(function (autoScroll) {\n clearInterval(autoScroll.pid);\n });\n autoScrolls = [];\n}\n\nfunction clearPointerElemChangedInterval() {\n clearInterval(pointerElemChangedInterval);\n}\n\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n if (!options.scroll) return;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n sens = options.scrollSensitivity,\n speed = options.scrollSpeed,\n winScroller = getWindowScrollingElement();\n var scrollThisInstance = false,\n scrollCustomFn; // New scroll root, set scrollEl\n\n if (scrollRootEl !== rootEl) {\n scrollRootEl = rootEl;\n clearAutoScrolls();\n scrollEl = options.scroll;\n scrollCustomFn = options.scrollFn;\n\n if (scrollEl === true) {\n scrollEl = getParentAutoScrollElement(rootEl, true);\n }\n }\n\n var layersOut = 0;\n var currentParent = scrollEl;\n\n do {\n var el = currentParent,\n rect = getRect(el),\n top = rect.top,\n bottom = rect.bottom,\n left = rect.left,\n right = rect.right,\n width = rect.width,\n height = rect.height,\n canScrollX = void 0,\n canScrollY = void 0,\n scrollWidth = el.scrollWidth,\n scrollHeight = el.scrollHeight,\n elCSS = css(el),\n scrollPosX = el.scrollLeft,\n scrollPosY = el.scrollTop;\n\n if (el === winScroller) {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n } else {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n }\n\n var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n\n if (!autoScrolls[layersOut]) {\n for (var i = 0; i <= layersOut; i++) {\n if (!autoScrolls[i]) {\n autoScrolls[i] = {};\n }\n }\n }\n\n if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n autoScrolls[layersOut].el = el;\n autoScrolls[layersOut].vx = vx;\n autoScrolls[layersOut].vy = vy;\n clearInterval(autoScrolls[layersOut].pid);\n\n if (vx != 0 || vy != 0) {\n scrollThisInstance = true;\n /* jshint loopfunc:true */\n\n autoScrolls[layersOut].pid = setInterval(function () {\n // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n if (isFallback && this.layer === 0) {\n Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n\n }\n\n var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n\n if (typeof scrollCustomFn === 'function') {\n if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n return;\n }\n }\n\n scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n }.bind({\n layer: layersOut\n }), 24);\n }\n }\n\n layersOut++;\n } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n\n scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n var originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n dragEl = _ref.dragEl,\n activeSortable = _ref.activeSortable,\n dispatchSortableEvent = _ref.dispatchSortableEvent,\n hideGhostForTarget = _ref.hideGhostForTarget,\n unhideGhostForTarget = _ref.unhideGhostForTarget;\n if (!originalEvent) return;\n var toSortable = putSortable || activeSortable;\n hideGhostForTarget();\n var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n var target = document.elementFromPoint(touch.clientX, touch.clientY);\n unhideGhostForTarget();\n\n if (toSortable && !toSortable.el.contains(target)) {\n dispatchSortableEvent('spill');\n this.onSpill({\n dragEl: dragEl,\n putSortable: putSortable\n });\n }\n};\n\nfunction Revert() {}\n\nRevert.prototype = {\n startIndex: null,\n dragStart: function dragStart(_ref2) {\n var oldDraggableIndex = _ref2.oldDraggableIndex;\n this.startIndex = oldDraggableIndex;\n },\n onSpill: function onSpill(_ref3) {\n var dragEl = _ref3.dragEl,\n putSortable = _ref3.putSortable;\n this.sortable.captureAnimationState();\n\n if (putSortable) {\n putSortable.captureAnimationState();\n }\n\n var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n\n if (nextSibling) {\n this.sortable.el.insertBefore(dragEl, nextSibling);\n } else {\n this.sortable.el.appendChild(dragEl);\n }\n\n this.sortable.animateAll();\n\n if (putSortable) {\n putSortable.animateAll();\n }\n },\n drop: drop\n};\n\n_extends(Revert, {\n pluginName: 'revertOnSpill'\n});\n\nfunction Remove() {}\n\nRemove.prototype = {\n onSpill: function onSpill(_ref4) {\n var dragEl = _ref4.dragEl,\n putSortable = _ref4.putSortable;\n var parentSortable = putSortable || this.sortable;\n parentSortable.captureAnimationState();\n dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n parentSortable.animateAll();\n },\n drop: drop\n};\n\n_extends(Remove, {\n pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\n\nfunction SwapPlugin() {\n function Swap() {\n this.defaults = {\n swapClass: 'sortable-swap-highlight'\n };\n }\n\n Swap.prototype = {\n dragStart: function dragStart(_ref) {\n var dragEl = _ref.dragEl;\n lastSwapEl = dragEl;\n },\n dragOverValid: function dragOverValid(_ref2) {\n var completed = _ref2.completed,\n target = _ref2.target,\n onMove = _ref2.onMove,\n activeSortable = _ref2.activeSortable,\n changed = _ref2.changed,\n cancel = _ref2.cancel;\n if (!activeSortable.options.swap) return;\n var el = this.sortable.el,\n options = this.options;\n\n if (target && target !== el) {\n var prevSwapEl = lastSwapEl;\n\n if (onMove(target) !== false) {\n toggleClass(target, options.swapClass, true);\n lastSwapEl = target;\n } else {\n lastSwapEl = null;\n }\n\n if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n toggleClass(prevSwapEl, options.swapClass, false);\n }\n }\n\n changed();\n completed(true);\n cancel();\n },\n drop: function drop(_ref3) {\n var activeSortable = _ref3.activeSortable,\n putSortable = _ref3.putSortable,\n dragEl = _ref3.dragEl;\n var toSortable = putSortable || this.sortable;\n var options = this.options;\n lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n\n if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n if (dragEl !== lastSwapEl) {\n toSortable.captureAnimationState();\n if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n swapNodes(dragEl, lastSwapEl);\n toSortable.animateAll();\n if (toSortable !== activeSortable) activeSortable.animateAll();\n }\n }\n },\n nulling: function nulling() {\n lastSwapEl = null;\n }\n };\n return _extends(Swap, {\n pluginName: 'swap',\n eventProperties: function eventProperties() {\n return {\n swapItem: lastSwapEl\n };\n }\n });\n}\n\nfunction swapNodes(n1, n2) {\n var p1 = n1.parentNode,\n p2 = n2.parentNode,\n i1,\n i2;\n if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n i1 = index(n1);\n i2 = index(n2);\n\n if (p1.isEqualNode(p2) && i1 < i2) {\n i2++;\n }\n\n p1.insertBefore(n2, p1.children[i1]);\n p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n multiDragClones = [],\n lastMultiDragSelect,\n // for selection with modifier key down (SHIFT)\nmultiDragSortable,\n initialFolding = false,\n // Initial multi-drag fold when drag started\nfolding = false,\n // Folding any other time\ndragStarted = false,\n dragEl$1,\n clonesFromRect,\n clonesHidden;\n\nfunction MultiDragPlugin() {\n function MultiDrag(sortable) {\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n\n if (sortable.options.supportPointer) {\n on(document, 'pointerup', this._deselectMultiDrag);\n } else {\n on(document, 'mouseup', this._deselectMultiDrag);\n on(document, 'touchend', this._deselectMultiDrag);\n }\n\n on(document, 'keydown', this._checkKeyDown);\n on(document, 'keyup', this._checkKeyUp);\n this.defaults = {\n selectedClass: 'sortable-selected',\n multiDragKey: null,\n setData: function setData(dataTransfer, dragEl) {\n var data = '';\n\n if (multiDragElements.length && multiDragSortable === sortable) {\n multiDragElements.forEach(function (multiDragElement, i) {\n data += (!i ? '' : ', ') + multiDragElement.textContent;\n });\n } else {\n data = dragEl.textContent;\n }\n\n dataTransfer.setData('Text', data);\n }\n };\n }\n\n MultiDrag.prototype = {\n multiDragKeyDown: false,\n isMultiDrag: false,\n delayStartGlobal: function delayStartGlobal(_ref) {\n var dragged = _ref.dragEl;\n dragEl$1 = dragged;\n },\n delayEnded: function delayEnded() {\n this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n },\n setupClone: function setupClone(_ref2) {\n var sortable = _ref2.sortable,\n cancel = _ref2.cancel;\n if (!this.isMultiDrag) return;\n\n for (var i = 0; i < multiDragElements.length; i++) {\n multiDragClones.push(clone(multiDragElements[i]));\n multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n multiDragClones[i].draggable = false;\n multiDragClones[i].style['will-change'] = '';\n toggleClass(multiDragClones[i], this.options.selectedClass, false);\n multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n }\n\n sortable._hideClone();\n\n cancel();\n },\n clone: function clone(_ref3) {\n var sortable = _ref3.sortable,\n rootEl = _ref3.rootEl,\n dispatchSortableEvent = _ref3.dispatchSortableEvent,\n cancel = _ref3.cancel;\n if (!this.isMultiDrag) return;\n\n if (!this.options.removeCloneOnHide) {\n if (multiDragElements.length && multiDragSortable === sortable) {\n insertMultiDragClones(true, rootEl);\n dispatchSortableEvent('clone');\n cancel();\n }\n }\n },\n showClone: function showClone(_ref4) {\n var cloneNowShown = _ref4.cloneNowShown,\n rootEl = _ref4.rootEl,\n cancel = _ref4.cancel;\n if (!this.isMultiDrag) return;\n insertMultiDragClones(false, rootEl);\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', '');\n });\n cloneNowShown();\n clonesHidden = false;\n cancel();\n },\n hideClone: function hideClone(_ref5) {\n var _this = this;\n\n var sortable = _ref5.sortable,\n cloneNowHidden = _ref5.cloneNowHidden,\n cancel = _ref5.cancel;\n if (!this.isMultiDrag) return;\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', 'none');\n\n if (_this.options.removeCloneOnHide && clone.parentNode) {\n clone.parentNode.removeChild(clone);\n }\n });\n cloneNowHidden();\n clonesHidden = true;\n cancel();\n },\n dragStartGlobal: function dragStartGlobal(_ref6) {\n var sortable = _ref6.sortable;\n\n if (!this.isMultiDrag && multiDragSortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n }\n\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.sortableIndex = index(multiDragElement);\n }); // Sort multi-drag elements\n\n multiDragElements = multiDragElements.sort(function (a, b) {\n return a.sortableIndex - b.sortableIndex;\n });\n dragStarted = true;\n },\n dragStarted: function dragStarted(_ref7) {\n var _this2 = this;\n\n var sortable = _ref7.sortable;\n if (!this.isMultiDrag) return;\n\n if (this.options.sort) {\n // Capture rects,\n // hide multi drag elements (by positioning them absolute),\n // set multi drag elements rects to dragRect,\n // show multi drag elements,\n // animate to rects,\n // unset rects & remove from DOM\n sortable.captureAnimationState();\n\n if (this.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n css(multiDragElement, 'position', 'absolute');\n });\n var dragRect = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRect);\n });\n folding = true;\n initialFolding = true;\n }\n }\n\n sortable.animateAll(function () {\n folding = false;\n initialFolding = false;\n\n if (_this2.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n } // Remove all auxiliary multidrag items from el, if sorting enabled\n\n\n if (_this2.options.sort) {\n removeMultiDragElements();\n }\n });\n },\n dragOver: function dragOver(_ref8) {\n var target = _ref8.target,\n completed = _ref8.completed,\n cancel = _ref8.cancel;\n\n if (folding && ~multiDragElements.indexOf(target)) {\n completed(false);\n cancel();\n }\n },\n revert: function revert(_ref9) {\n var fromSortable = _ref9.fromSortable,\n rootEl = _ref9.rootEl,\n sortable = _ref9.sortable,\n dragRect = _ref9.dragRect;\n\n if (multiDragElements.length > 1) {\n // Setup unfold animation\n multiDragElements.forEach(function (multiDragElement) {\n sortable.addAnimationState({\n target: multiDragElement,\n rect: folding ? getRect(multiDragElement) : dragRect\n });\n unsetRect(multiDragElement);\n multiDragElement.fromRect = dragRect;\n fromSortable.removeAnimationState(multiDragElement);\n });\n folding = false;\n insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref10) {\n var sortable = _ref10.sortable,\n isOwner = _ref10.isOwner,\n insertion = _ref10.insertion,\n activeSortable = _ref10.activeSortable,\n parentEl = _ref10.parentEl,\n putSortable = _ref10.putSortable;\n var options = this.options;\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n }\n\n initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location\n\n if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n\n parentEl.appendChild(multiDragElement);\n });\n folding = true;\n } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n\n\n if (!isOwner) {\n // Only remove if not folding (folding will remove them anyways)\n if (!folding) {\n removeMultiDragElements();\n }\n\n if (multiDragElements.length > 1) {\n var clonesHiddenBefore = clonesHidden;\n\n activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden\n\n\n if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n multiDragClones.forEach(function (clone) {\n activeSortable.addAnimationState({\n target: clone,\n rect: clonesFromRect\n });\n clone.fromRect = clonesFromRect;\n clone.thisAnimationDuration = null;\n });\n }\n } else {\n activeSortable._showClone(sortable);\n }\n }\n }\n },\n dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n var dragRect = _ref11.dragRect,\n isOwner = _ref11.isOwner,\n activeSortable = _ref11.activeSortable;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n });\n\n if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n clonesFromRect = _extends({}, dragRect);\n var dragMatrix = matrix(dragEl$1, true);\n clonesFromRect.top -= dragMatrix.f;\n clonesFromRect.left -= dragMatrix.e;\n }\n },\n dragOverAnimationComplete: function dragOverAnimationComplete() {\n if (folding) {\n folding = false;\n removeMultiDragElements();\n }\n },\n drop: function drop(_ref12) {\n var evt = _ref12.originalEvent,\n rootEl = _ref12.rootEl,\n parentEl = _ref12.parentEl,\n sortable = _ref12.sortable,\n dispatchSortableEvent = _ref12.dispatchSortableEvent,\n oldIndex = _ref12.oldIndex,\n putSortable = _ref12.putSortable;\n var toSortable = putSortable || this.sortable;\n if (!evt) return;\n var options = this.options,\n children = parentEl.children; // Multi-drag selection\n\n if (!dragStarted) {\n if (options.multiDragKey && !this.multiDragKeyDown) {\n this._deselectMultiDrag();\n }\n\n toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n\n if (!~multiDragElements.indexOf(dragEl$1)) {\n multiDragElements.push(dragEl$1);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: dragEl$1,\n originalEvt: evt\n }); // Modifier activated, select from last to dragEl\n\n if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n var lastIndex = index(lastMultiDragSelect),\n currentIndex = index(dragEl$1);\n\n if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n // (but previous selection existed)\n var n, i;\n\n if (currentIndex > lastIndex) {\n i = lastIndex;\n n = currentIndex;\n } else {\n i = currentIndex;\n n = lastIndex + 1;\n }\n\n for (; i < n; i++) {\n if (~multiDragElements.indexOf(children[i])) continue;\n toggleClass(children[i], options.selectedClass, true);\n multiDragElements.push(children[i]);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: children[i],\n originalEvt: evt\n });\n }\n }\n } else {\n lastMultiDragSelect = dragEl$1;\n }\n\n multiDragSortable = toSortable;\n } else {\n multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n lastMultiDragSelect = null;\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'deselect',\n targetEl: dragEl$1,\n originalEvt: evt\n });\n }\n } // Multi-drag drop\n\n\n if (dragStarted && this.isMultiDrag) {\n // Do not \"unfold\" after around dragEl if reverted\n if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n var dragRect = getRect(dragEl$1),\n multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n toSortable.captureAnimationState();\n\n if (!initialFolding) {\n if (options.animation) {\n dragEl$1.fromRect = dragRect;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n\n if (multiDragElement !== dragEl$1) {\n var rect = folding ? getRect(multiDragElement) : dragRect;\n multiDragElement.fromRect = rect; // Prepare unfold animation\n\n toSortable.addAnimationState({\n target: multiDragElement,\n rect: rect\n });\n }\n });\n } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n // properly they must all be removed\n\n\n removeMultiDragElements();\n multiDragElements.forEach(function (multiDragElement) {\n if (children[multiDragIndex]) {\n parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n } else {\n parentEl.appendChild(multiDragElement);\n }\n\n multiDragIndex++;\n }); // If initial folding is done, the elements may have changed position because they are now\n // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n // must be fired here as Sortable will not.\n\n if (oldIndex === index(dragEl$1)) {\n var update = false;\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n update = true;\n return;\n }\n });\n\n if (update) {\n dispatchSortableEvent('update');\n }\n }\n } // Must be done after capturing individual rects (scroll bar)\n\n\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n toSortable.animateAll();\n }\n\n multiDragSortable = toSortable;\n } // Remove clones if necessary\n\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n multiDragClones.forEach(function (clone) {\n clone.parentNode && clone.parentNode.removeChild(clone);\n });\n }\n },\n nullingGlobal: function nullingGlobal() {\n this.isMultiDrag = dragStarted = false;\n multiDragClones.length = 0;\n },\n destroyGlobal: function destroyGlobal() {\n this._deselectMultiDrag();\n\n off(document, 'pointerup', this._deselectMultiDrag);\n off(document, 'mouseup', this._deselectMultiDrag);\n off(document, 'touchend', this._deselectMultiDrag);\n off(document, 'keydown', this._checkKeyDown);\n off(document, 'keyup', this._checkKeyUp);\n },\n _deselectMultiDrag: function _deselectMultiDrag(evt) {\n if (typeof dragStarted !== \"undefined\" && dragStarted) return; // Only deselect if selection is in this sortable\n\n if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable\n\n if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click\n\n if (evt && evt.button !== 0) return;\n\n while (multiDragElements.length) {\n var el = multiDragElements[0];\n toggleClass(el, this.options.selectedClass, false);\n multiDragElements.shift();\n dispatchEvent({\n sortable: this.sortable,\n rootEl: this.sortable.el,\n name: 'deselect',\n targetEl: el,\n originalEvt: evt\n });\n }\n },\n _checkKeyDown: function _checkKeyDown(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = true;\n }\n },\n _checkKeyUp: function _checkKeyUp(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = false;\n }\n }\n };\n return _extends(MultiDrag, {\n // Static methods & properties\n pluginName: 'multiDrag',\n utils: {\n /**\r\n * Selects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be selected\r\n */\n select: function select(el) {\n var sortable = el.parentNode[expando];\n if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n\n if (multiDragSortable && multiDragSortable !== sortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n\n multiDragSortable = sortable;\n }\n\n toggleClass(el, sortable.options.selectedClass, true);\n multiDragElements.push(el);\n },\n\n /**\r\n * Deselects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be deselected\r\n */\n deselect: function deselect(el) {\n var sortable = el.parentNode[expando],\n index = multiDragElements.indexOf(el);\n if (!sortable || !sortable.options.multiDrag || !~index) return;\n toggleClass(el, sortable.options.selectedClass, false);\n multiDragElements.splice(index, 1);\n }\n },\n eventProperties: function eventProperties() {\n var _this3 = this;\n\n var oldIndicies = [],\n newIndicies = [];\n multiDragElements.forEach(function (multiDragElement) {\n oldIndicies.push({\n multiDragElement: multiDragElement,\n index: multiDragElement.sortableIndex\n }); // multiDragElements will already be sorted if folding\n\n var newIndex;\n\n if (folding && multiDragElement !== dragEl$1) {\n newIndex = -1;\n } else if (folding) {\n newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n } else {\n newIndex = index(multiDragElement);\n }\n\n newIndicies.push({\n multiDragElement: multiDragElement,\n index: newIndex\n });\n });\n return {\n items: _toConsumableArray(multiDragElements),\n clones: [].concat(multiDragClones),\n oldIndicies: oldIndicies,\n newIndicies: newIndicies\n };\n },\n optionListeners: {\n multiDragKey: function multiDragKey(key) {\n key = key.toLowerCase();\n\n if (key === 'ctrl') {\n key = 'Control';\n } else if (key.length > 1) {\n key = key.charAt(0).toUpperCase() + key.substr(1);\n }\n\n return key;\n }\n }\n });\n}\n\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n multiDragElements.forEach(function (multiDragElement, i) {\n var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(multiDragElement, target);\n } else {\n rootEl.appendChild(multiDragElement);\n }\n });\n}\n/**\r\n * Insert multi-drag clones\r\n * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted\r\n * @param {HTMLElement} rootEl\r\n */\n\n\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n multiDragClones.forEach(function (clone, i) {\n var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(clone, target);\n } else {\n rootEl.appendChild(clone);\n }\n });\n}\n\nfunction removeMultiDragElements() {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Sortable);\n\n\n\n//# sourceURL=webpack:///./node_modules/sortablejs/modular/sortable.esm.js?");
706
+
707
+ /***/ }),
708
+
709
+ /***/ "./node_modules/stimulus/index.js":
710
+ /*!****************************************!*\
711
+ !*** ./node_modules/stimulus/index.js ***!
712
+ \****************************************/
713
+ /*! exports provided: Application, Context, Controller, defaultSchema */
714
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
715
+
716
+ "use strict";
717
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _stimulus_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stimulus/core */ \"./node_modules/@stimulus/core/dist/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Application\", function() { return _stimulus_core__WEBPACK_IMPORTED_MODULE_0__[\"Application\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Context\", function() { return _stimulus_core__WEBPACK_IMPORTED_MODULE_0__[\"Context\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Controller\", function() { return _stimulus_core__WEBPACK_IMPORTED_MODULE_0__[\"Controller\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"defaultSchema\", function() { return _stimulus_core__WEBPACK_IMPORTED_MODULE_0__[\"defaultSchema\"]; });\n\n\n\n\n//# sourceURL=webpack:///./node_modules/stimulus/index.js?");
718
+
719
+ /***/ }),
720
+
721
+ /***/ "./node_modules/stimulus/webpack-helpers.js":
722
+ /*!**************************************************!*\
723
+ !*** ./node_modules/stimulus/webpack-helpers.js ***!
724
+ \**************************************************/
725
+ /*! exports provided: definitionsFromContext, identifierForContextKey */
726
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
727
+
728
+ "use strict";
729
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _stimulus_webpack_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stimulus/webpack-helpers */ \"./node_modules/@stimulus/webpack-helpers/dist/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"definitionsFromContext\", function() { return _stimulus_webpack_helpers__WEBPACK_IMPORTED_MODULE_0__[\"definitionsFromContext\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"identifierForContextKey\", function() { return _stimulus_webpack_helpers__WEBPACK_IMPORTED_MODULE_0__[\"identifierForContextKey\"]; });\n\n\n\n\n//# sourceURL=webpack:///./node_modules/stimulus/webpack-helpers.js?");
730
+
731
+ /***/ }),
732
+
733
+ /***/ "./src/js/headmin.js":
734
+ /*!***************************!*\
735
+ !*** ./src/js/headmin.js ***!
736
+ \***************************/
737
+ /*! exports provided: Headmin */
738
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
739
+
740
+ "use strict";
741
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _headmin_headmin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./headmin/headmin */ \"./src/js/headmin/headmin.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Headmin\", function() { return _headmin_headmin__WEBPACK_IMPORTED_MODULE_0__[\"Headmin\"]; });\n\n\n\n//# sourceURL=webpack:///./src/js/headmin.js?");
742
+
743
+ /***/ }),
744
+
745
+ /***/ "./src/js/headmin/controllers sync recursive \\.js$":
746
+ /*!***********************************************!*\
747
+ !*** ./src/js/headmin/controllers sync \.js$ ***!
748
+ \***********************************************/
749
+ /*! no static exports found */
750
+ /***/ (function(module, exports, __webpack_require__) {
751
+
752
+ eval("var map = {\n\t\"./filter_controller.js\": \"./src/js/headmin/controllers/filter_controller.js\",\n\t\"./filters_controller.js\": \"./src/js/headmin/controllers/filters_controller.js\",\n\t\"./index_controller.js\": \"./src/js/headmin/controllers/index_controller.js\",\n\t\"./repeater_controller.js\": \"./src/js/headmin/controllers/repeater_controller.js\",\n\t\"./repeater_row_controller.js\": \"./src/js/headmin/controllers/repeater_row_controller.js\",\n\t\"./table_actions_controller.js\": \"./src/js/headmin/controllers/table_actions_controller.js\",\n\t\"./table_controller.js\": \"./src/js/headmin/controllers/table_controller.js\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./src/js/headmin/controllers sync recursive \\\\.js$\";\n\n//# sourceURL=webpack:///./src/js/headmin/controllers_sync_\\.js$?");
753
+
754
+ /***/ }),
755
+
756
+ /***/ "./src/js/headmin/controllers/filter_controller.js":
757
+ /*!*********************************************************!*\
758
+ !*** ./src/js/headmin/controllers/filter_controller.js ***!
759
+ \*********************************************************/
760
+ /*! exports provided: default */
761
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
762
+
763
+ "use strict";
764
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _default; });\n/* harmony import */ var stimulus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stimulus */ \"./node_modules/stimulus/index.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\nvar _default = /*#__PURE__*/function (_Controller) {\n _inherits(_default, _Controller);\n\n var _super = _createSuper(_default);\n\n function _default() {\n _classCallCheck(this, _default);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(_default, [{\n key: \"connect\",\n value: // Attaches controller logic to the element itself\n // This allows calling controller methods from the element in other controllers\n function connect() {\n this.element['controller'] = this;\n }\n }, {\n key: \"toggle\",\n value: function toggle(event) {\n event.preventDefault();\n var expanded = this.buttonTarget.getAttribute('aria-expanded') === 'true';\n\n if (expanded) {\n this.close(null);\n } else {\n this.open();\n }\n }\n }, {\n key: \"open\",\n value: function open() {\n this.buttonTarget.setAttribute('aria-expanded', 'true');\n this.popupTarget.classList.remove('closed');\n }\n }, {\n key: \"close\",\n value: function close(event) {\n if (this.isClickedInside(event)) {\n event.preventDefault();\n return;\n }\n\n this.buttonTarget.setAttribute('aria-expanded', 'false');\n this.popupTarget.classList.add('closed');\n }\n }, {\n key: \"isClickedInside\",\n value: function isClickedInside(event) {\n if (!event) {\n return false;\n }\n\n var inPopup = this.popupTarget.contains(event.target);\n var inButton = this.buttonTarget.contains(event.target);\n var inAddButton = event.target.dataset.action === \"click->filters#add\";\n return inPopup || inButton || inAddButton;\n }\n }], [{\n key: \"targets\",\n get: function get() {\n return [\"button\", \"popup\"];\n }\n }]);\n\n return _default;\n}(stimulus__WEBPACK_IMPORTED_MODULE_0__[\"Controller\"]);\n\n\n\n//# sourceURL=webpack:///./src/js/headmin/controllers/filter_controller.js?");
765
+
766
+ /***/ }),
767
+
768
+ /***/ "./src/js/headmin/controllers/filters_controller.js":
769
+ /*!**********************************************************!*\
770
+ !*** ./src/js/headmin/controllers/filters_controller.js ***!
771
+ \**********************************************************/
772
+ /*! exports provided: default */
773
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
774
+
775
+ "use strict";
776
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _default; });\n/* harmony import */ var stimulus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stimulus */ \"./node_modules/stimulus/index.js\");\n/* harmony import */ var _headmin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../headmin */ \"./src/js/headmin/headmin.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\nvar _default = /*#__PURE__*/function (_Controller) {\n _inherits(_default, _Controller);\n\n var _super = _createSuper(_default);\n\n function _default() {\n _classCallCheck(this, _default);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(_default, [{\n key: \"add\",\n value: function add(event) {\n event.preventDefault();\n var name = event.target.dataset.filterName;\n var button = this.getButtonByName(name);\n\n if (button) {\n this.openFilter(button);\n } else {\n var template = this.getTemplateByName(name);\n this.listTarget.insertAdjacentHTML('beforeend', template.innerHTML);\n\n var _button = this.getButtonByName(name);\n\n _headmin__WEBPACK_IMPORTED_MODULE_1__[\"Headmin\"].initPlugins();\n }\n }\n }, {\n key: \"remove\",\n value: function remove(event) {\n var filter = event.currentTarget.closest('.h-filter');\n filter.remove();\n this.formTarget.submit();\n }\n }, {\n key: \"removeAll\",\n value: function removeAll(event) {\n this.listTarget.innerHTML = \"\";\n this.formTarget.submit();\n }\n }, {\n key: \"update\",\n value: function update(event) {\n this.formTarget.submit();\n }\n }, {\n key: \"getTemplateByName\",\n value: function getTemplateByName(name) {\n return this.templateTargets.find(function (element) {\n return element.dataset.filterName === name;\n });\n }\n }, {\n key: \"getButtonByName\",\n value: function getButtonByName(name) {\n return this.buttonTargets.find(function (element) {\n return element.dataset.filterName === name;\n });\n }\n }, {\n key: \"openFilter\",\n value: function openFilter(button) {\n button.controller.open();\n }\n }], [{\n key: \"targets\",\n get: function get() {\n return [\"form\", \"list\", \"input\", \"template\", \"button\"];\n }\n }]);\n\n return _default;\n}(stimulus__WEBPACK_IMPORTED_MODULE_0__[\"Controller\"]);\n\n\n\n//# sourceURL=webpack:///./src/js/headmin/controllers/filters_controller.js?");
777
+
778
+ /***/ }),
779
+
780
+ /***/ "./src/js/headmin/controllers/index_controller.js":
781
+ /*!********************************************************!*\
782
+ !*** ./src/js/headmin/controllers/index_controller.js ***!
783
+ \********************************************************/
784
+ /*! exports provided: default */
785
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
786
+
787
+ "use strict";
788
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _default; });\n/* harmony import */ var stimulus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stimulus */ \"./node_modules/stimulus/index.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\nvar _default = /*#__PURE__*/function (_Controller) {\n _inherits(_default, _Controller);\n\n var _super = _createSuper(_default);\n\n function _default() {\n _classCallCheck(this, _default);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(_default, [{\n key: \"toggleIds\",\n value: function toggleIds(event) {\n var checkbox = event.target;\n this.toggleIdsCheckboxes(checkbox.checked);\n this.toggleIdCheckboxes(checkbox.checked);\n this.syncFields();\n }\n }, {\n key: \"toggleId\",\n value: function toggleId(event) {\n this.toggleIdsCheckboxes(false);\n this.syncFields();\n }\n }, {\n key: \"toggleIdsCheckboxes\",\n value: function toggleIdsCheckboxes(checked) {\n this.idsCheckboxTargets.forEach(function (checkbox) {\n checkbox.checked = checked;\n });\n }\n }, {\n key: \"toggleIdCheckboxes\",\n value: function toggleIdCheckboxes(checked) {\n this.idCheckboxTargets.forEach(function (checkbox) {\n checkbox.checked = checked;\n });\n }\n }, {\n key: \"syncFields\",\n value: function syncFields() {\n var _this = this;\n\n this.removeIds();\n\n if (this.idsCheckboxTarget.checked) {\n this.addId('');\n } else {\n this.idCheckboxTargets.forEach(function (checkbox) {\n if (checkbox.checked) {\n _this.addId(checkbox.value);\n }\n });\n }\n }\n }, {\n key: \"addId\",\n value: function addId(id) {\n var field = this.getIdField(id);\n\n if (!field) {\n field = this.newIdField(id);\n this.actionsTarget.insertAdjacentHTML('afterbegin', field);\n }\n }\n }, {\n key: \"removeIds\",\n value: function removeIds() {\n var _this2 = this;\n\n var fields = this.getIdFields();\n fields.forEach(function (field) {\n _this2.actionsTarget.removeChild(field);\n });\n }\n }, {\n key: \"removeId\",\n value: function removeId(id) {\n var field = this.getIdField(id);\n\n if (field) {\n this.actionsTarget.removeChild(field);\n }\n }\n }, {\n key: \"newIdField\",\n value: function newIdField(id) {\n var template = this.actionsTarget.querySelector('[data-index-target=\"idFieldTemplate\"]');\n return template.innerHTML.replace(/ID/g, id);\n }\n }, {\n key: \"getIdFields\",\n value: function getIdFields() {\n return this.actionsTarget.querySelectorAll(\"input[name=\\\"ids[]\\\"]\");\n }\n }, {\n key: \"getIdField\",\n value: function getIdField(id) {\n return this.actionsTarget.querySelector(\"input[name=\\\"ids[]\\\"][value=\\\"\".concat(id, \"\\\"]\"));\n }\n }], [{\n key: \"targets\",\n get: function get() {\n return [\"actions\", \"idCheckbox\", \"idsCheckbox\"];\n }\n }]);\n\n return _default;\n}(stimulus__WEBPACK_IMPORTED_MODULE_0__[\"Controller\"]);\n\n\n\n//# sourceURL=webpack:///./src/js/headmin/controllers/index_controller.js?");
789
+
790
+ /***/ }),
791
+
792
+ /***/ "./src/js/headmin/controllers/repeater_controller.js":
793
+ /*!***********************************************************!*\
794
+ !*** ./src/js/headmin/controllers/repeater_controller.js ***!
795
+ \***********************************************************/
796
+ /*! exports provided: default */
797
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
798
+
799
+ "use strict";
800
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _default; });\n/* harmony import */ var stimulus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stimulus */ \"./node_modules/stimulus/index.js\");\n/* harmony import */ var _headmin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../headmin */ \"./src/js/headmin/headmin.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\nvar _default = /*#__PURE__*/function (_Controller) {\n _inherits(_default, _Controller);\n\n var _super = _createSuper(_default);\n\n function _default() {\n _classCallCheck(this, _default);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(_default, [{\n key: \"add_association\",\n value: function add_association(event) {\n event.preventDefault();\n var html = this.getTemplateHTML();\n html = this.replaceIdsWithTimestamps(html);\n this.addNewRow(html);\n }\n }, {\n key: \"getTemplateHTML\",\n value: function getTemplateHTML() {\n return this.templateTarget.innerHTML;\n }\n }, {\n key: \"replaceIdsWithTimestamps\",\n value: function replaceIdsWithTimestamps(html) {\n var regex = new RegExp(this.idValue, \"g\");\n return html.replace(regex, new Date().getTime());\n }\n }, {\n key: \"addNewRow\",\n value: function addNewRow(html) {\n this.linksTarget.insertAdjacentHTML('beforebegin', html);\n _headmin__WEBPACK_IMPORTED_MODULE_1__[\"Headmin\"].initPlugins();\n }\n }], [{\n key: \"values\",\n get: function get() {\n return {\n id: String\n };\n }\n }, {\n key: \"targets\",\n get: function get() {\n return [\"links\", \"template\"];\n }\n }]);\n\n return _default;\n}(stimulus__WEBPACK_IMPORTED_MODULE_0__[\"Controller\"]);\n\n\n\n//# sourceURL=webpack:///./src/js/headmin/controllers/repeater_controller.js?");
801
+
802
+ /***/ }),
803
+
804
+ /***/ "./src/js/headmin/controllers/repeater_row_controller.js":
805
+ /*!***************************************************************!*\
806
+ !*** ./src/js/headmin/controllers/repeater_row_controller.js ***!
807
+ \***************************************************************/
808
+ /*! exports provided: default */
809
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
810
+
811
+ "use strict";
812
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _default; });\n/* harmony import */ var stimulus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stimulus */ \"./node_modules/stimulus/index.js\");\n/* harmony import */ var _headmin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../headmin */ \"./src/js/headmin/headmin.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\nvar _default = /*#__PURE__*/function (_Controller) {\n _inherits(_default, _Controller);\n\n var _super = _createSuper(_default);\n\n function _default() {\n _classCallCheck(this, _default);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(_default, [{\n key: \"add_association\",\n value: function add_association(event) {\n event.preventDefault();\n var html = this.getTemplateHTML();\n html = this.replaceIdsWithTimestamps(html);\n this.addRow(html);\n }\n }, {\n key: \"remove_association\",\n value: function remove_association(event) {\n event.preventDefault();\n var row = event.target.closest(\".repeater-row\");\n\n if (row.dataset.newRecord === \"true\") {\n // New records are simply removed from the page\n row.remove();\n } else {\n // Existing records are hidden and flagged for deletion\n row.querySelector(\"input[name*='_destroy']\").value = 1;\n row.style.display = 'none';\n }\n }\n }, {\n key: \"addRow\",\n value: function addRow(html) {\n this.rowTarget.insertAdjacentHTML('afterend', html);\n _headmin__WEBPACK_IMPORTED_MODULE_1__[\"Headmin\"].initPlugins();\n }\n }, {\n key: \"replaceIdsWithTimestamps\",\n value: function replaceIdsWithTimestamps(html) {\n var regex = new RegExp(this.idValue(), \"g\");\n return html.replace(regex, new Date().getTime());\n }\n }, {\n key: \"getTemplateHTML\",\n value: function getTemplateHTML() {\n var templateTarget = this.templateTarget();\n return templateTarget.innerHTML;\n }\n }, {\n key: \"templateTarget\",\n value: function templateTarget() {\n return this.rowTarget.closest('.repeater').querySelector('[data-repeater-target=\"template\"]');\n }\n }, {\n key: \"idValue\",\n value: function idValue() {\n return this.rowTarget.closest('.repeater').dataset.repeaterIdValue;\n }\n }], [{\n key: \"targets\",\n get: function get() {\n return [\"row\"];\n }\n }]);\n\n return _default;\n}(stimulus__WEBPACK_IMPORTED_MODULE_0__[\"Controller\"]);\n\n\n\n//# sourceURL=webpack:///./src/js/headmin/controllers/repeater_row_controller.js?");
813
+
814
+ /***/ }),
815
+
816
+ /***/ "./src/js/headmin/controllers/table_actions_controller.js":
817
+ /*!****************************************************************!*\
818
+ !*** ./src/js/headmin/controllers/table_actions_controller.js ***!
819
+ \****************************************************************/
820
+ /*! exports provided: default */
821
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
822
+
823
+ "use strict";
824
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _default; });\n/* harmony import */ var stimulus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stimulus */ \"./node_modules/stimulus/index.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\nvar _default = /*#__PURE__*/function (_Controller) {\n _inherits(_default, _Controller);\n\n var _super = _createSuper(_default);\n\n function _default() {\n _classCallCheck(this, _default);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(_default, [{\n key: \"connect\",\n value: function connect() {\n this.wrapperClass = \"table-actions\";\n }\n }, {\n key: \"update\",\n value: function update(event) {\n event.preventDefault();\n var option = this.selectTarget.options[this.selectTarget.selectedIndex];\n var action = this.selectTarget.value;\n var method = option.dataset.method; // Replace form action\n\n this.formTarget.action = action;\n this.methodTarget.value = method;\n }\n }], [{\n key: \"targets\",\n get: function get() {\n return [\"form\", \"select\", \"method\"];\n }\n }]);\n\n return _default;\n}(stimulus__WEBPACK_IMPORTED_MODULE_0__[\"Controller\"]);\n\n\n\n//# sourceURL=webpack:///./src/js/headmin/controllers/table_actions_controller.js?");
825
+
826
+ /***/ }),
827
+
828
+ /***/ "./src/js/headmin/controllers/table_controller.js":
829
+ /*!********************************************************!*\
830
+ !*** ./src/js/headmin/controllers/table_controller.js ***!
831
+ \********************************************************/
832
+ /*! exports provided: default */
833
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
834
+
835
+ "use strict";
836
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _default; });\n/* harmony import */ var stimulus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stimulus */ \"./node_modules/stimulus/index.js\");\n/* harmony import */ var sortablejs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! sortablejs */ \"./node_modules/sortablejs/modular/sortable.esm.js\");\n/* harmony import */ var _rails_ujs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @rails/ujs */ \"./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js\");\n/* harmony import */ var _rails_ujs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_rails_ujs__WEBPACK_IMPORTED_MODULE_2__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\nvar _default = /*#__PURE__*/function (_Controller) {\n _inherits(_default, _Controller);\n\n var _super = _createSuper(_default);\n\n function _default() {\n _classCallCheck(this, _default);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(_default, [{\n key: \"connect\",\n value: function connect() {\n var _this = this;\n\n new sortablejs__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.bodyTarget, {\n handle: '.table-drag-sort-handle',\n onEnd: function onEnd(event) {\n _rails_ujs__WEBPACK_IMPORTED_MODULE_2___default.a.ajax({\n url: _this.urlValue,\n type: \"PATCH\",\n data: _this.getIdsDataString()\n });\n }\n });\n }\n }, {\n key: \"getIdsDataString\",\n value: function getIdsDataString() {\n var table = this.tableTarget;\n var data = \"\";\n\n var handles = _toConsumableArray(table.querySelectorAll(\".table-drag-sort-handle\"));\n\n handles.map(function (handle) {\n data += \"ids[]=\".concat(handle.dataset.id, \"&\");\n });\n return data;\n }\n }], [{\n key: \"values\",\n get: function get() {\n return {\n url: String\n };\n }\n }, {\n key: \"targets\",\n get: function get() {\n return [\"table\", \"body\"];\n }\n }]);\n\n return _default;\n}(stimulus__WEBPACK_IMPORTED_MODULE_0__[\"Controller\"]);\n\n\n\n//# sourceURL=webpack:///./src/js/headmin/controllers/table_controller.js?");
837
+
838
+ /***/ }),
839
+
840
+ /***/ "./src/js/headmin/headmin.js":
841
+ /*!***********************************!*\
842
+ !*** ./src/js/headmin/headmin.js ***!
843
+ \***********************************/
844
+ /*! exports provided: Headmin */
845
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
846
+
847
+ "use strict";
848
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Headmin\", function() { return Headmin; });\n/* harmony import */ var ckeditor5_build_classic_simple_upload_adapter_image_resize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ckeditor5-build-classic-simple-upload-adapter-image-resize */ \"./node_modules/ckeditor5-build-classic-simple-upload-adapter-image-resize/build/ckeditor.js\");\n/* harmony import */ var ckeditor5_build_classic_simple_upload_adapter_image_resize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ckeditor5_build_classic_simple_upload_adapter_image_resize__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var choices_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! choices.js */ \"./node_modules/choices.js/public/assets/scripts/choices.js\");\n/* harmony import */ var choices_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(choices_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var sortablejs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! sortablejs */ \"./node_modules/sortablejs/modular/sortable.esm.js\");\n/* harmony import */ var flatpickr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! flatpickr */ \"./node_modules/flatpickr/dist/esm/index.js\");\n/* harmony import */ var bootstrap_dist_js_bootstrap_bundle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! bootstrap/dist/js/bootstrap.bundle */ \"./node_modules/bootstrap/dist/js/bootstrap.bundle.js\");\n/* harmony import */ var bootstrap_dist_js_bootstrap_bundle__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(bootstrap_dist_js_bootstrap_bundle__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _rails_ujs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @rails/ujs */ \"./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js\");\n/* harmony import */ var _rails_ujs__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_rails_ujs__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var stimulus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! stimulus */ \"./node_modules/stimulus/index.js\");\n/* harmony import */ var stimulus_webpack_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! stimulus/webpack-helpers */ \"./node_modules/stimulus/webpack-helpers.js\");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n\n\n\n\nvar Headmin = /*#__PURE__*/function () {\n function Headmin() {\n _classCallCheck(this, Headmin);\n }\n\n _createClass(Headmin, null, [{\n key: \"start\",\n value: function start() {\n // Init Rails UJS\n _rails_ujs__WEBPACK_IMPORTED_MODULE_5___default.a.start(); // Init Stimulus\n\n var application = stimulus__WEBPACK_IMPORTED_MODULE_6__[\"Application\"].start();\n\n var context = __webpack_require__(\"./src/js/headmin/controllers sync recursive \\\\.js$\");\n\n application.load(Object(stimulus_webpack_helpers__WEBPACK_IMPORTED_MODULE_7__[\"definitionsFromContext\"])(context)); // Init Plugins\n\n this.initPlugins();\n }\n }, {\n key: \"initPlugins\",\n value: function initPlugins() {\n this.initChoices();\n this.initFlatpickrs();\n this.initToasts();\n this.initPopovers();\n this.initCKEditors();\n }\n }, {\n key: \"initFlatpickrs\",\n value: function initFlatpickrs() {\n var _this = this;\n\n document.querySelectorAll('.flatpickr').forEach(function (element) {\n _this.initFlatpickr(element);\n });\n }\n }, {\n key: \"initFlatpickr\",\n value: function initFlatpickr(element) {\n Object(flatpickr__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element, {\n allowInput: true,\n altInput: true,\n altFormat: 'd/m/Y'\n });\n }\n }, {\n key: \"initCKEditors\",\n value: function initCKEditors() {\n var _this2 = this;\n\n document.querySelectorAll('.ckeditor').forEach(function (element) {\n _this2.initCKEditor(element);\n });\n }\n }, {\n key: \"csrfToken\",\n value: function csrfToken() {\n return document.querySelector('meta[name=\"csrf-token\"]').content;\n }\n }, {\n key: \"initCKEditor\",\n value: function initCKEditor(element) {\n var defaultToolbarItems = ['heading', '|', 'bold', 'italic', 'bulletedList', 'numberedList', '|', 'outdent', 'indent', '|', 'link', 'imageUpload', 'blockQuote', 'insertTable', 'mediaEmbed', '|', 'undo', 'redo'];\n var requestedToolbarItems = element.dataset.ckeditorToolbar ? JSON.parse(element.dataset.ckeditorToolbar) : undefined;\n var toolbarItems = requestedToolbarItems ? requestedToolbarItems : defaultToolbarItems;\n var uploadPath = element.dataset.ckeditorUploadPath;\n ClassicEditor.create(element, {\n toolbar: {\n items: toolbarItems\n },\n language: 'en',\n image: {\n toolbar: ['imageTextAlternative', 'imageStyle:full', 'imageStyle:side']\n },\n table: {\n contentToolbar: ['tableColumn', 'tableRow', 'mergeTableCells']\n },\n simpleUpload: {\n uploadUrl: uploadPath,\n withCredentials: true,\n headers: {\n 'X-CSRF-TOKEN': this.csrfToken()\n }\n }\n });\n }\n }, {\n key: \"initChoices\",\n value: function initChoices() {\n this.initChoicesSelectTags();\n this.initChoicesMultipleSelect();\n }\n }, {\n key: \"initChoicesSelectTags\",\n value: function initChoicesSelectTags() {\n document.querySelectorAll('.select-tags').forEach(function (select) {\n // Skip if already initialized\n if (select.dataset.choice === 'active') {\n return;\n } // Create a new instance\n\n\n new choices_js__WEBPACK_IMPORTED_MODULE_1___default.a(select, {\n removeItemButton: true,\n loadingText: 'Loading...',\n noResultsText: 'No results found',\n noChoicesText: 'No choices to choose from',\n itemSelectText: 'Press to select',\n addItems: true,\n addItemText: function addItemText(value) {\n return \"Press Enter to add <b>\\\"\".concat(value, \"\\\"</b>\");\n },\n maxItemText: function maxItemText(maxItemCount) {\n return \"Only \".concat(maxItemCount, \" values can be added\");\n }\n });\n });\n }\n }, {\n key: \"initChoicesMultipleSelect\",\n value: function initChoicesMultipleSelect() {\n document.querySelectorAll('.multiple-select').forEach(function (select) {\n // Skip if already initialized\n if (select.dataset.choice === 'active') {\n return;\n } // Create a new instance\n\n\n new choices_js__WEBPACK_IMPORTED_MODULE_1___default.a(select, {\n removeItemButton: true,\n loadingText: 'Loading...',\n noResultsText: 'No results found',\n noChoicesText: 'No choices to choose from',\n itemSelectText: 'Press to select',\n addItems: true,\n addItemText: function addItemText(value) {\n return \"Press Enter to add <b>\\\"\".concat(value, \"\\\"</b>\");\n },\n maxItemText: function maxItemText(maxItemCount) {\n return \"Only \".concat(maxItemCount, \" values can be added\");\n }\n });\n });\n }\n }, {\n key: \"initToasts\",\n value: function initToasts() {\n document.querySelectorAll('.toast').forEach(function (toast) {\n new bootstrap_dist_js_bootstrap_bundle__WEBPACK_IMPORTED_MODULE_4___default.a.Toast(toast, {});\n });\n }\n }, {\n key: \"initPopovers\",\n value: function initPopovers() {\n var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle=\"popover\"]'));\n var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {\n return new bootstrap_dist_js_bootstrap_bundle__WEBPACK_IMPORTED_MODULE_4___default.a.Popover(popoverTriggerEl, {\n sanitize: false\n });\n });\n }\n }]);\n\n return Headmin;\n}();\n\n//# sourceURL=webpack:///./src/js/headmin/headmin.js?");
849
+
850
+ /***/ })
851
+
852
+ /******/ });