@themarioga/grid-editor 5.1.2 → 5.2.0

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 (36) hide show
  1. package/BUILDING.md +6 -0
  2. package/CHANGELOG.md +25 -0
  3. package/README.md +17 -8
  4. package/UPGRADING.md +25 -0
  5. package/dist/jquery.grideditor.bundle.min.js +2 -2
  6. package/dist/jquery.grideditor.js +369 -223
  7. package/dist/jquery.grideditor.min.js +1 -1
  8. package/dist/jquery.grideditor.min.js.map +1 -1
  9. package/dist/plugins/grideditor.ckeditor.js +115 -0
  10. package/dist/plugins/grideditor.ckeditor.min.js +2 -0
  11. package/dist/plugins/grideditor.ckeditor.min.js.map +1 -0
  12. package/dist/plugins/grideditor.summernote.js +93 -0
  13. package/dist/plugins/grideditor.summernote.min.js +2 -0
  14. package/dist/plugins/grideditor.summernote.min.js.map +1 -0
  15. package/dist/plugins/grideditor.tinymce.js +157 -0
  16. package/dist/plugins/grideditor.tinymce.min.js +2 -0
  17. package/dist/plugins/grideditor.tinymce.min.js.map +1 -0
  18. package/docs/plugins.md +55 -3
  19. package/example/attributes.html +2 -0
  20. package/example/autosave.html +2 -0
  21. package/example/basic.html +2 -0
  22. package/example/ckeditor.html +2 -0
  23. package/example/clipboard.html +2 -0
  24. package/example/containers.html +2 -0
  25. package/example/elements.html +2 -0
  26. package/example/summernote.html +2 -0
  27. package/example/wrap_content.html +2 -0
  28. package/package.json +1 -1
  29. package/src/js/compat/bundled-texts.js +14 -0
  30. package/src/js/jquery.grideditor.js +68 -11
  31. package/src/js/plugins/grideditor.ckeditor.js +115 -0
  32. package/src/js/plugins/grideditor.summernote.js +93 -0
  33. package/src/js/plugins/grideditor.tinymce.js +157 -0
  34. package/src/js/jquery.grideditor.ckeditor.js +0 -77
  35. package/src/js/jquery.grideditor.summernote.js +0 -72
  36. package/src/js/jquery.grideditor.tinymce.js +0 -143
package/BUILDING.md CHANGED
@@ -21,6 +21,12 @@ of the main bundle: the `src/js/*.js` glob does not descend, so a page loads
21
21
  the languages and the container plugins it actually wants. See
22
22
  [docs/plugins.md](docs/plugins.md) for what a container plugin is.
23
23
 
24
+ The text editor plugins - tinyMCE, CKEditor and summernote - are built to
25
+ `dist/plugins/` like the others, and up to 6.0 also go into the main bundle,
26
+ followed by `src/js/compat/bundled-texts.js`, which marks them as the bundle's
27
+ copies so the editor can warn a page that relies on them. 6.0 drops both from
28
+ `jsFiles` in the Gruntfile.
29
+
24
30
  One more file comes out of it: `dist/jquery.grideditor.bundle.min.js`, the
25
31
  minified editor concatenated with the copy of SortableJS in `node_modules`,
26
32
  for pages that would rather load one file than two. It carries both MIT
package/CHANGELOG.md CHANGED
@@ -5,6 +5,31 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
 
8
+ ## [5.2.0] - 2026-09-23
9
+ ### Added
10
+ - **Text editors are plugins.** tinyMCE, CKEditor and summernote are
11
+ `dist/plugins/grideditor.{tinymce,ckeditor,summernote}.js`, registered under
12
+ `$.fn.gridEditor.texts`, with a contract a host can write its own editor to:
13
+ `start`, `stop`, `initialContent`, `available`, and `ge.textReady` in the
14
+ handle. They are chosen by `content_types`, not by the `plugins` setting.
15
+ See [docs/plugins.md](docs/plugins.md#text-editor-plugins).
16
+
17
+ ### Deprecated
18
+ - The copies of the three text editors in the main bundle. A page that edits
19
+ with one is told once to load the plugin; 6.0 leaves them out. See
20
+ [UPGRADING.md](UPGRADING.md).
21
+ - `$.fn.gridEditor.RTEs`: an integration registered there still works,
22
+ wrapped, with a warning. It goes in 7.0.
23
+
24
+ ### Fixed
25
+ - Closing a content area edited with CKEditor destroyed every CKEditor
26
+ instance on the page, other content areas' and the host's own included. It
27
+ destroys its own now.
28
+ - CKEditor and summernote went on to start with their library missing, after
29
+ saying it was; neither starts now, and a later click tries again.
30
+ - Summernote 0.9.1 could not open with jQuery 4, which removed the `$.now()`
31
+ it calls. Its plugin gives it back, only where it is missing.
32
+
8
33
  ## [5.1.2] - 2026-09-23
9
34
  ### Added
10
35
  - [example/attributes.html](example/attributes.html): a plugin of the page's
package/README.md CHANGED
@@ -44,9 +44,10 @@ Installation
44
44
  ------------
45
45
 
46
46
  * __Dependencies:__ Grid Editor depends on jQuery, [SortableJS](https://sortablejs.github.io/Sortable/), Bootstrap Icons, and Bootstrap 5, so make sure you have included those in the page.
47
- * If you want to use the tinyMCE integration, include tinyMCE 6 as well. The tinyMCE jQuery plugin is no longer needed, and no longer exists as of tinyMCE 6.
48
- * If you want to use the summernote integration, include summernote as well.
49
- * If you want to use the CKEditor integration... you get the point.
47
+ * If you want to use the tinyMCE integration, include tinyMCE 6 as well, and `dist/plugins/grideditor.tinymce.min.js` after the editor. The tinyMCE jQuery plugin is no longer needed, and no longer exists as of tinyMCE 6.
48
+ * If you want to use the summernote integration, include summernote and `dist/plugins/grideditor.summernote.min.js`.
49
+ * If you want to use the CKEditor integration... you get the point: CKEditor and `dist/plugins/grideditor.ckeditor.min.js`.
50
+ * Up to 5.x the main bundle still carries a copy of the three, so a page that does not load the plugin keeps working, and the console says, once, to load it. 6.0 leaves the copies out.
50
51
  * From npm:
51
52
 
52
53
  ```
@@ -60,6 +61,8 @@ npm install @themarioga/grid-editor
60
61
  <link rel="stylesheet" type="text/css" href="grid-editor/dist/grideditor.min.css" />
61
62
  <script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.6/Sortable.min.js"></script>
62
63
  <script src="grid-editor/dist/jquery.grideditor.min.js"></script>
64
+ <!-- The text editor you use, as a plugin -->
65
+ <script src="grid-editor/dist/plugins/grideditor.tinymce.min.js"></script>
63
66
  ```
64
67
 
65
68
  Or, for a page that would rather load one file, the editor with SortableJS
@@ -641,12 +644,18 @@ $('form.myForm').on('submit', function() {
641
644
 
642
645
  ### Rich text editor options
643
646
 
644
- Grid editor comes bundles with support for the following rich text editors (RTEs):
645
- * [TinyMCE](http://www.tinymce.com/) - [(example)](example/basic.html)
646
- * [summernote](http://summernote.org/) - [(example)](example/summernote.html)
647
- * [CKEditor](http://ckeditor.com/) - [(example)](example/ckeditor.html)
647
+ Grid editor comes with support for the following rich text editors (RTEs), each a plugin of its own to load after the editor:
648
+ * [TinyMCE](http://www.tinymce.com/) 6 - `dist/plugins/grideditor.tinymce.min.js` - [(example)](example/basic.html)
649
+ * [summernote](http://summernote.org/) 0.9 - `dist/plugins/grideditor.summernote.min.js` - [(example)](example/summernote.html)
650
+ * [CKEditor](http://ckeditor.com/) 4 - `dist/plugins/grideditor.ckeditor.min.js` - [(example)](example/ckeditor.html)
648
651
 
649
- __`content_types`:__ Specify the RTE to use. Valid values: `['tinymce']`, `['summernote']`, `['ckeditor']`. Default value: `['tinymce']`.
652
+ A text editor is chosen by `content_types`, not by the `plugins` setting: a page
653
+ that names its containers in `plugins` still has its editor. Summernote 0.9.1
654
+ calls `$.now()`, which jQuery 4 removed; its plugin gives it back, and only if
655
+ it is missing. [docs/plugins.md](docs/plugins.md#text-editor-plugins) says how
656
+ to write a plugin for another editor.
657
+
658
+ __`content_types`:__ Specify the RTE to use. Valid values: `['tinymce']`, `['summernote']`, `['ckeditor']`, or the name of a text editor plugin of your own. Default value: `['tinymce']`.
650
659
 
651
660
  ```javascript
652
661
  $('#myGrid').gridEditor({
package/UPGRADING.md CHANGED
@@ -1,3 +1,28 @@
1
+ Getting ready for grid-editor `6.*`, from `5.2`
2
+ ===============================================
3
+
4
+ Nothing here breaks in 5.x. It is what 6.0 will need, and 5.2 already
5
+ accepts, so a page can make the change at its own pace.
6
+
7
+ * __Load your text editor as a plugin.__ tinyMCE, CKEditor and summernote
8
+ are plugins in `dist/plugins/`, loaded after the editor:
9
+
10
+ ```html
11
+ <script src="grid-editor/dist/jquery.grideditor.min.js"></script>
12
+ <script src="grid-editor/dist/plugins/grideditor.tinymce.min.js"></script>
13
+ ```
14
+
15
+ Up to 5.x the main bundle, and the bundle with SortableJS, still carry a
16
+ copy of each, so a page that does not load the plugin keeps working. When a
17
+ content area is edited with one of those copies the console says so, once.
18
+ 6.0 leaves the copies out.
19
+
20
+ * __An integration of your own under `$.fn.gridEditor.RTEs`__ still works,
21
+ wrapped by the editor, with a warning that it is deprecated. Register it
22
+ under `$.fn.gridEditor.texts` instead; [docs/plugins.md](docs/plugins.md#text-editor-plugins)
23
+ has the contract. `RTEs` goes in 7.0.
24
+
25
+
1
26
  Upgrading from grid-editor `4.*` to `5.*`
2
27
  =========================================
3
28
 
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * grid-editor 5.1.2 bundled with SortableJS.
2
+ * grid-editor 5.2.0 bundled with SortableJS.
3
3
  *
4
4
  * grid-editor: MIT, https://github.com/themarioga/grid-editor
5
5
  * SortableJS: MIT, https://github.com/SortableJS/Sortable
6
6
  */
7
7
  /*! Sortable 1.15.6 - MIT | git://github.com/SortableJS/Sortable.git */
8
8
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function e(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)),o}function I(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?e(Object(i),!0).forEach(function(t){var e,n;e=o,t=i[n=t],n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(i,t))})}return o}function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,o=arguments[e];for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t}).apply(this,arguments)}function i(t,e){if(null==t)return{};var n,o=function(t,e){if(null==t)return{};for(var n,o={},i=Object.keys(t),r=0;r<i.length;r++)n=i[r],0<=e.indexOf(n)||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(t),r=0;r<i.length;r++)n=i[r],0<=e.indexOf(n)||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n]);return o}function r(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function t(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var y=t(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),w=t(/Edge/i),s=t(/firefox/i),u=t(/safari/i)&&!t(/chrome/i)&&!t(/android/i),c=t(/iP(ad|od|hone)/i),n=t(/chrome/i)&&t(/android/i),d={capture:!1,passive:!1};function h(t,e,n){t.addEventListener(e,n,!y&&d)}function p(t,e,n){t.removeEventListener(e,n,!y&&d)}function f(t,e){if(e&&(">"===e[0]&&(e=e.substring(1)),t))try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return}}function g(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function P(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"!==e[0]||t.parentNode===n)&&f(t,e)||o&&t===n)return t}while(t!==n&&(t=g(t)))}return null}var m,v=/\s+/g;function k(t,e,n){var o;t&&e&&(t.classList?t.classList[n?"add":"remove"](e):(o=(" "+t.className+" ").replace(v," ").replace(" "+e+" "," "),t.className=(o+(n?" "+e:"")).replace(v," ")))}function R(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];o[e=!(e in o||-1!==e.indexOf("webkit"))?"-webkit-"+e:e]=n+("string"==typeof n?"":"px")}}function b(t,e){var n="";if("string"==typeof t)n=t;else do{var o=R(t,"transform")}while(o&&"none"!==o&&(n=o+" "+n),!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function D(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function O(){var t=document.scrollingElement;return t||document.documentElement}function X(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,s,c,u,d=t!==window&&t.parentNode&&t!==O()?(a=(r=t.getBoundingClientRect()).top,l=r.left,s=r.bottom,c=r.right,u=r.height,r.width):(l=a=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,window.innerWidth);if((e||n)&&t!==window&&(i=i||t.parentNode,!y))do{if(i&&i.getBoundingClientRect&&("none"!==R(i,"transform")||n&&"static"!==R(i,"position"))){var h=i.getBoundingClientRect();a-=h.top+parseInt(R(i,"border-top-width")),l-=h.left+parseInt(R(i,"border-left-width")),s=a+r.height,c=l+r.width;break}}while(i=i.parentNode);return o&&t!==window&&(o=(e=b(i||t))&&e.a,t=e&&e.d,e&&(s=(a/=t)+(u/=t),c=(l/=o)+(d/=o))),{top:a,left:l,bottom:s,right:c,width:d,height:u}}}function Y(t,e,n){for(var o=M(t,!0),i=X(t)[e];o;){var r=X(o)[n];if(!("top"===n||"left"===n?r<=i:i<=r))return o;if(o===O())break;o=M(o,!1)}return!1}function B(t,e,n,o){for(var i=0,r=0,a=t.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==jt.ghost&&(o||a[r]!==jt.dragged)&&P(a[r],n.draggable,t,!1)){if(i===e)return a[r];i++}r++}return null}function F(t,e){for(var n=t.lastElementChild;n&&(n===jt.ghost||"none"===R(n,"display")||e&&!f(n,e));)n=n.previousElementSibling;return n||null}function j(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===jt.clone||e&&!f(t,e)||n++;return n}function E(t){var e=0,n=0,o=O();if(t)do{var i=b(t),r=i.a,i=i.d}while(e+=t.scrollLeft*r,n+=t.scrollTop*i,t!==o&&(t=t.parentNode));return[e,n]}function M(t,e){if(!t||!t.getBoundingClientRect)return O();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=R(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return O();if(o||e)return n;o=!0}}}while(n=n.parentNode);return O()}function S(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function _(e,n){return function(){var t;m||(1===(t=arguments).length?e.call(this,t[0]):e.apply(this,t),m=setTimeout(function(){m=void 0},n))}}function H(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function C(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function T(t,e){R(t,"position","absolute"),R(t,"top",e.top),R(t,"left",e.left),R(t,"width",e.width),R(t,"height",e.height)}function x(t){R(t,"position",""),R(t,"top",""),R(t,"left",""),R(t,"width",""),R(t,"height","")}function L(n,o,i){var r={};return Array.from(n.children).forEach(function(t){var e;P(t,o.draggable,n,!1)&&!t.animated&&t!==i&&(e=X(t),r.left=Math.min(null!==(t=r.left)&&void 0!==t?t:1/0,e.left),r.top=Math.min(null!==(t=r.top)&&void 0!==t?t:1/0,e.top),r.right=Math.max(null!==(t=r.right)&&void 0!==t?t:-1/0,e.right),r.bottom=Math.max(null!==(t=r.bottom)&&void 0!==t?t:-1/0,e.bottom))}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var K="Sortable"+(new Date).getTime();function A(){var e,o=[];return{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(t){var e,n;"none"!==R(t,"display")&&t!==jt.ghost&&(o.push({target:t,rect:X(t)}),e=I({},o[o.length-1].rect),!t.thisAnimationDuration||(n=b(t,!0))&&(e.top-=n.f,e.left-=n.e),t.fromRect=e)})},addAnimationState:function(t){o.push(t)},removeAnimationState:function(t){o.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(o,{target:t}),1)},animateAll:function(t){var c=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof t&&t());var u=!1,d=0;o.forEach(function(t){var e=0,n=t.target,o=n.fromRect,i=X(n),r=n.prevFromRect,a=n.prevToRect,l=t.rect,s=b(n,!0);s&&(i.top-=s.f,i.left-=s.e),n.toRect=i,n.thisAnimationDuration&&S(r,i)&&!S(o,i)&&(l.top-i.top)/(l.left-i.left)==(o.top-i.top)/(o.left-i.left)&&(t=l,s=r,r=a,a=c.options,e=Math.sqrt(Math.pow(s.top-t.top,2)+Math.pow(s.left-t.left,2))/Math.sqrt(Math.pow(s.top-r.top,2)+Math.pow(s.left-r.left,2))*a.animation),S(i,o)||(n.prevFromRect=o,n.prevToRect=i,e=e||c.options.animation,c.animate(n,l,i,e)),e&&(u=!0,d=Math.max(d,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},e),n.thisAnimationDuration=e)}),clearTimeout(e),u?e=setTimeout(function(){"function"==typeof t&&t()},d):"function"==typeof t&&t(),o=[]},animate:function(t,e,n,o){var i,r;o&&(R(t,"transition",""),R(t,"transform",""),i=(r=b(this.el))&&r.a,r=r&&r.d,i=(e.left-n.left)/(i||1),r=(e.top-n.top)/(r||1),t.animatingX=!!i,t.animatingY=!!r,R(t,"transform","translate3d("+i+"px,"+r+"px,0)"),this.forRepaintDummy=t.offsetWidth,R(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),R(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout(function(){R(t,"transition",""),R(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},o))}}}var N=[],W={initializeByDefault:!0},z={mount:function(e){for(var t in W)!W.hasOwnProperty(t)||t in e||(e[t]=W[t]);N.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),N.push(e)},pluginEvent:function(e,n,o){var t=this;this.eventCanceled=!1,o.cancel=function(){t.eventCanceled=!0};var i=e+"Global";N.forEach(function(t){n[t.pluginName]&&(n[t.pluginName][i]&&n[t.pluginName][i](I({sortable:n},o)),n.options[t.pluginName]&&n[t.pluginName][e]&&n[t.pluginName][e](I({sortable:n},o)))})},initializePlugins:function(n,o,i,t){for(var e in N.forEach(function(t){var e=t.pluginName;(n.options[e]||t.initializeByDefault)&&((t=new t(n,o,n.options)).sortable=n,t.options=n.options,n[e]=t,a(i,t.defaults))}),n.options){var r;n.options.hasOwnProperty(e)&&(void 0!==(r=this.modifyOption(n,e,n.options[e]))&&(n.options[e]=r))}},getEventProperties:function(e,n){var o={};return N.forEach(function(t){"function"==typeof t.eventProperties&&a(o,t.eventProperties.call(n[t.pluginName],e))}),o},modifyOption:function(e,n,o){var i;return N.forEach(function(t){e[t.pluginName]&&t.optionListeners&&"function"==typeof t.optionListeners[n]&&(i=t.optionListeners[n].call(e[t.pluginName],o))}),i}};function G(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,a=t.toEl,l=t.fromEl,s=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,h=t.originalEvent,p=t.putSortable,f=t.extraEventProperties;if(e=e||n&&n[K]){var g,m=e.options,t="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||y||w?(g=document.createEvent("Event")).initEvent(o,!0,!0):g=new CustomEvent(o,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=l||n,g.item=i||n,g.clone=r,g.oldIndex=s,g.newIndex=c,g.oldDraggableIndex=u,g.newDraggableIndex=d,g.originalEvent=h,g.pullMode=p?p.lastPutMode:void 0;var v,b=I(I({},f),z.getEventProperties(o,e));for(v in b)g[v]=b[v];n&&n.dispatchEvent(g),m[t]&&m[t].call(e,g)}}function U(t,e){var n=(o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).evt,o=i(o,q);z.pluginEvent.bind(jt)(t,e,I({dragEl:Z,parentEl:$,ghostEl:Q,rootEl:J,nextEl:tt,lastDownEl:et,cloneEl:nt,cloneHidden:ot,dragStarted:mt,putSortable:ct,activeSortable:jt.active,originalEvent:n,oldIndex:it,oldDraggableIndex:at,newIndex:rt,newDraggableIndex:lt,hideGhostForTarget:Xt,unhideGhostForTarget:Yt,cloneNowHidden:function(){ot=!0},cloneNowShown:function(){ot=!1},dispatchSortableEvent:function(t){V({sortable:e,name:t,originalEvent:n})}},o))}var q=["evt"];function V(t){G(I({putSortable:ct,cloneEl:nt,targetEl:Z,rootEl:J,oldIndex:it,oldDraggableIndex:at,newIndex:rt,newDraggableIndex:lt},t))}var Z,$,Q,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,pt,ft,gt,mt,vt,bt,yt,wt,Dt=!1,Et=!1,St=[],_t=!1,Ct=!1,Tt=[],xt=!1,Ot=[],Mt="undefined"!=typeof document,At=c,Nt=w||y?"cssFloat":"float",It=Mt&&!n&&!c&&"draggable"in document.createElement("div"),Pt=function(){if(Mt){if(y)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),kt=function(t,e){var n=R(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=B(t,0,e),r=B(t,1,e),a=i&&R(i),l=r&&R(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+X(i).width,t=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+X(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){e="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==e?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||o<=s&&"none"===n[Nt]||r&&"none"===n[Nt]&&o<s+t)?"vertical":"horizontal"},Rt=function(t){function l(r,a){return function(t,e,n,o){var i=t.options.group.name&&e.options.group.name&&t.options.group.name===e.options.group.name;if(null==r&&(a||i))return!0;if(null==r||!1===r)return!1;if(a&&"clone"===r)return r;if("function"==typeof r)return l(r(t,e,n,o),a)(t,e,n,o);e=(a?t:e).options.group.name;return!0===r||"string"==typeof r&&r===e||r.join&&-1<r.indexOf(e)}}var e={},n=t.group;n&&"object"==o(n)||(n={name:n}),e.name=n.name,e.checkPull=l(n.pull,!0),e.checkPut=l(n.put),e.revertClone=n.revertClone,t.group=e},Xt=function(){!Pt&&Q&&R(Q,"display","none")},Yt=function(){!Pt&&Q&&R(Q,"display","")};Mt&&!n&&document.addEventListener("click",function(t){if(Et)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Et=!1},!0);function Bt(t){if(Z){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,St.some(function(t){var e=t[K].options.emptyInsertThreshold;if(e&&!F(t)){var n=X(t),o=i>=n.left-e&&i<=n.right+e,e=r>=n.top-e&&r<=n.bottom+e;return o&&e?a=t:void 0}}),a);if(e){var n,o={};for(n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[K]._onDragOver(o)}}var i,r,a}function Ft(t){Z&&Z.parentNode[K]._isOutsideThisEl(t.target)}function jt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=a({},e),t[K]=this;var n,o,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return kt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==jt.supportPointer&&"PointerEvent"in window&&(!u||c),emptyInsertThreshold:5};for(n in z.initializePlugins(this,t,i),i)n in e||(e[n]=i[n]);for(o in Rt(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&It,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?h(t,"pointerdown",this._onTapStart):(h(t,"mousedown",this._onTapStart),h(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(h(t,"dragover",this),h(t,"dragenter",this)),St.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),a(this,A())}function Ht(t,e,n,o,i,r,a,l){var s,c,u=t[K],d=u.options.onMove;return!window.CustomEvent||y||w?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||X(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),c=d?d.call(u,s,a):c}function Lt(t){t.draggable=!1}function Kt(){xt=!1}function Wt(t){return setTimeout(t,0)}function zt(t){return clearTimeout(t)}jt.prototype={constructor:jt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(vt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,o=this.el,t=this.options,i=t.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=t.filter;if(!function(t){Ot.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Ot.push(o)}}(o),!Z&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||t.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!u||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=P(l,t.draggable,o,!1))&&l.animated||et===l)){if(it=j(l),at=j(l,t.draggable),"function"==typeof c){if(c.call(this,e,l,this))return V({sortable:n,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),U("filter",n,{evt:e}),void(i&&e.preventDefault())}else if(c=c&&c.split(",").some(function(t){if(t=P(s,t.trim(),o,!1))return V({sortable:n,rootEl:t,name:"filter",targetEl:l,fromEl:o,toEl:o}),U("filter",n,{evt:e}),!0}))return void(i&&e.preventDefault());t.handle&&!P(s,t.handle,o,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;n&&!Z&&n.parentNode===r&&(o=X(n),J=r,$=(Z=n).parentNode,tt=Z.nextSibling,et=n,st=a.group,ut={target:jt.dragged=Z,clientX:(e||t).clientX,clientY:(e||t).clientY},ft=ut.clientX-o.left,gt=ut.clientY-o.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Z.style["will-change"]="all",o=function(){U("delayEnded",i,{evt:t}),jt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!s&&i.nativeDraggable&&(Z.draggable=!0),i._triggerDragStart(t,e),V({sortable:i,name:"choose",originalEvent:t}),k(Z,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){D(Z,t.trim(),Lt)}),h(l,"dragover",Bt),h(l,"mousemove",Bt),h(l,"touchmove",Bt),a.supportPointer?(h(l,"pointerup",i._onDrop),this.nativeDraggable||h(l,"pointercancel",i._onDrop)):(h(l,"mouseup",i._onDrop),h(l,"touchend",i._onDrop),h(l,"touchcancel",i._onDrop)),s&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),U("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(w||y)?o():jt.eventCanceled?this._onDrop():(a.supportPointer?(h(l,"pointerup",i._disableDelayedDrag),h(l,"pointercancel",i._disableDelayedDrag)):(h(l,"mouseup",i._disableDelayedDrag),h(l,"touchend",i._disableDelayedDrag),h(l,"touchcancel",i._disableDelayedDrag)),h(l,"mousemove",i._delayedDragTouchMoveHandler),h(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&h(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)))},_delayedDragTouchMoveHandler:function(t){t=t.touches?t.touches[0]:t;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&Lt(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;p(t,"mouseup",this._disableDelayedDrag),p(t,"touchend",this._disableDelayedDrag),p(t,"touchcancel",this._disableDelayedDrag),p(t,"pointerup",this._disableDelayedDrag),p(t,"pointercancel",this._disableDelayedDrag),p(t,"mousemove",this._delayedDragTouchMoveHandler),p(t,"touchmove",this._delayedDragTouchMoveHandler),p(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?h(document,"pointermove",this._onTouchMove):h(document,e?"touchmove":"mousemove",this._onTouchMove):(h(Z,"dragend",this),h(J,"dragstart",this._onDragStart));try{document.selection?Wt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){var n;Dt=!1,J&&Z?(U("dragStarted",this,{evt:e}),this.nativeDraggable&&h(document,"dragover",Ft),n=this.options,t||k(Z,n.dragClass,!1),k(Z,n.ghostClass,!0),jt.active=this,t&&this._appendGhost(),V({sortable:this,name:"start",originalEvent:e})):this._nulling()},_emulateDragOver:function(){if(dt){this._lastX=dt.clientX,this._lastY=dt.clientY,Xt();for(var t=document.elementFromPoint(dt.clientX,dt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(dt.clientX,dt.clientY))!==e;)e=t;if(Z.parentNode[K]._isOutsideThisEl(t),e)do{if(e[K])if(e[K]._onDragOver({clientX:dt.clientX,clientY:dt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}while(e=g(t=e));Yt()}},_onTouchMove:function(t){if(ut){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=Q&&b(Q,!0),a=Q&&r&&r.a,l=Q&&r&&r.d,e=At&&wt&&E(wt),a=(i.clientX-ut.clientX+o.x)/(a||1)+(e?e[0]-Tt[0]:0)/(a||1),l=(i.clientY-ut.clientY+o.y)/(l||1)+(e?e[1]-Tt[1]:0)/(l||1);if(!jt.active&&!Dt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}Q&&(r?(r.e+=a-(ht||0),r.f+=l-(pt||0)):r={a:1,b:0,c:0,d:1,e:a,f:l},r="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")"),R(Q,"webkitTransform",r),R(Q,"mozTransform",r),R(Q,"msTransform",r),R(Q,"transform",r),ht=a,pt=l,dt=i),t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Q){var t=this.options.fallbackOnBody?document.body:J,e=X(Z,!0,At,!0,t),n=this.options;if(At){for(wt=t;"static"===R(wt,"position")&&"none"===R(wt,"transform")&&wt!==document;)wt=wt.parentNode;wt!==document.body&&wt!==document.documentElement?(wt===document&&(wt=O()),e.top+=wt.scrollTop,e.left+=wt.scrollLeft):wt=O(),Tt=E(wt)}k(Q=Z.cloneNode(!0),n.ghostClass,!1),k(Q,n.fallbackClass,!0),k(Q,n.dragClass,!0),R(Q,"transition",""),R(Q,"transform",""),R(Q,"box-sizing","border-box"),R(Q,"margin",0),R(Q,"top",e.top),R(Q,"left",e.left),R(Q,"width",e.width),R(Q,"height",e.height),R(Q,"opacity","0.8"),R(Q,"position",At?"absolute":"fixed"),R(Q,"zIndex","100000"),R(Q,"pointerEvents","none"),jt.ghost=Q,t.appendChild(Q),R(Q,"transform-origin",ft/parseInt(Q.style.width)*100+"% "+gt/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;U("dragStart",this,{evt:t}),jt.eventCanceled?this._onDrop():(U("setupClone",this),jt.eventCanceled||((nt=C(Z)).removeAttribute("id"),nt.draggable=!1,nt.style["will-change"]="",this._hideClone(),k(nt,this.options.chosenClass,!1),jt.clone=nt),n.cloneId=Wt(function(){U("clone",n),jt.eventCanceled||(n.options.removeCloneOnHide||J.insertBefore(nt,Z),n._hideClone(),V({sortable:n,name:"clone"}))}),e||k(Z,i.dragClass,!0),e?(Et=!0,n._loopId=setInterval(n._emulateDragOver,50)):(p(document,"mouseup",n._onDrop),p(document,"touchend",n._onDrop),p(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,Z)),h(document,"drop",n),R(Z,"transform","translateZ(0)")),Dt=!0,n._dragStartId=Wt(n._dragStarted.bind(n,e,t)),h(document,"selectstart",n),mt=!0,window.getSelection().removeAllRanges(),u&&R(document.body,"user-select","none"))},_onDragOver:function(n){var o,i,r,t,e,a=this.el,l=n.target,s=this.options,c=s.group,u=jt.active,d=st===c,h=s.sort,p=ct||u,f=this,g=!1;if(!xt){if(void 0!==n.preventDefault&&n.cancelable&&n.preventDefault(),l=P(l,s.draggable,a,!0),O("dragOver"),jt.eventCanceled)return g;if(Z.contains(n.target)||l.animated&&l.animatingX&&l.animatingY||f._ignoreWhileAnimating===l)return A(!1);if(Et=!1,u&&!s.disabled&&(d?h||(i=$!==J):ct===this||(this.lastPutMode=st.checkPull(this,u,Z,n))&&c.checkPut(this,u,Z,n))){if(r="vertical"===this._getDirection(n,l),o=X(Z),O("dragOverValid"),jt.eventCanceled)return g;if(i)return $=J,M(),this._hideClone(),O("revert"),jt.eventCanceled||(tt?J.insertBefore(Z,tt):J.appendChild(Z)),A(!0);var m=F(a,s.draggable);if(m&&(S=n,c=r,x=X(F((E=this).el,E.options.draggable)),E=L(E.el,E.options,Q),!(c?S.clientX>E.right+10||S.clientY>x.bottom&&S.clientX>x.left:S.clientY>E.bottom+10||S.clientX>x.right&&S.clientY>x.top)||m.animated)){if(m&&(t=n,e=r,C=X(B((_=this).el,0,_.options,!0)),_=L(_.el,_.options,Q),e?t.clientX<_.left-10||t.clientY<C.top&&t.clientX<C.right:t.clientY<_.top-10||t.clientY<C.bottom&&t.clientX<C.left)){var v=B(a,0,s,!0);if(v===Z)return A(!1);if(D=X(l=v),!1!==Ht(J,a,Z,o,l,D,n,!1))return M(),a.insertBefore(Z,v),$=a,N(),A(!0)}else if(l.parentNode===a){var b,y,w,D=X(l),E=Z.parentNode!==a,S=(S=Z.animated&&Z.toRect||o,x=l.animated&&l.toRect||D,_=(e=r)?S.left:S.top,t=e?S.right:S.bottom,C=e?S.width:S.height,v=e?x.left:x.top,S=e?x.right:x.bottom,x=e?x.width:x.height,!(_===v||t===S||_+C/2===v+x/2)),_=r?"top":"left",C=Y(l,"top","top")||Y(Z,"top","top"),v=C?C.scrollTop:void 0;if(vt!==l&&(y=D[_],_t=!1,Ct=!S&&s.invertSwap||E),0!==(b=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,t=o?n.top:n.left,o=o?n.bottom:n.right,n=!1;if(!a)if(l&&yt<c*i){if(_t=!_t&&(1===bt?t+c*r/2<s:s<o-c*r/2)?!0:_t)n=!0;else if(1===bt?s<t+yt:o-yt<s)return-bt}else if(t+c*(1-i)/2<s&&s<o-c*(1-i)/2)return function(t){return j(Z)<j(t)?1:-1}(e);if((n=n||a)&&(s<t+c*r/2||o-c*r/2<s))return t+c/2<s?1:-1;return 0}(n,l,D,r,S?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Ct,vt===l)))for(var T=j(Z);(w=$.children[T-=b])&&("none"===R(w,"display")||w===Q););if(0===b||w===l)return A(!1);bt=b;var x=(vt=l).nextElementSibling,E=!1,S=Ht(J,a,Z,o,l,D,n,E=1===b);if(!1!==S)return 1!==S&&-1!==S||(E=1===S),xt=!0,setTimeout(Kt,30),M(),E&&!x?a.appendChild(Z):l.parentNode.insertBefore(Z,E?x:l),C&&H(C,0,v-C.scrollTop),$=Z.parentNode,void 0===y||Ct||(yt=Math.abs(y-X(l)[_])),N(),A(!0)}}else{if(m===Z)return A(!1);if((l=m&&a===n.target?m:l)&&(D=X(l)),!1!==Ht(J,a,Z,o,l,D,n,!!l))return M(),m&&m.nextSibling?a.insertBefore(Z,m.nextSibling):a.appendChild(Z),$=a,N(),A(!0)}if(a.contains(Z))return A(!1)}return!1}function O(t,e){U(t,f,I({evt:n,isOwner:d,axis:r?"vertical":"horizontal",revert:i,dragRect:o,targetRect:D,canSort:h,fromSortable:p,target:l,completed:A,onMove:function(t,e){return Ht(J,a,Z,o,t,X(t),n,e)},changed:N},e))}function M(){O("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function A(t){return O("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(f),f!==p&&(k(Z,(ct||u).options.ghostClass,!1),k(Z,s.ghostClass,!0)),ct!==f&&f!==jt.active?ct=f:f===jt.active&&ct&&(ct=null),p===f&&(f._ignoreWhileAnimating=l),f.animateAll(function(){O("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(l===Z&&!Z.animated||l===a&&!l.animated)&&(vt=null),s.dragoverBubble||n.rootEl||l===document||(Z.parentNode[K]._isOutsideThisEl(n.target),t||Bt(n)),!s.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),g=!0}function N(){rt=j(Z),lt=j(Z,s.draggable),V({sortable:f,name:"change",toEl:a,newIndex:rt,newDraggableIndex:lt,originalEvent:n})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){p(document,"mousemove",this._onTouchMove),p(document,"touchmove",this._onTouchMove),p(document,"pointermove",this._onTouchMove),p(document,"dragover",Bt),p(document,"mousemove",Bt),p(document,"touchmove",Bt)},_offUpEvents:function(){var t=this.el.ownerDocument;p(t,"mouseup",this._onDrop),p(t,"touchend",this._onDrop),p(t,"pointerup",this._onDrop),p(t,"pointercancel",this._onDrop),p(t,"touchcancel",this._onDrop),p(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;rt=j(Z),lt=j(Z,n.draggable),U("drop",this,{evt:t}),$=Z&&Z.parentNode,rt=j(Z),lt=j(Z,n.draggable),jt.eventCanceled||(_t=Ct=Dt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),zt(this.cloneId),zt(this._dragStartId),this.nativeDraggable&&(p(document,"drop",this),p(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),u&&R(document.body,"user-select",""),R(Z,"transform",""),t&&(mt&&(t.cancelable&&t.preventDefault(),n.dropBubble||t.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(J===$||ct&&"clone"!==ct.lastPutMode)&&nt&&nt.parentNode&&nt.parentNode.removeChild(nt),Z&&(this.nativeDraggable&&p(Z,"dragend",this),Lt(Z),Z.style["will-change"]="",mt&&!Dt&&k(Z,(ct||this).options.ghostClass,!1),k(Z,this.options.chosenClass,!1),V({sortable:this,name:"unchoose",toEl:$,newIndex:null,newDraggableIndex:null,originalEvent:t}),J!==$?(0<=rt&&(V({rootEl:$,name:"add",toEl:$,fromEl:J,originalEvent:t}),V({sortable:this,name:"remove",toEl:$,originalEvent:t}),V({rootEl:$,name:"sort",toEl:$,fromEl:J,originalEvent:t}),V({sortable:this,name:"sort",toEl:$,originalEvent:t})),ct&&ct.save()):rt!==it&&0<=rt&&(V({sortable:this,name:"update",toEl:$,originalEvent:t}),V({sortable:this,name:"sort",toEl:$,originalEvent:t})),jt.active&&(null!=rt&&-1!==rt||(rt=it,lt=at),V({sortable:this,name:"end",toEl:$,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){U("nulling",this),J=Z=$=Q=tt=nt=et=ot=ut=dt=mt=rt=lt=it=at=vt=bt=ct=st=jt.dragged=jt.ghost=jt.clone=jt.active=null,Ot.forEach(function(t){t.checked=!0}),Ot.length=ht=pt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Z&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)P(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||function(t){var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;for(;n--;)o+=e.charCodeAt(n);return o.toString(36)}(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach(function(t,e){e=o.children[e];P(e,this.options.draggable,o,!1)&&(n[t]=e)},this),e&&this.captureAnimationState(),t.forEach(function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return P(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=z.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Rt(n)},destroy:function(){U("destroy",this);var t=this.el;t[K]=null,p(t,"mousedown",this._onTapStart),p(t,"touchstart",this._onTapStart),p(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(p(t,"dragover",this),p(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),St.splice(St.indexOf(this.el),1),this.el=t=null},_hideClone:function(){ot||(U("hideClone",this),jt.eventCanceled||(R(nt,"display","none"),this.options.removeCloneOnHide&&nt.parentNode&&nt.parentNode.removeChild(nt),ot=!0))},_showClone:function(t){"clone"===t.lastPutMode?ot&&(U("showClone",this),jt.eventCanceled||(Z.parentNode!=J||this.options.group.revertClone?tt?J.insertBefore(nt,tt):J.appendChild(nt):J.insertBefore(nt,Z),this.options.group.revertClone&&this.animate(Z,nt),R(nt,"display",""),ot=!1)):this._hideClone()}},Mt&&h(document,"touchmove",function(t){(jt.active||Dt)&&t.cancelable&&t.preventDefault()}),jt.utils={on:h,off:p,css:R,find:D,is:function(t,e){return!!P(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:_,closest:P,toggleClass:k,clone:C,index:j,nextTick:Wt,cancelNextTick:zt,detectDirection:kt,getChild:B,expando:K},jt.get=function(t){return t[K]},jt.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];(e=e[0].constructor===Array?e[0]:e).forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(jt.utils=I(I({},jt.utils),t.utils)),z.mount(t)})},jt.create=function(t,e){return new jt(t,e)};var Gt,Ut,qt,Vt,Zt,$t,Qt=[],Jt=!(jt.version="1.15.6");function te(){Qt.forEach(function(t){clearInterval(t.pid)}),Qt=[]}function ee(){clearInterval($t)}var ne,oe=_(function(n,t,e,o){if(t.scroll){var i,r=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=O(),u=!1;Ut!==e&&(Ut=e,te(),Gt=t.scroll,i=t.scrollFn,!0===Gt&&(Gt=M(e,!0)));var d=0,h=Gt;do{var p=h,f=X(p),g=f.top,m=f.bottom,v=f.left,b=f.right,y=f.width,w=f.height,D=void 0,E=void 0,S=p.scrollWidth,_=p.scrollHeight,C=R(p),T=p.scrollLeft,f=p.scrollTop,E=p===c?(D=y<S&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),w<_&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(D=y<S&&("auto"===C.overflowX||"scroll"===C.overflowX),w<_&&("auto"===C.overflowY||"scroll"===C.overflowY)),T=D&&(Math.abs(b-r)<=l&&T+y<S)-(Math.abs(v-r)<=l&&!!T),f=E&&(Math.abs(m-a)<=l&&f+w<_)-(Math.abs(g-a)<=l&&!!f);if(!Qt[d])for(var x=0;x<=d;x++)Qt[x]||(Qt[x]={});Qt[d].vx==T&&Qt[d].vy==f&&Qt[d].el===p||(Qt[d].el=p,Qt[d].vx=T,Qt[d].vy=f,clearInterval(Qt[d].pid),0==T&&0==f||(u=!0,Qt[d].pid=setInterval(function(){o&&0===this.layer&&jt.active._onTouchMove(Zt);var t=Qt[this.layer].vy?Qt[this.layer].vy*s:0,e=Qt[this.layer].vx?Qt[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(jt.dragged.parentNode[K],e,t,n,Zt,Qt[this.layer].el)||H(Qt[this.layer].el,e,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==c&&(h=M(h,!1)));Jt=u}},30),n=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,t=t.unhideGhostForTarget;e&&(i=n||i,a(),e=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,e=document.elementFromPoint(e.clientX,e.clientY),t(),i&&!i.el.contains(e)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n})))};function ie(){}function re(){}ie.prototype={startIndex:null,dragStart:function(t){t=t.oldDraggableIndex;this.startIndex=t},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();t=B(this.sortable.el,this.startIndex,this.options);t?this.sortable.el.insertBefore(e,t):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:n},a(ie,{pluginName:"revertOnSpill"}),re.prototype={onSpill:function(t){var e=t.dragEl,t=t.putSortable||this.sortable;t.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),t.animateAll()},drop:n},a(re,{pluginName:"removeOnSpill"});var ae,le,se,ce,ue,de=[],he=[],pe=!1,fe=!1,ge=!1;function me(n,o){he.forEach(function(t,e){e=o.children[t.sortableIndex+(n?Number(e):0)];e?o.insertBefore(t,e):o.appendChild(t)})}function ve(){de.forEach(function(t){t!==se&&t.parentNode&&t.parentNode.removeChild(t)})}return jt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){t=t.originalEvent;this.sortable.nativeDraggable?h(document,"dragover",this._handleAutoScroll):this.options.supportPointer?h(document,"pointermove",this._handleFallbackAutoScroll):t.touches?h(document,"touchmove",this._handleFallbackAutoScroll):h(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){t=t.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?p(document,"dragover",this._handleAutoScroll):(p(document,"pointermove",this._handleFallbackAutoScroll),p(document,"touchmove",this._handleFallbackAutoScroll),p(document,"mousemove",this._handleFallbackAutoScroll)),ee(),te(),clearTimeout(m),m=void 0},nulling:function(){Zt=Ut=Gt=Jt=$t=qt=Vt=null,Qt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(e,n){var o,i=this,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,t=document.elementFromPoint(r,a);Zt=e,n||this.options.forceAutoScrollFallback||w||y||u?(oe(e,this.options,t,n),o=M(t,!0),!Jt||$t&&r===qt&&a===Vt||($t&&ee(),$t=setInterval(function(){var t=M(document.elementFromPoint(r,a),!0);t!==o&&(o=t,te()),oe(e,i.options,t,n)},10),qt=r,Vt=a)):this.options.bubbleScroll&&M(t,!0)!==O()?oe(e,this.options,M(t,!1),!1):te()}},a(t,{pluginName:"scroll",initializeByDefault:!0})}),jt.mount(re,ie),jt.mount(new function(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){t=t.dragEl;ne=t},dragOverValid:function(t){var e=t.completed,n=t.target,o=t.onMove,i=t.activeSortable,r=t.changed,a=t.cancel;i.options.swap&&(t=this.sortable.el,i=this.options,n&&n!==t&&(t=ne,ne=!1!==o(n)?(k(n,i.swapClass,!0),n):null,t&&t!==ne&&k(t,i.swapClass,!1)),r(),e(!0),a())},drop:function(t){var e,n,o=t.activeSortable,i=t.putSortable,r=t.dragEl,a=i||this.sortable,l=this.options;ne&&k(ne,l.swapClass,!1),ne&&(l.swap||i&&i.options.swap)&&r!==ne&&(a.captureAnimationState(),a!==o&&o.captureAnimationState(),n=ne,t=(e=r).parentNode,l=n.parentNode,t&&l&&!t.isEqualNode(n)&&!l.isEqualNode(e)&&(i=j(e),r=j(n),t.isEqualNode(l)&&i<r&&r++,t.insertBefore(n,t.children[i]),l.insertBefore(e,l.children[r])),a.animateAll(),a!==o&&o.animateAll())},nulling:function(){ne=null}},a(t,{pluginName:"swap",eventProperties:function(){return{swapItem:ne}}})}),jt.mount(new function(){function t(o){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));o.options.avoidImplicitDeselect||(o.options.supportPointer?h(document,"pointerup",this._deselectMultiDrag):(h(document,"mouseup",this._deselectMultiDrag),h(document,"touchend",this._deselectMultiDrag))),h(document,"keydown",this._checkKeyDown),h(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,e){var n="";de.length&&le===o?de.forEach(function(t,e){n+=(e?", ":"")+t.textContent}):n=e.textContent,t.setData("Text",n)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){t=t.dragEl;se=t},delayEnded:function(){this.isMultiDrag=~de.indexOf(se)},setupClone:function(t){var e=t.sortable,t=t.cancel;if(this.isMultiDrag){for(var n=0;n<de.length;n++)he.push(C(de[n])),he[n].sortableIndex=de[n].sortableIndex,he[n].draggable=!1,he[n].style["will-change"]="",k(he[n],this.options.selectedClass,!1),de[n]===se&&k(he[n],this.options.chosenClass,!1);e._hideClone(),t()}},clone:function(t){var e=t.sortable,n=t.rootEl,o=t.dispatchSortableEvent,t=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||de.length&&le===e&&(me(!0,n),o("clone"),t()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,t=t.cancel;this.isMultiDrag&&(me(!1,n),he.forEach(function(t){R(t,"display","")}),e(),ue=!1,t())},hideClone:function(t){var e=this,n=(t.sortable,t.cloneNowHidden),t=t.cancel;this.isMultiDrag&&(he.forEach(function(t){R(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)}),n(),ue=!0,t())},dragStartGlobal:function(t){t.sortable;!this.isMultiDrag&&le&&le.multiDrag._deselectMultiDrag(),de.forEach(function(t){t.sortableIndex=j(t)}),de=de.sort(function(t,e){return t.sortableIndex-e.sortableIndex}),ge=!0},dragStarted:function(t){var e,n=this,t=t.sortable;this.isMultiDrag&&(this.options.sort&&(t.captureAnimationState(),this.options.animation&&(de.forEach(function(t){t!==se&&R(t,"position","absolute")}),e=X(se,!1,!0,!0),de.forEach(function(t){t!==se&&T(t,e)}),pe=fe=!0)),t.animateAll(function(){pe=fe=!1,n.options.animation&&de.forEach(function(t){x(t)}),n.options.sort&&ve()}))},dragOver:function(t){var e=t.target,n=t.completed,t=t.cancel;fe&&~de.indexOf(e)&&(n(!1),t())},revert:function(t){var n,o,e=t.fromSortable,i=t.rootEl,r=t.sortable,a=t.dragRect;1<de.length&&(de.forEach(function(t){r.addAnimationState({target:t,rect:fe?X(t):a}),x(t),t.fromRect=a,e.removeAnimationState(t)}),fe=!1,n=!this.options.removeCloneOnHide,o=i,de.forEach(function(t,e){e=o.children[t.sortableIndex+(n?Number(e):0)];e?o.insertBefore(t,e):o.appendChild(t)}))},dragOverCompleted:function(t){var e,n=t.sortable,o=t.isOwner,i=t.insertion,r=t.activeSortable,a=t.parentEl,l=t.putSortable,t=this.options;i&&(o&&r._hideClone(),pe=!1,t.animation&&1<de.length&&(fe||!o&&!r.options.sort&&!l)&&(e=X(se,!1,!0,!0),de.forEach(function(t){t!==se&&(T(t,e),a.appendChild(t))}),fe=!0),o||(fe||ve(),1<de.length?(o=ue,r._showClone(n),r.options.animation&&!ue&&o&&he.forEach(function(t){r.addAnimationState({target:t,rect:ce}),t.fromRect=ce,t.thisAnimationDuration=null})):r._showClone(n)))},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,t=t.activeSortable;de.forEach(function(t){t.thisAnimationDuration=null}),t.options.animation&&!n&&t.multiDrag.isMultiDrag&&(ce=a({},e),e=b(se,!0),ce.top-=e.f,ce.left-=e.e)},dragOverAnimationComplete:function(){fe&&(fe=!1,ve())},drop:function(t){var o,i,r,a,n,e,l,s=t.originalEvent,c=t.rootEl,u=t.parentEl,d=t.sortable,h=t.dispatchSortableEvent,p=t.oldIndex,t=t.putSortable,f=t||this.sortable;s&&(o=this.options,i=u.children,ge||(o.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),k(se,o.selectedClass,!~de.indexOf(se)),~de.indexOf(se)?(de.splice(de.indexOf(se),1),ae=null,G({sortable:d,rootEl:c,name:"deselect",targetEl:se,originalEvent:s})):(de.push(se),G({sortable:d,rootEl:c,name:"select",targetEl:se,originalEvent:s}),s.shiftKey&&ae&&d.el.contains(ae)?(r=j(ae),a=j(se),~r&&~a&&r!==a&&function(){for(var e,t=r<a?(e=r,a):(e=a,r+1),n=o.filter;e<t;e++)~de.indexOf(i[e])||P(i[e],o.draggable,u,!1)&&(n&&("function"==typeof n?n.call(d,s,i[e],d):n.split(",").some(function(t){return P(i[e],t.trim(),u,!1)}))||(k(i[e],o.selectedClass,!0),de.push(i[e]),G({sortable:d,rootEl:c,name:"select",targetEl:i[e],originalEvent:s})))}()):ae=se,le=f)),ge&&this.isMultiDrag&&(fe=!1,(u[K].options.sort||u!==c)&&1<de.length&&(n=X(se),e=j(se,":not(."+this.options.selectedClass+")"),!pe&&o.animation&&(se.thisAnimationDuration=null),f.captureAnimationState(),pe||(o.animation&&(se.fromRect=n,de.forEach(function(t){var e;t.thisAnimationDuration=null,t!==se&&(e=fe?X(t):n,t.fromRect=e,f.addAnimationState({target:t,rect:e}))})),ve(),de.forEach(function(t){i[e]?u.insertBefore(t,i[e]):u.appendChild(t),e++}),p===j(se)&&(l=!1,de.forEach(function(t){t.sortableIndex!==j(t)&&(l=!0)}),l&&(h("update"),h("sort")))),de.forEach(function(t){x(t)}),f.animateAll()),le=f),(c===u||t&&"clone"!==t.lastPutMode)&&he.forEach(function(t){t.parentNode&&t.parentNode.removeChild(t)}))},nullingGlobal:function(){this.isMultiDrag=ge=!1,he.length=0},destroyGlobal:function(){this._deselectMultiDrag(),p(document,"pointerup",this._deselectMultiDrag),p(document,"mouseup",this._deselectMultiDrag),p(document,"touchend",this._deselectMultiDrag),p(document,"keydown",this._checkKeyDown),p(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==ge&&ge||le!==this.sortable||t&&P(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;de.length;){var e=de[0];k(e,this.options.selectedClass,!1),de.shift(),G({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},a(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[K];e&&e.options.multiDrag&&!~de.indexOf(t)&&(le&&le!==e&&(le.multiDrag._deselectMultiDrag(),le=e),k(t,e.options.selectedClass,!0),de.push(t))},deselect:function(t){var e=t.parentNode[K],n=de.indexOf(t);e&&e.options.multiDrag&&~n&&(k(t,e.options.selectedClass,!1),de.splice(n,1))}},eventProperties:function(){var n=this,o=[],i=[];return de.forEach(function(t){var e;o.push({multiDragElement:t,index:t.sortableIndex}),e=fe&&t!==se?-1:fe?j(t,":not(."+n.options.selectedClass+")"):j(t),i.push({multiDragElement:t,index:e})}),{items:r(de),clones:[].concat(he),oldIndicies:o,newIndicies:i}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":1<t.length&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}),jt});
9
- (Jt=>{var Ht={getHtml:{value:!0,noInstance:function(e){return e.html()}},getPlainHtml:{value:!0,noInstance:function(e){return gn(e.html())}},init:{},deinit:{},reset:{},destroy:{},remove:{},changeView:{},getView:{value:!0},createRow:{value:!0},createColumn:{value:!0},createElement:{value:!0},createSection:{value:!0},createContainer:{value:!0},addTab:{value:!0},addAccordionItem:{value:!0},setLocale:{},getUtility:{value:!0},setUtility:{value:!0}},Wt=["appendTo","prependTo","insertAfter","insertBefore"],Xt=[{key:"xs",infix:"",colPrefix:"col-",offsetPrefix:"offset-",min:0,preview:400,labelKey:"view.xs"},{key:"sm",infix:"sm",colPrefix:"col-sm-",offsetPrefix:"offset-sm-",min:576,preview:576,labelKey:"view.sm"},{key:"md",infix:"md",colPrefix:"col-md-",offsetPrefix:"offset-md-",min:768,preview:768,labelKey:"view.md"},{key:"lg",infix:"lg",colPrefix:"col-lg-",offsetPrefix:"offset-lg-",min:992,preview:992,labelKey:"view.lg"},{key:"xl",infix:"xl",colPrefix:"col-xl-",offsetPrefix:"offset-xl-",min:1200,preview:1200,labelKey:"view.xl"},{key:"xxl",infix:"xxl",colPrefix:"col-xxl-",offsetPrefix:"offset-xxl-",min:1400,preview:null,labelKey:"view.xxl"}],$t="all",t="view.all",Yt=[$t].concat(Xt.map(function(e){return e.key})),Qt=["lg","sm","xs"],Gt=12,Zt=["equal","auto"],en=["1","2","3","4","5","6","auto"];function tn(e,t){return"row-cols"+(e.infix?"-"+e.infix:"")+"-"+t}function nn(e){return"number"==typeof e}function on(e,t){return"equal"===t?e.infix?"col-"+e.infix:"col":e.colPrefix+t}function an(e){for(var t=0;t<Xt.length;t++)if(Xt[t].key===e)return Xt[t];return null}function rn(e){return e===$t?[Xt[0]]:(e=an(e))?[e]:[]}function ln(e){e=an(e);return e?e.labelKey:t}var sn={add_column:{size:12,picker:!0,delay:600},elements:{enabled:"auto",selector:"[data-ge-element]",auto:!1},resize:{enabled:!0,handles:"e",balance:"next"},drag:{delay:0,touch_delay:100,threshold:3,animation:150,scroll:!0}},cn={sortable_options:"drag",resizable_options:"resize"},n={},un=0;function dn(e,t,n){var o=Jt.fn.gridEditor.locales,i=o[e.locale]||{},e=(e.locale_strings||{})[t];return void 0===(e=void 0===(e=void 0===e?i[t]:e)?o.en[t]:e)&&(r("locale:"+t,'no string for "'+t+'" in any locale, showing the key'),e=t),e.replace(/\{(\w+)\}/g,function(e,t){return n&&void 0!==n[t]?n[t]:e})}function fn(e){window.console&&window.console.warn&&window.console.warn("grid-editor: "+e)}function r(e,t){n[e]||(n[e]=!0,fn(t))}function gn(e){var t=Jt(document.implementation.createHTMLDocument("").body),i=(t[0].innerHTML=e,[]);return t.find("*").each(function(){var n=Jt(this),o=!1,e=(Jt.each(Jt.makeArray(this.attributes),function(e,t){0===t.name.indexOf("data-ge-")&&(n.removeAttr(t.name),o=!0)}),(n.attr("class")||"").split(/\s+/).filter(Boolean)),t=e.filter(function(e){return"column"!==e&&0!==e.indexOf("ge-")});t.length!==e.length&&(o=!0),t.length?n.attr("class",t.join(" ")):n.removeAttr("class"),o&&"DIV"===this.tagName&&!this.attributes.length&&i.push(this)}),i.forEach(function(e){Jt(e).replaceWith(Jt(e).contents())}),t[0].innerHTML}Jt.fn.gridEditor=function(Ft){if("string"!=typeof Ft)return this.each(function(R,e){e=Jt(e);var i,a,K,N,q,r,d=Jt.extend({new_row_layouts:[[12],[6,6],[4,4,4],[3,3,3,3],[2,2,2,2,2,2],[2,8,2],[4,8],[8,4]],row_classes:[],col_classes:[],col_tools:[],row_tools:[],drag_handle:"tool",toolbar_drag:"auto",element_tools:[],element_classes:[],container_classes:[],pane_classes:[],container_tools:[],tab_tools:[],accordion_tools:[],plugins:null,row_cols:!0,utilities:{},elements:sn.elements,custom_filter:"",content_types:["tinymce"],valid_col_sizes:[1,2,3,4,5,6,7,8,9,10,11,12,"equal","auto"],valid_col_offsets:[0,1,2,3,4,5,6,7,8,9,10,11],add_column:sn.add_column,layout_modes:Yt.slice(),default_view:$t,resize:sn.resize,source_textarea:"",locale:"en",locale_strings:{},callbacks:{},confirm_delete:!0,drag:sn.drag},Ft),p=(Jt.each(sn,function(e,t){d[e]=Jt.extend({},t,d[e])}),Jt.each(cn,function(e,t){Ft&&void 0!==Ft[e]&&fn(Jt.fn.gridEditor.t(d,"warning.setting_removed",{setting:e,replacement:t}))}),d.default_view),l=null,s=null,f=null,B={},U=[],L=++un;function c(e,t){B[e]||(B[e]=!0,fn(t))}function u(e,t){return dn(d,e,t)}var t,n,g=e.addClass("ge-canvas"),V=0,F=[];function m(e,t,n){return Jt.extend({kind:e,node:t,parent:t.parent(),canvas:g,breakpoint:p,source:"api"},n||{})}function h(e,t){var n=[e],o=e.replace(/^(before|after)-add-.+$/,"$1-add"),i=(o!==e&&n.push(o),!1);return n.forEach(function(e){e=Jt.Event("grideditor:"+e);g.trigger(e,[t]),e.isDefaultPrevented()&&(i=!0)}),n.forEach(function(e){e=d.callbacks[e.replace(/-/g,"_")];"function"==typeof e&&!1===e(t)&&(i=!0)}),!i}function v(e){V++;try{return e()}finally{if(0===--V)for(;F.length;)F.shift()()}}function J(e){0===V?e():F.push(e)}function w(t,n,o,i){e=t;var e,a=Jt.fn.gridEditor.containers[e]?"container":e;return v(function(){var e=m(t,n,i);return h("before-add-"+a,e)?(o(),x(),h("after-add-"+a,e),n):null})}function H(e,t){var n,o;d.confirm_delete?window.bootstrap&&window.bootstrap.Modal?(l||((l=Jt('<div class="modal fade ge-confirm" tabindex="-1" aria-hidden="true"><div class="modal-dialog modal-dialog-centered"><div class="modal-content"><div class="modal-header"><h5 class="modal-title"></h5><button type="button" class="btn-close" data-bs-dismiss="modal"></button></div><div class="modal-body"><p class="ge-confirm-message"></p></div><div class="modal-footer"><button type="button" class="btn btn-secondary ge-confirm-cancel" data-bs-dismiss="modal"></button><button type="button" class="btn btn-danger ge-confirm-ok"></button></div></div></div></div>').appendTo("body")).find(".modal-title").text(u("confirm.title")),l.find(".btn-close").attr("aria-label",u("confirm.cancel")),l.find(".ge-confirm-cancel").text(u("confirm.cancel")),l.find(".ge-confirm-ok").text(u("confirm.ok"))),o=!1,(n=l).find(".ge-confirm-message").text(e),n.find(".ge-confirm-ok").off("click").on("click",function(){o=!0,window.bootstrap.Modal.getInstance(n[0]).hide()}),n.off("hidden.bs.modal").on("hidden.bs.modal",function(){o&&t()}),n.off("shown.bs.modal").on("shown.bs.modal",function(){n.find(".ge-confirm-ok").trigger("focus")}),window.bootstrap.Modal.getOrCreateInstance(n[0]).show()):window.confirm(e)&&t():t()}function W(){var e;l&&(window.bootstrap&&window.bootstrap.Modal&&(e=window.bootstrap.Modal.getInstance(l[0]))&&e.dispose(),l.remove(),l=null)}function b(t,n,o,i){v(function(){var e=m(t,n,{source:"tool"});h("before-delete",e)&&H(o,function(){v(function(){i(function(){n.remove(),v(function(){x(),h("after-delete",e)})})})})})}function X(n,t,e){var o,i,a;return(e=e||p)!==$t?(e=an(e),(o=ht({size:t,offset:ct(n,e)||0})).refused||I(n,e)===o.size?null:{writes:[{tier:e,size:o.size}],cleared:null,size:o.size}):!Xt.some(function(e){return ht({size:t,offset:ct(n,e)||0}).refused})&&(e=Xt[0],i=[],a=[],Xt.slice(1).forEach(function(e){var t=I(n,e);null!==t&&(i.push({tier:e,size:null}),a.push({breakpoint:e.key,value:t}))}),I(n,e)!==t&&i.unshift({tier:e,size:t}),i.length)?{writes:i,cleared:a,size:t}:null}function $(t,e){e.writes.forEach(function(e){gt(t,e.tier,e.size)}),vt(t)}function Y(e,t){return t&&(e.cleared=t),e}function Q(t,e,n,o){o=o||p;var i=He(t),a=X(t,e,o);return!!a&&v(function(){var e=m("column",t,Y({source:n,breakpoint:o,from:i,to:a.size},a.cleared));return h("before-resize",e)?($(t,a),z(t),h("after-resize",e),!0):(z(t),!1)})}function G(o,i,t){var n=p===$t,a=n?Xt[0]:an(p),r=$e(o),l=(i=Math.min(Math.max(i,0),11),n?Xt.slice(1).filter(function(e){return null!==lt(o,e)}):[]);(lt(o,a)||0)===i&&!l.length||v(function(){var e=m("column",o,Y({source:t,from:r,to:i},n?l.map(function(e){return{breakpoint:e.key,value:lt(o,e)}}):null));return!!h("before-indent",e)&&(pt(o,a,i),l.forEach(function(e){pt(o,e,0)}),(n?Xt:[a]).forEach(function(e){var t,n=st(o,e);nn(n)&&(t=ht({size:n,offset:i,leading:"offset"})).size!==n&&gt(o,e,t.size)}),z(o),h("after-indent",e),!0)})}function Z(e){var t=e.parent();return{parent:t,index:t.children().not(".ge-tools-drawer").index(e)}}function y(n){var o=null;return Jt.each(A,function(e,t){!o&&t.kindOf&&(o=t.kindOf(n))}),o||(n.attr("data-ge-container")?n.attr("data-ge-container"):n.hasClass("ge-tab")?"tab":n.hasClass("ge-accordion-item")?"accordion-item":n.hasClass("row")?"row":n.hasClass("column")?"column":n.hasClass("ge-element")?"element":n.hasClass("ge-content")?"content":"node")}function ee(){i=Jt('<div class="ge-mainControls" />').insertBefore(r),a=Jt('<div class="ge-wrapper ge-top" />').appendTo(i),K=Jt('<div class="ge-addRowGroup btn-group" />').appendTo(a),N=Jt('<div class="ge-addContainerGroup btn-group ms-1" />'),Jt.each(d.new_row_layouts,function(e,t){var n,o,i=!Array.isArray(t),a=Jt('<a class="btn btn-sm btn-primary" />').attr("title",i?u("row.add_row_cols",{columns:t.columns,counts:(n=t.row_cols,Xt.filter(function(e){return n&&void 0!==n[e.key]}).map(function(e){return(e.infix?e.key+": ":"")+n[e.key]}).join(", "))}):u("row.add",{layout:t.join("-")})).attr("data-ge-toolbar","row").attr("data-ge-layout",i?JSON.stringify(t):t.join(",")).on("click",function(){var e=_(t);w("row",e,function(){e.appendTo(g)},{parent:g,source:"tool"})&&e[0].scrollIntoView&&e[0].scrollIntoView({behavior:"smooth"})}).appendTo(K),i=(a.append('<i class="bi bi-plus"></i>'),i?(i=t,o=1,Jt.each(i.row_cols||{},function(e,t){"auto"!==t&&(o=Math.max(o,parseInt(t,10)||1))}),Array.apply(null,Array(Math.min(o,i.columns||o))).map(function(){return"equal"})):t),r='<div class="row ge-row-icon">';i.forEach(function(e){r+='<div class="column '+on(Xt[0],e)+'"></div>'}),r+="</div>",a.append(r)}),N.appendTo(a),Jt.each(E,function(o,i){Jt('<a class="btn btn-sm btn-primary ge-add-container" />').attr("title",u(i.labelKey)).attr("data-ge-toolbar","container").attr("data-ge-container-type",o).append('<i class="bi bi-plus"></i>').append(Jt("<span />").text(u(i.labelKey))).on("click",function(){var e=D(),t=j(Gt).appendTo(e),n=i.create({});t.find("> .ge-content").replaceWith(n),w(o,n,function(){e.appendTo(g)},{parent:g,source:"tool"})}).appendTo(N)});var o=[],e=(Jt.each(A,function(n,e){(e.toolbar||[]).forEach(function(e,t){t=((e,t,n)=>(e=Jt('<a class="btn btn-sm btn-primary ge-add-container ge-add-feature" />').attr("title",u(t.labelKey)).attr("data-ge-toolbar","feature").attr("data-ge-feature",e).attr("data-ge-item",n).append(Jt("<i />").addClass(t.iconClass||"bi bi-plus")).on("click",function(){var e=t.create();w(t.kind,e,function(){e.appendTo(g)},{parent:g,source:t.source||"tool"})}),"end"!==t.align&&e.append(Jt("<span />").text(u(t.labelKey))),e))(n,e,t);"end"===e.align?o.push(t):t.appendTo(N)})}),q=Jt('<div class="dropdown pull-right ge-layout-mode"><button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-bs-toggle="dropdown"></button><div class="dropdown-menu" role="menu"></div></div>').on("click","a",function(){Nt(Jt(this).attr("data-ge-view"))}).appendTo(a),d.layout_modes.forEach(function(e){Jt('<a class="dropdown-item" />').attr("data-ge-view",e).attr("title",u(ln(e))).text(u(ln(e))).appendTo(q.find(".dropdown-menu"))}),q.find("button").text(u(ln(p))),Jt('<div class="btn-group pull-right"/>').appendTo(a)),t=Jt('<button type="button" class="btn btn-sm btn-primary gm-edit-mode"><i class="bi bi-code-slash"></i></button>').attr("title",u("tool.edit_source")).on("click",function(){(t.hasClass("active")?(g.empty().html(r.val()).show(),x(),r):(k(),r.height(.8*Jt(window).height()).val(g.html()).show(),g)).hide(),t.toggleClass("active btn-danger")}).appendTo(e),n=Jt('<button type="button" class="btn btn-sm btn-primary gm-preview"><i class="bi bi-eye-fill"></i></button>').attr("title",u("tool.preview")).on("mouseenter",function(){g.removeClass("ge-editing")}).on("click",function(){n.toggleClass("active btn-danger").trigger("mouseleave")}).on("mouseleave",function(){n.hasClass("active")||g.addClass("ge-editing")}).appendTo(e);o.length&&Jt('<div class="pull-right ge-toolbar-end" />').append(o).appendTo(a),e=i.find("[data-ge-toolbar]").removeClass("ge-palette-button").off("pointerdown.ge-palette"),("auto"!==d.toolbar_drag?d.toolbar_drag:"drawer"===d.drag_handle)&&e.addClass("ge-palette-button").on("pointerdown.ge-palette",te)}function te(e){var s=Jt(e.currentTarget),n=e.pageX,o=e.pageY,c=null;function u(e){if(!c){if(t=e,!(Math.abs(t.pageX-n)+Math.abs(t.pageY-o)>d.drag.threshold))return;c=s.clone().addClass("ge-toolbar-helper").appendTo("body"),g.addClass("ge-dropping")}c.css({left:e.pageX-14,top:e.pageY-14});var t=e.pageX;(t=ne(t,e.pageY))?(f=f||Jt('<div class="ge-drop-marker" />'),t.before?f.insertBefore(t.before):f.appendTo(t.region)):oe()}e.button||Jt(document).on("pointermove.ge-toolbar",u).on("pointerup.ge-toolbar pointercancel.ge-toolbar",function e(t){var n,o,i,a,r,l;Jt(document).off("pointermove.ge-toolbar",u).off("pointerup.ge-toolbar pointercancel.ge-toolbar",e),c&&(c.remove(),g.removeClass("ge-dropping"),oe(),s.one("click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t=ne(t.pageX,t.pageY))&&(n=t,"feature"===(t=s).attr("data-ge-toolbar")?(o=n,i=(r=A[(r=t).attr("data-ge-feature")].toolbar[parseInt(r.attr("data-ge-item"),10)]).create(),_t(o.region,i)||(a=o.region.parentsUntil(g).addBack().first(),(o={region:g,before:a.length?a.next():null}).before&&!o.before.length&&(o.before=null)),w(r.kind,i,function(){o.before?i.insertBefore(o.before):i.appendTo(o.region)},{parent:o.region,source:r.source||"dragdrop"})):(a="container"===t.attr("data-ge-toolbar"),r=t.attr("data-ge-container-type"),l=t=a?E[r].create({}):(e=>/^\s*\{/.test(e||"")?_(JSON.parse(e)):_((e||"").split(",").filter(function(e){return""!==e}).map(ie)))(t.attr("data-ge-layout")),a&&!n.region.is(".column")&&(l=D(),j(Gt).appendTo(l).find("> .ge-content").replaceWith(t)),w(a?r:"row",t,function(){n.before?l.insertBefore(n.before):l.appendTo(n.region)},{parent:n.region,source:"dragdrop"})))})}function ne(e,t){var n,e=e-window.scrollX,o=t-window.scrollY,t=document.elementFromPoint(e,o);return!t||!(e=Jt(t).closest([".column",".ge-canvas"].concat(yt("regions")).join(", "))).length||e[0]!==g[0]&&!g[0].contains(e[0])?null:(n=null,e.children(bt()).each(function(){var e;n||(e=this.getBoundingClientRect(),o<e.top+e.height/2&&(n=Jt(this)))}),{region:e,before:n})}function oe(){f&&f.remove()}function ie(e){return/^\d+$/.test(String(e))?parseInt(e,10):e}function _(e){var n=D();if(Array.isArray(e))e.forEach(function(e){j(e).appendTo(n)});else{Jt.each(e.row_cols||{},function(e,t){e=an(e);e&&-1!==en.indexOf(String(t))&&n.addClass(tn(e,t))});for(var t=0;t<(e.columns||0);t++)j(null).appendTo(n)}return n}function ae(e){var t=Jt(window);t.scrollTop()>i.offset().top&&t.scrollTop()<g.offset().top+g.height()?a.hasClass("ge-top")&&a.css({left:a.offset().left,width:a.outerWidth()}).removeClass("ge-top").addClass("ge-fixed"):a.hasClass("ge-fixed")&&a.css({left:"",width:""}).removeClass("ge-fixed").addClass("ge-top")}function re(e){var t;Jt(this).hasClass("ge-rte-active")||Jt(this).is(":visible")&&(t=Bt(Jt(this).data("ge-content-type")))&&(Jt(this).addClass("ge-rte-active",!0),t.init(d,Jt(this)))}function le(){k(),x()}function x(){var e;It(!0),g.addClass("ge-editing"),g.toggleClass("ge-drag-drawer","drawer"===d.drag_handle),g.find('.column, div[class*="col-"], div.col').each(function(){var t,e=Jt(this).addClass("column");t=e,Xt.filter(function(e){return null!==I(t,e)}).length||nt(e.parent())||gt(e,Xt[0],Gt)}),g.find(".column").each(function(){var e=Jt(this),t=Jt();e.children().each(function(){var e=Jt(this);e.is(".ge-tools-drawer, .ge-resize-handle")||(t=e.is(".row, .ge-content, [data-ge-container]")?Dt(t):t.add(e))}),Dt(t)}),g.find(".row").each(function(){var t,i,a,r,e,n=Jt(this);n.find("> .ge-tools-drawer").length||(Ze(t=Jt('<div class="ge-tools-drawer" />').prependTo(n)),tt(t,n,d.row_classes),d.row_tools.forEach(function(e){O(t,e.title||"",e.className||"",e.iconClass||"bi bi-wrench",e.on)}),O(t,u("tool.delete_row"),"ge-delete-row","bi bi-trash",function(){b("row",n,u("confirm.delete_row"),function(e){n.slideUp(e)})}),O(t,u("tool.add_column"),"ge-add-column","bi bi-plus-circle",function(){Je()||Fe(n,ot(n,P())?null:d.add_column.size)}),i=t.find("> .ge-add-column"),a=n,d.add_column.picker&&(r=null,e=function(){window.clearTimeout(r),r=null},i.on("mouseenter mousedown",function(){r||s||(r=window.setTimeout(function(){var e,n,o;r=null,e=i,n=a,Je(),o=mt(n,P()),e.closest(".ge-tools-drawer").addClass("ge-picker-open"),s=Jt('<div class="ge-size-picker" />').appendTo(e),d.valid_col_sizes.forEach(function(t){var e;Jt('<a class="ge-size" />').attr("data-ge-size",t).attr("title","equal"!==(e=t)?"auto"!==e?u("tool.column_size",{size:e}):u("tool.column_auto"):u("tool.column_equal")).toggleClass("ge-size-tight",nn(t)&&o<t).toggleClass("ge-size-flex",!nn(t)).text(nn(t)?t:on(Xt[0],t)).on("click",function(e){e.preventDefault(),e.stopPropagation(),Je(),Fe(n,t)}).appendTo(s)}),e.one("mouseleave",function(){window.setTimeout(function(){s&&!s.is(":hover")&&Je()},400)})},d.add_column.delay))}),i.on("mouseleave",e),i.on("mouseup",e)))}),g.find(".column").each(function(){var t,n=Jt(this);n.find("> .ge-tools-drawer").length||(Ze(t=Jt('<div class="ge-tools-drawer" />').prependTo(n)),O(t,u("tool.column_narrower"),"ge-decrease-col-width","bi bi-dash-lg",function(e){Q(n,e.shiftKey?Qe(d.valid_col_sizes):Ye(d.valid_col_sizes.filter(nn),We(n),-1),"tool")}),O(t,u("tool.column_wider"),"ge-increase-col-width","bi bi-plus-lg",function(e){Q(n,e.shiftKey?(e=>(e=mt(e.parent(),P(),e)-$e(e),Math.min(Ge(d.valid_col_sizes),Math.max(e,1))))(n):Ye(d.valid_col_sizes.filter(nn),We(n),1),"tool")}),O(t,u("tool.indent_decrease"),"ge-decrease-col-offset","bi bi-text-indent-right",function(e){G(n,e.shiftKey?Qe(d.valid_col_offsets):Ye(d.valid_col_offsets,$e(n),-1),"tool")}),O(t,u("tool.indent_increase"),"ge-increase-col-offset","bi bi-text-indent-left",function(e){G(n,e.shiftKey?(e=>(e=mt(e.parent(),P(),e)-We(e),Math.min(Ge(d.valid_col_offsets),Math.max(e,0))))(n):Ye(d.valid_col_offsets,$e(n),1),"tool")}),tt(t,n,d.col_classes),d.col_tools.forEach(function(e){O(t,e.title||"",e.className||"",e.iconClass||"bi bi-wrench",e.on)}),O(t,u("tool.delete_column"),"ge-delete-column","bi bi-trash",function(){b("column",n,u("confirm.delete_column"),function(e){n.animate({opacity:"hide",width:"hide",height:"hide"},400,e)})}),O(t,u("tool.add_row"),"ge-add-row","bi bi-plus-circle",function(){var e=D();w("row",e,function(){n.append(e)},{parent:n,source:"tool"})}))}),g.find("[data-ge-container]").each(function(){var t,e,n,o,i=Jt(this),a=S(i),r=E[a];r?(i.addClass("ge-container ge-container-"+a),r.mark(i),i.find("> .ge-tools-drawer").length||(t=i,e=a,n=r,Ze(o=Jt('<div class="ge-tools-drawer ge-container-drawer" />').prependTo(t)),tt(o,t,d.container_classes),d.container_tools.forEach(function(e){O(o,e.title||"",e.className||"",e.iconClass||"bi bi-wrench",e.on)}),n.tools&&n.tools(o,t),O(o,u("tool.delete_container"),"ge-delete-container","bi bi-trash",function(){b(e,t,u("confirm.delete_container"),function(e){t.slideUp(e)})}),n.addPane&&O(o,u(n.addPaneKey),"ge-add-pane","bi bi-plus-circle",function(){var e=n.addPane(t,{});w(n.paneKind,e,function(){},{parent:t,source:"tool",container:t})}))):c("container:"+a,'unknown container type "'+a+'"')}),o("onInit"),window.Sortable?(xt(g.find(".row"),{draggable:".column",group:"column"}),xt(g.add(g.find(".column")),{draggable:bt(),group:"block",accepts:_t}),(e=yt("regions")).length&&xt(g.find(e.join(", ")),{draggable:">"+bt(),group:"block",accepts:_t}),o("onSortable",xt)):c("sortable_missing",u("error.sortable_missing")),d.resize.enabled&&g.find(".column").each(function(){var n=Jt(this);n.find("> .ge-resize-handle").length||(Jt('<span class="ge-resize-size" />').appendTo(n.find("> .ge-tools-drawer")),Jt.each(String(d.resize.handles).split(",").map(function(e){return e.trim()}).filter(function(e){return"e"===e||"w"===e}),function(e,t){Jt('<span class="ge-resize-handle" />').addClass("ge-resize-"+t).attr("data-ge-edge",t).on("pointerdown",Tt).appendTo(n)}))}),Rt(p),Ee(g)}function k(){g.removeClass("ge-editing ge-drag-drawer ge-dropping");g.find(".ge-content").each(function(){var e=Jt(this),t=Bt(e.data("ge-content-type"));t&&t.deinit(d,e),e.removeClass("ge-rte-active")});Je(),oe(),g.find(".ge-tools-drawer").remove(),o("onDeinit"),Ae(g),g.find("[data-ge-row-cols]").removeAttr("data-ge-row-cols"),g.find("[data-ge-container]").each(function(){var e=Jt(this),t=E[S(e)];t&&t.unmark(e),e.removeClass("ge-container ge-container-"+S(e)),e.attr("class")||e.removeAttr("class")}),Jt.each(U,function(e,t){t.destroy()}),U=[],g.find(".ge-resize-handle").remove(),g.find(".ge-resize-size").remove(),vt(g),It(!1)}function se(){k(),vt(g);var e=g.html();return x(),e}function ce(e){k(),vt(e);e=e[0].outerHTML;return x(),e}function ue(){k(),W(),i.remove(),r.remove(),Jt(window).off("scroll",ae),g.off("click",".ge-content",re),g.off("ge-rte-ready",".ge-content"),g.removeData("grideditor")}function o(n,o){Jt.each(E,function(e,t){t[n]&&t[n](o)}),Jt.each(A,function(e,t){t[n]&&t[n](o)}),Jt.each(M,function(e,t){t[n]&&t[n](o)})}d.source_textarea&&(0<(t=Jt(d.source_textarea).val()).length&&0==Jt("<div>"+t+"</div>").find(".row").addBack(".row").length&&(n=D(),(n=j(12).appendTo(n)).find(".ge-content").html(t),t=n.html()),e.html(t)),e.children().length&&!e.find("div.row").length&&(n=e.children(),Jt('<div class="row"><div class="col-lg-12"/></div>').appendTo(e).find(".col-lg-12").append(n));var C={},de=".row, .column, .ge-element, [data-ge-container]",fe="data-ge-preview",ge=!1;function pe(e,t,n){var o=n.name||n.prefix;C[o]?fn('the "'+e+'" plugin declares the utility "'+o+'", which the "'+C[o].plugin+'" plugin already declared: ignored'):C[o]={plugin:e,family:Jt.extend({},n,{name:o,values:n.values.map(String),appliesTo:n.appliesTo||t.appliesTo||["row","column"]})}}function me(e,t){return C[e]?C[e].family:(c("utility:"+e,t+"("+JSON.stringify(e)+"): no loaded plugin declares that utility"),null)}function he(e,t){return-1!==e.appliesTo.indexOf(t)||E[t]&&-1!==e.appliesTo.indexOf("container")}function ve(t){return Jt.map(C,function(e){return he(e.family,t)?e.family:null})}function we(e,t,n){return e.className?e.className(t.key,n):e.prefix+(t.infix?"-"+t.infix:"")+"-"+n}function T(e,t,n){for(var o=(e.attr("class")||"").split(/\s+/),i=0;i<t.values.length;i++)if(-1!==o.indexOf(we(t,n,t.values[i])))return t.values[i];return null}function be(e,t,n){for(var o=Xt.indexOf(n)-1;0<=o;o--){var i=T(e,t,Xt[o]);if(null!==i)return{tier:Xt[o],value:i}}return null}function ye(e,t,n){var o=T(e,t,n);return null!==o?o:(o=be(e,t,n))?o.value:null}function _e(t,n){return Xt.map(function(e){return{tier:e,value:T(t,n,e)}}).filter(function(e){return null!==e.value})}function xe(t,n,o,e){n.values.forEach(function(e){t.removeClass(we(n,o,e))}),null!==e&&t.addClass(we(n,o,e)),t.attr("class")||t.removeAttr("class")}function ke(e,t,n){return n===$t?T(e,t,Xt[0]):ye(e,t,an(n))}function Ce(e,t,n){e=Jt(e).first();var o,t=me(t,"getUtility");return t&&e.length?null===(o=void 0===n?p:Kt(n))?(fn("getUtility("+JSON.stringify(n)+"): no such layout mode"),null):ke(e,t,o):null}function Te(t,n,o,i){i="string"==typeof i?{view:i}:i||{},t=Jt(t).first();var a,r,l,e,s,c,u,d,f,g=me(n,"setUtility");return!(!g||!t.length)&&(null===(a=void 0===i.view?p:Kt(i.view))?(fn("setUtility("+JSON.stringify(i.view)+"): no such layout mode"),!1):null!==(o=null==o||""===o?null:String(o))&&-1===g.values.indexOf(o)?(fn("setUtility: "+JSON.stringify(o)+' is not a value of "'+n+'", which takes '+JSON.stringify(g.values)),!1):(r=y(t),he(g,r)?g.write?g.write(t,o,a,i.source||"api"):(e=t,s=g,u=o,!!(l=(c=a)!==$t?T(e,s,c=an(c))===u?null:{writes:[{tier:c,value:u}],cleared:[]}:(d=[],f=[],_e(e,s).forEach(function(e){e.tier!==Xt[0]&&(d.push({tier:e.tier,value:null}),f.push({breakpoint:e.tier.key,value:e.value}))}),T(e,s,Xt[0])!==u&&d.unshift({tier:Xt[0],value:u}),d.length?{writes:d,cleared:f}:null))&&v(function(){var e=m(r,t,{family:n,breakpoint:a,tiers:l.writes.map(function(e){return e.tier.key}),from:ke(t,g,a),to:o,cleared:l.cleared,source:i.source||"api"});return h("before-utility",e)?(l.writes.forEach(function(e){xe(t,g,e.tier,e.value)}),z(t),h("after-utility",e),!0):(z(t),!1)})):(fn('setUtility: "'+n+'" does not apply to a '+r),!1)))}function ze(t,e,n){var o=me(e,"bareStyle");return t=Jt(t).first(),o&&t.length?(e=t.attr("class"),Xt.forEach(function(e){xe(t,o,e,null)}),n=getComputedStyle(t[0]).getPropertyValue(n),void 0===e?t.removeAttr("class"):t.attr("class",e),n):null}function z(e){var t=e.children(".ge-tools-drawer").children(".ge-details");t.children(".ge-classes").val(et(e).join(" ")),t.children(".ge-utilities").each(function(){Pe(Jt(this))}),Ee(e)}function Ee(e){var t,l;Ae(e),p!==$t&&(t=e,l=an(p),(e=>e.find(de).addBack(de))(t).each(function(){var e,n,o,i=Jt(this),a=y(i),r={};ve(a).forEach(function(e){e.preview&&_e(i,e).length&&Jt.extend(r,e.preview(ye(i,e,l),i,a))}),"column"===a&&Jt.extend(r,((e,t)=>{var n=at(e,t);return n?{flex:"0 0 auto",width:"auto"===n.value?"auto":100/parseInt(n.value,10)+"%","max-width":"100%"}:!nt(e.parent())||it(e,t)?{}:{flex:"0 0 auto",width:"100%","max-width":"100%"}})(i,l)),Jt.each(M,function(e,t){t.preview&&Jt.extend(r,t.preview(i,a,l.key))}),Jt.isEmptyObject(r)||(n=(e=i)[0].style,o={},Jt.each(r,function(e,t){o[e]=[n.getPropertyValue(e),n.getPropertyPriority(e)],n.setProperty(e,String(t),"important")}),e.attr(fe,JSON.stringify(o)))})),e.find(".row").addBack(".row").each(function(){var e=Jt(this),t=!1===d.row_cols?null:p===$t?ot(e,Xt[0])||null:ot(e,an(p));t?e.attr("data-ge-row-cols",rt(t.value)):e.removeAttr("data-ge-row-cols")}),o("onRefresh",e)}function Ae(e){e.find("["+fe+"]").addBack("["+fe+"]").each(function(){var e=Jt(this),n=this.style,t={};try{t=JSON.parse(e.attr(fe))||{}}catch(e){}Jt.each(t,function(e,t){t&&t[0]?n.setProperty(e,t[0],t[1]):n.removeProperty(e)}),e.removeAttr(fe),e.attr("style")||e.removeAttr("style")})}function Me(e,t){var n=Jt('<label class="ge-utility" />').attr("data-ge-family",t.name);return Jt('<span class="ge-utility-label" />').text(t.labelKey?u(t.labelKey):t.name).appendTo(n),Jt("<select />").appendTo(n).on("change",function(){Te(e,t.name,this.value,{source:"panel"})}),Jt('<small class="ge-utility-note" />').appendTo(n),n}function Se(e,t){var t=me(t,"utilityField");return t?(Oe(t=Me(e,t),e),t):Jt()}function Pe(e){var t=e.data("ge-node");e.children(".ge-utilities-toggle").text(u("utility.section",{view:u(ln(p))})),e.find(".ge-utility").each(function(){Oe(Jt(this),t)})}function Oe(e,t){var n,o,i,a,r=C[e.attr("data-ge-family")].family,l=e.children("select").empty(),s=r.choices?r.choices(t,y(t)):r.values,c="";p===$t?(n=T(t,r,Xt[0]),o=u("utility.default"),(a=_e(t,r).filter(function(e){return e.tier!==Xt[0]})).length&&(c=u("utility.varies",{breakpoints:a.map(function(e){return e.tier.key}).join(", ")}))):(a=an(p),i=be(t,r,a),n=T(t,r,a),o=i?u("utility.inherit",{value:Ie(r,i.value),breakpoint:i.tier.key}):u("utility.default"),(a=r.blank?r.blank(t,p):null)&&null===n&&(o=a)),null!==n&&-1===s.indexOf(n)&&(s=s.concat([n])),Jt('<option value="" />').text(o).appendTo(l),s.forEach(function(e){Jt("<option />").attr("value",e).text(Ie(r,e)).appendTo(l)}),l.val(null===n?"":n),e.children(".ge-utility-note").text(c).toggle(""!==c)}function Ie(e,t){return e.label?e.label(t):t}var E={},A={},M={},De={},je=0;function Re(e){return"ge-"+e+"-"+ ++je+"-"+Math.random().toString(36).slice(2,6)}function Ke(){var e=D();return j(Gt).appendTo(e),e}function S(e){return e.attr("data-ge-container")}function Ne(e,t,n,o,i){var a=Jt('<div class="ge-tools-drawer ge-pane-drawer" />').prependTo(e);return Ze(a),tt(a,e,d.pane_classes),n.forEach(function(e){O(a,e.title||"",e.className||"",e.iconClass||"bi bi-wrench",e.on)}),O(a,u("tool.delete_pane"),"ge-delete-pane","bi bi-trash",function(){b(t,e,o,function(e){i(e)})}),a}function qe(e){e.find("[data-bs-toggle], [data-bs-dismiss]").addBack("[data-bs-toggle], [data-bs-dismiss]").each(function(){var n=Jt(this);["toggle","dismiss"].forEach(function(e){var t=n.attr("data-bs-"+e);void 0!==t&&n.attr("data-ge-bs-"+e,t).removeAttr("data-bs-"+e)})})}function Be(e){e.find("[data-ge-bs-toggle], [data-ge-bs-dismiss]").addBack("[data-ge-bs-toggle], [data-ge-bs-dismiss]").each(function(){var n=Jt(this);["toggle","dismiss"].forEach(function(e){var t=n.attr("data-ge-bs-"+e);void 0!==t&&n.attr("data-bs-"+e,t).removeAttr("data-ge-bs-"+e)})})}function Ue(t){var n;t.data("ge-editable")||(n=t.closest("[data-bs-toggle], [data-ge-bs-toggle]"),t.data("ge-editable",!0).attr("title",u("tool.rename")).on("dblclick",function(e){e.preventDefault(),e.stopPropagation(),qe(n),t.attr("contenteditable","true").trigger("focus"),window.getSelection().selectAllChildren(t[0])}).on("keydown",function(e){"true"===t.attr("contenteditable")&&"Enter"===e.key&&(e.preventDefault(),t.trigger("blur"))}).on("blur",function(){t.removeAttr("contenteditable"),Be(n)}))}function Le(e){var t=e.find("> .ge-pane-label");return t.length||(t=Jt('<span class="ge-pane-label" />').text(e.text().trim()),e.empty().append(t)),t}function Ve(e){e.find(".ge-pane-label").each(function(){Jt(this).removeData("ge-editable").contents().unwrap()})}function Fe(e,t){var n=j(t);w("column",n,function(){e.append(n)},{parent:e,source:"tool"})}function Je(){return s&&(s.closest(".ge-tools-drawer").removeClass("ge-picker-open"),s.remove(),s=null,1)}function P(){return p===$t?Xt[Xt.length-1]:an(p)}function He(e){var t=P();return at(e,t)?null:null===(e=st(e,t))?Gt:e}function We(e){var t=He(e);return nn(t)?t:(t=Math.round(e.outerWidth()/Xe(e.parent())*Gt),Math.min(Math.max(t,1),Gt))}function Xe(e){var t=window.getComputedStyle(e[0]);return e[0].clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)}function $e(e){return ct(e,P())||0}function Ye(e,n,t){var o=e.indexOf(n);return-1===o?e.reduce(function(e,t){return Math.abs(t-n)<Math.abs(e-n)?t:e},e[0]):e[Math.min(Math.max(o+t,0),e.length-1)]}function Qe(e){return e.filter(nn).reduce(function(e,t){return Math.min(e,t)},Gt)}function Ge(e){return e.filter(nn).reduce(function(e,t){return Math.max(e,t)},0)}function Ze(e){"drawer"!==d.drag_handle&&O(e,u("tool.move"),"ge-move","bi bi-arrows-move")}function O(e,t,n,o,i){var a=Jt('<a title="'+t+'" class="'+n+'"><i class="'+o+'"></i></a>').appendTo(e);"function"==typeof i&&a.on("click",i),"object"==typeof i&&Jt.each(i,function(e,t){a.on(e,t)})}function et(e){return(e.attr("class")||"").split(/\s+/).filter(function(e){return""!==e&&!(t=>"row"===t||"column"===t||/^(ge-|ui-)/.test(t)||/^col(-(sm|md|lg|xl|xxl))?(-auto)?$/.test(t)||Xt.some(function(e){return new RegExp("^("+e.colPrefix+"|"+e.offsetPrefix+")\\d+$").test(t)}))(e)})}function tt(n,o,e){var t=((n,e)=>{var t=Jt('<div class="ge-details" />'),o=(Jt('<input class="ge-id" />').attr("placeholder",u("tool.id_placeholder")).val(n.attr("id")).attr("title",u("tool.id_title")).appendTo(t).on("change",function(){""===this.value?n.removeAttr("id"):n.attr("id",this.value)}),Jt('<input class="ge-classes" />').attr("placeholder",u("tool.classes_placeholder")).attr("title",u("tool.classes_title")).val(et(n).join(" ")).appendTo(t).on("change",function(){var t,e;t=n,e=this.value,et(t).forEach(function(e){t.removeClass(e)}),e.split(/\s+/).forEach(function(e){""!==e&&t.addClass(e)}),t.attr("class")||t.removeAttr("class"),z(n)}),Jt('<div class="btn-group" />').appendTo(t));return e.forEach(function(e){var t=Jt('<a class="btn btn-sm btn-default" />').html(e.label).attr("title",e.title||u("tool.toggle_class",{label:e.label})).toggleClass("active btn-primary",n.hasClass(e.cssClass)).on("click",function(){t.toggleClass("active btn-primary"),n.toggleClass(e.cssClass,t.hasClass("active")),z(n)}).appendTo(o)}),(e=(n=>{var e,t,o=y(n),i=ve(o).filter(function(e){return!1!==e.panel}).map(function(e){return Me(n,e)});return Jt.each(M,function(e,t){t=t.panel?t.panel(n,o):null;t&&t.length&&i.push(t)}),i.length?(e=Jt('<div class="ge-utilities" />').toggleClass("ge-open",ge).data("ge-node",n),Jt('<a class="ge-utilities-toggle" />').appendTo(e).on("click",function(){ge=!e.hasClass("ge-open"),g.find(".ge-utilities").toggleClass("ge-open",ge)}),t=Jt('<div class="ge-utilities-body" />').appendTo(e),i.forEach(function(e){e.appendTo(t)}),Pe(e),e):null})(n))&&e.appendTo(t),t})(o,e||[]),i=(O(n,u("tool.settings"),"ge-settings","bi bi-gear-fill",function(){t.toggle()}),y(o));return Jt.each(M,function(e,t){t.drawerTools&&t.drawerTools(n,o,i)}),Jt.each(A,function(e,t){t.drawerTools&&t.drawerTools(n,o,i)}),t.appendTo(n)}function nt(n){return n.hasClass("row")&&Xt.some(function(t){return en.some(function(e){return n.hasClass(tn(t,e))})})}function ot(e,t){if(e.hasClass("row"))for(var n=Xt.indexOf(t);0<=n;n--)for(var o=0;o<en.length;o++)if(e.hasClass(tn(Xt[n],en[o])))return{tier:n,value:en[o]};return null}function it(e,t){for(var n=Xt.indexOf(t);0<=n;n--){var o=I(e,Xt[n]);if(null!==o)return{tier:n,size:o}}return null}function at(e,t){var n=ot(e.parent(),t);return n&&(!(e=it(e,t))||n.tier>e.tier||n.tier===e.tier&&"equal"===e.size)?n:null}function rt(e){return"auto"===e?u("badge.row_cols_auto"):u("badge.row_cols",{count:e})}function I(e,t){var n=dt(e,t.colPrefix);return null!==n?n:e.hasClass(on(t,"auto"))?"auto":e.hasClass(on(t,"equal"))?"equal":null}function lt(e,t){return dt(e,t.offsetPrefix)}function st(e,t){return ut(e,t,I)}function ct(e,t){return ut(e,t,lt)}function ut(e,t,n){for(var o=Xt.indexOf(t);0<=o;o--){var i=n(e,Xt[o]);if(null!==i)return i}return null}function dt(e,t){t=new RegExp("(?:^|\\s)"+t+"(\\d+)(?:\\s|$)").exec(e.attr("class")||"");return t?parseInt(t[1],10):null}function ft(e,t,n){var o=(e.attr("class")||"").split(/\s+/).filter(function(e){return""!==e&&!new RegExp("^"+t+"\\d+$").test(e)});null!==n&&o.push(t+n),e.attr("class",o.join(" "))}function gt(t,n,e){ft(t,n.colPrefix,null),Zt.forEach(function(e){t.removeClass(on(n,e))}),null!=e&&t.addClass(on(n,e))}function pt(e,t,n){ft(e,t.offsetPrefix,n||null)}function mt(e,n,o){var i=0;return e.children(".column").each(function(){var e,t=Jt(this);o&&t[0]===o[0]||(e=(e=at(t,n))?"auto"===(e=e).value?0:Gt/parseInt(e.value,10):st(t,n),i+=(nn(e)?e:0)+(ct(t,n)||0))}),Gt-i}function ht(e){var t=null==e.size?null:e.size,n=null==e.offset?0:e.offset,n=Math.min(Math.max(n,0),11);return null===t||!nn(t)||(t=Math.min(Math.max(t,1),Gt))+n<=Gt?{size:t,offset:n,refused:!1}:"offset"===e.leading?{size:Gt-n,offset:n,refused:!1}:{size:null,offset:n,refused:!0}}function vt(e){e.find(".column").addBack(".column").each(function(){var e=Jt(this);e.css({width:"",height:"",left:"",top:""}),e.attr("style")||e.removeAttr("style")})}function wt(e){return"ge-"+e+"-"+L}function bt(){return[".row",".ge-content","[data-ge-container]"].concat(yt("blocks")).join(", ")}function yt(t){return Jt.map(A,function(e){return e[t]||null})}function _t(n,o){var i=!0;return Jt.each(A,function(e,t){i&&t.accepts&&!1===t.accepts(n,o)&&(i=!1)}),i}function xt(e,i){var t,a,r;e.length&&window.Sortable&&(t="drawer"===d.drag_handle,a="drawer"===d.drag_handle?".ge-tools-drawer > a, .ge-details, input, textarea, button, select, option":"input, textarea, button, select, option",r=0,e.each(function(){var n=this,o=i.group?{name:wt(i.group)}:{name:wt(i.draggable+"-"+ ++r),pull:!1,put:!1};i.group&&i.accepts&&(o.put=function(e,t,n){return t.options.group.name===o.name&&i.accepts(Jt(e.el),Jt(n))}),U.push(window.Sortable.create(n,Jt.extend({group:o,draggable:i.draggable,handle:t?".ge-tools-drawer":".ge-tools-drawer .ge-move",filter:function(e,t){return!!Jt(e.target).closest(a,n).length||!t||t.parentNode!==n},preventOnFilter:!1,forceFallback:!0,fallbackOnBody:!0,ghostClass:"ge-drag-placeholder",chosenClass:"ge-drag-chosen",dragClass:"ge-drag-helper",fallbackClass:"ge-drag-helper",animation:d.drag.animation,delay:d.drag.delay||d.drag.touch_delay,delayOnTouchOnly:!d.drag.delay,touchStartThreshold:d.drag.threshold,scroll:d.drag.scroll,onStart:kt,onEnd:Ct},i.options||{})))}))}function kt(e){var t=Jt(e.item),n=Z(t);t.data("ge-move-from",n),t.removeData("ge-move-canceled"),v(function(){h("before-move",m(y(t),t,{parent:n.parent,source:"dragdrop",from:n}))||t.data("ge-move-canceled",!0)})}function Ct(e){var t,n,o,i,a=Jt(e.item),r=a.data("ge-move-from")||Z(a);a.removeData("ge-move-from"),a.data("ge-move-canceled")?(a.removeData("ge-move-canceled"),e=a,!(n=(t=r).parent.children().not(".ge-tools-drawer").not(e)).length||t.index>=n.length?e.appendTo(t.parent):e.insertBefore(n.eq(t.index))):(o=Z(a)).parent[0]===r.parent[0]&&o.index===r.index||(i=a.closest("[data-ge-container]"),(e=E[S(i)])&&e.afterPaneMove&&e.afterPaneMove(i,a,r),v(function(){h("after-move",m(y(a),a,{parent:o.parent,source:"dragdrop",from:r,to:o,container:i.length?i:void 0}))}))}function Tt(e){var t,n,s=Jt(e.currentTarget),c=s.parent(),o="w"===s.attr("data-ge-edge"),i=e.pageX,a=c.outerWidth();function u(e){e=e.pageX-i;return Math.max(1,a+(o?-e:e))}function d(e){var t;c.css("width",u(e)+"px"),t=c,e=u(e),At(t,Mt(zt(t,e)))}e.preventDefault(),n=He(t=c),v(function(){return h("before-resize",m("column",t,{source:"dragdrop",from:n,to:null}))})&&(t.data("ge-resize-from",n),t.data("ge-resize-units",We(t)),At(t,Mt(t.data("ge-resize-units"))),1)&&(c.addClass("ge-resizing"),void 0!==e.pointerId&&s[0].setPointerCapture&&s[0].setPointerCapture(e.pointerId),s.on("pointermove",d).on("pointerup pointercancel",function e(t){var o,i,a,r,l;s.off("pointermove",d).off("pointerup pointercancel",e),c.removeClass("ge-resizing"),o=c,t=u(t),a=o.data("ge-resize-from"),r=o.data("ge-resize-units"),l=zt(o,t),o.removeData("ge-resize-from").removeData("ge-resize-units"),At(o,""),vt(o),void 0!==a&&l!==r&&(i=X(o,l))&&v(function(){var e,t,n;$(o,i),t=l-r,(e=Et(e=o))&&t&&nn(n=He(e))&&(n=X(e,n-t))&&($(e,n),z(e)),z(o),h("after-resize",m("column",o,Y({source:"dragdrop",from:a,to:i.size},i.cleared)))})}))}function zt(e,t){var t=Math.round(t/Xe(e.parent())*Gt),n=Et(e),o=n?He(n):null,i=e.data("ge-resize-units"),n=n&&nn(o)?i+o-Qe(d.valid_col_sizes):Gt-$e(e);return Math.min(Math.max(t,Qe(d.valid_col_sizes)),Math.max(n,Qe(d.valid_col_sizes)),Ge(d.valid_col_sizes))}function Et(e){return"next"===d.resize.balance&&(e=e.nextAll(".column").first()).length?e:null}function At(e,t){e.find("> .ge-tools-drawer > .ge-resize-size").text(t)}function Mt(e){return(p===$t?Xt[0]:P()).colPrefix+e}function D(){return Jt('<div class="row" />')}function St(e,t,n){var o,i,a=null;return Wt.forEach(function(e){null===a&&n&&void 0!==n[e]&&(a=e)}),null===a?e:(i=Jt(n[a]),o="appendTo"===a||"prependTo"===a?i:i.parent(),i=function(){return w(t,e,function(){e[a](n[a])},{parent:o,source:n.source||"api"})},0<V?(J(i),e):i())}function Pt(e,t,n){e=Jt(e),n=n||{};var o=E[S(e)];return o&&S(e)===t?(n=o.addPane(e,n),w(o.paneKind,n,function(){},{parent:e,source:"api",container:e})):(fn("this is not a "+t+" container"),null)}function Ot(){var n={};return Jt.each(d,function(e,t){n[e]=Array.isArray(t)?t.slice():t}),Object.freeze(n)}function j(e,t){var n=Bt(d.content_types[0]),n=Jt('<div class="column"/>').append(jt().html(n?n.initialContent:"")),o=rn(p)[0],t=ht({size:e,offset:t||0,leading:"offset"});return gt(n,o,null===t.size?e:t.size),pt(n,o,t.offset),n}function It(n){d.custom_filter.length&&Jt.each(d.custom_filter,function(e,t){(t="string"==typeof t?window[t]:t)(g,n)})}function Dt(e){var t;return e.length&&(t=jt().insertAfter(e.last()),e.appendTo(t)),Jt()}function jt(){var e=d.content_types[0],t=Jt('<div class="ge-content"/>');return e&&t.addClass("ge-content-type-"+e).attr("data-ge-content-type",e),t}function Rt(t){p=t,Yt.forEach(function(e){g.toggleClass("ge-layout-"+e,e===t)}),q.find("button").text(u(ln(t)))}function Kt(e){return"number"==typeof e?(c("changeView-index","changeView("+e+"): layout modes are identified by breakpoint key now, so pass one of "+JSON.stringify(Yt)+". Numeric indexes still work, but they mean what they meant in 2.x ("+Qt.join(", ")+") and will be dropped."),Qt[e]||null):-1===Yt.indexOf(e)?null:e}function Nt(e){var t=Kt(e);null===t?fn("changeView("+JSON.stringify(e)+"): no such layout mode"):(e=p,Rt(t),t!==e&&(g.find(".ge-utilities").each(function(){Pe(Jt(this))}),Ee(g),o("onViewChange",t),h("view-change",{canvas:g,breakpoint:t,from:e,to:t})))}function qt(){return p}function Bt(e){return Jt.fn.gridEditor.RTEs[e]}var Ut,Lt={getHtml:se,getPlainHtml:function(){return gn(se())},init:function(){J(x)},reset:function(){J(le)},deinit:k,destroy:ue,remove:function(){c("remove","remove() is deprecated and will be removed in a later release. Use destroy(), which does the same thing."),ue()},changeView:Nt,getView:qt,createRow:function(e,t){var n=D();return void 0===e||Array.isArray(e)||e&&e.row_cols||(fn("createRow: the layout is an array of column sizes, as in [8, 4], or { row_cols, columns }. Making an empty row instead."),e=[]),e&&!Array.isArray(e)&&(n=_(e)),(Array.isArray(e)?e:[]).forEach(function(e){j(e).appendTo(n)}),St(n,"row",t)},createColumn:function(e,t){var n=Jt((t=t||{}).appendTo||t.prependTo||[]).first(),n=(void 0===e&&n.length&&ot(n,P())?e=null:nn(e)||-1!==Zt.indexOf(e)||(fn("createColumn: no column size given, using 12"),e=Gt),j(e,t.offset));return void 0!==t.content&&n.find(".ge-content").html(t.content),St(n,"column",t)},createElement:function(e,t){return De.createElement?De.createElement(e,t):(c("plugin:elements","createElement needs the elements plugin: include dist/plugins/grideditor.elements.js after the editor"),null)},createSection:function(e){return De.createSection?De.createSection(e):(c("plugin:sections","createSection needs the sections plugin: include dist/plugins/grideditor.sections.js after the editor"),null)},createContainer:function(e,t){t=t||{};var n=E[e];return n?St(n.create(t),e,t):(fn('createContainer: no such container type "'+e+'"'),null)},addTab:function(e,t){return Pt(e,"tabs",t)},addAccordionItem:function(e,t){return Pt(e,"accordion",t)},setLocale:function(e){d.locale=e,Lt.settings=Ot(),W(),i.remove(),ee(),le()},getUtility:Ce,setUtility:Te,canvas:g,settings:Ot()};function Vt(e){return!d.plugins||-1!==d.plugins.indexOf(e)}Jt.each(Ht,function(e,t){t.unimplemented&&(Lt[e]=function(){return c(e,e+" is registered but not implemented in this build yet"),null})}),e.data("grideditor",Lt),Ut={canvas:g,settings:d,t:u,warn:fn,containerId:Re,defaultRegion:Ke,createTool:O,createMoveTool:Ze,addSettingsTool:tt,deleteNode:b,place:St,createPaneControls:Ne,makeLabelEditable:Ue,labelIn:Le,unwrapLabels:Ve,suspendToggles:qe,resumeToggles:Be,emit:h,payloadFor:m,operate:v,kindOf:y,view:qt,viewTiers:function(){return rn(p).map(function(e){return e.key})},breakpoints:Xt.map(function(e){return e.key}),getUtility:Ce,setUtility:Te,utilityField:Se,bareStyle:ze,rowFromLayout:_,nodeHtml:ce,toolbarItems:function(e){return i?i.find('[data-ge-toolbar="feature"][data-ge-feature="'+e+'"]'):Jt()}},pe("grid",{},(()=>{for(var e=[],t=1;t<=Gt;t++)e.push(String(t));return{name:"col",values:e.concat(Zt),appliesTo:["column"],labelKey:"utility.col_width",className:function(e,t){return on(an(e),ie(t))},choices:function(){return d.valid_col_sizes.map(String)},label:function(e){return"equal"===e?u("utility.col_equal"):"auto"===e?u("utility.col_auto"):e},write:function(e,t,n,o){return Q(e,null===t?null:ie(t),o,n)},blank:function(e,t){e=t===$t?null:at(e,an(t));return e?u("utility.col_from_row",{count:rt(e.value)}):null}}})()),!1!==d.row_cols&&pe("grid",{},{name:"row-cols",prefix:"row-cols",values:en,appliesTo:["row"],labelKey:"utility.row_cols"}),Jt.each(Jt.fn.gridEditor.containers,function(e,t){Vt(e)&&(E[e]=t(Ut))}),Jt.each(Jt.fn.gridEditor.features,function(e,t){Vt(e)&&(A[e]=t(Ut))}),Jt.each(Jt.fn.gridEditor.utilities,function(t,e){Vt(t)&&(M[t]=e(Ut),(M[t].families||[]).forEach(function(e){pe(t,M[t],e)}))}),Jt.each(A,function(e,t){Jt.each(t.methods||{},function(e,t){De[e]=t})}),(d.plugins||[]).forEach(function(e){E[e]||A[e]||M[e]||c("plugin:"+e,'the "'+e+'" plugin is not loaded: include dist/plugins/grideditor.'+e+".js after the editor")}),r=Jt('<textarea class="ge-html-output"/>').insertBefore(g),ee(),Jt(window).on("scroll",ae),g.on("click",".ge-content",re),g.on("click",".ge-popup-trigger, [data-ge-popup-target]",function(e){g.hasClass("ge-editing")&&e.preventDefault()}),g.on("ge-rte-ready",".ge-content",function(){o("onContentReady",Jt(this)),Ee(Jt(this))}),x()}),this;var e,t,n=this,o=Ft,i=Array.prototype.slice.call(arguments,1),a=Ht[o];if(a){if(a.value)return(e=n.first()).length?(t=e.data("grideditor"))?t[o].apply(t,i):a.noInstance?a.noInstance(e):null:null;n.each(function(){var e=Jt(this).data("grideditor");e&&e[o].apply(e,i)})}else r("method:"+o,'unknown method "'+o+'"');return n},Jt.fn.gridEditor.RTEs={},Jt.fn.gridEditor.containers={},Jt.fn.gridEditor.features={},Jt.fn.gridEditor.utilities={},Jt.fn.gridEditor.t=dn,Jt.fn.gridEditor.locales={en:{"tool.move":"Move","tool.settings":"Settings","tool.add_row":"Add row","tool.add_column":"Add column\n(hold to choose the width)","tool.column_size":"{size} of 12","tool.column_equal":"Equal: shares what the row has left","tool.column_auto":"Auto: as wide as its content","tool.delete_row":"Remove row","tool.delete_column":"Remove col","tool.delete_container":"Remove container","tool.delete_pane":"Remove pane","tool.rename":"Double click to rename","tool.column_narrower":"Make column narrower\n(hold shift for min)","tool.column_wider":"Make column wider\n(hold shift for max)","tool.indent_decrease":"Decrease indent\n(hold shift for none)","tool.indent_increase":"Increase indent\n(hold shift for max)","tool.edit_source":"Edit Source Code","tool.preview":"Preview","tool.id_placeholder":"id","tool.id_title":"Set a unique identifier","tool.classes_placeholder":"classes","tool.classes_title":"Css classes, separated by spaces","tool.toggle_class":'Toggle "{label}" styling',"row.add":"Add row {layout}","row.add_row_cols":"Add a row of {columns} columns, {counts} per row","confirm.title":"Confirm","confirm.ok":"Delete","confirm.cancel":"Cancel","confirm.delete_row":"Delete row?","confirm.delete_column":"Delete column?","confirm.delete_container":"Delete this container and everything in it?","view.all":"All sizes","view.xs":"Phone","view.sm":"Tablet","view.md":"Small desktop","view.lg":"Desktop","view.xl":"Large desktop","view.xxl":"Widescreen","utility.section":"Responsive: {view}","utility.col_width":"Width","utility.col_equal":"Equal","utility.col_auto":"Auto","utility.col_from_row":"From the row: {count}","utility.row_cols":"Columns per row","badge.row_cols":"{count} per row","badge.row_cols_auto":"As wide as their content","utility.default":"Default","utility.inherit":"Inherit: {value} (from {breakpoint})","utility.varies":"Changes at {breakpoints}; choosing here replaces that","error.sortable_missing":"SortableJS not available! Make sure you loaded the Sortable js file; dragging is off without it.","warning.setting_removed":"The {setting} setting was removed in 4.0. Use {replacement} instead.","error.tinymce_missing":"tinyMCE not available! Make sure you loaded the tinyMCE js file.","error.ckeditor_missing":"CKEditor not available! Make sure you loaded the ckeditor and jquery adapter js files.","error.summernote_missing":"Summernote not available! Make sure you loaded the Summernote js file."}}})(jQuery),(a=>{a.fn.gridEditor.RTEs.ckeditor={init:function(i,e){window.CKEDITOR||console.error(a.fn.gridEditor.t(i,"error.ckeditor_missing"));var t=this;e.each(function(){var e,n,o=a(this);o.hasClass("active")||(o.html()==t.initialContent&&o.html("&nbsp;"),o.addClass("active").attr("contenteditable","true"),e=a.extend({},i.ckeditor&&i.ckeditor.config?i.ckeditor.config:{},{on:{instanceReady:function(e){var t;try{t=i.ckeditor.config.on.instanceReady}catch(e){}t&&t.call(this,e),o.trigger("ge-rte-ready"),n.focus()}}}),n=CKEDITOR.inline(o.get(0),e))})},deinit:function(e,t){t.filter(".active").each(function(){var e=a(this);a.each(CKEDITOR.instances,function(e,t){t.destroy()}),e.removeClass("active cke_focus").removeAttr("id").removeAttr("style").removeAttr("spellcheck").removeAttr("contenteditable")})},initialContent:"<p>Lorem initius... </p>"}})(jQuery),(i=>{i.fn.gridEditor.RTEs.summernote={init:function(n,e){jQuery().summernote||console.error(i.fn.gridEditor.t(n,"error.summernote_missing"));var o=this;e.each(function(){var e,t=i(this);t.hasClass("active")||(t.html()==o.initialContent&&t.html(""),t.addClass("active"),e=i.extend(!0,{},n.summernote&&n.summernote.config?n.summernote.config:{},{tabsize:2,airMode:!0,callbacks:{onInit:function(){var e;try{e=n.summernote.config.callbacks.onInit}catch(e){}e&&e.call(this),t.trigger("ge-rte-ready"),t.summernote("focus")}}}),t.summernote(e))})},deinit:function(e,t){t.filter(".active").each(function(){var e=i(this);e.summernote("destroy"),e.removeClass("active").removeAttr("id").removeAttr("style").removeAttr("spellcheck")})},initialContent:"<p>Lorem ipsum dolores</p>"}})(jQuery),(i=>{function a(e){e.removeClass("active").removeClass("ge-rte-active").removeAttr("id").removeAttr("style").removeAttr("spellcheck").removeAttr("contenteditable").removeAttr("data-mce-style")}i.fn.gridEditor.RTEs.tinymce={init:function(e,t){var n,o;window.tinymce?(n=this,o=e.tinymce&&e.tinymce.config?e.tinymce.config:{},t.each(function(){var e,t=i(this);t.hasClass("active")||(t.html()==n.initialContent&&t.html(""),t.addClass("active"),delete(e=i.extend({promotion:!1},o,{target:this,inline:!0,init_instance_callback:function(e){t.data("ge-tinymce-pending-remove")?(t.removeData("ge-tinymce-pending-remove"),e.remove(),a(t)):(t.data("ge-tinymce",e),t.trigger("ge-rte-ready"),e.on("Undo Redo",function(){t.trigger("ge-rte-ready")}),window.requestAnimationFrame(function(){!e.removed&&e.ui&&e.ui.show&&e.ui.show()}),e.on("focus",function(){window.requestAnimationFrame(function(){!e.removed&&e.ui&&e.ui.show&&e.ui.show()})}),e.focus(),o.init_instance_callback&&o.init_instance_callback.call(this,e),o.oninit&&o.oninit.call(this,e))}})).selector,window.tinymce.init(e))})):console.error(i.fn.gridEditor.t(e,"error.tinymce_missing"))},deinit:function(e,t){t.filter(".active").each(function(){var e=i(this),t=e.data("ge-tinymce");t?(e.removeData("ge-tinymce"),t.remove()):e.data("ge-tinymce-pending-remove",!0),a(e)})},initialContent:"<p>Lorem ipsum dolores</p>"}})(jQuery);
9
+ ($t=>{var Ht={getHtml:{value:!0,noInstance:function(e){return e.html()}},getPlainHtml:{value:!0,noInstance:function(e){return pn(e.html())}},init:{},deinit:{},reset:{},destroy:{},remove:{},changeView:{},getView:{value:!0},createRow:{value:!0},createColumn:{value:!0},createElement:{value:!0},createSection:{value:!0},createContainer:{value:!0},addTab:{value:!0},addAccordionItem:{value:!0},setLocale:{},getUtility:{value:!0},setUtility:{value:!0}},Wt=["appendTo","prependTo","insertAfter","insertBefore"],Xt=[{key:"xs",infix:"",colPrefix:"col-",offsetPrefix:"offset-",min:0,preview:400,labelKey:"view.xs"},{key:"sm",infix:"sm",colPrefix:"col-sm-",offsetPrefix:"offset-sm-",min:576,preview:576,labelKey:"view.sm"},{key:"md",infix:"md",colPrefix:"col-md-",offsetPrefix:"offset-md-",min:768,preview:768,labelKey:"view.md"},{key:"lg",infix:"lg",colPrefix:"col-lg-",offsetPrefix:"offset-lg-",min:992,preview:992,labelKey:"view.lg"},{key:"xl",infix:"xl",colPrefix:"col-xl-",offsetPrefix:"offset-xl-",min:1200,preview:1200,labelKey:"view.xl"},{key:"xxl",infix:"xxl",colPrefix:"col-xxl-",offsetPrefix:"offset-xxl-",min:1400,preview:null,labelKey:"view.xxl"}],Yt="all",t="view.all",Qt=[Yt].concat(Xt.map(function(e){return e.key})),Gt=["lg","sm","xs"],Zt=12,en=["equal","auto"],tn=["1","2","3","4","5","6","auto"];function nn(e,t){return"row-cols"+(e.infix?"-"+e.infix:"")+"-"+t}function on(e){return"number"==typeof e}function an(e,t){return"equal"===t?e.infix?"col-"+e.infix:"col":e.colPrefix+t}function rn(e){for(var t=0;t<Xt.length;t++)if(Xt[t].key===e)return Xt[t];return null}function ln(e){return e===Yt?[Xt[0]]:(e=rn(e))?[e]:[]}function sn(e){e=rn(e);return e?e.labelKey:t}var cn={add_column:{size:12,picker:!0,delay:600},elements:{enabled:"auto",selector:"[data-ge-element]",auto:!1},resize:{enabled:!0,handles:"e",balance:"next"},drag:{delay:0,touch_delay:100,threshold:3,animation:150,scroll:!0}},un={sortable_options:"drag",resizable_options:"resize"},n={},dn=0;function fn(e,t,n){var o=$t.fn.gridEditor.locales,i=o[e.locale]||{},e=(e.locale_strings||{})[t];return void 0===(e=void 0===(e=void 0===e?i[t]:e)?o.en[t]:e)&&(r("locale:"+t,'no string for "'+t+'" in any locale, showing the key'),e=t),e.replace(/\{(\w+)\}/g,function(e,t){return n&&void 0!==n[t]?n[t]:e})}function gn(e){window.console&&window.console.warn&&window.console.warn("grid-editor: "+e)}function r(e,t){n[e]||(n[e]=!0,gn(t))}function pn(e){var t=$t(document.implementation.createHTMLDocument("").body),i=(t[0].innerHTML=e,[]);return t.find("*").each(function(){var n=$t(this),o=!1,e=($t.each($t.makeArray(this.attributes),function(e,t){0===t.name.indexOf("data-ge-")&&(n.removeAttr(t.name),o=!0)}),(n.attr("class")||"").split(/\s+/).filter(Boolean)),t=e.filter(function(e){return"column"!==e&&0!==e.indexOf("ge-")});t.length!==e.length&&(o=!0),t.length?n.attr("class",t.join(" ")):n.removeAttr("class"),o&&"DIV"===this.tagName&&!this.attributes.length&&i.push(this)}),i.forEach(function(e){$t(e).replaceWith($t(e).contents())}),t[0].innerHTML}$t.fn.gridEditor=function(Jt){if("string"!=typeof Jt)return this.each(function(R,e){e=$t(e);var i,a,j,N,q,r,d=$t.extend({new_row_layouts:[[12],[6,6],[4,4,4],[3,3,3,3],[2,2,2,2,2,2],[2,8,2],[4,8],[8,4]],row_classes:[],col_classes:[],col_tools:[],row_tools:[],drag_handle:"tool",toolbar_drag:"auto",element_tools:[],element_classes:[],container_classes:[],pane_classes:[],container_tools:[],tab_tools:[],accordion_tools:[],plugins:null,row_cols:!0,utilities:{},elements:cn.elements,custom_filter:"",content_types:["tinymce"],valid_col_sizes:[1,2,3,4,5,6,7,8,9,10,11,12,"equal","auto"],valid_col_offsets:[0,1,2,3,4,5,6,7,8,9,10,11],add_column:cn.add_column,layout_modes:Qt.slice(),default_view:Yt,resize:cn.resize,source_textarea:"",locale:"en",locale_strings:{},callbacks:{},confirm_delete:!0,drag:cn.drag},Jt),p=($t.each(cn,function(e,t){d[e]=$t.extend({},t,d[e])}),$t.each(un,function(e,t){Jt&&void 0!==Jt[e]&&gn($t.fn.gridEditor.t(d,"warning.setting_removed",{setting:e,replacement:t}))}),d.default_view),l=null,s=null,f=null,B={},U=[],L=++dn;function c(e,t){B[e]||(B[e]=!0,gn(t))}function u(e,t){return fn(d,e,t)}var t,n,g=e.addClass("ge-canvas"),V=0,F=[];function m(e,t,n){return $t.extend({kind:e,node:t,parent:t.parent(),canvas:g,breakpoint:p,source:"api"},n||{})}function h(e,t){var n=[e],o=e.replace(/^(before|after)-add-.+$/,"$1-add"),i=(o!==e&&n.push(o),!1);return n.forEach(function(e){e=$t.Event("grideditor:"+e);g.trigger(e,[t]),e.isDefaultPrevented()&&(i=!0)}),n.forEach(function(e){e=d.callbacks[e.replace(/-/g,"_")];"function"==typeof e&&!1===e(t)&&(i=!0)}),!i}function v(e){V++;try{return e()}finally{if(0===--V)for(;F.length;)F.shift()()}}function J(e){0===V?e():F.push(e)}function w(t,n,o,i){e=t;var e,a=$t.fn.gridEditor.containers[e]?"container":e;return v(function(){var e=m(t,n,i);return h("before-add-"+a,e)?(o(),x(),h("after-add-"+a,e),n):null})}function $(e,t){var n,o;d.confirm_delete?window.bootstrap&&window.bootstrap.Modal?(l||((l=$t('<div class="modal fade ge-confirm" tabindex="-1" aria-hidden="true"><div class="modal-dialog modal-dialog-centered"><div class="modal-content"><div class="modal-header"><h5 class="modal-title"></h5><button type="button" class="btn-close" data-bs-dismiss="modal"></button></div><div class="modal-body"><p class="ge-confirm-message"></p></div><div class="modal-footer"><button type="button" class="btn btn-secondary ge-confirm-cancel" data-bs-dismiss="modal"></button><button type="button" class="btn btn-danger ge-confirm-ok"></button></div></div></div></div>').appendTo("body")).find(".modal-title").text(u("confirm.title")),l.find(".btn-close").attr("aria-label",u("confirm.cancel")),l.find(".ge-confirm-cancel").text(u("confirm.cancel")),l.find(".ge-confirm-ok").text(u("confirm.ok"))),o=!1,(n=l).find(".ge-confirm-message").text(e),n.find(".ge-confirm-ok").off("click").on("click",function(){o=!0,window.bootstrap.Modal.getInstance(n[0]).hide()}),n.off("hidden.bs.modal").on("hidden.bs.modal",function(){o&&t()}),n.off("shown.bs.modal").on("shown.bs.modal",function(){n.find(".ge-confirm-ok").trigger("focus")}),window.bootstrap.Modal.getOrCreateInstance(n[0]).show()):window.confirm(e)&&t():t()}function H(){var e;l&&(window.bootstrap&&window.bootstrap.Modal&&(e=window.bootstrap.Modal.getInstance(l[0]))&&e.dispose(),l.remove(),l=null)}function b(t,n,o,i){v(function(){var e=m(t,n,{source:"tool"});h("before-delete",e)&&$(o,function(){v(function(){i(function(){n.remove(),v(function(){x(),h("after-delete",e)})})})})})}function W(n,t,e){var o,i,a;return(e=e||p)!==Yt?(e=rn(e),(o=vt({size:t,offset:ut(n,e)||0})).refused||D(n,e)===o.size?null:{writes:[{tier:e,size:o.size}],cleared:null,size:o.size}):!Xt.some(function(e){return vt({size:t,offset:ut(n,e)||0}).refused})&&(e=Xt[0],i=[],a=[],Xt.slice(1).forEach(function(e){var t=D(n,e);null!==t&&(i.push({tier:e,size:null}),a.push({breakpoint:e.key,value:t}))}),D(n,e)!==t&&i.unshift({tier:e,size:t}),i.length)?{writes:i,cleared:a,size:t}:null}function X(t,e){e.writes.forEach(function(e){pt(t,e.tier,e.size)}),wt(t)}function Y(e,t){return t&&(e.cleared=t),e}function Q(t,e,n,o){o=o||p;var i=He(t),a=W(t,e,o);return!!a&&v(function(){var e=m("column",t,Y({source:n,breakpoint:o,from:i,to:a.size},a.cleared));return h("before-resize",e)?(X(t,a),z(t),h("after-resize",e),!0):(z(t),!1)})}function G(o,i,t){var n=p===Yt,a=n?Xt[0]:rn(p),r=Ye(o),l=(i=Math.min(Math.max(i,0),11),n?Xt.slice(1).filter(function(e){return null!==st(o,e)}):[]);(st(o,a)||0)===i&&!l.length||v(function(){var e=m("column",o,Y({source:t,from:r,to:i},n?l.map(function(e){return{breakpoint:e.key,value:st(o,e)}}):null));return!!h("before-indent",e)&&(mt(o,a,i),l.forEach(function(e){mt(o,e,0)}),(n?Xt:[a]).forEach(function(e){var t,n=ct(o,e);on(n)&&(t=vt({size:n,offset:i,leading:"offset"})).size!==n&&pt(o,e,t.size)}),z(o),h("after-indent",e),!0)})}function Z(e){var t=e.parent();return{parent:t,index:t.children().not(".ge-tools-drawer").index(e)}}function y(n){var o=null;return $t.each(A,function(e,t){!o&&t.kindOf&&(o=t.kindOf(n))}),o||(n.attr("data-ge-container")?n.attr("data-ge-container"):n.hasClass("ge-tab")?"tab":n.hasClass("ge-accordion-item")?"accordion-item":n.hasClass("row")?"row":n.hasClass("column")?"column":n.hasClass("ge-element")?"element":n.hasClass("ge-content")?"content":"node")}function ee(){i=$t('<div class="ge-mainControls" />').insertBefore(r),a=$t('<div class="ge-wrapper ge-top" />').appendTo(i),j=$t('<div class="ge-addRowGroup btn-group" />').appendTo(a),N=$t('<div class="ge-addContainerGroup btn-group ms-1" />'),$t.each(d.new_row_layouts,function(e,t){var n,o,i=!Array.isArray(t),a=$t('<a class="btn btn-sm btn-primary" />').attr("title",i?u("row.add_row_cols",{columns:t.columns,counts:(n=t.row_cols,Xt.filter(function(e){return n&&void 0!==n[e.key]}).map(function(e){return(e.infix?e.key+": ":"")+n[e.key]}).join(", "))}):u("row.add",{layout:t.join("-")})).attr("data-ge-toolbar","row").attr("data-ge-layout",i?JSON.stringify(t):t.join(",")).on("click",function(){var e=_(t);w("row",e,function(){e.appendTo(g)},{parent:g,source:"tool"})&&e[0].scrollIntoView&&e[0].scrollIntoView({behavior:"smooth"})}).appendTo(j),i=(a.append('<i class="bi bi-plus"></i>'),i?(i=t,o=1,$t.each(i.row_cols||{},function(e,t){"auto"!==t&&(o=Math.max(o,parseInt(t,10)||1))}),Array.apply(null,Array(Math.min(o,i.columns||o))).map(function(){return"equal"})):t),r='<div class="row ge-row-icon">';i.forEach(function(e){r+='<div class="column '+an(Xt[0],e)+'"></div>'}),r+="</div>",a.append(r)}),N.appendTo(a),$t.each(E,function(o,i){$t('<a class="btn btn-sm btn-primary ge-add-container" />').attr("title",u(i.labelKey)).attr("data-ge-toolbar","container").attr("data-ge-container-type",o).append('<i class="bi bi-plus"></i>').append($t("<span />").text(u(i.labelKey))).on("click",function(){var e=I(),t=K(Zt).appendTo(e),n=i.create({});t.find("> .ge-content").replaceWith(n),w(o,n,function(){e.appendTo(g)},{parent:g,source:"tool"})}).appendTo(N)});var o=[],e=($t.each(A,function(n,e){(e.toolbar||[]).forEach(function(e,t){t=((e,t,n)=>(e=$t('<a class="btn btn-sm btn-primary ge-add-container ge-add-feature" />').attr("title",u(t.labelKey)).attr("data-ge-toolbar","feature").attr("data-ge-feature",e).attr("data-ge-item",n).append($t("<i />").addClass(t.iconClass||"bi bi-plus")).on("click",function(){var e=t.create();w(t.kind,e,function(){e.appendTo(g)},{parent:g,source:t.source||"tool"})}),"end"!==t.align&&e.append($t("<span />").text(u(t.labelKey))),e))(n,e,t);"end"===e.align?o.push(t):t.appendTo(N)})}),q=$t('<div class="dropdown pull-right ge-layout-mode"><button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-bs-toggle="dropdown"></button><div class="dropdown-menu" role="menu"></div></div>').on("click","a",function(){qt($t(this).attr("data-ge-view"))}).appendTo(a),d.layout_modes.forEach(function(e){$t('<a class="dropdown-item" />').attr("data-ge-view",e).attr("title",u(sn(e))).text(u(sn(e))).appendTo(q.find(".dropdown-menu"))}),q.find("button").text(u(sn(p))),$t('<div class="btn-group pull-right"/>').appendTo(a)),t=$t('<button type="button" class="btn btn-sm btn-primary gm-edit-mode"><i class="bi bi-code-slash"></i></button>').attr("title",u("tool.edit_source")).on("click",function(){(t.hasClass("active")?(g.empty().html(r.val()).show(),x(),r):(k(),r.height(.8*$t(window).height()).val(g.html()).show(),g)).hide(),t.toggleClass("active btn-danger")}).appendTo(e),n=$t('<button type="button" class="btn btn-sm btn-primary gm-preview"><i class="bi bi-eye-fill"></i></button>').attr("title",u("tool.preview")).on("mouseenter",function(){g.removeClass("ge-editing")}).on("click",function(){n.toggleClass("active btn-danger").trigger("mouseleave")}).on("mouseleave",function(){n.hasClass("active")||g.addClass("ge-editing")}).appendTo(e);o.length&&$t('<div class="pull-right ge-toolbar-end" />').append(o).appendTo(a),e=i.find("[data-ge-toolbar]").removeClass("ge-palette-button").off("pointerdown.ge-palette"),("auto"!==d.toolbar_drag?d.toolbar_drag:"drawer"===d.drag_handle)&&e.addClass("ge-palette-button").on("pointerdown.ge-palette",te)}function te(e){var s=$t(e.currentTarget),n=e.pageX,o=e.pageY,c=null;function u(e){if(!c){if(t=e,!(Math.abs(t.pageX-n)+Math.abs(t.pageY-o)>d.drag.threshold))return;c=s.clone().addClass("ge-toolbar-helper").appendTo("body"),g.addClass("ge-dropping")}c.css({left:e.pageX-14,top:e.pageY-14});var t=e.pageX;(t=ne(t,e.pageY))?(f=f||$t('<div class="ge-drop-marker" />'),t.before?f.insertBefore(t.before):f.appendTo(t.region)):oe()}e.button||$t(document).on("pointermove.ge-toolbar",u).on("pointerup.ge-toolbar pointercancel.ge-toolbar",function e(t){var n,o,i,a,r,l;$t(document).off("pointermove.ge-toolbar",u).off("pointerup.ge-toolbar pointercancel.ge-toolbar",e),c&&(c.remove(),g.removeClass("ge-dropping"),oe(),s.one("click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t=ne(t.pageX,t.pageY))&&(n=t,"feature"===(t=s).attr("data-ge-toolbar")?(o=n,i=(r=A[(r=t).attr("data-ge-feature")].toolbar[parseInt(r.attr("data-ge-item"),10)]).create(),xt(o.region,i)||(a=o.region.parentsUntil(g).addBack().first(),(o={region:g,before:a.length?a.next():null}).before&&!o.before.length&&(o.before=null)),w(r.kind,i,function(){o.before?i.insertBefore(o.before):i.appendTo(o.region)},{parent:o.region,source:r.source||"dragdrop"})):(a="container"===t.attr("data-ge-toolbar"),r=t.attr("data-ge-container-type"),l=t=a?E[r].create({}):(e=>/^\s*\{/.test(e||"")?_(JSON.parse(e)):_((e||"").split(",").filter(function(e){return""!==e}).map(ie)))(t.attr("data-ge-layout")),a&&!n.region.is(".column")&&(l=I(),K(Zt).appendTo(l).find("> .ge-content").replaceWith(t)),w(a?r:"row",t,function(){n.before?l.insertBefore(n.before):l.appendTo(n.region)},{parent:n.region,source:"dragdrop"})))})}function ne(e,t){var n,e=e-window.scrollX,o=t-window.scrollY,t=document.elementFromPoint(e,o);return!t||!(e=$t(t).closest([".column",".ge-canvas"].concat(_t("regions")).join(", "))).length||e[0]!==g[0]&&!g[0].contains(e[0])?null:(n=null,e.children(yt()).each(function(){var e;n||(e=this.getBoundingClientRect(),o<e.top+e.height/2&&(n=$t(this)))}),{region:e,before:n})}function oe(){f&&f.remove()}function ie(e){return/^\d+$/.test(String(e))?parseInt(e,10):e}function _(e){var n=I();if(Array.isArray(e))e.forEach(function(e){K(e).appendTo(n)});else{$t.each(e.row_cols||{},function(e,t){e=rn(e);e&&-1!==tn.indexOf(String(t))&&n.addClass(nn(e,t))});for(var t=0;t<(e.columns||0);t++)K(null).appendTo(n)}return n}function ae(e){var t=$t(window);t.scrollTop()>i.offset().top&&t.scrollTop()<g.offset().top+g.height()?a.hasClass("ge-top")&&a.css({left:a.offset().left,width:a.outerWidth()}).removeClass("ge-top").addClass("ge-fixed"):a.hasClass("ge-fixed")&&a.css({left:"",width:""}).removeClass("ge-fixed").addClass("ge-top")}function re(e){var t,n;$t(this).hasClass("ge-rte-active")||$t(this).is(":visible")&&(n=Ut(t=$t(this).data("ge-content-type")))&&(n.available&&!n.available()?n.missingKey&&console.error(u(n.missingKey)):(n.bundled&&c("text-bundled:"+t,"the "+t+" text editor is the copy in the main bundle, which 6.0 will not include: load dist/plugins/grideditor."+t+".js after the editor"),$t(this).addClass("ge-rte-active"),n.start($t(this))))}function le(){k(),x()}function x(){var e;It(!0),g.addClass("ge-editing"),g.toggleClass("ge-drag-drawer","drawer"===d.drag_handle),g.find('.column, div[class*="col-"], div.col').each(function(){var t,e=$t(this).addClass("column");t=e,Xt.filter(function(e){return null!==D(t,e)}).length||ot(e.parent())||pt(e,Xt[0],Zt)}),g.find(".column").each(function(){var e=$t(this),t=$t();e.children().each(function(){var e=$t(this);e.is(".ge-tools-drawer, .ge-resize-handle")||(t=e.is(".row, .ge-content, [data-ge-container]")?Kt(t):t.add(e))}),Kt(t)}),g.find(".row").each(function(){var t,i,a,r,e,n=$t(this);n.find("> .ge-tools-drawer").length||(et(t=$t('<div class="ge-tools-drawer" />').prependTo(n)),nt(t,n,d.row_classes),d.row_tools.forEach(function(e){O(t,e.title||"",e.className||"",e.iconClass||"bi bi-wrench",e.on)}),O(t,u("tool.delete_row"),"ge-delete-row","bi bi-trash",function(){b("row",n,u("confirm.delete_row"),function(e){n.slideUp(e)})}),O(t,u("tool.add_column"),"ge-add-column","bi bi-plus-circle",function(){$e()||Je(n,it(n,P())?null:d.add_column.size)}),i=t.find("> .ge-add-column"),a=n,d.add_column.picker&&(r=null,e=function(){window.clearTimeout(r),r=null},i.on("mouseenter mousedown",function(){r||s||(r=window.setTimeout(function(){var e,n,o;r=null,e=i,n=a,$e(),o=ht(n,P()),e.closest(".ge-tools-drawer").addClass("ge-picker-open"),s=$t('<div class="ge-size-picker" />').appendTo(e),d.valid_col_sizes.forEach(function(t){var e;$t('<a class="ge-size" />').attr("data-ge-size",t).attr("title","equal"!==(e=t)?"auto"!==e?u("tool.column_size",{size:e}):u("tool.column_auto"):u("tool.column_equal")).toggleClass("ge-size-tight",on(t)&&o<t).toggleClass("ge-size-flex",!on(t)).text(on(t)?t:an(Xt[0],t)).on("click",function(e){e.preventDefault(),e.stopPropagation(),$e(),Je(n,t)}).appendTo(s)}),e.one("mouseleave",function(){window.setTimeout(function(){s&&!s.is(":hover")&&$e()},400)})},d.add_column.delay))}),i.on("mouseleave",e),i.on("mouseup",e)))}),g.find(".column").each(function(){var t,n=$t(this);n.find("> .ge-tools-drawer").length||(et(t=$t('<div class="ge-tools-drawer" />').prependTo(n)),O(t,u("tool.column_narrower"),"ge-decrease-col-width","bi bi-dash-lg",function(e){Q(n,e.shiftKey?Ge(d.valid_col_sizes):Qe(d.valid_col_sizes.filter(on),We(n),-1),"tool")}),O(t,u("tool.column_wider"),"ge-increase-col-width","bi bi-plus-lg",function(e){Q(n,e.shiftKey?(e=>(e=ht(e.parent(),P(),e)-Ye(e),Math.min(Ze(d.valid_col_sizes),Math.max(e,1))))(n):Qe(d.valid_col_sizes.filter(on),We(n),1),"tool")}),O(t,u("tool.indent_decrease"),"ge-decrease-col-offset","bi bi-text-indent-right",function(e){G(n,e.shiftKey?Ge(d.valid_col_offsets):Qe(d.valid_col_offsets,Ye(n),-1),"tool")}),O(t,u("tool.indent_increase"),"ge-increase-col-offset","bi bi-text-indent-left",function(e){G(n,e.shiftKey?(e=>(e=ht(e.parent(),P(),e)-We(e),Math.min(Ze(d.valid_col_offsets),Math.max(e,0))))(n):Qe(d.valid_col_offsets,Ye(n),1),"tool")}),nt(t,n,d.col_classes),d.col_tools.forEach(function(e){O(t,e.title||"",e.className||"",e.iconClass||"bi bi-wrench",e.on)}),O(t,u("tool.delete_column"),"ge-delete-column","bi bi-trash",function(){b("column",n,u("confirm.delete_column"),function(e){n.animate({opacity:"hide",width:"hide",height:"hide"},400,e)})}),O(t,u("tool.add_row"),"ge-add-row","bi bi-plus-circle",function(){var e=I();w("row",e,function(){n.append(e)},{parent:n,source:"tool"})}))}),g.find("[data-ge-container]").each(function(){var t,e,n,o,i=$t(this),a=S(i),r=E[a];r?(i.addClass("ge-container ge-container-"+a),r.mark(i),i.find("> .ge-tools-drawer").length||(t=i,e=a,n=r,et(o=$t('<div class="ge-tools-drawer ge-container-drawer" />').prependTo(t)),nt(o,t,d.container_classes),d.container_tools.forEach(function(e){O(o,e.title||"",e.className||"",e.iconClass||"bi bi-wrench",e.on)}),n.tools&&n.tools(o,t),O(o,u("tool.delete_container"),"ge-delete-container","bi bi-trash",function(){b(e,t,u("confirm.delete_container"),function(e){t.slideUp(e)})}),n.addPane&&O(o,u(n.addPaneKey),"ge-add-pane","bi bi-plus-circle",function(){var e=n.addPane(t,{});w(n.paneKind,e,function(){},{parent:t,source:"tool",container:t})}))):c("container:"+a,'unknown container type "'+a+'"')}),o("onInit"),window.Sortable?(kt(g.find(".row"),{draggable:".column",group:"column"}),kt(g.add(g.find(".column")),{draggable:yt(),group:"block",accepts:xt}),(e=_t("regions")).length&&kt(g.find(e.join(", ")),{draggable:">"+yt(),group:"block",accepts:xt}),o("onSortable",kt)):c("sortable_missing",u("error.sortable_missing")),d.resize.enabled&&g.find(".column").each(function(){var n=$t(this);n.find("> .ge-resize-handle").length||($t('<span class="ge-resize-size" />').appendTo(n.find("> .ge-tools-drawer")),$t.each(String(d.resize.handles).split(",").map(function(e){return e.trim()}).filter(function(e){return"e"===e||"w"===e}),function(e,t){$t('<span class="ge-resize-handle" />').addClass("ge-resize-"+t).attr("data-ge-edge",t).on("pointerdown",zt).appendTo(n)}))}),jt(p),Ee(g)}function k(){g.removeClass("ge-editing ge-drag-drawer ge-dropping");g.find(".ge-content").each(function(){var e=$t(this),t=Ut(e.data("ge-content-type"));t&&t.stop(e),e.removeClass("ge-rte-active")});$e(),oe(),g.find(".ge-tools-drawer").remove(),o("onDeinit"),Ae(g),g.find("[data-ge-row-cols]").removeAttr("data-ge-row-cols"),g.find("[data-ge-container]").each(function(){var e=$t(this),t=E[S(e)];t&&t.unmark(e),e.removeClass("ge-container ge-container-"+S(e)),e.attr("class")||e.removeAttr("class")}),$t.each(U,function(e,t){t.destroy()}),U=[],g.find(".ge-resize-handle").remove(),g.find(".ge-resize-size").remove(),wt(g),It(!1)}function se(){k(),wt(g);var e=g.html();return x(),e}function ce(e){k(),wt(e);e=e[0].outerHTML;return x(),e}function ue(){k(),H(),i.remove(),r.remove(),$t(window).off("scroll",ae),g.off("click",".ge-content",re),g.off("ge-rte-ready",".ge-content"),g.removeData("grideditor")}function o(n,o){$t.each(E,function(e,t){t[n]&&t[n](o)}),$t.each(A,function(e,t){t[n]&&t[n](o)}),$t.each(M,function(e,t){t[n]&&t[n](o)})}d.source_textarea&&(0<(t=$t(d.source_textarea).val()).length&&0==$t("<div>"+t+"</div>").find(".row").addBack(".row").length&&(n=I(),(n=K(12).appendTo(n)).find(".ge-content").html(t),t=n.html()),e.html(t)),e.children().length&&!e.find("div.row").length&&(n=e.children(),$t('<div class="row"><div class="col-lg-12"/></div>').appendTo(e).find(".col-lg-12").append(n));var C={},de=".row, .column, .ge-element, [data-ge-container]",fe="data-ge-preview",ge=!1;function pe(e,t,n){var o=n.name||n.prefix;C[o]?gn('the "'+e+'" plugin declares the utility "'+o+'", which the "'+C[o].plugin+'" plugin already declared: ignored'):C[o]={plugin:e,family:$t.extend({},n,{name:o,values:n.values.map(String),appliesTo:n.appliesTo||t.appliesTo||["row","column"]})}}function me(e,t){return C[e]?C[e].family:(c("utility:"+e,t+"("+JSON.stringify(e)+"): no loaded plugin declares that utility"),null)}function he(e,t){return-1!==e.appliesTo.indexOf(t)||E[t]&&-1!==e.appliesTo.indexOf("container")}function ve(t){return $t.map(C,function(e){return he(e.family,t)?e.family:null})}function we(e,t,n){return e.className?e.className(t.key,n):e.prefix+(t.infix?"-"+t.infix:"")+"-"+n}function T(e,t,n){for(var o=(e.attr("class")||"").split(/\s+/),i=0;i<t.values.length;i++)if(-1!==o.indexOf(we(t,n,t.values[i])))return t.values[i];return null}function be(e,t,n){for(var o=Xt.indexOf(n)-1;0<=o;o--){var i=T(e,t,Xt[o]);if(null!==i)return{tier:Xt[o],value:i}}return null}function ye(e,t,n){var o=T(e,t,n);return null!==o?o:(o=be(e,t,n))?o.value:null}function _e(t,n){return Xt.map(function(e){return{tier:e,value:T(t,n,e)}}).filter(function(e){return null!==e.value})}function xe(t,n,o,e){n.values.forEach(function(e){t.removeClass(we(n,o,e))}),null!==e&&t.addClass(we(n,o,e)),t.attr("class")||t.removeAttr("class")}function ke(e,t,n){return n===Yt?T(e,t,Xt[0]):ye(e,t,rn(n))}function Ce(e,t,n){e=$t(e).first();var o,t=me(t,"getUtility");return t&&e.length?null===(o=void 0===n?p:Nt(n))?(gn("getUtility("+JSON.stringify(n)+"): no such layout mode"),null):ke(e,t,o):null}function Te(t,n,o,i){i="string"==typeof i?{view:i}:i||{},t=$t(t).first();var a,r,l,e,s,c,u,d,f,g=me(n,"setUtility");return!(!g||!t.length)&&(null===(a=void 0===i.view?p:Nt(i.view))?(gn("setUtility("+JSON.stringify(i.view)+"): no such layout mode"),!1):null!==(o=null==o||""===o?null:String(o))&&-1===g.values.indexOf(o)?(gn("setUtility: "+JSON.stringify(o)+' is not a value of "'+n+'", which takes '+JSON.stringify(g.values)),!1):(r=y(t),he(g,r)?g.write?g.write(t,o,a,i.source||"api"):(e=t,s=g,u=o,!!(l=(c=a)!==Yt?T(e,s,c=rn(c))===u?null:{writes:[{tier:c,value:u}],cleared:[]}:(d=[],f=[],_e(e,s).forEach(function(e){e.tier!==Xt[0]&&(d.push({tier:e.tier,value:null}),f.push({breakpoint:e.tier.key,value:e.value}))}),T(e,s,Xt[0])!==u&&d.unshift({tier:Xt[0],value:u}),d.length?{writes:d,cleared:f}:null))&&v(function(){var e=m(r,t,{family:n,breakpoint:a,tiers:l.writes.map(function(e){return e.tier.key}),from:ke(t,g,a),to:o,cleared:l.cleared,source:i.source||"api"});return h("before-utility",e)?(l.writes.forEach(function(e){xe(t,g,e.tier,e.value)}),z(t),h("after-utility",e),!0):(z(t),!1)})):(gn('setUtility: "'+n+'" does not apply to a '+r),!1)))}function ze(t,e,n){var o=me(e,"bareStyle");return t=$t(t).first(),o&&t.length?(e=t.attr("class"),Xt.forEach(function(e){xe(t,o,e,null)}),n=getComputedStyle(t[0]).getPropertyValue(n),void 0===e?t.removeAttr("class"):t.attr("class",e),n):null}function z(e){var t=e.children(".ge-tools-drawer").children(".ge-details");t.children(".ge-classes").val(tt(e).join(" ")),t.children(".ge-utilities").each(function(){Pe($t(this))}),Ee(e)}function Ee(e){var t,l;Ae(e),p!==Yt&&(t=e,l=rn(p),(e=>e.find(de).addBack(de))(t).each(function(){var e,n,o,i=$t(this),a=y(i),r={};ve(a).forEach(function(e){e.preview&&_e(i,e).length&&$t.extend(r,e.preview(ye(i,e,l),i,a))}),"column"===a&&$t.extend(r,((e,t)=>{var n=rt(e,t);return n?{flex:"0 0 auto",width:"auto"===n.value?"auto":100/parseInt(n.value,10)+"%","max-width":"100%"}:!ot(e.parent())||at(e,t)?{}:{flex:"0 0 auto",width:"100%","max-width":"100%"}})(i,l)),$t.each(M,function(e,t){t.preview&&$t.extend(r,t.preview(i,a,l.key))}),$t.isEmptyObject(r)||(n=(e=i)[0].style,o={},$t.each(r,function(e,t){o[e]=[n.getPropertyValue(e),n.getPropertyPriority(e)],n.setProperty(e,String(t),"important")}),e.attr(fe,JSON.stringify(o)))})),e.find(".row").addBack(".row").each(function(){var e=$t(this),t=!1===d.row_cols?null:p===Yt?it(e,Xt[0])||null:it(e,rn(p));t?e.attr("data-ge-row-cols",lt(t.value)):e.removeAttr("data-ge-row-cols")}),o("onRefresh",e)}function Ae(e){e.find("["+fe+"]").addBack("["+fe+"]").each(function(){var e=$t(this),n=this.style,t={};try{t=JSON.parse(e.attr(fe))||{}}catch(e){}$t.each(t,function(e,t){t&&t[0]?n.setProperty(e,t[0],t[1]):n.removeProperty(e)}),e.removeAttr(fe),e.attr("style")||e.removeAttr("style")})}function Me(e,t){var n=$t('<label class="ge-utility" />').attr("data-ge-family",t.name);return $t('<span class="ge-utility-label" />').text(t.labelKey?u(t.labelKey):t.name).appendTo(n),$t("<select />").appendTo(n).on("change",function(){Te(e,t.name,this.value,{source:"panel"})}),$t('<small class="ge-utility-note" />').appendTo(n),n}function Se(e,t){var t=me(t,"utilityField");return t?(Oe(t=Me(e,t),e),t):$t()}function Pe(e){var t=e.data("ge-node");e.children(".ge-utilities-toggle").text(u("utility.section",{view:u(sn(p))})),e.find(".ge-utility").each(function(){Oe($t(this),t)})}function Oe(e,t){var n,o,i,a,r=C[e.attr("data-ge-family")].family,l=e.children("select").empty(),s=r.choices?r.choices(t,y(t)):r.values,c="";p===Yt?(n=T(t,r,Xt[0]),o=u("utility.default"),(a=_e(t,r).filter(function(e){return e.tier!==Xt[0]})).length&&(c=u("utility.varies",{breakpoints:a.map(function(e){return e.tier.key}).join(", ")}))):(a=rn(p),i=be(t,r,a),n=T(t,r,a),o=i?u("utility.inherit",{value:De(r,i.value),breakpoint:i.tier.key}):u("utility.default"),(a=r.blank?r.blank(t,p):null)&&null===n&&(o=a)),null!==n&&-1===s.indexOf(n)&&(s=s.concat([n])),$t('<option value="" />').text(o).appendTo(l),s.forEach(function(e){$t("<option />").attr("value",e).text(De(r,e)).appendTo(l)}),l.val(null===n?"":n),e.children(".ge-utility-note").text(c).toggle(""!==c)}function De(e,t){return e.label?e.label(t):t}var E={},Ie={},A={},M={},Ke={},Re=0;function je(e){return"ge-"+e+"-"+ ++Re+"-"+Math.random().toString(36).slice(2,6)}function Ne(){var e=I();return K(Zt).appendTo(e),e}function S(e){return e.attr("data-ge-container")}function qe(e,t,n,o,i){var a=$t('<div class="ge-tools-drawer ge-pane-drawer" />').prependTo(e);return et(a),nt(a,e,d.pane_classes),n.forEach(function(e){O(a,e.title||"",e.className||"",e.iconClass||"bi bi-wrench",e.on)}),O(a,u("tool.delete_pane"),"ge-delete-pane","bi bi-trash",function(){b(t,e,o,function(e){i(e)})}),a}function Be(e){e.find("[data-bs-toggle], [data-bs-dismiss]").addBack("[data-bs-toggle], [data-bs-dismiss]").each(function(){var n=$t(this);["toggle","dismiss"].forEach(function(e){var t=n.attr("data-bs-"+e);void 0!==t&&n.attr("data-ge-bs-"+e,t).removeAttr("data-bs-"+e)})})}function Ue(e){e.find("[data-ge-bs-toggle], [data-ge-bs-dismiss]").addBack("[data-ge-bs-toggle], [data-ge-bs-dismiss]").each(function(){var n=$t(this);["toggle","dismiss"].forEach(function(e){var t=n.attr("data-ge-bs-"+e);void 0!==t&&n.attr("data-bs-"+e,t).removeAttr("data-ge-bs-"+e)})})}function Le(t){var n;t.data("ge-editable")||(n=t.closest("[data-bs-toggle], [data-ge-bs-toggle]"),t.data("ge-editable",!0).attr("title",u("tool.rename")).on("dblclick",function(e){e.preventDefault(),e.stopPropagation(),Be(n),t.attr("contenteditable","true").trigger("focus"),window.getSelection().selectAllChildren(t[0])}).on("keydown",function(e){"true"===t.attr("contenteditable")&&"Enter"===e.key&&(e.preventDefault(),t.trigger("blur"))}).on("blur",function(){t.removeAttr("contenteditable"),Ue(n)}))}function Ve(e){var t=e.find("> .ge-pane-label");return t.length||(t=$t('<span class="ge-pane-label" />').text(e.text().trim()),e.empty().append(t)),t}function Fe(e){e.find(".ge-pane-label").each(function(){$t(this).removeData("ge-editable").contents().unwrap()})}function Je(e,t){var n=K(t);w("column",n,function(){e.append(n)},{parent:e,source:"tool"})}function $e(){return s&&(s.closest(".ge-tools-drawer").removeClass("ge-picker-open"),s.remove(),s=null,1)}function P(){return p===Yt?Xt[Xt.length-1]:rn(p)}function He(e){var t=P();return rt(e,t)?null:null===(e=ct(e,t))?Zt:e}function We(e){var t=He(e);return on(t)?t:(t=Math.round(e.outerWidth()/Xe(e.parent())*Zt),Math.min(Math.max(t,1),Zt))}function Xe(e){var t=window.getComputedStyle(e[0]);return e[0].clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)}function Ye(e){return ut(e,P())||0}function Qe(e,n,t){var o=e.indexOf(n);return-1===o?e.reduce(function(e,t){return Math.abs(t-n)<Math.abs(e-n)?t:e},e[0]):e[Math.min(Math.max(o+t,0),e.length-1)]}function Ge(e){return e.filter(on).reduce(function(e,t){return Math.min(e,t)},Zt)}function Ze(e){return e.filter(on).reduce(function(e,t){return Math.max(e,t)},0)}function et(e){"drawer"!==d.drag_handle&&O(e,u("tool.move"),"ge-move","bi bi-arrows-move")}function O(e,t,n,o,i){var a=$t('<a title="'+t+'" class="'+n+'"><i class="'+o+'"></i></a>').appendTo(e);"function"==typeof i&&a.on("click",i),"object"==typeof i&&$t.each(i,function(e,t){a.on(e,t)})}function tt(e){return(e.attr("class")||"").split(/\s+/).filter(function(e){return""!==e&&!(t=>"row"===t||"column"===t||/^(ge-|ui-)/.test(t)||/^col(-(sm|md|lg|xl|xxl))?(-auto)?$/.test(t)||Xt.some(function(e){return new RegExp("^("+e.colPrefix+"|"+e.offsetPrefix+")\\d+$").test(t)}))(e)})}function nt(n,o,e){var t=((n,e)=>{var t=$t('<div class="ge-details" />'),o=($t('<input class="ge-id" />').attr("placeholder",u("tool.id_placeholder")).val(n.attr("id")).attr("title",u("tool.id_title")).appendTo(t).on("change",function(){""===this.value?n.removeAttr("id"):n.attr("id",this.value)}),$t('<input class="ge-classes" />').attr("placeholder",u("tool.classes_placeholder")).attr("title",u("tool.classes_title")).val(tt(n).join(" ")).appendTo(t).on("change",function(){var t,e;t=n,e=this.value,tt(t).forEach(function(e){t.removeClass(e)}),e.split(/\s+/).forEach(function(e){""!==e&&t.addClass(e)}),t.attr("class")||t.removeAttr("class"),z(n)}),$t('<div class="btn-group" />').appendTo(t));return e.forEach(function(e){var t=$t('<a class="btn btn-sm btn-default" />').html(e.label).attr("title",e.title||u("tool.toggle_class",{label:e.label})).toggleClass("active btn-primary",n.hasClass(e.cssClass)).on("click",function(){t.toggleClass("active btn-primary"),n.toggleClass(e.cssClass,t.hasClass("active")),z(n)}).appendTo(o)}),(e=(n=>{var e,t,o=y(n),i=ve(o).filter(function(e){return!1!==e.panel}).map(function(e){return Me(n,e)});return $t.each(M,function(e,t){t=t.panel?t.panel(n,o):null;t&&t.length&&i.push(t)}),i.length?(e=$t('<div class="ge-utilities" />').toggleClass("ge-open",ge).data("ge-node",n),$t('<a class="ge-utilities-toggle" />').appendTo(e).on("click",function(){ge=!e.hasClass("ge-open"),g.find(".ge-utilities").toggleClass("ge-open",ge)}),t=$t('<div class="ge-utilities-body" />').appendTo(e),i.forEach(function(e){e.appendTo(t)}),Pe(e),e):null})(n))&&e.appendTo(t),t})(o,e||[]),i=(O(n,u("tool.settings"),"ge-settings","bi bi-gear-fill",function(){t.toggle()}),y(o));return $t.each(M,function(e,t){t.drawerTools&&t.drawerTools(n,o,i)}),$t.each(A,function(e,t){t.drawerTools&&t.drawerTools(n,o,i)}),t.appendTo(n)}function ot(n){return n.hasClass("row")&&Xt.some(function(t){return tn.some(function(e){return n.hasClass(nn(t,e))})})}function it(e,t){if(e.hasClass("row"))for(var n=Xt.indexOf(t);0<=n;n--)for(var o=0;o<tn.length;o++)if(e.hasClass(nn(Xt[n],tn[o])))return{tier:n,value:tn[o]};return null}function at(e,t){for(var n=Xt.indexOf(t);0<=n;n--){var o=D(e,Xt[n]);if(null!==o)return{tier:n,size:o}}return null}function rt(e,t){var n=it(e.parent(),t);return n&&(!(e=at(e,t))||n.tier>e.tier||n.tier===e.tier&&"equal"===e.size)?n:null}function lt(e){return"auto"===e?u("badge.row_cols_auto"):u("badge.row_cols",{count:e})}function D(e,t){var n=ft(e,t.colPrefix);return null!==n?n:e.hasClass(an(t,"auto"))?"auto":e.hasClass(an(t,"equal"))?"equal":null}function st(e,t){return ft(e,t.offsetPrefix)}function ct(e,t){return dt(e,t,D)}function ut(e,t){return dt(e,t,st)}function dt(e,t,n){for(var o=Xt.indexOf(t);0<=o;o--){var i=n(e,Xt[o]);if(null!==i)return i}return null}function ft(e,t){t=new RegExp("(?:^|\\s)"+t+"(\\d+)(?:\\s|$)").exec(e.attr("class")||"");return t?parseInt(t[1],10):null}function gt(e,t,n){var o=(e.attr("class")||"").split(/\s+/).filter(function(e){return""!==e&&!new RegExp("^"+t+"\\d+$").test(e)});null!==n&&o.push(t+n),e.attr("class",o.join(" "))}function pt(t,n,e){gt(t,n.colPrefix,null),en.forEach(function(e){t.removeClass(an(n,e))}),null!=e&&t.addClass(an(n,e))}function mt(e,t,n){gt(e,t.offsetPrefix,n||null)}function ht(e,n,o){var i=0;return e.children(".column").each(function(){var e,t=$t(this);o&&t[0]===o[0]||(e=(e=rt(t,n))?"auto"===(e=e).value?0:Zt/parseInt(e.value,10):ct(t,n),i+=(on(e)?e:0)+(ut(t,n)||0))}),Zt-i}function vt(e){var t=null==e.size?null:e.size,n=null==e.offset?0:e.offset,n=Math.min(Math.max(n,0),11);return null===t||!on(t)||(t=Math.min(Math.max(t,1),Zt))+n<=Zt?{size:t,offset:n,refused:!1}:"offset"===e.leading?{size:Zt-n,offset:n,refused:!1}:{size:null,offset:n,refused:!0}}function wt(e){e.find(".column").addBack(".column").each(function(){var e=$t(this);e.css({width:"",height:"",left:"",top:""}),e.attr("style")||e.removeAttr("style")})}function bt(e){return"ge-"+e+"-"+L}function yt(){return[".row",".ge-content","[data-ge-container]"].concat(_t("blocks")).join(", ")}function _t(t){return $t.map(A,function(e){return e[t]||null})}function xt(n,o){var i=!0;return $t.each(A,function(e,t){i&&t.accepts&&!1===t.accepts(n,o)&&(i=!1)}),i}function kt(e,i){var t,a,r;e.length&&window.Sortable&&(t="drawer"===d.drag_handle,a="drawer"===d.drag_handle?".ge-tools-drawer > a, .ge-details, input, textarea, button, select, option":"input, textarea, button, select, option",r=0,e.each(function(){var n=this,o=i.group?{name:bt(i.group)}:{name:bt(i.draggable+"-"+ ++r),pull:!1,put:!1};i.group&&i.accepts&&(o.put=function(e,t,n){return t.options.group.name===o.name&&i.accepts($t(e.el),$t(n))}),U.push(window.Sortable.create(n,$t.extend({group:o,draggable:i.draggable,handle:t?".ge-tools-drawer":".ge-tools-drawer .ge-move",filter:function(e,t){return!!$t(e.target).closest(a,n).length||!t||t.parentNode!==n},preventOnFilter:!1,forceFallback:!0,fallbackOnBody:!0,ghostClass:"ge-drag-placeholder",chosenClass:"ge-drag-chosen",dragClass:"ge-drag-helper",fallbackClass:"ge-drag-helper",animation:d.drag.animation,delay:d.drag.delay||d.drag.touch_delay,delayOnTouchOnly:!d.drag.delay,touchStartThreshold:d.drag.threshold,scroll:d.drag.scroll,onStart:Ct,onEnd:Tt},i.options||{})))}))}function Ct(e){var t=$t(e.item),n=Z(t);t.data("ge-move-from",n),t.removeData("ge-move-canceled"),v(function(){h("before-move",m(y(t),t,{parent:n.parent,source:"dragdrop",from:n}))||t.data("ge-move-canceled",!0)})}function Tt(e){var t,n,o,i,a=$t(e.item),r=a.data("ge-move-from")||Z(a);a.removeData("ge-move-from"),a.data("ge-move-canceled")?(a.removeData("ge-move-canceled"),e=a,!(n=(t=r).parent.children().not(".ge-tools-drawer").not(e)).length||t.index>=n.length?e.appendTo(t.parent):e.insertBefore(n.eq(t.index))):(o=Z(a)).parent[0]===r.parent[0]&&o.index===r.index||(i=a.closest("[data-ge-container]"),(e=E[S(i)])&&e.afterPaneMove&&e.afterPaneMove(i,a,r),v(function(){h("after-move",m(y(a),a,{parent:o.parent,source:"dragdrop",from:r,to:o,container:i.length?i:void 0}))}))}function zt(e){var t,n,s=$t(e.currentTarget),c=s.parent(),o="w"===s.attr("data-ge-edge"),i=e.pageX,a=c.outerWidth();function u(e){e=e.pageX-i;return Math.max(1,a+(o?-e:e))}function d(e){var t;c.css("width",u(e)+"px"),t=c,e=u(e),Mt(t,St(Et(t,e)))}e.preventDefault(),n=He(t=c),v(function(){return h("before-resize",m("column",t,{source:"dragdrop",from:n,to:null}))})&&(t.data("ge-resize-from",n),t.data("ge-resize-units",We(t)),Mt(t,St(t.data("ge-resize-units"))),1)&&(c.addClass("ge-resizing"),void 0!==e.pointerId&&s[0].setPointerCapture&&s[0].setPointerCapture(e.pointerId),s.on("pointermove",d).on("pointerup pointercancel",function e(t){var o,i,a,r,l;s.off("pointermove",d).off("pointerup pointercancel",e),c.removeClass("ge-resizing"),o=c,t=u(t),a=o.data("ge-resize-from"),r=o.data("ge-resize-units"),l=Et(o,t),o.removeData("ge-resize-from").removeData("ge-resize-units"),Mt(o,""),wt(o),void 0!==a&&l!==r&&(i=W(o,l))&&v(function(){var e,t,n;X(o,i),t=l-r,(e=At(e=o))&&t&&on(n=He(e))&&(n=W(e,n-t))&&(X(e,n),z(e)),z(o),h("after-resize",m("column",o,Y({source:"dragdrop",from:a,to:i.size},i.cleared)))})}))}function Et(e,t){var t=Math.round(t/Xe(e.parent())*Zt),n=At(e),o=n?He(n):null,i=e.data("ge-resize-units"),n=n&&on(o)?i+o-Ge(d.valid_col_sizes):Zt-Ye(e);return Math.min(Math.max(t,Ge(d.valid_col_sizes)),Math.max(n,Ge(d.valid_col_sizes)),Ze(d.valid_col_sizes))}function At(e){return"next"===d.resize.balance&&(e=e.nextAll(".column").first()).length?e:null}function Mt(e,t){e.find("> .ge-tools-drawer > .ge-resize-size").text(t)}function St(e){return(p===Yt?Xt[0]:P()).colPrefix+e}function I(){return $t('<div class="row" />')}function Pt(e,t,n){var o,i,a=null;return Wt.forEach(function(e){null===a&&n&&void 0!==n[e]&&(a=e)}),null===a?e:(i=$t(n[a]),o="appendTo"===a||"prependTo"===a?i:i.parent(),i=function(){return w(t,e,function(){e[a](n[a])},{parent:o,source:n.source||"api"})},0<V?(J(i),e):i())}function Ot(e,t,n){e=$t(e),n=n||{};var o=E[S(e)];return o&&S(e)===t?(n=o.addPane(e,n),w(o.paneKind,n,function(){},{parent:e,source:"api",container:e})):(gn("this is not a "+t+" container"),null)}function Dt(){var n={};return $t.each(d,function(e,t){n[e]=Array.isArray(t)?t.slice():t}),Object.freeze(n)}function K(e,t){var n=Ut(d.content_types[0]),n=$t('<div class="column"/>').append(Rt().html(n?n.initialContent:"")),o=ln(p)[0],t=vt({size:e,offset:t||0,leading:"offset"});return pt(n,o,null===t.size?e:t.size),mt(n,o,t.offset),n}function It(n){d.custom_filter.length&&$t.each(d.custom_filter,function(e,t){(t="string"==typeof t?window[t]:t)(g,n)})}function Kt(e){var t;return e.length&&(t=Rt().insertAfter(e.last()),e.appendTo(t)),$t()}function Rt(){var e=d.content_types[0],t=$t('<div class="ge-content"/>');return e&&t.addClass("ge-content-type-"+e).attr("data-ge-content-type",e),t}function jt(t){p=t,Qt.forEach(function(e){g.toggleClass("ge-layout-"+e,e===t)}),q.find("button").text(u(sn(t)))}function Nt(e){return"number"==typeof e?(c("changeView-index","changeView("+e+"): layout modes are identified by breakpoint key now, so pass one of "+JSON.stringify(Qt)+". Numeric indexes still work, but they mean what they meant in 2.x ("+Gt.join(", ")+") and will be dropped."),Gt[e]||null):-1===Qt.indexOf(e)?null:e}function qt(e){var t=Nt(e);null===t?gn("changeView("+JSON.stringify(e)+"): no such layout mode"):(e=p,jt(t),t!==e&&(g.find(".ge-utilities").each(function(){Pe($t(this))}),Ee(g),o("onViewChange",t),h("view-change",{canvas:g,breakpoint:t,from:e,to:t})))}function Bt(){return p}function Ut(e){return Ie[e]||null}var Lt,Vt={getHtml:se,getPlainHtml:function(){return pn(se())},init:function(){J(x)},reset:function(){J(le)},deinit:k,destroy:ue,remove:function(){c("remove","remove() is deprecated and will be removed in a later release. Use destroy(), which does the same thing."),ue()},changeView:qt,getView:Bt,createRow:function(e,t){var n=I();return void 0===e||Array.isArray(e)||e&&e.row_cols||(gn("createRow: the layout is an array of column sizes, as in [8, 4], or { row_cols, columns }. Making an empty row instead."),e=[]),e&&!Array.isArray(e)&&(n=_(e)),(Array.isArray(e)?e:[]).forEach(function(e){K(e).appendTo(n)}),Pt(n,"row",t)},createColumn:function(e,t){var n=$t((t=t||{}).appendTo||t.prependTo||[]).first(),n=(void 0===e&&n.length&&it(n,P())?e=null:on(e)||-1!==en.indexOf(e)||(gn("createColumn: no column size given, using 12"),e=Zt),K(e,t.offset));return void 0!==t.content&&n.find(".ge-content").html(t.content),Pt(n,"column",t)},createElement:function(e,t){return Ke.createElement?Ke.createElement(e,t):(c("plugin:elements","createElement needs the elements plugin: include dist/plugins/grideditor.elements.js after the editor"),null)},createSection:function(e){return Ke.createSection?Ke.createSection(e):(c("plugin:sections","createSection needs the sections plugin: include dist/plugins/grideditor.sections.js after the editor"),null)},createContainer:function(e,t){t=t||{};var n=E[e];return n?Pt(n.create(t),e,t):(gn('createContainer: no such container type "'+e+'"'),null)},addTab:function(e,t){return Ot(e,"tabs",t)},addAccordionItem:function(e,t){return Ot(e,"accordion",t)},setLocale:function(e){d.locale=e,Vt.settings=Dt(),H(),i.remove(),ee(),le()},getUtility:Ce,setUtility:Te,canvas:g,settings:Dt()};function Ft(e){return!d.plugins||-1!==d.plugins.indexOf(e)}$t.each(Ht,function(e,t){t.unimplemented&&(Vt[e]=function(){return c(e,e+" is registered but not implemented in this build yet"),null})}),e.data("grideditor",Vt),Lt={canvas:g,settings:d,t:u,warn:gn,containerId:je,defaultRegion:Ne,createTool:O,createMoveTool:et,addSettingsTool:nt,deleteNode:b,place:Pt,createPaneControls:qe,makeLabelEditable:Le,labelIn:Ve,unwrapLabels:Fe,suspendToggles:Be,resumeToggles:Ue,emit:h,payloadFor:m,operate:v,kindOf:y,view:Bt,viewTiers:function(){return ln(p).map(function(e){return e.key})},breakpoints:Xt.map(function(e){return e.key}),getUtility:Ce,setUtility:Te,utilityField:Se,bareStyle:ze,rowFromLayout:_,nodeHtml:ce,textReady:function(e){e.trigger("ge-rte-ready")},toolbarItems:function(e){return i?i.find('[data-ge-toolbar="feature"][data-ge-feature="'+e+'"]'):$t()}},pe("grid",{},(()=>{for(var e=[],t=1;t<=Zt;t++)e.push(String(t));return{name:"col",values:e.concat(en),appliesTo:["column"],labelKey:"utility.col_width",className:function(e,t){return an(rn(e),ie(t))},choices:function(){return d.valid_col_sizes.map(String)},label:function(e){return"equal"===e?u("utility.col_equal"):"auto"===e?u("utility.col_auto"):e},write:function(e,t,n,o){return Q(e,null===t?null:ie(t),o,n)},blank:function(e,t){e=t===Yt?null:rt(e,rn(t));return e?u("utility.col_from_row",{count:lt(e.value)}):null}}})()),!1!==d.row_cols&&pe("grid",{},{name:"row-cols",prefix:"row-cols",values:tn,appliesTo:["row"],labelKey:"utility.row_cols"}),$t.each($t.fn.gridEditor.containers,function(e,t){Ft(e)&&(E[e]=t(Lt))}),$t.each($t.fn.gridEditor.features,function(e,t){Ft(e)&&(A[e]=t(Lt))}),$t.each($t.fn.gridEditor.texts,function(e,t){Ie[e]=$t.extend({bundled:!!t.bundled},t(Lt))}),$t.each($t.fn.gridEditor.RTEs,function(e,t){var n;Ie[e]||(c("rtes:"+e,'$.fn.gridEditor.RTEs is deprecated and will be removed in 7.0: register "'+e+'" under $.fn.gridEditor.texts, see docs/plugins.md'),Ie[e]={initialContent:(n=t).initialContent,start:function(e){n.init(d,e)},stop:function(e){n.deinit(d,e)}})}),$t.each($t.fn.gridEditor.utilities,function(t,e){Ft(t)&&(M[t]=e(Lt),(M[t].families||[]).forEach(function(e){pe(t,M[t],e)}))}),$t.each(A,function(e,t){$t.each(t.methods||{},function(e,t){Ke[e]=t})}),(d.plugins||[]).forEach(function(e){E[e]||A[e]||M[e]||c("plugin:"+e,'the "'+e+'" plugin is not loaded: include dist/plugins/grideditor.'+e+".js after the editor")}),r=$t('<textarea class="ge-html-output"/>').insertBefore(g),ee(),$t(window).on("scroll",ae),g.on("click",".ge-content",re),g.on("click",".ge-popup-trigger, [data-ge-popup-target]",function(e){g.hasClass("ge-editing")&&e.preventDefault()}),g.on("ge-rte-ready",".ge-content",function(){o("onContentReady",$t(this)),Ee($t(this))}),x()}),this;var e,t,n=this,o=Jt,i=Array.prototype.slice.call(arguments,1),a=Ht[o];if(a){if(a.value)return(e=n.first()).length?(t=e.data("grideditor"))?t[o].apply(t,i):a.noInstance?a.noInstance(e):null:null;n.each(function(){var e=$t(this).data("grideditor");e&&e[o].apply(e,i)})}else r("method:"+o,'unknown method "'+o+'"');return n},$t.fn.gridEditor.texts={},$t.fn.gridEditor.RTEs={},$t.fn.gridEditor.containers={},$t.fn.gridEditor.features={},$t.fn.gridEditor.utilities={},$t.fn.gridEditor.t=fn,$t.fn.gridEditor.locales={en:{"tool.move":"Move","tool.settings":"Settings","tool.add_row":"Add row","tool.add_column":"Add column\n(hold to choose the width)","tool.column_size":"{size} of 12","tool.column_equal":"Equal: shares what the row has left","tool.column_auto":"Auto: as wide as its content","tool.delete_row":"Remove row","tool.delete_column":"Remove col","tool.delete_container":"Remove container","tool.delete_pane":"Remove pane","tool.rename":"Double click to rename","tool.column_narrower":"Make column narrower\n(hold shift for min)","tool.column_wider":"Make column wider\n(hold shift for max)","tool.indent_decrease":"Decrease indent\n(hold shift for none)","tool.indent_increase":"Increase indent\n(hold shift for max)","tool.edit_source":"Edit Source Code","tool.preview":"Preview","tool.id_placeholder":"id","tool.id_title":"Set a unique identifier","tool.classes_placeholder":"classes","tool.classes_title":"Css classes, separated by spaces","tool.toggle_class":'Toggle "{label}" styling',"row.add":"Add row {layout}","row.add_row_cols":"Add a row of {columns} columns, {counts} per row","confirm.title":"Confirm","confirm.ok":"Delete","confirm.cancel":"Cancel","confirm.delete_row":"Delete row?","confirm.delete_column":"Delete column?","confirm.delete_container":"Delete this container and everything in it?","view.all":"All sizes","view.xs":"Phone","view.sm":"Tablet","view.md":"Small desktop","view.lg":"Desktop","view.xl":"Large desktop","view.xxl":"Widescreen","utility.section":"Responsive: {view}","utility.col_width":"Width","utility.col_equal":"Equal","utility.col_auto":"Auto","utility.col_from_row":"From the row: {count}","utility.row_cols":"Columns per row","badge.row_cols":"{count} per row","badge.row_cols_auto":"As wide as their content","utility.default":"Default","utility.inherit":"Inherit: {value} (from {breakpoint})","utility.varies":"Changes at {breakpoints}; choosing here replaces that","error.sortable_missing":"SortableJS not available! Make sure you loaded the Sortable js file; dragging is off without it.","warning.setting_removed":"The {setting} setting was removed in 4.0. Use {replacement} instead.","error.tinymce_missing":"tinyMCE not available! Make sure you loaded the tinyMCE js file.","error.ckeditor_missing":"CKEditor not available! Make sure you loaded the ckeditor and jquery adapter js files.","error.summernote_missing":"Summernote not available! Make sure you loaded the Summernote js file."}}})(jQuery),(i=>{function a(e){e.removeClass("active").removeClass("ge-rte-active").removeAttr("id").removeAttr("style").removeAttr("spellcheck").removeAttr("contenteditable").removeAttr("data-mce-style")}var r="<p>Lorem ipsum dolores</p>";i.fn.gridEditor.texts.tinymce=function(o){return{initialContent:r,missingKey:"error.tinymce_missing",available:function(){return!!window.tinymce},start:function(e){var t=o.settings,n=t.tinymce&&t.tinymce.config?t.tinymce.config:{};e.each(function(){var e,t=i(this);t.hasClass("active")||(t.html()==r&&t.html(""),t.addClass("active"),delete(e=i.extend({promotion:!1},n,{target:this,inline:!0,init_instance_callback:function(e){t.data("ge-tinymce-pending-remove")?(t.removeData("ge-tinymce-pending-remove"),e.remove(),a(t)):(t.data("ge-tinymce",e),o.textReady(t),e.on("Undo Redo",function(){o.textReady(t)}),window.requestAnimationFrame(function(){!e.removed&&e.ui&&e.ui.show&&e.ui.show()}),e.on("focus",function(){window.requestAnimationFrame(function(){!e.removed&&e.ui&&e.ui.show&&e.ui.show()})}),e.focus(),n.init_instance_callback&&n.init_instance_callback.call(this,e),n.oninit&&n.oninit.call(this,e))}})).selector,window.tinymce.init(e))})},stop:function(e){e.filter(".active").each(function(){var e=i(this),t=e.data("ge-tinymce");t?(e.removeData("ge-tinymce"),t.remove()):e.data("ge-tinymce-pending-remove",!0),a(e)})}}}})(jQuery),(r=>{var t="<p>Lorem initius... </p>";r.fn.gridEditor.texts.ckeditor=function(a){return{initialContent:t,missingKey:"error.ckeditor_missing",available:function(){return!!window.CKEDITOR},start:function(e){var i=a.settings;e.each(function(){var e,n,o=r(this);o.hasClass("active")||(o.html()==t&&o.html("&nbsp;"),o.addClass("active").attr("contenteditable","true"),e=r.extend({},i.ckeditor&&i.ckeditor.config?i.ckeditor.config:{},{on:{instanceReady:function(e){var t;try{t=i.ckeditor.config.on.instanceReady}catch(e){}t&&t.call(this,e),a.textReady(o),n.focus()}}}),n=window.CKEDITOR.inline(o.get(0),e),o.data("ge-ckeditor",n))})},stop:function(e){e.filter(".active").each(function(){var n,o,e=r(this),t=window.CKEDITOR?(n=e).data("ge-ckeditor")||(o=null,r.each(window.CKEDITOR.instances,function(e,t){t.element&&t.element.$===n[0]&&(o=t)}),o):null;t&&t.destroy(),e.removeData("ge-ckeditor"),e.removeClass("active cke_focus").removeAttr("id").removeAttr("style").removeAttr("spellcheck").removeAttr("contenteditable")})}}}})(jQuery),(i=>{var a="<p>Lorem ipsum dolores</p>";i.fn.gridEditor.texts.summernote=function(o){return{initialContent:a,missingKey:"error.summernote_missing",available:function(){return!!i.fn.summernote},start:function(e){var n=o.settings;i.now||(i.now=Date.now),e.each(function(){var e,t=i(this);t.hasClass("active")||(t.html()==a&&t.html(""),t.addClass("active"),e=i.extend(!0,{},n.summernote&&n.summernote.config?n.summernote.config:{},{tabsize:2,airMode:!0,callbacks:{onInit:function(){var e;try{e=n.summernote.config.callbacks.onInit}catch(e){}e&&e.call(this),o.textReady(t),t.summernote("focus")}}}),t.summernote(e))})},stop:function(e){e.filter(".active").each(function(){var e=i(this);e.summernote("destroy"),e.removeClass("active").removeAttr("id").removeAttr("style").removeAttr("spellcheck")})}}}})(jQuery),(t=>{["tinymce","ckeditor","summernote"].forEach(function(e){t.fn.gridEditor.texts[e]&&(t.fn.gridEditor.texts[e].bundled=!0)})})(jQuery);
10
10
  //# sourceMappingURL=jquery.grideditor.min.js.map