diff --git a/dist/css/field.css b/dist/css/field.css index 44288fc..24dc0df 100644 --- a/dist/css/field.css +++ b/dist/css/field.css @@ -1,2 +1,2 @@ -.sun-editor{background-color:#fff;border:1px solid #dadada;box-sizing:border-box;color:#000;font-family:Helvetica Neue;height:auto;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;width:auto}.sun-editor *{-webkit-user-drag:none;box-sizing:border-box;overflow:visible}.sun-editor-common button,.sun-editor-common input,.sun-editor-common select,.sun-editor-common textarea{font-size:14px;line-height:1.5}.sun-editor-common blockquote,.sun-editor-common body,.sun-editor-common button,.sun-editor-common code,.sun-editor-common dd,.sun-editor-common div,.sun-editor-common dl,.sun-editor-common dt,.sun-editor-common fieldset,.sun-editor-common form,.sun-editor-common h1,.sun-editor-common h2,.sun-editor-common h3,.sun-editor-common h4,.sun-editor-common h5,.sun-editor-common h6,.sun-editor-common input,.sun-editor-common legend,.sun-editor-common li,.sun-editor-common ol,.sun-editor-common p,.sun-editor-common pre,.sun-editor-common select,.sun-editor-common td,.sun-editor-common textarea,.sun-editor-common th,.sun-editor-common ul{border:0;margin:0;padding:0}.sun-editor-common dl,.sun-editor-common li,.sun-editor-common menu,.sun-editor-common ol,.sun-editor-common ul{list-style:none!important}.sun-editor-common hr{margin:6px 0!important}.sun-editor textarea{border:0;padding:0;resize:none}.sun-editor button{background-color:transparent;border:0;cursor:pointer;outline:none;touch-action:manipulation}.sun-editor button,.sun-editor input,.sun-editor select,.sun-editor textarea{vertical-align:middle}.sun-editor button span{display:block;margin:0;padding:0}.sun-editor button .txt{display:block;margin-top:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sun-editor button *{backface-visibility:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;pointer-events:none}.sun-editor svg{fill:currentColor}.sun-editor .se-svg,.sun-editor button>svg{fill:currentColor;display:block;float:none;height:16px;margin:auto;text-align:center;width:16px}.sun-editor .close>svg,.sun-editor .se-dialog-close>svg{height:10px;width:10px}.sun-editor .se-btn-select>svg{float:right;height:10px;width:10px}.sun-editor .se-btn-list>.se-list-icon{display:inline-block;height:16px;margin:-1px 10px 0 0;vertical-align:middle;width:16px}.sun-editor .se-line-breaker>button>svg{height:24px;width:24px}.sun-editor button>i:before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-size:15px;font-style:normal;font-variant:normal;line-height:2;text-rendering:auto}.sun-editor button>[class=se-icon-text]{font-size:20px;line-height:1}.sun-editor .se-arrow,.sun-editor .se-arrow:after{border:11px solid transparent;display:block;height:0;position:absolute;width:0}.sun-editor .se-arrow.se-arrow-up{border-bottom-color:#dadada;border-top-width:0;left:20px;margin-left:-11px;top:-11px}.sun-editor .se-arrow.se-arrow-up:after{border-bottom-color:#fff;border-top-width:0;content:" ";margin-left:-11px;top:1px}.sun-editor .se-toolbar .se-arrow.se-arrow-up:after{border-bottom-color:#fafafa}.sun-editor .se-arrow.se-arrow-down{border-bottom-width:0;border-top-color:#dadada;left:0;margin-left:-11px;top:0}.sun-editor .se-arrow.se-arrow-down:after{border-bottom-width:0;border-top-color:#fff;content:" ";margin-left:-11px;top:-12px}.sun-editor .se-toolbar .se-arrow.se-arrow-down:after{border-top-color:#fafafa}.sun-editor .se-container{height:100%;position:relative;width:100%}.sun-editor button{color:#000}.sun-editor .se-btn{border:0;border-radius:4px;float:left;font-size:12px;height:34px;line-height:27px;margin:1px!important;padding:0;width:34px}.sun-editor .se-btn:enabled:focus,.sun-editor .se-btn:enabled:hover{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-btn:enabled:active{background-color:#d1d1d1;border-color:#c1c1c1;box-shadow:inset 0 3px 5px #c1c1c1}.sun-editor .se-btn-primary{background-color:#c7deff;border:1px solid #80bdff;border-radius:4px;color:#000}.sun-editor .se-btn-primary:focus,.sun-editor .se-btn-primary:hover{background-color:#80bdff;border-color:#3f9dff;color:#000;outline:0 none}.sun-editor .se-btn-primary:active{background-color:#3f9dff;border-color:#4592ff;box-shadow:inset 0 3px 5px #4592ff;color:#fff}.sun-editor input,.sun-editor select,.sun-editor textarea{border:1px solid #ccc;border-radius:4px;color:#000}.sun-editor input:focus,.sun-editor select:focus,.sun-editor textarea:focus{border:1px solid #80bdff;box-shadow:0 0 0 .2rem #c7deff;outline:0;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.sun-editor .se-btn:enabled.active{color:#4592ff;outline:0 none}.sun-editor .se-btn:enabled.active:focus,.sun-editor .se-btn:enabled.active:hover{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-btn:enabled.active:active{background-color:#d1d1d1;border-color:#c1c1c1;box-shadow:inset 0 3px 5px #c1c1c1}.sun-editor .se-btn:enabled.on{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-btn:enabled.on:focus,.sun-editor .se-btn:enabled.on:hover{background-color:#d1d1d1;border-color:#c1c1c1;outline:0 none}.sun-editor .se-btn:enabled.on:active{background-color:#c1c1c1;border-color:#b1b1b1;box-shadow:inset 0 3px 5px #b1b1b1}.sun-editor .se-btn-list:disabled,.sun-editor .se-btn:disabled,.sun-editor button:disabled{background-color:inherit;color:#bdbdbd;cursor:not-allowed}.sun-editor .se-loading-box{background-color:#fff;display:none;filter:alpha(opacity=70);height:100%;left:0;opacity:.7;position:absolute;top:0;width:100%;z-index:2147483647}.sun-editor .se-loading-box .se-loading-effect{animation:spinner .8s linear infinite;border-radius:50%;border-right:2px solid transparent;border-top:2px solid #07d;display:block;height:25px;left:50%;margin:-25px 0 0 -25px;position:absolute;top:50%;width:25px}.sun-editor .se-line-breaker{border-top:1px solid #3288ff;cursor:text;display:none;height:1px;position:absolute;width:100%;z-index:7}.sun-editor .se-line-breaker>button.se-btn{background-color:#fff;border:1px solid #0c2240;cursor:pointer;display:inline-block;float:none;height:30px;left:-50%;opacity:.6;position:relative;top:-15px;width:30px}.sun-editor .se-line-breaker>button.se-btn:hover{background-color:#fff;border-color:#041b39;opacity:.9}.sun-editor .se-line-breaker-component{background-color:#fff;border:1px solid #0c2240;border-radius:4px;cursor:pointer;display:none;height:24px;opacity:.6;position:absolute;width:24px;z-index:7}.sun-editor .se-line-breaker-component:hover{opacity:.9}.sun-editor .se-toolbar{background-color:#fafafa;display:block;height:auto;margin:0;outline:1px solid #dadada;overflow:visible;padding:0;position:relative;width:100%;z-index:5}.sun-editor .se-toolbar-shadow{background-color:transparent!important;border:none!important;display:block!important;height:0!important;margin:0!important;outline:none!important;padding:0!important;z-index:0!important}.sun-editor .se-toolbar-cover{background-color:#fefefe;cursor:not-allowed;display:none;filter:alpha(opacity=50);font-size:36px;height:100%;left:0;opacity:.5;position:absolute;top:0;width:100%;z-index:4}.sun-editor .se-toolbar-separator-vertical{display:inline-block;height:0;margin:0;vertical-align:top;width:0}.sun-editor .se-toolbar.se-toolbar-balloon,.sun-editor .se-toolbar.se-toolbar-inline{box-shadow:0 3px 9px rgba(0,0,0,.5);-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);display:none;position:absolute}.sun-editor .se-toolbar.se-toolbar-balloon{width:auto;z-index:2147483647}.sun-editor .se-toolbar.se-toolbar-sticky{position:fixed;top:0}.sun-editor .se-toolbar-sticky-dummy{display:none;position:static;z-index:-1}.sun-editor .se-btn-module{display:inline-block}.sun-editor .se-btn-module-border{border:1px solid #dadada;border-radius:4px;margin-left:1px;margin-right:1px}.sun-editor .se-btn-module-enter{background-color:transparent;display:block;height:0;margin:0;padding:0;width:100%}.sun-editor .se-toolbar-more-layer{background-color:#fafafa;margin:0 -3px}.sun-editor .se-toolbar-more-layer .se-more-layer{border-top:1px solid #dadada;display:none}.sun-editor .se-toolbar-more-layer .se-more-layer .se-more-form{display:inline-block;height:auto;padding:4px 3px 0;width:100%}.sun-editor .se-btn-module .se-btn-more.se-btn-more-text{padding:0 4px;width:auto}.sun-editor .se-btn-module .se-btn-more:focus,.sun-editor .se-btn-module .se-btn-more:hover{background-color:#d1d1d1;border-color:#c1c1c1;color:#000;outline:0 none}.sun-editor .se-btn-module .se-btn-more.on{background-color:#d1d1d1;border-color:#c1c1c1;color:#333;outline:0 none}.sun-editor .se-btn-module .se-btn-more.on:hover{background-color:#c1c1c1;border-color:#b1b1b1;color:#000;outline:0 none}.sun-editor .se-menu-list,.sun-editor .se-menu-list li{float:left;margin:0;padding:0}.sun-editor .se-menu-list li{position:relative}.sun-editor .se-btn-select{display:flex;padding:4px 6px;width:auto}.sun-editor .se-btn-select .txt{flex:auto;text-align:left}.sun-editor .se-btn-select.se-btn-tool-font{width:100px}.sun-editor .se-btn-select.se-btn-tool-format{width:82px}.sun-editor .se-btn-select.se-btn-tool-size{width:78px}.sun-editor .se-btn-tray{height:auto;margin:0;padding:4px 3px 0;position:relative;width:100%}.sun-editor .se-menu-tray{height:0;left:0;position:absolute;top:0;width:100%}.sun-editor .se-submenu{overflow-x:hidden;overflow-y:auto}.sun-editor .se-menu-container{overflow-x:unset;overflow-y:unset}.sun-editor .se-list-layer{background-color:#fff;border:1px solid #bababa;border-radius:4px;box-shadow:0 3px 9px rgba(0,0,0,.5);display:none;height:auto;left:0;outline:0 none;padding:6px 0;position:absolute;top:0;z-index:5}.sun-editor .se-list-layer .se-list-inner{margin:0;overflow-x:initial;overflow-y:initial;overflow:visible;padding:0}.sun-editor .se-list-layer button{margin:0;width:100%}.sun-editor .se-list-inner ul{padding:0;width:100%}.sun-editor .se-list-inner li>button{min-width:100%;width:-moz-max-content;width:max-content}.sun-editor .se-list-inner .se-list-basic li{width:100%}.sun-editor .se-list-inner .se-list-basic li button.active{background-color:#80bdff;border:1px solid #3f9dff;border-left:0;border-right:0}.sun-editor .se-list-inner .se-list-basic li button.active:hover{background-color:#3f9dff;border:1px solid #4592ff;border-left:0;border-right:0}.sun-editor .se-list-inner .se-list-basic li button.active:active{background-color:#4592ff;border:1px solid #407dd1;border-left:0;border-right:0;box-shadow:inset 0 3px 5px #407dd1}.sun-editor .se-list-inner .se-list-checked li button>.se-svg{float:left;padding:6px 6px 0 0}.sun-editor .se-list-inner .se-list-checked li button>.se-svg>svg{display:none}.sun-editor .se-list-inner .se-list-checked li button.se-checked{color:#4592ff}.sun-editor .se-list-inner .se-list-checked li button.se-checked>.se-svg>svg{display:block}.sun-editor .se-btn-list{cursor:pointer;font-size:12px;height:auto;line-height:normal;min-height:32px;padding:0 14px;text-align:left;text-decoration:none;text-indent:0;width:100%}.sun-editor .se-btn-list.default_value{background-color:#f3f3f3;border-bottom:1px dotted #b1b1b1;border-top:1px dotted #b1b1b1}.sun-editor .se-btn-list:focus,.sun-editor .se-btn-list:hover{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-btn-list:active{background-color:#d1d1d1;border-color:#c1c1c1;box-shadow:inset 0 3px 5px #c1c1c1}.sun-editor .se-list-layer.se-list-font-size{max-height:300px;min-width:140px}.sun-editor .se-list-layer.se-list-font-family{min-width:156px}.sun-editor .se-list-layer.se-list-font-family .default{border-bottom:1px solid #ccc}.sun-editor .se-list-layer.se-list-line{width:125px}.sun-editor .se-list-layer.se-list-line hr{border-width:1px 0 0;height:1px}.sun-editor .se-list-layer.se-list-align .se-list-inner{left:9px}.sun-editor .se-list-layer.se-list-format{min-width:156px}.sun-editor .se-list-layer.se-list-format li{padding:0;width:100%}.sun-editor .se-list-layer.se-list-format ul .se-btn-list{line-height:100%}.sun-editor .se-list-layer.se-list-format ul .se-btn-list[data-value=h1]{height:40px}.sun-editor .se-list-layer.se-list-format ul .se-btn-list[data-value=h2]{height:34px}.sun-editor .se-list-layer.se-list-format ul p{font-size:13px}.sun-editor .se-list-layer.se-list-format ul div{font-size:13px;padding:4px 2px}.sun-editor .se-list-layer.se-list-format ul h1{color:#333;font-size:2em;font-weight:700}.sun-editor .se-list-layer.se-list-format ul h2{color:#333;font-size:1.5em;font-weight:700}.sun-editor .se-list-layer.se-list-format ul h3{color:#333;font-size:1.17em;font-weight:700}.sun-editor .se-list-layer.se-list-format ul h4{color:#333;font-size:1em;font-weight:700}.sun-editor .se-list-layer.se-list-format ul h5{color:#333;font-size:.83em;font-weight:700}.sun-editor .se-list-layer.se-list-format ul h6{color:#333;font-size:.67em;font-weight:700}.sun-editor .se-list-layer.se-list-format ul blockquote{background-color:transparent;border-color:#b1b1b1;border-left:5px #b1b1b1;border-style:solid;color:#999;font-size:13px;height:22px;line-height:1.5;margin:0;padding:0 0 0 7px}.sun-editor .se-list-layer.se-list-format ul pre{background-color:#f9f9f9;border:1px solid #e1e1e1;border-radius:4px;color:#666;font-size:13px;margin:0;padding:4px 11px}.sun-editor .se-selector-table{-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175);display:none;float:left;font-size:14px;left:1px;list-style:none;margin:2px 0 0;padding:5px 0;position:absolute;text-align:left;top:34px;z-index:5}.sun-editor .se-selector-table .se-table-size{font-size:18px;padding:0 5px}.sun-editor .se-selector-table .se-table-size-picker{cursor:pointer;font-size:18px;height:10em;position:absolute!important;width:10em;z-index:3}.sun-editor .se-selector-table .se-table-size-highlighted{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAADJmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo4QTZCNzMzN0I3RUYxMUU4ODcwQ0QwMjM1NTgzRTJDNyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo4QTZCNzMzNkI3RUYxMUU4ODcwQ0QwMjM1NTgzRTJDNyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0MzYyNEUxRUI3RUUxMUU4ODZGQzgwRjNBODgyNTdFOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0MzYyNEUxRkI3RUUxMUU4ODZGQzgwRjNBODgyNTdFOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pl0yAuwAAABBSURBVDhPY/wPBAxUAGCDGvdBeWSAeicIDTfIXREiQArYeR9hEBOEohyMGkQYjBpEGAxjg6ib+yFMygCVvMbAAABj0hwMTNeKJwAAAABJRU5ErkJggg==") repeat;font-size:18px;height:1em;position:absolute!important;width:1em;z-index:2}.sun-editor .se-selector-table .se-table-size-unhighlighted{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIj4+Pjp6ekKlAqjAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKhmnaJzPAAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC") repeat;font-size:18px;height:10em;position:relative!important;width:10em;z-index:1}.sun-editor .se-selector-table .se-table-size-display{padding-left:5px}.sun-editor .se-list-layer.se-table-split{top:36px}.sun-editor .se-list-layer .se-selector-color{display:flex;height:auto;margin:auto;max-width:270px;padding:0;width:-moz-max-content;width:max-content}.sun-editor .se-list-layer .se-selector-color .se-color-pallet{height:100%;padding:0;width:100%}.sun-editor .se-list-layer .se-selector-color .se-color-pallet li{display:flex;float:left;margin:0;position:relative}.sun-editor .se-list-layer .se-selector-color .se-color-pallet button{cursor:default;display:block;height:30px;text-indent:-9999px;width:30px}.sun-editor .se-list-layer .se-selector-color .se-color-pallet button.active,.sun-editor .se-list-layer .se-selector-color .se-color-pallet button:focus,.sun-editor .se-list-layer .se-selector-color .se-color-pallet button:hover{border:3px solid #fff}.sun-editor .se-form-group{display:flex;height:auto;min-height:40px;padding:4px;width:100%}.sun-editor .se-form-group input{border:1px solid #ccc;border-radius:.25rem;display:inline-block;flex:auto;font-size:12px;height:33px;margin:1px 0;padding:0;width:auto}.sun-editor .se-form-group button,.sun-editor .se-submenu-form-group button{float:right;height:34px;margin:0 2px!important;width:34px}.sun-editor .se-form-group button.se-btn{border:1px solid #ccc}.sun-editor .se-form-group>div{position:relative}.sun-editor .se-form-group label{display:inline-block;font-weight:700;margin-bottom:5px;max-width:100%}.sun-editor .se-form-group-label{height:auto;padding:0 4px;width:100%}.sun-editor .se-form-group-label label{font-size:13px;font-weight:700}.sun-editor .se-submenu .se-form-group input{color:#555;height:33px;width:auto}.sun-editor .se-submenu .se-form-group .se-color-input{border:none;border-bottom:2px solid #b1b1b1;outline:none;text-transform:uppercase;width:72px}.sun-editor .se-submenu .se-form-group .se-color-input:focus{border-bottom:3px solid #b1b1b1}.sun-editor .se-wrapper{height:auto;overflow:hidden;position:relative!important;width:100%;z-index:1}.sun-editor .se-wrapper .se-wrapper-inner{-webkit-overflow-scrolling:touch;height:100%;min-height:65px;overflow-x:auto;overflow-y:auto;user-select:auto;-o-user-select:auto;-moz-user-select:auto;-khtml-user-select:auto;-webkit-user-select:auto;-ms-user-select:auto;width:100%}.sun-editor .se-wrapper .se-wrapper-inner:focus{outline:none}.sun-editor .se-wrapper .se-wrapper-code{background-color:#191919;color:#fff;font-size:13px;margin:0;padding:4px;resize:none!important;word-break:break-all}.sun-editor .se-wrapper .se-wrapper-wysiwyg{display:block}.sun-editor .se-wrapper .se-wrapper-code-mirror{font-size:13px}.sun-editor .se-wrapper .se-placeholder{backface-visibility:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;color:#b1b1b1;display:none;font-size:13px;left:0;line-height:1.5;margin-left:0;margin-right:0;margin-top:0;overflow:hidden;padding-left:16px;padding-right:16px;padding-top:16px;pointer-events:none;position:absolute;right:0;text-overflow:ellipsis;top:0;white-space:nowrap;z-index:1}.sun-editor .se-resizing-bar{background-color:#fafafa;border-top:1px solid #dadada;cursor:ns-resize;display:flex;height:auto;min-height:16px;padding:0 4px;width:auto}.sun-editor .se-resizing-bar.se-resizing-none{cursor:default}.sun-editor .se-resizing-back{cursor:default;display:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:2147483647}.sun-editor .se-resizing-bar .se-navigation{background:transparent;color:#666;flex:auto;font-size:10px;height:auto;line-height:1.5;margin:0;padding:0;position:relative;width:auto}.sun-editor .se-resizing-bar .se-char-counter-wrapper{background:transparent;color:#999;display:block;flex:none;font-size:13px;height:auto;margin:0;padding:0;position:relative;width:auto}.sun-editor .se-resizing-bar .se-char-counter-wrapper.se-blink{animation:blinker .2s linear infinite;color:#b94a48}.sun-editor .se-resizing-bar .se-char-counter-wrapper .se-char-label{margin-right:4px}.sun-editor .se-dialog{display:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:2147483647}.sun-editor .se-dialog button,.sun-editor .se-dialog input,.sun-editor .se-dialog label{color:#111;font-size:14px;line-height:1.5;margin:0}.sun-editor .se-dialog .se-dialog-back{background-color:#222;opacity:.5}.sun-editor .se-dialog .se-dialog-back,.sun-editor .se-dialog .se-dialog-inner{height:100%;left:0;position:absolute;top:0;width:100%}.sun-editor .se-dialog .se-dialog-inner .se-dialog-content{-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:4px;box-shadow:0 3px 9px rgba(0,0,0,.5);margin:1.75rem auto;max-width:500px;outline:0;position:relative;width:auto}@media screen and (max-width:509px){.sun-editor .se-dialog .se-dialog-inner .se-dialog-content{width:100%}}.sun-editor .se-dialog .se-dialog-inner .se-dialog-content label{display:inline-block;font-weight:700;margin-bottom:5px;max-width:100%}.sun-editor .se-dialog .se-dialog-inner .se-dialog-content .se-btn-primary{border-radius:4px;display:inline-block;font-size:14px;font-weight:400;line-height:1.42857143;margin:0 0 10px!important;padding:6px 12px;text-align:center;touch-action:manipulation;vertical-align:middle;white-space:nowrap}.sun-editor .se-dialog .se-dialog-inner .se-dialog-header{border-bottom:1px solid #e5e5e5;height:50px;padding:6px 15px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-header .se-dialog-close{-webkit-appearance:none;filter:alpha(opacity=100);float:right;font-weight:700;opacity:1;text-shadow:0 1px 0 #fff}.sun-editor .se-dialog .se-dialog-inner .se-dialog-header .se-modal-title{float:left;font-size:14px;font-weight:700;line-height:2.5;margin:0;padding:0}.sun-editor .se-dialog .se-dialog-inner .se-dialog-body{padding:15px 15px 5px;position:relative}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form{margin-bottom:10px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form-footer{margin-bottom:0;margin-top:10px}.sun-editor .se-dialog .se-dialog-inner input:disabled{background-color:#f3f3f3}.sun-editor .se-dialog .se-dialog-inner .se-dialog-size-text{width:100%}.sun-editor .se-dialog .se-dialog-inner .se-dialog-size-text .size-h,.sun-editor .se-dialog .se-dialog-inner .se-dialog-size-text .size-w{text-align:center;width:70px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-size-x{margin:0 8px;text-align:center;width:25px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-footer{border-top:1px solid #e5e5e5;height:auto;min-height:55px;padding:10px 15px 0;text-align:right}.sun-editor .se-dialog .se-dialog-inner .se-dialog-footer>div{float:left}.sun-editor .se-dialog .se-dialog-inner .se-dialog-footer>div>label{margin:0 5px 0 0}.sun-editor .se-dialog .se-dialog-inner .se-dialog-btn-radio{margin-left:12px;margin-right:6px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-btn-check{margin-left:12px;margin-right:4px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form-footer .se-dialog-btn-check{margin-left:0;margin-right:4px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form-footer label:first-child{margin-left:0;margin-right:16px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-dialog-form-files{align-items:center;display:flex;position:relative}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-dialog-form-files>input{flex:auto}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-dialog-form-files .se-dialog-files-edge-button{border:1px solid #ccc;flex:auto;opacity:.8}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-dialog-form-files .se-dialog-files-edge-button.se-file-remove>svg{height:8px;width:8px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-dialog-form-files .se-dialog-files-edge-button:hover{background-color:#f0f0f0;outline:0 none}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-dialog-form-files .se-dialog-files-edge-button:active{background-color:#e9e9e9;box-shadow:inset 0 3px 5px #d6d6d6}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-select{display:inline-block;font-size:14px;height:34px;line-height:1.42857143;text-align:center;width:auto}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-control{display:inline-block;font-size:14px;height:34px;line-height:1.42857143;text-align:center;width:70px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-form{display:block;font-size:14px;height:34px;line-height:1.42857143;padding:0 4px;width:100%}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-form.se-input-url{direction:ltr}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-form.se-input-url:disabled{color:#999;text-decoration:line-through}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-video-ratio{margin-left:4px;width:70px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form a{color:#004cff}.sun-editor .se-dialog .se-dialog-inner .se-dialog-btn-revert{border:1px solid #ccc}.sun-editor .se-dialog .se-dialog-inner .se-dialog-btn-revert:hover{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-dialog .se-dialog-inner .se-dialog-btn-revert:active{background-color:#d1d1d1;border-color:#c1c1c1;box-shadow:inset 0 3px 5px #c1c1c1}.sun-editor .se-dialog-tabs{border-bottom:1px solid #e5e5e5;height:25px;width:100%}.sun-editor .se-dialog-tabs button{background-color:#e5e5e5;border-right:1px solid #e5e5e5;float:left;outline:none;padding:2px 13px;transition:.3s}.sun-editor .se-dialog-tabs button:hover{background-color:#fff}.sun-editor .se-dialog-tabs button.active{background-color:#fff;border-bottom:0}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-form.se-math-exp{border:1px solid #ccc;direction:ltr;font-size:13px;height:14em;padding:4px;resize:vertical}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-select.se-math-size{height:28px;margin-left:1em;width:6em}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-math-preview{font-size:13px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-math-preview>span{box-shadow:0 0 0 .1rem #c7deff;display:inline-block}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-math-preview>span *{direction:ltr}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-math-preview>.se-math-katex-error{box-shadow:0 0 0 .1rem #f2dede;color:#b94a48}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-math-preview>.se-math-katex-error svg{color:#b94a48;height:30px;width:auto}.sun-editor .se-dialog .se-dialog-inner .se-link-preview{background-color:transparent;color:#666;display:block;font-family:inherit;font-size:13px;font-weight:400;height:auto;max-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:pre;word-break:break-all}.sun-editor .se-dialog .se-dialog-inner .se-anchor-preview-form{display:flex;margin-top:4px;width:100%}.sun-editor .se-dialog .se-dialog-inner .se-anchor-preview-form .se-svg.se-anchor-preview-icon{color:#4592ff;display:none;flex:unset;line-height:1.5}.sun-editor .se-dialog .se-dialog-inner .se-anchor-preview-form .se-link-preview{flex:auto;margin:0}.sun-editor .se-dialog .se-dialog-inner .se-anchor-rel{height:34px}.sun-editor .se-dialog .se-dialog-inner .se-anchor-rel-btn{color:#3f9dff;width:46px}.sun-editor .se-dialog .se-dialog-inner .se-anchor-rel-wrapper{display:flex;line-height:1.5;padding-top:6px}.sun-editor .se-dialog .se-dialog-inner .se-anchor-rel-preview{text-align:left}.sun-editor .se-controller .se-arrow.se-arrow-up{border-bottom-color:rgba(0,0,0,.25)}.sun-editor .se-controller{word-wrap:normal;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.25);border-radius:4px;box-shadow:0 5px 10px rgba(0,0,0,.2);display:none;letter-spacing:normal;line-break:auto;overflow:visible;position:absolute;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:6}.sun-editor .se-controller .se-btn-group{display:flex;left:0;padding:2px;position:relative;top:0;vertical-align:middle}.sun-editor .se-controller .se-btn-group .se-btn-group-sub{display:none;left:50%;min-width:auto;width:-moz-max-content;width:max-content}.sun-editor .se-controller .se-btn-group .se-btn-group-sub button{margin:0;min-width:72px}.sun-editor .se-controller .se-btn-group button{border:none;border-radius:4px;display:inline-block;font-size:12px;font-weight:400;height:auto;line-height:1.5;margin:1px;min-height:34px;padding:5px 10px;position:relative;text-align:center;touch-action:manipulation;vertical-align:middle;white-space:nowrap}.sun-editor .se-controller .se-btn-group button:focus:enabled,.sun-editor .se-controller .se-btn-group button:hover:enabled{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-controller .se-btn-group button:active:enabled{background-color:#d1d1d1;border-color:#c1c1c1;box-shadow:inset 0 3px 5px #c1c1c1}.sun-editor .se-controller .se-btn-group button span{display:block;margin:0;padding:0}.sun-editor .se-controller .se-btn-group button:enabled.active{color:#4592ff;outline:0 none}.sun-editor .se-controller .se-btn-group button:enabled.active:focus,.sun-editor .se-controller .se-btn-group button:enabled.active:hover{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-controller .se-btn-group button:enabled.active:active{background-color:#d1d1d1;border-color:#c1c1c1;box-shadow:inset 0 3px 5px #c1c1c1}.sun-editor .se-controller .se-btn-group button:enabled.on{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-controller .se-btn-group button:enabled.on:focus,.sun-editor .se-controller .se-btn-group button:enabled.on:hover{background-color:#d1d1d1;border-color:#c1c1c1;outline:0 none}.sun-editor .se-controller .se-btn-group button:enabled.on:active{background-color:#c1c1c1;border-color:#b1b1b1;box-shadow:inset 0 3px 5px #b1b1b1}.sun-editor .se-controller .se-form-group input{min-width:120px}.sun-editor .se-controller-resizing{font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;margin-top:-50px!important;padding:0}.sun-editor .se-controller-resizing .se-btn-group .se-btn-group-sub.se-resizing-align-list{width:74px}.sun-editor .se-resizing-container{background-color:transparent;display:none;outline:1px solid #3f9dff;position:absolute}.sun-editor .se-resizing-container .se-modal-resize{background-color:#3f9dff;display:inline-block;opacity:.3;position:absolute}.sun-editor .se-resizing-container .se-resize-dot{height:100%;left:0;position:absolute;top:0;width:100%}.sun-editor .se-resizing-container .se-resize-dot>span{background-color:#3f9dff;border:1px solid #4592ff;height:7px;position:absolute;width:7px}.sun-editor .se-resizing-container .se-resize-dot>span.tl{cursor:nw-resize;left:-5px;top:-5px}.sun-editor .se-resizing-container .se-resize-dot>span.tr{cursor:ne-resize;right:-5px;top:-5px}.sun-editor .se-resizing-container .se-resize-dot>span.bl{bottom:-5px;cursor:sw-resize;left:-5px}.sun-editor .se-resizing-container .se-resize-dot>span.br{bottom:-5px;cursor:se-resize;right:-5px}.sun-editor .se-resizing-container .se-resize-dot>span.lw{bottom:50%;cursor:w-resize;left:-7px}.sun-editor .se-resizing-container .se-resize-dot>span.th{cursor:n-resize;left:50%;top:-7px}.sun-editor .se-resizing-container .se-resize-dot>span.rw{bottom:50%;cursor:e-resize;right:-7px}.sun-editor .se-resizing-container .se-resize-dot>span.bh{bottom:-7px;cursor:s-resize;right:50%}.sun-editor .se-resizing-container .se-resize-display{background-color:#333;border-radius:4px;bottom:0;color:#fff;font-size:12px;margin:5px;padding:5px;position:absolute;right:0}.sun-editor .se-controller-table,.sun-editor .se-controller-table-cell{width:auto}.sun-editor .se-controller-link,.sun-editor .se-controller-table,.sun-editor .se-controller-table-cell{font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;padding:0}.sun-editor .se-controller-link:after,.sun-editor .se-controller-link:before{box-sizing:border-box}.sun-editor .se-controller-link .link-content{margin:0;padding:0}.sun-editor .se-controller-link .link-content a{color:#4592ff;display:inline-block;margin-left:5px;max-width:200px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.sun-editor .se-select-list{background-color:#fff;border:1px solid #bababa;box-shadow:0 3px 9px rgba(0,0,0,.5);display:none;left:0;margin:0;max-width:100%;outline:0 none;padding:0;position:absolute;top:0;width:auto}.sun-editor .se-select-list .se-select-item{cursor:pointer;font-size:13px;line-height:28px;margin:2px 0;min-height:28px;padding:0 5px}.sun-editor .se-select-list.__se_select-menu-mouse-move .se-select-item:hover,.sun-editor .se-select-list:not(.__se_select-menu-mouse-move) .se-select-item.active{background-color:#e1e1e1}.sun-editor .se-dialog-form-files .se-select-list{width:100%}.sun-editor .se-file-browser{display:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:2147483647}.sun-editor .se-file-browser button,.sun-editor .se-file-browser input,.sun-editor .se-file-browser label{color:#111;font-size:14px;line-height:1.5;margin:0}.sun-editor .se-file-browser .se-file-browser-back{background-color:#222;opacity:.5}.sun-editor .se-file-browser .se-file-browser-back,.sun-editor .se-file-browser .se-file-browser-inner{display:block;height:100%;left:0;position:absolute;top:0;width:100%}.sun-editor .se-file-browser .se-file-browser-inner .se-file-browser-content{-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:4px;box-shadow:0 3px 9px rgba(0,0,0,.5);margin:20px auto;max-width:100%;outline:0;position:relative;width:960px}.sun-editor .se-file-browser .se-file-browser-header{border-bottom:1px solid #e5e5e5;height:auto;min-height:50px;padding:6px 15px}.sun-editor .se-file-browser .se-file-browser-header .se-file-browser-close{-webkit-appearance:none;filter:alpha(opacity=100);float:right;font-weight:700;opacity:1;text-shadow:0 1px 0 #fff}.sun-editor .se-file-browser .se-file-browser-header .se-file-browser-close>svg{height:12px;width:12px}.sun-editor .se-file-browser .se-file-browser-header .se-file-browser-title{font-size:16px;font-weight:700;line-height:2.2;margin:0;padding:0}.sun-editor .se-file-browser .se-file-browser-tags{display:block;margin:0 -15px;padding:0;text-align:left;width:100%}.sun-editor .se-file-browser .se-file-browser-tags a{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#f5f5f5;border-radius:32px;-moz-border-radius:32px;-webkit-border-radius:32px;color:#333;cursor:pointer;display:inline-block;margin:8px 0 8px 8px;padding:6px 12px;text-decoration:none}.sun-editor .se-file-browser .se-file-browser-tags a:hover{background-color:#e1e1e1}.sun-editor .se-file-browser .se-file-browser-tags a:active{background-color:#d1d1d1}.sun-editor .se-file-browser .se-file-browser-tags a.on{background-color:#ebf3fe;color:#4592ff}.sun-editor .se-file-browser .se-file-browser-tags a.on:hover{background-color:#d8e8fe}.sun-editor .se-file-browser .se-file-browser-tags a.on:active{background-color:#c7deff}.sun-editor .se-file-browser .se-file-browser-body{height:auto;min-height:350px;overflow-y:auto;padding:20px;position:relative}.sun-editor .se-file-browser .se-file-browser-body .se-file-browser-list{position:relative;width:100%}@media screen and (max-width:992px){.sun-editor .se-file-browser .se-file-browser-inner .se-file-browser-content{width:748px}}@media screen and (max-width:768px){.sun-editor .se-file-browser .se-file-browser-inner .se-file-browser-content{width:600px}}.sun-editor .se-file-browser .se-file-browser-list .se-file-item-column{display:block;float:left;height:auto;position:relative}.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-column{margin:0 10px;width:calc(25% - 20px)}@media screen and (max-width:992px){.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-column{width:calc(33% - 20px)}}@media screen and (max-width:768px){.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-column{width:calc(50% - 20px)}}.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-img{border-radius:4px;cursor:pointer;display:block;height:auto;margin:10px 0;outline:0;position:relative;width:100%}.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-img:hover{box-shadow:0 0 0 .2rem #3288ff;opacity:.8}.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-img>img{border-radius:4px;display:block;height:auto;outline:0;position:relative;width:100%}.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-img>.se-file-img-name{background-color:transparent;border-bottom-left-radius:4px;border-bottom-right-radius:4px;bottom:0;color:#fff;font-size:13px;height:30px;left:0;padding:5px 10px;position:absolute;width:100%;z-index:1}.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-img>.se-file-img-name.se-file-name-back{background-color:#333;opacity:.6}.sun-editor .se-notice{background-color:#f2dede;border:1px solid #eed3d7;color:#b94a48;display:none;font-size:13px;height:auto;margin:0;padding:15px;position:absolute;top:0;user-select:auto;-o-user-select:auto;-moz-user-select:auto;-khtml-user-select:auto;-webkit-user-select:auto;-ms-user-select:auto;width:100%;word-break:break-all;z-index:7}.sun-editor .se-notice button{float:right;padding:7px}.sun-editor .se-tooltip{overflow:visible;position:relative}.sun-editor .se-tooltip .se-tooltip-inner{backface-visibility:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;background:transparent;bottom:auto;display:block;float:none;height:auto;left:50%;line-height:1.5;margin:0;opacity:0;padding:0;pointer-events:none;position:absolute;top:120%;transition:opacity .5s;visibility:hidden;width:auto;z-index:1}.sun-editor .se-tooltip .se-tooltip-inner .se-tooltip-text{background-color:#333;border-radius:2px;color:#fff;cursor:auto;display:inline-block;font-size:.9em;height:auto;left:-50%;line-height:unset;margin:0;padding:4px 6px;position:relative;text-align:center;white-space:nowrap;width:auto}.sun-editor .se-tooltip .se-tooltip-inner .se-tooltip-text:after{border:5px solid transparent;border-bottom-color:#333;bottom:100%;content:"";left:50%;margin-left:-5px;position:absolute}.sun-editor .se-tooltip:hover .se-tooltip-inner{opacity:1;visibility:visible}.sun-editor .se-tooltip .se-tooltip-inner .se-tooltip-text .se-shortcut{display:block!important}.sun-editor .se-tooltip .se-tooltip-inner .se-tooltip-text .se-shortcut>.se-shortcut-key{display:inline;font-weight:700}.sun-editor.se-rtl .se-btn-tray{direction:rtl}.sun-editor.se-rtl .se-btn-select svg{margin:auto 1px}.sun-editor.se-rtl .se-btn-select .txt{direction:rtl;flex:auto;text-align:right}.sun-editor.se-rtl .se-btn-list{text-align:right}.sun-editor.se-rtl .se-btn-list>.se-list-icon{margin:-1px 0 0 10px}.sun-editor.se-rtl .se-menu-list:not(.se-menu-dir-fix),.sun-editor.se-rtl .se-menu-list:not(.se-menu-dir-fix) li{float:right}.sun-editor.se-rtl .se-list-layer *{direction:rtl}.sun-editor.se-rtl .se-list-layer.se-list-format ul blockquote{border-left-width:0;border-right-width:5px;padding:0 7px 0 0}.sun-editor.se-rtl .se-list-layer .se-selector-color .se-color-pallet li{float:right}.sun-editor.se-rtl .se-list-inner .se-list-checked li button>.se-svg{float:right;padding:6px 0 0 6px}.sun-editor.se-rtl .se-tooltip .se-tooltip-inner .se-tooltip-text,.sun-editor.se-rtl .se-wrapper .se-placeholder{direction:rtl}.sun-editor.se-rtl .se-tooltip .se-tooltip-inner .se-tooltip-text .se-shortcut{direction:ltr}.sun-editor.se-rtl .se-dialog *{direction:rtl}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-form .se-video-ratio{margin-left:0;margin-right:4px}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-header .se-dialog-close{float:left}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-header .se-modal-title,.sun-editor.se-rtl .se-dialog-tabs button{float:right}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-size-text{padding-right:34px}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-footer .se-btn-primary{float:left}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-footer>div{float:right}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-footer>div>label{margin:0 0 0 5px}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-form-footer label:first-child{margin-left:16px;margin-right:0}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-anchor-rel-preview{margin-left:4px;text-align:right}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-anchor-rel-btn{float:right}.sun-editor.se-rtl .se-file-browser *{direction:rtl}.sun-editor.se-rtl .se-file-browser .se-file-browser-tags{text-align:right}.sun-editor.se-rtl .se-file-browser .se-file-browser-tags a{margin:8px 8px 0}.sun-editor.se-rtl .se-file-browser .se-file-browser-header .se-file-browser-close{float:left}.sun-editor.se-rtl .se-controller .se-btn-group,.sun-editor.se-rtl .se-resizing-container .se-resize-display{direction:rtl}.sun-editor .se-btn-module-border.module-float-left{float:left}.sun-editor .se-btn-module-border.module-float-right{float:right}.sun-editor .se-error{color:#d9534f}.sun-editor input.se-error:focus,select.se-error:focus,textarea.se-error:focus{border:1px solid #f2dede;box-shadow:0 0 0 .2rem #eed3d7;outline:0;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.sun-editor hr.__se__solid{border-style:solid none none}.sun-editor hr.__se__dotted{border-style:dotted none none}.sun-editor hr.__se__dashed{border-style:dashed none none}@keyframes blinker{50%{opacity:0}}@keyframes spinner{to{transform:rotate(361deg)}}.sun-editor-editable{word-wrap:break-word;background-color:#fff;color:#333;font-family:Helvetica Neue;font-size:13px;line-height:1.5;margin:0;padding:16px;word-break:normal}.sun-editor-editable *{box-sizing:border-box;color:inherit;font-family:inherit;font-size:inherit}.sun-editor-editable.se-rtl *{direction:rtl}.sun-editor-editable .se-component>figure{direction:ltr}.sun-editor-editable audio,.sun-editor-editable figcaption,.sun-editor-editable figure,.sun-editor-editable iframe,.sun-editor-editable img,.sun-editor-editable td,.sun-editor-editable th,.sun-editor-editable video{position:relative}.sun-editor-editable span{display:inline;margin:0;padding:0;vertical-align:baseline}.sun-editor-editable span.katex{display:inline-block}.sun-editor-editable span.katex *{direction:ltr}.sun-editor-editable a{color:#004cff;text-decoration:none}.sun-editor-editable span[style~="color:"] a{color:inherit}.sun-editor-editable a:focus,.sun-editor-editable a:hover{color:#0093ff;cursor:pointer;text-decoration:underline}.sun-editor-editable a.on{background-color:#e8f7ff;color:#0093ff}.sun-editor-editable pre{word-wrap:break-word;background-color:#f9f9f9;border:1px solid #e1e1e1;border-radius:2px;color:#666;display:block;font-family:monospace;line-height:1.45;margin:0 0 10px;overflow:visible;padding:8px;white-space:pre-wrap!important}.sun-editor-editable ol{list-style-type:decimal}.sun-editor-editable ol,.sun-editor-editable ul{display:block;list-style-position:outside;margin-block-end:1em;margin-block-start:1em;margin-inline-end:0;margin-inline-start:0;padding-inline-start:40px}.sun-editor-editable ul{list-style-type:disc}.sun-editor-editable li{display:list-item;margin-bottom:5px;text-align:-webkit-match-parent}.sun-editor-editable ol ol,.sun-editor-editable ol ul,.sun-editor-editable ul ol,.sun-editor-editable ul ul{margin:0}.sun-editor-editable ol ol,.sun-editor-editable ul ol{list-style-type:lower-alpha}.sun-editor-editable ol ol ol,.sun-editor-editable ul ol ol,.sun-editor-editable ul ul ol{list-style-type:upper-roman}.sun-editor-editable ol ul,.sun-editor-editable ul ul{list-style-type:circle}.sun-editor-editable ol ol ul,.sun-editor-editable ol ul ul,.sun-editor-editable ul ul ul{list-style-type:square}.sun-editor-editable sub,.sun-editor-editable sup{font-size:75%;line-height:0}.sun-editor-editable sub{vertical-align:sub}.sun-editor-editable sup{vertical-align:super}.sun-editor-editable p{display:block;margin:0 0 10px}.sun-editor-editable div{display:block;margin:0;padding:0}.sun-editor-editable blockquote{border:solid #b1b1b1;border-width:0 0 0 5px;color:#999;display:block;font-family:inherit;font-size:inherit;margin-block-end:1em;margin-block-start:1em;margin-inline-end:0;margin-inline-start:0;padding:0 5px 0 20px}.sun-editor-editable blockquote blockquote{border-color:#c1c1c1}.sun-editor-editable blockquote blockquote blockquote{border-color:#d1d1d1}.sun-editor-editable blockquote blockquote blockquote blockquote{border-color:#e1e1e1}.sun-editor-editable.se-rtl blockquote{border-left-width:0;border-right-width:5px;padding-left:5px;padding-right:20px}.sun-editor-editable h1{font-size:2em;margin-block-end:.67em;margin-block-start:.67em}.sun-editor-editable h1,.sun-editor-editable h2{display:block;font-weight:700;margin-inline-end:0;margin-inline-start:0}.sun-editor-editable h2{font-size:1.5em;margin-block-end:.83em;margin-block-start:.83em}.sun-editor-editable h3{font-size:1.17em;margin-block-end:1em;margin-block-start:1em}.sun-editor-editable h3,.sun-editor-editable h4{display:block;font-weight:700;margin-inline-end:0;margin-inline-start:0}.sun-editor-editable h4{font-size:1em;margin-block-end:1.33em;margin-block-start:1.33em}.sun-editor-editable h5{font-size:.83em;margin-block-end:1.67em;margin-block-start:1.67em}.sun-editor-editable h5,.sun-editor-editable h6{display:block;font-weight:700;margin-inline-end:0;margin-inline-start:0}.sun-editor-editable h6{font-size:.67em;margin-block-end:2.33em;margin-block-start:2.33em}.sun-editor-editable hr{border-color:#000;-o-border-image:initial;border-image:initial;border-width:1px 0 0;display:flex;height:1px}.sun-editor-editable hr.__se__solid{border-style:solid none none}.sun-editor-editable hr.__se__dotted{border-style:dotted none none}.sun-editor-editable hr.__se__dashed{border-style:dashed none none}.sun-editor-editable hr.on{border-color:#4592ff;box-shadow:0 0 0 .1rem #c7deff}.sun-editor-editable table{background-color:transparent;border:1px solid #ccc;border-collapse:collapse;border-spacing:0;display:table;margin:0 0 10px;max-width:100%;table-layout:auto!important;width:100%}.sun-editor-editable.se-rtl table{margin:0 0 10px auto}.sun-editor-editable table thead{border-bottom:2px solid #333}.sun-editor-editable table tr{border:1px solid #efefef}.sun-editor-editable table th{background-color:#f3f3f3}.sun-editor-editable table td,.sun-editor-editable table th{background-clip:padding-box;border:1px solid #e1e1e1;padding:.4em}.sun-editor-editable table.se-table-size-auto{width:auto!important}.sun-editor-editable table.se-table-size-100{width:100%!important}.sun-editor-editable table.se-table-layout-auto{table-layout:auto!important}.sun-editor-editable table.se-table-layout-fixed{table-layout:fixed!important}.sun-editor-editable table td.se-table-selected-cell,.sun-editor-editable table th.se-table-selected-cell{outline:1px double #4592ff}.sun-editor-editable.se-disabled *{user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none}.sun-editor-editable .se-component{display:flex;margin:0 0 10px;padding:1px}.sun-editor-editable[contenteditable=true] .se-component{outline:1px dashed #e1e1e1}.sun-editor-editable[contenteditable=true] .se-component.se-component-copy{box-shadow:0 0 0 .2rem #3f9dff;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.sun-editor-editable .__se__float-left{float:left;margin-right:4px}.sun-editor-editable .__se__float-right{float:right;margin-left:4px}.sun-editor-editable .__se__float-center{float:center}.sun-editor-editable .__se__float-none{float:none}.sun-editor-editable audio,.sun-editor-editable iframe,.sun-editor-editable img,.sun-editor-editable video{display:block;height:auto;margin:0;max-width:100%;padding:0;width:auto}.sun-editor-editable[contenteditable=true]:not(.se-read-only) figure:after{background:transparent;bottom:0;content:"";cursor:default;display:block;left:0;position:absolute;right:0;top:0;z-index:1}.sun-editor-editable[contenteditable=true] figure a,.sun-editor-editable[contenteditable=true] figure iframe,.sun-editor-editable[contenteditable=true] figure img,.sun-editor-editable[contenteditable=true] figure video{z-index:0}.sun-editor-editable[contenteditable=true] figure figcaption{display:block;z-index:2}.sun-editor-editable[contenteditable=true] figure figcaption:focus{border-color:#80bdff;box-shadow:0 0 0 .2rem #c7deff;outline:0}.sun-editor-editable .se-image-container,.sun-editor-editable .se-video-container{height:auto;max-width:100%;width:auto}.sun-editor-editable figure{display:block;margin:0;outline:none;padding:0}.sun-editor-editable .__se__float-center figure,.sun-editor-editable .__se__float-left figure,.sun-editor-editable .__se__float-right figure{margin:auto!important}.sun-editor-editable figure figcaption{background-color:#f9f9f9;margin:0;outline:none;padding:1em .5em}.sun-editor-editable figure figcaption p{line-height:2;margin:0}.sun-editor-editable .se-image-container a img{margin:1px;outline:1px solid #4592ff;padding:1px}.sun-editor-editable .se-video-container iframe,.sun-editor-editable .se-video-container video{border:0;height:100%;left:0;outline:1px solid #9e9e9e;position:absolute;top:0;width:100%}.sun-editor-editable .se-video-container figure{left:0;max-width:100%;width:100%}.sun-editor-editable audio{height:54px;width:300px}.sun-editor-editable audio.active{outline:2px solid #80bdff}.sun-editor-editable.se-show-block div,.sun-editor-editable.se-show-block h1,.sun-editor-editable.se-show-block h2,.sun-editor-editable.se-show-block h3,.sun-editor-editable.se-show-block h4,.sun-editor-editable.se-show-block h5,.sun-editor-editable.se-show-block h6,.sun-editor-editable.se-show-block li,.sun-editor-editable.se-show-block ol,.sun-editor-editable.se-show-block p,.sun-editor-editable.se-show-block pre,.sun-editor-editable.se-show-block ul{border:1px dashed #3f9dff!important;padding:14px 8px 8px!important}.sun-editor-editable.se-show-block ol,.sun-editor-editable.se-show-block ul{border:1px dashed #d539ff!important}.sun-editor-editable.se-show-block pre{border:1px dashed #27c022!important}.se-show-block p{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPAQMAAAAF7dc0AAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAaSURBVAjXY/j/gwGCPvxg+F4BQiAGDP1HQQByxxw0gqOzIwAAAABJRU5ErkJggg==") no-repeat}.se-show-block div{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAPAQMAAAAxlBYoAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAmSURBVAjXY/j//wcDDH+8XsHwDYi/hwNx1A8w/nYLKH4XoQYJAwCXnSgcl2MOPgAAAABJRU5ErkJggg==") no-repeat}.se-show-block h1{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAPAQMAAAA4f7ZSAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAfSURBVAjXY/j/v4EBhr+9B+LzEPrDeygfhI8j1CBhAEhmJGY4Rf6uAAAAAElFTkSuQmCC") no-repeat}.se-show-block h2{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAPAQMAAAA4f7ZSAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAmSURBVAjXY/j/v4EBhr+dB+LtQPy9geEDEH97D8T3gbgdoQYJAwA51iPuD2haEAAAAABJRU5ErkJggg==") no-repeat}.se-show-block h3{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAPAQMAAAA4f7ZSAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAiSURBVAjXY/j/v4EBhr+dB+LtQPy9geHDeQgN5p9HqEHCADeWI+69VG2MAAAAAElFTkSuQmCC") no-repeat}.se-show-block h4{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAPAQMAAADTSA1RAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAiSURBVAjXY/j//wADDH97DsTXIfjDdiDdDMTfIRhZHRQDAKJOJ6L+K3y7AAAAAElFTkSuQmCC") no-repeat}.se-show-block h5{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAPAQMAAAA4f7ZSAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAlSURBVAjXY/j/v4EBhr+1A/F+IO5vYPiwHUh/B2IQfR6hBgkDABlWIy5uM+9GAAAAAElFTkSuQmCC") no-repeat}.se-show-block h6{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAPAQMAAAA4f7ZSAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAiSURBVAjXY/j/v4EBhr+dB+LtQLy/geFDP5S9HSKOrA6KAR9GIza1ptJnAAAAAElFTkSuQmCC") no-repeat}.se-show-block li{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA7SURBVDhPYxgFcNDQ0PAfykQBIHEYhgoRB/BpwCfHBKWpBkaggYxQGgOgBzyQD1aLLA4TGwWDGjAwAACR3RcEU9Ui+wAAAABJRU5ErkJggg==") no-repeat}.se-show-block ol{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABHSURBVDhPYxgFcNDQ0PAfhKFcFIBLHCdA1oBNM0kGEmMAPgOZoDTVANUNxAqQvURMECADRiiNAWCagDSGGhyW4DRrMAEGBgAu0SX6WpGgjAAAAABJRU5ErkJggg==") no-repeat}.se-show-block ul{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA1SURBVDhPYxgFDA0NDf+hTBSALI5LDQgwQWmqgVEDKQcsUBoF4ItFGEBXA+QzQpmDGjAwAAA8DQ4Lni6gdAAAAABJRU5ErkJggg==") no-repeat}.sun-editor .__se__p-bordered,.sun-editor-editable .__se__p-bordered{border-bottom:1px solid #b1b1b1;border-top:1px solid #b1b1b1;padding:4px 0}.sun-editor .__se__p-spaced,.sun-editor-editable .__se__p-spaced{letter-spacing:1px}.sun-editor .__se__p-neon,.sun-editor-editable .__se__p-neon{animation:neonFlicker 1.5s infinite alternate;background:#000;border:2px solid #fff;border-radius:6px;color:#fff;font-style:italic;font-weight:200;padding:6px 4px;text-transform:uppercase}@keyframes neonFlicker{0%,19%,21%,23%,25%,54%,56%,to{box-shadow:0 0 .5px #fff,inset 0 0 .5px #fff,0 0 2px #08f,inset 0 0 2px #08f,0 0 4px #08f,inset 0 0 4px #08f;text-shadow:-.2rem -.2rem 1rem #fff,.2rem .2rem 1rem #fff,0 0 2px #f40,0 0 4px #f40,0 0 6px #f40,0 0 8px #f40,0 0 10px #f40}20%,24%,55%{box-shadow:none;text-shadow:none}}.sun-editor .__se__t-shadow,.sun-editor-editable .__se__t-shadow{text-shadow:-.2rem -.2rem 1rem #fff,.2rem .2rem 1rem #fff,0 0 .2rem #999,0 0 .4rem #888,0 0 .6rem #777,0 0 .8rem #666,0 0 1rem #555}.sun-editor .__se__t-code,.sun-editor-editable .__se__t-code{background-color:rgba(27,31,35,.05);border-radius:6px;color:#666;font-family:monospace;padding:.2em .4em} +.sun-editor{background-color:#fff;border:1px solid #dadada;box-sizing:border-box;color:#000;font-family:Helvetica Neue;height:auto;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;width:auto}.sun-editor *{-webkit-user-drag:none;box-sizing:border-box;overflow:visible}.sun-editor-common button,.sun-editor-common input,.sun-editor-common select,.sun-editor-common textarea{font-size:14px;line-height:1.5}.sun-editor-common blockquote,.sun-editor-common body,.sun-editor-common button,.sun-editor-common code,.sun-editor-common dd,.sun-editor-common div,.sun-editor-common dl,.sun-editor-common dt,.sun-editor-common fieldset,.sun-editor-common form,.sun-editor-common h1,.sun-editor-common h2,.sun-editor-common h3,.sun-editor-common h4,.sun-editor-common h5,.sun-editor-common h6,.sun-editor-common input,.sun-editor-common legend,.sun-editor-common li,.sun-editor-common ol,.sun-editor-common p,.sun-editor-common pre,.sun-editor-common select,.sun-editor-common td,.sun-editor-common textarea,.sun-editor-common th,.sun-editor-common ul{border:0;margin:0;padding:0}.sun-editor-common dl,.sun-editor-common li,.sun-editor-common menu,.sun-editor-common ol,.sun-editor-common ul{list-style:none!important}.sun-editor-common hr{margin:6px 0!important}.sun-editor textarea{border:0;padding:0;resize:none}.sun-editor button{background-color:transparent;border:0;cursor:pointer;outline:none;touch-action:manipulation}.sun-editor button,.sun-editor input,.sun-editor select,.sun-editor textarea{vertical-align:middle}.sun-editor button span{display:block;margin:0;padding:0}.sun-editor button .txt{display:block;margin-top:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sun-editor button *{backface-visibility:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;pointer-events:none}.sun-editor svg{fill:currentColor}.sun-editor .se-svg,.sun-editor button>svg{fill:currentColor;display:block;float:none;height:16px;margin:auto;text-align:center;width:16px}.sun-editor .close>svg,.sun-editor .se-dialog-close>svg{height:10px;width:10px}.sun-editor .se-btn-select>svg{float:right;height:10px;width:10px}.sun-editor .se-btn-list>.se-list-icon{display:inline-block;height:16px;margin:-1px 10px 0 0;vertical-align:middle;width:16px}.sun-editor .se-line-breaker>button>svg{height:24px;width:24px}.sun-editor button>i:before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-size:15px;font-style:normal;font-variant:normal;line-height:2;text-rendering:auto}.sun-editor button>[class=se-icon-text]{font-size:20px;line-height:1}.sun-editor .se-arrow,.sun-editor .se-arrow:after{border:11px solid transparent;display:block;height:0;position:absolute;width:0}.sun-editor .se-arrow.se-arrow-up{border-bottom-color:#dadada;border-top-width:0;left:20px;margin-left:-11px;top:-11px}.sun-editor .se-arrow.se-arrow-up:after{border-bottom-color:#fff;border-top-width:0;content:" ";margin-left:-11px;top:1px}.sun-editor .se-toolbar .se-arrow.se-arrow-up:after{border-bottom-color:#fafafa}.sun-editor .se-arrow.se-arrow-down{border-bottom-width:0;border-top-color:#dadada;left:0;margin-left:-11px;top:0}.sun-editor .se-arrow.se-arrow-down:after{border-bottom-width:0;border-top-color:#fff;content:" ";margin-left:-11px;top:-12px}.sun-editor .se-toolbar .se-arrow.se-arrow-down:after{border-top-color:#fafafa}.sun-editor .se-container{height:auto;position:relative;width:auto}.sun-editor button{color:#000}.sun-editor .se-btn{border:0;border-radius:4px;float:left;font-size:12px;height:34px;line-height:27px;margin:1px!important;padding:0;width:34px}.sun-editor .se-btn:enabled:focus,.sun-editor .se-btn:enabled:hover{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-btn:enabled:active{background-color:#d1d1d1;border-color:#c1c1c1;box-shadow:inset 0 3px 5px #c1c1c1}.sun-editor .se-btn-primary{background-color:#c7deff;border:1px solid #80bdff;border-radius:4px;color:#000}.sun-editor .se-btn-primary:focus,.sun-editor .se-btn-primary:hover{background-color:#80bdff;border-color:#3f9dff;color:#000;outline:0 none}.sun-editor .se-btn-primary:active{background-color:#3f9dff;border-color:#4592ff;box-shadow:inset 0 3px 5px #4592ff;color:#fff}.sun-editor input,.sun-editor select,.sun-editor textarea{border:1px solid #ccc;border-radius:4px;color:#000}.sun-editor input:focus,.sun-editor select:focus,.sun-editor textarea:focus{border:1px solid #80bdff;box-shadow:0 0 0 .2rem #c7deff;outline:0;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.sun-editor .se-btn:enabled.active{color:#4592ff;outline:0 none}.sun-editor .se-btn:enabled.active:focus,.sun-editor .se-btn:enabled.active:hover{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-btn:enabled.active:active{background-color:#d1d1d1;border-color:#c1c1c1;box-shadow:inset 0 3px 5px #c1c1c1}.sun-editor .se-btn:enabled.on{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-btn:enabled.on:focus,.sun-editor .se-btn:enabled.on:hover{background-color:#d1d1d1;border-color:#c1c1c1;outline:0 none}.sun-editor .se-btn:enabled.on:active{background-color:#c1c1c1;border-color:#b1b1b1;box-shadow:inset 0 3px 5px #b1b1b1}.sun-editor .se-btn-list:disabled,.sun-editor .se-btn:disabled,.sun-editor button:disabled{background-color:inherit;color:#bdbdbd;cursor:not-allowed}.sun-editor .se-loading-box{background-color:#fff;display:none;filter:alpha(opacity=70);height:100%;left:0;opacity:.7;position:absolute;top:0;width:100%;z-index:2147483647}.sun-editor .se-loading-box .se-loading-effect{animation:spinner .8s linear infinite;border-radius:50%;border-right:2px solid transparent;border-top:2px solid #07d;display:block;height:25px;left:50%;margin:-25px 0 0 -25px;position:absolute;top:50%;width:25px}.sun-editor .se-line-breaker{border-top:1px solid #3288ff;cursor:text;display:none;height:1px;position:absolute;width:100%;z-index:7}.sun-editor .se-line-breaker>button.se-btn{background-color:#fff;border:1px solid #0c2240;cursor:pointer;display:inline-block;float:none;height:30px;left:-50%;opacity:.6;position:relative;top:-15px;width:30px}.sun-editor .se-line-breaker>button.se-btn:hover{background-color:#fff;border-color:#041b39;opacity:.9}.sun-editor .se-line-breaker-component{background-color:#fff;border:1px solid #0c2240;border-radius:4px;cursor:pointer;display:none;height:24px;opacity:.6;position:absolute;width:24px;z-index:7}.sun-editor .se-line-breaker-component:hover{opacity:.9}.sun-editor .se-toolbar{background-color:#fafafa;display:block;height:auto;margin:0;outline:1px solid #dadada;overflow:visible;padding:0;position:relative;width:100%;z-index:5}.sun-editor .se-toolbar-shadow{background-color:transparent!important;border:none!important;display:block!important;height:0!important;margin:0!important;outline:none!important;padding:0!important;z-index:0!important}.sun-editor .se-toolbar-cover{background-color:#fefefe;cursor:not-allowed;display:none;filter:alpha(opacity=50);font-size:36px;height:100%;left:0;opacity:.5;position:absolute;top:0;width:100%;z-index:4}.sun-editor .se-toolbar-separator-vertical{display:inline-block;height:0;margin:0;vertical-align:top;width:0}.sun-editor .se-toolbar.se-toolbar-balloon,.sun-editor .se-toolbar.se-toolbar-inline{box-shadow:0 3px 9px rgba(0,0,0,.5);-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);display:none;position:absolute}.sun-editor .se-toolbar.se-toolbar-balloon{width:auto;z-index:2147483647}.sun-editor .se-toolbar.se-toolbar-sticky{position:fixed;top:0}.sun-editor .se-toolbar-sticky-dummy{display:none;position:static;z-index:-1}.sun-editor .se-btn-module{display:inline-block}.sun-editor .se-btn-module-border{border:1px solid #dadada;border-radius:4px;margin-left:1px;margin-right:1px}.sun-editor .se-btn-module-enter{background-color:transparent;display:block;height:0;margin:0;padding:0;width:100%}.sun-editor .se-toolbar-more-layer{background-color:#fafafa;margin:0 -3px}.sun-editor .se-toolbar-more-layer .se-more-layer{border-top:1px solid #dadada;display:none}.sun-editor .se-toolbar-more-layer .se-more-layer .se-more-form{display:inline-block;height:auto;padding:4px 3px 0;width:100%}.sun-editor .se-btn-module .se-btn-more.se-btn-more-text{padding:0 4px;width:auto}.sun-editor .se-btn-module .se-btn-more:focus,.sun-editor .se-btn-module .se-btn-more:hover{background-color:#d1d1d1;border-color:#c1c1c1;color:#000;outline:0 none}.sun-editor .se-btn-module .se-btn-more.on{background-color:#d1d1d1;border-color:#c1c1c1;color:#333;outline:0 none}.sun-editor .se-btn-module .se-btn-more.on:hover{background-color:#c1c1c1;border-color:#b1b1b1;color:#000;outline:0 none}.sun-editor .se-menu-list,.sun-editor .se-menu-list li{float:left;margin:0;padding:0}.sun-editor .se-menu-list li{position:relative}.sun-editor .se-btn-select{display:flex;padding:4px 6px;width:auto}.sun-editor .se-btn-select .txt{flex:auto;text-align:left}.sun-editor .se-btn-select.se-btn-tool-font{width:100px}.sun-editor .se-btn-select.se-btn-tool-format{width:82px}.sun-editor .se-btn-select.se-btn-tool-size{width:78px}.sun-editor .se-btn-tray{height:auto;margin:0;padding:4px 3px 0;position:relative;width:100%}.sun-editor .se-menu-tray{height:0;left:0;position:absolute;top:0;width:100%}.sun-editor .se-submenu{overflow-x:hidden;overflow-y:auto}.sun-editor .se-menu-container{overflow-x:unset;overflow-y:unset}.sun-editor .se-list-layer{background-color:#fff;border:1px solid #bababa;border-radius:4px;box-shadow:0 3px 9px rgba(0,0,0,.5);display:none;height:auto;left:0;outline:0 none;padding:6px 0;position:absolute;top:0;z-index:5}.sun-editor .se-list-layer .se-list-inner{margin:0;overflow-x:initial;overflow-y:initial;overflow:visible;padding:0}.sun-editor .se-list-layer button{margin:0;width:100%}.sun-editor .se-list-inner ul{padding:0;width:100%}.sun-editor .se-list-inner li>button{min-width:100%;width:-moz-max-content;width:max-content}.sun-editor .se-list-inner .se-list-basic li{width:100%}.sun-editor .se-list-inner .se-list-basic li button.active{background-color:#80bdff;border:1px solid #3f9dff;border-left:0;border-right:0}.sun-editor .se-list-inner .se-list-basic li button.active:hover{background-color:#3f9dff;border:1px solid #4592ff;border-left:0;border-right:0}.sun-editor .se-list-inner .se-list-basic li button.active:active{background-color:#4592ff;border:1px solid #407dd1;border-left:0;border-right:0;box-shadow:inset 0 3px 5px #407dd1}.sun-editor .se-list-inner .se-list-checked li button>.se-svg{float:left;padding:6px 6px 0 0}.sun-editor .se-list-inner .se-list-checked li button>.se-svg>svg{display:none}.sun-editor .se-list-inner .se-list-checked li button.se-checked{color:#4592ff}.sun-editor .se-list-inner .se-list-checked li button.se-checked>.se-svg>svg{display:block}.sun-editor .se-btn-list{cursor:pointer;font-size:12px;height:auto;line-height:normal;min-height:32px;padding:0 14px;text-align:left;text-decoration:none;text-indent:0;width:100%}.sun-editor .se-btn-list.default_value{background-color:#f3f3f3;border-bottom:1px dotted #b1b1b1;border-top:1px dotted #b1b1b1}.sun-editor .se-btn-list:focus,.sun-editor .se-btn-list:hover{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-btn-list:active{background-color:#d1d1d1;border-color:#c1c1c1;box-shadow:inset 0 3px 5px #c1c1c1}.sun-editor .se-list-layer.se-list-font-size{max-height:300px;min-width:140px}.sun-editor .se-list-layer.se-list-font-family{min-width:156px}.sun-editor .se-list-layer.se-list-font-family .default{border-bottom:1px solid #ccc}.sun-editor .se-list-layer.se-list-line{width:125px}.sun-editor .se-list-layer.se-list-line hr{border-width:1px 0 0;height:1px}.sun-editor .se-list-layer.se-list-align .se-list-inner{left:9px}.sun-editor .se-list-layer.se-list-format{min-width:156px}.sun-editor .se-list-layer.se-list-format li{padding:0;width:100%}.sun-editor .se-list-layer.se-list-format ul .se-btn-list{line-height:100%}.sun-editor .se-list-layer.se-list-format ul .se-btn-list[data-value=h1]{height:40px}.sun-editor .se-list-layer.se-list-format ul .se-btn-list[data-value=h2]{height:34px}.sun-editor .se-list-layer.se-list-format ul p{font-size:13px}.sun-editor .se-list-layer.se-list-format ul div{font-size:13px;padding:4px 2px}.sun-editor .se-list-layer.se-list-format ul h1{color:#333;font-size:2em;font-weight:700}.sun-editor .se-list-layer.se-list-format ul h2{color:#333;font-size:1.5em;font-weight:700}.sun-editor .se-list-layer.se-list-format ul h3{color:#333;font-size:1.17em;font-weight:700}.sun-editor .se-list-layer.se-list-format ul h4{color:#333;font-size:1em;font-weight:700}.sun-editor .se-list-layer.se-list-format ul h5{color:#333;font-size:.83em;font-weight:700}.sun-editor .se-list-layer.se-list-format ul h6{color:#333;font-size:.67em;font-weight:700}.sun-editor .se-list-layer.se-list-format ul blockquote{background-color:transparent;border-color:#b1b1b1;border-left:5px #b1b1b1;border-style:solid;color:#999;font-size:13px;height:22px;line-height:1.5;margin:0;padding:0 0 0 7px}.sun-editor .se-list-layer.se-list-format ul pre{background-color:#f9f9f9;border:1px solid #e1e1e1;border-radius:4px;color:#666;font-size:13px;margin:0;padding:4px 11px}.sun-editor .se-selector-table{-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175);display:none;float:left;font-size:14px;left:1px;list-style:none;margin:2px 0 0;padding:5px 0;position:absolute;text-align:left;top:34px;z-index:5}.sun-editor .se-selector-table .se-table-size{font-size:18px;padding:0 5px}.sun-editor .se-selector-table .se-table-size-picker{cursor:pointer;font-size:18px;height:10em;position:absolute!important;width:10em;z-index:3}.sun-editor .se-selector-table .se-table-size-highlighted{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAADJmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo4QTZCNzMzN0I3RUYxMUU4ODcwQ0QwMjM1NTgzRTJDNyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo4QTZCNzMzNkI3RUYxMUU4ODcwQ0QwMjM1NTgzRTJDNyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0MzYyNEUxRUI3RUUxMUU4ODZGQzgwRjNBODgyNTdFOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0MzYyNEUxRkI3RUUxMUU4ODZGQzgwRjNBODgyNTdFOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pl0yAuwAAABBSURBVDhPY/wPBAxUAGCDGvdBeWSAeicIDTfIXREiQArYeR9hEBOEohyMGkQYjBpEGAxjg6ib+yFMygCVvMbAAABj0hwMTNeKJwAAAABJRU5ErkJggg==") repeat;font-size:18px;height:1em;position:absolute!important;width:1em;z-index:2}.sun-editor .se-selector-table .se-table-size-unhighlighted{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIj4+Pjp6ekKlAqjAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKhmnaJzPAAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC") repeat;font-size:18px;height:10em;position:relative!important;width:10em;z-index:1}.sun-editor .se-selector-table .se-table-size-display{padding-left:5px}.sun-editor .se-list-layer.se-table-split{top:36px}.sun-editor .se-list-layer .se-selector-color{display:flex;height:auto;margin:auto;max-width:270px;padding:0;width:-moz-max-content;width:max-content}.sun-editor .se-list-layer .se-selector-color .se-color-pallet{height:100%;padding:0;width:100%}.sun-editor .se-list-layer .se-selector-color .se-color-pallet li{display:flex;float:left;margin:0;position:relative}.sun-editor .se-list-layer .se-selector-color .se-color-pallet button{cursor:default;display:block;height:30px;text-indent:-9999px;width:30px}.sun-editor .se-list-layer .se-selector-color .se-color-pallet button.active,.sun-editor .se-list-layer .se-selector-color .se-color-pallet button:focus,.sun-editor .se-list-layer .se-selector-color .se-color-pallet button:hover{border:3px solid #fff}.sun-editor .se-form-group{display:flex;height:auto;min-height:40px;padding:4px;width:100%}.sun-editor .se-form-group input{border:1px solid #ccc;border-radius:.25rem;display:inline-block;flex:auto;font-size:12px;height:33px;margin:1px 0;padding:0;width:auto}.sun-editor .se-form-group button,.sun-editor .se-submenu-form-group button{float:right;height:34px;margin:0 2px!important;width:34px}.sun-editor .se-form-group button.se-btn{border:1px solid #ccc}.sun-editor .se-form-group>div{position:relative}.sun-editor .se-form-group label{display:inline-block;font-weight:700;margin-bottom:5px;max-width:100%}.sun-editor .se-form-group-label{height:auto;padding:0 4px;width:100%}.sun-editor .se-form-group-label label{font-size:13px;font-weight:700}.sun-editor .se-submenu .se-form-group input{color:#555;height:33px;width:auto}.sun-editor .se-submenu .se-form-group .se-color-input{border:none;border-bottom:2px solid #b1b1b1;outline:none;text-transform:uppercase;width:72px}.sun-editor .se-submenu .se-form-group .se-color-input:focus{border-bottom:3px solid #b1b1b1}.sun-editor .se-wrapper{height:auto;overflow:hidden;position:relative!important;width:100%;z-index:1}.sun-editor .se-wrapper .se-wrapper-inner{-webkit-overflow-scrolling:touch;height:100%;min-height:65px;overflow-x:auto;overflow-y:auto;user-select:auto;-o-user-select:auto;-moz-user-select:auto;-khtml-user-select:auto;-webkit-user-select:auto;-ms-user-select:auto;width:100%}.sun-editor .se-wrapper .se-wrapper-inner:focus{outline:none}.sun-editor .se-wrapper .se-wrapper-code{background-color:#191919;color:#fff;font-size:13px;margin:0;padding:4px;resize:none!important;word-break:break-all}.sun-editor .se-wrapper .se-wrapper-wysiwyg{display:block}.sun-editor .se-wrapper .se-wrapper-code-mirror{font-size:13px}.sun-editor .se-wrapper .se-placeholder{backface-visibility:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;color:#b1b1b1;display:none;font-size:13px;left:0;line-height:1.5;margin-left:0;margin-right:0;margin-top:0;overflow:hidden;padding-left:16px;padding-right:16px;padding-top:16px;pointer-events:none;position:absolute;right:0;text-overflow:ellipsis;top:0;white-space:nowrap;z-index:1}.sun-editor .se-resizing-bar{background-color:#fafafa;border-top:1px solid #dadada;cursor:ns-resize;display:flex;height:auto;min-height:16px;padding:0 4px;width:auto}.sun-editor .se-resizing-bar.se-resizing-none{cursor:default}.sun-editor .se-resizing-back{cursor:default;display:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:2147483647}.sun-editor .se-resizing-bar .se-navigation{background:transparent;color:#666;flex:auto;font-size:10px;height:auto;line-height:1.5;margin:0;padding:0;position:relative;width:auto}.sun-editor .se-resizing-bar .se-char-counter-wrapper{background:transparent;color:#999;display:block;flex:none;font-size:13px;height:auto;margin:0;padding:0;position:relative;width:auto}.sun-editor .se-resizing-bar .se-char-counter-wrapper.se-blink{animation:blinker .2s linear infinite;color:#b94a48}.sun-editor .se-resizing-bar .se-char-counter-wrapper .se-char-label{margin-right:4px}.sun-editor .se-dialog{display:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:2147483647}.sun-editor .se-dialog button,.sun-editor .se-dialog input,.sun-editor .se-dialog label{color:#111;font-size:14px;line-height:1.5;margin:0}.sun-editor .se-dialog .se-dialog-back{background-color:#222;opacity:.5}.sun-editor .se-dialog .se-dialog-back,.sun-editor .se-dialog .se-dialog-inner{height:100%;left:0;position:absolute;top:0;width:100%}.sun-editor .se-dialog .se-dialog-inner .se-dialog-content{-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:4px;box-shadow:0 3px 9px rgba(0,0,0,.5);margin:1.75rem auto;max-width:500px;outline:0;position:relative;width:auto}@media screen and (max-width:509px){.sun-editor .se-dialog .se-dialog-inner .se-dialog-content{width:100%}}.sun-editor .se-dialog .se-dialog-inner .se-dialog-content label{display:inline-block;font-weight:700;margin-bottom:5px;max-width:100%}.sun-editor .se-dialog .se-dialog-inner .se-dialog-content .se-btn-primary{border-radius:4px;display:inline-block;font-size:14px;font-weight:400;line-height:1.42857143;margin:0 0 10px!important;padding:6px 12px;text-align:center;touch-action:manipulation;vertical-align:middle;white-space:nowrap}.sun-editor .se-dialog .se-dialog-inner .se-dialog-header{border-bottom:1px solid #e5e5e5;height:50px;padding:6px 15px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-header .se-dialog-close{-webkit-appearance:none;filter:alpha(opacity=100);float:right;font-weight:700;opacity:1;text-shadow:0 1px 0 #fff}.sun-editor .se-dialog .se-dialog-inner .se-dialog-header .se-modal-title{float:left;font-size:14px;font-weight:700;line-height:2.5;margin:0;padding:0}.sun-editor .se-dialog .se-dialog-inner .se-dialog-body{padding:15px 15px 5px;position:relative}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form{margin-bottom:10px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form-footer{margin-bottom:0;margin-top:10px}.sun-editor .se-dialog .se-dialog-inner input:disabled{background-color:#f3f3f3}.sun-editor .se-dialog .se-dialog-inner .se-dialog-size-text{width:100%}.sun-editor .se-dialog .se-dialog-inner .se-dialog-size-text .size-h,.sun-editor .se-dialog .se-dialog-inner .se-dialog-size-text .size-w{text-align:center;width:70px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-size-x{margin:0 8px;text-align:center;width:25px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-footer{border-top:1px solid #e5e5e5;height:auto;min-height:55px;padding:10px 15px 0;text-align:right}.sun-editor .se-dialog .se-dialog-inner .se-dialog-footer>div{float:left}.sun-editor .se-dialog .se-dialog-inner .se-dialog-footer>div>label{margin:0 5px 0 0}.sun-editor .se-dialog .se-dialog-inner .se-dialog-btn-radio{margin-left:12px;margin-right:6px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-btn-check{margin-left:12px;margin-right:4px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form-footer .se-dialog-btn-check{margin-left:0;margin-right:4px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form-footer label:first-child{margin-left:0;margin-right:16px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-dialog-form-files{align-items:center;display:flex;position:relative}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-dialog-form-files>input{flex:auto}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-dialog-form-files .se-dialog-files-edge-button{border:1px solid #ccc;flex:auto;opacity:.8}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-dialog-form-files .se-dialog-files-edge-button.se-file-remove>svg{height:8px;width:8px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-dialog-form-files .se-dialog-files-edge-button:hover{background-color:#f0f0f0;outline:0 none}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-dialog-form-files .se-dialog-files-edge-button:active{background-color:#e9e9e9;box-shadow:inset 0 3px 5px #d6d6d6}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-select{display:inline-block;font-size:14px;height:34px;line-height:1.42857143;text-align:center;width:auto}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-control{display:inline-block;font-size:14px;height:34px;line-height:1.42857143;text-align:center;width:70px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-form{display:block;font-size:14px;height:34px;line-height:1.42857143;padding:0 4px;width:100%}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-form.se-input-url{direction:ltr}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-form.se-input-url:disabled{color:#999;text-decoration:line-through}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-video-ratio{margin-left:4px;width:70px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form a{color:#004cff}.sun-editor .se-dialog .se-dialog-inner .se-dialog-btn-revert{border:1px solid #ccc}.sun-editor .se-dialog .se-dialog-inner .se-dialog-btn-revert:hover{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-dialog .se-dialog-inner .se-dialog-btn-revert:active{background-color:#d1d1d1;border-color:#c1c1c1;box-shadow:inset 0 3px 5px #c1c1c1}.sun-editor .se-dialog-tabs{border-bottom:1px solid #e5e5e5;height:25px;width:100%}.sun-editor .se-dialog-tabs button{background-color:#e5e5e5;border-right:1px solid #e5e5e5;float:left;outline:none;padding:2px 13px;transition:.3s}.sun-editor .se-dialog-tabs button:hover{background-color:#fff}.sun-editor .se-dialog-tabs button.active{background-color:#fff;border-bottom:0}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-form.se-math-exp{border:1px solid #ccc;direction:ltr;font-size:13px;height:14em;padding:4px;resize:vertical}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-input-select.se-math-size{height:28px;margin-left:1em;width:6em}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-math-preview{font-size:13px}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-math-preview>span{box-shadow:0 0 0 .1rem #c7deff;display:inline-block}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-math-preview>span *{direction:ltr}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-math-preview>.se-math-katex-error{box-shadow:0 0 0 .1rem #f2dede;color:#b94a48}.sun-editor .se-dialog .se-dialog-inner .se-dialog-form .se-math-preview>.se-math-katex-error svg{color:#b94a48;height:30px;width:auto}.sun-editor .se-dialog .se-dialog-inner .se-link-preview{background-color:transparent;color:#666;display:block;font-family:inherit;font-size:13px;font-weight:400;height:auto;max-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:pre;word-break:break-all}.sun-editor .se-dialog .se-dialog-inner .se-anchor-preview-form{display:flex;margin-top:4px;width:100%}.sun-editor .se-dialog .se-dialog-inner .se-anchor-preview-form .se-svg.se-anchor-preview-icon{color:#4592ff;display:none;flex:unset;line-height:1.5}.sun-editor .se-dialog .se-dialog-inner .se-anchor-preview-form .se-link-preview{flex:auto;margin:0}.sun-editor .se-dialog .se-dialog-inner .se-anchor-rel{height:34px}.sun-editor .se-dialog .se-dialog-inner .se-anchor-rel-btn{color:#3f9dff;width:46px}.sun-editor .se-dialog .se-dialog-inner .se-anchor-rel-wrapper{display:flex;line-height:1.5;padding-top:6px}.sun-editor .se-dialog .se-dialog-inner .se-anchor-rel-preview{text-align:left}.sun-editor .se-controller .se-arrow.se-arrow-up{border-bottom-color:rgba(0,0,0,.25)}.sun-editor .se-controller{word-wrap:normal;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.25);border-radius:4px;box-shadow:0 5px 10px rgba(0,0,0,.2);display:none;letter-spacing:normal;line-break:auto;overflow:visible;position:absolute;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:6}.sun-editor .se-controller .se-btn-group{display:flex;left:0;padding:2px;position:relative;top:0;vertical-align:middle}.sun-editor .se-controller .se-btn-group .se-btn-group-sub{display:none;left:50%;min-width:auto;width:-moz-max-content;width:max-content}.sun-editor .se-controller .se-btn-group .se-btn-group-sub button{margin:0;min-width:72px}.sun-editor .se-controller .se-btn-group button{border:none;border-radius:4px;display:inline-block;font-size:12px;font-weight:400;height:auto;line-height:1.5;margin:1px;min-height:34px;padding:5px 10px;position:relative;text-align:center;touch-action:manipulation;vertical-align:middle;white-space:nowrap}.sun-editor .se-controller .se-btn-group button:focus:enabled,.sun-editor .se-controller .se-btn-group button:hover:enabled{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-controller .se-btn-group button:active:enabled{background-color:#d1d1d1;border-color:#c1c1c1;box-shadow:inset 0 3px 5px #c1c1c1}.sun-editor .se-controller .se-btn-group button span{display:block;margin:0;padding:0}.sun-editor .se-controller .se-btn-group button:enabled.active{color:#4592ff;outline:0 none}.sun-editor .se-controller .se-btn-group button:enabled.active:focus,.sun-editor .se-controller .se-btn-group button:enabled.active:hover{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-controller .se-btn-group button:enabled.active:active{background-color:#d1d1d1;border-color:#c1c1c1;box-shadow:inset 0 3px 5px #c1c1c1}.sun-editor .se-controller .se-btn-group button:enabled.on{background-color:#e1e1e1;border-color:#d1d1d1;outline:0 none}.sun-editor .se-controller .se-btn-group button:enabled.on:focus,.sun-editor .se-controller .se-btn-group button:enabled.on:hover{background-color:#d1d1d1;border-color:#c1c1c1;outline:0 none}.sun-editor .se-controller .se-btn-group button:enabled.on:active{background-color:#c1c1c1;border-color:#b1b1b1;box-shadow:inset 0 3px 5px #b1b1b1}.sun-editor .se-controller .se-form-group input{min-width:120px}.sun-editor .se-controller-resizing{font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;margin-top:-50px!important;padding:0}.sun-editor .se-controller-resizing .se-btn-group .se-btn-group-sub.se-resizing-align-list{width:74px}.sun-editor .se-resizing-container{background-color:transparent;display:none;outline:1px solid #3f9dff;position:absolute}.sun-editor .se-resizing-container .se-modal-resize{background-color:#3f9dff;display:inline-block;opacity:.3;position:absolute}.sun-editor .se-resizing-container .se-resize-dot{height:100%;left:0;position:absolute;top:0;width:100%}.sun-editor .se-resizing-container .se-resize-dot>span{background-color:#3f9dff;border:1px solid #4592ff;height:7px;position:absolute;width:7px}.sun-editor .se-resizing-container .se-resize-dot>span.tl{cursor:nw-resize;left:-5px;top:-5px}.sun-editor .se-resizing-container .se-resize-dot>span.tr{cursor:ne-resize;right:-5px;top:-5px}.sun-editor .se-resizing-container .se-resize-dot>span.bl{bottom:-5px;cursor:sw-resize;left:-5px}.sun-editor .se-resizing-container .se-resize-dot>span.br{bottom:-5px;cursor:se-resize;right:-5px}.sun-editor .se-resizing-container .se-resize-dot>span.lw{bottom:50%;cursor:w-resize;left:-7px}.sun-editor .se-resizing-container .se-resize-dot>span.th{cursor:n-resize;left:50%;top:-7px}.sun-editor .se-resizing-container .se-resize-dot>span.rw{bottom:50%;cursor:e-resize;right:-7px}.sun-editor .se-resizing-container .se-resize-dot>span.bh{bottom:-7px;cursor:s-resize;right:50%}.sun-editor .se-resizing-container .se-resize-display{background-color:#333;border-radius:4px;bottom:0;color:#fff;font-size:12px;margin:5px;padding:5px;position:absolute;right:0}.sun-editor .se-controller-table,.sun-editor .se-controller-table-cell{width:auto}.sun-editor .se-controller-link,.sun-editor .se-controller-table,.sun-editor .se-controller-table-cell{font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;padding:0}.sun-editor .se-controller-link:after,.sun-editor .se-controller-link:before{box-sizing:border-box}.sun-editor .se-controller-link .link-content{margin:0;padding:0}.sun-editor .se-controller-link .link-content a{color:#4592ff;display:inline-block;margin-left:5px;max-width:200px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.sun-editor .se-select-list{background-color:#fff;border:1px solid #bababa;box-shadow:0 3px 9px rgba(0,0,0,.5);display:none;left:0;margin:0;max-width:100%;outline:0 none;padding:0;position:absolute;top:0;width:auto}.sun-editor .se-select-list .se-select-item{cursor:pointer;font-size:13px;line-height:28px;margin:2px 0;min-height:28px;padding:0 5px}.sun-editor .se-select-list.__se_select-menu-mouse-move .se-select-item:hover,.sun-editor .se-select-list:not(.__se_select-menu-mouse-move) .se-select-item.active{background-color:#e1e1e1}.sun-editor .se-dialog-form-files .se-select-list{width:100%}.sun-editor .se-file-browser{display:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:2147483647}.sun-editor .se-file-browser button,.sun-editor .se-file-browser input,.sun-editor .se-file-browser label{color:#111;font-size:14px;line-height:1.5;margin:0}.sun-editor .se-file-browser .se-file-browser-back{background-color:#222;opacity:.5}.sun-editor .se-file-browser .se-file-browser-back,.sun-editor .se-file-browser .se-file-browser-inner{display:block;height:100%;left:0;position:absolute;top:0;width:100%}.sun-editor .se-file-browser .se-file-browser-inner .se-file-browser-content{-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:4px;box-shadow:0 3px 9px rgba(0,0,0,.5);margin:20px auto;max-width:100%;outline:0;position:relative;width:960px}.sun-editor .se-file-browser .se-file-browser-header{border-bottom:1px solid #e5e5e5;height:auto;min-height:50px;padding:6px 15px}.sun-editor .se-file-browser .se-file-browser-header .se-file-browser-close{-webkit-appearance:none;filter:alpha(opacity=100);float:right;font-weight:700;opacity:1;text-shadow:0 1px 0 #fff}.sun-editor .se-file-browser .se-file-browser-header .se-file-browser-close>svg{height:12px;width:12px}.sun-editor .se-file-browser .se-file-browser-header .se-file-browser-title{font-size:16px;font-weight:700;line-height:2.2;margin:0;padding:0}.sun-editor .se-file-browser .se-file-browser-tags{display:block;margin:0 -15px;padding:0;text-align:left;width:100%}.sun-editor .se-file-browser .se-file-browser-tags a{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#f5f5f5;border-radius:32px;-moz-border-radius:32px;-webkit-border-radius:32px;color:#333;cursor:pointer;display:inline-block;margin:8px 0 8px 8px;padding:6px 12px;text-decoration:none}.sun-editor .se-file-browser .se-file-browser-tags a:hover{background-color:#e1e1e1}.sun-editor .se-file-browser .se-file-browser-tags a:active{background-color:#d1d1d1}.sun-editor .se-file-browser .se-file-browser-tags a.on{background-color:#ebf3fe;color:#4592ff}.sun-editor .se-file-browser .se-file-browser-tags a.on:hover{background-color:#d8e8fe}.sun-editor .se-file-browser .se-file-browser-tags a.on:active{background-color:#c7deff}.sun-editor .se-file-browser .se-file-browser-body{height:auto;min-height:350px;overflow-y:auto;padding:20px;position:relative}.sun-editor .se-file-browser .se-file-browser-body .se-file-browser-list{position:relative;width:100%}@media screen and (max-width:992px){.sun-editor .se-file-browser .se-file-browser-inner .se-file-browser-content{width:748px}}@media screen and (max-width:768px){.sun-editor .se-file-browser .se-file-browser-inner .se-file-browser-content{width:600px}}.sun-editor .se-file-browser .se-file-browser-list .se-file-item-column{display:block;float:left;height:auto;position:relative}.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-column{margin:0 10px;width:calc(25% - 20px)}@media screen and (max-width:992px){.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-column{width:calc(33% - 20px)}}@media screen and (max-width:768px){.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-column{width:calc(50% - 20px)}}.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-img{border-radius:4px;cursor:pointer;display:block;height:auto;margin:10px 0;outline:0;position:relative;width:100%}.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-img:hover{box-shadow:0 0 0 .2rem #3288ff;opacity:.8}.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-img>img{border-radius:4px;display:block;height:auto;outline:0;position:relative;width:100%}.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-img>.se-file-img-name{background-color:transparent;border-bottom-left-radius:4px;border-bottom-right-radius:4px;bottom:0;color:#fff;font-size:13px;height:30px;left:0;padding:5px 10px;position:absolute;width:100%;z-index:1}.sun-editor .se-file-browser .se-file-browser-list.se-image-list .se-file-item-img>.se-file-img-name.se-file-name-back{background-color:#333;opacity:.6}.sun-editor .se-notice{background-color:#f2dede;border:1px solid #eed3d7;color:#b94a48;display:none;font-size:13px;height:auto;margin:0;padding:15px;position:absolute;top:0;user-select:auto;-o-user-select:auto;-moz-user-select:auto;-khtml-user-select:auto;-webkit-user-select:auto;-ms-user-select:auto;width:100%;word-break:break-all;z-index:7}.sun-editor .se-notice button{float:right;padding:7px}.sun-editor .se-tooltip{overflow:visible;position:relative}.sun-editor .se-tooltip .se-tooltip-inner{backface-visibility:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;background:transparent;bottom:auto;display:block;float:none;height:auto;left:50%;line-height:1.5;margin:0;opacity:0;padding:0;pointer-events:none;position:absolute;top:120%;transition:opacity .5s;visibility:hidden;width:auto;z-index:1}.sun-editor .se-tooltip .se-tooltip-inner .se-tooltip-text{background-color:#333;border-radius:2px;color:#fff;cursor:auto;display:inline-block;font-size:.9em;height:auto;left:-50%;line-height:unset;margin:0;padding:4px 6px;position:relative;text-align:center;white-space:nowrap;width:auto}.sun-editor .se-tooltip .se-tooltip-inner .se-tooltip-text:after{border:5px solid transparent;border-bottom-color:#333;bottom:100%;content:"";left:50%;margin-left:-5px;position:absolute}.sun-editor .se-tooltip:hover .se-tooltip-inner{opacity:1;visibility:visible}.sun-editor .se-tooltip .se-tooltip-inner .se-tooltip-text .se-shortcut{display:block!important}.sun-editor .se-tooltip .se-tooltip-inner .se-tooltip-text .se-shortcut>.se-shortcut-key{display:inline;font-weight:700}.sun-editor.se-rtl .se-btn-tray{direction:rtl}.sun-editor.se-rtl .se-btn-select svg{margin:auto 1px}.sun-editor.se-rtl .se-btn-select .txt{direction:rtl;flex:auto;text-align:right}.sun-editor.se-rtl .se-btn-list{text-align:right}.sun-editor.se-rtl .se-btn-list>.se-list-icon{margin:-1px 0 0 10px}.sun-editor.se-rtl .se-menu-list:not(.se-menu-dir-fix),.sun-editor.se-rtl .se-menu-list:not(.se-menu-dir-fix) li{float:right}.sun-editor.se-rtl .se-list-layer *{direction:rtl}.sun-editor.se-rtl .se-list-layer.se-list-format ul blockquote{border-left-width:0;border-right-width:5px;padding:0 7px 0 0}.sun-editor.se-rtl .se-list-layer .se-selector-color .se-color-pallet li{float:right}.sun-editor.se-rtl .se-list-inner .se-list-checked li button>.se-svg{float:right;padding:6px 0 0 6px}.sun-editor.se-rtl .se-tooltip .se-tooltip-inner .se-tooltip-text,.sun-editor.se-rtl .se-wrapper .se-placeholder{direction:rtl}.sun-editor.se-rtl .se-tooltip .se-tooltip-inner .se-tooltip-text .se-shortcut{direction:ltr}.sun-editor.se-rtl .se-dialog *{direction:rtl}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-form .se-video-ratio{margin-left:0;margin-right:4px}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-header .se-dialog-close{float:left}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-header .se-modal-title,.sun-editor.se-rtl .se-dialog-tabs button{float:right}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-size-text{padding-right:34px}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-footer .se-btn-primary{float:left}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-footer>div{float:right}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-footer>div>label{margin:0 0 0 5px}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-dialog-form-footer label:first-child{margin-left:16px;margin-right:0}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-anchor-rel-preview{margin-left:4px;text-align:right}.sun-editor.se-rtl .se-dialog .se-dialog-inner .se-anchor-rel-btn{float:right}.sun-editor.se-rtl .se-file-browser *{direction:rtl}.sun-editor.se-rtl .se-file-browser .se-file-browser-tags{text-align:right}.sun-editor.se-rtl .se-file-browser .se-file-browser-tags a{margin:8px 8px 0}.sun-editor.se-rtl .se-file-browser .se-file-browser-header .se-file-browser-close{float:left}.sun-editor.se-rtl .se-controller .se-btn-group,.sun-editor.se-rtl .se-resizing-container .se-resize-display{direction:rtl}.sun-editor .se-btn-module-border.module-float-left{float:left}.sun-editor .se-btn-module-border.module-float-right{float:right}.sun-editor .se-error{color:#d9534f}.sun-editor input.se-error:focus,select.se-error:focus,textarea.se-error:focus{border:1px solid #f2dede;box-shadow:0 0 0 .2rem #eed3d7;outline:0;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.sun-editor hr.__se__solid{border-style:solid none none}.sun-editor hr.__se__dotted{border-style:dotted none none}.sun-editor hr.__se__dashed{border-style:dashed none none}@keyframes blinker{50%{opacity:0}}@keyframes spinner{to{transform:rotate(361deg)}}.sun-editor-editable{word-wrap:break-word;background-color:#fff;color:#333;font-family:Helvetica Neue;font-size:13px;line-height:1.5;margin:0;padding:16px;word-break:normal}.sun-editor-editable *{box-sizing:border-box;color:inherit;font-family:inherit;font-size:inherit}.sun-editor-editable.se-rtl *{direction:rtl}.sun-editor-editable .se-component>figure{direction:ltr}.sun-editor-editable audio,.sun-editor-editable figcaption,.sun-editor-editable figure,.sun-editor-editable iframe,.sun-editor-editable img,.sun-editor-editable td,.sun-editor-editable th,.sun-editor-editable video{position:relative}.sun-editor-editable span{display:inline;margin:0;padding:0;vertical-align:baseline}.sun-editor-editable span.katex{display:inline-block}.sun-editor-editable span.katex *{direction:ltr}.sun-editor-editable a{color:#004cff;text-decoration:none}.sun-editor-editable span[style~="color:"] a{color:inherit}.sun-editor-editable a:focus,.sun-editor-editable a:hover{color:#0093ff;cursor:pointer;text-decoration:underline}.sun-editor-editable a.on{background-color:#e8f7ff;color:#0093ff}.sun-editor-editable pre{word-wrap:break-word;background-color:#f9f9f9;border:1px solid #e1e1e1;border-radius:2px;color:#666;display:block;font-family:monospace;line-height:1.45;margin:0 0 10px;overflow:visible;padding:8px;white-space:pre-wrap!important}.sun-editor-editable ol{list-style-type:decimal}.sun-editor-editable ol,.sun-editor-editable ul{display:block;list-style-position:outside;margin-block-end:1em;margin-block-start:1em;margin-inline-end:0;margin-inline-start:0;padding-inline-start:40px}.sun-editor-editable ul{list-style-type:disc}.sun-editor-editable li{display:list-item;margin-bottom:5px;text-align:-webkit-match-parent}.sun-editor-editable ol ol,.sun-editor-editable ol ul,.sun-editor-editable ul ol,.sun-editor-editable ul ul{margin:0}.sun-editor-editable ol ol,.sun-editor-editable ul ol{list-style-type:lower-alpha}.sun-editor-editable ol ol ol,.sun-editor-editable ul ol ol,.sun-editor-editable ul ul ol{list-style-type:upper-roman}.sun-editor-editable ol ul,.sun-editor-editable ul ul{list-style-type:circle}.sun-editor-editable ol ol ul,.sun-editor-editable ol ul ul,.sun-editor-editable ul ul ul{list-style-type:square}.sun-editor-editable sub,.sun-editor-editable sup{font-size:75%;line-height:0}.sun-editor-editable sub{vertical-align:sub}.sun-editor-editable sup{vertical-align:super}.sun-editor-editable p{display:block;margin:0 0 10px}.sun-editor-editable div{display:block;margin:0;padding:0}.sun-editor-editable blockquote{border:solid #b1b1b1;border-width:0 0 0 5px;color:#999;display:block;font-family:inherit;font-size:inherit;margin-block-end:1em;margin-block-start:1em;margin-inline-end:0;margin-inline-start:0;padding:0 5px 0 20px}.sun-editor-editable blockquote blockquote{border-color:#c1c1c1}.sun-editor-editable blockquote blockquote blockquote{border-color:#d1d1d1}.sun-editor-editable blockquote blockquote blockquote blockquote{border-color:#e1e1e1}.sun-editor-editable.se-rtl blockquote{border-left-width:0;border-right-width:5px;padding-left:5px;padding-right:20px}.sun-editor-editable h1{font-size:2em;margin-block-end:.67em;margin-block-start:.67em}.sun-editor-editable h1,.sun-editor-editable h2{display:block;font-weight:700;margin-inline-end:0;margin-inline-start:0}.sun-editor-editable h2{font-size:1.5em;margin-block-end:.83em;margin-block-start:.83em}.sun-editor-editable h3{font-size:1.17em;margin-block-end:1em;margin-block-start:1em}.sun-editor-editable h3,.sun-editor-editable h4{display:block;font-weight:700;margin-inline-end:0;margin-inline-start:0}.sun-editor-editable h4{font-size:1em;margin-block-end:1.33em;margin-block-start:1.33em}.sun-editor-editable h5{font-size:.83em;margin-block-end:1.67em;margin-block-start:1.67em}.sun-editor-editable h5,.sun-editor-editable h6{display:block;font-weight:700;margin-inline-end:0;margin-inline-start:0}.sun-editor-editable h6{font-size:.67em;margin-block-end:2.33em;margin-block-start:2.33em}.sun-editor-editable hr{border-color:#000;-o-border-image:initial;border-image:initial;border-width:1px 0 0;display:flex;height:1px}.sun-editor-editable hr.__se__solid{border-style:solid none none}.sun-editor-editable hr.__se__dotted{border-style:dotted none none}.sun-editor-editable hr.__se__dashed{border-style:dashed none none}.sun-editor-editable hr.on{border-color:#4592ff;box-shadow:0 0 0 .1rem #c7deff}.sun-editor-editable table{background-color:transparent;border:1px solid #ccc;border-collapse:collapse;border-spacing:0;display:table;margin:0 0 10px;max-width:100%;table-layout:auto!important;width:100%}.sun-editor-editable.se-rtl table{margin:0 0 10px auto}.sun-editor-editable table thead{border-bottom:2px solid #333}.sun-editor-editable table tr{border:1px solid #efefef}.sun-editor-editable table th{background-color:#f3f3f3}.sun-editor-editable table td,.sun-editor-editable table th{background-clip:padding-box;border:1px solid #e1e1e1;padding:.4em}.sun-editor-editable table.se-table-size-auto{width:auto!important}.sun-editor-editable table.se-table-size-100{width:100%!important}.sun-editor-editable table.se-table-layout-auto{table-layout:auto!important}.sun-editor-editable table.se-table-layout-fixed{table-layout:fixed!important}.sun-editor-editable table td.se-table-selected-cell,.sun-editor-editable table th.se-table-selected-cell{outline:1px double #4592ff}.sun-editor-editable.se-disabled *{user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none}.sun-editor-editable .se-component{display:flex;margin:0 0 10px;padding:1px}.sun-editor-editable[contenteditable=true] .se-component{outline:1px dashed #e1e1e1}.sun-editor-editable[contenteditable=true] .se-component.se-component-copy{box-shadow:0 0 0 .2rem #3f9dff;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.sun-editor-editable .__se__float-left{float:left;margin-right:4px}.sun-editor-editable .__se__float-right{float:right;margin-left:4px}.sun-editor-editable .__se__float-center{float:center}.sun-editor-editable .__se__float-none{float:none}.sun-editor-editable audio,.sun-editor-editable iframe,.sun-editor-editable img,.sun-editor-editable video{display:block;height:auto;margin:0;max-width:100%;padding:0;width:auto}.sun-editor-editable[contenteditable=true]:not(.se-read-only) figure:after{background:transparent;bottom:0;content:"";cursor:default;display:block;left:0;position:absolute;right:0;top:0;z-index:1}.sun-editor-editable[contenteditable=true] figure a,.sun-editor-editable[contenteditable=true] figure iframe,.sun-editor-editable[contenteditable=true] figure img,.sun-editor-editable[contenteditable=true] figure video{z-index:0}.sun-editor-editable[contenteditable=true] figure figcaption{display:block;z-index:2}.sun-editor-editable[contenteditable=true] figure figcaption:focus{border-color:#80bdff;box-shadow:0 0 0 .2rem #c7deff;outline:0}.sun-editor-editable .se-image-container,.sun-editor-editable .se-video-container{height:auto;max-width:100%;width:auto}.sun-editor-editable figure{display:block;margin:0;outline:none;padding:0}.sun-editor-editable .__se__float-center figure,.sun-editor-editable .__se__float-left figure,.sun-editor-editable .__se__float-right figure{margin:auto!important}.sun-editor-editable figure figcaption{background-color:#f9f9f9;margin:0;outline:none;padding:1em .5em}.sun-editor-editable figure figcaption p{line-height:2;margin:0}.sun-editor-editable .se-image-container a img{margin:1px;outline:1px solid #4592ff;padding:1px}.sun-editor-editable .se-video-container iframe,.sun-editor-editable .se-video-container video{border:0;height:100%;left:0;outline:1px solid #9e9e9e;position:absolute;top:0;width:100%}.sun-editor-editable .se-video-container figure{left:0;max-width:100%;width:100%}.sun-editor-editable audio{height:54px;width:300px}.sun-editor-editable audio.active{outline:2px solid #80bdff}.sun-editor-editable.se-show-block div,.sun-editor-editable.se-show-block h1,.sun-editor-editable.se-show-block h2,.sun-editor-editable.se-show-block h3,.sun-editor-editable.se-show-block h4,.sun-editor-editable.se-show-block h5,.sun-editor-editable.se-show-block h6,.sun-editor-editable.se-show-block li,.sun-editor-editable.se-show-block ol,.sun-editor-editable.se-show-block p,.sun-editor-editable.se-show-block pre,.sun-editor-editable.se-show-block ul{border:1px dashed #3f9dff!important;padding:14px 8px 8px!important}.sun-editor-editable.se-show-block ol,.sun-editor-editable.se-show-block ul{border:1px dashed #d539ff!important}.sun-editor-editable.se-show-block pre{border:1px dashed #27c022!important}.se-show-block p{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPAQMAAAAF7dc0AAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAaSURBVAjXY/j/gwGCPvxg+F4BQiAGDP1HQQByxxw0gqOzIwAAAABJRU5ErkJggg==") no-repeat}.se-show-block div{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAPAQMAAAAxlBYoAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAmSURBVAjXY/j//wcDDH+8XsHwDYi/hwNx1A8w/nYLKH4XoQYJAwCXnSgcl2MOPgAAAABJRU5ErkJggg==") no-repeat}.se-show-block h1{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAPAQMAAAA4f7ZSAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAfSURBVAjXY/j/v4EBhr+9B+LzEPrDeygfhI8j1CBhAEhmJGY4Rf6uAAAAAElFTkSuQmCC") no-repeat}.se-show-block h2{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAPAQMAAAA4f7ZSAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAmSURBVAjXY/j/v4EBhr+dB+LtQPy9geEDEH97D8T3gbgdoQYJAwA51iPuD2haEAAAAABJRU5ErkJggg==") no-repeat}.se-show-block h3{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAPAQMAAAA4f7ZSAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAiSURBVAjXY/j/v4EBhr+dB+LtQPy9geHDeQgN5p9HqEHCADeWI+69VG2MAAAAAElFTkSuQmCC") no-repeat}.se-show-block h4{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAPAQMAAADTSA1RAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAiSURBVAjXY/j//wADDH97DsTXIfjDdiDdDMTfIRhZHRQDAKJOJ6L+K3y7AAAAAElFTkSuQmCC") no-repeat}.se-show-block h5{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAPAQMAAAA4f7ZSAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAlSURBVAjXY/j/v4EBhr+1A/F+IO5vYPiwHUh/B2IQfR6hBgkDABlWIy5uM+9GAAAAAElFTkSuQmCC") no-repeat}.se-show-block h6{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAPAQMAAAA4f7ZSAAAABlBMVEWAgID////n1o2sAAAAAnRSTlP/AOW3MEoAAAAiSURBVAjXY/j/v4EBhr+dB+LtQLy/geFDP5S9HSKOrA6KAR9GIza1ptJnAAAAAElFTkSuQmCC") no-repeat}.se-show-block li{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA7SURBVDhPYxgFcNDQ0PAfykQBIHEYhgoRB/BpwCfHBKWpBkaggYxQGgOgBzyQD1aLLA4TGwWDGjAwAACR3RcEU9Ui+wAAAABJRU5ErkJggg==") no-repeat}.se-show-block ol{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABHSURBVDhPYxgFcNDQ0PAfhKFcFIBLHCdA1oBNM0kGEmMAPgOZoDTVANUNxAqQvURMECADRiiNAWCagDSGGhyW4DRrMAEGBgAu0SX6WpGgjAAAAABJRU5ErkJggg==") no-repeat}.se-show-block ul{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA1SURBVDhPYxgFDA0NDf+hTBSALI5LDQgwQWmqgVEDKQcsUBoF4ItFGEBXA+QzQpmDGjAwAAA8DQ4Lni6gdAAAAABJRU5ErkJggg==") no-repeat}.sun-editor .__se__p-bordered,.sun-editor-editable .__se__p-bordered{border-bottom:1px solid #b1b1b1;border-top:1px solid #b1b1b1;padding:4px 0}.sun-editor .__se__p-spaced,.sun-editor-editable .__se__p-spaced{letter-spacing:1px}.sun-editor .__se__p-neon,.sun-editor-editable .__se__p-neon{animation:neonFlicker 1.5s infinite alternate;background:#000;border:2px solid #fff;border-radius:6px;color:#fff;font-style:italic;font-weight:200;padding:6px 4px;text-transform:uppercase}@keyframes neonFlicker{0%,19%,21%,23%,25%,54%,56%,to{box-shadow:0 0 .5px #fff,inset 0 0 .5px #fff,0 0 2px #08f,inset 0 0 2px #08f,0 0 4px #08f,inset 0 0 4px #08f;text-shadow:-.2rem -.2rem 1rem #fff,.2rem .2rem 1rem #fff,0 0 2px #f40,0 0 4px #f40,0 0 6px #f40,0 0 8px #f40,0 0 10px #f40}20%,24%,55%{box-shadow:none;text-shadow:none}}.sun-editor .__se__t-shadow,.sun-editor-editable .__se__t-shadow{text-shadow:-.2rem -.2rem 1rem #fff,.2rem .2rem 1rem #fff,0 0 .2rem #999,0 0 .4rem #888,0 0 .6rem #777,0 0 .8rem #666,0 0 1rem #555}.sun-editor .__se__t-code,.sun-editor-editable .__se__t-code{background-color:rgba(27,31,35,.05);border-radius:6px;color:#666;font-family:monospace;padding:.2em .4em} .picmo__emojiButton{font-size:24px!important} diff --git a/dist/js/field.js b/dist/js/field.js index 1cbf7a3..24a6fa6 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -1,2 +1,2 @@ /*! For license information please see field.js.LICENSE.txt */ -(()=>{var e,t={2313:(e,t,n)=>{"use strict";var i={};n.r(i),n.d(i,{hasBrowserEnv:()=>ht,hasStandardBrowserEnv:()=>pt,hasStandardBrowserWebWorkerEnv:()=>gt});const o=Vue;const r={props:["index","resource","resourceName","resourceId","field"]};var s=n(6262);const l=(0,s.A)(r,[["render",function(e,t,n,i,r,s){var l=(0,o.resolveComponent)("Excerpt"),a=(0,o.resolveComponent)("PanelItem");return(0,o.openBlock)(),(0,o.createBlock)(a,{index:n.index,field:n.field},{value:(0,o.withCtx)((function(){return[(0,o.createVNode)(l,{content:n.field.value,"should-show":n.field.shouldShow},null,8,["content","should-show"])]})),_:1},8,["index","field"])}]]);var a={ref:"emojianchor"},c=["id","value"];var u=n(3787),d=n.n(u),h={nested:{type:Boolean,default:!1},preventInitialLoading:{type:Boolean,default:!1},showHelpText:{type:Boolean,default:!1},shownViaNewRelationModal:{type:Boolean,default:!1},resourceId:{type:[Number,String]},resourceName:{type:String},relatedResourceId:{type:[Number,String]},relatedResourceName:{type:String},field:{type:Object,required:!0},viaResource:{type:String,required:!1},viaResourceId:{type:[String,Number],required:!1},viaRelationship:{type:String,required:!1},relationshipType:{type:String,default:""},shouldOverrideMeta:{type:Boolean,default:!1},disablePagination:{type:Boolean,default:!1},clickAction:{type:String,default:"view",validator:function(e){return["edit","select","ignore","detail"].includes(e)}},mode:{type:String,default:"form",validator:function(e){return["form","modal","action-modal","action-fullscreen"].includes(e)}}};function p(e){return d()(h,e)}function f(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:void 0!==n.g?n.g:{}}const g="function"==typeof Proxy,m="devtools-plugin:setup";let y,v;function b(){return void 0!==y||("undefined"!=typeof window&&window.performance?(y=!0,v=window.performance):void 0!==n.g&&(null===(e=n.g.perf_hooks)||void 0===e?void 0:e.performance)?(y=!0,v=n.g.perf_hooks.performance):y=!1),y?v.now():Date.now();var e}class _{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const t in e.settings){const i=e.settings[t];n[t]=i.defaultValue}const i=`__vue-devtools-plugin-settings__${e.id}`;let o=Object.assign({},n);try{const e=localStorage.getItem(i),t=JSON.parse(e);Object.assign(o,t)}catch(e){}this.fallbacks={getSettings:()=>o,setSettings(e){try{localStorage.setItem(i,JSON.stringify(e))}catch(e){}o=e},now:()=>b()},t&&t.on("plugin:settings:set",((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise((n=>{this.targetQueue.push({method:t,args:e,resolve:n})}))})}async setRealTarget(e){this.target=e;for(const e of this.onQueue)this.target.on[e.method](...e.args);for(const e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}}function w(e,t){const n=e,i=f(),o=f().__VUE_DEVTOOLS_GLOBAL_HOOK__,r=g&&n.enableEarlyProxy;if(!o||!i.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&r){const e=r?new _(n,o):null;(i.__VUE_DEVTOOLS_PLUGINS__=i.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}else o.emit(m,e,t)}var C="store";function x(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function E(e){return null!==e&&"object"==typeof e}function S(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function k(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;N(e,n,[],e._modules.root,!0),T(e,n,t)}function T(e,t,n){var i=e._state,r=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,l={},a={},c=(0,o.effectScope)(!0);c.run((function(){x(s,(function(t,n){l[n]=function(e,t){return function(){return e(t)}}(t,e),a[n]=(0,o.computed)((function(){return l[n]()})),Object.defineProperty(e.getters,n,{get:function(){return a[n].value},enumerable:!0})}))})),e._state=(0,o.reactive)({data:t}),e._scope=c,e.strict&&function(e){(0,o.watch)((function(){return e._state.data}),(function(){0}),{deep:!0,flush:"sync"})}(e),i&&n&&e._withCommit((function(){i.data=null})),r&&r.stop()}function N(e,t,n,i,o){var r=!n.length,s=e._modules.getNamespace(n);if(i.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=i),!r&&!o){var l=L(t,n.slice(0,-1)),a=n[n.length-1];e._withCommit((function(){l[a]=i.state}))}var c=i.context=function(e,t,n){var i=""===t,o={dispatch:i?e.dispatch:function(n,i,o){var r=O(n,i,o),s=r.payload,l=r.options,a=r.type;return l&&l.root||(a=t+a),e.dispatch(a,s)},commit:i?e.commit:function(n,i,o){var r=O(n,i,o),s=r.payload,l=r.options,a=r.type;l&&l.root||(a=t+a),e.commit(a,s,l)}};return Object.defineProperties(o,{getters:{get:i?function(){return e.getters}:function(){return A(e,t)}},state:{get:function(){return L(e.state,n)}}}),o}(e,s,n);i.forEachMutation((function(t,n){!function(e,t,n,i){var o=e._mutations[t]||(e._mutations[t]=[]);o.push((function(t){n.call(e,i.state,t)}))}(e,s+n,t,c)})),i.forEachAction((function(t,n){var i=t.root?n:s+n,o=t.handler||t;!function(e,t,n,i){var o=e._actions[t]||(e._actions[t]=[]);o.push((function(t){var o,r=n.call(e,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:e.getters,rootState:e.state},t);return(o=r)&&"function"==typeof o.then||(r=Promise.resolve(r)),e._devtoolHook?r.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):r}))}(e,i,o,c)})),i.forEachGetter((function(t,n){!function(e,t,n,i){if(e._wrappedGetters[t])return void 0;e._wrappedGetters[t]=function(e){return n(i.state,i.getters,e.state,e.getters)}}(e,s+n,t,c)})),i.forEachChild((function(i,r){N(e,t,n.concat(r),i,o)}))}function A(e,t){if(!e._makeLocalGettersCache[t]){var n={},i=t.length;Object.keys(e.getters).forEach((function(o){if(o.slice(0,i)===t){var r=o.slice(i);Object.defineProperty(n,r,{get:function(){return e.getters[o]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function L(e,t){return t.reduce((function(e,t){return e[t]}),e)}function O(e,t,n){return E(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var B="vuex:mutations",R="vuex:actions",P="vuex",I=0;function M(e,t){w({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(n){n.addTimelineLayer({id:B,label:"Vuex Mutations",color:z}),n.addTimelineLayer({id:R,label:"Vuex Actions",color:z}),n.addInspector({id:P,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===P)if(n.filter){var i=[];H(i,t._modules.root,n.filter,""),n.rootNodes=i}else n.rootNodes=[D(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===P){var i=n.nodeId;A(t,i),n.state=function(e,t,n){t="root"===n?t:t[n];var i=Object.keys(t),o={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(i.length){var r=function(e){var t={};return Object.keys(e).forEach((function(n){var i=n.split("/");if(i.length>1){var o=t,r=i.pop();i.forEach((function(e){o[e]||(o[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),o=o[e]._custom.value})),o[r]=V((function(){return e[n]}))}else t[n]=V((function(){return e[n]}))})),t}(t);o.getters=Object.keys(r).map((function(e){return{key:e.endsWith("/")?j(e):e,editable:!1,value:V((function(){return r[e]}))}}))}return o}((o=t._modules,(s=(r=i).split("/").filter((function(e){return e}))).reduce((function(e,t,n){var i=e[t];if(!i)throw new Error('Missing module "'+t+'" for path "'+r+'".');return n===s.length-1?i:i._children}),"root"===r?o:o.root._children)),"root"===i?t.getters:t._makeLocalGettersCache,i)}var o,r,s})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===P){var i=n.nodeId,o=n.path;"root"!==i&&(o=i.split("/").filter(Boolean).concat(o)),t._withCommit((function(){n.set(t._state.data,o,n.state.value)}))}})),t.subscribe((function(e,t){var i={};e.payload&&(i.payload=e.payload),i.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(P),n.sendInspectorState(P),n.addTimelineEvent({layerId:B,event:{time:Date.now(),title:e.type,data:i}})})),t.subscribeAction({before:function(e,t){var i={};e.payload&&(i.payload=e.payload),e._id=I++,e._time=Date.now(),i.state=t,n.addTimelineEvent({layerId:R,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:i}})},after:function(e,t){var i={},o=Date.now()-e._time;i.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},e.payload&&(i.payload=e.payload),i.state=t,n.addTimelineEvent({layerId:R,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:i}})}})}))}var z=8702998,F={label:"namespaced",textColor:16777215,backgroundColor:6710886};function j(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function D(e,t){return{id:t||"root",label:j(t),tags:e.namespaced?[F]:[],children:Object.keys(e._children).map((function(n){return D(e._children[n],t+n+"/")}))}}function H(e,t,n,i){i.includes(n)&&e.push({id:i||"root",label:i.endsWith("/")?i.slice(0,i.length-1):i||"Root",tags:t.namespaced?[F]:[]}),Object.keys(t._children).forEach((function(o){H(e,t._children[o],n,i+o+"/")}))}function V(e){try{return e()}catch(e){return e}}var U=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},W={namespaced:{configurable:!0}};W.namespaced.get=function(){return!!this._rawModule.namespaced},U.prototype.addChild=function(e,t){this._children[e]=t},U.prototype.removeChild=function(e){delete this._children[e]},U.prototype.getChild=function(e){return this._children[e]},U.prototype.hasChild=function(e){return e in this._children},U.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},U.prototype.forEachChild=function(e){x(this._children,e)},U.prototype.forEachGetter=function(e){this._rawModule.getters&&x(this._rawModule.getters,e)},U.prototype.forEachAction=function(e){this._rawModule.actions&&x(this._rawModule.actions,e)},U.prototype.forEachMutation=function(e){this._rawModule.mutations&&x(this._rawModule.mutations,e)},Object.defineProperties(U.prototype,W);var $=function(e){this.register([],e,!1)};function q(e,t,n){if(t.update(n),n.modules)for(var i in n.modules){if(!t.getChild(i))return void 0;q(e.concat(i),t.getChild(i),n.modules[i])}}$.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},$.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")}),"")},$.prototype.update=function(e){q([],this.root,e)},$.prototype.register=function(e,t,n){var i=this;void 0===n&&(n=!0);var o=new U(t,n);0===e.length?this.root=o:this.get(e.slice(0,-1)).addChild(e[e.length-1],o);t.modules&&x(t.modules,(function(t,o){i.register(e.concat(o),t,n)}))},$.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],i=t.getChild(n);i&&i.runtime&&t.removeChild(n)},$.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Z=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var i=e.strict;void 0===i&&(i=!1);var o=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new $(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var r=this,s=this.dispatch,l=this.commit;this.dispatch=function(e,t){return s.call(r,e,t)},this.commit=function(e,t,n){return l.call(r,e,t,n)},this.strict=i;var a=this._modules.root.state;N(this,a,[],this._modules.root),T(this,a),n.forEach((function(e){return e(t)}))},Y={state:{configurable:!0}};Z.prototype.install=function(e,t){e.provide(t||C,this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&M(e,this)},Y.state.get=function(){return this._state.data},Y.state.set=function(e){0},Z.prototype.commit=function(e,t,n){var i=this,o=O(e,t,n),r=o.type,s=o.payload,l=(o.options,{type:r,payload:s}),a=this._mutations[r];a&&(this._withCommit((function(){a.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(l,i.state)})))},Z.prototype.dispatch=function(e,t){var n=this,i=O(e,t),o=i.type,r=i.payload,s={type:o,payload:r},l=this._actions[o];if(l){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(e){0}var a=l.length>1?Promise.all(l.map((function(e){return e(r)}))):l[0](r);return new Promise((function(e,t){a.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,n.state)}))}catch(e){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(e){0}t(e)}))}))}},Z.prototype.subscribe=function(e,t){return S(e,this._subscribers,t)},Z.prototype.subscribeAction=function(e,t){return S("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},Z.prototype.watch=function(e,t,n){var i=this;return(0,o.watch)((function(){return e(i.state,i.getters)}),t,Object.assign({},n))},Z.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Z.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),N(this,this.state,e,this._modules.get(e),n.preserveState),T(this,this.state)},Z.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete L(t.state,e.slice(0,-1))[e[e.length-1]]})),k(this)},Z.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},Z.prototype.hotUpdate=function(e){this._modules.update(e),k(this,!0)},Z.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Z.prototype,Y);J((function(e,t){var n={};return X(t).forEach((function(t){var i=t.key,o=t.val;n[i]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var i=Q(this.$store,"mapState",e);if(!i)return;t=i.context.state,n=i.context.getters}return"function"==typeof o?o.call(this,t,n):t[o]},n[i].vuex=!0})),n}));var G=J((function(e,t){var n={};return X(t).forEach((function(t){var i=t.key,o=t.val;n[i]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var i=this.$store.commit;if(e){var r=Q(this.$store,"mapMutations",e);if(!r)return;i=r.context.commit}return"function"==typeof o?o.apply(this,[i].concat(t)):i.apply(this.$store,[o].concat(t))}})),n})),K=J((function(e,t){var n={};return X(t).forEach((function(t){var i=t.key,o=t.val;o=e+o,n[i]=function(){if(!e||Q(this.$store,"mapGetters",e))return this.$store.getters[o]},n[i].vuex=!0})),n}));J((function(e,t){var n={};return X(t).forEach((function(t){var i=t.key,o=t.val;n[i]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var i=this.$store.dispatch;if(e){var r=Q(this.$store,"mapActions",e);if(!r)return;i=r.context.dispatch}return"function"==typeof o?o.apply(this,[i].concat(t)):i.apply(this.$store,[o].concat(t))}})),n}));function X(e){return function(e){return Array.isArray(e)||E(e)}(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function J(e){return function(t,n){return"string"!=typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function Q(e,t,n){return e._modulesNamespaceMap[n]}var ee=n(1842),te=n(7031),ne=n.n(te);function ie(e){return Boolean(!ne()(e)&&""!==e)}function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function se(e){for(var t=1;t1?window.history.back():!this.navigateBackUsingHistory&&ie(e)?Nova.visit(e,{replace:!0}):Nova.visit("/")}}),se({},K(["canLeaveForm","canLeaveFormToPreviousPage"]));function ae(e){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ae(e)}function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ue(e){for(var t=1;t{const t=pe.call(e);return me[t]||(me[t]=t.slice(8,-1).toLowerCase())});var me;const ye=e=>(e=e.toLowerCase(),t=>ge(t)===e),ve=e=>t=>typeof t===e,{isArray:be}=Array,_e=ve("undefined");const we=ye("ArrayBuffer");const Ce=ve("string"),xe=ve("function"),Ee=ve("number"),Se=e=>null!==e&&"object"==typeof e,ke=e=>{if("object"!==ge(e))return!1;const t=fe(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Te=ye("Date"),Ne=ye("File"),Ae=ye("Blob"),Le=ye("FileList"),Oe=ye("URLSearchParams");function Be(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let i,o;if("object"!=typeof e&&(e=[e]),be(e))for(i=0,o=e.length;i0;)if(i=n[o],t===i.toLowerCase())return i;return null}const Pe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Ie=e=>!_e(e)&&e!==Pe;const Me=(ze="undefined"!=typeof Uint8Array&&fe(Uint8Array),e=>ze&&e instanceof ze);var ze;const Fe=ye("HTMLFormElement"),je=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),De=ye("RegExp"),He=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Be(n,((n,o)=>{let r;!1!==(r=t(n,o,e))&&(i[o]=r||n)})),Object.defineProperties(e,i)},Ve="abcdefghijklmnopqrstuvwxyz",Ue="0123456789",We={DIGIT:Ue,ALPHA:Ve,ALPHA_DIGIT:Ve+Ve.toUpperCase()+Ue};const $e=ye("AsyncFunction"),qe={isArray:be,isArrayBuffer:we,isBuffer:function(e){return null!==e&&!_e(e)&&null!==e.constructor&&!_e(e.constructor)&&xe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||xe(e.append)&&("formdata"===(t=ge(e))||"object"===t&&xe(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&we(e.buffer),t},isString:Ce,isNumber:Ee,isBoolean:e=>!0===e||!1===e,isObject:Se,isPlainObject:ke,isUndefined:_e,isDate:Te,isFile:Ne,isBlob:Ae,isRegExp:De,isFunction:xe,isStream:e=>Se(e)&&xe(e.pipe),isURLSearchParams:Oe,isTypedArray:Me,isFileList:Le,forEach:Be,merge:function e(){const{caseless:t}=Ie(this)&&this||{},n={},i=(i,o)=>{const r=t&&Re(n,o)||o;ke(n[r])&&ke(i)?n[r]=e(n[r],i):ke(i)?n[r]=e({},i):be(i)?n[r]=i.slice():n[r]=i};for(let e=0,t=arguments.length;e(Be(t,((t,i)=>{n&&xe(t)?e[i]=he(t,n):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,i)=>{let o,r,s;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),r=o.length;r-- >0;)s=o[r],i&&!i(s,e,t)||l[s]||(t[s]=e[s],l[s]=!0);e=!1!==n&&fe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:ge,kindOfTest:ye,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},toArray:e=>{if(!e)return null;if(be(e))return e;let t=e.length;if(!Ee(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=n.next())&&!i.done;){const n=i.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:Fe,hasOwnProperty:je,hasOwnProp:je,reduceDescriptors:He,freezeMethods:e=>{He(e,((t,n)=>{if(xe(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];xe(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},i=e=>{e.forEach((e=>{n[e]=!0}))};return be(e)?i(e):i(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Re,global:Pe,isContextDefined:Ie,ALPHABET:We,generateString:(e=16,t=We.ALPHA_DIGIT)=>{let n="";const{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n},isSpecCompliantForm:function(e){return!!(e&&xe(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,i)=>{if(Se(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[i]=e;const o=be(e)?[]:{};return Be(e,((e,t)=>{const r=n(e,i+1);!_e(r)&&(o[t]=r)})),t[i]=void 0,o}}return e};return n(e,0)},isAsyncFn:$e,isThenable:e=>e&&(Se(e)||xe(e))&&xe(e.then)&&xe(e.catch)};function Ze(e,t,n,i,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o)}qe.inherits(Ze,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:qe.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ye=Ze.prototype,Ge={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Ge[e]={value:e}})),Object.defineProperties(Ze,Ge),Object.defineProperty(Ye,"isAxiosError",{value:!0}),Ze.from=(e,t,n,i,o,r)=>{const s=Object.create(Ye);return qe.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Ze.call(s,e.message,t,n,i,o),s.cause=e,s.name=e.name,r&&Object.assign(s,r),s};const Ke=Ze;var Xe=n(6355).hp;function Je(e){return qe.isPlainObject(e)||qe.isArray(e)}function Qe(e){return qe.endsWith(e,"[]")?e.slice(0,-2):e}function et(e,t,n){return e?e.concat(t).map((function(e,t){return e=Qe(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const tt=qe.toFlatObject(qe,{},null,(function(e){return/^is[A-Z]/.test(e)}));const nt=function(e,t,n){if(!qe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const i=(n=qe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!qe.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,r=n.dots,s=n.indexes,l=(n.Blob||"undefined"!=typeof Blob&&Blob)&&qe.isSpecCompliantForm(t);if(!qe.isFunction(o))throw new TypeError("visitor must be a function");function a(e){if(null===e)return"";if(qe.isDate(e))return e.toISOString();if(!l&&qe.isBlob(e))throw new Ke("Blob is not supported. Use a Buffer instead.");return qe.isArrayBuffer(e)||qe.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):Xe.from(e):e}function c(e,n,o){let l=e;if(e&&!o&&"object"==typeof e)if(qe.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(qe.isArray(e)&&function(e){return qe.isArray(e)&&!e.some(Je)}(e)||(qe.isFileList(e)||qe.endsWith(n,"[]"))&&(l=qe.toArray(e)))return n=Qe(n),l.forEach((function(e,i){!qe.isUndefined(e)&&null!==e&&t.append(!0===s?et([n],i,r):null===s?n:n+"[]",a(e))})),!1;return!!Je(e)||(t.append(et(o,n,r),a(e)),!1)}const u=[],d=Object.assign(tt,{defaultVisitor:c,convertValue:a,isVisitable:Je});if(!qe.isObject(e))throw new TypeError("data must be an object");return function e(n,i){if(!qe.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+i.join("."));u.push(n),qe.forEach(n,(function(n,r){!0===(!(qe.isUndefined(n)||null===n)&&o.call(t,n,qe.isString(r)?r.trim():r,i,d))&&e(n,i?i.concat(r):[r])})),u.pop()}}(e),t};function it(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ot(e,t){this._pairs=[],e&&nt(e,this,t)}const rt=ot.prototype;rt.append=function(e,t){this._pairs.push([e,t])},rt.toString=function(e){const t=e?function(t){return e.call(this,t,it)}:it;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const st=ot;function lt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function at(e,t,n){if(!t)return e;const i=n&&n.encode||lt,o=n&&n.serialize;let r;if(r=o?o(t,n):qe.isURLSearchParams(t)?t.toString():new st(t,n).toString(i),r){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}const ct=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){qe.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ut={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:st,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ht="undefined"!=typeof window&&"undefined"!=typeof document,pt=(ft="undefined"!=typeof navigator&&navigator.product,ht&&["ReactNative","NativeScript","NS"].indexOf(ft)<0);var ft;const gt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,mt={...i,...dt};const yt=function(e){function t(e,n,i,o){let r=e[o++];if("__proto__"===r)return!0;const s=Number.isFinite(+r),l=o>=e.length;if(r=!r&&qe.isArray(i)?i.length:r,l)return qe.hasOwnProp(i,r)?i[r]=[i[r],n]:i[r]=n,!s;i[r]&&qe.isObject(i[r])||(i[r]=[]);return t(e,n,i[r],o)&&qe.isArray(i[r])&&(i[r]=function(e){const t={},n=Object.keys(e);let i;const o=n.length;let r;for(i=0;i{t(function(e){return qe.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),i,n,0)})),n}return null};const vt={transitional:ut,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=qe.isObject(e);o&&qe.isHTMLForm(e)&&(e=new FormData(e));if(qe.isFormData(e))return i?JSON.stringify(yt(e)):e;if(qe.isArrayBuffer(e)||qe.isBuffer(e)||qe.isStream(e)||qe.isFile(e)||qe.isBlob(e))return e;if(qe.isArrayBufferView(e))return e.buffer;if(qe.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return nt(e,new mt.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,i){return mt.isNode&&qe.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((r=qe.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return nt(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,n){if(qe.isString(e))try{return(t||JSON.parse)(e),qe.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||vt.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(e&&qe.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Ke.from(e,Ke.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mt.classes.FormData,Blob:mt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};qe.forEach(["delete","get","head","post","put","patch"],(e=>{vt.headers[e]={}}));const bt=vt,_t=qe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),wt=Symbol("internals");function Ct(e){return e&&String(e).trim().toLowerCase()}function xt(e){return!1===e||null==e?e:qe.isArray(e)?e.map(xt):String(e)}function Et(e,t,n,i,o){return qe.isFunction(i)?i.call(this,t,n):(o&&(t=n),qe.isString(t)?qe.isString(i)?-1!==t.indexOf(i):qe.isRegExp(i)?i.test(t):void 0:void 0)}class St{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function o(e,t,n){const o=Ct(t);if(!o)throw new Error("header name must be a non-empty string");const r=qe.findKey(i,o);(!r||void 0===i[r]||!0===n||void 0===n&&!1!==i[r])&&(i[r||t]=xt(e))}const r=(e,t)=>qe.forEach(e,((e,n)=>o(e,n,t)));return qe.isPlainObject(e)||e instanceof this.constructor?r(e,t):qe.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?r((e=>{const t={};let n,i,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),i=e.substring(o+1).trim(),!n||t[n]&&_t[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=Ct(e)){const n=qe.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}(e);if(qe.isFunction(t))return t.call(this,e,n);if(qe.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ct(e)){const n=qe.findKey(this,e);return!(!n||void 0===this[n]||t&&!Et(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function o(e){if(e=Ct(e)){const o=qe.findKey(n,e);!o||t&&!Et(0,n[o],o,t)||(delete n[o],i=!0)}}return qe.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const o=t[n];e&&!Et(0,this[o],o,e,!0)||(delete this[o],i=!0)}return i}normalize(e){const t=this,n={};return qe.forEach(this,((i,o)=>{const r=qe.findKey(n,o);if(r)return t[r]=xt(i),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=xt(i),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return qe.forEach(this,((n,i)=>{null!=n&&!1!==n&&(t[i]=e&&qe.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[wt]=this[wt]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=Ct(e);t[i]||(!function(e,t){const n=qe.toCamelCase(" "+t);["get","set","has"].forEach((i=>{Object.defineProperty(e,i+n,{value:function(e,n,o){return this[i].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[i]=!0)}return qe.isArray(e)?e.forEach(i):i(e),this}}St.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),qe.reduceDescriptors(St.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),qe.freezeMethods(St);const kt=St;function Tt(e,t){const n=this||bt,i=t||n,o=kt.from(i.headers);let r=i.data;return qe.forEach(e,(function(e){r=e.call(n,r,o.normalize(),t?t.status:void 0)})),o.normalize(),r}function Nt(e){return!(!e||!e.__CANCEL__)}function At(e,t,n){Ke.call(this,null==e?"canceled":e,Ke.ERR_CANCELED,t,n),this.name="CanceledError"}qe.inherits(At,Ke,{__CANCEL__:!0});const Lt=At;const Ot=mt.hasStandardBrowserEnv?{write(e,t,n,i,o,r){const s=[e+"="+encodeURIComponent(t)];qe.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),qe.isString(i)&&s.push("path="+i),qe.isString(o)&&s.push("domain="+o),!0===r&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Bt(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Rt=mt.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function i(n){let i=n;return e&&(t.setAttribute("href",i),i=t.href),t.setAttribute("href",i),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=i(window.location.href),function(e){const t=qe.isString(e)?i(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};const Pt=function(e,t){e=e||10;const n=new Array(e),i=new Array(e);let o,r=0,s=0;return t=void 0!==t?t:1e3,function(l){const a=Date.now(),c=i[s];o||(o=a),n[r]=l,i[r]=a;let u=s,d=0;for(;u!==r;)d+=n[u++],u%=e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),a-o{const r=o.loaded,s=o.lengthComputable?o.total:void 0,l=r-n,a=i(l);n=r;const c={loaded:r,total:s,progress:s?r/s:void 0,bytes:l,rate:a||void 0,estimated:a&&s&&r<=s?(s-r)/a:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const Mt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let i=e.data;const o=kt.from(e.headers).normalize();let r,s,{responseType:l,withXSRFToken:a}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}if(qe.isFormData(i))if(mt.hasStandardBrowserEnv||mt.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let u=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const d=Bt(e.baseURL,e.url);function h(){if(!u)return;const i=kt.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new Ke("Request failed with status code "+n.status,[Ke.ERR_BAD_REQUEST,Ke.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:l&&"text"!==l&&"json"!==l?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:i,config:e,request:u}),u=null}if(u.open(e.method.toUpperCase(),at(d,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=h:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(h)},u.onabort=function(){u&&(n(new Ke("Request aborted",Ke.ECONNABORTED,e,u)),u=null)},u.onerror=function(){n(new Ke("Network Error",Ke.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const i=e.transitional||ut;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Ke(t,i.clarifyTimeoutError?Ke.ETIMEDOUT:Ke.ECONNABORTED,e,u)),u=null},mt.hasStandardBrowserEnv&&(a&&qe.isFunction(a)&&(a=a(e)),a||!1!==a&&Rt(d))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&Ot.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===i&&o.setContentType(null),"setRequestHeader"in u&&qe.forEach(o.toJSON(),(function(e,t){u.setRequestHeader(t,e)})),qe.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),l&&"json"!==l&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",It(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",It(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=t=>{u&&(n(!t||t.type?new Lt(null,e,u):t),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(d);p&&-1===mt.protocols.indexOf(p)?n(new Ke("Unsupported protocol "+p+":",Ke.ERR_BAD_REQUEST,e)):u.send(i||null)}))}};qe.forEach(Mt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const zt=e=>`- ${e}`,Ft=e=>qe.isFunction(e)||null===e||!1===e,jt=e=>{e=qe.isArray(e)?e:[e];const{length:t}=e;let n,i;const o={};for(let r=0;r`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(zt).join("\n"):" "+zt(e[0]):"as no adapter specified";throw new Ke("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i};function Dt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Lt(null,e)}function Ht(e){Dt(e),e.headers=kt.from(e.headers),e.data=Tt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return jt(e.adapter||bt.adapter)(e).then((function(t){return Dt(e),t.data=Tt.call(e,e.transformResponse,t),t.headers=kt.from(t.headers),t}),(function(t){return Nt(t)||(Dt(e),t&&t.response&&(t.response.data=Tt.call(e,e.transformResponse,t.response),t.response.headers=kt.from(t.response.headers))),Promise.reject(t)}))}const Vt=e=>e instanceof kt?{...e}:e;function Ut(e,t){t=t||{};const n={};function i(e,t,n){return qe.isPlainObject(e)&&qe.isPlainObject(t)?qe.merge.call({caseless:n},e,t):qe.isPlainObject(t)?qe.merge({},t):qe.isArray(t)?t.slice():t}function o(e,t,n){return qe.isUndefined(t)?qe.isUndefined(e)?void 0:i(void 0,e,n):i(e,t,n)}function r(e,t){if(!qe.isUndefined(t))return i(void 0,t)}function s(e,t){return qe.isUndefined(t)?qe.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function l(n,o,r){return r in t?i(n,o):r in e?i(void 0,n):void 0}const a={url:r,method:r,data:r,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(e,t)=>o(Vt(e),Vt(t),!0)};return qe.forEach(Object.keys(Object.assign({},e,t)),(function(i){const r=a[i]||o,s=r(e[i],t[i],i);qe.isUndefined(s)&&r!==l||(n[i]=s)})),n}const Wt="1.6.8",$t={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{$t[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const qt={};$t.transitional=function(e,t,n){function i(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,r)=>{if(!1===e)throw new Ke(i(o," has been removed"+(t?" in "+t:"")),Ke.ERR_DEPRECATED);return t&&!qt[o]&&(qt[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,r)}};const Zt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ke("options must be an object",Ke.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let o=i.length;for(;o-- >0;){const r=i[o],s=t[r];if(s){const t=e[r],n=void 0===t||s(t,r,e);if(!0!==n)throw new Ke("option "+r+" must be "+n,Ke.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Ke("Unknown option "+r,Ke.ERR_BAD_OPTION)}},validators:$t},Yt=Zt.validators;class Gt{constructor(e){this.defaults=e,this.interceptors={request:new ct,response:new ct}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ut(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:o}=t;void 0!==n&&Zt.assertOptions(n,{silentJSONParsing:Yt.transitional(Yt.boolean),forcedJSONParsing:Yt.transitional(Yt.boolean),clarifyTimeoutError:Yt.transitional(Yt.boolean)},!1),null!=i&&(qe.isFunction(i)?t.paramsSerializer={serialize:i}:Zt.assertOptions(i,{encode:Yt.function,serialize:Yt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=o&&qe.merge(o.common,o[t.method]);o&&qe.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=kt.concat(r,o);const s=[];let l=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const a=[];let c;this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)}));let u,d=0;if(!l){const e=[Ht.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,a),u=e.length,c=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const i=new Promise((e=>{n.subscribe(e),t=e})).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e,i,o){n.reason||(n.reason=new Lt(e,i,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new Xt((function(t){e=t}));return{token:t,cancel:e}}}const Jt=Xt;const Qt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Qt).forEach((([e,t])=>{Qt[t]=e}));const en=Qt;const tn=function e(t){const n=new Kt(t),i=he(Kt.prototype.request,n);return qe.extend(i,Kt.prototype,n,{allOwnKeys:!0}),qe.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(Ut(t,n))},i}(bt);tn.Axios=Kt,tn.CanceledError=Lt,tn.CancelToken=Jt,tn.isCancel=Nt,tn.VERSION=Wt,tn.toFormData=nt,tn.AxiosError=Ke,tn.Cancel=tn.CanceledError,tn.all=function(e){return Promise.all(e)},tn.spread=function(e){return function(t){return e.apply(null,t)}},tn.isAxiosError=function(e){return qe.isObject(e)&&!0===e.isAxiosError},tn.mergeConfig=Ut,tn.AxiosHeaders=kt,tn.formToJSON=e=>yt(qe.isHTMLForm(e)?new FormData(e):e),tn.getAdapter=jt,tn.HttpStatusCode=en,tn.default=tn;const nn=tn,{Axios:on,AxiosError:rn,CanceledError:sn,isCancel:ln,CancelToken:an,VERSION:cn,all:un,Cancel:dn,isAxiosError:hn,spread:pn,toFormData:fn,AxiosHeaders:gn,HttpStatusCode:mn,formToJSON:yn,getAdapter:vn,mergeConfig:bn}=nn;var _n=n(5321),wn=n.n(_n),Cn=n(3120),xn=n.n(Cn),En=n(6040),Sn=n.n(En),kn=n(1636),Tn=n.n(kn),Nn=n(2221),An=n.n(Nn),Ln=n(1994),On=n.n(Ln);function Bn(e){return Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bn(e)}function Rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Pn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Bn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Bn(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Bn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function In(e){return In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},In(e)}function Mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function zn(e){for(var t=1;t',indent:'',outdent:'',list_bullets:'',list_number:'',link:'',unlink:''},redo:'',undo:'',bold:'',underline:'',italic:'',strike:'',subscript:'',superscript:'',erase:'',indent:'',outdent:'',expansion:'',reduction:'',code_view:'',preview:'',print:'',template:'',line_height:'',paragraph_style:'',text_style:'',save:'',blockquote:'',arrow_down:'',align_justify:'',align_left:'',align_right:'',align_center:'',font_color:'',highlight_color:'',list_bullets:'',list_number:'',table:'',horizontal_rule:'',show_blocks:'',cancel:'',image:'',video:'',link:'',math:'',unlink:'',table_header:'',merge_cell:'',split_cell:'',caption:'',edit:'',delete:'',modify:'',revert:'',auto_size:'',insert_row_below:'',insert_row_above:'',insert_column_left:'',insert_column_right:'',delete_row:'',delete_column:'',fixed_column_width:'',rotate_left:'',rotate_right:'',mirror_horizontal:'',mirror_vertical:'',checked:'',line_break:'',audio:'',image_gallery:'',bookmark:'',download:'',dir_ltr:'',dir_rtl:'',alert_outline:'',more_text:'',more_paragraph:'',more_plus:'',more_horizontal:'',more_vertical:'',attachment:'',map:'',magic_stick:'',empty_file:''};var Un=n(7791),Wn=n.n(Un);const $n={_d:null,_w:null,isIE:null,isIE_Edge:null,isOSX_IOS:null,isChromium:null,isMobile:null,isResizeObserverSupported:null,_propertiesInit:function(){this._d||(this._d=document,this._w=window,this.isIE=navigator.userAgent.indexOf("Trident")>-1,this.isIE_Edge=navigator.userAgent.indexOf("Trident")>-1||navigator.appVersion.indexOf("Edge")>-1,this.isOSX_IOS=/(Mac|iPhone|iPod|iPad)/.test(navigator.platform),this.isChromium=!!window.chrome,this.isResizeObserverSupported="function"==typeof ResizeObserver,this.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)},_allowedEmptyNodeList:".se-component, pre, blockquote, hr, li, table, img, iframe, video, audio, canvas",_HTMLConvertor:function(e){const t={"&":"&"," ":" ","'":"'",'"':""","<":"<",">":">"};return e.replace(/&|\u00A0|'|"|<|>/g,(function(e){return"string"==typeof t[e]?t[e]:e}))},zeroWidthSpace:String.fromCharCode(8203),zeroWidthRegExp:new RegExp(String.fromCharCode(8203),"g"),onlyZeroWidthRegExp:new RegExp("^"+String.fromCharCode(8203)+"+$"),fontValueMap:{"xx-small":1,"x-small":2,small:3,medium:4,large:5,"x-large":6,"xx-large":7},onlyZeroWidthSpace:function(e){return null!=e&&("string"!=typeof e&&(e=e.textContent),""===e||this.onlyZeroWidthRegExp.test(e))},getXMLHttpRequest:function(){if(!this._w.ActiveXObject)return this._w.XMLHttpRequest?new XMLHttpRequest:null;try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){return null}}},getValues:function(e){return e?this._w.Object.keys(e).map((function(t){return e[t]})):[]},camelToKebabCase:function(e){return"string"==typeof e?e.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()})):e.map((function(e){return $n.camelToKebabCase(e)}))},kebabToCamelCase:function(e){return"string"==typeof e?e.replace(/-[a-zA-Z]/g,(function(e){return e.replace("-","").toUpperCase()})):e.map((function(e){return $n.camelToKebabCase(e)}))},createElement:function(e){return this._d.createElement(e)},createTextNode:function(e){return this._d.createTextNode(e||"")},HTMLEncoder:function(e){const t={"<":"$lt;",">":"$gt;"};return e.replace(/<|>/g,(function(e){return"string"==typeof t[e]?t[e]:e}))},HTMLDecoder:function(e){const t={"$lt;":"<","$gt;":">"};return e.replace(/\$lt;|\$gt;/g,(function(e){return"string"==typeof t[e]?t[e]:e}))},hasOwn:function(e,t){return this._hasOwn.call(e,t)},_hasOwn:Object.prototype.hasOwnProperty,getIncludePath:function(e,t){let n="";const i=[],o="js"===t?"script":"link",r="js"===t?"src":"href";let s="(?:";for(let t=0,n=e.length;t0?i[0][r]:""),-1===n.indexOf(":/")&&"//"!==n.slice(0,2)&&(n=0===n.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+n:location.href.match(/^[^\?]*\/(?:)/)[0]+n),!n)throw"[SUNEDITOR.util.getIncludePath.fail] The SUNEDITOR installation path could not be automatically detected. (name: +"+name+", extension: "+t+")";return n},getPageStyle:function(e){let t="";const n=(e||this._d).styleSheets;for(let e,i=0,o=n.length;i-1||(i+=n[e].name+'="'+n[e].value+'" ');return i},getByteLength:function(e){if(!e||!e.toString)return 0;e=e.toString();const t=this._w.encodeURIComponent;let n,i;return this.isIE_Edge?(i=this._w.unescape(t(e)).length,n=0,null!==t(e).match(/(%0A|%0D)/gi)&&(n=t(e).match(/(%0A|%0D)/gi).length),i+n):(i=new this._w.TextEncoder("utf-8").encode(e).length,n=0,null!==t(e).match(/(%0A|%0D)/gi)&&(n=t(e).match(/(%0A|%0D)/gi).length),i+n)},isWysiwygDiv:function(e){return e&&1===e.nodeType&&(this.hasClass(e,"se-wrapper-wysiwyg")||/^BODY$/i.test(e.nodeName))},isNonEditable:function(e){return e&&1===e.nodeType&&"false"===e.getAttribute("contenteditable")},isTextStyleElement:function(e){return e&&3!==e.nodeType&&/^(strong|span|font|b|var|i|em|u|ins|s|strike|del|sub|sup|mark|a|label|code|summary)$/i.test(e.nodeName)},isInputElement:function(e){return e&&1===e.nodeType&&/^(INPUT|TEXTAREA)$/i.test(e.nodeName)},isFormatElement:function(e){return e&&1===e.nodeType&&(/^(P|DIV|H[1-6]|PRE|LI|TH|TD|DETAILS)$/i.test(e.nodeName)||this.hasClass(e,"(\\s|^)__se__format__replace_.+(\\s|$)|(\\s|^)__se__format__free_.+(\\s|$)"))&&!this.isComponent(e)&&!this.isWysiwygDiv(e)},isRangeFormatElement:function(e){return e&&1===e.nodeType&&(/^(BLOCKQUOTE|OL|UL|FIGCAPTION|TABLE|THEAD|TBODY|TR|TH|TD|DETAILS)$/i.test(e.nodeName)||this.hasClass(e,"(\\s|^)__se__format__range_.+(\\s|$)"))},isClosureRangeFormatElement:function(e){return e&&1===e.nodeType&&(/^(TH|TD)$/i.test(e.nodeName)||this.hasClass(e,"(\\s|^)__se__format__range__closure_.+(\\s|$)"))},isFreeFormatElement:function(e){return e&&1===e.nodeType&&(/^PRE$/i.test(e.nodeName)||this.hasClass(e,"(\\s|^)__se__format__free_.+(\\s|$)"))&&!this.isComponent(e)&&!this.isWysiwygDiv(e)},isClosureFreeFormatElement:function(e){return e&&1===e.nodeType&&this.hasClass(e,"(\\s|^)__se__format__free__closure_.+(\\s|$)")},isComponent:function(e){return e&&(/se-component/.test(e.className)||/^(TABLE|HR)$/.test(e.nodeName))},isUneditableComponent:function(e){return e&&this.hasClass(e,"__se__uneditable")},isMediaComponent:function(e){return e&&/se-component/.test(e.className)},isNotCheckingNode:function(e){return e&&/katex|__se__tag/.test(e.className)},getFormatElement:function(e,t){if(!e)return null;for(t||(t=function(){return!0});e;){if(this.isWysiwygDiv(e))return null;if(this.isRangeFormatElement(e)&&e.firstElementChild,this.isFormatElement(e)&&t(e))return e;e=e.parentNode}return null},getRangeFormatElement:function(e,t){if(!e)return null;for(t||(t=function(){return!0});e;){if(this.isWysiwygDiv(e))return null;if(this.isRangeFormatElement(e)&&!/^(THEAD|TBODY|TR)$/i.test(e.nodeName)&&t(e))return e;e=e.parentNode}return null},getFreeFormatElement:function(e,t){if(!e)return null;for(t||(t=function(){return!0});e;){if(this.isWysiwygDiv(e))return null;if(this.isFreeFormatElement(e)&&t(e))return e;e=e.parentNode}return null},getClosureFreeFormatElement:function(e,t){if(!e)return null;for(t||(t=function(){return!0});e;){if(this.isWysiwygDiv(e))return null;if(this.isClosureFreeFormatElement(e)&&t(e))return e;e=e.parentNode}return null},copyTagAttributes:function(e,t,n){if(t.style.cssText){const n=t.style;for(let t=0,i=n.length;t-1||!i[o].value?e.removeAttribute(t):"style"!==t&&e.setAttribute(i[o].name,i[o].value)},copyFormatAttributes:function(e,t){(t=t.cloneNode(!1)).className=t.className.replace(/(\s|^)__se__format__[^\s]+/g,""),this.copyTagAttributes(e,t)},getArrayItem:function(e,t,n){if(!e||0===e.length)return null;t=t||function(){return!0};const i=[];for(let o,r=0,s=e.length;rs?1:r0&&!this.isBreak(e);)e=e.firstChild;for(;t&&1===t.nodeType&&t.childNodes.length>0&&!this.isBreak(t);)t=t.lastChild;return{sc:e,ec:t||e}}},getOffset:function(e,t){let n=0,i=0,o=3===e.nodeType?e.parentElement:e;const r=this.getParentElement(e,this.isWysiwygDiv.bind(this));for(;o&&!this.hasClass(o,"se-container")&&o!==r;)n+=o.offsetLeft,i+=o.offsetTop,o=o.offsetParent;const s=t&&/iframe/i.test(t.nodeName);return{left:n+(s?t.parentElement.offsetLeft:0),top:i-(r?r.scrollTop:0)+(s?t.parentElement.offsetTop:0)}},getOverlapRangeAtIndex:function(e,t,n,i){if(e<=i?tn)return 0;const o=(e>n?e:n)-(t0?" ":"")+t)},removeClass:function(e,t){if(!e)return;const n=new this._w.RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ").trim(),e.className.trim()||e.removeAttribute("class")},toggleClass:function(e,t){if(!e)return;let n=!1;const i=new this._w.RegExp("(\\s|^)"+t+"(\\s|$)");return i.test(e.className)?e.className=e.className.replace(i," ").trim():(e.className+=" "+t,n=!0),e.className.trim()||e.removeAttribute("class"),n},isImportantDisabled:function(e){return e.hasAttribute("data-important-disabled")},setDisabledButtons:function(e,t,n){for(let i=0,o=t.length;ii))continue;r.appendChild(n[e])}e--,t--,i--}return o.childNodes.length>0&&e.parentNode.insertBefore(o,e),r.childNodes.length>0&&e.parentNode.insertBefore(r,e.nextElementSibling),e}const i=e.parentNode;let o,r,s,l=0,a=1,c=!0;if((!n||n<0)&&(n=0),3===e.nodeType){if(l=this.getPositionIndex(e),t>=0&&e.length!==t){e.splitText(t);const n=this.getNodeFromPath([l+1],i);this.onlyZeroWidthSpace(n)&&(n.data=this.zeroWidthSpace)}}else if(1===e.nodeType){if(0===t){for(;e.firstChild;)e=e.firstChild;if(3===e.nodeType){const t=this.createTextNode(this.zeroWidthSpace);e.parentNode.insertBefore(t,e),e=t}}e.previousSibling?e=e.previousSibling:this.getElementDepth(e)===n&&(c=!1)}1===e.nodeType&&(a=0);let u=e;for(;this.getElementDepth(u)>n;)for(l=this.getPositionIndex(u)+a,u=u.parentNode,s=o,o=u.cloneNode(!1),r=u.childNodes,s&&(this.isListCell(o)&&this.isList(s)&&s.firstElementChild?(o.innerHTML=s.firstElementChild.innerHTML,$n.removeItem(s.firstElementChild),s.children.length>0&&o.appendChild(s)):o.appendChild(s));r[l];)o.appendChild(r[l]);u.childNodes.length<=1&&(!u.firstChild||0===u.firstChild.textContent.length)&&(u.innerHTML="
");const d=u.parentNode;return c&&(u=u.nextSibling),o?(this.mergeSameTags(o,null,!1),this.mergeNestedTags(o,function(e){return this.isList(e)}.bind(this)),o.childNodes.length>0?d.insertBefore(o,u):o=u,this.isListCell(o)&&o.children&&this.isList(o.children[0])&&o.insertBefore(this.createElement("BR"),o.children[0]),0===i.childNodes.length&&this.removeItem(i),o):u},mergeSameTags:function(e,t,n){const i=this,o=t?t.length:0;let r=null;return o&&(r=this._w.Array.apply(null,new this._w.Array(o)).map(this._w.Number.prototype.valueOf,0)),function e(s,l,a){const c=s.childNodes;for(let u,d,h=0,p=c.length;h=0;){if(i.getArrayIndex(r.childNodes,n)!==e[a]){c=!1;break}n=u.parentNode,r=n.parentNode,a--}c&&(e.splice(l,1),e[l]=h)}}i.copyTagAttributes(u,s),s.parentNode.insertBefore(u,s),i.removeItem(s)}if(!d){1===u.nodeType&&e(u,l+1,h);break}if(u.nodeName===d.nodeName&&i.isSameAttributes(u,d)&&u.href===d.href){const e=u.childNodes;let n=0;for(let t=0,i=e.length;t0&&n++;const s=u.lastChild,c=d.firstChild;let p=0;if(s&&c){const e=3===s.nodeType&&3===c.nodeType;p=s.textContent.length;let i=s.previousSibling;for(;i&&3===i.nodeType;)p+=i.textContent.length,i=i.previousSibling;if(n>0&&3===s.nodeType&&3===c.nodeType&&(s.textContent.length>0||c.textContent.length>0)&&n--,o){let i=null;for(let u=0;uh){if(l>0&&i[l-1]!==a)continue;i[l]-=1,i[l+1]>=0&&i[l]===h&&(i[l+1]+=n,e&&s&&3===s.nodeType&&c&&3===c.nodeType&&(r[u]+=p))}}}if(3===u.nodeType){if(p=u.textContent.length,u.textContent+=d.textContent,o){let e=null;for(let i=0;ih){if(l>0&&e[l-1]!==a)continue;e[l]-=1,e[l+1]>=0&&e[l]===h&&(e[l+1]+=n,r[i]+=p)}}}else u.innerHTML+=d.innerHTML;i.removeItem(d),h--}else 1===u.nodeType&&e(u,l+1,h)}}(e,0,0),r},mergeNestedTags:function(e,t){"string"==typeof t?t=function(e){return this.test(e.tagName)}.bind(new this._w.RegExp("^("+(t||".+")+")$","i")):"function"!=typeof t&&(t=function(){return!0}),function e(n){let i=n.children;if(1===i.length&&i[0].nodeName===n.nodeName&&t(n)){const e=i[0];for(i=e.children;i[0];)n.appendChild(i[0]);n.removeChild(e)}for(let t=0,i=n.children.length;t")},htmlRemoveWhiteSpace:function(e){return e?e.trim().replace(/<\/?(?!strong|span|font|b|var|i|em|u|ins|s|strike|del|sub|sup|mark|a|label|code|summary)[^>^<]+>\s+(?=<)/gi,(function(e){return e.replace(/\n/g,"").replace(/\s+/," ")})):""},htmlCompress:function(e){return e.replace(/\n/g,"").replace(/(>)(?:\s+)(<)/g,"$1$2")},sortByDepth:function(e,t){const n=t?1:-1,i=-1*n;e.sort(function(e,t){return this.isListCell(e)&&this.isListCell(t)?(e=this.getElementDepth(e))>(t=this.getElementDepth(t))?n:e]*>","gi")},createTagsBlacklist:function(e){return new RegExp("<\\/?\\b(?:\\b"+(e||"^").replace(/\|/g,"\\b|\\b")+"\\b)[^>]*>","gi")},_consistencyCheckOfHTML:function(e,t,n,i){const o=[],r=[],s=[],l=[],a=this.getListChildNodes(e,function(a){if(1!==a.nodeType)return this.isList(a.parentElement)&&o.push(a),!1;if(n.test(a.nodeName)||!t.test(a.nodeName)&&0===a.childNodes.length&&this.isNotCheckingNode(a))return o.push(a),!1;const c=!this.getParentElement(a,this.isNotCheckingNode);if(!this.isTable(a)&&!this.isListCell(a)&&!this.isAnchor(a)&&(this.isFormatElement(a)||this.isRangeFormatElement(a)||this.isTextStyleElement(a))&&0===a.childNodes.length&&c)return r.push(a),!1;if(this.isList(a.parentNode)&&!this.isList(a)&&!this.isListCell(a))return s.push(a),!1;if(this.isCell(a)){const e=a.firstElementChild;if(!this.isFormatElement(e)&&!this.isRangeFormatElement(e)&&!this.isComponent(e))return l.push(a),!1}if(c&&a.className){const e=new this._w.Array(a.classList).map(i).join(" ").trim();e?a.className=e:a.removeAttribute("class")}return a.parentNode!==e&&c&&(this.isListCell(a)&&!this.isList(a.parentNode)||(this.isFormatElement(a)||this.isComponent(a))&&!this.isRangeFormatElement(a.parentNode)&&!this.getParentElement(a,this.isComponent))}.bind(this));for(let e=0,t=o.length;e=0;o--)t.insertBefore(e,n[o]);c.push(e)}else t.parentNode.insertBefore(e,t),c.push(t);for(let e,t=0,n=c.length;t":e.innerHTML,e.innerHTML=t.outerHTML},_setDefaultOptionStyle:function(e,t){let n="";e.height&&(n+="height:"+e.height+";"),e.minHeight&&(n+="min-height:"+e.minHeight+";"),e.maxHeight&&(n+="max-height:"+e.maxHeight+";"),e.position&&(n+="position:"+e.position+";"),e.width&&(n+="width:"+e.width+";"),e.minWidth&&(n+="min-width:"+e.minWidth+";"),e.maxWidth&&(n+="max-width:"+e.maxWidth+";");let i="",o="",r="";const s=(t=n+t).split(";");for(let t,n=0,l=s.length;n'+this._setIframeCssTags(t),e.contentDocument.body.className=t._editableClass,e.contentDocument.body.setAttribute("contenteditable",!0),e.contentDocument.body.setAttribute("autocorrect","off")},_setIframeCssTags:function(e){const t=e.iframeCSSFileName,n=this._w.RegExp;let i="";for(let e,o=0,r=t.length;o'}return i+("auto"===e.height?"":"")}},qn=$n,Zn={init:function(e,t){"object"!=typeof t&&(t={});const n=document;this._initOptions(e,t);const i=n.createElement("DIV");i.className="sun-editor"+(t.rtl?" se-rtl":""),e.id&&(i.id="suneditor_"+e.id);const o=n.createElement("DIV");o.className="se-container";const r=this._createToolBar(n,t.buttonList,t.plugins,t),s=r.element.cloneNode(!1);s.className+=" se-toolbar-shadow",r.element.style.visibility="hidden",r.pluginCallButtons.math&&this._checkKatexMath(t.katex);const l=n.createElement("DIV");l.className="se-arrow";const a=n.createElement("DIV");a.className="se-toolbar-sticky-dummy";const c=n.createElement("DIV");c.className="se-wrapper";const u=this._initElements(t,i,r.element,l),d=u.bottomBar,h=u.wysiwygFrame,p=u.placeholder;let f=u.codeView;const g=d.resizingBar,m=d.navigation,y=d.charWrapper,v=d.charCounter,b=n.createElement("DIV");b.className="se-loading-box sun-editor-common",b.innerHTML='
';const _=n.createElement("DIV");_.className="se-line-breaker",_.innerHTML='";const w=n.createElement("DIV");w.className+="se-line-breaker-component";const C=w.cloneNode(!0);w.innerHTML=C.innerHTML=t.icons.line_break;const x=n.createElement("DIV");x.className="se-resizing-back";const E=n.createElement("INPUT");E.tabIndex=-1,E.style.cssText="position: absolute !important; top: -10000px !important; display: block !important; width: 0 !important; height: 0 !important; margin: 0 !important; padding: 0 !important;";const S=t.toolbarContainer;S&&(S.appendChild(r.element),S.appendChild(s));const k=t.resizingBarContainer;return g&&k&&k.appendChild(g),c.appendChild(f),p&&c.appendChild(p),S||(o.appendChild(r.element),o.appendChild(s)),o.appendChild(a),o.appendChild(c),o.appendChild(x),o.appendChild(b),o.appendChild(_),o.appendChild(w),o.appendChild(C),o.appendChild(E),g&&!k&&o.appendChild(g),i.appendChild(o),f=this._checkCodeMirror(t,f),{constructed:{_top:i,_relative:o,_toolBar:r.element,_toolbarShadow:s,_menuTray:r._menuTray,_editorArea:c,_wysiwygArea:h,_codeArea:f,_placeholder:p,_resizingBar:g,_navigation:m,_charWrapper:y,_charCounter:v,_loading:b,_lineBreaker:_,_lineBreaker_t:w,_lineBreaker_b:C,_resizeBack:x,_stickyDummy:a,_arrow:l,_focusTemp:E},options:t,plugins:r.plugins,pluginCallButtons:r.pluginCallButtons,_responsiveButtons:r.responsiveButtons}},_checkCodeMirror:function(e,t){if(e.codeMirror){const n=[{mode:"htmlmixed",htmlMode:!0,lineNumbers:!0,lineWrapping:!0},e.codeMirror.options||{}].reduce((function(e,t){for(let n in t)qn.hasOwn(t,n)&&(e[n]=t[n]);return e}),{});"auto"===e.height&&(n.viewportMargin=1/0,n.height="auto");const i=e.codeMirror.src.fromTextArea(t,n);i.display.wrapper.style.cssText=t.style.cssText,e.codeMirrorEditor=i,(t=i.display.wrapper).className+=" se-wrapper-code-mirror"}return t},_checkKatexMath:function(e){if(!e)throw Error('[SUNEDITOR.create.fail] To use the math button you need to add a "katex" object to the options.');const t=[{throwOnError:!1},e.options||{}].reduce((function(e,t){for(let n in t)qn.hasOwn(t,n)&&(e[n]=t[n]);return e}),{});e.options=t},_setOptions:function(e,t,n){this._initOptions(t.element.originElement,e);const i=t.element,o=i.relative,r=i.editorArea,s=e.toolbarContainer&&e.toolbarContainer!==n.toolbarContainer,l=e.lang!==n.lang||e.buttonList!==n.buttonList||e.mode!==n.mode||s,a=this._createToolBar(document,l?e.buttonList:n.buttonList,e.plugins,e);a.pluginCallButtons.math&&this._checkKatexMath(e.katex);const c=document.createElement("DIV");c.className="se-arrow",l&&(a.element.style.visibility="hidden",s?(e.toolbarContainer.appendChild(a.element),i.toolbar.parentElement.removeChild(i.toolbar)):i.toolbar.parentElement.replaceChild(a.element,i.toolbar),i.toolbar=a.element,i._menuTray=a._menuTray,i._arrow=c);const u=this._initElements(e,i.topArea,l?a.element:i.toolbar,c),d=u.bottomBar,h=u.wysiwygFrame,p=u.placeholder;let f=u.codeView;return i.resizingBar&&qn.removeItem(i.resizingBar),d.resizingBar&&(e.resizingBarContainer&&e.resizingBarContainer!==n.resizingBarContainer?e.resizingBarContainer.appendChild(d.resizingBar):o.appendChild(d.resizingBar)),r.innerHTML="",r.appendChild(f),p&&r.appendChild(p),f=this._checkCodeMirror(e,f),i.resizingBar=d.resizingBar,i.navigation=d.navigation,i.charWrapper=d.charWrapper,i.charCounter=d.charCounter,i.wysiwygFrame=h,i.code=f,i.placeholder=p,e.rtl?qn.addClass(i.topArea,"se-rtl"):qn.removeClass(i.topArea,"se-rtl"),{callButtons:a.pluginCallButtons,plugins:a.plugins,toolbar:a}},_initElements:function(e,t,n,i){t.style.cssText=e._editorStyles.top,/inline/i.test(e.mode)?(n.className+=" se-toolbar-inline",n.style.width=e.toolbarWidth):/balloon/i.test(e.mode)&&(n.className+=" se-toolbar-balloon",n.style.width=e.toolbarWidth,n.appendChild(i));const o=document.createElement(e.iframe?"IFRAME":"DIV");if(o.className="se-wrapper-inner se-wrapper-wysiwyg",e.iframe)o.allowFullscreen=!0,o.frameBorder=0,o.style.cssText=e._editorStyles.frame,o.className+=e.className;else{o.setAttribute("contenteditable",!0),o.setAttribute("autocorrect","off"),o.setAttribute("scrolling","auto");for(let t in e.iframeAttributes)o.setAttribute(t,e.iframeAttributes[t]);o.className+=" "+e._editableClass,o.style.cssText=e._editorStyles.frame+e._editorStyles.editor,o.className+=e.className}const r=document.createElement("TEXTAREA");r.className="se-wrapper-inner se-wrapper-code"+e.className,r.style.cssText=e._editorStyles.frame,r.style.display="none","auto"===e.height&&(r.style.overflow="hidden");let s=null,l=null,a=null,c=null;if(e.resizingBar&&(s=document.createElement("DIV"),s.className="se-resizing-bar sun-editor-common",l=document.createElement("DIV"),l.className="se-navigation sun-editor-common",s.appendChild(l),e.charCounter)){if(a=document.createElement("DIV"),a.className="se-char-counter-wrapper",e.charCounterLabel){const t=document.createElement("SPAN");t.className="se-char-label",t.textContent=e.charCounterLabel,a.appendChild(t)}if(c=document.createElement("SPAN"),c.className="se-char-counter",c.textContent="0",a.appendChild(c),e.maxCharCount>0){const t=document.createElement("SPAN");t.textContent=" / "+e.maxCharCount,a.appendChild(t)}s.appendChild(a)}let u=null;return e.placeholder&&(u=document.createElement("SPAN"),u.className="se-placeholder",u.innerText=e.placeholder),{bottomBar:{resizingBar:s,navigation:l,charWrapper:a,charCounter:c},wysiwygFrame:o,codeView:r,placeholder:u}},_initOptions:function(e,t){const n={};if(t.plugins){const e=t.plugins,i=e.length?e:Object.keys(e).map((function(t){return e[t]}));for(let e,t=0,o=i.length;t0?t.defaultTag:"p";const i=t.textTags=[{bold:"STRONG",underline:"U",italic:"EM",strike:"DEL",sub:"SUB",sup:"SUP"},t.textTags||{}].reduce((function(e,t){for(let n in t)e[n]=t[n];return e}),{});t._textTagsMap={strong:i.bold.toLowerCase(),b:i.bold.toLowerCase(),u:i.underline.toLowerCase(),ins:i.underline.toLowerCase(),em:i.italic.toLowerCase(),i:i.italic.toLowerCase(),del:i.strike.toLowerCase(),strike:i.strike.toLowerCase(),s:i.strike.toLowerCase(),sub:i.sub.toLowerCase(),sup:i.sup.toLowerCase()},t._defaultCommand={bold:t.textTags.bold,underline:t.textTags.underline,italic:t.textTags.italic,strike:t.textTags.strike,subscript:t.textTags.sub,superscript:t.textTags.sup},t.__allowedScriptTag=!0===t.__allowedScriptTag;t.tagsBlacklist=t.tagsBlacklist||"",t._defaultTagsWhitelist=("string"==typeof t._defaultTagsWhitelist?t._defaultTagsWhitelist:"br|p|div|pre|blockquote|h1|h2|h3|h4|h5|h6|ol|ul|li|hr|figure|figcaption|img|iframe|audio|video|source|table|thead|tbody|tr|th|td|a|b|strong|var|i|em|u|ins|s|span|strike|del|sub|sup|code|svg|path|details|summary")+(t.__allowedScriptTag?"|script":""),t._editorTagsWhitelist="*"===t.addTagsWhitelist?"*":this._setWhitelist(t._defaultTagsWhitelist+("string"==typeof t.addTagsWhitelist&&t.addTagsWhitelist.length>0?"|"+t.addTagsWhitelist:""),t.tagsBlacklist),t.pasteTagsBlacklist=t.tagsBlacklist+(t.tagsBlacklist&&t.pasteTagsBlacklist?"|"+t.pasteTagsBlacklist:t.pasteTagsBlacklist||""),t.pasteTagsWhitelist="*"===t.pasteTagsWhitelist?"*":this._setWhitelist("string"==typeof t.pasteTagsWhitelist?t.pasteTagsWhitelist:t._editorTagsWhitelist,t.pasteTagsBlacklist),t.attributesWhitelist=t.attributesWhitelist&&"object"==typeof t.attributesWhitelist?t.attributesWhitelist:null,t.attributesBlacklist=t.attributesBlacklist&&"object"==typeof t.attributesBlacklist?t.attributesBlacklist:null,t.mode=t.mode||"classic",t.rtl=!!t.rtl,t.lineAttrReset=["id"].concat(t.lineAttrReset&&"string"==typeof t.lineAttrReset?t.lineAttrReset.toLowerCase().split("|"):[]),t._editableClass="sun-editor-editable"+(t.rtl?" se-rtl":""),t._printClass="string"==typeof t._printClass?t._printClass:null,t.toolbarWidth=t.toolbarWidth?qn.isNumber(t.toolbarWidth)?t.toolbarWidth+"px":t.toolbarWidth:"auto",t.toolbarContainer="string"==typeof t.toolbarContainer?document.querySelector(t.toolbarContainer):t.toolbarContainer,t.stickyToolbar=/balloon/i.test(t.mode)||t.toolbarContainer?-1:void 0===t.stickyToolbar?0:/^\d+/.test(t.stickyToolbar)?qn.getNumber(t.stickyToolbar,0):-1,t.hideToolbar=!!t.hideToolbar,t.fullScreenOffset=void 0===t.fullScreenOffset?0:/^\d+/.test(t.fullScreenOffset)?qn.getNumber(t.fullScreenOffset,0):0,t.fullPage=!!t.fullPage,t.iframe=t.fullPage||!!t.iframe,t.iframeAttributes=t.iframeAttributes||{},t.iframeCSSFileName=t.iframe?"string"==typeof t.iframeCSSFileName?[t.iframeCSSFileName]:t.iframeCSSFileName||["suneditor"]:null,t.previewTemplate="string"==typeof t.previewTemplate?t.previewTemplate:null,t.printTemplate="string"==typeof t.printTemplate?t.printTemplate:null,t.codeMirror=t.codeMirror?t.codeMirror.src?t.codeMirror:{src:t.codeMirror}:null,t.katex=t.katex?t.katex.src?t.katex:{src:t.katex}:null,t.mathFontSize=t.mathFontSize?t.mathFontSize:[{text:"1",value:"1em"},{text:"1.5",value:"1.5em"},{text:"2",value:"2em"},{text:"2.5",value:"2.5em"}],t.position="string"==typeof t.position?t.position:null,t.display=t.display||("none"!==e.style.display&&e.style.display?e.style.display:"block"),t.popupDisplay=t.popupDisplay||"full",t.resizingBar=void 0===t.resizingBar?!/inline|balloon/i.test(t.mode):t.resizingBar,t.showPathLabel=!!t.resizingBar&&("boolean"!=typeof t.showPathLabel||t.showPathLabel),t.resizeEnable=void 0===t.resizeEnable||!!t.resizeEnable,t.resizingBarContainer="string"==typeof t.resizingBarContainer?document.querySelector(t.resizingBarContainer):t.resizingBarContainer,t.charCounter=t.maxCharCount>0||"boolean"==typeof t.charCounter&&t.charCounter,t.charCounterType="string"==typeof t.charCounterType?t.charCounterType:"char",t.charCounterLabel="string"==typeof t.charCounterLabel?t.charCounterLabel.trim():null,t.maxCharCount=qn.isNumber(t.maxCharCount)&&t.maxCharCount>-1?1*t.maxCharCount:null,t.width=t.width?qn.isNumber(t.width)?t.width+"px":t.width:e.clientWidth?e.clientWidth+"px":"100%",t.minWidth=(qn.isNumber(t.minWidth)?t.minWidth+"px":t.minWidth)||"",t.maxWidth=(qn.isNumber(t.maxWidth)?t.maxWidth+"px":t.maxWidth)||"",t.height=t.height?qn.isNumber(t.height)?t.height+"px":t.height:e.clientHeight?e.clientHeight+"px":"auto",t.minHeight=(qn.isNumber(t.minHeight)?t.minHeight+"px":t.minHeight)||"",t.maxHeight=(qn.isNumber(t.maxHeight)?t.maxHeight+"px":t.maxHeight)||"",t.className="string"==typeof t.className&&t.className.length>0?" "+t.className:"",t.defaultStyle="string"==typeof t.defaultStyle?t.defaultStyle:"",t.font=t.font?t.font:["Arial","Comic Sans MS","Courier New","Impact","Georgia","tahoma","Trebuchet MS","Verdana"],t.fontSize=t.fontSize?t.fontSize:null,t.formats=t.formats?t.formats:null,t.colorList=t.colorList?t.colorList:null,t.lineHeights=t.lineHeights?t.lineHeights:null,t.paragraphStyles=t.paragraphStyles?t.paragraphStyles:null,t.textStyles=t.textStyles?t.textStyles:null,t.fontSizeUnit="string"==typeof t.fontSizeUnit&&t.fontSizeUnit.trim().toLowerCase()||"px",t.alignItems="object"==typeof t.alignItems?t.alignItems:t.rtl?["right","center","left","justify"]:["left","center","right","justify"],t.imageResizing=void 0===t.imageResizing||t.imageResizing,t.imageHeightShow=void 0===t.imageHeightShow||!!t.imageHeightShow,t.imageAlignShow=void 0===t.imageAlignShow||!!t.imageAlignShow,t.imageWidth=t.imageWidth?qn.isNumber(t.imageWidth)?t.imageWidth+"px":t.imageWidth:"auto",t.imageHeight=t.imageHeight?qn.isNumber(t.imageHeight)?t.imageHeight+"px":t.imageHeight:"auto",t.imageSizeOnlyPercentage=!!t.imageSizeOnlyPercentage,t._imageSizeUnit=t.imageSizeOnlyPercentage?"%":"px",t.imageRotation=void 0!==t.imageRotation?t.imageRotation:!(t.imageSizeOnlyPercentage||!t.imageHeightShow),t.imageFileInput=void 0===t.imageFileInput||t.imageFileInput,t.imageUrlInput=void 0===t.imageUrlInput||!t.imageFileInput||t.imageUrlInput,t.imageUploadHeader=t.imageUploadHeader||null,t.imageUploadUrl="string"==typeof t.imageUploadUrl?t.imageUploadUrl:null,t.imageUploadSizeLimit=/\d+/.test(t.imageUploadSizeLimit)?qn.getNumber(t.imageUploadSizeLimit,0):null,t.imageMultipleFile=!!t.imageMultipleFile,t.imageAccept="string"!=typeof t.imageAccept||"*"===t.imageAccept.trim()?"image/*":t.imageAccept.trim()||"image/*",t.imageGalleryUrl="string"==typeof t.imageGalleryUrl?t.imageGalleryUrl:null,t.imageGalleryHeader=t.imageGalleryHeader||null,t.videoResizing=void 0===t.videoResizing||t.videoResizing,t.videoHeightShow=void 0===t.videoHeightShow||!!t.videoHeightShow,t.videoAlignShow=void 0===t.videoAlignShow||!!t.videoAlignShow,t.videoRatioShow=void 0===t.videoRatioShow||!!t.videoRatioShow,t.videoWidth=t.videoWidth&&qn.getNumber(t.videoWidth,0)?qn.isNumber(t.videoWidth)?t.videoWidth+"px":t.videoWidth:"",t.videoHeight=t.videoHeight&&qn.getNumber(t.videoHeight,0)?qn.isNumber(t.videoHeight)?t.videoHeight+"px":t.videoHeight:"",t.videoSizeOnlyPercentage=!!t.videoSizeOnlyPercentage,t._videoSizeUnit=t.videoSizeOnlyPercentage?"%":"px",t.videoRotation=void 0!==t.videoRotation?t.videoRotation:!(t.videoSizeOnlyPercentage||!t.videoHeightShow),t.videoRatio=qn.getNumber(t.videoRatio,4)||.5625,t.videoRatioList=t.videoRatioList?t.videoRatioList:null,t.youtubeQuery=(t.youtubeQuery||"").replace("?",""),t.videoFileInput=!!t.videoFileInput,t.videoUrlInput=void 0===t.videoUrlInput||!t.videoFileInput||t.videoUrlInput,t.videoUploadHeader=t.videoUploadHeader||null,t.videoUploadUrl="string"==typeof t.videoUploadUrl?t.videoUploadUrl:null,t.videoUploadSizeLimit=/\d+/.test(t.videoUploadSizeLimit)?qn.getNumber(t.videoUploadSizeLimit,0):null,t.videoMultipleFile=!!t.videoMultipleFile,t.videoTagAttrs=t.videoTagAttrs||null,t.videoIframeAttrs=t.videoIframeAttrs||null,t.videoAccept="string"!=typeof t.videoAccept||"*"===t.videoAccept.trim()?"video/*":t.videoAccept.trim()||"video/*",t.audioWidth=t.audioWidth?qn.isNumber(t.audioWidth)?t.audioWidth+"px":t.audioWidth:"",t.audioHeight=t.audioHeight?qn.isNumber(t.audioHeight)?t.audioHeight+"px":t.audioHeight:"",t.audioFileInput=!!t.audioFileInput,t.audioUrlInput=void 0===t.audioUrlInput||!t.audioFileInput||t.audioUrlInput,t.audioUploadHeader=t.audioUploadHeader||null,t.audioUploadUrl="string"==typeof t.audioUploadUrl?t.audioUploadUrl:null,t.audioUploadSizeLimit=/\d+/.test(t.audioUploadSizeLimit)?qn.getNumber(t.audioUploadSizeLimit,0):null,t.audioMultipleFile=!!t.audioMultipleFile,t.audioTagAttrs=t.audioTagAttrs||null,t.audioAccept="string"!=typeof t.audioAccept||"*"===t.audioAccept.trim()?"audio/*":t.audioAccept.trim()||"audio/*",t.tableCellControllerPosition="string"==typeof t.tableCellControllerPosition?t.tableCellControllerPosition.toLowerCase():"cell",t.linkTargetNewWindow=!!t.linkTargetNewWindow,t.linkProtocol="string"==typeof t.linkProtocol?t.linkProtocol:null,t.linkRel=Array.isArray(t.linkRel)?t.linkRel:[],t.linkRelDefault=t.linkRelDefault||{},t.tabDisable=!!t.tabDisable,t.shortcutsDisable=Array.isArray(t.shortcutsDisable)?t.shortcutsDisable:[],t.shortcutsHint=void 0===t.shortcutsHint||!!t.shortcutsHint,t.callBackSave=t.callBackSave?t.callBackSave:null,t.templates=t.templates?t.templates:null,t.placeholder="string"==typeof t.placeholder?t.placeholder:null,t.mediaAutoSelect=void 0===t.mediaAutoSelect||!!t.mediaAutoSelect,t.buttonList=t.buttonList?t.buttonList:[["undo","redo"],["bold","underline","italic","strike","subscript","superscript"],["removeFormat"],["outdent","indent"],["fullScreen","showBlocks","codeView"],["preview","print"]],t.rtl&&(t.buttonList=t.buttonList.reverse()),t.icons=t.icons&&"object"==typeof t.icons?[Vn,t.icons].reduce((function(e,t){for(let n in t)qn.hasOwn(t,n)&&(e[n]=t[n]);return e}),{}):Vn,t.icons=t.rtl?[t.icons,t.icons.rtl].reduce((function(e,t){for(let n in t)qn.hasOwn(t,n)&&(e[n]=t[n]);return e}),{}):t.icons,t.__listCommonStyle=t.__listCommonStyle||["fontSize","color","fontFamily","fontWeight","fontStyle"],t._editorStyles=qn._setDefaultOptionStyle(t,t.defaultStyle)},_setWhitelist:function(e,t){if("string"!=typeof t)return e;t=t.split("|"),e=e.split("|");for(let n,i=0,o=t.length;i-1&&e.splice(n,1);return e.join("|")},_defaultButtons:function(e){const t=e.icons,n=e.lang,i=qn.isOSX_IOS?"⌘":"CTRL",o=qn.isOSX_IOS?"⇧":"+SHIFT",r=e.shortcutsHint?e.shortcutsDisable:["bold","strike","underline","italic","undo","indent","save"],s=e.rtl?["[","]"]:["]","["],l=e.rtl?[t.outdent,t.indent]:[t.indent,t.outdent];return{bold:["",n.toolbar.bold+''+(r.indexOf("bold")>-1?"":i+'+B')+"","bold","",t.bold],underline:["",n.toolbar.underline+''+(r.indexOf("underline")>-1?"":i+'+U')+"","underline","",t.underline],italic:["",n.toolbar.italic+''+(r.indexOf("italic")>-1?"":i+'+I')+"","italic","",t.italic],strike:["",n.toolbar.strike+''+(r.indexOf("strike")>-1?"":i+o+'+S')+"","strike","",t.strike],subscript:["",n.toolbar.subscript,"SUB","",t.subscript],superscript:["",n.toolbar.superscript,"SUP","",t.superscript],removeFormat:["",n.toolbar.removeFormat,"removeFormat","",t.erase],indent:["",n.toolbar.indent+''+(r.indexOf("indent")>-1?"":i+'+'+s[0]+"")+"","indent","",l[0]],outdent:["",n.toolbar.outdent+''+(r.indexOf("indent")>-1?"":i+'+'+s[1]+"")+"","outdent","",l[1]],fullScreen:["se-code-view-enabled se-resizing-enabled",n.toolbar.fullScreen,"fullScreen","",t.expansion],showBlocks:["",n.toolbar.showBlocks,"showBlocks","",t.show_blocks],codeView:["se-code-view-enabled se-resizing-enabled",n.toolbar.codeView,"codeView","",t.code_view],undo:["",n.toolbar.undo+''+(r.indexOf("undo")>-1?"":i+'+Z')+"","undo","",t.undo],redo:["",n.toolbar.redo+''+(r.indexOf("undo")>-1?"":i+'+Y / '+i+o+'+Z')+"","redo","",t.redo],preview:["se-resizing-enabled",n.toolbar.preview,"preview","",t.preview],print:["se-resizing-enabled",n.toolbar.print,"print","",t.print],dir:["",n.toolbar[e.rtl?"dir_ltr":"dir_rtl"],"dir","",t[e.rtl?"dir_ltr":"dir_rtl"]],dir_ltr:["",n.toolbar.dir_ltr,"dir_ltr","",t.dir_ltr],dir_rtl:["",n.toolbar.dir_rtl,"dir_rtl","",t.dir_rtl],save:["se-resizing-enabled",n.toolbar.save+''+(r.indexOf("save")>-1?"":i+'+S')+"","save","",t.save],blockquote:["",n.toolbar.tag_blockquote,"blockquote","command",t.blockquote],font:["se-btn-select se-btn-tool-font",n.toolbar.font,"font","submenu",''+n.toolbar.font+""+t.arrow_down],formatBlock:["se-btn-select se-btn-tool-format",n.toolbar.formats,"formatBlock","submenu",''+n.toolbar.formats+""+t.arrow_down],fontSize:["se-btn-select se-btn-tool-size",n.toolbar.fontSize,"fontSize","submenu",''+n.toolbar.fontSize+""+t.arrow_down],fontColor:["",n.toolbar.fontColor,"fontColor","submenu",t.font_color],hiliteColor:["",n.toolbar.hiliteColor,"hiliteColor","submenu",t.highlight_color],align:["se-btn-align",n.toolbar.align,"align","submenu",e.rtl?t.align_right:t.align_left],list:["",n.toolbar.list,"list","submenu",t.list_number],horizontalRule:["btn_line",n.toolbar.horizontalRule,"horizontalRule","submenu",t.horizontal_rule],table:["",n.toolbar.table,"table","submenu",t.table],lineHeight:["",n.toolbar.lineHeight,"lineHeight","submenu",t.line_height],template:["",n.toolbar.template,"template","submenu",t.template],paragraphStyle:["",n.toolbar.paragraphStyle,"paragraphStyle","submenu",t.paragraph_style],textStyle:["",n.toolbar.textStyle,"textStyle","submenu",t.text_style],link:["",n.toolbar.link,"link","dialog",t.link],image:["",n.toolbar.image,"image","dialog",t.image],video:["",n.toolbar.video,"video","dialog",t.video],audio:["",n.toolbar.audio,"audio","dialog",t.audio],math:["",n.toolbar.math,"math","dialog",t.math],imageGallery:["",n.toolbar.imageGallery,"imageGallery","fileBrowser",t.image_gallery]}},_createModuleGroup:function(){const e=qn.createElement("DIV");e.className="se-btn-module se-btn-module-border";const t=qn.createElement("UL");return t.className="se-menu-list",e.appendChild(t),{div:e,ul:t}},_createButton:function(e,t,n,i,o,r,s){const l=qn.createElement("LI"),a=qn.createElement("BUTTON"),c=t||n;return a.setAttribute("type","button"),a.setAttribute("class","se-btn"+(e?" "+e:"")+" se-tooltip"),a.setAttribute("data-command",n),a.setAttribute("data-display",i),a.setAttribute("aria-label",c.replace(//,"")),a.setAttribute("tabindex","-1"),o||(o='!'),/^default\./i.test(o)&&(o=s[o.replace(/^default\./i,"")]),/^text\./i.test(o)&&(o=o.replace(/^text\./i,""),a.className+=" se-btn-more-text"),o+=''+c+"",r&&a.setAttribute("disabled",!0),a.innerHTML=o,l.appendChild(a),{li:l,button:a}},_createToolBar:function(e,t,n,i){const o=e.createElement("DIV");o.className="se-toolbar-separator-vertical";const r=e.createElement("DIV");r.className="se-toolbar sun-editor-common";const s=e.createElement("DIV");s.className="se-btn-tray",r.appendChild(s),t=JSON.parse(JSON.stringify(t));const l=i.icons,a=this._defaultButtons(i),c={},u=[];let d=null,h=null,p=null,f=null,g="",m=!1;const y=qn.createElement("DIV");y.className="se-toolbar-more-layer";e:for(let i,r,v,b,_,w=0;w",y.appendChild(r),r=r.firstElementChild.firstElementChild)}if(m){const e=o.cloneNode(!1);s.appendChild(e)}s.appendChild(p.div),m=!0}else if(/^\/$/.test(b)){const t=e.createElement("DIV");t.className="se-btn-module-enter",s.appendChild(t),m=!1}switch(s.children.length){case 0:s.style.display="none";break;case 1:qn.removeClass(s.firstElementChild,"se-btn-module-border");break;default:if(i.rtl){const e=o.cloneNode(!1);e.style.float=s.lastElementChild.style.float,s.appendChild(e)}}u.length>0&&u.unshift(t),y.children.length>0&&s.appendChild(y);const v=e.createElement("DIV");v.className="se-menu-tray",r.appendChild(v);const b=e.createElement("DIV");return b.className="se-toolbar-cover",r.appendChild(b),i.hideToolbar&&(r.style.display="none"),{element:r,plugins:n,pluginCallButtons:c,responsiveButtons:u,_menuTray:v,_buttonTray:s}}},Yn=function(e,t,n){return{element:{originElement:e,topArea:t._top,relative:t._relative,toolbar:t._toolBar,_toolbarShadow:t._toolbarShadow,_buttonTray:t._toolBar.querySelector(".se-btn-tray"),_menuTray:t._menuTray,resizingBar:t._resizingBar,navigation:t._navigation,charWrapper:t._charWrapper,charCounter:t._charCounter,editorArea:t._editorArea,wysiwygFrame:t._wysiwygArea,wysiwyg:t._wysiwygArea,code:t._codeArea,placeholder:t._placeholder,loading:t._loading,lineBreaker:t._lineBreaker,lineBreaker_t:t._lineBreaker_t,lineBreaker_b:t._lineBreaker_b,resizeBackground:t._resizeBack,_stickyDummy:t._stickyDummy,_arrow:t._arrow,_focusTemp:t._focusTemp},tool:{cover:t._toolBar.querySelector(".se-toolbar-cover"),bold:t._toolBar.querySelector('[data-command="bold"]'),underline:t._toolBar.querySelector('[data-command="underline"]'),italic:t._toolBar.querySelector('[data-command="italic"]'),strike:t._toolBar.querySelector('[data-command="strike"]'),sub:t._toolBar.querySelector('[data-command="SUB"]'),sup:t._toolBar.querySelector('[data-command="SUP"]'),undo:t._toolBar.querySelector('[data-command="undo"]'),redo:t._toolBar.querySelector('[data-command="redo"]'),save:t._toolBar.querySelector('[data-command="save"]'),outdent:t._toolBar.querySelector('[data-command="outdent"]'),indent:t._toolBar.querySelector('[data-command="indent"]'),fullScreen:t._toolBar.querySelector('[data-command="fullScreen"]'),showBlocks:t._toolBar.querySelector('[data-command="showBlocks"]'),codeView:t._toolBar.querySelector('[data-command="codeView"]'),dir:t._toolBar.querySelector('[data-command="dir"]'),dir_ltr:t._toolBar.querySelector('[data-command="dir_ltr"]'),dir_rtl:t._toolBar.querySelector('[data-command="dir_rtl"]')},options:n,option:n}};const Gn={name:"notice",add:function(e){const t=e.context;t.notice={};let n=e.util.createElement("DIV"),i=e.util.createElement("SPAN"),o=e.util.createElement("BUTTON");n.className="se-notice",o.className="close",o.setAttribute("aria-label","Close"),o.setAttribute("title",e.lang.dialogBox.close),o.innerHTML=e.icons.cancel,n.appendChild(i),n.appendChild(o),t.notice.modal=n,t.notice.message=i,o.addEventListener("click",this.onClick_cancel.bind(e)),t.element.editorArea.appendChild(n),n=null},onClick_cancel:function(e){e.preventDefault(),e.stopPropagation(),this.plugins.notice.close.call(this)},open:function(e){this.context.notice.message.textContent=e,this.context.notice.modal.style.display="block"},close:function(){this.context.notice.modal.style.display="none"}};const Kn=function(e,t,n){qn._propertiesInit(),"object"!=typeof t&&(t={}),n&&(t=[n,t].reduce((function(e,t){for(let n in t)if(qn.hasOwn(t,n))if("plugins"===n&&t[n]&&e[n]){let i=e[n],o=t[n];i=i.length?i:Object.keys(i).map((function(e){return i[e]})),o=o.length?o:Object.keys(o).map((function(e){return o[e]})),e[n]=o.filter((function(e){return-1===i.indexOf(e)})).concat(i)}else e[n]=t[n];return e}),{}));const i="string"==typeof e?document.getElementById(e):e;if(!i){if("string"==typeof e)throw Error('[SUNEDITOR.create.fail] The element for that id was not found (ID:"'+e+'")');throw Error("[SUNEDITOR.create.fail] suneditor requires textarea's element or id value")}const o=Zn.init(i,t);if(o.constructed._top.id&&document.getElementById(o.constructed._top.id))throw Error('[SUNEDITOR.create.fail] The ID of the suneditor you are trying to create already exists (ID:"'+o.constructed._top.id+'")');return function(e,t,n,i,o,r){const s=e.element.originElement.ownerDocument||document,l=s.defaultView||window,a=qn,c=o.icons,u={_d:s,_w:l,_parser:new l.DOMParser,_prevRtl:o.rtl,_editorHeight:0,_editorHeightPadding:0,_listCamel:o.__listCommonStyle,_listKebab:a.camelToKebabCase(o.__listCommonStyle),__focusTemp:e.element._focusTemp,_wd:null,_ww:null,_shadowRoot:null,_shadowRootControllerEventTarget:null,util:a,functions:null,options:null,wwComputedStyle:null,notice:Gn,icons:c,history:null,context:e,pluginCallButtons:t,plugins:n||{},initPlugins:{},_targetPlugins:{},_menuTray:{},lang:i,effectNode:null,submenu:null,container:null,_submenuName:"",_bindedSubmenuOff:null,_bindedContainerOff:null,submenuActiveButton:null,containerActiveButton:null,controllerArray:[],currentControllerName:"",currentControllerTarget:null,currentFileComponentInfo:null,codeViewDisabledButtons:[],resizingDisabledButtons:[],_moreLayerActiveButton:null,_htmlCheckWhitelistRegExp:null,_htmlCheckBlacklistRegExp:null,_disallowedTextTagsRegExp:null,editorTagsWhitelistRegExp:null,editorTagsBlacklistRegExp:null,pasteTagsWhitelistRegExp:null,pasteTagsBlacklistRegExp:null,hasFocus:!1,isDisabled:!1,isReadOnly:!1,_attributesWhitelistRegExp:null,_attributesWhitelistRegExp_all_data:null,_attributesBlacklistRegExp:null,_attributesTagsWhitelist:null,_attributesTagsBlacklist:null,_bindControllersOff:null,_isInline:null,_isBalloon:null,_isBalloonAlways:null,_inlineToolbarAttr:{top:"",width:"",isShow:!1},_notHideToolbar:!1,_sticky:!1,_antiBlur:!1,_lineBreaker:null,_lineBreakerButton:null,_componentsInfoInit:!0,_componentsInfoReset:!1,activePlugins:null,managedTagsInfo:null,_charTypeHTML:!1,_fileInfoPluginsCheck:null,_fileInfoPluginsReset:null,_fileManager:{tags:null,regExp:null,queryString:null,pluginRegExp:null,pluginMap:null},commandMap:{},_commandMapStyles:{STRONG:["font-weight"],U:["text-decoration"],EM:["font-style"],DEL:["text-decoration"]},_styleCommandMap:null,_cleanStyleRegExp:{div:new l.RegExp("\\s*[^-a-zA-Z](.+)\\s*:[^;]+(?!;)*","ig"),span:new l.RegExp("\\s*[^-a-zA-Z](font-family|font-size|color|background-color)\\s*:[^;]+(?!;)*","ig"),format:new l.RegExp("\\s*[^-a-zA-Z](text-align|margin-left|margin-right|width|height|line-height)\\s*:[^;]+(?!;)*","ig"),fontSizeUnit:new l.RegExp("\\d+"+o.fontSizeUnit+"$","i")},_variable:{isChanged:!1,isCodeView:!1,isFullScreen:!1,innerHeight_fullScreen:0,resizeClientY:0,tabSize:4,codeIndent:2,minResizingSize:a.getNumber(e.element.wysiwygFrame.style.minHeight||"65",0),currentNodes:[],currentNodesMap:[],_range:null,_selectionNode:null,_originCssText:e.element.topArea.style.cssText,_bodyOverflow:"",_editorAreaOriginCssText:"",_wysiwygOriginCssText:"",_codeOriginCssText:"",_fullScreenAttrs:{sticky:!1,balloon:!1,inline:!1},_lineBreakComp:null,_lineBreakDir:""},_formatAttrsTemp:null,_saveButtonStates:function(){this.allCommandButtons||(this.allCommandButtons={});const e=this.context.element._buttonTray.querySelectorAll(".se-menu-list button[data-display]");for(let t,n,i=0;ie?c-e:0,o=i>0?0:e-c;n.style.left=u-i+o+"px",s.left>d._getEditorOffsets(n).left&&(n.style.left="0px")}else{const e=r<=c?0:r-(u+c);n.style.left=e<0?u+e+"px":u+"px"}let h=0,p=t;for(;p&&p!==i;)h+=p.offsetTop,p=p.offsetParent;const f=h;this._isBalloon?h+=i.offsetTop+t.offsetHeight:h-=t.offsetHeight;const g=s.top,m=n.offsetHeight,y=this.getGlobalScrollOffset().top,v=l.innerHeight-(g-y+f+t.parentElement.offsetHeight);if(vv?(n.style.height=o+"px",e=-1*(o-f+3)):(n.style.height=v+"px",e=f+t.parentElement.offsetHeight),n.style.top=e+"px"}else n.style.top=f+t.parentElement.offsetHeight+"px";n.style.visibility=""},controllersOn:function(){this._bindControllersOff&&this._bindControllersOff(),this.controllerArray=[];for(let e,t=0;t0)for(let e=0;e0){for(let e=0;ed?u-d:0,i=n>0?0:d-u;t.style.left=c-n+i+"px",n>0&&h&&(h.style.left=(u-14<10+n?u-14:10+n)+"px");const o=e.element.wysiwygFrame.offsetLeft-t.offsetLeft;o>0&&(t.style.left="0px",h&&(h.style.left=o+"px"))}else{t.style.left=c+"px";const n=e.element.wysiwygFrame.offsetWidth-(t.offsetLeft+u);n<0?(t.style.left=t.offsetLeft+n+"px",h&&(h.style.left=20-n+"px")):h&&(h.style.left="20px")}t.style.visibility=""},execCommand:function(e,t,n){this._wd.execCommand(e,t,"formatBlock"===e?"<"+n+">":n),this.history.push(!0)},nativeFocus:function(){this.__focus(),this._editorRange()},__focus:function(){const t=a.getParentElement(this.getSelectionNode(),"figcaption");t?t.focus():e.element.wysiwyg.focus()},focus:function(){if("none"!==e.element.wysiwygFrame.style.display){if(o.iframe)this.nativeFocus();else try{const t=this.getRange();if(t.startContainer===t.endContainer&&a.isWysiwygDiv(t.startContainer)){const n=t.commonAncestorContainer.children[t.startOffset];if(!a.isFormatElement(n)&&!a.isComponent(n)){const t=a.createElement(o.defaultTag),i=a.createElement("BR");return t.appendChild(i),e.element.wysiwyg.insertBefore(t,n),void this.setRange(i,0,i,0)}}this.setRange(t.startContainer,t.startOffset,t.endContainer,t.endOffset)}catch(e){this.nativeFocus()}d._applyTagEffects(),this._isBalloon&&d._toggleToolbarBalloon()}},focusEdge:function(t){t||(t=e.element.wysiwyg.lastElementChild);const n=this.getFileComponent(t);n?this.selectComponent(n.target,n.pluginName):t?(t=a.getChildElement(t,(function(e){return 0===e.childNodes.length||3===e.nodeType}),!0))?this.setRange(t,t.textContent.length,t,t.textContent.length):this.nativeFocus():this.focus()},blur:function(){o.iframe?e.element.wysiwygFrame.blur():e.element.wysiwyg.blur()},setRange:function(e,t,n,i){if(!e||!n)return;t>e.textContent.length&&(t=e.textContent.length),i>n.textContent.length&&(i=n.textContent.length),a.isFormatElement(e)&&(e=e.childNodes[t]||e.childNodes[t-1]||e,t=t>0?1===e.nodeType?1:e.textContent?e.textContent.length:0:0),a.isFormatElement(n)&&(n=n.childNodes[i]||n.childNodes[i-1]||n,i=i>0?1===n.nodeType?1:n.textContent?n.textContent.length:0:0);const r=this._wd.createRange();try{r.setStart(e,t),r.setEnd(n,i)}catch(e){return console.warn("[SUNEDITOR.core.focus.error] "+e),void this.nativeFocus()}const s=this.getSelection();return s.removeAllRanges&&s.removeAllRanges(),s.addRange(r),this._rangeInfo(r,this.getSelection()),o.iframe&&this.__focus(),r},removeRange:function(){this._variable._range=null,this._variable._selectionNode=null,this.hasFocus&&this.getSelection().removeAllRanges(),this._setKeyEffect([])},getRange:function(){const t=this._variable._range||this._createDefaultRange(),n=this.getSelection();if(t.collapsed===n.isCollapsed||!e.element.wysiwyg.contains(n.focusNode))return t;if(n.rangeCount>0)return this._variable._range=n.getRangeAt(0),this._variable._range;{const e=n.anchorNode,t=n.focusNode,i=n.anchorOffset,o=n.focusOffset,r=a.compareElements(e,t),s=r.ancestor&&(0===r.result?i<=o:r.result>1);return this.setRange(s?e:t,s?i:o,s?t:e,s?o:i)}},getRange_addLine:function(t,n){if(this._selectionVoid(t)){const i=e.element.wysiwyg,r=a.createElement(o.defaultTag);r.innerHTML="
",i.insertBefore(r,n&&n!==i?n.nextElementSibling:i.firstElementChild),this.setRange(r.firstElementChild,0,r.firstElementChild,1),t=this._variable._range}return t},getSelection:function(){const t=this._shadowRoot&&this._shadowRoot.getSelection?this._shadowRoot.getSelection():this._ww.getSelection();return this._variable._range||e.element.wysiwyg.contains(t.focusNode)||(t.removeAllRanges(),t.addRange(this._createDefaultRange())),t},getSelectionNode:function(){if(e.element.wysiwyg.contains(this._variable._selectionNode)||this._editorRange(),!this._variable._selectionNode){const t=a.getChildElement(e.element.wysiwyg.firstChild,(function(e){return 0===e.childNodes.length||3===e.nodeType}),!1);if(t)return this._variable._selectionNode=t,t;this._editorRange()}return this._variable._selectionNode},_editorRange:function(){const e=this._wd.activeElement;if(a.isInputElement(e))return this._variable._selectionNode=e,e;const t=this.getSelection();if(!t)return null;let n=null;n=t.rangeCount>0?t.getRangeAt(0):this._createDefaultRange(),this._rangeInfo(n,t)},_rangeInfo:function(e,t){let n=null;this._variable._range=e,n=e.collapsed?a.isWysiwygDiv(e.commonAncestorContainer)&&e.commonAncestorContainer.children[e.startOffset]||e.commonAncestorContainer:t.extentNode||t.anchorNode,this._variable._selectionNode=n},_createDefaultRange:function(){const t=e.element.wysiwyg,n=this._wd.createRange();let i=t.firstElementChild,r=null;return i?(r=i.firstChild,r||(r=a.createElement("BR"),i.appendChild(r))):(i=a.createElement(o.defaultTag),r=a.createElement("BR"),i.appendChild(r),t.appendChild(i)),n.setStart(r,0),n.setEnd(r,0),n},_selectionVoid:function(e){const t=e.commonAncestorContainer;return a.isWysiwygDiv(e.startContainer)&&a.isWysiwygDiv(e.endContainer)||/FIGURE/i.test(t.nodeName)||this._fileManager.regExp.test(t.nodeName)||a.isMediaComponent(t)},_resetRangeToTextNode:function(){const t=this.getRange();if(this._selectionVoid(t))return!1;let n,i,r,s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset;if(a.isFormatElement(s))for(s.childNodes[l]?(s=s.childNodes[l]||s,l=0):(s=s.lastChild||s,l=s.textContent.length);s&&1===s.nodeType&&s.firstChild;)s=s.firstChild||s,l=0;if(a.isFormatElement(c)){for(c=c.childNodes[u]||c.lastChild||c;c&&1===c.nodeType&&c.lastChild;)c=c.lastChild;u=c.textContent.length}if(n=a.isWysiwygDiv(s)?e.element.wysiwyg.firstChild:s,i=l,a.isBreak(n)||1===n.nodeType&&n.childNodes.length>0){const e=a.isBreak(n);if(!e){for(;n&&!a.isBreak(n)&&1===n.nodeType;)n=n.childNodes[i]||n.nextElementSibling||n.nextSibling,i=0;let e=a.getFormatElement(n,null);e===a.getRangeFormatElement(e,null)&&(e=a.createElement(a.getParentElement(n,a.isCell)?"DIV":o.defaultTag),n.parentNode.insertBefore(e,n),e.appendChild(n))}if(a.isBreak(n)){const t=a.createTextNode(a.zeroWidthSpace);n.parentNode.insertBefore(t,n),n=t,e&&s===c&&(c=n,u=1)}}if(s=n,l=i,n=a.isWysiwygDiv(c)?e.element.wysiwyg.lastChild:c,i=u,a.isBreak(n)||1===n.nodeType&&n.childNodes.length>0){const e=a.isBreak(n);if(!e){for(;n&&!a.isBreak(n)&&1===n.nodeType&&(r=n.childNodes,0!==r.length);)n=r[i>0?i-1:i]||!/FIGURE/i.test(r[0].nodeName)?r[0]:n.previousElementSibling||n.previousSibling||s,i=i>0?n.textContent.length:i;let e=a.getFormatElement(n,null);e===a.getRangeFormatElement(e,null)&&(e=a.createElement(a.isCell(e)?"DIV":o.defaultTag),n.parentNode.insertBefore(e,n),e.appendChild(n))}if(a.isBreak(n)){const t=a.createTextNode(a.zeroWidthSpace);n.parentNode.insertBefore(t,n),n=t,i=1,e&&!n.previousSibling&&a.removeItem(c)}}return c=n,u=i,this.setRange(s,l,c,u),!0},getSelectedElements:function(t){if(!this._resetRangeToTextNode())return[];let n=this.getRange();if(a.isWysiwygDiv(n.startContainer)){const t=e.element.wysiwyg.children;if(0===t.length)return[];this.setRange(t[0],0,t[t.length-1],t[t.length-1].textContent.trim().length),n=this.getRange()}const i=n.startContainer,o=n.endContainer,r=n.commonAncestorContainer,s=a.getListChildren(r,(function(e){return t?t(e):a.isFormatElement(e)}));if(a.isWysiwygDiv(r)||a.isRangeFormatElement(r)||s.unshift(a.getFormatElement(r,null)),i===o||1===s.length)return s;let l=a.getFormatElement(i,null),c=a.getFormatElement(o,null),u=null,d=null;const h=function(e){return!a.isTable(e)||/^TABLE$/i.test(e.nodeName)};let p=a.getRangeFormatElement(l,h),f=a.getRangeFormatElement(c,h);a.isTable(p)&&a.isListCell(p.parentNode)&&(p=p.parentNode),a.isTable(f)&&a.isListCell(f.parentNode)&&(f=f.parentNode);const g=p===f;for(let e,t=0,n=s.length;t=0;n--)if(i[n].contains(i[e])){i.splice(e,1),e--,t--;break}return i},isEdgePoint:function(e,t,n){return"end"!==n&&0===t||(!n||"front"!==n)&&!e.nodeValue&&1===t||(!n||"end"===n)&&!!e.nodeValue&&t===e.nodeValue.length},_isEdgeFormat:function(e,t,n){if(!this.isEdgePoint(e,t,n))return!1;const i=[];for(n="front"===n?"previousSibling":"nextSibling";e&&!a.isFormatElement(e)&&!a.isWysiwygDiv(e);){if(e[n]&&(!a.isBreak(e[n])||e[n][n]))return null;1===e.nodeType&&i.push(e.cloneNode(!1)),e=e.parentNode}return i},showLoading:function(){e.element.loading.style.display="block"},closeLoading:function(){e.element.loading.style.display="none"},appendFormatTag:function(e,t){if(!e||!e.parentNode)return null;const n=a.getFormatElement(this.getSelectionNode(),null);let i=null;if(!a.isFormatElement(e)&&a.isFreeFormatElement(n||e.parentNode))i=a.createElement("BR");else{const e=t?"string"==typeof t?t:t.nodeName:!a.isFormatElement(n)||a.isRangeFormatElement(n)||a.isFreeFormatElement(n)?o.defaultTag:n.nodeName;i=a.createElement(e),i.innerHTML="
",(t&&"string"!=typeof t||!t&&a.isFormatElement(n))&&a.copyTagAttributes(i,t||n,["id"])}return a.isCell(e)?e.insertBefore(i,e.nextElementSibling):e.parentNode.insertBefore(i,e.nextElementSibling),i},insertComponent:function(e,t,n,i){if(this.isReadOnly||n&&!this.checkCharCount(e,null))return null;const o=this.removeNode();this.getRange_addLine(this.getRange(),o.container);let r=null,s=this.getSelectionNode(),l=a.getFormatElement(s,null);if(a.isListCell(l))this.insertNode(e,s===l?null:o.container.nextSibling,!1),e.nextSibling||e.parentNode.appendChild(a.createElement("BR"));else{if(this.getRange().collapsed&&(3===o.container.nodeType||a.isBreak(o.container))){const e=a.getParentElement(o.container,function(e){return this.isRangeFormatElement(e)}.bind(a));r=a.splitElement(o.container,o.offset,e?a.getElementDepth(e)+1:0),r&&(l=r.previousSibling)}this.insertNode(e,a.isRangeFormatElement(l)?null:l,!1),l&&a.onlyZeroWidthSpace(l)&&a.removeItem(l)}if(!i){this.setRange(e,0,e,0);const t=this.getFileComponent(e);t?this.selectComponent(t.target,t.pluginName):r&&(r=a.getEdgeChildNodes(r,null).sc||r,this.setRange(r,0,r,0))}return t||this.history.push(1),r||e},getFileComponent:function(e){if(!this._fileManager.queryString||!e)return null;let t,n;return(/^FIGURE$/i.test(e.nodeName)||/se-component/.test(e.className))&&(t=e.querySelector(this._fileManager.queryString)),!t&&e.nodeName&&this._fileManager.regExp.test(e.nodeName)&&(t=e),t&&(n=this._fileManager.pluginMap[t.nodeName.toLowerCase()],n)?{target:t,component:a.getParentElement(t,a.isComponent),pluginName:n}:null},selectComponent:function(e,t){if(a.isUneditableComponent(a.getParentElement(e,a.isComponent))||a.isUneditableComponent(e))return!1;this.hasFocus||this.focus();const n=this.plugins[t];n&&l.setTimeout(function(){"function"==typeof n.select&&this.callPlugin(t,n.select.bind(this,e),null),this._setComponentLineBreaker(e)}.bind(this))},_setComponentLineBreaker:function(t){this._lineBreaker.style.display="none";const n=a.getParentElement(t,a.isComponent),i=e.element.lineBreaker_t.style,o=e.element.lineBreaker_b.style,r="block"===this.context.resizing.resizeContainer.style.display?this.context.resizing.resizeContainer:t,s=a.isListCell(n.parentNode);let l,c,u;(s?n.previousSibling:a.isFormatElement(n.previousElementSibling))?i.display="none":(this._variable._lineBreakComp=n,c=e.element.wysiwyg.scrollTop,l=a.getOffset(t,e.element.wysiwygFrame).top+c,u=r.offsetWidth/2/2,i.top=l-c-12+"px",i.left=a.getOffset(r).left+u+"px",i.display="block"),(s?n.nextSibling:a.isFormatElement(n.nextElementSibling))?o.display="none":(l||(this._variable._lineBreakComp=n,c=e.element.wysiwyg.scrollTop,l=a.getOffset(t,e.element.wysiwygFrame).top+c,u=r.offsetWidth/2/2),o.top=l+r.offsetHeight-c-12+"px",o.left=a.getOffset(r).left+r.offsetWidth-u-24+"px",o.display="block")},_checkDuplicateNode:function(e,t){!function e(n){u._dupleCheck(n,t);const i=n.childNodes;for(let t=0,n=i.length;t-1&&n.splice(e,1);for(let t=0,n=r.classList.length;ty?g.splitText(y):g.nextSibling;else if(a.isBreak(r))n=r,r=r.parentNode;else{let e=r.childNodes[m];const i=e&&3===e.nodeType&&a.onlyZeroWidthSpace(e)&&a.isBreak(e.nextSibling)?e.nextSibling:e;i?!i.nextSibling&&a.isBreak(i)?(r.removeChild(i),n=null):n=a.isBreak(i)&&!a.isBreak(t)?i:i.nextSibling:n=null}else if(b===_){n=this.isEdgePoint(_,y)?_.nextSibling:_.splitText(y);let e=b;this.isEdgePoint(b,m)||(e=b.splitText(m)),r.removeChild(e),0===r.childNodes.length&&f&&(r.innerHTML="
")}else{const e=this.removeNode(),i=e.container,s=e.prevContainer;if(i&&0===i.childNodes.length&&f&&(a.isFormatElement(i)?i.innerHTML="
":a.isRangeFormatElement(i)&&(i.innerHTML="<"+o.defaultTag+">
")),a.isListCell(i)&&3===t.nodeType)r=i,n=null;else if(!f&&s)if(r=3===s.nodeType?s.parentNode:s,r.contains(i)){let e=!0;for(n=i;n.parentNode&&n.parentNode!==r;)n=n.parentNode,e=!1;e&&i===s&&(n=n.nextSibling)}else n=null;else a.isWysiwygDiv(i)&&!a.isFormatElement(t)?(r=i.appendChild(a.createElement(o.defaultTag)),n=null):r=(n=f?_:i===s?i.nextSibling:i)&&n.parentNode?n.parentNode:g;for(;n&&!a.isFormatElement(n)&&n.parentNode!==g;)n=n.parentNode}try{if(!d){if((a.isWysiwygDiv(n)||r===e.element.wysiwyg.parentNode)&&(r=e.element.wysiwyg,n=null),a.isFormatElement(t)||a.isRangeFormatElement(t)||!a.isListCell(r)&&a.isComponent(t)){const e=r;if(a.isList(n))r=n,n=null;else if(a.isListCell(n))r=n.previousElementSibling||n;else if(!s&&!n){const e=this.removeNode(),t=3===e.container.nodeType?a.isListCell(a.getFormatElement(e.container,null))?e.container:a.getFormatElement(e.container,null)||e.container.parentNode:e.container,i=a.isWysiwygDiv(t)||a.isRangeFormatElement(t);r=i?t:t.parentNode,n=i?null:t.nextSibling}0===e.childNodes.length&&r!==e&&a.removeItem(e)}if(!f||p||a.isRangeFormatElement(r)||a.isListCell(r)||a.isWysiwygDiv(r)||(n=r.nextElementSibling,r=r.parentNode),a.isWysiwygDiv(r)&&(3===t.nodeType||a.isBreak(t))){const e=a.createElement(o.defaultTag);e.appendChild(t),t=e}}if(d?h.parentNode?(r=h,n=l):(r=e.element.wysiwyg,n=null):n=r===n?r.lastChild:n,a.isListCell(t)&&!a.isList(r)){if(a.isListCell(r))n=r.nextElementSibling,r=r.parentNode;else{const e=a.createElement("ol");r.insertBefore(e,n),r=e,n=null}d=!0}if(this._checkDuplicateNode(t,r),r.insertBefore(t,n),d)if(a.onlyZeroWidthSpace(u.textContent.trim()))a.removeItem(u),t=t.lastChild;else{const e=a.getArrayItem(u.children,a.isList);e&&(t!==e?(t.appendChild(e),t=e.previousSibling):(r.appendChild(t),t=r),a.onlyZeroWidthSpace(u.textContent.trim())&&a.removeItem(u))}}catch(e){r.appendChild(t),console.warn("[SUNEDITOR.insertNode.warn] "+e)}finally{const e=r.querySelectorAll("[data-se-duple]");if(e.length>0)for(let n,i,o,r,s=0,l=e.length;s0&&(t.textContent=i+t.textContent,a.removeItem(e)),n&&n.length>0&&(t.textContent+=o,a.removeItem(n));const r={container:t,startOffset:i.length,endOffset:t.textContent.length-o.length};return this.setRange(t,r.startOffset,t,r.endOffset),r}if(!a.isBreak(t)&&!a.isListCell(t)&&a.isFormatElement(r)){let n=null;t.previousSibling&&!a.isBreak(t.previousSibling)||(n=a.createTextNode(a.zeroWidthSpace),t.parentNode.insertBefore(n,t)),t.nextSibling&&!a.isBreak(t.nextSibling)||(n=a.createTextNode(a.zeroWidthSpace),t.parentNode.insertBefore(n,t.nextSibling)),a._isIgnoreNodeChange(t)&&(t=t.nextSibling,e=0)}this.setRange(t,e,t,e)}return this.history.push(!0),t}},_setIntoFreeFormat:function(e){const t=e.parentNode;let n,i;for(;a.isFormatElement(e)||a.isRangeFormatElement(e);){for(n=e.childNodes,i=null;n[0];)if(i=n[0],a.isFormatElement(i)||a.isRangeFormatElement(i)){if(this._setIntoFreeFormat(i),!e.parentNode)break;n=e.childNodes}else t.insertBefore(i,e);0===e.childNodes.length&&a.removeItem(e),e=a.createElement("BR"),t.insertBefore(e,i.nextSibling)}return e},removeNode:function(){this._resetRangeToTextNode();const t=this.getRange();if(t.startContainer===t.endContainer){const e=a.getParentElement(t.startContainer,a.isMediaComponent);if(e){const t=a.createElement("BR"),n=a.createElement(o.defaultTag);return n.appendChild(t),a.changeElement(e,n),u.setRange(n,0,n,0),this.history.push(!0),{container:n,offset:0,prevContainer:null}}}const n=0===t.startOffset,i=u.isEdgePoint(t.endContainer,t.endOffset,"end");let r=null,s=null,l=null;n&&(s=a.getFormatElement(t.startContainer),s&&(r=s.previousElementSibling,s=r)),i&&(l=a.getFormatElement(t.endContainer),l=l?l.nextElementSibling:l);let c,d=0,h=t.startContainer,p=t.endContainer,f=t.startOffset,g=t.endOffset;const m=3===t.commonAncestorContainer.nodeType&&t.commonAncestorContainer.parentNode===h.parentNode?h.parentNode:t.commonAncestorContainer;if(m===h&&m===p&&(h=m.children[f],p=m.children[g],f=g=0),!h||!p)return{container:m,offset:0};if(h===p&&t.collapsed&&h.textContent&&a.onlyZeroWidthSpace(h.textContent.substr(f)))return{container:h,offset:f,prevContainer:h&&h.parentNode?h:null};let y=null,v=null;const b=a.getListChildNodes(m,null);let _=a.getArrayIndex(b,h),w=a.getArrayIndex(b,p);if(b.length>0&&_>-1&&w>-1){for(let e=_+1,t=h;e>=0;e--)b[e]===t.parentNode&&b[e].firstChild===t&&0===f&&(_=e,t=t.parentNode);for(let e=w-1,t=p;e>_;e--)b[e]===t.parentNode&&1===b[e].nodeType&&(b.splice(e,1),t=t.parentNode,--w)}else{if(0===b.length){if(a.isFormatElement(m)||a.isRangeFormatElement(m)||a.isWysiwygDiv(m)||a.isBreak(m)||a.isMedia(m))return{container:m,offset:0};if(3===m.nodeType)return{container:m,offset:g};b.push(m),h=p=m}else if(h=p=b[0],a.isBreak(h)||a.onlyZeroWidthSpace(h))return{container:a.isMedia(m)?m:h,offset:0};_=w=0}for(let e=_;e<=w;e++){const t=b[e];if(0===t.length||3===t.nodeType&&void 0===t.data)this._nodeRemoveListItem(t);else if(t!==h)if(t!==p)this._nodeRemoveListItem(t);else{if(1===p.nodeType){if(a.isComponent(p))continue;v=a.createTextNode(p.textContent)}else v=a.createTextNode(p.substringData(g,p.length-g));v.length>0?p.data=v.data:this._nodeRemoveListItem(p)}else{if(1===h.nodeType){if(a.isComponent(h))continue;y=a.createTextNode(h.textContent)}else t===p?(y=a.createTextNode(h.substringData(0,f)+p.substringData(g,p.length-g)),d=f):y=a.createTextNode(h.substringData(0,f));if(y.length>0?h.data=y.data:this._nodeRemoveListItem(h),t===p)break}}const C=a.getParentElement(p,"ul"),x=a.getParentElement(h,"li");if(C&&x&&x.contains(C)?(c=C.previousSibling,d=c.textContent.length):(c=p&&p.parentNode?p:h&&h.parentNode?h:t.endContainer||t.startContainer,d=n||i?i?c.textContent.length:0:d),!a.isWysiwygDiv(c)&&0===c.childNodes.length){const t=a.removeItemAllParents(c,null,null);t&&(c=t.sc||t.ec||e.element.wysiwyg)}return a.getFormatElement(c)||h&&h.parentNode||(l?(c=l,d=0):s&&(c=s,d=1)),this.setRange(c,d,c,d),this.history.push(!0),{container:c,offset:d,prevContainer:r}},_nodeRemoveListItem:function(e){const t=a.getFormatElement(e,null);a.removeItem(e),a.isListCell(t)&&(a.removeItemAllParents(t,null,null),t&&a.isList(t.firstChild)&&t.insertBefore(a.createTextNode(a.zeroWidthSpace),t.firstChild))},applyRangeFormatElement:function(e){this.getRange_addLine(this.getRange(),null);const t=this.getSelectedElementsAndComponents(!1);if(!t||0===t.length)return;e:for(let e,n,i,o,r,s,l=0,c=t.length;l-1&&(o=n.lastElementChild,t.indexOf(o)>-1))){let e=null;for(;e=o.lastElementChild;)if(a.isList(e)){if(!(t.indexOf(e.lastElementChild)>-1))continue e;o=e.lastElementChild}i=n.firstElementChild,r=t.indexOf(i),s=t.indexOf(o),t.splice(r,s-r+1),c=t.length}let n,i,o,r=t[t.length-1];n=a.isRangeFormatElement(r)||a.isFormatElement(r)?r:a.getRangeFormatElement(r,null)||a.getFormatElement(r,null),a.isCell(n)?(i=null,o=n):(i=n.nextSibling,o=n.parentNode);let s=a.getElementDepth(n),l=null;const c=[],u=function(e,t,n){let i=null;if(e!==t&&!a.isTable(t)){if(t&&a.getElementDepth(e)===a.getElementDepth(t))return n;i=a.removeItemAllParents(t,null,e)}return i?i.ec:n};for(let n,r,d,h,p,f,g,m=0,y=t.length;m=d?(s=d,o=y.cc,i=u(o,r,y.ec),i&&(o=i.parentNode)):o===y.cc&&(i=y.ec),o!==y.cc&&(h=u(o,y.cc,h),i=void 0!==h?h:y.cc);for(let e=0,t=y.removeArray.length;e=d&&(s=d,o=r,i=n.nextSibling),e.appendChild(n),o!==r&&(h=u(o,r),void 0!==h&&(i=h));if(this.effectNode=null,a.mergeSameTags(e,null,!1),a.mergeNestedTags(e,function(e){return this.isList(e)}.bind(a)),i&&a.getElementDepth(i)>0&&(a.isList(i.parentNode)||a.isList(i.parentNode.parentNode))){const t=a.getParentElement(i,function(e){return this.isRangeFormatElement(e)&&!this.isList(e)}.bind(a)),n=a.splitElement(i,null,t?a.getElementDepth(t)+1:0);n.parentNode.insertBefore(e,n)}else o.insertBefore(e,i),u(e,i);const d=a.getEdgeChildNodes(e.firstElementChild,e.lastElementChild);t.length>1?this.setRange(d.sc,0,d.ec,d.ec.textContent.length):this.setRange(d.ec,d.ec.textContent.length,d.ec,d.ec.textContent.length),this.history.push(!1)},detachRangeFormatElement:function(e,t,n,i,r){const s=this.getRange();let l=s.startOffset,c=s.endOffset,u=a.getListChildNodes(e,(function(t){return t.parentNode===e})),d=e.parentNode,h=null,p=null,f=e.cloneNode(!1);const g=[],m=a.isList(n);let y=!1,v=!1,b=!1;function _(t,n,i,o){if(a.onlyZeroWidthSpace(n)&&(n.innerHTML=a.zeroWidthSpace,l=c=1),3===n.nodeType)return t.insertBefore(n,i),n;const r=(b?n:o).childNodes;let s=n.cloneNode(!1),u=null,d=null;for(;r[0];)d=r[0],!a._notTextNode(d)||a.isBreak(d)||a.isListCell(s)?s.appendChild(d):(s.childNodes.length>0&&(u||(u=s),t.insertBefore(s,i),s=n.cloneNode(!1)),t.insertBefore(d,i),u||(u=d));if(s.childNodes.length>0){if(a.isListCell(t)&&a.isListCell(s)&&a.isList(i))if(m){for(u=i;i;)s.appendChild(i),i=i.nextSibling;t.parentNode.insertBefore(s,t.nextElementSibling)}else{const t=o.nextElementSibling,n=a.detachNestedList(o,!1);if(e!==n||t!==o.nextElementSibling){const t=s.childNodes;for(;t[0];)o.appendChild(t[0]);e=n,v=!0}}else t.insertBefore(s,i);u||(u=s)}return u}for(let r,s,l,c=0,w=u.length;c0&&(d.insertBefore(f,e),f=null),!m&&a.isListCell(r))if(l&&a.getElementDepth(r)!==a.getElementDepth(l)&&(a.isListCell(d)||a.getArrayItem(r.children,a.isList,!1))){const t=r.nextElementSibling,n=a.detachNestedList(r,!1);e===n&&t===r.nextElementSibling||(e=n,v=!0)}else{const t=r;r=a.createElement(i?t.nodeName:a.isList(e.parentNode)||a.isListCell(e.parentNode)?"LI":a.isCell(e.parentNode)?"DIV":o.defaultTag);const n=a.isListCell(r),s=t.childNodes;for(;s[0]&&(!a.isList(s[0])||n);)r.appendChild(s[0]);a.copyFormatAttributes(r,t),b=!0}else r=r.cloneNode(!1);if(!v&&(i?(g.push(r),a.removeItem(u[c])):(n?(y||(d.insertBefore(n,e),y=!0),r=_(n,r,null,u[c])):r=_(d,r,e,u[c]),v||(t?(p=r,h||(h=r)):h||(h=p=r))),v)){v=b=!1,u=a.getListChildNodes(e,(function(t){return t.parentNode===e})),f=e.cloneNode(!1),d=e.parentNode,c=-1,w=u.length;continue}}const w=e.parentNode;let C=e.nextSibling;f&&f.children.length>0&&w.insertBefore(f,C),n?h=n.previousSibling:h||(h=e.previousSibling),C=e.nextSibling!==f?e.nextSibling:f?f.nextSibling:null,0===e.children.length||0===e.textContent.length?a.removeItem(e):a.removeEmptyNode(e,null,!1);let x=null;if(i)x={cc:w,sc:h,so:l,ec:C,eo:c,removeArray:g};else{h||(h=p),p||(p=h);const e=a.getEdgeChildNodes(h,p.parentNode?h:p);x={cc:(e.sc||e.ec).parentNode,sc:e.sc,so:l,ec:e.ec,eo:c,removeArray:null}}if(this.effectNode=null,r)return x;!i&&x&&(t?this.setRange(x.sc,l,x.ec,c):this.setRange(x.sc,0,x.sc,0)),this.history.push(!1)},detachList:function(e,t){let n={},i=!1,o=!1,r=null,s=null;const l=function(e){return!this.isComponent(e)}.bind(a);for(let c,u,d,h,p=0,f=e.length;p0)&&t,n=!!(n&&n.length>0)&&n;const r=!e,s=r&&!n&&!t;let c=o.startContainer,u=o.startOffset,d=o.endContainer,h=o.endOffset;if(s&&o.collapsed&&a.isFormatElement(c.parentNode)||c===d&&1===c.nodeType&&a.isNonEditable(c)){const e=c.parentNode;if(!a.isListCell(e)||!a.getValues(e.style).some(function(e){return this._listKebab.indexOf(e)>-1}.bind(this)))return}if(o.collapsed&&!s&&1===c.nodeType&&!a.isBreak(c)&&!a.isComponent(c)){let e=null;const t=c.childNodes[u];t&&(e=t.nextSibling?a.isBreak(t)?t:t.nextSibling:null);const n=a.createTextNode(a.zeroWidthSpace);c.insertBefore(n,e),this.setRange(n,1,n,1),o=this.getRange(),c=o.startContainer,u=o.startOffset,d=o.endContainer,h=o.endOffset}a.isFormatElement(c)&&(c=c.childNodes[u]||c.firstChild,u=0),a.isFormatElement(d)&&(d=d.childNodes[h]||d.lastChild,h=d.textContent.length),r&&(e=a.createElement("DIV"));const p=l.RegExp,f=e.nodeName;if(!s&&c===d&&!n&&e){let t=c,n=0;const i=[],o=e.style;for(let e=0,t=o.length;e0){for(;!a.isFormatElement(t)&&!a.isWysiwygDiv(t);){for(let o=0;o=i.length)return}}let g,m={},y={},v="",b="",_="";if(t){for(let e,n=0,i=t.length;n0&&(l=o.replace(v,"").trim(),l!==o&&(C.v=!0));const c=t.className;let u="";return b&&c.length>0&&(u=c.replace(b,"").trim(),u!==c&&(C.v=!0)),(!r||!b&&c||!v&&o||l||u||!n)&&(l||u||t.nodeName!==f||w(v)!==w(o)||w(b)!==w(c))?(v&&o.length>0&&(t.style.cssText=l),t.style.cssText||t.removeAttribute("style"),b&&c.length>0&&(t.className=u.trim()),t.className.trim()||t.removeAttribute("class"),t.style.cssText||t.className||t.nodeName!==f&&!n?t:(C.v=!0,null)):(C.v=!0,null)},E=this.getSelectedElements(null);o=this.getRange(),c=o.startContainer,u=o.startOffset,d=o.endContainer,h=o.endOffset,a.getFormatElement(c,null)||(c=a.getChildElement(E[0],(function(e){return 3===e.nodeType}),!1),u=0),a.getFormatElement(d,null)||(d=a.getChildElement(E[E.length-1],(function(e){return 3===e.nodeType}),!1),h=d.textContent.length);const S=a.getFormatElement(c,null)===a.getFormatElement(d,null),k=E.length-(S?0:1);g=e.cloneNode(!1);const T=s||r&&function(e){for(let t=0,n=e.length;t0&&this._resetCommonListCell(E[k],t)&&(n=!0),this._resetCommonListCell(E[0],t)&&(n=!0),n&&this.setRange(c,u,d,h),k>0&&(g=e.cloneNode(!1),y=this._nodeChange_endLine(E[k],g,x,d,h,s,r,C,A,L));for(let n,i=k-1;i>0;i--)this._resetCommonListCell(E[i],t),g=e.cloneNode(!1),n=this._nodeChange_middleLine(E[i],g,x,s,r,C,y.container),n.endContainer&&n.ancestor.contains(n.endContainer)&&(y.ancestor=null,y.container=n.endContainer),this._setCommonListStyle(n.ancestor,null);g=e.cloneNode(!1),m=this._nodeChange_startLine(E[0],g,x,c,u,s,r,C,A,L,y.container),m.endContainer&&(y.ancestor=null,y.container=m.endContainer),k<=0?y=m:y.container||(y.ancestor=null,y.container=m.container,y.offset=m.container.textContent.length),this._setCommonListStyle(m.ancestor,null),this._setCommonListStyle(y.ancestor||a.getFormatElement(y.container),null)}this.controllersOff(),this.setRange(m.container,m.offset,y.container,y.offset),this.history.push(!1)},_resetCommonListCell:function(e,t){if(!a.isListCell(e))return;t||(t=this._listKebab);const n=a.getArrayItem(e.childNodes,(function(e){return!a.isBreak(e)}),!0),i=e.style,r=[],s=[],l=a.getValues(i);for(let e=0,n=this._listKebab.length;e-1&&t.indexOf(this._listKebab[e])>-1&&(r.push(this._listCamel[e]),s.push(this._listKebab[e]));if(!r.length)return;const c=a.createElement("SPAN");for(let e=0,t=r.length;e0&&(e.insertBefore(u,d),u=c.cloneNode(!1),d=null,h=!0));return u.childNodes.length>0&&(e.insertBefore(u,d),h=!0),i.length||e.removeAttribute("style"),h},_setCommonListStyle:function(e,t){if(!a.isListCell(e))return;const n=a.getArrayItem((t||e).childNodes,(function(e){return!a.isBreak(e)}),!0);if(!(t=n[0])||n.length>1||1!==t.nodeType)return;const i=t.style,r=e.style,s=t.nodeName.toLowerCase();let l=!1;o._textTagsMap[s]===o._defaultCommand.bold.toLowerCase()&&(r.fontWeight="bold"),o._textTagsMap[s]===o._defaultCommand.italic.toLowerCase()&&(r.fontStyle="italic");const c=a.getValues(i);if(c.length>0)for(let e=0,t=this._listCamel.length;e-1&&(r[this._listCamel[e]]=i[this._listCamel[e]],i.removeProperty(this._listKebab[e]),l=!0);if(this._setCommonListStyle(e,t),l&&!i.length){const e=t.childNodes,n=t.parentNode,i=t.nextSibling;for(;e.length>0;)n.insertBefore(e[0],i);a.removeItem(t)}},_stripRemoveNode:function(e){const t=e.parentNode;if(!e||3===e.nodeType||!t)return;const n=e.childNodes;for(;n[0];)t.insertBefore(n[0],e);t.removeChild(e)},_util_getMaintainedNode:function(e,t,n){return!n||e?null:this.getParentElement(n,this._isMaintainedNode.bind(this))||(t?null:this.getParentElement(n,this._isSizeNode.bind(this)))},_util_isMaintainedNode:function(e,t,n){if(!n||e||1!==n.nodeType)return!1;const i=this._isMaintainedNode(n);return this.getParentElement(n,this._isMaintainedNode.bind(this))?i:i||!t&&this._isSizeNode(n)},_nodeChange_oneLine:function(e,t,n,i,o,r,s,c,u,d,h,p,f){let g=i.parentNode;for(;!(g.nextSibling||g.previousSibling||a.isFormatElement(g.parentNode)||a.isWysiwygDiv(g.parentNode))&&g.nodeName!==t.nodeName;)g=g.parentNode;if(!u&&g===r.parentNode&&g.nodeName===t.nodeName&&a.onlyZeroWidthSpace(i.textContent.slice(0,o))&&a.onlyZeroWidthSpace(r.textContent.slice(s))){const n=g.childNodes;let l=!0;for(let e,t,o,s,c=0,u=n.length;c0&&(n=t.test(e.style.cssText)),!n}if(function e(i,o){const r=i.childNodes;for(let i,s=0,l=r.length;s=k?N-k:S.data.length-k));if(E){const t=p(o);if(t&&t.parentNode!==e){let n=t,i=null;for(;n.parentNode!==e;){for(o=i=n.parentNode.cloneNode(!1);n.childNodes[0];)i.appendChild(n.childNodes[0]);n.appendChild(i),n=n.parentNode}n.parentNode.appendChild(t)}E=E.cloneNode(!1)}a.onlyZeroWidthSpace(r)||o.appendChild(r);const c=p(o);for(c&&(E=c),E&&(e=E),w=l,_=[],x="";w!==e&&w!==m&&null!==w;)i=f(w)?null:n(w),i&&1===w.nodeType&&B(w)&&(_.push(i),x+=w.style.cssText.substr(0,w.style.cssText.indexOf(":"))+"|"),w=w.parentNode;const u=_.pop()||s;for(C=w=u;_.length>0;)w=_.pop(),C.appendChild(w),C=w;if(t.appendChild(u),e.appendChild(t),E&&!p(T)&&(t=t.cloneNode(!1),v.appendChild(t),y.push(t)),S=s,k=0,A=!0,w!==s&&w.appendChild(S),!b)continue}if(L||l!==T){if(A){if(1===l.nodeType&&!a.isBreak(l)){a._isIgnoreNodeChange(l)?(v.appendChild(l.cloneNode(!0)),d||(t=t.cloneNode(!1),v.appendChild(t),y.push(t))):e(l,l);continue}w=l,_=[],x="";const r=[];for(;null!==w.parentNode&&w!==m&&w!==t;)i=L?w.cloneNode(!1):n(w),1===w.nodeType&&!a.isBreak(l)&&i&&B(w)&&(f(w)?E||r.push(i):_.push(i),x+=w.style.cssText.substr(0,w.style.cssText.indexOf(":"))+"|"),w=w.parentNode;_=_.concat(r);const s=_.pop()||l;for(C=w=s;_.length>0;)w=_.pop(),C.appendChild(w),C=w;if(!f(t.parentNode)||f(s)||a.onlyZeroWidthSpace(t)||(t=t.cloneNode(!1),v.appendChild(t),y.push(t)),L||E||!f(s))s===l?o=L?v:t:L?(v.appendChild(s),o=w):(t.appendChild(s),o=w);else{t=t.cloneNode(!1);const e=s.childNodes;for(let n=0,i=e.length;n0?w:t}if(E&&3===l.nodeType)if(p(l)){const e=a.getParentElement(o,function(e){return this._isMaintainedNode(e.parentNode)||e.parentNode===v}.bind(a));E.appendChild(e),t=e.cloneNode(!1),y.push(t),v.appendChild(t)}else E=null}u=l.cloneNode(!1),o.appendChild(u),1!==l.nodeType||a.isBreak(l)||(h=u),e(l,h)}else{E=p(l);const e=a.createTextNode(1===T.nodeType?"":T.substringData(N,T.length-N)),o=a.createTextNode(b||1===T.nodeType?"":T.substringData(0,N));if(E?E=E.cloneNode(!1):f(t.parentNode)&&!E&&(t=t.cloneNode(!1),v.appendChild(t),y.push(t)),!a.onlyZeroWidthSpace(e)){w=l,x="",_=[];const t=[];for(;w!==v&&w!==m&&null!==w;)1===w.nodeType&&B(w)&&(f(w)?t.push(w.cloneNode(!1)):_.push(w.cloneNode(!1)),x+=w.style.cssText.substr(0,w.style.cssText.indexOf(":"))+"|"),w=w.parentNode;for(_=_.concat(t),u=C=w=_.pop()||e;_.length>0;)w=_.pop(),C.appendChild(w),C=w;v.appendChild(u),w.textContent=e.data}if(E&&u){const e=p(u);e&&(E=e)}for(w=l,_=[],x="";w!==v&&w!==m&&null!==w;)i=f(w)?null:n(w),i&&1===w.nodeType&&B(w)&&(_.push(i),x+=w.style.cssText.substr(0,w.style.cssText.indexOf(":"))+"|"),w=w.parentNode;const r=_.pop()||o;for(C=w=r;_.length>0;)w=_.pop(),C.appendChild(w),C=w;E?((t=t.cloneNode(!1)).appendChild(r),E.insertBefore(t,E.firstChild),v.appendChild(E),y.push(t),E=null):t.appendChild(r),T=o,N=o.data.length,L=!0,!c&&d&&(t=o,o.textContent=a.zeroWidthSpace),w!==o&&w.appendChild(T)}}}(e,v),u&&!c&&!h.v)return{ancestor:e,startContainer:i,startOffset:o,endContainer:r,endOffset:s};if(c=c&&u)for(let e=0;e0,_=m.pop()||h;for(v=y=_;m.length>0;)y=m.pop(),v.appendChild(y),v=y;if(u(t.parentNode)&&!u(_)&&(t=t.cloneNode(!1),g.appendChild(t),f.push(t)),!b&&u(_)){t=t.cloneNode(!1);const e=_.childNodes;for(let n=0,i=e.length;n0;)y=m.pop(),v.appendChild(y),v=y;u!==o?(t.appendChild(u),o=y):o=t,a.isBreak(h)&&t.appendChild(h.cloneNode(!1)),e.appendChild(t),_=s,w=0,C=!0,o.appendChild(_)}}}(e,g),s&&!r&&!l.v)return{ancestor:e,container:i,offset:o,endContainer:d};if(r=r&&s)for(let e=0;e0&&u===d)return e.innerHTML=i.innerHTML,{ancestor:e,endContainer:n?a.getNodeFromPath(n,e):null}}r.v=!1;const l=e.cloneNode(!1),c=[t];let u=!0;if(function e(i,o){const r=i.childNodes;for(let i,d,h=0,p=r.length;h0&&(l.appendChild(t),t=t.cloneNode(!1)),d=p.cloneNode(!0),l.appendChild(d),l.appendChild(t),c.push(t),o=t,s&&p.contains(s)){const e=a.getNodePath(s,p);s=a.getNodeFromPath(e,d)}}}(e,t),u||o&&!i&&!r.v)return{ancestor:e,endContainer:s};if(l.appendChild(t),i&&o)for(let e=0;e0,d=g.pop()||l;for(y=m=d;g.length>0;)m=g.pop(),y.appendChild(m),y=m;if(u(t.parentNode)&&!u(d)&&(t=t.cloneNode(!1),f.insertBefore(t,f.firstChild),p.push(t)),!v&&u(d)){t=t.cloneNode(!1);const e=d.childNodes;for(let n=0,i=e.length;n0?m:t}else s?(t.insertBefore(d,t.firstChild),o=m):o=t;if(v&&3===l.nodeType)if(c(l)){const e=a.getParentElement(o,function(e){return this._isMaintainedNode(e.parentNode)||e.parentNode===f}.bind(a));v.appendChild(e),t=e.cloneNode(!1),p.push(t),f.insertBefore(t,f.firstChild)}else v=null}if(w||l!==b)i=w?n(l):l.cloneNode(!1),i&&(o.insertBefore(i,o.firstChild),1!==l.nodeType||a.isBreak(l)||(d=i)),e(l,d);else{v=c(l);const e=a.createTextNode(1===b.nodeType?"":b.substringData(_,b.length-_)),r=a.createTextNode(1===b.nodeType?"":b.substringData(0,_));if(v){v=v.cloneNode(!1);const e=c(o);if(e&&e.parentNode!==f){let t=e,n=null;for(;t.parentNode!==f;){for(o=n=t.parentNode.cloneNode(!1);t.childNodes[0];)n.appendChild(t.childNodes[0]);t.appendChild(n),t=t.parentNode}t.parentNode.insertBefore(e,t.parentNode.firstChild)}v=v.cloneNode(!1)}else u(t.parentNode)&&!v&&(t=t.cloneNode(!1),f.appendChild(t),p.push(t));for(a.onlyZeroWidthSpace(e)||o.insertBefore(e,o.firstChild),m=o,g=[];m!==f&&null!==m;)i=u(m)?null:n(m),i&&1===m.nodeType&&g.push(i),m=m.parentNode;const s=g.pop()||o;for(y=m=s;g.length>0;)m=g.pop(),y.appendChild(m),y=m;s!==o?(t.insertBefore(s,t.firstChild),o=m):o=t,a.isBreak(l)&&t.appendChild(l.cloneNode(!1)),v?(v.insertBefore(t,v.firstChild),f.insertBefore(v,f.firstChild),v=null):f.insertBefore(t,f.firstChild),b=r,_=r.data.length,w=!0,o.insertBefore(b,o.firstChild)}}}(e,f),s&&!r&&!l.v)return{ancestor:e,container:i,offset:o};if(r=r&&s)for(let e=0;e-1?null:a.createElement(n);let u=n;/^SUB$/i.test(n)&&l.indexOf("SUP")>-1?u="SUP":/^SUP$/i.test(n)&&l.indexOf("SUB")>-1&&(u="SUB"),this.nodeChange(c,this._commandMapStyles[n]||null,[u],!1),this.focus()}},removeFormat:function(){this.nodeChange(null,null,null,null)},indent:function(e){const t=this.getRange(),n=this.getSelectedElements(null),i=[],r="indent"!==e,s=o.rtl?"marginRight":"marginLeft";let l=t.startContainer,c=t.endContainer,u=t.startOffset,d=t.endOffset;for(let e,t,o=0,l=n.length;o0&&this.plugins.list.editInsideList.call(this,r,i),this.effectNode=null,this.setRange(l,u,c,d),this.history.push(!1)},toggleDisplayBlocks:function(){const t=e.element.wysiwyg;a.toggleClass(t,"se-show-block"),a.hasClass(t,"se-show-block")?a.addClass(this._styleCommandMap.showBlocks,"active"):a.removeClass(this._styleCommandMap.showBlocks,"active"),this._resourcesStateChange()},toggleCodeView:function(){const t=this._variable.isCodeView;this.controllersOff(),a.setDisabledButtons(!t,this.codeViewDisabledButtons),t?(a.isNonEditable(e.element.wysiwygFrame)||this._setCodeDataToEditor(),e.element.wysiwygFrame.scrollTop=0,e.element.code.style.display="none",e.element.wysiwygFrame.style.display="block",this._variable._codeOriginCssText=this._variable._codeOriginCssText.replace(/(\s?display(\s+)?:(\s+)?)[a-zA-Z]+(?=;)/,"display: none"),this._variable._wysiwygOriginCssText=this._variable._wysiwygOriginCssText.replace(/(\s?display(\s+)?:(\s+)?)[a-zA-Z]+(?=;)/,"display: block"),"auto"!==o.height||o.codeMirrorEditor||(e.element.code.style.height="0px"),this._variable.isCodeView=!1,this._variable.isFullScreen||(this._notHideToolbar=!1,/balloon|balloon-always/i.test(o.mode)&&(e.element._arrow.style.display="",this._isInline=!1,this._isBalloon=!0,d._hideToolbar())),this.nativeFocus(),a.removeClass(this._styleCommandMap.codeView,"active"),a.isNonEditable(e.element.wysiwygFrame)||(this.history.push(!1),this.history._resetCachingButton())):(this._setEditorDataToCodeView(),this._variable._codeOriginCssText=this._variable._codeOriginCssText.replace(/(\s?display(\s+)?:(\s+)?)[a-zA-Z]+(?=;)/,"display: block"),this._variable._wysiwygOriginCssText=this._variable._wysiwygOriginCssText.replace(/(\s?display(\s+)?:(\s+)?)[a-zA-Z]+(?=;)/,"display: none"),this._variable.isFullScreen?e.element.code.style.height="100%":"auto"!==o.height||o.codeMirrorEditor||(e.element.code.style.height=e.element.code.scrollHeight>0?e.element.code.scrollHeight+"px":"auto"),o.codeMirrorEditor&&o.codeMirrorEditor.refresh(),this._variable.isCodeView=!0,this._variable.isFullScreen||(this._notHideToolbar=!0,this._isBalloon&&(e.element._arrow.style.display="none",e.element.toolbar.style.left="",this._isInline=!0,this._isBalloon=!1,d._showToolbarInline())),this._variable._range=null,e.element.code.focus(),a.addClass(this._styleCommandMap.codeView,"active")),this._checkPlaceholder(),this.isReadOnly&&a.setDisabledButtons(!0,this.resizingDisabledButtons),"function"==typeof h.toggleCodeView&&h.toggleCodeView(this._variable.isCodeView,this)},_setCodeDataToEditor:function(){const t=this._getCodeView();if(o.fullPage){const e=this._parser.parseFromString(t,"text/html");if(!this.options.__allowedScriptTag){const t=e.head.children;for(let n=0,i=t.length;n0?this.convertContentsForEditor(t):"<"+o.defaultTag+">
"},_setEditorDataToCodeView:function(){const t=this.convertHTMLForCodeView(e.element.wysiwyg,!1);let n="";if(o.fullPage){const e=a.getAttributesToString(this._wd.body,null);n="\n\n"+this._wd.head.outerHTML.replace(/>(?!\n)/g,">\n")+"\n"+t+"\n"}else n=t;e.element.code.style.display="block",e.element.wysiwygFrame.style.display="none",this._setCodeView(n)},toggleFullScreen:function(t){const n=e.element.topArea,i=e.element.toolbar,r=e.element.editorArea,u=e.element.wysiwygFrame,p=e.element.code,f=this._variable;this.controllersOff();const g="none"===i.style.display||this._isInline&&!this._inlineToolbarAttr.isShow;f.isFullScreen?(f.isFullScreen=!1,u.style.cssText=f._wysiwygOriginCssText,p.style.cssText=f._codeOriginCssText,i.style.cssText="",r.style.cssText=f._editorAreaOriginCssText,n.style.cssText=f._originCssText,s.body.style.overflow=f._bodyOverflow,"auto"!==o.height||o.codeMirrorEditor||d._codeViewAutoHeight(),o.toolbarContainer&&o.toolbarContainer.appendChild(i),o.stickyToolbar>-1&&a.removeClass(i,"se-toolbar-sticky"),f._fullScreenAttrs.sticky&&!o.toolbarContainer&&(f._fullScreenAttrs.sticky=!1,e.element._stickyDummy.style.display="block",a.addClass(i,"se-toolbar-sticky")),this._isInline=f._fullScreenAttrs.inline,this._isBalloon=f._fullScreenAttrs.balloon,this._isInline&&d._showToolbarInline(),o.toolbarContainer&&a.removeClass(i,"se-toolbar-balloon"),d.onScroll_window(),t&&a.changeElement(t.firstElementChild,c.expansion),e.element.topArea.style.marginTop="",a.removeClass(this._styleCommandMap.fullScreen,"active")):(f.isFullScreen=!0,f._fullScreenAttrs.inline=this._isInline,f._fullScreenAttrs.balloon=this._isBalloon,(this._isInline||this._isBalloon)&&(this._isInline=!1,this._isBalloon=!1),o.toolbarContainer&&e.element.relative.insertBefore(i,r),n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100%",n.style.maxWidth="100%",n.style.height="100%",n.style.zIndex="2147483647",""!==e.element._stickyDummy.style.display&&(f._fullScreenAttrs.sticky=!0,e.element._stickyDummy.style.display="none",a.removeClass(i,"se-toolbar-sticky")),f._bodyOverflow=s.body.style.overflow,s.body.style.overflow="hidden",f._editorAreaOriginCssText=r.style.cssText,f._wysiwygOriginCssText=u.style.cssText,f._codeOriginCssText=p.style.cssText,r.style.cssText=i.style.cssText="",u.style.cssText=(u.style.cssText.match(/\s?display(\s+)?:(\s+)?[a-zA-Z]+;/)||[""])[0]+o._editorStyles.editor,p.style.cssText=(p.style.cssText.match(/\s?display(\s+)?:(\s+)?[a-zA-Z]+;/)||[""])[0],i.style.width=u.style.height=p.style.height="100%",i.style.position="relative",i.style.display="block",f.innerHeight_fullScreen=l.innerHeight-i.offsetHeight,r.style.height=f.innerHeight_fullScreen-o.fullScreenOffset+"px",t&&a.changeElement(t.firstElementChild,c.reduction),o.iframe&&"auto"===o.height&&(r.style.overflow="auto",this._iframeAutoHeight()),e.element.topArea.style.marginTop=o.fullScreenOffset+"px",a.addClass(this._styleCommandMap.fullScreen,"active")),g&&h.toolbar.hide(),"function"==typeof h.toggleFullScreen&&h.toggleFullScreen(this._variable.isFullScreen,this)},print:function(){const e=a.createElement("IFRAME");e.style.display="none",s.body.appendChild(e);const t=o.printTemplate?o.printTemplate.replace(/\{\{\s*contents\s*\}\}/i,this.getContents(!0)):this.getContents(!0),n=a.getIframeDocument(e),i=this._wd;if(o.iframe){const e=null!==o._printClass?'class="'+o._printClass+'"':o.fullPage?a.getAttributesToString(i.body,["contenteditable"]):'class="'+o._editableClass+'"';n.write(""+i.head.innerHTML+""+t+"")}else{const e=s.head.getElementsByTagName("link"),i=s.head.getElementsByTagName("style");let r="";for(let t=0,n=e.length;t"+r+''+t+"")}this.showLoading(),l.setTimeout((function(){try{if(e.focus(),a.isIE_Edge||a.isChromium||s.documentMode||l.StyleMedia)try{e.contentWindow.document.execCommand("print",!1,null)}catch(t){e.contentWindow.print()}else e.contentWindow.print()}catch(e){throw Error("[SUNEDITOR.core.print.fail] error: "+e)}finally{u.closeLoading(),a.removeItem(e)}}),1e3)},preview:function(){u.submenuOff(),u.containerOff(),u.controllersOff();const e=o.previewTemplate?o.previewTemplate.replace(/\{\{\s*contents\s*\}\}/i,this.getContents(!0)):this.getContents(!0),t=l.open("","_blank");t.mimeType="text/html";const n=this._wd;if(o.iframe){const i=null!==o._printClass?'class="'+o._printClass+'"':o.fullPage?a.getAttributesToString(n.body,["contenteditable"]):'class="'+o._editableClass+'"';t.document.write(""+n.head.innerHTML+""+e+"")}else{const n=s.head.getElementsByTagName("link"),r=s.head.getElementsByTagName("style");let l="";for(let e=0,t=n.length;e'+i.toolbar.preview+""+l+''+e+"")}},setDir:function(t){const n="rtl"===t,r=this._prevRtl!==n;this._prevRtl=o.rtl=n,r&&(this.plugins.align&&this.plugins.align.exchangeDir.call(this),e.tool.indent&&a.changeElement(e.tool.indent.firstElementChild,c.indent),e.tool.outdent&&a.changeElement(e.tool.outdent.firstElementChild,c.outdent));const s=e.element;n?(a.addClass(s.topArea,"se-rtl"),a.addClass(s.wysiwygFrame,"se-rtl")):(a.removeClass(s.topArea,"se-rtl"),a.removeClass(s.wysiwygFrame,"se-rtl"));const l=a.getListChildren(s.wysiwyg,(function(e){return a.isFormatElement(e)&&(e.style.marginRight||e.style.marginLeft||e.style.textAlign)}));for(let e,t,n,i=0,o=l.length;i"+this._wd.head.outerHTML+""+i.innerHTML+""}return i.innerHTML},getFullContents:function(e){return'
'+this.getContents(e)+"
"},_makeLine:function(e,t){const n=o.defaultTag;if(1===e.nodeType){if(this.__disallowedTagNameRegExp.test(e.nodeName))return"";if(/__se__tag/.test(e.className))return e.outerHTML;const i=a.getListChildNodes(e,(function(e){return a.isSpanWithoutAttr(e)&&!a.getParentElement(e,a.isNotCheckingNode)}))||[];for(let e=i.length-1;e>=0;e--)i[e].outerHTML=i[e].innerHTML;return!t||a.isFormatElement(e)||a.isRangeFormatElement(e)||a.isComponent(e)||a.isFigures(e)||a.isAnchor(e)&&a.isMedia(e.firstElementChild)?a.isSpanWithoutAttr(e)?e.innerHTML:e.outerHTML:"<"+n+">"+(a.isSpanWithoutAttr(e)?e.innerHTML:e.outerHTML)+""}if(3===e.nodeType){if(!t)return a._HTMLConvertor(e.textContent);const i=e.textContent.split(/\n/g);let o="";for(let e,t=0,r=i.length;t0&&(o+="<"+n+">"+a._HTMLConvertor(e)+"");return o}return 8===e.nodeType&&this._allowHTMLComments?"\x3c!--"+e.textContent.trim()+"--\x3e":""},_tagConvertor:function(e){if(!this._disallowedTextTagsRegExp)return e;const t=o._textTagsMap;return e.replace(this._disallowedTextTagsRegExp,(function(e,n,i,o){return n+("string"==typeof t[i]?t[i]:i)+(o?" "+o:"")}))},_deleteDisallowedTags:function(e){return e=e.replace(this.__disallowedTagsRegExp,"").replace(/<[a-z0-9]+\:[a-z0-9]+[^>^\/]*>[^>]*<\/[a-z0-9]+\:[a-z0-9]+>/gi,""),/\bfont\b/i.test(this.options._editorTagsWhitelist)||(e=e.replace(/(<\/?)font(\s?)/gi,"$1span$2")),e.replace(this.editorTagsWhitelistRegExp,"").replace(this.editorTagsBlacklistRegExp,"")},_convertFontSize:function(e,t){const n=this._w.Math,i=t.match(/(\d+(?:\.\d+)?)(.+)/),o=i?1*i[1]:a.fontValueMap[t],r=i?i[2]:"rem";let s=o;switch(/em/.test(r)?s=n.round(o/.0625):"pt"===r?s=n.round(1.333*o):"%"===r&&(s=o/100),e){case"em":case"rem":case"%":return(.0625*s).toFixed(2)+e;case"pt":return n.floor(s/1.333)+e;default:return s+e}},_cleanStyle:function(e,t,n){let i=(e.match(/style\s*=\s*(?:"|')[^"']*(?:"|')/)||[])[0];if(/span/i.test(n)&&!i&&(e.match(/<[^\s]+\s(.+)/)||[])[1]){const t=(e.match(/\ssize="([^"]+)"/i)||[])[1],n=(e.match(/\sface="([^"]+)"/i)||[])[1],o=(e.match(/\scolor="([^"]+)"/i)||[])[1];(t||n||o)&&(i='style="'+(t?"font-size:"+this.util.getNumber(t/3.333,1)+"rem;":"")+(n?"font-family:"+n+";":"")+(o?"color:"+o+";":"")+'"')}if(i){t||(t=[]);const e=i.replace(/"/g,"").match(this._cleanStyleRegExp[n]);if(e){const n=[];for(let t,i=0,r=e.length;i0&&t.push('style="'+n.join(";")+'"')}}return t},_cleanTags:function(e,t,n){if(/^<[a-z0-9]+\:[a-z0-9]+/i.test(t))return t;let i=null;const o=n.match(/(?!<)[a-zA-Z0-9\-]+/)[0].toLowerCase(),r=this._attributesTagsBlacklist[o];t=t.replace(/\s(?:on[a-z]+)\s*=\s*(")[^"]*\1/gi,""),t=r?t.replace(r,""):t.replace(this._attributesBlacklistRegExp,"");const s=this._attributesTagsWhitelist[o];if(i=s?t.match(s):t.match(e?this._attributesWhitelistRegExp:this._attributesWhitelistRegExp_all_data),e||"span"===o||"li"===o||this._cleanStyleRegExp[o])if("a"===o){const e=t.match(/(?:(?:id|name)\s*=\s*(?:"|')[^"']*(?:"|'))/g);e&&(i||(i=[]),i.push(e[0]))}else i&&/style=/i.test(i.toString())||("span"!==o&&"li"!==o||(i=this._cleanStyle(t,i,"span")),this._cleanStyleRegExp[o]?i=this._cleanStyle(t,i,o):/^(P|DIV|H[1-6]|PRE)$/i.test(o)&&(i=this._cleanStyle(t,i,"format")));else{const e=t.match(/style\s*=\s*(?:"|')[^"']*(?:"|')/);e&&!i?i=[e[0]]:e&&!i.some((function(e){return/^style/.test(e.trim())}))&&i.push(e[0])}if(a.isFigures(o)){const e=t.match(/style\s*=\s*(?:"|')[^"']*(?:"|')/);i||(i=[]),e&&i.push(e[0])}if(i)for(let e,t=0,o=i.length;t"+(n.innerHTML.trim()||"
")+"":a.isRangeFormatElement(n)&&!a.isTable(n)?t+=this._convertListCell(n):t+="
  • "+n.outerHTML+"
  • ":t+="
  • "+(n.textContent||"
    ")+"
  • ";return t},_isFormatData:function(e){let t=!1;for(let n,i=0,o=e.length;i]*(?=>)/g,this._cleanTags.bind(this,!0)).replace(/$/i,"");const i=s.createRange().createContextualFragment(e);try{a._consistencyCheckOfHTML(i,this._htmlCheckWhitelistRegExp,this._htmlCheckBlacklistRegExp,this._classNameFilter)}catch(e){console.warn("[SUNEDITOR.cleanHTML.consistencyCheck.fail] "+e)}if(this.managedTagsInfo&&this.managedTagsInfo.query){const e=i.querySelectorAll(this.managedTagsInfo.query);for(let t,n,i=0,o=e.length;i]*(?=>)/g,this._cleanTags.bind(this,!0));const t=s.createRange().createContextualFragment(e);try{a._consistencyCheckOfHTML(t,this._htmlCheckWhitelistRegExp,this._htmlCheckBlacklistRegExp,this._classNameFilter)}catch(e){console.warn("[SUNEDITOR.convertContentsForEditor.consistencyCheck.fail] "+e)}if(this.managedTagsInfo&&this.managedTagsInfo.query){const e=t.querySelectorAll(this.managedTagsInfo.query);for(let t,n,i=0,o=e.length;i
    ":(i=a.htmlRemoveWhiteSpace(i),this._tagConvertor(i))},convertHTMLForCodeView:function(e,t){let n="";const i=l.RegExp,o=new i("^(BLOCKQUOTE|PRE|TABLE|THEAD|TBODY|TR|TH|TD|OL|UL|IMG|IFRAME|VIDEO|AUDIO|FIGURE|FIGCAPTION|HR|BR|CANVAS|SELECT)$","i"),r="string"==typeof e?s.createRange().createContextualFragment(e):e,c=function(e){return this.isFormatElement(e)||this.isComponent(e)}.bind(a),u=t?"":"\n";let d=t?0:1*this._variable.codeIndent;return d=d>0?new l.Array(d+1).join(" "):"",function e(t,r){const s=t.childNodes,h=o.test(t.nodeName),p=h?r:"";for(let f,g,m,y,v,b,_=0,w=s.length;_]*>","i"))[0]+g,e(f,r+d),n+=(/\n$/.test(n)?b:"")+""+(m||g||h||/^(TH|TD)$/i.test(f.nodeName)?u:"")):n+=(new l.XMLSerializer).serializeToString(f):n+=(/^HR$/i.test(f.nodeName)?u:"")+(/^PRE$/i.test(f.parentElement.nodeName)&&/^BR$/i.test(f.nodeName)?"":p)+f.outerHTML+g:a.isList(f.parentElement)||(n+=a._HTMLConvertor(/^\n+$/.test(f.data)?"":f.data)):n+="\n\x3c!-- "+f.textContent.trim()+" --\x3e"+g}(r,""),n.trim()+u},addDocEvent:function(e,t,n){s.addEventListener(e,t,n),o.iframe&&this._wd.addEventListener(e,t)},removeDocEvent:function(e,t){s.removeEventListener(e,t),o.iframe&&this._wd.removeEventListener(e,t)},_charCount:function(e){const t=o.maxCharCount,n=o.charCounterType;let i=0;if(e&&(i=this.getCharLength(e,n)),this._setCharCount(),t>0){let e=!1;const o=h.getCharCount(n);if(o>t){if(e=!0,i>0){this._editorRange();const e=this.getRange(),n=e.endOffset-1,i=this.getSelectionNode().textContent,r=e.endOffset-(o-t);this.getSelectionNode().textContent=i.slice(0,r<0?0:r)+i.slice(e.endOffset,i.length),this.setRange(e.endContainer,n,e.endContainer,n)}}else o+i>t&&(e=!0);if(e&&(this._callCounterBlink(),i>0))return!1}return!0},checkCharCount:function(e,t){if(o.maxCharCount){const n=t||o.charCounterType,i=this.getCharLength("string"==typeof e?e:this._charTypeHTML&&1===e.nodeType?e.outerHTML:e.textContent,n);if(i>0&&i+h.getCharCount(n)>o.maxCharCount)return this._callCounterBlink(),!1}return!0},getCharLength:function(e,t){return/byte/.test(t)?a.getByteLength(e):e.length},resetResponsiveToolbar:function(){u.controllersOff();const t=d._responsiveButtonSize;if(t){let n=0;n=(u._isBalloon||u._isInline)&&"auto"===o.toolbarWidth?e.element.topArea.offsetWidth:e.element.toolbar.offsetWidth;let i="default";for(let e=1,o=t.length;e-1||!a.hasOwn(t,o)||(i.indexOf(o)>-1?n[o].active.call(this,null):t.OUTDENT&&/^OUTDENT$/i.test(o)?a.isImportantDisabled(t.OUTDENT)||t.OUTDENT.setAttribute("disabled",!0):t.INDENT&&/^INDENT$/i.test(o)?a.isImportantDisabled(t.INDENT)||t.INDENT.removeAttribute("disabled"):a.removeClass(t[o],"active"))},_init:function(i,r){const c=l.RegExp;this._ww=o.iframe?e.element.wysiwygFrame.contentWindow:l,this._wd=s,this._charTypeHTML="byte-html"===o.charCounterType,this.wwComputedStyle=l.getComputedStyle(e.element.wysiwyg),this._editorHeight=e.element.wysiwygFrame.offsetHeight,this._editorHeightPadding=a.getNumber(this.wwComputedStyle.getPropertyValue("padding-top"))+a.getNumber(this.wwComputedStyle.getPropertyValue("padding-bottom")),this._classNameFilter=function(e){return this.test(e)?e:""}.bind(o.allowedClassNames);const u=o.__allowedScriptTag?"":"script|";if(this.__scriptTagRegExp=new c("<(script)[^>]*>([\\s\\S]*?)<\\/\\1>|]*\\/?>","gi"),this.__disallowedTagsRegExp=new c("<("+u+"style)[^>]*>([\\s\\S]*?)<\\/\\1>|<("+u+"style)[^>]*\\/?>","gi"),this.__disallowedTagNameRegExp=new c("^("+u+"meta|link|style|[a-z]+:[a-z]+)$","i"),this.__allowedScriptRegExp=new c("^"+(o.__allowedScriptTag?"script":"")+"$","i"),!o.iframe&&"function"==typeof l.ShadowRoot){let t=e.element.wysiwygFrame;for(;t;){if(t.shadowRoot){this._shadowRoot=t.shadowRoot;break}if(t instanceof l.ShadowRoot){this._shadowRoot=t;break}t=t.parentNode}this._shadowRoot&&(this._shadowRootControllerEventTarget=[])}const d=l.Object.keys(o._textTagsMap),h=o.addTagsWhitelist?o.addTagsWhitelist.split("|").filter((function(e){return/b|i|ins|s|strike/i.test(e)})):[];for(let e=0;e^<]+)?\\s*(?=>)","gi");const p=function(e,t){return e?"*"===e?"[a-z-]+":t?e+"|"+t:e:"^"},f="contenteditable|colspan|rowspan|target|href|download|rel|src|alt|class|type|controls|origin-size";this._allowHTMLComments=o._editorTagsWhitelist.indexOf("//")>-1||"*"===o._editorTagsWhitelist,this._htmlCheckWhitelistRegExp=new c("^("+p(o._editorTagsWhitelist.replace("|//",""),"")+")$","i"),this._htmlCheckBlacklistRegExp=new c("^("+(o.tagsBlacklist||"^")+")$","i"),this.editorTagsWhitelistRegExp=a.createTagsWhitelist(p(o._editorTagsWhitelist.replace("|//","|\x3c!--|--\x3e"),"")),this.editorTagsBlacklistRegExp=a.createTagsBlacklist(o.tagsBlacklist.replace("|//","|\x3c!--|--\x3e")),this.pasteTagsWhitelistRegExp=a.createTagsWhitelist(p(o.pasteTagsWhitelist,"")),this.pasteTagsBlacklistRegExp=a.createTagsBlacklist(o.pasteTagsBlacklist);const g='\\s*=\\s*(")[^"]*\\1',m=o.attributesWhitelist;let y={},v="";if(m)for(let e in m)a.hasOwn(m,e)&&!/^on[a-z]+$/i.test(m[e])&&("all"===e?v=p(m[e],f):y[e]=new c("\\s(?:"+p(m[e],"")+")"+g,"ig"));this._attributesWhitelistRegExp=new c("\\s(?:"+(v||f+"|data-format|data-size|data-file-size|data-file-name|data-origin|data-align|data-image-link|data-rotate|data-proportion|data-percentage|data-exp|data-font-size")+")"+g,"ig"),this._attributesWhitelistRegExp_all_data=new c("\\s(?:"+(v||f)+"|data-[a-z0-9\\-]+)"+g,"ig"),this._attributesTagsWhitelist=y;const b=o.attributesBlacklist;if(y={},v="",b)for(let e in b)a.hasOwn(b,e)&&("all"===e?v=p(b[e],""):y[e]=new c("\\s(?:"+p(b[e],"")+")"+g,"ig"));this._attributesBlacklistRegExp=new c("\\s(?:"+(v||"^")+")"+g,"ig"),this._attributesTagsBlacklist=y,this._isInline=/inline/i.test(o.mode),this._isBalloon=/balloon|balloon-always/i.test(o.mode),this._isBalloonAlways=/balloon-always/i.test(o.mode),this._cachingButtons(),this._fileInfoPluginsCheck=[],this._fileInfoPluginsReset=[],this.managedTagsInfo={query:"",map:{}};const _=[];this.activePlugins=[],this._fileManager.tags=[],this._fileManager.pluginMap={};let w,C,x=[];for(let e in n)if(a.hasOwn(n,e)){if(w=n[e],C=t[e],(w.active||w.action)&&C&&this.callPlugin(e,null,C),"function"==typeof w.checkFileInfo&&"function"==typeof w.resetFileInfo&&(this.callPlugin(e,null,C),this._fileInfoPluginsCheck.push(w.checkFileInfo.bind(this)),this._fileInfoPluginsReset.push(w.resetFileInfo.bind(this))),l.Array.isArray(w.fileTags)){const t=w.fileTags;this.callPlugin(e,null,C),this._fileManager.tags=this._fileManager.tags.concat(t),x.push(e);for(let n=0,i=t.length;nc&&(u=u.slice(0,c),l&&l.setAttribute("disabled",!0)),u[c]=o?{contents:n,s:{path:i.getNodePath(o.startContainer,null,null),offset:o.startOffset},e:{path:i.getNodePath(o.endContainer,null,null),offset:o.endOffset}}:{contents:n,s:{path:[0,0],offset:[0,0]},e:{path:0,offset:0}},1===c&&s&&s.removeAttribute("disabled"),e._setCharCount(),t()}return{stack:u,push:function(t){n.setTimeout(e._resourcesStateChange.bind(e));const i="number"==typeof t?t>0?t:0:t?o:0;i&&!a||(n.clearTimeout(a),i)?a=n.setTimeout((function(){n.clearTimeout(a),a=null,h()}),i):h()},undo:function(){c>0&&(c--,d())},redo:function(){u.length-1>c&&(c++,d())},go:function(e){c=e<0?u.length-1:e,d()},getCurrentIndex:function(){return c},reset:function(n){s&&s.setAttribute("disabled",!0),l&&l.setAttribute("disabled",!0),e._variable.isChanged=!1,e.context.tool.save&&e.context.tool.save.setAttribute("disabled",!0),u.splice(0),c=0,u[c]={contents:e.getContents(!0),s:{path:[0,0],offset:0},e:{path:[0,0],offset:0}},n||t()},_resetCachingButton:function(){r=e.context.element,s=e.context.tool.undo,l=e.context.tool.redo,0===c?(s&&s.setAttribute("disabled",!0),l&&c===u.length-1&&l.setAttribute("disabled",!0),e._variable.isChanged=!1,e.context.tool.save&&e.context.tool.save.setAttribute("disabled",!0)):c===u.length-1&&l&&l.setAttribute("disabled",!0)},_destroy:function(){a&&n.clearTimeout(a),u=null}}}(this,this._onChange_historyStack.bind(this)),this.addModule([Gn]),o.iframe&&(this._wd=e.element.wysiwygFrame.contentDocument,e.element.wysiwyg=this._wd.body,o._editorStyles.editor&&(e.element.wysiwyg.style.cssText=o._editorStyles.editor),"auto"===o.height&&(this._iframeAuto=this._wd.body)),this._initWysiwygArea(i,r)},_cachingButtons:function(){this.codeViewDisabledButtons=e.element._buttonTray.querySelectorAll('.se-menu-list button[data-display]:not([class~="se-code-view-enabled"]):not([data-display="MORE"])'),this.resizingDisabledButtons=e.element._buttonTray.querySelectorAll('.se-menu-list button[data-display]:not([class~="se-resizing-enabled"]):not([data-display="MORE"])');const t=e.tool,n=this.commandMap;n.INDENT=t.indent,n.OUTDENT=t.outdent,n[o.textTags.bold.toUpperCase()]=t.bold,n[o.textTags.underline.toUpperCase()]=t.underline,n[o.textTags.italic.toUpperCase()]=t.italic,n[o.textTags.strike.toUpperCase()]=t.strike,n[o.textTags.sub.toUpperCase()]=t.subscript,n[o.textTags.sup.toUpperCase()]=t.superscript,this._styleCommandMap={fullScreen:t.fullScreen,showBlocks:t.showBlocks,codeView:t.codeView},this._saveButtonStates()},_initWysiwygArea:function(t,n){e.element.wysiwyg.innerHTML=t?n:this.convertContentsForEditor(("string"==typeof n?n:/^TEXTAREA$/i.test(e.element.originElement.nodeName)?e.element.originElement.value:e.element.originElement.innerHTML)||"")},_resourcesStateChange:function(){this._iframeAutoHeight(),this._checkPlaceholder()},_onChange_historyStack:function(){this.hasFocus&&d._applyTagEffects(),this._variable.isChanged=!0,e.tool.save&&e.tool.save.removeAttribute("disabled"),h.onChange&&h.onChange(this.getContents(!0),this),"block"===e.element.toolbar.style.display&&d._showToolbarBalloon()},_iframeAutoHeight:function(){this._iframeAuto?l.setTimeout((function(){const t=u._iframeAuto.offsetHeight;e.element.wysiwygFrame.style.height=t+"px",a.isResizeObserverSupported||u.__callResizeFunction(t,null)})):a.isResizeObserverSupported||u.__callResizeFunction(e.element.wysiwygFrame.offsetHeight,null)},__callResizeFunction:function(e,t){e=-1===e?t.borderBoxSize&&t.borderBoxSize[0]?t.borderBoxSize[0].blockSize:t.contentRect.height+this._editorHeightPadding:e,this._editorHeight!==e&&("function"==typeof h.onResizeEditor&&h.onResizeEditor(e,this._editorHeight,u,t),this._editorHeight=e)},_checkPlaceholder:function(){if(this._placeholder){if(this._variable.isCodeView)return void(this._placeholder.style.display="none");const t=e.element.wysiwyg;!a.onlyZeroWidthSpace(t.textContent)||t.querySelector(a._allowedEmptyNodeList)||(t.innerText.match(/\n/g)||"").length>1?this._placeholder.style.display="none":this._placeholder.style.display="block"}},_setDefaultFormat:function(e){if(this._fileManager.pluginRegExp.test(this.currentControllerName))return;const t=this.getRange(),n=t.commonAncestorContainer,i=t.startContainer,r=a.getRangeFormatElement(n,null);let s,l,c;const u=a.getParentElement(n,a.isComponent);if(!u||a.isTable(u)){if(1===n.nodeType&&"true"===n.getAttribute("data-se-embed")){let e=n.nextElementSibling;return a.isFormatElement(e)||(e=this.appendFormatTag(n,o.defaultTag)),void this.setRange(e.firstChild,0,e.firstChild,0)}if(!a.isRangeFormatElement(i)&&!a.isWysiwygDiv(i)||!a.isComponent(i.children[t.startOffset])&&!a.isComponent(i.children[t.startOffset-1])){if(a.getParentElement(n,a.isNotCheckingNode))return null;if(r)return c=a.createElement(e||o.defaultTag),c.innerHTML=r.innerHTML,0===c.childNodes.length&&(c.innerHTML=a.zeroWidthSpace),r.innerHTML=c.outerHTML,c=r.firstChild,s=a.getEdgeChildNodes(c,null).sc,s||(s=a.createTextNode(a.zeroWidthSpace),c.insertBefore(s,c.firstChild)),l=s.textContent.length,void this.setRange(s,l,s,l);if(a.isRangeFormatElement(n)&&n.childNodes.length<=1){let e=null;return 1===n.childNodes.length&&a.isBreak(n.firstChild)?e=n.firstChild:(e=a.createTextNode(a.zeroWidthSpace),n.appendChild(e)),void this.setRange(e,1,e,1)}try{if(3===n.nodeType&&(c=a.createElement(e||o.defaultTag),n.parentNode.insertBefore(c,n),c.appendChild(n)),a.isBreak(c.nextSibling)&&a.removeItem(c.nextSibling),a.isBreak(c.previousSibling)&&a.removeItem(c.previousSibling),a.isBreak(s)){const e=a.createTextNode(a.zeroWidthSpace);s.parentNode.insertBefore(e,s),s=e}}catch(t){this.execCommand("formatBlock",!1,e||o.defaultTag),this.removeRange(),this._editorRange()}if(c&&(a.isBreak(c.nextSibling)&&a.removeItem(c.nextSibling),a.isBreak(c.previousSibling)&&a.removeItem(c.previousSibling),a.isBreak(s))){const e=a.createTextNode(a.zeroWidthSpace);s.parentNode.insertBefore(e,s),s=e}this.effectNode=null,this.nativeFocus()}}},_setOptionsInit:function(t,n){this.context=e=Yn(t.originElement,this._getConstructed(t),o),this._componentsInfoReset=!0,this._editorInit(!0,n)},_editorInit:function(t,n){this._init(t,n),d._addEvent(),this._setCharCount(),d._offStickyToolbar(),d.onResize_window(),e.element.toolbar.style.visibility="";const i=o.frameAttrbutes;for(let t in i)e.element.wysiwyg.setAttribute(t,i[t]);this._checkComponents(),this._componentsInfoInit=!1,this._componentsInfoReset=!1,this.history.reset(!0),l.setTimeout((function(){"function"==typeof u._resourcesStateChange&&(d._resizeObserver&&d._resizeObserver.observe(e.element.wysiwygFrame),d._toolbarObserver&&d._toolbarObserver.observe(e.element._toolbarShadow),u._resourcesStateChange(),"function"==typeof h.onload&&h.onload(u,t))}))},_getConstructed:function(e){return{_top:e.topArea,_relative:e.relative,_toolBar:e.toolbar,_toolbarShadow:e._toolbarShadow,_menuTray:e._menuTray,_editorArea:e.editorArea,_wysiwygArea:e.wysiwygFrame,_codeArea:e.code,_placeholder:e.placeholder,_resizingBar:e.resizingBar,_navigation:e.navigation,_charCounter:e.charCounter,_charWrapper:e.charWrapper,_loading:e.loading,_lineBreaker:e.lineBreaker,_lineBreaker_t:e.lineBreaker_t,_lineBreaker_b:e.lineBreaker_b,_resizeBack:e.resizeBackground,_stickyDummy:e._stickyDummy,_arrow:e._arrow}}},d={_IEisComposing:!1,_lineBreakerBind:null,_responsiveCurrentSize:"default",_responsiveButtonSize:null,_responsiveButtons:null,_cursorMoveKeyCode:new l.RegExp("^(8|3[2-9]|40|46)$"),_directionKeyCode:new l.RegExp("^(8|13|3[2-9]|40|46)$"),_nonTextKeyCode:new l.RegExp("^(8|13|1[6-9]|20|27|3[3-9]|40|45|46|11[2-9]|12[0-3]|144|145)$"),_historyIgnoreKeyCode:new l.RegExp("^(1[6-9]|20|27|3[3-9]|40|45|11[2-9]|12[0-3]|144|145)$"),_onButtonsCheck:new l.RegExp("^("+l.Object.keys(o._textTagsMap).join("|")+")$","i"),_frontZeroWidthReg:new l.RegExp(a.zeroWidthSpace+"+",""),_keyCodeShortcut:{65:"A",66:"B",83:"S",85:"U",73:"I",89:"Y",90:"Z",219:"[",221:"]"},_shortcutCommand:function(e,t){let n=null;const i=d._keyCodeShortcut[e];switch(i){case"A":n="selectAll";break;case"B":-1===o.shortcutsDisable.indexOf("bold")&&(n="bold");break;case"S":t&&-1===o.shortcutsDisable.indexOf("strike")?n="strike":t||-1!==o.shortcutsDisable.indexOf("save")||(n="save");break;case"U":-1===o.shortcutsDisable.indexOf("underline")&&(n="underline");break;case"I":-1===o.shortcutsDisable.indexOf("italic")&&(n="italic");break;case"Z":-1===o.shortcutsDisable.indexOf("undo")&&(n=t?"redo":"undo");break;case"Y":-1===o.shortcutsDisable.indexOf("undo")&&(n="redo");break;case"[":-1===o.shortcutsDisable.indexOf("indent")&&(n=o.rtl?"indent":"outdent");break;case"]":-1===o.shortcutsDisable.indexOf("indent")&&(n=o.rtl?"outdent":"indent")}return n?(u.commandHandler(u.commandMap[n],n),!0):!!i},_applyTagEffects:function(){let t=u.getSelectionNode();if(t===u.effectNode)return;u.effectNode=t;const i=o.rtl?"marginRight":"marginLeft",r=u.commandMap,s=d._onButtonsCheck,l=[],c=[],h=u.activePlugins,p=h.length;let f="";for(;t.firstChild;)t=t.firstChild;for(let e=t;!a.isWysiwygDiv(e)&&e;e=e.parentNode)if(1===e.nodeType&&!a.isBreak(e)){if(f=e.nodeName.toUpperCase(),c.push(f),!u.isReadOnly)for(let t,i=0;i0)&&(l.push("OUTDENT"),r.OUTDENT.removeAttribute("disabled")),-1===l.indexOf("INDENT")&&r.INDENT&&!a.isImportantDisabled(r.INDENT)&&(l.push("INDENT"),a.isListCell(e)&&!e.previousElementSibling?r.INDENT.setAttribute("disabled",!0):r.INDENT.removeAttribute("disabled"))):s&&s.test(f)&&(l.push(f),a.addClass(r[f],"active"))}u._setKeyEffect(l),u._variable.currentNodes=c.reverse(),u._variable.currentNodesMap=l,o.showPathLabel&&(e.element.navigation.textContent=u._variable.currentNodes.join(" > "))},_buttonsEventHandler:function(e){let t=e.target;if(u._bindControllersOff&&e.stopPropagation(),/^(input|textarea|select|option)$/i.test(t.nodeName)?u._antiBlur=!1:e.preventDefault(),a.getParentElement(t,".se-submenu"))e.stopPropagation(),u._notHideToolbar=!0;else{let n=t.getAttribute("data-command"),i=t.className;for(;!n&&!/se-menu-list/.test(i)&&!/sun-editor-common/.test(i);)t=t.parentNode,n=t.getAttribute("data-command"),i=t.className;n!==u._submenuName&&n!==u._containerName||e.stopPropagation()}},addGlobalEvent:(e,t,n)=>(o.iframe&&u._ww.addEventListener(e,t,n),u._w.addEventListener(e,t,n),{type:e,listener:t,useCapture:n}),removeGlobalEvent(e,t,n){e&&("object"==typeof e&&(t=e.listener,n=e.useCapture,e=e.type),o.iframe&&u._ww.removeEventListener(e,t,n),u._w.removeEventListener(e,t,n))},onClick_toolbar:function(e){let t=e.target,n=t.getAttribute("data-display"),i=t.getAttribute("data-command"),o=t.className;for(u.controllersOff();t.parentNode&&!i&&!/se-menu-list/.test(o)&&!/se-toolbar/.test(o);)t=t.parentNode,i=t.getAttribute("data-command"),n=t.getAttribute("data-display"),o=t.className;(i||n)&&(t.disabled||u.actionCall(i,n,t))},__selectionSyncEvent:null,onMouseDown_wysiwyg:function(t){if(u.isReadOnly||a.isNonEditable(e.element.wysiwyg))return;if(a._isExcludeSelectionElement(t.target))return void t.preventDefault();if(d.removeGlobalEvent(d.__selectionSyncEvent),d.__selectionSyncEvent=d.addGlobalEvent("mouseup",(function(){u._editorRange(),d.removeGlobalEvent(d.__selectionSyncEvent)})),"function"==typeof h.onMouseDown&&!1===h.onMouseDown(t,u))return;const n=a.getParentElement(t.target,a.isCell);if(n){const e=u.plugins.table;e&&n!==e._fixedCell&&!e._shift&&u.callPlugin("table",(function(){e.onTableCellMultiSelect.call(u,n,!1)}),null)}u._isBalloon&&d._hideToolbar()},onClick_wysiwyg:function(t){const n=t.target;if(u.isReadOnly)return t.preventDefault(),a.isAnchor(n)&&l.open(n.href,n.target),!1;if(a.isNonEditable(e.element.wysiwyg))return;if("function"==typeof h.onClick&&!1===h.onClick(t,u))return;const i=u.getFileComponent(n);if(i)return t.preventDefault(),void u.selectComponent(i.target,i.pluginName);const r=a.getParentElement(n,"FIGCAPTION");if(r&&a.isNonEditable(r)&&(t.preventDefault(),r.focus(),u._isInline&&!u._inlineToolbarAttr.isShow)){d._showToolbarInline();const e=function(){d._hideToolbar(),r.removeEventListener("blur",e)};r.addEventListener("blur",e)}if(u._editorRange(),3===t.detail){let e=u.getRange();a.isFormatElement(e.endContainer)&&0===e.endOffset&&(e=u.setRange(e.startContainer,e.startOffset,e.startContainer,e.startContainer.length),u._rangeInfo(e,u.getSelection()))}const s=u.getSelectionNode(),c=a.getFormatElement(s,null),p=a.getRangeFormatElement(s,null);let f=s;for(;f.firstChild;)f=f.firstChild;const g=u.getFileComponent(f);if(g){const e=u.getRange();p||e.startContainer!==e.endContainer||u.selectComponent(g.target,g.pluginName)}else u.currentFileComponentInfo&&u.controllersOff();if(c||a.isNonEditable(n)||a.isList(p))d._applyTagEffects();else{const e=u.getRange();if(a.getFormatElement(e.startContainer)===a.getFormatElement(e.endContainer))if(a.isList(p)){t.preventDefault();const e=a.createElement("LI"),n=s.nextElementSibling;e.appendChild(s),p.insertBefore(e,n),u.focus()}else a.isWysiwygDiv(s)||a.isComponent(s)||a.isTable(s)&&!a.isCell(s)||null===u._setDefaultFormat(a.isRangeFormatElement(p)?"DIV":o.defaultTag)?d._applyTagEffects():(t.preventDefault(),u.focus())}u._isBalloon&&l.setTimeout(d._toggleToolbarBalloon)},_balloonDelay:null,_showToolbarBalloonDelay:function(){d._balloonDelay&&l.clearTimeout(d._balloonDelay),d._balloonDelay=l.setTimeout(function(){l.clearTimeout(this._balloonDelay),this._balloonDelay=null,this._showToolbarBalloon()}.bind(d),350)},_toggleToolbarBalloon:function(){u._editorRange();const e=u.getRange();u._bindControllersOff||!u._isBalloonAlways&&e.collapsed?d._hideToolbar():d._showToolbarBalloon(e)},_showToolbarBalloon:function(t){if(!u._isBalloon)return;const n=t||u.getRange(),i=e.element.toolbar,r=e.element.topArea,s=u.getSelection();let c;if(u._isBalloonAlways&&n.collapsed)c=!0;else if(s.focusNode===s.anchorNode)c=s.focusOffset0&&d._getPageBottomSpace()w&&(t=!1,_=!0),_&&(v=(t?n.top-g-p:n.bottom+p)-(n.noText?0:h)+u),i.style.left=l.Math.floor(b)+"px",i.style.top=l.Math.floor(v)+"px",t?(a.removeClass(e.element._arrow,"se-arrow-up"),a.addClass(e.element._arrow,"se-arrow-down"),e.element._arrow.style.top=g+"px"):(a.removeClass(e.element._arrow,"se-arrow-down"),a.addClass(e.element._arrow,"se-arrow-up"),e.element._arrow.style.top=-p+"px");const C=l.Math.floor(f/2+(m-b));e.element._arrow.style.left=(C+p>i.offsetWidth?i.offsetWidth-p:C";const e=m.attributes;for(;e[0];)m.removeAttribute(e[0].name)}else{const e=a.createElement(o.defaultTag);e.innerHTML="
    ",m.parentElement.replaceChild(e,m)}return u.nativeFocus(),!1}}const i=p.startContainer;if(m&&!m.previousElementSibling&&0===p.startOffset&&3===i.nodeType&&!a.isFormatElement(i.parentNode)){let e=i.parentNode.previousSibling;const t=i.parentNode.nextSibling;e||(t?e=t:(e=a.createElement("BR"),m.appendChild(e)));let n=i;for(;m.contains(n)&&!n.previousSibling;)n=n.parentNode;if(!m.contains(n)){i.textContent="",a.removeItemAllParents(i,null,m);break}}if(d._isUneditableNode(p,!0)){t.preventDefault(),t.stopPropagation();break}!f&&u._isEdgeFormat(p.startContainer,p.startOffset,"start")&&a.isFormatElement(m.previousElementSibling)&&(u._formatAttrsTemp=m.previousElementSibling.attributes);const v=p.commonAncestorContainer;if(m=a.getFormatElement(p.startContainer,null),y=a.getRangeFormatElement(m,null),y&&m&&!a.isCell(y)&&!/^FIGCAPTION$/i.test(y.nodeName)){if(a.isListCell(m)&&a.isList(y)&&(a.isListCell(y.parentNode)||m.previousElementSibling)&&(n===m||3===n.nodeType&&(!n.previousSibling||a.isList(n.previousSibling)))&&(a.getFormatElement(p.startContainer,null)!==a.getFormatElement(p.endContainer,null)?y.contains(p.startContainer):0===p.startOffset&&p.collapsed)){if(p.startContainer!==p.endContainer)t.preventDefault(),u.removeNode(),3===p.startContainer.nodeType&&u.setRange(p.startContainer,p.startContainer.textContent.length,p.startContainer,p.startContainer.textContent.length),u.history.push(!0);else{let e=m.previousElementSibling||y.parentNode;if(a.isListCell(e)){t.preventDefault();let n=e;if(!e.contains(m)&&a.isListCell(n)&&a.isList(n.lastElementChild)){for(n=n.lastElementChild.lastElementChild;a.isListCell(n)&&a.isList(n.lastElementChild);)n=n.lastElementChild&&n.lastElementChild.lastElementChild;e=n}let i=e===y.parentNode?y.previousSibling:e.lastChild;i||(i=a.createTextNode(a.zeroWidthSpace),y.parentNode.insertBefore(i,y.parentNode.firstChild));const o=3===i.nodeType?i.textContent.length:1,r=m.childNodes;let s=i,l=r[0];for(;l=r[0];)e.insertBefore(l,s.nextSibling),s=l;a.removeItem(m),0===y.children.length&&a.removeItem(y),u.setRange(i,o,i,o),u.history.push(!0)}}break}if(!f&&0===p.startOffset){let e=!0,n=v;for(;n&&n!==y&&!a.isWysiwygDiv(n);){if(n.previousSibling&&(1===n.previousSibling.nodeType||!a.onlyZeroWidthSpace(n.previousSibling.textContent.trim()))){e=!1;break}n=n.parentNode}if(e&&y.parentNode){t.preventDefault(),u.detachRangeFormatElement(y,a.isListCell(m)?[m]:null,null,!1,!1),u.history.push(!0);break}}}if(!f&&m&&(0===p.startOffset||n===m&&m.childNodes[p.startOffset])){const e=n===m?m.childNodes[p.startOffset]:n,i=m.previousSibling,o=(3===v.nodeType||a.isBreak(v))&&!v.previousSibling&&0===p.startOffset;if(e&&!e.previousSibling&&(v&&a.isComponent(v.previousSibling)||o&&a.isComponent(i))){const e=u.getFileComponent(i);e?(t.preventDefault(),t.stopPropagation(),0===m.textContent.length&&a.removeItem(m),!1===u.selectComponent(e.target,e.pluginName)&&u.blur()):a.isComponent(i)&&(t.preventDefault(),t.stopPropagation(),a.removeItem(i));break}if(e&&a.isNonEditable(e.previousSibling)){t.preventDefault(),t.stopPropagation(),a.removeItem(e.previousSibling);break}}break;case 46:if(g){t.preventDefault(),t.stopPropagation(),u.plugins[g].destroy.call(u);break}if(f&&d._hardDelete()){t.preventDefault(),t.stopPropagation();break}if(d._isUneditableNode(p,!1)){t.preventDefault(),t.stopPropagation();break}if((a.isFormatElement(n)||null===n.nextSibling||a.onlyZeroWidthSpace(n.nextSibling)&&null===n.nextSibling.nextSibling)&&p.startOffset===n.textContent.length){const e=m.nextElementSibling;if(!e)break;if(a.isComponent(e)){if(t.preventDefault(),a.onlyZeroWidthSpace(m)&&(a.removeItem(m),a.isTable(e))){let t=a.getChildElement(e,a.isCell,!1);t=t.firstElementChild||t,u.setRange(t,0,t,0);break}const n=u.getFileComponent(e);n?(t.stopPropagation(),!1===u.selectComponent(n.target,n.pluginName)&&u.blur()):a.isComponent(e)&&(t.stopPropagation(),a.removeItem(e));break}}if(!f&&(u.isEdgePoint(p.endContainer,p.endOffset)||n===m&&m.childNodes[p.startOffset])){const e=n===m&&m.childNodes[p.startOffset]||n;if(e&&a.isNonEditable(e.nextSibling)){t.preventDefault(),t.stopPropagation(),a.removeItem(e.nextSibling);break}if(a.isComponent(e)){t.preventDefault(),t.stopPropagation(),a.removeItem(e);break}}if(!f&&u._isEdgeFormat(p.endContainer,p.endOffset,"end")&&a.isFormatElement(m.nextElementSibling)&&(u._formatAttrsTemp=m.attributes),m=a.getFormatElement(p.startContainer,null),y=a.getRangeFormatElement(m,null),a.isListCell(m)&&a.isList(y)&&(n===m||3===n.nodeType&&(!n.nextSibling||a.isList(n.nextSibling))&&(a.getFormatElement(p.startContainer,null)!==a.getFormatElement(p.endContainer,null)?y.contains(p.endContainer):p.endOffset===n.textContent.length&&p.collapsed))){p.startContainer!==p.endContainer&&u.removeNode();let e=a.getArrayItem(m.children,a.isList,!1);if(e=e||m.nextElementSibling||y.parentNode.nextElementSibling,e&&(a.isList(e)||a.getArrayItem(e.children,a.isList,!1))){let n,i;if(t.preventDefault(),a.isList(e)){const t=e.firstElementChild;for(i=t.childNodes,n=i[0];i[0];)m.insertBefore(i[0],e);a.removeItem(t)}else{for(n=e.firstChild,i=e.childNodes;i[0];)m.appendChild(i[0]);a.removeItem(e)}u.setRange(n,0,n,0),u.history.push(!0)}break}break;case 9:if(g||o.tabDisable)break;if(t.preventDefault(),s||c||a.isWysiwygDiv(n))break;const b=!p.collapsed||u.isEdgePoint(p.startContainer,p.startOffset),_=u.getSelectedElements(null);n=u.getSelectionNode();const w=[];let C=[],x=a.isListCell(_[0]),E=a.isListCell(_[_.length-1]),S={sc:p.startContainer,so:p.startOffset,ec:p.endContainer,eo:p.endOffset};for(let e,t=0,n=_.length;t0&&b&&u.plugins.list)S=u.plugins.list.editInsideList.call(u,r,w);else{const e=a.getParentElement(n,a.isCell);if(e&&b){const t=a.getParentElement(e,"table"),n=a.getListChildren(t,a.isCell);let i=r?a.prevIdx(n,e):a.nextIdx(n,e);i!==n.length||r||(i=0),-1===i&&r&&(i=n.length-1);let o=n[i];if(!o)break;o=o.firstElementChild||o,u.setRange(o,0,o,0);break}C=C.concat(w),x=E=null}if(C.length>0)if(r){const e=C.length-1;for(let t,n=0;n<=e;n++){t=C[n].childNodes;for(let e,n=0,i=t.length;n":"<"+m.nodeName+">
    ",!u.checkCharCount(e,"byte-html"))return t.preventDefault(),!1}if(!r&&!g){const i=u._isEdgeFormat(p.endContainer,p.endOffset,"end"),r=u._isEdgeFormat(p.startContainer,p.startOffset,"start");if(i&&(/^H[1-6]$/i.test(m.nodeName)||/^HR$/i.test(m.nodeName))){d._enterPrevent(t);let e=null;const n=u.appendFormatTag(m,o.defaultTag);if(i&&i.length>0){e=i.pop();const t=e;for(;i.length>0;)e=e.appendChild(i.pop());n.appendChild(t)}if(e=e?e.appendChild(n.firstChild):n.firstChild,a.isBreak(e)){const t=a.createTextNode(a.zeroWidthSpace);e.parentNode.insertBefore(t,e),u.setRange(t,1,t,1)}else u.setRange(e,0,e,0);break}if(y&&m&&!a.isCell(y)&&!/^FIGCAPTION$/i.test(y.nodeName)){const e=u.getRange();if(u.isEdgePoint(e.endContainer,e.endOffset)&&a.isList(n.nextSibling)){d._enterPrevent(t);const e=a.createElement("LI"),i=a.createElement("BR");e.appendChild(i),m.parentNode.insertBefore(e,m.nextElementSibling),e.appendChild(n.nextSibling),u.setRange(i,1,i,1);break}if((3!==e.commonAncestorContainer.nodeType||!e.commonAncestorContainer.nextElementSibling)&&a.onlyZeroWidthSpace(m.innerText.trim())&&!a.isListCell(m.nextElementSibling)){d._enterPrevent(t);let e=null;if(a.isListCell(y.parentNode)){const t=m.parentNode.parentNode;y=t.parentNode;const n=a.createElement("LI");n.innerHTML="
    ",a.copyTagAttributes(n,m,o.lineAttrReset),e=n,y.insertBefore(e,t.nextElementSibling)}else{const t=a.isCell(y.parentNode)?"DIV":a.isList(y.parentNode)?"LI":a.isFormatElement(y.nextElementSibling)&&!a.isRangeFormatElement(y.nextElementSibling)?y.nextElementSibling.nodeName:a.isFormatElement(y.previousElementSibling)&&!a.isRangeFormatElement(y.previousElementSibling)?y.previousElementSibling.nodeName:o.defaultTag;e=a.createElement(t),a.copyTagAttributes(e,m,o.lineAttrReset);const n=u.detachRangeFormatElement(y,[m],null,!0,!0);n.cc.insertBefore(e,n.ec)}e.innerHTML="
    ",a.removeItemAllParents(m,null,null),u.setRange(e,1,e,1);break}}if(k){d._enterPrevent(t);const e=n===k,i=u.getSelection(),o=n.childNodes,r=i.focusOffset,s=n.previousElementSibling,l=n.nextSibling;if(!a.isClosureFreeFormatElement(k)&&o&&(e&&p.collapsed&&o.length-1<=r+1&&a.isBreak(o[r])&&(!o[r+1]||(!o[r+2]||a.onlyZeroWidthSpace(o[r+2].textContent))&&3===o[r+1].nodeType&&a.onlyZeroWidthSpace(o[r+1].textContent))&&r>0&&a.isBreak(o[r-1])||!e&&a.onlyZeroWidthSpace(n.textContent)&&a.isBreak(s)&&(a.isBreak(s.previousSibling)||!a.onlyZeroWidthSpace(s.previousSibling.textContent))&&(!l||!a.isBreak(l)&&a.onlyZeroWidthSpace(l.textContent)))){e?a.removeItem(o[r-1]):a.removeItem(n);const t=u.appendFormatTag(k,a.isFormatElement(k.nextElementSibling)&&!a.isRangeFormatElement(k.nextElementSibling)?k.nextElementSibling:null);a.copyFormatAttributes(t,k),u.setRange(t,1,t,1);break}if(e){h.insertHTML(p.collapsed&&a.isBreak(p.startContainer.childNodes[p.startOffset-1])?"
    ":"

    ",!0,!1);let e=i.focusNode;const t=i.focusOffset;k===e&&(e=e.childNodes[t-r>1?t-1:t]),u.setRange(e,1,e,1)}else{const e=i.focusNode.nextSibling,t=a.createElement("BR");u.insertNode(t,null,!1);const n=t.previousSibling,o=t.nextSibling;a.isBreak(e)||a.isBreak(n)||o&&!a.onlyZeroWidthSpace(o)?u.setRange(o,0,o,0):(t.parentNode.insertBefore(t.cloneNode(!1),t),u.setRange(t,1,t,1))}d._onShortcutKey=!0;break}if(p.collapsed&&(r||i)){d._enterPrevent(t);const e=a.createElement("BR"),s=a.createElement(m.nodeName);a.copyTagAttributes(s,m,o.lineAttrReset);let l=e;do{if(!a.isBreak(n)&&1===n.nodeType){const e=n.cloneNode(!1);e.appendChild(l),l=e}n=n.parentNode}while(m!==n&&m.contains(n));s.appendChild(l),m.parentNode.insertBefore(s,r&&!i?m:m.nextElementSibling),i&&u.setRange(e,1,e,1);break}if(m){let n;t.stopPropagation();let s=0;if(p.collapsed)n=a.onlyZeroWidthSpace(m)?u.appendFormatTag(m,m.cloneNode(!1)):a.splitElement(p.endContainer,p.endOffset,a.getElementDepth(m));else{const l=a.getFormatElement(p.startContainer,null)!==a.getFormatElement(p.endContainer,null),c=m.cloneNode(!1);c.innerHTML="
    ";const h=u.removeNode();if(n=a.getFormatElement(h.container,null),!n){a.isWysiwygDiv(h.container)&&(d._enterPrevent(t),e.element.wysiwyg.appendChild(c),n=c,a.copyTagAttributes(n,m,o.lineAttrReset),u.setRange(n,s,n,s));break}const f=a.getRangeFormatElement(h.container);if(n=n.contains(f)?a.getChildElement(f,a.getFormatElement.bind(a)):n,l){if(i&&!r)n.parentNode.insertBefore(c,h.prevContainer&&h.container!==h.prevContainer?n:n.nextElementSibling),n=c,s=0;else if(s=h.offset,r){const e=n.parentNode.insertBefore(c,n);i&&(n=e,s=0)}}else i&&r?(n.parentNode.insertBefore(c,h.prevContainer&&h.container===h.prevContainer?n.nextElementSibling:n),n=c,s=0):n=a.splitElement(h.container,h.offset,a.getElementDepth(m))}d._enterPrevent(t),a.copyTagAttributes(n,m,o.lineAttrReset),u.setRange(n,s,n,s);break}}if(f)break;if(y&&a.getParentElement(y,"FIGCAPTION")&&a.getParentElement(y,a.isList)&&(d._enterPrevent(t),m=u.appendFormatTag(m,null),u.setRange(m,0,m,0)),g){t.preventDefault(),t.stopPropagation(),u.containerOff(),u.controllersOff();const n=e[g],i=n._container,s=i.previousElementSibling||i.nextElementSibling;let l=null;a.isListCell(i.parentNode)?l=a.createElement("BR"):(l=a.createElement(a.isFormatElement(s)&&!a.isRangeFormatElement(s)?s.nodeName:o.defaultTag),l.innerHTML="
    "),r?i.parentNode.insertBefore(l,i):i.parentNode.insertBefore(l,i.nextElementSibling),u.callPlugin(g,(function(){!1===u.selectComponent(n._element,g)&&u.blur()}),null)}break;case 27:if(g)return t.preventDefault(),t.stopPropagation(),u.controllersOff(),!1}if(r&&16===i){t.preventDefault(),t.stopPropagation();const e=u.plugins.table;if(e&&!e._shift&&!e._ref){const t=a.getParentElement(m,a.isCell);if(t)return void e.onTableCellMultiSelect.call(u,t,!0)}}else if(r&&(a.isOSX_IOS?c:s)&&32===i){t.preventDefault(),t.stopPropagation();const e=u.insertNode(a.createTextNode(" "));if(e&&e.container)return void u.setRange(e.container,e.endOffset,e.container,e.endOffset)}if(a.isIE&&!s&&!c&&!f&&!d._nonTextKeyCode.test(i)&&a.isBreak(p.commonAncestorContainer)){const e=a.createTextNode(a.zeroWidthSpace);u.insertNode(e,null,!1),u.setRange(e,1,e,1)}d._directionKeyCode.test(i)&&(u._editorRange(),d._applyTagEffects())}},_onKeyDown_wysiwyg_arrowKey:function(e){if(e.shiftKey)return;let t=u.getSelectionNode();const n=function(t,n=0){if(e.preventDefault(),e.stopPropagation(),!t)return;let i=u.getFileComponent(t);i?u.selectComponent(i.target,i.pluginName):(u.setRange(t,n,t,n),u.controllersOff())},i=a.getParentElement(t,"table");if(i){const o=a.getParentElement(t,"tr"),r=a.getParentElement(t,"td");let s=r,l=r;if(r){for(;s.firstChild;)s=s.firstChild;for(;l.lastChild;)l=l.lastChild}let c=t;for(;c.firstChild;)c=c.firstChild;const d=c===s,h=c===l;let p=null,f=0;if(38===e.keyCode&&d){const e=o&&o.previousElementSibling;for(p=e?e.children[r.cellIndex]:a.getPreviousDeepestNode(i,u.context.element.wysiwyg);p.lastChild;)p=p.lastChild;p&&(f=p.textContent.length)}else if(40===e.keyCode&&h){const e=o&&o.nextElementSibling;for(p=e?e.children[r.cellIndex]:a.getNextDeepestNode(i,u.context.element.wysiwyg);p.firstChild;)p=p.firstChild}if(p)return n(p,f),!1}const o=u.getFileComponent(t);if(o){const t=/37|38/.test(e.keyCode),i=/39|40/.test(e.keyCode);if(t){const e=a.getPreviousDeepestNode(o.target,u.context.element.wysiwyg);n(e,e&&e.textContent.length)}else i&&n(a.getNextDeepestNode(o.target,u.context.element.wysiwyg))}},onKeyUp_wysiwyg:function(e){if(d._onShortcutKey)return;u._editorRange();const t=e.keyCode,n=e.ctrlKey||e.metaKey||91===t||92===t||224===t,i=e.altKey;if(u.isReadOnly)return void(!n&&d._cursorMoveKeyCode.test(t)&&d._applyTagEffects());const r=u.getRange();let s=u.getSelectionNode();if(u._isBalloon&&(u._isBalloonAlways&&27!==t||!r.collapsed)){if(!u._isBalloonAlways)return void d._showToolbarBalloon();27!==t&&d._showToolbarBalloonDelay()}let l=s;for(;l.firstChild;)l=l.firstChild;const c=u.getFileComponent(l);if(16!==e.keyCode&&!e.shiftKey&&c?u.selectComponent(c.target,c.pluginName):u.currentFileComponentInfo&&u.controllersOff(),8===t&&a.isWysiwygDiv(s)&&""===s.textContent&&0===s.children.length){e.preventDefault(),e.stopPropagation(),s.innerHTML="";const t=a.createElement(a.isFormatElement(u._variable.currentNodes[0])?u._variable.currentNodes[0]:o.defaultTag);return t.innerHTML="
    ",s.appendChild(t),u.setRange(t,0,t,0),d._applyTagEffects(),void u.history.push(!1)}const p=a.getFormatElement(s,null),f=a.getRangeFormatElement(s,null),g=u._formatAttrsTemp;if(g){for(let e=0,n=g.length;e0?i-r-e.element.toolbar.offsetHeight:0;i=n+r?(u._sticky||d._onStickyToolbar(l),t.toolbar.style.top=l+n+r+o.stickyToolbar-i-u._variable.minResizingSize+"px"):i>=r&&d._onStickyToolbar(l)},_getEditorOffsets:function(t){let n=t||e.element.topArea,i=0,o=0,r=0;for(;n;)i+=n.offsetTop,o+=n.offsetLeft,r+=n.scrollTop,n=n.offsetParent;return{top:i,left:o,scroll:r}},_getPageBottomSpace:function(){return s.documentElement.scrollHeight-(d._getEditorOffsets(null).top+e.element.topArea.offsetHeight)},_onStickyToolbar:function(t){const n=e.element;u._isInline||o.toolbarContainer||(n._stickyDummy.style.height=n.toolbar.offsetHeight+"px",n._stickyDummy.style.display="block"),n.toolbar.style.top=o.stickyToolbar+t+"px",n.toolbar.style.width=u._isInline?u._inlineToolbarAttr.width:n.toolbar.offsetWidth+"px",a.addClass(n.toolbar,"se-toolbar-sticky"),u._sticky=!0},_offStickyToolbar:function(){const t=e.element;t._stickyDummy.style.display="none",t.toolbar.style.top=u._isInline?u._inlineToolbarAttr.top:"",t.toolbar.style.width=u._isInline?u._inlineToolbarAttr.width:"",t.editorArea.style.marginTop="",a.removeClass(t.toolbar,"se-toolbar-sticky"),u._sticky=!1},_codeViewAutoHeight:function(){u._variable.isFullScreen||(e.element.code.style.height=e.element.code.scrollHeight+"px")},_hardDelete:function(){const e=u.getRange(),t=e.startContainer,n=e.endContainer,i=a.getRangeFormatElement(t),o=a.getRangeFormatElement(n),r=a.isCell(i),s=a.isCell(o),l=e.commonAncestorContainer;if((r&&!i.previousElementSibling&&!i.parentElement.previousElementSibling||s&&!o.nextElementSibling&&!o.parentElement.nextElementSibling)&&i!==o)if(r){if(s)return a.removeItem(a.getParentElement(i,(function(e){return l===e.parentNode}))),u.nativeFocus(),!0;a.removeItem(a.getParentElement(i,(function(e){return l===e.parentNode})))}else a.removeItem(a.getParentElement(o,(function(e){return l===e.parentNode})));const c=1===t.nodeType?a.getParentElement(t,".se-component"):null,d=1===n.nodeType?a.getParentElement(n,".se-component"):null;return c&&a.removeItem(c),d&&a.removeItem(d),!1},onPaste_wysiwyg:function(e){const t=a.isIE?l.clipboardData:e.clipboardData;return!t||d._dataTransferAction("paste",e,t)},_setClipboardComponent:function(e,t,n){e.preventDefault(),e.stopPropagation(),n.setData("text/html",t.component.outerHTML)},onCopy_wysiwyg:function(e){const t=a.isIE?l.clipboardData:e.clipboardData;if("function"==typeof h.onCopy&&!1===h.onCopy(e,t,u))return e.preventDefault(),e.stopPropagation(),!1;const n=u.currentFileComponentInfo;n&&!a.isIE&&(d._setClipboardComponent(e,n,t),a.addClass(n.component,"se-component-copy"),l.setTimeout((function(){a.removeClass(n.component,"se-component-copy")}),150))},onSave_wysiwyg:function(e){"function"!=typeof h.onSave||h.onSave(e,u)},onCut_wysiwyg:function(e){const t=a.isIE?l.clipboardData:e.clipboardData;if("function"==typeof h.onCut&&!1===h.onCut(e,t,u))return e.preventDefault(),e.stopPropagation(),!1;const n=u.currentFileComponentInfo;n&&!a.isIE&&(d._setClipboardComponent(e,n,t),a.removeItem(n.component),u.controllersOff()),l.setTimeout((function(){u.history.push(!1)}))},onDrop_wysiwyg:function(e){if(u.isReadOnly||a.isIE)return e.preventDefault(),e.stopPropagation(),!1;const t=e.dataTransfer;return!t||(d._setDropLocationSelection(e),u.removeNode(),document.body.contains(u.currentControllerTarget)||u.controllersOff(),d._dataTransferAction("drop",e,t))},_setDropLocationSelection:function(e){const t={startContainer:null,startOffset:null,endContainer:null,endOffset:null};let n=null;if(e.rangeParent?(t.startContainer=e.rangeParent,t.startOffset=e.rangeOffset,t.endContainer=e.rangeParent,t.endOffset=e.rangeOffset):n=u._wd.caretRangeFromPoint?u._wd.caretRangeFromPoint(e.clientX,e.clientY):u.getRange(),n&&(t.startContainer=n.startContainer,t.startOffset=n.startOffset,t.endContainer=n.endContainer,t.endOffset=n.endOffset),t.startContainer===t.endContainer){const e=a.getParentElement(t.startContainer,a.isComponent);e&&(t.startContainer=e,t.startOffset=0,t.endContainer=e,t.endOffset=0)}u.setRange(t.startContainer,t.startOffset,t.endContainer,t.endOffset)},_dataTransferAction:function(t,n,i){let o,r;if(a.isIE){o=i.getData("Text");const s=u.getRange(),c=a.createElement("DIV"),h={sc:s.startContainer,so:s.startOffset,ec:s.endContainer,eo:s.endOffset};return c.setAttribute("contenteditable",!0),c.style.cssText="position:absolute; top:0; left:0; width:1px; height:1px; overflow:hidden;",e.element.relative.appendChild(c),c.focus(),l.setTimeout((function(){r=c.innerHTML,a.removeItem(c),u.setRange(h.sc,h.so,h.ec,h.eo),d._setClipboardData(t,n,o,r,i)})),!0}if(o=i.getData("text/plain"),r=i.getData("text/html"),!1===d._setClipboardData(t,n,o,r,i))return n.preventDefault(),n.stopPropagation(),!1},_setClipboardData:function(e,t,n,i,o){const r=/class=["']*Mso(Normal|List)/i.test(i)||/content=["']*Word.Document/i.test(i)||/content=["']*OneNote.File/i.test(i)||/content=["']*Excel.Sheet/i.test(i);i?(i=i.replace(/^\r?\n?\r?\n?\x3C!--StartFragment--\>|\x3C!--EndFragment-->\r?\n?<\/body\>\r?\n?<\/html>$/g,""),r&&(i=i.replace(/\n/g," "),n=n.replace(/\n/g," ")),i=u.cleanHTML(i,u.pasteTagsWhitelistRegExp,u.pasteTagsBlacklistRegExp)):i=a._HTMLConvertor(n).replace(/\n/g,"
    ");const s=u._charCount(u._charTypeHTML?i:n);if("paste"===e&&"function"==typeof h.onPaste){const e=h.onPaste(t,i,s,u);if(!1===e)return!1;if("string"==typeof e){if(!e)return!1;i=e}}if("drop"===e&&"function"==typeof h.onDrop){const e=h.onDrop(t,i,s,u);if(!1===e)return!1;if("string"==typeof e){if(!e)return!1;i=e}}const l=o.files;return l.length>0&&!r?(/^image/.test(l[0].type)&&u.plugins.image&&h.insertImage(l),!1):!!s&&(i?(h.insertHTML(i,!0,!1),!1):void 0)},onMouseMove_wysiwyg:function(t){if(u.isDisabled||u.isReadOnly)return!1;const n=a.getParentElement(t.target,a.isComponent),i=u._lineBreaker.style;if(n&&!u.currentControllerName){const r=e.element;let s=0,l=r.wysiwyg;do{s+=l.scrollTop,l=l.parentElement}while(l&&!/^(BODY|HTML)$/i.test(l.nodeName));const c=r.wysiwyg.scrollTop,h=d._getEditorOffsets(null),p=a.getOffset(n,r.wysiwygFrame).top+c,f=t.pageY+s+(o.iframe&&!o.toolbarContainer?r.toolbar.offsetHeight:0),g=p+(o.iframe?s:h.top),m=a.isListCell(n.parentNode);let y="",v="";if((m?!n.previousSibling:!a.isFormatElement(n.previousElementSibling))&&fg+n.offsetHeight-20))return void(i.display="none");v=p+n.offsetHeight,y="b"}u._variable._lineBreakComp=n,u._variable._lineBreakDir=y,i.top=v-c+"px",u._lineBreakerButton.style.left=a.getOffset(n).left+n.offsetWidth/2-15+"px",i.display="block"}else"none"!==i.display&&(i.display="none")},_enterPrevent(e){e.preventDefault(),a.isMobile&&u.__focusTemp.focus()},_onMouseDown_lineBreak:function(e){e.preventDefault()},_onLineBreak:function(e){e.preventDefault();const t=u._variable._lineBreakComp,n=this?this:u._variable._lineBreakDir,i=a.isListCell(t.parentNode),r=a.createElement(i?"BR":a.isCell(t.parentNode)?"DIV":o.defaultTag);if(i||(r.innerHTML="
    "),u._charTypeHTML&&!u.checkCharCount(r.outerHTML,"byte-html"))return;t.parentNode.insertBefore(r,"t"===n?t:t.nextSibling),u._lineBreaker.style.display="none",u._variable._lineBreakComp=null;const s=i?r:r.firstChild;u.setRange(s,1,s,1),u.history.push(!1)},_resizeObserver:null,_toolbarObserver:null,_addEvent:function(){const t=o.iframe?u._ww:e.element.wysiwyg;a.isResizeObserverSupported&&(this._resizeObserver=new l.ResizeObserver((function(e){u.__callResizeFunction(-1,e[0])}))),e.element.toolbar.addEventListener("mousedown",d._buttonsEventHandler,!1),e.element._menuTray.addEventListener("mousedown",d._buttonsEventHandler,!1),e.element.toolbar.addEventListener("click",d.onClick_toolbar,!1),t.addEventListener("mousedown",d.onMouseDown_wysiwyg,!1),t.addEventListener("click",d.onClick_wysiwyg,!1),t.addEventListener(a.isIE?"textinput":"input",d.onInput_wysiwyg,!1),t.addEventListener("keydown",d.onKeyDown_wysiwyg,!1),t.addEventListener("keyup",d.onKeyUp_wysiwyg,!1),t.addEventListener("paste",d.onPaste_wysiwyg,!1),t.addEventListener("copy",d.onCopy_wysiwyg,!1),t.addEventListener("cut",d.onCut_wysiwyg,!1),t.addEventListener("drop",d.onDrop_wysiwyg,!1),t.addEventListener("scroll",d.onScroll_wysiwyg,!1),t.addEventListener("focus",d.onFocus_wysiwyg,!1),t.addEventListener("blur",d.onBlur_wysiwyg,!1),d._lineBreakerBind={a:d._onLineBreak.bind(""),t:d._onLineBreak.bind("t"),b:d._onLineBreak.bind("b")},t.addEventListener("mousemove",d.onMouseMove_wysiwyg,!1),u._lineBreakerButton.addEventListener("mousedown",d._onMouseDown_lineBreak,!1),u._lineBreakerButton.addEventListener("click",d._lineBreakerBind.a,!1),e.element.lineBreaker_t.addEventListener("mousedown",d._lineBreakerBind.t,!1),e.element.lineBreaker_b.addEventListener("mousedown",d._lineBreakerBind.b,!1),t.addEventListener("touchstart",d.onMouseDown_wysiwyg,{passive:!0,useCapture:!1}),t.addEventListener("touchend",d.onClick_wysiwyg,{passive:!0,useCapture:!1}),"auto"!==o.height||o.codeMirrorEditor||(e.element.code.addEventListener("keydown",d._codeViewAutoHeight,!1),e.element.code.addEventListener("keyup",d._codeViewAutoHeight,!1),e.element.code.addEventListener("paste",d._codeViewAutoHeight,!1)),e.element.resizingBar&&(/\d+/.test(o.height)&&o.resizeEnable?e.element.resizingBar.addEventListener("mousedown",d.onMouseDown_resizingBar,!1):a.addClass(e.element.resizingBar,"se-resizing-none")),d._setResponsiveToolbar(),a.isResizeObserverSupported&&(this._toolbarObserver=new l.ResizeObserver(u.resetResponsiveToolbar)),l.addEventListener("resize",d.onResize_window,!1),o.stickyToolbar>-1&&l.addEventListener("scroll",d.onScroll_window,!1)},_removeEvent:function(){const t=o.iframe?u._ww:e.element.wysiwyg;e.element.toolbar.removeEventListener("mousedown",d._buttonsEventHandler),e.element._menuTray.removeEventListener("mousedown",d._buttonsEventHandler),e.element.toolbar.removeEventListener("click",d.onClick_toolbar),t.removeEventListener("mousedown",d.onMouseDown_wysiwyg),t.removeEventListener("click",d.onClick_wysiwyg),t.removeEventListener(a.isIE?"textinput":"input",d.onInput_wysiwyg),t.removeEventListener("keydown",d.onKeyDown_wysiwyg),t.removeEventListener("keyup",d.onKeyUp_wysiwyg),t.removeEventListener("paste",d.onPaste_wysiwyg),t.removeEventListener("copy",d.onCopy_wysiwyg),t.removeEventListener("cut",d.onCut_wysiwyg),t.removeEventListener("drop",d.onDrop_wysiwyg),t.removeEventListener("scroll",d.onScroll_wysiwyg),t.removeEventListener("mousemove",d.onMouseMove_wysiwyg),u._lineBreakerButton.removeEventListener("mousedown",d._onMouseDown_lineBreak),u._lineBreakerButton.removeEventListener("click",d._lineBreakerBind.a),e.element.lineBreaker_t.removeEventListener("mousedown",d._lineBreakerBind.t),e.element.lineBreaker_b.removeEventListener("mousedown",d._lineBreakerBind.b),d._lineBreakerBind=null,t.removeEventListener("touchstart",d.onMouseDown_wysiwyg,{passive:!0,useCapture:!1}),t.removeEventListener("touchend",d.onClick_wysiwyg,{passive:!0,useCapture:!1}),t.removeEventListener("focus",d.onFocus_wysiwyg),t.removeEventListener("blur",d.onBlur_wysiwyg),e.element.code.removeEventListener("keydown",d._codeViewAutoHeight),e.element.code.removeEventListener("keyup",d._codeViewAutoHeight),e.element.code.removeEventListener("paste",d._codeViewAutoHeight),e.element.resizingBar&&e.element.resizingBar.removeEventListener("mousedown",d.onMouseDown_resizingBar),d._resizeObserver&&(d._resizeObserver.unobserve(e.element.wysiwygFrame),d._resizeObserver=null),d._toolbarObserver&&(d._toolbarObserver.unobserve(e.element._toolbarShadow),d._toolbarObserver=null),l.removeEventListener("resize",d.onResize_window),l.removeEventListener("scroll",d.onScroll_window)},_setResponsiveToolbar:function(){if(0===r.length)return void(r=null);d._responsiveCurrentSize="default";const e=d._responsiveButtonSize=[],t=d._responsiveButtons={default:r[0]};for(let n,i,o=1,s=r.length;o';for(let e,n=0,i=o.length;n0&&(s+='
    '+t(r)+"
    ",r=[]),"object"==typeof e&&(s+='
    '+t(e)+"
    ")));return s+='
    ",s},_makeColorList:function(e){let t="";t+='
      ';for(let n,i=0,o=e.length;i');return t+="
    ",t},init:function(e,t){const n=this.plugins.colorPicker;let i=t||(n.getColorInNode.call(this,e)||this.context.colorPicker._defaultColor);i=n.isHexColor(i)?i:n.rgb2hex(i)||i;const o=this.context.colorPicker._colorList;if(o)for(let e=0,t=o.length;e=3&&"#"+((1<<24)+(n[0]<<16)+(n[1]<<8)+n[2]).toString(16).substr(1)}},Jn={name:"fontColor",display:"submenu",add:function(e,t){e.addModule([Xn]);const n=e.context;n.fontColor={previewEl:null,colorInput:null,colorList:null};let i=this.setSubmenu(e);n.fontColor.colorInput=i.querySelector("._se_color_picker_input"),n.fontColor.colorInput.addEventListener("keyup",this.onChangeInput.bind(e)),i.querySelector("._se_color_picker_submit").addEventListener("click",this.submit.bind(e)),i.querySelector("._se_color_picker_remove").addEventListener("click",this.remove.bind(e)),i.addEventListener("click",this.pickup.bind(e)),n.fontColor.colorList=i.querySelectorAll("li button"),e.initMenuTarget(this.name,t,i),i=null},setSubmenu:function(e){const t=e.context.colorPicker.colorListHTML,n=e.util.createElement("DIV");return n.className="se-submenu se-list-layer",n.innerHTML=t,n},on:function(){const e=this.context.colorPicker,t=this.context.fontColor;e._colorInput=t.colorInput;const n=this.wwComputedStyle.color;e._defaultColor=n?this.plugins.colorPicker.isHexColor(n)?n:this.plugins.colorPicker.rgb2hex(n):"#333333",e._styleProperty="color",e._colorList=t.colorList,this.plugins.colorPicker.init.call(this,this.getSelectionNode(),null)},onChangeInput:function(e){this.plugins.colorPicker.setCurrentColor.call(this,e.target.value)},submit:function(){this.plugins.fontColor.applyColor.call(this,this.context.colorPicker._currentColor)},pickup:function(e){e.preventDefault(),e.stopPropagation(),this.plugins.fontColor.applyColor.call(this,e.target.getAttribute("data-value"))},remove:function(){this.nodeChange(null,["color"],["span"],!0),this.submenuOff()},applyColor:function(e){if(!e)return;const t=this.util.createElement("SPAN");t.style.color=e,this.nodeChange(t,["color"],null,null),this.submenuOff()}},Qn={name:"hiliteColor",display:"submenu",add:function(e,t){e.addModule([Xn]);const n=e.context;n.hiliteColor={previewEl:null,colorInput:null,colorList:null};let i=this.setSubmenu(e);n.hiliteColor.colorInput=i.querySelector("._se_color_picker_input"),n.hiliteColor.colorInput.addEventListener("keyup",this.onChangeInput.bind(e)),i.querySelector("._se_color_picker_submit").addEventListener("click",this.submit.bind(e)),i.querySelector("._se_color_picker_remove").addEventListener("click",this.remove.bind(e)),i.addEventListener("click",this.pickup.bind(e)),n.hiliteColor.colorList=i.querySelectorAll("li button"),e.initMenuTarget(this.name,t,i),i=null},setSubmenu:function(e){const t=e.context.colorPicker.colorListHTML,n=e.util.createElement("DIV");return n.className="se-submenu se-list-layer",n.innerHTML=t,n},on:function(){const e=this.context.colorPicker,t=this.context.hiliteColor;e._colorInput=t.colorInput;const n=this.wwComputedStyle.backgroundColor;e._defaultColor=n?this.plugins.colorPicker.isHexColor(n)?n:this.plugins.colorPicker.rgb2hex(n):"#ffffff",e._styleProperty="backgroundColor",e._colorList=t.colorList,this.plugins.colorPicker.init.call(this,this.getSelectionNode(),null)},onChangeInput:function(e){this.plugins.colorPicker.setCurrentColor.call(this,e.target.value)},submit:function(){this.plugins.hiliteColor.applyColor.call(this,this.context.colorPicker._currentColor)},pickup:function(e){e.preventDefault(),e.stopPropagation(),this.plugins.hiliteColor.applyColor.call(this,e.target.getAttribute("data-value"))},remove:function(){this.nodeChange(null,["background-color"],["span"],!0),this.submenuOff()},applyColor:function(e){if(!e)return;const t=this.util.createElement("SPAN");t.style.backgroundColor=e,this.nodeChange(t,["background-color"],null,null),this.submenuOff()}},ei={name:"template",display:"submenu",add:function(e,t){e.context.template={selectedIndex:-1};let n=this.setSubmenu(e);n.querySelector("ul").addEventListener("click",this.pickup.bind(e)),e.initMenuTarget(this.name,t,n),n=null},setSubmenu:function(e){const t=e.options.templates;if(!t||0===t.length)throw Error('[SUNEDITOR.plugins.template.fail] To use the "template" plugin, please define the "templates" option.');const n=e.util.createElement("DIV");n.className="se-list-layer";let i='
      ';for(let e,n=0,o=t.length;n";return i+="
    ",n.innerHTML=i,n},pickup:function(e){if(!/^BUTTON$/i.test(e.target.tagName))return!1;e.preventDefault(),e.stopPropagation(),this.context.template.selectedIndex=1*e.target.getAttribute("data-value");const t=this.options.templates[this.context.template.selectedIndex];if(!t.html)throw this.submenuOff(),Error('[SUNEDITOR.template.fail] cause : "templates[i].html not found"');this.setContents(t.html),this.submenuOff()}};var ti=n(1350),ni=n.n(ti);const ii={name:"selectMenu",add:function(e){e.context.selectMenu={caller:{},callerContext:null}},setForm:function(){return'
    '},createList:function(e,t,n){e.form.innerHTML="
      "+n+"
    ",e.items=t,e.menus=e.form.querySelectorAll("li")},initEvent:function(e,t){const n=t.querySelector(".se-select-list"),i=this.context.selectMenu.caller[e]={form:n,items:[],menus:[],index:-1,item:null,clickMethod:null,callerName:e};n.addEventListener("mousedown",this.plugins.selectMenu.onMousedown_list),n.addEventListener("mousemove",this.plugins.selectMenu.onMouseMove_list.bind(this,i)),n.addEventListener("click",this.plugins.selectMenu.onClick_list.bind(this,i))},onMousedown_list:function(e){e.preventDefault(),e.stopPropagation()},onMouseMove_list:function(e,t){this.util.addClass(e.form,"__se_select-menu-mouse-move");const n=t.target.getAttribute("data-index");n&&(e.index=1*n)},onClick_list:function(e,t){const n=t.target.getAttribute("data-index");n&&e.clickMethod.call(this,e.items[n])},moveItem:function(e,t){this.util.removeClass(e.form,"__se_select-menu-mouse-move"),t=e.index+t;const n=e.menus,i=n.length,o=e.index=t>=i?0:t<0?i-1:t;for(let e=0;e
    "+e.plugins.selectMenu.setForm()+'
    '+o.bookmark+''+o.download+'
    ",r.innerHTML=s,r},initEvent:function(e,t){const n=this.plugins.anchor,i=this.context.anchor.caller[e]={modal:t,urlInput:null,linkDefaultRel:this.options.linkRelDefault,defaultRel:this.options.linkRelDefault.default||"",currentRel:[],linkAnchor:null,linkValue:"",_change:!1,callerName:e};"string"==typeof i.linkDefaultRel.default&&(i.linkDefaultRel.default=i.linkDefaultRel.default.trim()),"string"==typeof i.linkDefaultRel.check_new_window&&(i.linkDefaultRel.check_new_window=i.linkDefaultRel.check_new_window.trim()),"string"==typeof i.linkDefaultRel.check_bookmark&&(i.linkDefaultRel.check_bookmark=i.linkDefaultRel.check_bookmark.trim()),i.urlInput=t.querySelector(".se-input-url"),i.anchorText=t.querySelector("._se_anchor_text"),i.newWindowCheck=t.querySelector("._se_anchor_check"),i.downloadCheck=t.querySelector("._se_anchor_download"),i.download=t.querySelector("._se_anchor_download_icon"),i.preview=t.querySelector(".se-link-preview"),i.bookmark=t.querySelector("._se_anchor_bookmark_icon"),i.bookmarkButton=t.querySelector("._se_bookmark_button"),this.plugins.selectMenu.initEvent.call(this,e,t);const o=this.context.selectMenu.caller[e];this.options.linkRel.length>0&&(i.relButton=t.querySelector(".se-anchor-rel-btn"),i.relList=t.querySelector(".se-list-layer"),i.relPreview=t.querySelector(".se-anchor-rel-preview"),i.relButton.addEventListener("click",n.onClick_relButton.bind(this,i)),i.relList.addEventListener("click",n.onClick_relList.bind(this,i))),i.newWindowCheck.addEventListener("change",n.onChange_newWindowCheck.bind(this,i)),i.downloadCheck.addEventListener("change",n.onChange_downloadCheck.bind(this,i)),i.anchorText.addEventListener("input",n.onChangeAnchorText.bind(this,i)),i.urlInput.addEventListener("input",n.onChangeUrlInput.bind(this,i)),i.urlInput.addEventListener("keydown",n.onKeyDownUrlInput.bind(this,o)),i.urlInput.addEventListener("focus",n.onFocusUrlInput.bind(this,i,o)),i.urlInput.addEventListener("blur",n.onBlurUrlInput.bind(this,o)),i.bookmarkButton.addEventListener("click",n.onClick_bookmarkButton.bind(this,i))},on:function(e,t){const n=this.plugins.anchor;if(t){if(e.linkAnchor){this.context.dialog.updateModal=!0;const t=e.linkAnchor.getAttribute("href");e.linkValue=e.preview.textContent=e.urlInput.value=n.selfPathBookmark.call(this,t)?t.substr(t.lastIndexOf("#")):t,e.anchorText.value=e.linkAnchor.textContent,e.newWindowCheck.checked=!!/_blank/i.test(e.linkAnchor.target),e.downloadCheck.checked=e.linkAnchor.download}}else n.init.call(this,e),e.anchorText.value=this.getSelection().toString().trim(),e.newWindowCheck.checked=this.options.linkTargetNewWindow;this.context.anchor.callerContext=e,n.setRel.call(this,e,t&&e.linkAnchor?e.linkAnchor.rel:e.defaultRel),n.setLinkPreview.call(this,e,e.linkValue),this.plugins.selectMenu.on.call(this,e.callerName,this.plugins.anchor.setHeaderBookmark)},selfPathBookmark:function(e){const t=this._w.location.href.replace(/\/$/,"");return 0===e.indexOf("#")||0===e.indexOf(t)&&e.indexOf("#")===(-1===t.indexOf("#")?t.length:t.substr(0,t.indexOf("#")).length)},_closeRelMenu:null,toggleRelList:function(e,t){if(t){const t=e.relButton,n=e.relList;this.util.addClass(t,"active"),n.style.visibility="hidden",n.style.display="block",this.options.rtl?n.style.left=t.offsetLeft-n.offsetWidth-1+"px":n.style.left=t.offsetLeft+t.offsetWidth+1+"px",n.style.top=t.offsetTop+t.offsetHeight/2-n.offsetHeight/2+"px",n.style.visibility="",this.plugins.anchor._closeRelMenu=function(e,t,n){n&&(e.relButton.contains(n.target)||e.relList.contains(n.target))||(this.util.removeClass(t,"active"),e.relList.style.display="none",this.modalForm.removeEventListener("click",this.plugins.anchor._closeRelMenu),this.plugins.anchor._closeRelMenu=null)}.bind(this,e,t),this.modalForm.addEventListener("click",this.plugins.anchor._closeRelMenu)}else this.plugins.anchor._closeRelMenu&&this.plugins.anchor._closeRelMenu()},onClick_relButton:function(e,t){this.plugins.anchor.toggleRelList.call(this,e,!this.util.hasClass(t.target,"active"))},onClick_relList:function(e,t){const n=t.target,i=n.getAttribute("data-command");if(!i)return;const o=e.currentRel,r=this.util.toggleClass(n,"se-checked"),s=o.indexOf(i);r?-1===s&&o.push(i):s>-1&&o.splice(s,1),e.relPreview.title=e.relPreview.textContent=o.join(" ")},setRel:function(e,t){const n=e.relList,i=e.currentRel=t?t.split(" "):[];if(!n)return;const o=n.querySelectorAll("button");for(let e,t=0,n=o.length;t-1?this.util.addClass(o[t],"se-checked"):this.util.removeClass(o[t],"se-checked");e.relPreview.title=e.relPreview.textContent=i.join(" ")},createHeaderList:function(e,t,n){const i=this.util.getListChildren(this.context.element.wysiwyg,(function(e){return/h[1-6]/i.test(e.nodeName)}));if(0===i.length)return;const o=new this._w.RegExp("^"+n.replace(/^#/,""),"i"),r=[];let s="";for(let e,t=0,n=i.length;t'+e.textContent+"");0===r.length?this.plugins.selectMenu.close.call(this,t):(this.plugins.selectMenu.createList(t,r,s),this.plugins.selectMenu.open.call(this,t,this.plugins.anchor._setMenuListPosition.bind(this,e)))},_setMenuListPosition:function(e,t){t.style.top=e.urlInput.offsetHeight+1+"px"},onKeyDownUrlInput:function(e,t){switch(t.keyCode){case 38:t.preventDefault(),t.stopPropagation(),this.plugins.selectMenu.moveItem.call(this,e,-1);break;case 40:t.preventDefault(),t.stopPropagation(),this.plugins.selectMenu.moveItem.call(this,e,1);break;case 13:e.index>-1&&(t.preventDefault(),t.stopPropagation(),this.plugins.anchor.setHeaderBookmark.call(this,this.plugins.selectMenu.getItem(e,null)))}},setHeaderBookmark:function(e){const t=this.context.anchor.callerContext,n=e.id||"h_"+this._w.Math.random().toString().replace(/.+\./,"");e.id=n,t.urlInput.value="#"+n,t.anchorText.value.trim()&&t._change||(t.anchorText.value=e.textContent),this.plugins.anchor.setLinkPreview.call(this,t,t.urlInput.value),this.plugins.selectMenu.close.call(this,this.context.selectMenu.callerContext),this.context.anchor.callerContext.urlInput.focus()},onChangeAnchorText:function(e,t){e._change=!!t.target.value.trim()},onChangeUrlInput:function(e,t){const n=t.target.value.trim();this.plugins.anchor.setLinkPreview.call(this,e,n),this.plugins.anchor.selfPathBookmark.call(this,n)?this.plugins.anchor.createHeaderList.call(this,e,this.context.selectMenu.callerContext,n):this.plugins.selectMenu.close.call(this,this.context.selectMenu.callerContext)},onFocusUrlInput:function(e,t){const n=e.urlInput.value;this.plugins.anchor.selfPathBookmark.call(this,n)&&this.plugins.anchor.createHeaderList.call(this,e,t,n)},onBlurUrlInput:function(e){this.plugins.selectMenu.close.call(this,e)},setLinkPreview:function(e,t){const n=e.preview,i=this.options.linkProtocol,o=this.options.linkNoPrefix,r=/^(mailto\:|tel\:|sms\:|https*\:\/\/|#)/.test(t)||0===t.indexOf(i),s=!!i&&this._w.RegExp("^"+this.util.escapeStringRegexp(t.substr(0,i.length))).test(i);t=e.linkValue=n.textContent=t?o?t:!i||r||s?r?t:/^www\./.test(t)?"http://"+t:this.context.anchor.host+(/^\//.test(t)?"":"/")+t:i+t:"",this.plugins.anchor.selfPathBookmark.call(this,t)?(e.bookmark.style.display="block",this.util.addClass(e.bookmarkButton,"active")):(e.bookmark.style.display="none",this.util.removeClass(e.bookmarkButton,"active")),!this.plugins.anchor.selfPathBookmark.call(this,t)&&e.downloadCheck.checked?e.download.style.display="block":e.download.style.display="none"},setCtx:function(e,t){e&&(t.linkAnchor=e,t.linkValue=e.href,t.currentRel=e.rel.split(" "))},updateAnchor:function(e,t,n,i,o){!this.plugins.anchor.selfPathBookmark.call(this,t)&&i.downloadCheck.checked?e.setAttribute("download",n||t):e.removeAttribute("download"),i.newWindowCheck.checked?e.target="_blank":e.removeAttribute("target");const r=i.currentRel.join(" ");r?e.rel=r:e.removeAttribute("rel"),e.href=t,o?0===e.children.length&&(e.textContent=""):e.textContent=n},createAnchor:function(e,t){if(0===e.linkValue.length)return null;const n=e.linkValue,i=e.anchorText,o=0===i.value.length?n:i.value,r=e.linkAnchor||this.util.createElement("A");return this.plugins.anchor.updateAnchor.call(this,r,n,o,e,t),e.linkValue=e.preview.textContent=e.urlInput.value=e.anchorText.value="",r},onClick_bookmarkButton:function(e){let t=e.urlInput.value;this.plugins.anchor.selfPathBookmark.call(this,t)?(t=t.substr(1),e.bookmark.style.display="none",this.util.removeClass(e.bookmarkButton,"active"),this.plugins.selectMenu.close.call(this,this.context.selectMenu.callerContext)):(t="#"+t,e.bookmark.style.display="block",this.util.addClass(e.bookmarkButton,"active"),e.downloadCheck.checked=!1,e.download.style.display="none",this.plugins.anchor.createHeaderList.call(this,e,this.context.selectMenu.callerContext,t)),e.urlInput.value=t,this.plugins.anchor.setLinkPreview.call(this,e,t),e.urlInput.focus()},onChange_newWindowCheck:function(e,t){"string"==typeof e.linkDefaultRel.check_new_window&&(t.target.checked?this.plugins.anchor.setRel.call(this,e,this.plugins.anchor._relMerge.call(this,e,e.linkDefaultRel.check_new_window)):this.plugins.anchor.setRel.call(this,e,this.plugins.anchor._relDelete.call(this,e,e.linkDefaultRel.check_new_window)))},onChange_downloadCheck:function(e,t){t.target.checked?(e.download.style.display="block",e.bookmark.style.display="none",this.util.removeClass(e.bookmarkButton,"active"),e.linkValue=e.preview.textContent=e.urlInput.value=e.urlInput.value.replace(/^\#+/,""),"string"==typeof e.linkDefaultRel.check_bookmark&&this.plugins.anchor.setRel.call(this,e,this.plugins.anchor._relMerge.call(this,e,e.linkDefaultRel.check_bookmark))):(e.download.style.display="none","string"==typeof e.linkDefaultRel.check_bookmark&&this.plugins.anchor.setRel.call(this,e,this.plugins.anchor._relDelete.call(this,e,e.linkDefaultRel.check_bookmark)))},_relMerge:function(e,t){const n=e.currentRel;if(!t)return n.join(" ");if(/^only\:/.test(t))return t=t.replace(/^only\:/,"").trim(),e.currentRel=t.split(" "),t;const i=t.split(" ");for(let e,t=0,o=i.length;t'+i.cancel+''+t.dialogBox.linkBox.title+""+e.context.anchor.forms.innerHTML+'";return n.innerHTML=o,n},setController_LinkButton:function(e){const t=e.lang,n=e.icons,i=e.util.createElement("DIV");return i.className="se-controller se-controller-link",i.innerHTML='
    ",i},open:function(){this.plugins.dialog.open.call(this,"link","link"===this.currentControllerName)},submit:function(e){this.showLoading(),e.preventDefault(),e.stopPropagation();try{const e=this.plugins.anchor.createAnchor.call(this,this.context.anchor.caller.link,!1);if(null===e)return;if(this.context.dialog.updateModal){const e=this.context.link._linkAnchor.childNodes[0];this.setRange(e,0,e,e.textContent.length)}else{const t=this.getSelectedElements();if(t.length>1){const n=this.util.createElement(t[0].nodeName);if(n.appendChild(e),!this.insertNode(n,null,!0))return}else if(!this.insertNode(e,null,!0))return;this.setRange(e.childNodes[0],0,e.childNodes[0],e.textContent.length)}}finally{this.plugins.dialog.close.call(this),this.closeLoading(),this.history.push(!1)}return!1},active:function(e){if(e){if(this.util.isAnchor(e)&&null===e.getAttribute("data-image-link"))return this.controllerArray.indexOf(this.context.link.linkController)<0&&this.plugins.link.call_controller.call(this,e),!0}else this.controllerArray.indexOf(this.context.link.linkController)>-1&&this.controllersOff();return!1},on:function(e){this.plugins.anchor.on.call(this,this.context.anchor.caller.link,e)},call_controller:function(e){this.editLink=this.context.link._linkAnchor=this.context.anchor.caller.link.linkAnchor=e;const t=this.context.link.linkController,n=t.querySelector("a");n.href=e.href,n.title=e.textContent,n.textContent=e.textContent,this.util.addClass(e,"on"),this.setControllerPosition(t,e,"bottom",{left:0,top:0}),this.controllersOn(t,e,"link",this.util.removeClass.bind(this.util,this.context.link._linkAnchor,"on"))},onClick_linkController:function(e){e.stopPropagation();const t=e.target.getAttribute("data-command")||e.target.parentNode.getAttribute("data-command");if(t){if(e.preventDefault(),/update/.test(t))this.plugins.dialog.open.call(this,"link",!0);else if(/unlink/.test(t)){const e=this.util.getChildElement(this.context.link._linkAnchor,(function(e){return 0===e.childNodes.length||3===e.nodeType}),!1),t=this.util.getChildElement(this.context.link._linkAnchor,(function(e){return 0===e.childNodes.length||3===e.nodeType}),!0);this.setRange(e,0,t,t.textContent.length),this.nodeChange(null,null,["A"],!1)}else this.util.removeItem(this.context.link._linkAnchor),this.context.anchor.caller.link.linkAnchor=null,this.focus(),this.history.push(!1);this.controllersOff()}},init:function(){this.context.link.linkController.style.display="none",this.plugins.anchor.init.call(this,this.context.anchor.caller.link)}};var si=n(9315),li=n.n(si),ai=n(2345),ci=n.n(ai),ui=n(1913),di=n.n(ui);const hi={name:"image",display:"dialog",add:function(e){e.addModule([ni(),oi,li(),ci(),di()]);const t=e.options,n=e.context,i=n.image={_infoList:[],_infoIndex:0,_uploadFileLength:0,focusElement:null,sizeUnit:t._imageSizeUnit,_linkElement:"",_altText:"",_align:"none",_floatClassRegExp:"__se__float\\-[a-z]+",_v_src:{_linkValue:""},svgDefaultSize:"30%",base64RenderIndex:0,_element:null,_cover:null,_container:null,inputX:null,inputY:null,_element_w:1,_element_h:1,_element_l:0,_element_t:0,_defaultSizeX:"auto",_defaultSizeY:"auto",_origin_w:"auto"===t.imageWidth?"":t.imageWidth,_origin_h:"auto"===t.imageHeight?"":t.imageHeight,_proportionChecked:!0,_resizing:t.imageResizing,_resizeDotHide:!t.imageHeightShow,_rotation:t.imageRotation,_alignHide:!t.imageAlignShow,_onlyPercentage:t.imageSizeOnlyPercentage,_ratio:!1,_ratioX:1,_ratioY:1,_captionShow:!0,_captionChecked:!1,_caption:null,captionCheckEl:null};let o=this.setDialog(e);i.modal=o,i.imgInputFile=o.querySelector("._se_image_file"),i.imgUrlFile=o.querySelector("._se_image_url"),i.focusElement=i.imgInputFile||i.imgUrlFile,i.altText=o.querySelector("._se_image_alt"),i.captionCheckEl=o.querySelector("._se_image_check_caption"),i.previewSrc=o.querySelector("._se_tab_content_image .se-link-preview"),o.querySelector(".se-dialog-tabs").addEventListener("click",this.openTab.bind(e)),o.querySelector("form").addEventListener("submit",this.submit.bind(e)),i.imgInputFile&&o.querySelector(".se-file-remove").addEventListener("click",this._removeSelectedFiles.bind(i.imgInputFile,i.imgUrlFile,i.previewSrc)),i.imgUrlFile&&i.imgUrlFile.addEventListener("input",this._onLinkPreview.bind(i.previewSrc,i._v_src,t.linkProtocol)),i.imgInputFile&&i.imgUrlFile&&i.imgInputFile.addEventListener("change",this._fileInputChange.bind(i));const r=o.querySelector(".__se__gallery");r&&r.addEventListener("click",this._openGallery.bind(e)),i.proportion={},i.inputX={},i.inputY={},t.imageResizing&&(i.proportion=o.querySelector("._se_image_check_proportion"),i.inputX=o.querySelector("._se_image_size_x"),i.inputY=o.querySelector("._se_image_size_y"),i.inputX.value=t.imageWidth,i.inputY.value=t.imageHeight,i.inputX.addEventListener("keyup",this.setInputSize.bind(e,"x")),i.inputY.addEventListener("keyup",this.setInputSize.bind(e,"y")),i.inputX.addEventListener("change",this.setRatio.bind(e)),i.inputY.addEventListener("change",this.setRatio.bind(e)),i.proportion.addEventListener("change",this.setRatio.bind(e)),o.querySelector(".se-dialog-btn-revert").addEventListener("click",this.sizeRevert.bind(e))),n.dialog.modal.appendChild(o),e.plugins.anchor.initEvent.call(e,"image",o.querySelector("._se_tab_content_url")),i.anchorCtx=e.context.anchor.caller.image,o=null},setDialog:function(e){const t=e.options,n=e.lang,i=e.util.createElement("DIV");i.className="se-dialog-content se-dialog-image",i.style.display="none";let o='
    '+n.dialogBox.imageBox.title+'
    ';if(t.imageFileInput&&(o+='
    "),t.imageUrlInput&&(o+='
    '+(t.imageGalleryUrl&&e.plugins.imageGallery?'":"")+'
    '),o+='
    ',t.imageResizing){const i=t.imageSizeOnlyPercentage,r=i?' style="display: none !important;"':"",s=t.imageHeightShow?"":' style="display: none !important;"';o+='
    ',i||!t.imageHeightShow?o+='
    ":o+='
    ",o+=' '+n.dialogBox.proportion+'
    "}return o+='
    ",i.innerHTML=o,i},_fileInputChange:function(){this.imgInputFile.value?(this.imgUrlFile.setAttribute("disabled",!0),this.previewSrc.style.textDecoration="line-through"):(this.imgUrlFile.removeAttribute("disabled"),this.previewSrc.style.textDecoration="")},_removeSelectedFiles:function(e,t){this.value="",e&&(e.removeAttribute("disabled"),t.style.textDecoration="")},_openGallery:function(){this.callPlugin("imageGallery",this.plugins.imageGallery.open.bind(this,this.plugins.image._setUrlInput.bind(this.context.image)),null)},_setUrlInput:function(e){this.altText.value=e.alt,this._v_src._linkValue=this.previewSrc.textContent=this.imgUrlFile.value=e.getAttribute("data-value")||e.src,this.imgUrlFile.focus()},_onLinkPreview:function(e,t,n){const i=n.target.value.trim();e._linkValue=this.textContent=i?t&&-1===i.indexOf("://")&&0!==i.indexOf("#")?t+i:-1===i.indexOf("://")?"/"+i:i:""},fileTags:["img"],select:function(e){this.plugins.image.onModifyMode.call(this,e,this.plugins.resizing.call_controller_resize.call(this,e,"image"))},destroy:function(e){const t=e||this.context.image._element,n=this.util.getParentElement(t,this.util.isMediaComponent)||t,i=1*t.getAttribute("data-index");if("function"==typeof this.functions.onImageDeleteBefore&&!1===this.functions.onImageDeleteBefore(t,n,i,this))return;let o=n.previousElementSibling||n.nextElementSibling;const r=n.parentNode;this.util.removeItem(n),this.plugins.image.init.call(this),this.controllersOff(),r!==this.context.element.wysiwyg&&this.util.removeItemAllParents(r,(function(e){return 0===e.childNodes.length}),null),this.focusEdge(o),this.plugins.fileManager.deleteInfo.call(this,"image",i,this.functions.onImageUpload),this.history.push(!1)},on:function(e){const t=this.context.image;e?t.imgInputFile&&this.options.imageMultipleFile&&t.imgInputFile.removeAttribute("multiple"):(t.inputX.value=t._origin_w=this.options.imageWidth===t._defaultSizeX?"":this.options.imageWidth,t.inputY.value=t._origin_h=this.options.imageHeight===t._defaultSizeY?"":this.options.imageHeight,t.imgInputFile&&this.options.imageMultipleFile&&t.imgInputFile.setAttribute("multiple","multiple")),this.plugins.anchor.on.call(this,t.anchorCtx,e)},open:function(){this.plugins.dialog.open.call(this,"image","image"===this.currentControllerName)},openTab:function(e){const t=this.context.image.modal,n="init"===e?t.querySelector("._se_tab_link"):e.target;if(!/^BUTTON$/i.test(n.tagName))return!1;const i=n.getAttribute("data-tab-link"),o="_se_tab_content";let r,s,l;for(s=t.getElementsByClassName(o),r=0;r0?(this.showLoading(),n.submitAction.call(this,this.context.image.imgInputFile.files)):t.imgUrlFile&&t._v_src._linkValue.length>0&&(this.showLoading(),n.onRender_imgUrl.call(this,t._v_src._linkValue))}catch(e){throw this.closeLoading(),Error('[SUNEDITOR.image.submit.fail] cause : "'+e.message+'"')}finally{this.plugins.dialog.close.call(this)}return!1},submitAction:function(e){if(0===e.length)return;let t=0,n=[];for(let i=0,o=e.length;i0){let e=0;const n=this.context.image._infoList;for(let t=0,i=n.length;ti){this.closeLoading();const n="[SUNEDITOR.imageUpload.fail] Size of uploadable total images: "+i/1e3+"KB";return void(("function"!=typeof this.functions.onImageUploadError||this.functions.onImageUploadError(n,{limitSize:i,currentSize:e,uploadSize:t},this))&&this.functions.noticeOpen(n))}}const o=this.context.image;o._uploadFileLength=n.length;const r={anchor:this.plugins.anchor.createAnchor.call(this,o.anchorCtx,!0),inputWidth:o.inputX.value,inputHeight:o.inputY.value,align:o._align,isUpdate:this.context.dialog.updateModal,alt:o._altText,element:o._element};if("function"==typeof this.functions.onImageUploadBefore){const e=this.functions.onImageUploadBefore(n,r,this,function(e){e&&this._w.Array.isArray(e.result)?this.plugins.image.register.call(this,r,e):this.plugins.image.upload.call(this,r,e)}.bind(this));if(void 0===e)return;if(!e)return void this.closeLoading();this._w.Array.isArray(e)&&e.length>0&&(n=e)}this.plugins.image.upload.call(this,r,n)},error:function(e,t){if(this.closeLoading(),"function"!=typeof this.functions.onImageUploadError||this.functions.onImageUploadError(e,t,this))throw this.functions.noticeOpen(e),Error("[SUNEDITOR.plugin.image.error] response: "+e)},upload:function(e,t){if(!t)return void this.closeLoading();if("string"==typeof t)return void this.plugins.image.error.call(this,t,null);const n=this.options.imageUploadUrl,i=this.context.dialog.updateModal?1:t.length;if("string"==typeof n&&n.length>0){const o=new FormData;for(let e=0;e'+e.icons.cancel+''+n.dialogBox.videoBox.title+'
    ';if(t.videoFileInput&&(o+='
    "),t.videoUrlInput&&(o+='
    '),t.videoResizing){const i=t.videoRatioList||[{name:"16:9",value:.5625},{name:"4:3",value:.75},{name:"21:9",value:.4285}],r=t.videoRatio,s=t.videoSizeOnlyPercentage,l=s?' style="display: none !important;"':"",a=t.videoHeightShow?"":' style="display: none !important;"',c=t.videoRatioShow?"":' style="display: none !important;"',u=s||t.videoHeightShow||t.videoRatioShow?"":' style="display: none !important;"';o+='
    "}return o+='
    ",i.innerHTML=o,i},_fileInputChange:function(){this.videoInputFile.value?(this.videoUrlFile.setAttribute("disabled",!0),this.preview.style.textDecoration="line-through"):(this.videoUrlFile.removeAttribute("disabled"),this.preview.style.textDecoration="")},_removeSelectedFiles:function(e,t){this.value="",e&&(e.removeAttribute("disabled"),t.style.textDecoration="")},_onLinkPreview:function(e,t,n){const i=n.target.value.trim();/^$/.test(i)?(e._linkValue=i,this.textContent=''):e._linkValue=this.textContent=i?t&&-1===i.indexOf("://")&&0!==i.indexOf("#")?t+i:-1===i.indexOf("://")?"/"+i:i:""},_setTagAttrs:function(e){e.setAttribute("controls",!0);const t=this.options.videoTagAttrs;if(t)for(let n in t)this.util.hasOwn(t,n)&&e.setAttribute(n,t[n])},createVideoTag:function(){const e=this.util.createElement("VIDEO");return this.plugins.video._setTagAttrs.call(this,e),e},_setIframeAttrs:function(e){e.frameBorder="0",e.allowFullscreen=!0;const t=this.options.videoIframeAttrs;if(t)for(let n in t)this.util.hasOwn(t,n)&&e.setAttribute(n,t[n])},createIframeTag:function(){const e=this.util.createElement("IFRAME");return this.plugins.video._setIframeAttrs.call(this,e),e},fileTags:["iframe","video"],select:function(e){this.plugins.video.onModifyMode.call(this,e,this.plugins.resizing.call_controller_resize.call(this,e,"video"))},destroy:function(e){const t=e||this.context.video._element,n=this.context.video._container,i=1*t.getAttribute("data-index");if("function"==typeof this.functions.onVideoDeleteBefore&&!1===this.functions.onVideoDeleteBefore(t,n,i,this))return;let o=n.previousElementSibling||n.nextElementSibling;const r=n.parentNode;this.util.removeItem(n),this.plugins.video.init.call(this),this.controllersOff(),r!==this.context.element.wysiwyg&&this.util.removeItemAllParents(r,(function(e){return 0===e.childNodes.length}),null),this.focusEdge(o),this.plugins.fileManager.deleteInfo.call(this,"video",i,this.functions.onVideoUpload),this.history.push(!1)},on:function(e){const t=this.context.video;e?t.videoInputFile&&this.options.videoMultipleFile&&t.videoInputFile.removeAttribute("multiple"):(t.inputX.value=t._origin_w=this.options.videoWidth===t._defaultSizeX?"":this.options.videoWidth,t.inputY.value=t._origin_h=this.options.videoHeight===t._defaultSizeY?"":this.options.videoHeight,t.proportion.disabled=!0,t.videoInputFile&&this.options.videoMultipleFile&&t.videoInputFile.setAttribute("multiple","multiple")),t._resizing&&this.plugins.video.setVideoRatioSelect.call(this,t._origin_h||t._defaultRatio)},open:function(){this.plugins.dialog.open.call(this,"video","video"===this.currentControllerName)},setVideoRatio:function(e){const t=this.context.video,n=e.target.options[e.target.selectedIndex].value;t._defaultSizeY=t._videoRatio=n?100*n+"%":t._defaultSizeY,t.inputY.placeholder=n?100*n+"%":"",t.inputY.value=""},setInputSize:function(e,t){if(t&&32===t.keyCode)return void t.preventDefault();const n=this.context.video;this.plugins.resizing._module_setInputSize.call(this,n,e),"y"===e&&this.plugins.video.setVideoRatioSelect.call(this,t.target.value||n._defaultRatio)},setRatio:function(){this.plugins.resizing._module_setRatio.call(this,this.context.video)},submit:function(e){const t=this.context.video,n=this.plugins.video;e.preventDefault(),e.stopPropagation(),t._align=t.modal.querySelector('input[name="suneditor_video_radio"]:checked').value;try{t.videoInputFile&&t.videoInputFile.files.length>0?(this.showLoading(),n.submitAction.call(this,this.context.video.videoInputFile.files)):t.videoUrlFile&&t._linkValue.length>0&&(this.showLoading(),n.setup_url.call(this,t._linkValue))}catch(e){throw this.closeLoading(),Error('[SUNEDITOR.video.submit.fail] cause : "'+e.message+'"')}finally{this.plugins.dialog.close.call(this)}return!1},submitAction:function(e){if(0===e.length)return;let t=0,n=[];for(let i=0,o=e.length;i0){let e=0;const n=this.context.video._infoList;for(let t=0,i=n.length;ti){this.closeLoading();const n="[SUNEDITOR.videoUpload.fail] Size of uploadable total videos: "+i/1e3+"KB";return void(("function"!=typeof this.functions.onVideoUploadError||this.functions.onVideoUploadError(n,{limitSize:i,currentSize:e,uploadSize:t},this))&&this.functions.noticeOpen(n))}}const o=this.context.video;o._uploadFileLength=n.length;const r={inputWidth:o.inputX.value,inputHeight:o.inputY.value,align:o._align,isUpdate:this.context.dialog.updateModal,element:o._element};if("function"==typeof this.functions.onVideoUploadBefore){const e=this.functions.onVideoUploadBefore(n,r,this,function(e){e&&this._w.Array.isArray(e.result)?this.plugins.video.register.call(this,r,e):this.plugins.video.upload.call(this,r,e)}.bind(this));if(void 0===e)return;if(!e)return void this.closeLoading();"object"==typeof e&&e.length>0&&(n=e)}this.plugins.video.upload.call(this,r,n)},error:function(e,t){if(this.closeLoading(),"function"!=typeof this.functions.onVideoUploadError||this.functions.onVideoUploadError(e,t,this))throw this.functions.noticeOpen(e),Error("[SUNEDITOR.plugin.video.error] response: "+e)},upload:function(e,t){if(!t)return void this.closeLoading();if("string"==typeof t)return void this.plugins.video.error.call(this,t,null);const n=this.options.videoUploadUrl,i=this.context.dialog.updateModal?1:t.length;if(!("string"==typeof n&&n.length>0))throw Error('[SUNEDITOR.videoUpload.fail] cause : There is no "videoUploadUrl" option.');{const o=new FormData;for(let e=0;e$/.test(e)){if(0===(e=(new this._w.DOMParser).parseFromString(e,"text/html").querySelector("iframe").src).length)return!1}if(/youtu\.?be/.test(e)){if(/^http/.test(e)||(e="https://"+e),e=e.replace("watch?v=",""),/^\/\/.+\/embed\//.test(e)||(e=e.replace(e.match(/\/\/.+\//)[0],"//www.youtube.com/embed/").replace("&","?&")),t._youtubeQuery.length>0)if(/\?/.test(e)){const n=e.split("?");e=n[0]+"?"+t._youtubeQuery+"&"+n[1]}else e+="?"+t._youtubeQuery}else/vimeo\.com/.test(e)&&(e.endsWith("/")&&(e=e.slice(0,-1)),e="https://player.vimeo.com/video/"+e.slice(e.lastIndexOf("/")+1));this.plugins.video.create_video.call(this,this.plugins.video[/embed|iframe|player|\/e\/|\.php|\.html?/.test(e)||/vimeo\.com/.test(e)?"createIframeTag":"createVideoTag"].call(this),e,t.inputX.value,t.inputY.value,t._align,null,this.context.dialog.updateModal)}catch(e){throw Error('[SUNEDITOR.video.upload.fail] cause : "'+e.message+'"')}finally{this.closeLoading()}},create_video:function(e,t,n,i,o,r,s){this.context.resizing._resize_plugin="video";const l=this.context.video;let a=null,c=null,u=!1;if(s){if((e=l._element).src!==t){u=!0;const n=/youtu\.?be/.test(t),i=/vimeo\.com/.test(t);if(!n&&!i||/^iframe$/i.test(e.nodeName))if(n||i||/^video$/i.test(e.nodeName))e.src=t;else{const n=this.plugins.video.createVideoTag.call(this);n.src=t,e.parentNode.replaceChild(n,e),l._element=e=n}else{const n=this.plugins.video.createIframeTag.call(this);n.src=t,e.parentNode.replaceChild(n,e),l._element=e=n}}c=l._container,a=this.util.getParentElement(e,"FIGURE")}else u=!0,e.src=t,l._element=e,a=this.plugins.component.set_cover.call(this,e),c=this.plugins.component.set_container.call(this,a,"se-video-container");l._cover=a,l._container=c;const d=this.plugins.resizing._module_getSizeX.call(this,l)!==(n||l._defaultSizeX)||this.plugins.resizing._module_getSizeY.call(this,l)!==(i||l._videoRatio),h=!s||d;l._resizing&&(this.context.video._proportionChecked=l.proportion.checked,e.setAttribute("data-proportion",l._proportionChecked));let p=!1;h&&(p=this.plugins.video.applySize.call(this)),p&&"center"===o||this.plugins.video.setAlign.call(this,null,e,a,c);let f=!0;if(s)l._resizing&&this.context.resizing._rotateVertical&&h&&this.plugins.resizing.setTransformSize.call(this,e,null,null);else if(f=this.insertComponent(c,!1,!0,!this.options.mediaAutoSelect),!this.options.mediaAutoSelect){const e=this.appendFormatTag(c,null);e&&this.setRange(e,0,e,0)}f&&(u&&this.plugins.fileManager.setInfo.call(this,"video",e,this.functions.onVideoUpload,r,!0),s&&(this.selectComponent(e,"video"),this.history.push(!1))),this.context.resizing._resize_plugin=""},_update_videoCover:function(e){if(!e)return;const t=this.context.video;/^video$/i.test(e.nodeName)?this.plugins.video._setTagAttrs.call(this,e):this.plugins.video._setIframeAttrs.call(this,e);let n=this.util.isRangeFormatElement(e.parentNode)||this.util.isWysiwygDiv(e.parentNode)?e:this.util.getFormatElement(e)||e;const i=e;t._element=e=e.cloneNode(!0);const o=t._cover=this.plugins.component.set_cover.call(this,e),r=t._container=this.plugins.component.set_container.call(this,o,"se-video-container");try{const s=n.querySelector("figcaption");let l=null;s&&(l=this.util.createElement("DIV"),l.innerHTML=s.innerHTML,this.util.removeItem(s));const a=(e.getAttribute("data-size")||e.getAttribute("data-origin")||"").split(",");this.plugins.video.applySize.call(this,a[0]||i.style.width||i.width||"",a[1]||i.style.height||i.height||"");const c=this.util.getFormatElement(i);if(c&&(t._align=c.style.textAlign||c.style.float),this.plugins.video.setAlign.call(this,null,e,o,r),this.util.getParentElement(i,this.util.isNotCheckingNode))i.parentNode.replaceChild(r,i);else if(this.util.isListCell(n)){const e=this.util.getParentElement(i,(function(e){return e.parentNode===n}));n.insertBefore(r,e),this.util.removeItem(i),this.util.removeEmptyNode(e,null,!0)}else if(this.util.isFormatElement(n)){const e=this.util.getParentElement(i,(function(e){return e.parentNode===n}));n=this.util.splitElement(n,e),n.parentNode.insertBefore(r,n),this.util.removeItem(i),this.util.removeEmptyNode(n,null,!0),0===n.children.length&&(n.innerHTML=this.util.htmlRemoveWhiteSpace(n.innerHTML))}else n.parentNode.replaceChild(r,n);l&&n.parentNode.insertBefore(l,r.nextElementSibling)}catch(e){console.warn("[SUNEDITOR.video.error] Maybe the video tag is nested.",e)}this.plugins.fileManager.setInfo.call(this,"video",e,this.functions.onVideoUpload,null,!0),this.plugins.video.init.call(this)},onModifyMode:function(e,t){const n=this.context.video;n._element=e,n._cover=this.util.getParentElement(e,"FIGURE"),n._container=this.util.getParentElement(e,this.util.isMediaComponent),n._align=e.style.float||e.getAttribute("data-align")||"none",e.style.float="",t&&(n._element_w=t.w,n._element_h=t.h,n._element_t=t.t,n._element_l=t.l);let i,o,r=n._element.getAttribute("data-size")||n._element.getAttribute("data-origin");r?(r=r.split(","),i=r[0],o=r[1]):t&&(i=t.w,o=t.h),n._origin_w=i||e.style.width||e.width||"",n._origin_h=o||e.style.height||e.height||""},openModify:function(e){const t=this.context.video;if(t.videoUrlFile&&(t._linkValue=t.preview.textContent=t.videoUrlFile.value=t._element.src||(t._element.querySelector("source")||"").src||""),(t.modal.querySelector('input[name="suneditor_video_radio"][value="'+t._align+'"]')||t.modal.querySelector('input[name="suneditor_video_radio"][value="none"]')).checked=!0,t._resizing){this.plugins.resizing._module_setModifyInputSize.call(this,t,this.plugins.video);const e=t._videoRatio=this.plugins.resizing._module_getSizeY.call(this,t);this.plugins.video.setVideoRatioSelect.call(this,e)||(t.inputY.value=t._onlyPercentage?this.util.getNumber(e,2):e)}e||this.plugins.dialog.open.call(this,"video",!0)},setVideoRatioSelect:function(e){let t=!1;const n=this.context.video,i=n.videoRatioOption.options;/%$/.test(e)||n._onlyPercentage?e=this.util.getNumber(e,2)/100+"":(!this.util.isNumber(e)||1*e>=1)&&(e=""),n.inputY.placeholder="";for(let o=0,r=i.length;o'+e.icons.cancel+''+n.dialogBox.audioBox.title+'
    ';return t.audioFileInput&&(o+='
    "),t.audioUrlInput&&(o+='
    '),o+='
    ",i.innerHTML=o,i},setController:function(e){const t=e.lang,n=e.icons,i=e.util.createElement("DIV");return i.className="se-controller se-controller-link",i.innerHTML='
    ",i},_fileInputChange:function(){this.audioInputFile.value?(this.audioUrlFile.setAttribute("disabled",!0),this.preview.style.textDecoration="line-through"):(this.audioUrlFile.removeAttribute("disabled"),this.preview.style.textDecoration="")},_removeSelectedFiles:function(e,t){this.value="",e&&(e.removeAttribute("disabled"),t.style.textDecoration="")},_createAudioTag:function(){const e=this.util.createElement("AUDIO");this.plugins.audio._setTagAttrs.call(this,e);const t=this.context.audio._origin_w,n=this.context.audio._origin_h;return e.setAttribute("origin-size",t+","+n),e.style.cssText=(t?"width:"+t+"; ":"")+(n?"height:"+n+";":""),e},_setTagAttrs:function(e){e.setAttribute("controls",!0);const t=this.options.audioTagAttrs;if(t)for(let n in t)this.util.hasOwn(t,n)&&e.setAttribute(n,t[n])},_onLinkPreview:function(e,t,n){const i=n.target.value.trim();e._linkValue=this.textContent=i?t&&-1===i.indexOf("://")&&0!==i.indexOf("#")?t+i:-1===i.indexOf("://")?"/"+i:i:""},fileTags:["audio"],select:function(e){this.plugins.audio.onModifyMode.call(this,e)},destroy:function(e){e=e||this.context.audio._element;const t=this.util.getParentElement(e,this.util.isComponent)||e,n=1*e.getAttribute("data-index");if("function"==typeof this.functions.onAudioDeleteBefore&&!1===this.functions.onAudioDeleteBefore(e,t,n,this))return;const i=t.previousElementSibling||t.nextElementSibling,o=t.parentNode;this.util.removeItem(t),this.plugins.audio.init.call(this),this.controllersOff(),o!==this.context.element.wysiwyg&&this.util.removeItemAllParents(o,(function(e){return 0===e.childNodes.length}),null),this.focusEdge(i),this.plugins.fileManager.deleteInfo.call(this,"audio",n,this.functions.onAudioUpload),this.history.push(!1)},checkFileInfo:function(){this.plugins.fileManager.checkInfo.call(this,"audio",["audio"],this.functions.onAudioUpload,this.plugins.audio.updateCover.bind(this),!1)},resetFileInfo:function(){this.plugins.fileManager.resetInfo.call(this,"audio",this.functions.onAudioUpload)},on:function(e){const t=this.context.audio;e?t._element?(this.context.dialog.updateModal=!0,t._linkValue=t.preview.textContent=t.audioUrlFile.value=t._element.src,t.audioInputFile&&this.options.audioMultipleFile&&t.audioInputFile.removeAttribute("multiple")):t.audioInputFile&&this.options.audioMultipleFile&&t.audioInputFile.removeAttribute("multiple"):(this.plugins.audio.init.call(this),t.audioInputFile&&this.options.audioMultipleFile&&t.audioInputFile.setAttribute("multiple","multiple"))},open:function(){this.plugins.dialog.open.call(this,"audio","audio"===this.currentControllerName)},submit:function(e){const t=this.context.audio;e.preventDefault(),e.stopPropagation();try{t.audioInputFile&&t.audioInputFile.files.length>0?(this.showLoading(),this.plugins.audio.submitAction.call(this,t.audioInputFile.files)):t.audioUrlFile&&t._linkValue.length>0&&(this.showLoading(),this.plugins.audio.setupUrl.call(this,t._linkValue))}catch(e){throw this.closeLoading(),Error('[SUNEDITOR.audio.submit.fail] cause : "'+e.message+'"')}finally{this.plugins.dialog.close.call(this)}return!1},submitAction:function(e){if(0===e.length)return;let t=0,n=[];for(let i=0,o=e.length;i0){let e=0;const n=this.context.audio._infoList;for(let t=0,i=n.length;ti){this.closeLoading();const n="[SUNEDITOR.audioUpload.fail] Size of uploadable total audios: "+i/1e3+"KB";return void(("function"!=typeof this.functions.onAudioUploadError||this.functions.onAudioUploadError(n,{limitSize:i,currentSize:e,uploadSize:t},this))&&this.functions.noticeOpen(n))}}const o=this.context.audio;o._uploadFileLength=n.length;const r={isUpdate:this.context.dialog.updateModal,element:o._element};if("function"==typeof this.functions.onAudioUploadBefore){const e=this.functions.onAudioUploadBefore(n,r,this,function(e){e&&this._w.Array.isArray(e.result)?this.plugins.audio.register.call(this,r,e):this.plugins.audio.upload.call(this,r,e)}.bind(this));if(void 0===e)return;if(!e)return void this.closeLoading();"object"==typeof e&&e.length>0&&(n=e)}this.plugins.audio.upload.call(this,r,n)},error:function(e,t){if(this.closeLoading(),"function"!=typeof this.functions.onAudioUploadError||this.functions.onAudioUploadError(e,t,this))throw this.functions.noticeOpen(e),Error("[SUNEDITOR.plugin.audio.exception] response: "+e)},upload:function(e,t){if(!t)return void this.closeLoading();if("string"==typeof t)return void this.plugins.audio.error.call(this,t,null);const n=this.options.audioUploadUrl,i=this.context.dialog.updateModal?1:t.length,o=new FormData;for(let e=0;e'+e.icons.cancel+''+t.dialogBox.mathBox.title+'

    ",e.context.math.defaultFontSize=o,n.innerHTML=r,n},setController_MathButton:function(e){const t=e.lang,n=e.util.createElement("DIV");return n.className="se-controller se-controller-link",n.innerHTML='
    ",n},open:function(){this.plugins.dialog.open.call(this,"math","math"===this.currentControllerName)},managedTags:function(){return{className:"katex",method:function(e){if(!e.getAttribute("data-exp")||!this.options.katex)return;const t=this._d.createRange().createContextualFragment(this.plugins.math._renderer.call(this,this.util.HTMLDecoder(e.getAttribute("data-exp"))));e.innerHTML=t.querySelector(".katex").innerHTML,e.setAttribute("contenteditable",!1)}}},_renderer:function(e){let t="";try{this.util.removeClass(this.context.math.focusElement,"se-error"),t=this.options.katex.src.renderToString(e,{throwOnError:!0,displayMode:!0})}catch(e){this.util.addClass(this.context.math.focusElement,"se-error"),t='Katex syntax error. (Refer KaTeX)',console.warn("[SUNEDITOR.math.Katex.error] ",e)}return t},_renderMathExp:function(e,t){e.previewElement.innerHTML=this.plugins.math._renderer.call(this,t.target.value)},submit:function(e){this.showLoading(),e.preventDefault(),e.stopPropagation();const t=function(){if(0===this.context.math.focusElement.value.trim().length)return!1;const e=this.context.math,t=e.focusElement.value,n=e.previewElement.querySelector(".katex");if(!n)return!1;if(n.className="__se__katex "+n.className,n.setAttribute("contenteditable",!1),n.setAttribute("data-exp",this.util.HTMLEncoder(t)),n.setAttribute("data-font-size",e.fontSizeElement.value),n.style.fontSize=e.fontSizeElement.value,this.context.dialog.updateModal){const t=this.util.getParentElement(e._mathExp,".katex");t.parentNode.replaceChild(n,t),this.setRange(n,0,n,1)}else{const e=this.getSelectedElements();if(e.length>1){const t=this.util.createElement(e[0].nodeName);if(t.appendChild(n),!this.insertNode(t,null,!0))return!1}else if(!this.insertNode(n,null,!0))return!1;const t=this.util.createTextNode(this.util.zeroWidthSpace);n.parentNode.insertBefore(t,n.nextSibling),this.setRange(n,0,n,1)}return e.focusElement.value="",e.fontSizeElement.value="1em",e.previewElement.style.fontSize="1em",e.previewElement.innerHTML="",!0}.bind(this);try{t()&&(this.plugins.dialog.close.call(this),this.history.push(!1))}catch(e){this.plugins.dialog.close.call(this)}finally{this.closeLoading()}return!1},active:function(e){if(e){if(e.getAttribute("data-exp"))return this.controllerArray.indexOf(this.context.math.mathController)<0&&(this.setRange(e,0,e,1),this.plugins.math.call_controller.call(this,e)),!0}else this.controllerArray.indexOf(this.context.math.mathController)>-1&&this.controllersOff();return!1},on:function(e){if(e){const e=this.context.math;if(e._mathExp){const t=this.util.HTMLDecoder(e._mathExp.getAttribute("data-exp")),n=e._mathExp.getAttribute("data-font-size")||"1em";this.context.dialog.updateModal=!0,e.focusElement.value=t,e.fontSizeElement.value=n,e.previewElement.innerHTML=this.plugins.math._renderer.call(this,t),e.previewElement.style.fontSize=n}}else this.plugins.math.init.call(this)},call_controller:function(e){this.context.math._mathExp=e;const t=this.context.math.mathController;this.setControllerPosition(t,e,"bottom",{left:0,top:0}),this.controllersOn(t,e,"math")},onClick_mathController:function(e){e.stopPropagation();const t=e.target.getAttribute("data-command")||e.target.parentNode.getAttribute("data-command");t&&(e.preventDefault(),/update/.test(t)?(this.context.math.focusElement.value=this.util.HTMLDecoder(this.context.math._mathExp.getAttribute("data-exp")),this.plugins.dialog.open.call(this,"math",!0)):(this.util.removeItem(this.context.math._mathExp),this.context.math._mathExp=null,this.focus(),this.history.push(!1)),this.controllersOff())},init:function(){const e=this.context.math;e.mathController.style.display="none",e._mathExp=null,e.focusElement.value="",e.previewElement.innerHTML=""}};var yi=n(8438),vi=n.n(yi);const bi={name:"imageGallery",add:function(e){e.addModule([vi()]);e.context.imageGallery={title:e.lang.toolbar.imageGallery,url:e.options.imageGalleryUrl,header:e.options.imageGalleryHeader,listClass:"se-image-list",itemTemplateHandler:this.drawItems,selectorHandler:this.setImage.bind(e),columnSize:4}},open:function(e){this.plugins.fileBrowser.open.call(this,"imageGallery",e)},drawItems:function(e){const t=e.src.split("/").pop();return'
    '+(e.alt||t)+'
    '+(e.name||t)+"
    "},setImage:function(e,t){this.callPlugin("image",function(){const n={name:t,size:0};this.plugins.image.create_image.call(this,e.getAttribute("data-value"),null,this.context.image._origin_w,this.context.image._origin_h,"none",n,e.alt)}.bind(this),null)}},_i={blockquote:{name:"blockquote",display:"command",add:function(e,t){e.context.blockquote={targetButton:t,tag:e.util.createElement("BLOCKQUOTE")}},active:function(e){if(e){if(/blockquote/i.test(e.nodeName))return this.util.addClass(this.context.blockquote.targetButton,"active"),!0}else this.util.removeClass(this.context.blockquote.targetButton,"active");return!1},action:function(){const e=this.util.getParentElement(this.getSelectionNode(),"blockquote");e?this.detachRangeFormatElement(e,null,null,!1,!1):this.applyRangeFormatElement(this.context.blockquote.tag.cloneNode(!1))}},align:{name:"align",display:"submenu",add:function(e,t){const n=e.icons,i=e.context;i.align={targetButton:t,_itemMenu:null,_alignList:null,currentAlign:"",defaultDir:e.options.rtl?"right":"left",icons:{justify:n.align_justify,left:n.align_left,right:n.align_right,center:n.align_center}};let o=this.setSubmenu(e),r=i.align._itemMenu=o.querySelector("ul");r.addEventListener("click",this.pickup.bind(e)),i.align._alignList=r.querySelectorAll("li button"),e.initMenuTarget(this.name,t,o),o=null,r=null},setSubmenu:function(e){const t=e.lang,n=e.icons,i=e.util.createElement("DIV"),o=e.options.alignItems;let r="";for(let e,i,s=0;s";return i.className="se-submenu se-list-layer se-list-align",i.innerHTML='
      '+r+"
    ",i},active:function(e){const t=this.context.align,n=t.targetButton,i=n.firstElementChild;if(e){if(this.util.isFormatElement(e)){const o=e.style.textAlign;if(o)return this.util.changeElement(i,t.icons[o]||t.icons[t.defaultDir]),n.setAttribute("data-focus",o),!0}}else this.util.changeElement(i,t.icons[t.defaultDir]),n.removeAttribute("data-focus");return!1},on:function(){const e=this.context.align,t=e._alignList,n=e.targetButton.getAttribute("data-focus")||e.defaultDir;if(n!==e.currentAlign){for(let e=0,i=t.length;e
    • ";for(r=0,s=l.length;r";return a+="
    ",n.innerHTML=a,n},active:function(e){const t=this.context.font.targetText,n=this.context.font.targetTooltip;if(e){if(e.style&&e.style.fontFamily.length>0){const i=e.style.fontFamily.replace(/["']/g,"");return this.util.changeTxt(t,i),this.util.changeTxt(n,this.lang.toolbar.font+" ("+i+")"),!0}}else{const e=this.hasFocus?this.wwComputedStyle.fontFamily:this.lang.toolbar.font;this.util.changeTxt(t,e),this.util.changeTxt(n,this.hasFocus?this.lang.toolbar.font+(e?" ("+e+")":""):e)}return!1},on:function(){const e=this.context.font,t=e._fontList,n=e.targetText.textContent;if(n!==e.currentFont){for(let e=0,i=t.length;e('+n.toolbar.default+")";for(let e,n=0,i=t.fontSizeUnit,s=o.length;n";return r+="",i.innerHTML=r,i},active:function(e){if(e){if(e.style&&e.style.fontSize.length>0)return this.util.changeTxt(this.context.fontSize.targetText,this._convertFontSize.call(this,this.options.fontSizeUnit,e.style.fontSize)),!0}else this.util.changeTxt(this.context.fontSize.targetText,this.hasFocus?this._convertFontSize.call(this,this.options.fontSizeUnit,this.wwComputedStyle.fontSize):this.lang.toolbar.fontSize);return!1},on:function(){const e=this.context.fontSize,t=e._sizeList,n=e.targetText.textContent;if(n!==e.currentSize){for(let e=0,i=t.length;e";return n.className="se-submenu se-list-layer se-list-line",n.innerHTML='
      '+o+"
    ",n},active:function(e){if(e){if(/HR/i.test(e.nodeName))return this.context.horizontalRule.currentHR=e,this.util.hasClass(e,"on")||(this.util.addClass(e,"on"),this.controllersOn("hr",this.util.removeClass.bind(this.util,e,"on"))),!0}else this.util.hasClass(this.context.horizontalRule.currentHR,"on")&&this.controllersOff();return!1},appendHr:function(e){return this.focus(),this.insertComponent(e.cloneNode(!1),!1,!0,!1)},horizontalRulePick:function(e){e.preventDefault(),e.stopPropagation();let t=e.target,n=t.getAttribute("data-command");for(;!n&&!/UL/i.test(t.tagName);)t=t.parentNode,n=t.getAttribute("data-command");if(!n)return;const i=this.plugins.horizontalRule.appendHr.call(this,t.firstElementChild);i&&(this.setRange(i,0,i,0),this.submenuOff())}},list:{name:"list",display:"submenu",add:function(e,t){const n=e.context;n.list={targetButton:t,_list:null,currentList:"",icons:{bullets:e.icons.list_bullets,number:e.icons.list_number}};let i=this.setSubmenu(e),o=i.querySelector("ul");o.addEventListener("click",this.pickup.bind(e)),n.list._list=o.querySelectorAll("li button"),e.initMenuTarget(this.name,t,i),i=null,o=null},setSubmenu:function(e){const t=e.lang,n=e.util.createElement("DIV");return n.className="se-submenu se-list-layer",n.innerHTML='
    ",n},active:function(e){const t=this.context.list.targetButton,n=t.firstElementChild,i=this.util;if(i.isList(e)){const o=e.nodeName;return t.setAttribute("data-focus",o),i.addClass(t,"active"),/UL/i.test(o)?i.changeElement(n,this.context.list.icons.bullets):i.changeElement(n,this.context.list.icons.number),!0}return t.removeAttribute("data-focus"),i.changeElement(n,this.context.list.icons.number),i.removeClass(t,"active"),!1},on:function(){const e=this.context.list,t=e._list,n=e.targetButton.getAttribute("data-focus")||"";if(n!==e.currentList){for(let e=0,i=t.length;e"),t.innerHTML+=n.outerHTML,e&&(t.innerHTML+="
    ")}else{const e=n.childNodes;for(;e[0];)t.appendChild(e[0])}l.appendChild(t),a||(h=l),a&&m===f&&!r.isRangeFormatElement(y)||(u||(u=l),i&&a&&m===f||a&&r.isList(f)&&f===c||l.parentNode!==m&&m.insertBefore(l,y)),r.removeItem(n),i&&null===p&&(p=l.children.length-1),a&&(r.getRangeFormatElement(f,g)!==r.getRangeFormatElement(c,g)||r.isList(f)&&r.isList(c)&&r.getElementDepth(f)!==r.getElementDepth(c))&&(l=r.createElement(e)),v&&0===v.children.length&&r.removeItem(v)}else r.removeItem(n);p&&(u=u.children[p]),s&&(f=l.children.length-1,l.innerHTML+=c.innerHTML,h=l.children[f],r.removeItem(c))}else{if(n)for(let e=0,t=o.length;e=0;n--)if(o[n].contains(o[e])){o.splice(e,1),e--,t--;break}const t=r.getRangeFormatElement(s),i=t&&t.tagName===e;let l,a;const c=function(e){return!this.isComponent(e)}.bind(r);i||(a=r.createElement(e));for(let t,s,u=0,d=o.length;u0){const e=o.cloneNode(!1),t=o.childNodes,r=this.util.getPositionIndex(i);for(;t[r];)e.appendChild(t[r]);n.appendChild(e)}0===o.children.length&&this.util.removeItem(o),this.util.mergeSameTags(s);const l=this.util.getEdgeChildNodes(t,n);return{cc:t.parentNode,sc:l.sc,ec:l.ec}},editInsideList:function(e,t){const n=(t=t||this.getSelectedElements().filter(function(e){return this.isListCell(e)}.bind(this.util))).length;if(0===n||!e&&!this.util.isListCell(t[0].previousElementSibling)&&!this.util.isListCell(t[n-1].nextElementSibling))return{sc:t[0],so:0,ec:t[n-1],eo:1};let i=t[0].parentNode,o=t[n-1],r=null;if(e){if(i!==o.parentNode&&this.util.isList(o.parentNode.parentNode)&&o.nextElementSibling)for(o=o.nextElementSibling;o;)t.push(o),o=o.nextElementSibling;r=this.plugins.list.editList.call(this,i.nodeName.toUpperCase(),t,!0)}else{let e=this.util.createElement(i.nodeName),s=t[0].previousElementSibling,l=o.nextElementSibling;const a={s:null,e:null,sl:i,el:i};for(let o,r=0,c=n;r span > span"),i.columnFixedButton=s.querySelector("._se_table_fixed_column"),i.headerButton=s.querySelector("._se_table_header");let l=this.setController_tableEditor(e,i.cellControllerTop);i.resizeDiv=l,i.splitMenu=l.querySelector(".se-btn-group-sub"),i.mergeButton=l.querySelector("._se_table_merge_button"),i.splitButton=l.querySelector("._se_table_split_button"),i.insertRowAboveButton=l.querySelector("._se_table_insert_row_a"),i.insertRowBelowButton=l.querySelector("._se_table_insert_row_b"),r.addEventListener("mousemove",this.onMouseMove_tablePicker.bind(e,i)),r.addEventListener("click",this.appendTable.bind(e)),l.addEventListener("click",this.onClick_tableController.bind(e)),s.addEventListener("click",this.onClick_tableController.bind(e)),e.initMenuTarget(this.name,t,o),n.element.relative.appendChild(l),n.element.relative.appendChild(s),o=null,r=null,l=null,s=null,i=null},setSubmenu:function(e){const t=e.util.createElement("DIV");return t.className="se-submenu se-selector-table",t.innerHTML='
    1 x 1
    ',t},setController_table:function(e){const t=e.lang,n=e.icons,i=e.util.createElement("DIV");return i.className="se-controller se-controller-table",i.innerHTML='
    ",i},setController_tableEditor:function(e,t){const n=e.lang,i=e.icons,o=e.util.createElement("DIV");return o.className="se-controller se-controller-table-cell",o.innerHTML=(t?"":'
    ')+'
    • '+n.controller.VerticalSplit+'
    • '+n.controller.HorizontalSplit+"
    ",o},appendTable:function(){const e=this.util.createElement("TABLE"),t=this.plugins.table.createCells,n=this.context.table._tableXY[0];let i=this.context.table._tableXY[1],o="";for(;i>0;)o+=""+t.call(this,"td",n)+"",--i;o+="",e.innerHTML=o;if(this.insertComponent(e,!1,!0,!1)){const t=e.querySelector("td div");this.setRange(t,0,t,0),this.plugins.table.reset_table_picker.call(this)}},createCells:function(e,t,n){if(e=e.toLowerCase(),n){const t=this.util.createElement(e);return t.innerHTML="

    ",t}{let n="";for(;t>0;)n+="<"+e+">

    ",t--;return n}},onMouseMove_tablePicker:function(e,t){t.stopPropagation();let n=this._w.Math.ceil(t.offsetX/18),i=this._w.Math.ceil(t.offsetY/18);n=n<1?1:n,i=i<1?1:i,e._rtl&&(e.tableHighlight.style.left=18*n-13+"px",n=11-n),e.tableHighlight.style.width=n+"em",e.tableHighlight.style.height=i+"em",this.util.changeTxt(e.tableDisplay,n+" x "+i),e._tableXY=[n,i]},reset_table_picker:function(){if(!this.context.table.tableHighlight)return;const e=this.context.table.tableHighlight.style,t=this.context.table.tableUnHighlight.style;e.width="1em",e.height="1em",t.width="10em",t.height="10em",this.util.changeTxt(this.context.table.tableDisplay,"1 x 1"),this.submenuOff()},init:function(){const e=this.context.table,t=this.plugins.table;if(t._removeEvents.call(this),t._selectedTable){const e=t._selectedTable.querySelectorAll(".se-table-selected-cell");for(let t=0,n=e.length;t0)for(let e,t=0;tr||(d>=e.index?(i+=e.cs,d+=e.cs,e.rs-=1,e.row=r+1,e.rs<1&&(a.splice(t,1),t--)):h===p-1&&(e.rs-=1,e.row=r+1,e.rs<1&&(a.splice(t,1),t--)));if(r===s&&h===o){n._logical_cellIndex=d;break}u>0&&l.push({index:d,cs:c+1,rs:u,row:-1}),i+=c}a=a.concat(l).sort((function(e,t){return e.index-t.index})),l=[]}l=null,a=null}},editTable:function(e,t){const n=this.plugins.table,i=this.context.table,o=i._element,r="row"===e;if(r){const e=i._trElement.parentNode;if(/^THEAD$/i.test(e.nodeName)){if("up"===t)return;if(!e.nextElementSibling||!/^TBODY$/i.test(e.nextElementSibling.nodeName))return void(o.innerHTML+=""+n.createCells.call(this,"td",i._logical_cellCnt,!1)+"")}}if(n._ref){const e=i._tdElement,o=n._selectedCells;if(r)if(t)n.setCellInfo.call(this,"up"===t?o[0]:o[o.length-1],!0),n.editRow.call(this,t,e);else{let e=o[0].parentNode;const i=[o[0]];for(let t,n=1,r=o.length;ns&&s>t&&(e[o].rowSpan=n+l,c-=i)}if(i){const e=a[r+1];if(e){const t=[];let n=a[r].cells,i=0;for(let e,o,r=0,s=n.length;r1&&(e.rowSpan-=1,t.push({cell:e.cloneNode(!1),index:o}));if(t.length>0){let o=t.shift();n=e.cells,i=0;for(let r,s,l=0,a=n.length;l=o.index)||(l--,i--,i+=o.cell.colSpan-1,e.insertBefore(o.cell,r),o=t.shift(),o));l++);if(o){e.appendChild(o.cell);for(let n=0,i=t.length;n0){const e=!r[v+1];for(let t,n=0;ny||(f>=t.index?(m+=t.cs,f=v+m,t.rs-=1,t.row=y+1,t.rs<1&&(u.splice(n,1),n--)):e&&(t.rs-=1,t.row=y+1,t.rs<1&&(u.splice(n,1),n--)))}n>0&&c.push({rs:n,cs:a+1,index:f,row:-1}),f>=t&&f+a<=t+s?h.push(e):f<=t+s&&f+a>=t?e.colSpan-=i.getOverlapRangeAtIndex(l,l+s,f,f+a):n>0&&(ft+s)&&p.push({cell:e,i:y,rs:y+n}),m+=a}else{if(v>=t)break;if(a>0){if(d<1&&a+v>=t){e.colSpan+=1,t=null,d=n+1;break}t-=a}if(!g){for(let e,n=0;n0){d-=1;continue}null!==t&&r.length>0&&(f=this.plugins.table.createCells.call(this,r[0].nodeName,0,!0),f=e.insertBefore(f,r[t]))}}if(o){let e,t;for(let n,o=0,r=h.length;o1)c.colSpan=this._w.Math.floor(e/2),o.colSpan=e-c.colSpan,s.insertBefore(c,o.nextElementSibling);else{let t=[],n=[];for(let s,a,c=0,u=i._rowCnt;c0)for(let e,t=0;tc||(d>=e.index?(a+=e.cs,d+=e.cs,e.rs-=1,e.row=c+1,e.rs<1&&(n.splice(t,1),t--)):h===p-1&&(e.rs-=1,e.row=c+1,e.rs<1&&(n.splice(t,1),t--)));if(d<=l&&u>0&&t.push({index:d,cs:r+1,rs:u,row:-1}),i!==o&&d<=l&&d+r>=l+e-1){i.colSpan+=1;break}if(d>l)break;a+=r}n=n.concat(t).sort((function(e,t){return e.index-t.index})),t=[]}s.insertBefore(c,o.nextElementSibling)}}else{const e=o.rowSpan;if(c.colSpan=o.colSpan,e>1){c.rowSpan=this._w.Math.floor(e/2);const n=e-c.rowSpan,i=[],a=t.getArrayIndex(r,s)+n;for(let e,t,n=0;n=l));c++)o=e[c],r=o.rowSpan-1,r>0&&r+n>=a&&s=h.index&&(a+=h.cs,o+=h.cs,h=i.shift()),o>=l||r===s-1){u.insertBefore(c,e.nextElementSibling);break}a+=t}o.rowSpan=n}else{c.rowSpan=o.rowSpan;const e=t.createElement("TR");e.appendChild(c);for(let e,t=0;t=a&&(e[n].rowSpan+=1)}const n=i._physical_cellIndex,l=s.cells;for(let e=0,t=l.length;e0&&s+r>=i&&(e.rowSpan-=n.getOverlapRangeAtIndex(i,o,s,s+r));else r.push(e[s]);for(let e=0,t=r.length;e"+this.plugins.table.createCells.call(this,"th",this.context.table._logical_cellCnt,!1)+"",i.insertBefore(t,i.firstElementChild)}e.toggleClass(t,"active"),/TH/i.test(this.context.table._tdElement.nodeName)?this.controllersOff():this.plugins.table.setPositionControllerDiv.call(this,this.context.table._tdElement,!1)},setTableStyle:function(e){const t=this.context.table,n=t._element;let i,o,r,s;e.indexOf("width")>-1&&(i=t.resizeButton.firstElementChild,o=t.resizeText,t._maxWidth?(r=t.icons.reduction,s=t.minText,t.columnFixedButton.style.display="block",this.util.removeClass(n,"se-table-size-auto"),this.util.addClass(n,"se-table-size-100")):(r=t.icons.expansion,s=t.maxText,t.columnFixedButton.style.display="none",this.util.removeClass(n,"se-table-size-100"),this.util.addClass(n,"se-table-size-auto")),this.util.changeElement(i,r),this.util.changeTxt(o,s)),e.indexOf("column")>-1&&(t._fixedColumn?(this.util.removeClass(n,"se-table-layout-auto"),this.util.addClass(n,"se-table-layout-fixed"),this.util.addClass(t.columnFixedButton,"active")):(this.util.removeClass(n,"se-table-layout-fixed"),this.util.addClass(n,"se-table-layout-auto"),this.util.removeClass(t.columnFixedButton,"active")))},setActiveButton:function(e,t){const n=this.context.table;/^TH$/i.test(e.nodeName)?(n.insertRowAboveButton.setAttribute("disabled",!0),n.insertRowBelowButton.setAttribute("disabled",!0)):(n.insertRowAboveButton.removeAttribute("disabled"),n.insertRowBelowButton.removeAttribute("disabled")),t&&e!==t?(n.splitButton.setAttribute("disabled",!0),n.mergeButton.removeAttribute("disabled")):(n.splitButton.removeAttribute("disabled"),n.mergeButton.setAttribute("disabled",!0))},_bindOnSelect:null,_bindOffSelect:null,_bindOffShift:null,_selectedCells:null,_shift:!1,_fixedCell:null,_fixedCellName:null,_selectedCell:null,_selectedTable:null,_ref:null,_toggleEditor:function(e){this.context.element.wysiwyg.setAttribute("contenteditable",e),e?this.util.removeClass(this.context.element.wysiwyg,"se-disabled"):this.util.addClass(this.context.element.wysiwyg,"se-disabled")},_offCellMultiSelect:function(e){e.stopPropagation();const t=this.plugins.table;t._shift?t._initBind&&(this._wd.removeEventListener("touchmove",t._initBind),t._initBind=null):(t._removeEvents.call(this),t._toggleEditor.call(this,!0)),t._fixedCell&&t._selectedTable&&(t.setActiveButton.call(this,t._fixedCell,t._selectedCell),t.call_controller_tableEdit.call(this,t._selectedCell||t._fixedCell),t._selectedCells=t._selectedTable.querySelectorAll(".se-table-selected-cell"),t._selectedCell&&t._fixedCell&&this.focusEdge(t._selectedCell),t._shift||(t._fixedCell=null,t._selectedCell=null,t._fixedCellName=null))},_onCellMultiSelect:function(e){this._antiBlur=!0;const t=this.plugins.table,n=this.util.getParentElement(e.target,this.util.isCell);if(t._shift)n===t._fixedCell?t._toggleEditor.call(this,!0):t._toggleEditor.call(this,!1);else if(!t._ref){if(n===t._fixedCell)return;t._toggleEditor.call(this,!1)}n&&n!==t._selectedCell&&t._fixedCellName===n.nodeName&&t._selectedTable===this.util.getParentElement(n,"TABLE")&&(t._selectedCell=n,t._setMultiCells.call(this,t._fixedCell,n))},_setMultiCells:function(e,t){const n=this.plugins.table,i=n._selectedTable.rows,o=this.util,r=n._selectedTable.querySelectorAll(".se-table-selected-cell");for(let e=0,t=r.length;e0)for(let e,t=0;tu||(d>=e.index?(r+=e.cs,d+=e.cs,e.rs-=1,e.row=u+1,e.rs<1&&(l.splice(t,1),t--)):f===g-1&&(e.rs-=1,e.row=u+1,e.rs<1&&(l.splice(t,1),t--)));if(s){if(i!==e&&i!==t||(c.cs=null!==c.cs&&c.csd+h?c.ce:d+h,c.rs=null!==c.rs&&c.rsu+p?c.re:u+p,c._i+=1),2===c._i){s=!1,l=[],a=[],u=-1;break}}else if(o.getOverlapRangeAtIndex(c.cs,c.ce,d,d+h)&&o.getOverlapRangeAtIndex(c.rs,c.re,u,u+p)){const e=c.csd+h?c.ce:d+h,n=c.rsu+p?c.re:u+p;if(c.cs!==e||c.ce!==t||c.rs!==n||c.re!==r){c.cs=e,c.ce=t,c.rs=n,c.re=r,u=-1,l=[],a=[];break}o.addClass(i,"se-table-selected-cell")}p>0&&a.push({index:d,cs:h+1,rs:p,row:-1}),r+=i.colSpan-1}l=l.concat(a).sort((function(e,t){return e.index-t.index})),a=[]}},_removeEvents:function(){const e=this.plugins.table;e._initBind&&(this._wd.removeEventListener("touchmove",e._initBind),e._initBind=null),e._bindOnSelect&&(this._wd.removeEventListener("mousedown",e._bindOnSelect),this._wd.removeEventListener("mousemove",e._bindOnSelect),e._bindOnSelect=null),e._bindOffSelect&&(this._wd.removeEventListener("mouseup",e._bindOffSelect),e._bindOffSelect=null),e._bindOffShift&&(this._wd.removeEventListener("keyup",e._bindOffShift),e._bindOffShift=null)},_initBind:null,onTableCellMultiSelect:function(e,t){const n=this.plugins.table;n._removeEvents.call(this),this.controllersOff(),n._shift=t,n._fixedCell=e,n._fixedCellName=e.nodeName,n._selectedTable=this.util.getParentElement(e,"TABLE");const i=n._selectedTable.querySelectorAll(".se-table-selected-cell");for(let e=0,t=i.length;e-1?(t=e.toLowerCase(),i="blockquote"===t?"range":"pre"===t?"free":"replace",a=/^h/.test(t)?t.match(/\d+/)[0]:"",l=n["tag_"+(a?"h":t)]+a,u="",c=""):(t=e.tag.toLowerCase(),i=e.command,l=e.name||t,u=e.class,c=u?' class="'+u+'"':""),s+='
  • ";return s+="",i.innerHTML=s,i},active:function(e){let t=this.lang.toolbar.formats;const n=this.context.formatBlock.targetText;if(e){if(this.util.isFormatElement(e)){const i=this.context.formatBlock._formatList,o=e.nodeName.toLowerCase(),r=(e.className.match(/(\s|^)__se__format__[^\s]+/)||[""])[0].trim();for(let e,n=0,s=i.length;n=0;d--)if(i=f[d],i!==(f[d+1]?f[d+1].parentNode:null)){if(u=a.isComponent(i),r=u?"":i.innerHTML.replace(/(?!>)\s+(?=<)|\n/g," "),s=a.getParentElement(i,(function(e){return e.parentNode===t})),(t!==i.parentNode||u)&&(a.isFormatElement(t)?(t.parentNode.insertBefore(n,t.nextSibling),t=t.parentNode):(t.insertBefore(n,s?s.nextSibling:null),t=i.parentNode),l=n.nextSibling,l&&n.nodeName===l.nodeName&&a.isSameAttributes(n,l)&&(n.innerHTML+="
    "+l.innerHTML,a.removeItem(l)),n=o.cloneNode(!1),h=!0),c=n.innerHTML,n.innerHTML=(h||!r||!c||/
    $/i.test(r)?r:r+"
    ")+c,0===d){t.insertBefore(n,i),l=i.nextSibling,l&&n.nodeName===l.nodeName&&a.isSameAttributes(n,l)&&(n.innerHTML+="
    "+l.innerHTML,a.removeItem(l));const e=n.previousSibling;e&&n.nodeName===e.nodeName&&a.isSameAttributes(n,e)&&(e.innerHTML+="
    "+n.innerHTML,a.removeItem(n))}u||a.removeItem(i),r&&(h=!1)}this.setRange(i,0,i,0)}else{for(let e,t,n=0,s=f.length;n('+n.toolbar.default+")";for(let e,t=0,n=o.length;t";return r+="",i.innerHTML=r,i},on:function(){const e=this.context.lineHeight,t=e._sizeList,n=this.util.getFormatElement(this.getSelectionNode()),i=n?n.style.lineHeight+"":"";if(i!==e.currentSize){for(let e=0,n=t.length;e"}return s+="",n.innerHTML=s,n},on:function(){const e=this.context.paragraphStyle._classList,t=this.util.getFormatElement(this.getSelectionNode());for(let n=0,i=e.length;n"}return r+="",n.innerHTML=r,n},on:function(){const e=this.util,t=this.context.textStyle._styleList,n=this.getSelectionNode();for(let i,o,r,s=0,l=t.length;s{if(!t.has(e))throw TypeError("Cannot "+n)},Ci=(e,t,n)=>(wi(e,t,"read from private field"),n?n.call(e):t.get(e)),xi=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ei=(e,t,n,i)=>(wi(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Si=(e,t,n)=>(wi(e,t,"access private method"),n);async function ki(e,t={}){const{local:n=!1,version:i="latest",cdnUrl:o,...r}=t,s=function(e,t,n){let i=`https://cdn.jsdelivr.net/npm/emojibase-data@${t}/${e}`;return"function"==typeof n?i=n(e,t):"string"==typeof n&&(i=`${n}/${e}`),i}(e,i,o),l=n?localStorage:sessionStorage,a=`emojibase/${i}/${e}`,c=l.getItem(a);if(c)return Promise.resolve(JSON.parse(c));const u=await fetch(s,{credentials:"omit",mode:"cors",redirect:"error",...r});if(!u.ok)throw new Error("Failed to load Emojibase dataset.");const d=await u.json();try{l.setItem(a,JSON.stringify(d))}catch{}return d}const Ti={discord:"joypixels",slack:"iamcal"};async function Ni(e,t,n){var i;return ki(`${e}/shortcodes/${null!==(i=Ti[t])&&void 0!==i?i:t}.json`,n)}function Ai(e,t){if(0===t.length)return e;const n=new Set(e.shortcodes);return t.forEach((t=>{const i=t[e.hexcode];Array.isArray(i)?i.forEach((e=>n.add(e))):i&&n.add(i)})),e.shortcodes=[...n],e.skins&&e.skins.forEach((e=>{Ai(e,t)})),e}async function Li(e,t={}){const{compact:n=!1,flat:i=!1,shortcodes:o=[],...r}=t,s=await ki(`${e}/${n?"compact":"data"}.json`,r);let l=[];return o.length>0&&(l=await Promise.all(o.map((t=>{let n;if(t.includes("/")){const[e,i]=t.split("/");n=Ni(e,i,r)}else n=Ni(e,t,r);return n.catch((()=>({})))})))),i?function(e,t=[]){const n=[];return e.forEach((e=>{if(e.skins){const{skins:i,...o}=e;n.push(Ai(o,t)),i.forEach((e=>{const i={...e};o.tags&&(i.tags=[...o.tags]),n.push(Ai(i,t))}))}else n.push(Ai(e,t))})),n}(s,l):function(e,t){return 0===t.length||e.forEach((e=>{Ai(e,t)})),e}(s,l)}async function Oi(e,t){return ki(`${e}/messages.json`,t)}function Bi(e,t){const n=e.target.closest("[data-emoji]");if(n){const e=t.find((e=>e.emoji===n.dataset.emoji));if(e)return e}return null}function Ri(e){var t;const n=null==(t=window.matchMedia)?void 0:t.call(window,"(prefers-reduced-motion: reduce)");return e.animate&&!(null!=n&&n.matches)}function Pi(e,t){return e.toLowerCase().includes(t.toLowerCase())}function Ii(e,t,n,i){if(Ri(i)&&e.animate)return e.animate(t,n).finished;const o="normal"===n.direction?1:0,r=Object.entries(t).reduce(((e,[t,n])=>({...e,[t]:n[o]})),{});return Object.assign(e.style,r),Promise.resolve()}function Mi(e){var t;const n=document.createElement("template");return n.innerHTML=e,null==(t=n.content)?void 0:t.firstElementChild}function zi(...e){return e.reduce(((e,t)=>({...e,[t]:Fi(t)})),{})}function Fi(e){return`picmo__${e}`}function ji(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Di(e,...t){ji(e).append(...t)}function Hi(e){try{return window[e].length,!0}catch{return!1}}function Vi(){return Hi("sessionStorage")}function Ui(e){var t;return{emoji:e.emoji,label:e.label,tags:e.tags,skins:null==(t=e.skins)?void 0:t.map((e=>Ui(e))),order:e.order,custom:!1,hexcode:e.hexcode,version:e.version}}function Wi(e,t,n){var i;return!(n&&!n.some((t=>t.order===e.group)))&&(Pi(e.label,t)||(null==(i=e.tags)?void 0:i.some((e=>Pi(e,t)))))}class $i{constructor(e="en"){this.locale=e}}const qi=[(e,t)=>("1F91D"===e.hexcode&&t<14&&(e.skins=[]),e),(e,t)=>(e.skins&&(e.skins=e.skins.filter((e=>!e.version||e.version<=t))),e)];function Zi(e,t){return e.filter((e=>null!==function(e,t){return qi.some((n=>null===n(e,t)))?null:e}(e,t)))}const Yi={};function Gi(e){return Yi[e]||(Yi[e]=new Ki(e)),Yi[e]}Gi.deleteDatabase=e=>{};class Ki extends $i{open(){return Promise.resolve()}delete(){return Promise.resolve()}close(){}isPopulated(){return Promise.resolve(!1)}getEmojiCount(){return Promise.resolve(this.emojis.length)}getEtags(){return Promise.resolve({foo:"bar"})}getHash(){return Promise.resolve("")}populate(e){return this.categories=e.groups,this.emojis=e.emojis,Promise.resolve()}getCategories(e){var t;let n=this.categories.filter((e=>"component"!==e.key));if(e.showRecents&&n.unshift({key:"recents",order:-1}),null!=(t=e.custom)&&t.length&&n.push({key:"custom",order:10}),e.categories){const t=e.categories;n=n.filter((e=>t.includes(e.key))),n.sort(((e,n)=>t.indexOf(e.key)-t.indexOf(n.key)))}else n.sort(((e,t)=>e.order-t.order));return Promise.resolve(n)}getEmojis(e,t){const n=this.emojis.filter((t=>t.group===e.order)).filter((e=>e.version<=t)).sort(((e,t)=>null!=e.order&&null!=t.order?e.order-t.order:0)).map(Ui);return Promise.resolve(Zi(n,t))}searchEmojis(e,t,n,i){const o=this.emojis.filter((t=>Wi(t,e,i)&&t.version<=n)).map(Ui),r=t.filter((t=>Wi(t,e,i))),s=[...Zi(o,n),...r];return Promise.resolve(s)}setMeta(e){this.meta=e}}async function Xi(e){try{return(await fetch(e,{method:"HEAD"})).headers.get("etag")}catch{return null}}async function Ji(e,t,n){let i=n||t(e);try{await i.open()}catch{console.warn("[picmo] IndexedDB not available, falling back to InMemoryStoreFactory"),i=Gi(e)}return i}async function Qi(e,t,n){if(!Vi()&&typeof window<"u")throw new Error("Session storage is required to use CDN emoji data.");const i=await Ji(e,t,n),[o,r]=await function(e){const{emojisUrl:t,messagesUrl:n}=function(e,t){const n=`https://cdn.jsdelivr.net/npm/emojibase-data@${"latest"}/${t}`;return{emojisUrl:`${n}/data.json`,messagesUrl:`${n}/messages.json`}}(0,e);try{return Promise.all([Xi(t),Xi(n)])}catch{return Promise.all([null,null])}}(e);if(await i.isPopulated())o&&r&&await async function(e,t,n){let i;try{i=await e.getEtags()}catch{i={}}const{storedEmojisEtag:o,storedMessagesEtag:r}=i;if(n!==r||t!==o){const[i,o]=await Promise.all([Oi(e.locale),Li(e.locale)]);await e.populate({groups:i.groups,emojis:o,emojisEtag:t,messagesEtag:n})}}(i,o,r);else{const[t,n]=await Promise.all([Oi(e),Li(e)]);await i.populate({groups:t.groups,emojis:n,emojisEtag:o,messagesEtag:r})}return i}async function eo(e,t,n,i,o){const r=await Ji(e,t,o),s=await async function(e){const t=(new TextEncoder).encode(e),n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map((e=>e.toString(16).padStart(2,"0"))).join("")}(i);return(!await r.isPopulated()||await async function(e,t){return t!==await e.getHash()}(r,s))&&await r.populate({groups:n.groups,emojis:i,hash:s}),r}async function to(e,t,n,i,o){return n&&i?eo(e,t,n,i,o):Qi(e,t,o)}class no{constructor(){this.handleKeyDown=this.handleKeyDown.bind(this)}activate(e){this.rootElement=e,this.rootElement.addEventListener("keydown",this.handleKeyDown)}deactivate(){var e;null==(e=this.rootElement)||e.removeEventListener("keydown",this.handleKeyDown)}get focusableElements(){return this.rootElement.querySelectorAll('input, [tabindex="0"]')}get lastFocusableElement(){return this.focusableElements[this.focusableElements.length-1]}get firstFocusableElement(){return this.focusableElements[0]}checkFocus(e,t,n){e.target===t&&(n.focus(),e.preventDefault())}handleKeyDown(e){"Tab"===e.key&&this.checkFocus(e,e.shiftKey?this.firstFocusableElement:this.lastFocusableElement,e.shiftKey?this.lastFocusableElement:this.firstFocusableElement)}}const{light:io,dark:oo,auto:ro}=zi("light","dark","auto");class so{constructor({template:e,classes:t,parent:n}){this.isDestroyed=!1,this.appEvents={},this.uiEvents=[],this.uiElements={},this.ui={},this.template=e,this.classes=t,this.parent=n,this.keyBindingHandler=this.keyBindingHandler.bind(this)}initialize(){this.bindAppEvents()}setCustomEmojis(e){this.customEmojis=e}setEvents(e){this.events=e}setPickerId(e){this.pickerId=e}emit(e,...t){this.events.emit(e,...t)}setI18n(e){this.i18n=e}setRenderer(e){this.renderer=e}setEmojiData(e){this.emojiDataPromise=e,e.then((e=>{this.emojiData=e}))}updateEmojiData(e){this.emojiData=e,this.emojiDataPromise=Promise.resolve(e)}setOptions(e){this.options=e}renderSync(e={}){return this.el=this.template.renderSync({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId,...e}),this.postRender(),this.el}async render(e={}){return await this.emojiDataPromise,this.el=await this.template.renderAsync({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId,...e}),this.postRender(),this.el}postRender(){this.bindUIElements(),this.bindKeyBindings(),this.bindUIEvents(),this.scheduleShowAnimation()}bindAppEvents(){Object.keys(this.appEvents).forEach((e=>{this.events.on(e,this.appEvents[e],this)})),this.events.on("data:ready",this.updateEmojiData,this)}unbindAppEvents(){Object.keys(this.appEvents).forEach((e=>{this.events.off(e,this.appEvents[e])})),this.events.off("data:ready",this.updateEmojiData)}keyBindingHandler(e){const t=this.keyBindings[e.key];t&&t.call(this,e)}bindKeyBindings(){this.keyBindings&&this.el.addEventListener("keydown",this.keyBindingHandler)}unbindKeyBindings(){this.keyBindings&&this.el.removeEventListener("keydown",this.keyBindingHandler)}bindUIElements(){this.ui=Object.keys(this.uiElements).reduce(((e,t)=>({...e,[t]:this.el.querySelector(this.uiElements[t])})),{})}bindUIEvents(){this.uiEvents.forEach((e=>{e.handler=e.handler.bind(this),(e.target?this.ui[e.target]:this.el).addEventListener(e.event,e.handler,e.options)}))}unbindUIEvents(){this.uiEvents.forEach((e=>{(e.target?this.ui[e.target]:this.el).removeEventListener(e.event,e.handler)}))}destroy(){this.unbindAppEvents(),this.unbindUIEvents(),this.unbindKeyBindings(),this.el.remove(),this.isDestroyed=!0}scheduleShowAnimation(){if(this.parent){const e=new MutationObserver((t=>{const[n]=t;"childList"===n.type&&n.addedNodes[0]===this.el&&(Ri(this.options)&&this.animateShow&&this.animateShow(),e.disconnect)}));e.observe(this.parent,{childList:!0})}}static childEvent(e,t,n,i={}){return{target:e,event:t,handler:n,options:i}}static uiEvent(e,t,n={}){return{event:e,handler:t,options:n}}static byClass(e){return`.${e}`}}const lo={clock:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',flag:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',frown:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',gamepad:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',lightbulb:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',mug:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',plane:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',robot:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',sad:'\n \n \n \n \n \n \n \x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e\n \n \n \n \n \n',search:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',smiley:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',symbols:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',tree:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',users:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',warning:'\n \n \n \n \n \n \n \x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e\n \n',xmark:'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e'},ao={recents:"clock","smileys-emotion":"smiley","people-body":"users","animals-nature":"tree","food-drink":"mug",activities:"gamepad","travel-places":"plane",objects:"lightbulb",symbols:"symbols",flags:"flag",custom:"robot"};function co(e,t){if(!(e in lo))return console.warn(`Unknown icon: "${e}"`),document.createElement("div");const n=function(e,t){const n=Mi(t);return n.dataset.icon=e,n.classList.add(Fi("icon")),n}(e,lo[e]);return t&&n.classList.add(Fi(`icon-${t}`)),n}const uo="sync";var ho,po,fo,go,mo,yo,vo,bo;class _o{constructor(e,t={}){xi(this,fo),xi(this,mo),xi(this,vo),xi(this,ho,void 0),xi(this,po,void 0),Ei(this,ho,e),Ei(this,po,t.mode||uo)}renderSync(e={}){const t=Mi(Ci(this,ho).call(this,e));return Si(this,vo,bo).call(this,t,e),Si(this,mo,yo).call(this,t),Si(this,fo,go).call(this,t,e),t}async renderAsync(e={}){const t=Mi(Ci(this,ho).call(this,e));return Si(this,vo,bo).call(this,t,e),Si(this,mo,yo).call(this,t),await Si(this,fo,go).call(this,t,e),t}render(e){return"sync"===Ci(this,po)?this.renderSync(e):this.renderAsync(e)}}ho=new WeakMap,po=new WeakMap,fo=new WeakSet,go=async function(e,t){const n=e.querySelectorAll("[data-view]"),i=[];for(const e of n){const n=t[e.dataset.view];n?"sync"!==e.dataset.render?i.push(n.render().then((t=>(e.replaceWith(t),t)))):e.replaceWith(n.renderSync()):e.remove()}return Promise.all(i)},mo=new WeakSet,yo=function(e){e.querySelectorAll("i[data-icon]").forEach((e=>{const{icon:t,size:n}=e.dataset;e.replaceWith(co(t,n))}))},vo=new WeakSet,bo=function(e,t){return e.querySelectorAll("[data-placeholder]").forEach((e=>{const n=e.dataset.placeholder;if(n&&t[n]){const i=t[n];e.replaceWith(...[i].flat())}else console.warn(`Missing placeholder element for key "${n}"`)})),e};const wo=zi("imagePlaceholder","placeholder"),Co=new _o((({classes:e})=>`\n
    \n`));class xo extends so{constructor({classNames:e}={}){super({template:Co,classes:wo}),this.classNames=e}load(e){const t=document.createElement("img");this.classNames&&(t.className=this.classNames),t.addEventListener("load",(()=>{this.el.replaceWith(t)}),{once:!0}),Promise.resolve(e).then((e=>t.src=e))}renderSync(){return super.renderSync(),this.classNames&&this.classNames.split(" ").forEach((e=>this.el.classList.add(e))),this.el}}const Eo=zi("customEmoji");class So{renderElement(e){return{content:e}}renderImage(e="",t){const n=new xo({classNames:e});return n.renderSync(),{content:n,resolver:()=>(n.load(t()),n.el)}}doRender(e,t,n){if(e.custom)return this.renderCustom(e,t,n);const{content:i,resolver:o}=this.render(e,n),r=i instanceof Element?i:i.el;return o&&o(),r}doEmit(e){return e.custom?this.emitCustom(e):this.emit(e)}emitCustom({url:e,label:t,emoji:n,data:i}){return{url:e,label:t,emoji:n,data:i}}renderCustom(e,t,n=""){const i=[Eo.customEmoji,n].join(" ").trim(),{content:o,resolver:r}=this.renderImage(i,(()=>e.url)),s=o instanceof Element?o:o.el;return r&&r(),s}}const ko=new _o((({emoji:e})=>`${e}`));class To extends So{render(e){return this.renderElement(ko.renderSync({emoji:e.emoji}))}emit({emoji:e,hexcode:t,label:n}){return{emoji:e,hexcode:t,label:n}}}const No={"categories.activities":"Activities","categories.animals-nature":"Animals & Nature","categories.custom":"Custom","categories.flags":"Flags","categories.food-drink":"Food & Drink","categories.objects":"Objects","categories.people-body":"People & Body","categories.recents":"Recently Used","categories.smileys-emotion":"Smileys & Emotion","categories.symbols":"Symbols","categories.travel-places":"Travel & Places","error.load":"Failed to load emojis","recents.clear":"Clear recent emojis","recents.none":"You haven't selected any emojis yet.",retry:"Try again","search.clear":"Clear search","search.error":"Failed to search emojis","search.notFound":"No results found",search:"Search emojis..."},Ao="PicMo";function Lo(e){return new Oo(e)}Lo.deleteDatabase=e=>new Promise(((t,n)=>{const i=indexedDB.deleteDatabase(`${Ao}-${e}`);i.addEventListener("success",t),i.addEventListener("error",n)}));class Oo extends $i{async open(){const e=indexedDB.open(`${Ao}-${this.locale}`);return new Promise(((t,n)=>{e.addEventListener("success",(e=>{var n;this.db=null==(n=e.target)?void 0:n.result,t()})),e.addEventListener("error",n),e.addEventListener("upgradeneeded",(async e=>{var t;this.db=null==(t=e.target)?void 0:t.result,this.db.createObjectStore("category",{keyPath:"order"});const n=this.db.createObjectStore("emoji",{keyPath:"emoji"});n.createIndex("category","group"),n.createIndex("version","version"),this.db.createObjectStore("meta")}))}))}async delete(){this.close();const e=indexedDB.deleteDatabase(`${Ao}-${this.locale}`);await this.waitForRequest(e)}close(){this.db.close()}async getEmojiCount(){const e=this.db.transaction("emoji","readonly").objectStore("emoji");return(await this.waitForRequest(e.count())).target.result}async getEtags(){const e=this.db.transaction("meta","readonly").objectStore("meta"),[t,n]=await Promise.all([this.waitForRequest(e.get("emojisEtag")),this.waitForRequest(e.get("messagesEtag"))]);return{storedEmojisEtag:t.target.result,storedMessagesEtag:n.target.result}}async setMeta(e){const t=this.db.transaction("meta","readwrite"),n=t.objectStore("meta");return new Promise((i=>{t.oncomplete=i,Object.keys(e).filter(Boolean).forEach((t=>{n.put(e[t],t)}))}))}async getHash(){const e=this.db.transaction("meta","readonly").objectStore("meta");return(await this.waitForRequest(e.get("hash"))).target.result}async isPopulated(){const e=this.db.transaction("category","readonly").objectStore("category");return(await this.waitForRequest(e.count())).target.result>0}async populate({groups:e,emojis:t,emojisEtag:n,messagesEtag:i,hash:o}){await this.removeAllObjects("category","emoji");const r=[this.addObjects("category",e),this.addObjects("emoji",t),this.setMeta({emojisEtag:n,messagesEtag:i,hash:o})];await Promise.all(r)}async getCategories(e){var t;const n=this.db.transaction("category","readonly").objectStore("category");let i=(await this.waitForRequest(n.getAll())).target.result.filter((e=>"component"!==e.key));if(e.showRecents&&i.unshift({key:"recents",order:-1}),null!=(t=e.custom)&&t.length&&i.push({key:"custom",order:10}),e.categories){const t=e.categories;i=i.filter((e=>t.includes(e.key))),i.sort(((e,n)=>t.indexOf(e.key)-t.indexOf(n.key)))}else i.sort(((e,t)=>e.order-t.order));return i}async getEmojis(e,t){const n=this.db.transaction("emoji","readonly").objectStore("emoji").index("category");return Zi((await this.waitForRequest(n.getAll(e.order))).target.result.filter((e=>e.version<=t)).sort(((e,t)=>null!=e.order&&null!=t.order?e.order-t.order:0)).map(Ui),t)}async searchEmojis(e,t,n,i){const o=[];return new Promise(((r,s)=>{const l=this.db.transaction("emoji","readonly").objectStore("emoji").openCursor();l.addEventListener("success",(s=>{var l;const a=null==(l=s.target)?void 0:l.result;if(!a)return r([...Zi(o,n),...t.filter((t=>Wi(t,e)))]);const c=a.value;Wi(c,e,i)&&c.version<=n&&o.push(Ui(c)),a.continue()})),l.addEventListener("error",(e=>{s(e)}))}))}async waitForRequest(e){return new Promise(((t,n)=>{e.onsuccess=t,e.onerror=n}))}withTransaction(e,t="readwrite",n){return new Promise(((i,o)=>{const r=this.db.transaction(e,t);r.oncomplete=i,r.onerror=o,n(r)}))}async removeAllObjects(...e){const t=this.db.transaction(e,"readwrite"),n=e.map((e=>t.objectStore(e)));await Promise.all(n.map((e=>this.waitForRequest(e.clear()))))}async addObjects(e,t){return this.withTransaction(e,"readwrite",(n=>{const i=n.objectStore(e);t.forEach((e=>{i.add(e)}))}))}}function Bo(){let e={};return{getItem:t=>e[t],setItem:(t,n)=>e[t]=n,length:Object.keys(e).length,clear:()=>e={},key:t=>Object.keys(e)[t],removeItem:t=>delete e[t]}}class Ro{}const Po="PicMo:recents";class Io extends Ro{constructor(e){super(),this.storage=e}clear(){this.storage.removeItem(Po)}getRecents(e){var t;try{return JSON.parse(null!=(t=this.storage.getItem(Po))?t:"[]").slice(0,e)}catch{return[]}}addOrUpdateRecent(e,t){const n=[e,...this.getRecents(t).filter((t=>t.hexcode!==e.hexcode))].slice(0,t);try{this.storage.setItem(Po,JSON.stringify(n))}catch{console.warn("storage is not available, recent emojis will not be saved")}}}class Mo extends Io{constructor(){super(Hi("localStorage")?localStorage:Bo())}}const zo={dataStore:Lo,theme:io,animate:!0,showCategoryTabs:!0,showPreview:!0,showRecents:!0,showSearch:!0,showVariants:!0,emojisPerRow:8,visibleRows:6,emojiVersion:"auto",i18n:No,locale:"en",maxRecents:50,custom:[]};var Fo,jo,Do,Ho,Vo;class Uo{constructor(){xi(this,jo),xi(this,Ho),xi(this,Fo,new Map)}on(e,t,n){Si(this,Ho,Vo).call(this,e,t,n)}once(e,t,n){Si(this,Ho,Vo).call(this,e,t,n,!0)}off(e,t){const n=Si(this,jo,Do).call(this,e);Ci(this,Fo).set(e,n.filter((e=>e.handler!==t)))}emit(e,...t){Si(this,jo,Do).call(this,e).forEach((n=>{n.handler.apply(n.context,t),n.once&&this.off(e,n.handler)}))}removeAll(){Ci(this,Fo).clear()}}Fo=new WeakMap,jo=new WeakSet,Do=function(e){return Ci(this,Fo).has(e)||Ci(this,Fo).set(e,[]),Ci(this,Fo).get(e)},Ho=new WeakSet,Vo=function(e,t,n,i=!1){Si(this,jo,Do).call(this,e).push({context:n,handler:t,once:i})};const Wo=!0;class $o extends Uo{}class qo extends Uo{}const Zo=zi("emojiCategory","categoryName","noRecents","recentEmojis");class Yo extends so{constructor({template:e,category:t,showVariants:n,lazyLoader:i}){super({template:e,classes:Zo}),this.baseUIElements={categoryName:so.byClass(Zo.categoryName)},this.category=t,this.showVariants=n,this.lazyLoader=i}setActive(e,t,n){this.emojiContainer.setActive(e,t,n)}}const Go=new _o((({classes:e,emoji:t})=>`\n \n
    \n \n`)),Ko=zi("emojiButton");class Xo extends so{constructor({emoji:e,lazyLoader:t,category:n}){super({template:Go,classes:Ko}),this.emoji=e,this.lazyLoader=t,this.category=n}initialize(){this.uiEvents=[so.uiEvent("focus",this.handleFocus)],super.initialize()}handleFocus(){this.category&&this.events.emit("focus:change",this.category)}activateFocus(e){this.el.tabIndex=0,e&&this.el.focus()}deactivateFocus(){this.el.tabIndex=-1}renderSync(){return super.renderSync({emoji:this.emoji,emojiContent:this.renderer.doRender(this.emoji,this.lazyLoader)})}}class Jo{constructor(e,t,n=0,i=0,o=!1){this.events=new Uo,this.keyHandlers={ArrowLeft:this.focusPrevious.bind(this),ArrowRight:this.focusNext.bind(this),ArrowUp:this.focusUp.bind(this),ArrowDown:this.focusDown.bind(this)},this.rowCount=Math.ceil(t/e),this.columnCount=e,this.focusedRow=n,this.focusedColumn=i,this.emojiCount=t,this.wrap=o,this.handleKeyDown=this.handleKeyDown.bind(this)}destroy(){this.events.removeAll()}on(e,t){this.events.on(e,t)}handleKeyDown(e){e.key in this.keyHandlers&&(e.preventDefault(),this.keyHandlers[e.key]())}setCell(e,t,n=!0){const i=this.getIndex();this.focusedRow=e,void 0!==t&&(this.focusedColumn=Math.min(this.columnCount,t)),(this.focusedRow>=this.rowCount||this.getIndex()>=this.emojiCount)&&(this.focusedRow=this.rowCount-1,this.focusedColumn=this.emojiCount%this.columnCount-1),this.events.emit("focus:change",{from:i,to:this.getIndex(),performFocus:n})}setFocusedIndex(e,t=!0){const n=Math.floor(e/this.columnCount),i=e%this.columnCount;this.setCell(n,i,t)}focusNext(){this.focusedColumn0?this.setCell(this.focusedRow,this.focusedColumn-1):this.focusedRow>0?this.setCell(this.focusedRow-1,this.columnCount-1):this.wrap?this.setCell(this.rowCount-1,this.columnCount-1):this.events.emit("focus:underflow",this.columnCount-1)}focusUp(){this.focusedRow>0?this.setCell(this.focusedRow-1,this.focusedColumn):this.events.emit("focus:underflow",this.focusedColumn)}focusDown(){this.focusedRow`\n
    \n
    \n
    \n`)),er=zi("emojiContainer");class tr extends so{constructor({emojis:e,showVariants:t,preview:n=!0,lazyLoader:i,category:o,fullHeight:r=!1}){super({template:Qo,classes:er}),this.fullHeight=!1,this.showVariants=t,this.lazyLoader=i,this.preview=n,this.emojis=e,this.category=o,this.fullHeight=r,this.setFocus=this.setFocus.bind(this),this.triggerNextCategory=this.triggerNextCategory.bind(this),this.triggerPreviousCategory=this.triggerPreviousCategory.bind(this)}initialize(){this.grid=new Jo(this.options.emojisPerRow,this.emojiCount,0,0,!this.category),this.grid.on("focus:change",this.setFocus),this.grid.on("focus:overflow",this.triggerNextCategory),this.grid.on("focus:underflow",this.triggerPreviousCategory),this.uiEvents=[so.uiEvent("click",this.selectEmoji),so.uiEvent("keydown",this.grid.handleKeyDown)],this.preview&&this.uiEvents.push(so.uiEvent("mouseover",this.showPreview),so.uiEvent("mouseout",this.hidePreview),so.uiEvent("focus",this.showPreview,{capture:!0}),so.uiEvent("blur",this.hidePreview,{capture:!0})),super.initialize()}setFocusedView(e,t){if(e)if("string"==typeof e){const t=this.emojis.findIndex((t=>t.emoji===e));this.grid.setFocusedIndex(t,!1),setTimeout((()=>{var e,n,i,o;const r=this.emojiViews[t].el;r.scrollIntoView();const s=null==(e=r.parentElement)?void 0:e.previousElementSibling;(null==(i=null==(n=r.parentElement)?void 0:n.parentElement)?void 0:i.parentElement).scrollTop-=null!=(o=null==s?void 0:s.offsetHeight)?o:0}))}else"first"===e.row||0===e.row?this.grid.setCell(0,e.offset,t):"last"===e.row&&this.grid.setCell(this.grid.getRowCount()-1,e.offset,t)}setActive(e,t,n){var i;e?this.setFocusedView(t,n):null==(i=this.emojiViews[this.grid.getIndex()])||i.deactivateFocus()}renderSync(){return this.emojiViews=this.emojis.map((e=>this.viewFactory.create(Xo,{emoji:e,category:this.category,lazyLoader:this.lazyLoader,renderer:this.renderer}))),this.emojiElements=this.emojiViews.map((e=>e.renderSync())),super.renderSync({emojis:this.emojiElements,i18n:this.i18n})}destroy(){super.destroy(),this.emojiViews.forEach((e=>e.destroy())),this.grid.destroy()}triggerPreviousCategory(e){this.events.emit("category:previous",e)}triggerNextCategory(e){this.category&&this.events.emit("category:next",e)}setFocus({from:e,to:t,performFocus:n}){var i,o;null==(i=this.emojiViews[e])||i.deactivateFocus(),null==(o=this.emojiViews[t])||o.activateFocus(n)}selectEmoji(e){e.stopPropagation();const t=Bi(e,this.emojis);t&&this.events.emit("emoji:select",{emoji:t,showVariants:this.showVariants})}showPreview(e){const t=e.target.closest("button"),n=null==t?void 0:t.firstElementChild,i=Bi(e,this.emojis);i&&this.events.emit("preview:show",i,null==n?void 0:n.cloneNode(!0))}hidePreview(e){Bi(e,this.emojis)&&this.events.emit("preview:hide")}get emojiCount(){return this.emojis.length}}const nr=new _o((({classes:e,category:t,pickerId:n,icon:i,i18n:o})=>`\n
    \n

    \n \n ${o.get(`categories.${t.key}`,t.message||t.key)}\n

    \n
    \n
    \n`));class ir extends Yo{constructor({category:e,showVariants:t,lazyLoader:n,emojiVersion:i}){super({category:e,showVariants:t,lazyLoader:n,template:nr}),this.showVariants=t,this.lazyLoader=n,this.emojiVersion=i}initialize(){this.uiElements={...this.baseUIElements},super.initialize()}async render(){await this.emojiDataPromise;const e=await this.emojiData.getEmojis(this.category,this.emojiVersion);return this.emojiContainer=this.viewFactory.create(tr,{emojis:e,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:e.length,icon:ao[this.category.key]})}}class or extends tr{constructor({category:e,emojis:t,preview:n=!0,lazyLoader:i}){super({category:e,emojis:t,showVariants:!1,preview:n,lazyLoader:i})}async addOrUpdate(e){const t=this.el.querySelector(`[data-emoji="${e.emoji}"]`);t&&(this.el.removeChild(t),this.emojis=this.emojis.filter((t=>t!==e)));const n=this.viewFactory.create(Xo,{emoji:e});if(this.el.insertBefore(n.renderSync(),this.el.firstChild),this.emojis=[e,...this.emojis.filter((t=>t!==e))],this.emojis.length>this.options.maxRecents){this.emojis=this.emojis.slice(0,this.options.maxRecents);const e=this.el.childElementCount-this.options.maxRecents;for(let t=0;t`\n
    \n

    \n \n ${r.get(`categories.${n.key}`,n.message||n.key)}\n

    \n
    \n
    \n
    \n
    \n ${r.get("recents.none")}\n
    \n
    \n`),{mode:"async"});const sr=new _o((({classes:e,category:t,pickerId:n,icon:i,i18n:o})=>`\n
    \n

    \n \n ${o.get(`categories.${t.key}`,t.message||t.key)}\n

    \n
    \n
    \n`));class lr{constructor(){this.elements=new Map}lazyLoad(e,t){return this.elements.set(e,t),e}observe(e){if(window.IntersectionObserver){const t=new IntersectionObserver((e=>{e.filter((e=>e.intersectionRatio>0)).map((e=>e.target)).forEach((e=>{const n=this.elements.get(e);null==n||n(),t.unobserve(e)}))}),{root:e});this.elements.forEach(((e,n)=>{t.observe(n)}))}else this.elements.forEach((e=>{e()}))}}const ar=zi("emojiArea"),cr=new _o((({classes:e})=>`\n
    \n
    \n
    \n`),{mode:"async"}),ur={recents:class extends Yo{constructor({category:e,lazyLoader:t,provider:n}){super({category:e,showVariants:!1,lazyLoader:t,template:rr}),this.provider=n}initialize(){this.uiElements={...this.baseUIElements,recents:so.byClass(Zo.recentEmojis)},this.appEvents={"recent:add":this.addRecent},super.initialize()}async addRecent(e){await this.emojiContainer.addOrUpdate(e),this.ui.recents.dataset.empty="false"}async render(){var e;const t=null==(e=this.provider)?void 0:e.getRecents(this.options.maxRecents);return this.emojiContainer=this.viewFactory.create(or,{emojis:t,showVariants:!1,lazyLoader:this.lazyLoader,category:this.category.key}),await super.render({category:this.category,emojis:this.emojiContainer,emojiCount:t.length,icon:ao[this.category.key]}),this.el}},custom:class extends Yo{constructor({category:e,lazyLoader:t}){super({template:sr,showVariants:!1,lazyLoader:t,category:e})}initialize(){this.uiElements={...this.baseUIElements},super.initialize()}async render(){return this.emojiContainer=this.viewFactory.create(tr,{emojis:this.customEmojis,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:this.customEmojis.length,icon:ao[this.category.key]})}}};class dr extends so{constructor({categoryTabs:e,categories:t,emojiVersion:n}){super({template:cr,classes:ar}),this.selectedCategory=0,this.scrollListenerState="active",this.lazyLoader=new lr,this.categoryTabs=e,this.categories=t,this.emojiVersion=n,this.handleScroll=function(e,t){let n=null;return()=>{n||(n=window.setTimeout((()=>{e(),n=null}),t))}}(this.handleScroll.bind(this),100)}initialize(){this.appEvents={"category:select":this.handleCategorySelect,"category:previous":this.focusPreviousCategory,"category:next":this.focusNextCategory,"focus:change":this.updateFocusedCategory},this.uiElements={emojis:so.byClass(ar.emojiArea)},this.uiEvents=[so.uiEvent("scroll",this.handleScroll)],super.initialize()}get focusableEmoji(){return this.el.querySelector('[tabindex="0"]')}async render(){this.emojiCategories=this.categories.map(this.createCategory,this);const e={};return this.categories.forEach(((t,n)=>{e[`emojis-${t.key}`]=this.emojiCategories[n]})),await super.render({emojis:await Promise.all(this.emojiCategories.map((e=>e.render())))}),this.lazyLoader.observe(this.el),this.el}destroy(){super.destroy(),this.emojiCategories.forEach((e=>{var t;null==(t=this.observer)||t.unobserve(e.el),e.destroy()}))}handleCategorySelect(e,t){this.el.style.overflow="hidden",this.selectCategory(e,t),this.el.style.overflow="auto"}createCategory(e){const t=ur[e.key]||ir;return this.viewFactory.create(t,{category:e,showVariants:!0,lazyLoader:this.lazyLoader,emojiVersion:this.emojiVersion,provider:this.options.recentsProvider})}determineInitialCategory(){var e;return this.options.initialCategory&&this.categories.find((e=>e.key===this.options.initialCategory))?this.options.initialCategory:null==(e=this.categories.find((e=>"recents"!==e.key)))?void 0:e.key}determineFocusTarget(e){const t=this.emojiCategories.find((t=>t.category.key===e));return this.options.initialEmoji&&(null==t?void 0:t.el.querySelector(`[data-emoji="${this.options.initialEmoji}"]`))?this.options.initialEmoji:"button"}reset(e=!0){this.events.emit("preview:hide");const t=this.determineInitialCategory();t&&(this.selectCategory(t,{focus:this.determineFocusTarget(t),performFocus:e,scroll:"jump"}),this.selectedCategory=this.getCategoryIndex(t))}getCategoryIndex(e){return this.categories.findIndex((t=>t.key===e))}focusPreviousCategory(e){this.selectedCategory>0&&this.focusCategory(this.selectedCategory-1,{row:"last",offset:null!=e?e:this.options.emojisPerRow})}focusNextCategory(e){this.selectedCategory{var i;return e<(null==(i=this.emojiCategories[n+1])?void 0:i.el.offsetTop)})),i={changeFocusable:!1,performFocus:!1,scroll:!1};0===e?this.categoryTabs.setActiveTab(0,i):Math.floor(e)===Math.floor(t)||n<0?this.categoryTabs.setActiveTab(this.categories.length-1,i):this.categoryTabs.setActiveTab(n,i)}}const hr=new _o((({classList:e,classes:t,icon:n,message:i})=>`\n\n`)),pr=zi("error","iconContainer","title");class fr extends so{constructor({message:e,icon:t="warning",template:n=hr,className:i}){super({template:n,classes:pr}),this.message=e,this.icon=t,this.className=i}renderSync(){const e=[pr.error,this.className].join(" ").trim();return super.renderSync({message:this.message,icon:this.icon,classList:e})}}const gr=new _o((({classList:e,classes:t,icon:n,i18n:i,message:o})=>`\n \n`)),mr=zi("dataError");class yr extends fr{constructor({message:e}){super({message:e,template:gr,className:mr.dataError})}initialize(){this.uiElements={retryButton:"button"},this.uiEvents=[so.childEvent("retryButton","click",this.onRetry)],super.initialize()}async onRetry(){this.emojiData?await this.emojiData.delete():await this.options.dataStore.deleteDatabase(this.options.locale),this.events.emit("reinitialize");const e=await to(this.options.locale,this.options.dataStore,this.options.messages,this.options.emojiData,this.emojiData);this.viewFactory.setEmojiData(e),this.events.emit("data:ready",e)}}const vr=zi("preview","previewEmoji","previewName","tagList","tag"),br=new _o((({classes:e,tag:t})=>`\n
  • ${t}
  • \n`)),_r=new _o((({classes:e})=>`\n
    \n
    \n
    \n
      \n
      \n`));class wr extends so{constructor(){super({template:_r,classes:vr})}initialize(){this.uiElements={emoji:so.byClass(vr.previewEmoji),name:so.byClass(vr.previewName),tagList:so.byClass(vr.tagList)},this.appEvents={"preview:show":this.showPreview,"preview:hide":this.hidePreview},super.initialize()}showPreview(e,t){if(Di(this.ui.emoji,t),this.ui.name.textContent=e.label,e.tags){this.ui.tagList.style.display="flex";const t=e.tags.map((e=>br.renderSync({tag:e,classes:vr})));Di(this.ui.tagList,...t)}}hidePreview(){ji(this.ui.emoji),ji(this.ui.name),ji(this.ui.tagList)}}const Cr=new _o((({classes:e,i18n:t})=>`\n \n`)),xr=new _o((({classes:e,i18n:t})=>`\n
      \n \n \n
      \n`),{mode:"async"}),Er=zi("searchContainer","searchField","clearButton","searchAccessory","clearSearchButton","notFound");class Sr extends so{constructor({categories:e,emojiVersion:t}){super({template:xr,classes:Er}),this.categories=e.filter((e=>"recents"!==e.key)),this.emojiVersion=t,this.search=function(e,t){let n=null;return(...i)=>{n&&window.clearTimeout(n),n=window.setTimeout((()=>{e(...i),n=null}),t)}}(this.search.bind(this),100)}initialize(){this.uiElements={searchField:so.byClass(Er.searchField),searchAccessory:so.byClass(Er.searchAccessory)},this.uiEvents=[so.childEvent("searchField","keydown",this.onKeyDown),so.childEvent("searchField","input",this.onSearchInput)],super.initialize()}async render(){return await super.render(),this.searchIcon=co("search"),this.notFoundMessage=this.viewFactory.create(fr,{message:this.i18n.get("search.notFound"),className:Er.notFound,icon:"sad"}),this.notFoundMessage.renderSync(),this.errorMessage=this.viewFactory.create(fr,{message:this.i18n.get("search.error")}),this.errorMessage.renderSync(),this.clearSearchButton=Cr.render({classes:Er,i18n:this.i18n}),this.clearSearchButton.addEventListener("click",(e=>this.onClearSearch(e))),this.searchField=this.ui.searchField,this.showSearchIcon(),this.el}showSearchIcon(){this.showSearchAccessory(this.searchIcon)}showClearSearchButton(){this.showSearchAccessory(this.clearSearchButton)}showSearchAccessory(e){Di(this.ui.searchAccessory,e)}clear(){this.searchField.value="",this.showSearchIcon()}focus(){this.searchField.focus()}onClearSearch(e){var t;e.stopPropagation(),this.searchField.value="",null==(t=this.resultsContainer)||t.destroy(),this.resultsContainer=null,this.showSearchIcon(),this.events.emit("content:show"),this.searchField.focus()}handleResultsKeydown(e){this.resultsContainer&&"Escape"===e.key&&this.onClearSearch(e)}onKeyDown(e){var t;"Escape"===e.key&&this.searchField.value?this.onClearSearch(e):("Enter"===e.key||"ArrowDown"===e.key)&&this.resultsContainer&&(e.preventDefault(),null==(t=this.resultsContainer.el.querySelector('[tabindex="0"]'))||t.focus())}onSearchInput(e){this.searchField.value?(this.showClearSearchButton(),this.search()):this.onClearSearch(e)}async search(){var e;if(this.searchField.value)try{const t=await this.emojiData.searchEmojis(this.searchField.value,this.customEmojis,this.emojiVersion,this.categories);if(this.events.emit("preview:hide"),t.length){const n=new lr;this.resultsContainer=this.viewFactory.create(tr,{emojis:t,fullHeight:!0,showVariants:!0,lazyLoader:n}),this.resultsContainer.renderSync(),null!=(e=this.resultsContainer)&&e.el&&(n.observe(this.resultsContainer.el),this.resultsContainer.setActive(!0,{row:0,offset:0},!1),this.resultsContainer.el.addEventListener("keydown",(e=>this.handleResultsKeydown(e))),this.events.emit("content:show",this.resultsContainer))}else this.events.emit("content:show",this.notFoundMessage)}catch{this.events.emit("content:show",this.errorMessage)}}}const kr=new _o((({classes:e})=>`\n
      \n
      \n
      \n
      \n
      \n`)),Tr=zi("variantOverlay","variantPopup"),Nr={easing:"ease-in-out",duration:250,fill:"both"},Ar={opacity:[0,1]},Lr={opacity:[0,1],transform:["scale3d(0.8, 0.8, 0.8)","scale3d(1, 1, 1)"]};class Or extends so{constructor({emoji:e,parent:t}){super({template:kr,classes:Tr,parent:t}),this.focusedEmojiIndex=0,this.focusTrap=new no,this.animateShow=()=>Promise.all([Ii(this.el,Ar,Nr,this.options),Ii(this.ui.popup,Lr,Nr,this.options)]),this.emoji=e}initialize(){this.uiElements={popup:so.byClass(Tr.variantPopup)},this.uiEvents=[so.uiEvent("click",this.handleClick),so.uiEvent("keydown",this.handleKeydown)],super.initialize()}animateHide(){const e={...Nr,direction:"reverse"};return Promise.all([Ii(this.el,Ar,e,this.options),Ii(this.ui.popup,Lr,e,this.options)])}async hide(){await this.animateHide(),this.events.emit("variantPopup:hide")}handleKeydown(e){"Escape"===e.key&&(this.hide(),e.stopPropagation())}handleClick(e){this.ui.popup.contains(e.target)||this.hide()}getEmoji(e){return this.renderedEmojis[e]}setFocusedEmoji(e){this.getEmoji(this.focusedEmojiIndex).tabIndex=-1,this.focusedEmojiIndex=e;const t=this.getEmoji(this.focusedEmojiIndex);t.tabIndex=0,t.focus()}destroy(){this.emojiContainer.destroy(),this.focusTrap.deactivate(),super.destroy()}renderSync(){const e=[{...this.emoji,skins:null},...(this.emoji.skins||[]).map((e=>({...e,label:this.emoji.label,tags:this.emoji.tags})))];return this.emojiContainer=this.viewFactory.create(tr,{emojis:e,preview:!1}),super.renderSync({emojis:this.emojiContainer}),e.length`\n
    • \n \n \n
    • \n`)),Rr=zi("categoryTab","categoryTabActive","categoryButton");class Pr extends so{constructor({category:e,icon:t}){super({template:Br,classes:Rr}),this.isActive=!1,this.category=e,this.icon=t}initialize(){this.uiElements={button:so.byClass(Rr.categoryButton)},this.uiEvents=[so.childEvent("button","click",this.selectCategory),so.childEvent("button","focus",this.selectCategory)],super.initialize()}renderSync(){return super.renderSync({category:this.category,icon:this.icon}),this.ui.button.ariaSelected="false",this.el}setActive(e,t={}){const{changeFocusable:n,performFocus:i,scroll:o}={changeFocusable:!0,performFocus:!0,scroll:!0,...t};this.el.classList.toggle(Rr.categoryTabActive,e),n&&(this.ui.button.tabIndex=e?0:-1,this.ui.button.ariaSelected=e.toString()),e&&i&&(this.ui.button.focus(),o&&this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!1})),this.isActive=e}selectCategory(){this.isActive||this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!0})}}const Ir=new _o((({classes:e})=>`\n
      \n
        \n
        \n
      \n
      \n`)),Mr=zi("categoryButtons","categoryButtonsContainer");class zr extends so{constructor({categories:e}){super({template:Ir,classes:Mr}),this.activeCategoryIndex=0,this.categories=e}initialize(){this.keyBindings={ArrowLeft:this.stepSelectedTab(-1),ArrowRight:this.stepSelectedTab(1)},this.uiEvents=[so.uiEvent("scroll",this.checkOverflow)],super.initialize()}checkOverflow(){const e=Math.abs(this.el.scrollLeft-(this.el.scrollWidth-this.el.offsetWidth))>1,t=this.el.scrollLeft>0;this.el.className="categoryButtonsContainer",t&&e?this.el.classList.add("has-overflow-both"):t?this.el.classList.add("has-overflow-left"):e&&this.el.classList.add("has-overflow-right")}renderSync(){return this.tabViews=this.categories.map((e=>this.viewFactory.create(Pr,{category:e,icon:ao[e.key]}))),super.renderSync({tabs:this.tabViews.map((e=>e.renderSync()))}),this.el}get currentCategory(){return this.categories[this.activeCategoryIndex]}get currentTabView(){return this.tabViews[this.activeCategoryIndex]}setActiveTab(e,t={}){this.checkOverflow();const n=this.currentTabView,i=this.tabViews[e];n.setActive(!1,t),i.setActive(!0,t),this.activeCategoryIndex=e}getTargetCategory(e){return e<0?this.categories.length-1:e>=this.categories.length?0:e}stepSelectedTab(e){return()=>{const t=this.activeCategoryIndex+e;this.setActiveTab(this.getTargetCategory(t),{changeFocusable:!0,performFocus:!0})}}}const Fr=[{version:15,emoji:String.fromCodePoint(129768)},{version:14,emoji:String.fromCodePoint(128733)},{version:13,emoji:String.fromCodePoint(129729)},{version:12,emoji:String.fromCodePoint(129449)},{version:11,emoji:String.fromCodePoint(129463)},{version:5,emoji:String.fromCodePoint(129322)},{version:4,emoji:String.fromCodePoint(9877)},{version:3,emoji:String.fromCodePoint(129314)},{version:2,emoji:String.fromCodePoint(128488)},{version:1,emoji:String.fromCodePoint(128512)}];function jr(){var e;const t=Fr.find((e=>function(e){const t=document.createElement("canvas").getContext("2d");if(t)return t.textBaseline="top",t.font="32px Arial",t.fillText(e,0,0),0!==t.getImageData(16,16,1,1).data[0]}(e.emoji)));return null!=(e=null==t?void 0:t.version)?e:1}function Dr(e,t){return Array.from({length:e},(()=>t)).join("")}function Hr(e){const{emojiCount:t,classes:n,theme:i,className:o,categoryCount:r}=e;return`\n
      \n ${(({showHeader:t,classes:n})=>t?`\n
      \n ${(({showSearch:e,classes:t})=>e?`\n
      \n
      \n
      \n `:"")(e)}\n ${(({showCategoryTabs:e,classes:t})=>e?`\n
      \n ${Dr(r,`
      `)}\n
      \n `:"")(e)}\n
      \n `:"")(e)}\n
      \n
      \n
      \n ${Dr(t,`
      `)}\n
      \n
      \n ${(({showPreview:e,classes:t})=>e?`\n
      \n
      \n
      \n
        \n ${Dr(3,`
      • `)}\n
      \n
      \n `:"")(e)}\n
      \n `}const Vr=new _o((e=>e.isLoaded?function(e){const{classes:t,theme:n,className:i=""}=e;return`\n
      \n ${function({showHeader:e,classes:t}){return e?`\n
      \n
      \n
      \n
      \n `:""}(e)}\n
      \n
      \n
      \n
      \n
      \n `}(e):Hr(e))),Ur=zi("picker","skeleton","placeholder","searchSkeleton","searchInput","categoryTabsSkeleton","headerSkeleton","categoryTab","contentSkeleton","categoryName","emojiGrid","emoji","previewSkeleton","previewEmoji","previewName","tagList","tag","overlay","content","fullHeight","pluginContainer","header"),Wr={emojisPerRow:"--emojis-per-row",visibleRows:"--row-count",emojiSize:"--emoji-size"};class $r extends so{constructor(){super({template:Vr,classes:Ur}),this.pickerReady=!1,this.externalEvents=new qo,this.updaters={styleProperty:e=>t=>this.el.style.setProperty(Wr[e],t.toString()),theme:e=>{const t=this.options.theme,n=this.el.closest(`.${t}`);this.el.classList.remove(t),null==n||n.classList.remove(t),this.el.classList.add(e),null==n||n.classList.add(e)},className:e=>{this.options.className&&this.el.classList.remove(this.options.className),this.el.classList.add(e)},emojisPerRow:this.updateStyleProperty.bind(this,"emojisPerRow"),emojiSize:this.updateStyleProperty.bind(this,"emojiSize"),visibleRows:this.updateStyleProperty.bind(this,"visibleRows")}}initialize(){this.uiElements={pickerContent:so.byClass(Ur.content),header:so.byClass(Ur.header)},this.uiEvents=[so.uiEvent("keydown",this.handleKeyDown)],this.appEvents={error:this.onError,reinitialize:this.reinitialize,"data:ready":this.onDataReady,"content:show":this.showContent,"variantPopup:hide":this.hideVariantPopup,"emoji:select":this.selectEmoji},super.initialize(),this.options.recentsProvider}destroy(){var e,t;super.destroy(),null==(e=this.search)||e.destroy(),this.emojiArea.destroy(),null==(t=this.categoryTabs)||t.destroy(),this.events.removeAll(),this.externalEvents.removeAll()}clearRecents(){this.options.recentsProvider.clear()}addEventListener(e,t){this.externalEvents.on(e,t)}removeEventListener(e,t){this.externalEvents.off(e,t)}initializePickerView(){this.pickerReady&&(this.showContent(),this.emojiArea.reset(!1))}handleKeyDown(e){const t=e.ctrlKey||e.metaKey;"s"===e.key&&t&&this.search&&(e.preventDefault(),this.search.focus())}buildChildViews(){return this.options.showPreview&&(this.preview=this.viewFactory.create(wr)),this.options.showSearch&&(this.search=this.viewFactory.create(Sr,{categories:this.categories,emojiVersion:this.emojiVersion})),this.options.showCategoryTabs&&(this.categoryTabs=this.viewFactory.create(zr,{categories:this.categories})),this.currentView=this.emojiArea=this.viewFactory.create(dr,{categoryTabs:this.categoryTabs,categories:this.categories,emojiVersion:this.emojiVersion}),[this.preview,this.search,this.emojiArea,this.categoryTabs]}setStyleProperties(){this.options.showSearch||this.el.style.setProperty("--search-height-full","0px"),this.options.showCategoryTabs||(this.el.style.setProperty("--category-tabs-height","0px"),this.el.style.setProperty("--category-tabs-offset","0px")),this.options.showPreview||this.el.style.setProperty("--emoji-preview-height-full","0px"),Object.keys(Wr).forEach((e=>{this.options[e]&&this.el.style.setProperty(Wr[e],this.options[e].toString())}))}updateStyleProperty(e,t){this.el.style.setProperty(Wr[e],t.toString())}reinitialize(){this.renderSync()}onError(e){const t=this.viewFactory.createWithOptions({data:!1},yr,{message:this.i18n.get("error.load")}),n=this.el.offsetHeight||375;throw this.el.style.height=`${n}px`,Di(this.el,t.renderSync()),e}async onDataReady(e){const t=this.el;try{e?this.emojiData=e:await this.emojiDataPromise,"auto"===this.options.emojiVersion?this.emojiVersion=jr()||parseFloat("14.0"):this.emojiVersion=this.options.emojiVersion,this.categories=await this.emojiData.getCategories(this.options);const[n,i,o,r]=this.buildChildViews();await super.render({isLoaded:!0,search:i,categoryTabs:r,emojiArea:o,preview:n,showHeader:Boolean(this.search||this.categoryTabs),theme:this.options.theme,className:this.options.className}),this.el.style.setProperty("--category-count",this.categories.length.toString()),this.pickerReady=!0,t.replaceWith(this.el),this.setStyleProperties(),this.initializePickerView(),this.setInitialFocus(),this.externalEvents.emit("data:ready")}catch(e){this.events.emit("error",e)}}renderSync(){var e;let t=(null==(e=this.options.categories)?void 0:e.length)||10;if(this.options.showRecents&&(t+=1),super.renderSync({isLoaded:!1,theme:this.options.theme,className:this.options.className,showSearch:this.options.showSearch,showPreview:this.options.showPreview,showCategoryTabs:this.options.showCategoryTabs,showHeader:this.options.showSearch||this.options.showCategoryTabs,emojiCount:this.options.emojisPerRow*this.options.visibleRows,categoryCount:t}),this.el.style.setProperty("--category-count",t.toString()),!this.options.rootElement)throw new Error("Picker must be given a root element via the rootElement option");return Di(this.options.rootElement,this.el),this.setStyleProperties(),this.pickerReady&&this.initializePickerView(),this.el}getInitialFocusTarget(){if(typeof this.options.autoFocus<"u")switch(this.options.autoFocus){case"emojis":return this.emojiArea.focusableEmoji;case"search":return this.search;case"auto":return this.search||this.emojiArea.focusableEmoji;default:return null}if(!0===this.options.autoFocusSearch)return console.warn("options.autoFocusSearch is deprecated, please use options.focusTarget instead"),this.search}setInitialFocus(){var e;!this.pickerReady||null==(e=this.getInitialFocusTarget())||e.focus()}reset(e=!0){var t;this.pickerReady&&(this.emojiArea.reset(e),this.showContent(this.emojiArea)),null==(t=this.search)||t.clear(),this.hideVariantPopup()}showContent(e=this.emojiArea){var t,n;e!==this.currentView&&(this.currentView!==this.emojiArea&&(null==(t=this.currentView)||t.destroy()),this.ui.pickerContent.classList.toggle(Ur.fullHeight,e!==this.emojiArea),Di(this.ui.pickerContent,e.el),this.currentView=e,e===this.emojiArea?(this.emojiArea.reset(),this.categoryTabs&&this.ui.header.appendChild(this.categoryTabs.el)):null==(n=this.categoryTabs)||n.el.remove())}hideVariantPopup(){var e;null==(e=this.variantPopup)||e.destroy()}isPickerClick(e){var t,n;const i=e.target,o=this.el.contains(i),r=null==(n=null==(t=this.variantPopup)?void 0:t.el)?void 0:n.contains(i);return o||r}async selectEmoji({emoji:e}){var t,n;(null==(t=e.skins)?void 0:t.length)&&this.options.showVariants&&!this.isVariantPopupOpen?this.showVariantPopup(e):(await(null==(n=this.variantPopup)?void 0:n.animateHide()),this.events.emit("variantPopup:hide"),await this.emitEmoji(e))}get isVariantPopupOpen(){return this.variantPopup&&!this.variantPopup.isDestroyed}async showVariantPopup(e){const t=document.activeElement;this.events.once("variantPopup:hide",(()=>{null==t||t.focus()})),this.variantPopup=this.viewFactory.create(Or,{emoji:e,parent:this.el}),this.el.appendChild(this.variantPopup.renderSync()),this.variantPopup.activate()}async emitEmoji(e){this.externalEvents.emit("emoji:select",await this.renderer.doEmit(e)),this.options.recentsProvider.addOrUpdateRecent(e,this.options.maxRecents),this.events.emit("recent:add",e)}updateOptions(e){Object.keys(e).forEach((t=>{this.updaters[t](e[t])})),Object.assign(this.options,e)}}class qr{constructor({events:e,i18n:t,renderer:n,emojiData:i,options:o,customEmojis:r=[],pickerId:s}){this.events=e,this.i18n=t,this.renderer=n,this.emojiData=i,this.options=o,this.customEmojis=r,this.pickerId=s}setEmojiData(e){this.emojiData=Promise.resolve(e)}createWithOptions(e={},t,...n){const i=new t(...n);return i.setPickerId(this.pickerId),i.setEvents(this.events),i.setI18n(this.i18n),i.setRenderer(this.renderer),!1!==e.data&&i.setEmojiData(this.emojiData),i.setOptions(this.options),i.setCustomEmojis(this.customEmojis),i.viewFactory=this,i.initialize(),i}create(e,...t){return this.createWithOptions({},e,...t)}}var Zr;class Yr{constructor(e={}){xi(this,Zr,void 0),Ei(this,Zr,new Map(Object.entries(e)))}get(e,t=e){return Ci(this,Zr).get(e)||t}}Zr=new WeakMap;let Gr,Kr=0;const Xr=function(){let e=!1;return function(t){Wo&&!e&&(function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(t),e=!0)}}();function Jr(e){Xr('.picmo__picker .picmo__icon{width:1.25em;height:1em;fill:currentColor}.picmo__icon-small{font-size:.8em}.picmo__icon-medium{font-size:1em}.picmo__icon-large{font-size:1.25em}.picmo__icon-2x{font-size:2em}.picmo__icon-3x{font-size:3em}.picmo__icon-4x{font-size:4em}.picmo__icon-5x{font-size:5em}.picmo__icon-8x{font-size:8em}.picmo__icon-10x{font-size:10em}.picmo__light,.picmo__auto{color-scheme:light;--accent-color: #4f46e5;--background-color: #f9fafb;--border-color: #cccccc;--category-name-background-color: #f9fafb;--category-name-button-color: #999999;--category-name-text-color: hsl(214, 30%, 50%);--category-tab-active-background-color: rgba(255, 255, 255, .6);--category-tab-active-color: var(--accent-color);--category-tab-color: #666;--category-tab-highlight-background-color: rgba(0, 0, 0, .15);--error-color-dark: hsl(0, 100%, 45%);--error-color: hsl(0, 100%, 40%);--focus-indicator-background-color: hsl(198, 65%, 85%);--focus-indicator-color: #333333;--hover-background-color: #c7d2fe;--placeholder-background-color: #cccccc;--search-background-color: #f9fafb;--search-focus-background-color: #ffffff;--search-icon-color: #999999;--search-placeholder-color: #71717a;--secondary-background-color: #e2e8f0;--secondary-text-color: #666666;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #000000;--variant-popup-background-color: #ffffff}.picmo__dark{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}@media (prefers-color-scheme: dark){.picmo__auto{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}}.picmo__picker .picmo__categoryButtonsContainer{overflow:auto;padding:2px 0}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-right{mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-left{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-both{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%)}.picmo__picker .picmo__categoryButtons{display:flex;flex-direction:row;gap:var(--tab-gap);margin:0;padding:0 .5em;align-items:center;height:var(--category-tabs-height);box-sizing:border-box;width:100%;justify-content:space-between;position:relative;list-style-type:none;justify-self:center;max-width:min(23.55rem,calc(var(--category-count, 1) * 2.5rem))}.picmo__picker .picmo__categoryButtons .picmo__categoryTab{display:flex;align-items:center;transition:all .1s;width:2em}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton{color:var(--category-tab-active-color);background:linear-gradient(rgba(255,255,255,.75) 0%,rgba(255,255,255,.75) 100%),linear-gradient(var(--category-tab-active-color) 0%,var(--category-tab-active-color) 100%);border:2px solid var(--category-tab-active-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton:hover{background-color:var(--category-tab-active-background-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton{border-radius:5px;background:transparent;border:2px solid transparent;color:var(--category-tab-color);cursor:pointer;padding:2px;vertical-align:middle;display:flex;align-items:center;justify-content:center;font-size:1.2rem;width:1.6em;height:1.6em;transition:all .1s}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:is(img){width:var(--category-tab-size);height:var(--category-tab-size)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:hover{background:var(--category-tab-highlight-background-color)}.picmo__dataError [data-icon]{opacity:.8}@keyframes appear{0%{opacity:0}to{opacity:.8}}@keyframes appear-grow{0%{opacity:0;transform:scale(.8)}to{opacity:.8;transform:scale(1)}}.picmo__picker .picmo__error{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--secondary-text-color)}.picmo__picker .picmo__error .picmo__iconContainer{opacity:.8;animation:appear-grow .25s cubic-bezier(.175,.885,.32,1.275);--color-primary: var(--error-color);--color-secondary: var(--error-color-dark)}.picmo__picker .picmo__error .picmo__title{animation:appear .25s;animation-delay:50ms;animation-fill-mode:both}.picmo__picker .picmo__error button{padding:8px 16px;cursor:pointer;background:var(--background-color);border:1px solid var(--text-color);border-radius:5px;color:var(--text-color)}.picmo__picker .picmo__error button:hover{background:var(--text-color);color:var(--background-color)}.picmo__emojiButton{background:transparent;border:none;border-radius:15px;cursor:pointer;display:flex;font-family:var(--emoji-font);font-size:var(--emoji-size);height:100%;justify-content:center;align-items:center;margin:0;overflow:hidden;padding:0;width:100%}.picmo__emojiButton:hover{background:var(--hover-background-color)}.picmo__emojiButton:focus{border-radius:0;background:var(--focus-indicator-background-color);outline:1px solid var(--focus-indicator-color)}.picmo__picker .picmo__emojiArea{height:var(--emoji-area-height);overflow-y:auto;position:relative}.picmo__picker .picmo__emojiCategory{position:relative}.picmo__picker .picmo__emojiCategory .picmo__categoryName{font-size:.9em;padding:.5rem;margin:0;background:var(--category-name-background-color);color:var(--category-name-text-color);top:0;z-index:1;display:grid;gap:4px;grid-template-columns:auto 1fr auto;align-items:center;line-height:1;box-sizing:border-box;height:var(--category-name-height);justify-content:flex-start;text-transform:uppercase}.picmo__picker .picmo__emojiCategory .picmo__categoryName button{background:transparent;border:none;display:flex;align-items:center;cursor:pointer;color:var(--category-name-button-color)}.picmo__picker .picmo__emojiCategory .picmo__categoryName button:hover{opacity:1}.picmo__picker .picmo__emojiCategory .picmo__noRecents{color:var(--secondary-text-color);grid-column:1 / span var(--emojis-per-row);font-size:.9em;text-align:center;display:flex;align-items:center;justify-content:center;min-height:calc(var(--emoji-size) * var(--emoji-size-multiplier))}.picmo__picker .picmo__emojiCategory .picmo__recentEmojis[data-empty=true]{display:none}:is(.picmo__picker .picmo__emojiCategory) .picmo__recentEmojis[data-empty=false]+div{display:none}.picmo__picker .picmo__emojiContainer{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center}.picmo__picker.picmo__picker{--border-radius: 5px;--emoji-area-height: calc( (var(--row-count) * var(--emoji-size) * var(--emoji-size-multiplier)) + var(--category-name-height) );--content-height: var(--emoji-area-height);--emojis-per-row: 8;--row-count: 6;--emoji-preview-margin: 4px;--emoji-preview-height: calc(var(--emoji-preview-size) + 1em + 1px);--emoji-preview-height-full: calc(var(--emoji-preview-height) + var(--emoji-preview-margin));--emoji-preview-size: 2.75em;--emoji-size: 2rem;--emoji-size-multiplier: 1.3;--content-margin: 8px;--category-tabs-height:calc(1.5em + 9px);--category-tabs-offset: 8px;--category-tab-size: 1.2rem;--category-name-height: 2rem;--category-name-padding-y: 6px;--search-height: 2em;--search-margin: .5em;--search-margin-bottom: 4px;--search-height-full: calc(var(--search-height) + var(--search-margin) + var(--search-margin-bottom));--overlay-background-color: rgba(0, 0, 0, .8);--emoji-font: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "EmojiOne Color", "Android Emoji";--ui-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;--ui-font-size: 16px;--picker-width: calc(var(--emojis-per-row) * var(--emoji-size) * var(--emoji-size-multiplier) + 2.75rem);--preview-background-color: var(--secondary-background-color);background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);font-size:var(--ui-font-size);overflow:hidden;position:relative;width:var(--picker-width);display:grid;gap:8px}.picmo__picker.picmo__picker>*{font-family:var(--ui-font)}.picmo__picker.picmo__skeleton{background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);width:var(--picker-width);color:var(--secondary-text-color)}.picmo__picker.picmo__skeleton *{box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__picker.picmo__skeleton .picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""}.picmo__picker.picmo__skeleton .picmo__headerSkeleton{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;overflow:hidden;gap:8px;border-bottom:1px solid var(--border-color);width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton{padding:0 8px;height:var(--search-height)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton .picmo__searchInput{width:100%;height:28px;border-radius:3px}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton{height:var(--category-tabs-height);display:flex;flex-direction:row;align-items:center;justify-self:center;width:calc(2rem * var(--category-count, 1))}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton .picmo__categoryTab{width:25px;height:25px;padding:2px;border-radius:5px;margin:.25em}.picmo__picker.picmo__skeleton .picmo__contentSkeleton{height:var(--content-height);padding-right:8px;opacity:.7}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__categoryName{width:50%;height:1rem;margin:.5rem;box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center;width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid .picmo__emoji{width:var(--emoji-size);height:var(--emoji-size);border-radius:50%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton{height:var(--emoji-preview-height);border-top:1px solid var(--border-color);display:grid;align-items:center;padding:.5em;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags"}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewEmoji{grid-area:emoji;border-radius:50%;width:var(--emoji-preview-size);height:var(--emoji-preview-size)}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewName{grid-area:name;height:.8em;width:80%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList .picmo__tag{border-radius:3px;padding:2px 8px;margin-right:.25em;height:1em;width:20%}.picmo__overlay{background:rgba(0,0,0,.75);height:100%;left:0;position:fixed;top:0;width:100%;z-index:1000}.picmo__content{position:relative;overflow:hidden;height:var(--content-height)}.picmo__content.picmo__fullHeight{height:calc(var(--content-height) + var(--category-tabs-height) + var(--category-tabs-offset));overflow-y:auto}.picmo__pluginContainer{margin:.5em;display:flex;flex-direction:row}.picmo__header{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:grid;gap:8px;border-bottom:1px solid var(--border-color)}@media (prefers-reduced-motion: reduce){.picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__placeholder:after{display:none}}.picmo__picker .picmo__preview{border-top:1px solid var(--border-color);display:grid;align-items:center;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags";height:var(--emoji-preview-height);box-sizing:border-box;padding:.5em;position:relative;background:var(--preview-background-color)}.picmo__picker .picmo__preview .picmo__previewEmoji{grid-area:emoji;font-size:var(--emoji-preview-size);font-family:var(--emoji-font);width:1.25em;display:flex;align-items:center;justify-content:center}.picmo__picker .picmo__preview .picmo__previewName{grid-area:name;color:var(--text-color);font-size:.8em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}.picmo__picker .picmo__preview .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0;font-size:.75em;overflow:hidden}.picmo__picker .picmo__preview .picmo__tag{border-radius:3px;background:var(--tag-background-color);color:var(--text-color);padding:2px 8px;margin-right:.25em;white-space:nowrap}.picmo__picker .picmo__preview .picmo__tag:last-child{margin-right:0}.picmo__picker .picmo__searchContainer{display:flex;height:var(--search-height);box-sizing:border-box;padding:0 8px;position:relative}.picmo__picker .picmo__searchContainer .picmo__searchField{background:var(--search-background-color);border-radius:3px;border:none;box-sizing:border-box;color:var(--text-color);font-size:.9em;outline:none;padding:.5em 2.25em .5em .5em;width:100%}.picmo__picker .picmo__searchContainer .picmo__searchField:focus{background:var(--search-focus-background-color)}.picmo__picker .picmo__searchContainer .picmo__searchField::placeholder{color:var(--search-placeholder-color)}.picmo__picker .picmo__searchContainer .picmo__searchAccessory{color:var(--search-icon-color);height:100%;position:absolute;right:1em;top:0;width:1.25rem;display:flex;align-items:center}.picmo__picker .picmo__searchContainer .picmo__searchAccessory svg{fill:var(--search-icon-color)}.picmo__picker .picmo__searchContainer .picmo__clearButton{border:0;color:var(--search-icon-color);background:transparent;cursor:pointer}.picmo__picker .picmo__searchContainer .picmo__clearSearchButton{cursor:pointer;border:none;background:transparent;color:var(--search-icon-color);font-size:1em;width:100%;height:100%;display:flex;align-items:center;padding:0}.picmo__picker .picmo__searchContainer .picmo__notFound [data-icon]{fill:#f3e265}.picmo__picker .picmo__variantOverlay{background:var(--overlay-background-color);border-radius:5px;display:flex;flex-direction:column;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.picmo__picker .picmo__variantOverlay .picmo__variantPopup{background:var(--variant-popup-background-color);border-radius:5px;margin:.5em;padding:.5em;text-align:center;user-select:none;display:flex;align-items:center;justify-content:center}.picmo__customEmoji{width:1em;height:1em}@keyframes shine{to{transform:translate(100%)}}.picmo__picker .picmo__imagePlaceholder{width:2rem;height:2rem;border-radius:50%}.picmo__placeholder{background:#DDDBDD;position:relative}.picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""}\n');const t=function(e={}){return{...zo,...e,renderer:e.renderer||new To,recentsProvider:e.recentsProvider||new Mo}}(e),n=((null==t?void 0:t.custom)||[]).map((e=>({...e,custom:!0,tags:["custom",...e.tags||[]]}))),i=new $o;Gr||(Gr=function(e){return to(e.locale,e.dataStore,e.messages,e.emojiData)}(t));const o=new Yr(t.i18n);Gr.then((e=>{i.emit("data:ready",e)})).catch((e=>{i.emit("error",e)}));const r=new qr({events:i,i18n:o,customEmojis:n,renderer:t.renderer,options:t,emojiData:Gr,pickerId:`picmo-${Date.now()}-${Kr++}`}).create($r);return r.renderSync(),r}Symbol.toStringTag;const Qr={name:"picmo",display:"submenu",title:"Emoji",buttonClass:"",innerHTML:'
      ',add:function(e,t){const n=e.context;let i=this.setSubmenu(e);n.customSubmenu={targetButton:t,textElement:null,currentSpan:null,listDiv:i},e.initMenuTarget(this.name,t,i)},setSubmenu:function(e){const t=e.util.createElement("DIV");return t.className="se-submenu se-list-layer se-list-emoji-picmo",t.innerHTML='
      ',t},active:function(e){return this.submenuOff(),!1},on:function(){Jr({rootElement:this.submenu}).addEventListener("emoji:select",(e=>{this.functions.insertHTML(e.emoji,!0,!0)}))},onClickRemove:function(){this.submenuOff()}};function es(e){return es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},es(e)}function ts(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ns(e){for(var t=1;t{},7791:function(e){"use strict";!function(t,n){"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("SUNEDITOR_LANG a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(e,t){const n={code:"en",toolbar:{default:"Default",save:"Save",font:"Font",formats:"Formats",fontSize:"Size",bold:"Bold",underline:"Underline",italic:"Italic",strike:"Strike",subscript:"Subscript",superscript:"Superscript",removeFormat:"Remove Format",fontColor:"Font Color",hiliteColor:"Highlight Color",indent:"Indent",outdent:"Outdent",align:"Align",alignLeft:"Align left",alignRight:"Align right",alignCenter:"Align center",alignJustify:"Align justify",list:"List",orderList:"Ordered list",unorderList:"Unordered list",horizontalRule:"Horizontal line",hr_solid:"Solid",hr_dotted:"Dotted",hr_dashed:"Dashed",table:"Table",link:"Link",math:"Math",image:"Image",video:"Video",audio:"Audio",fullScreen:"Full screen",showBlocks:"Show blocks",codeView:"Code view",undo:"Undo",redo:"Redo",preview:"Preview",print:"print",tag_p:"Paragraph",tag_div:"Normal (DIV)",tag_h:"Header",tag_blockquote:"Quote",tag_pre:"Code",template:"Template",lineHeight:"Line height",paragraphStyle:"Paragraph style",textStyle:"Text style",imageGallery:"Image gallery",dir_ltr:"Left to right",dir_rtl:"Right to left",mention:"Mention"},dialogBox:{linkBox:{title:"Insert Link",url:"URL to link",text:"Text to display",newWindowCheck:"Open in new window",downloadLinkCheck:"Download link",bookmark:"Bookmark"},mathBox:{title:"Math",inputLabel:"Mathematical Notation",fontSizeLabel:"Font Size",previewLabel:"Preview"},imageBox:{title:"Insert image",file:"Select from files",url:"Image URL",altText:"Alternative text"},videoBox:{title:"Insert Video",file:"Select from files",url:"Media embed URL, YouTube/Vimeo"},audioBox:{title:"Insert Audio",file:"Select from files",url:"Audio URL"},browser:{tags:"Tags",search:"Search"},caption:"Insert description",close:"Close",submitButton:"Submit",revertButton:"Revert",proportion:"Constrain proportions",basic:"Basic",left:"Left",right:"Right",center:"Center",width:"Width",height:"Height",size:"Size",ratio:"Ratio"},controller:{edit:"Edit",unlink:"Unlink",remove:"Remove",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:"Delete row",insertColumnBefore:"Insert column before",insertColumnAfter:"Insert column after",deleteColumn:"Delete column",fixedColumnWidth:"Fixed column width",resize100:"Resize 100%",resize75:"Resize 75%",resize50:"Resize 50%",resize25:"Resize 25%",autoSize:"Auto size",mirrorHorizontal:"Mirror, Horizontal",mirrorVertical:"Mirror, Vertical",rotateLeft:"Rotate left",rotateRight:"Rotate right",maxSize:"Max size",minSize:"Min size",tableHeader:"Table header",mergeCells:"Merge cells",splitCells:"Split Cells",HorizontalSplit:"Horizontal split",VerticalSplit:"Vertical split"},menu:{spaced:"Spaced",bordered:"Bordered",neon:"Neon",translucent:"Translucent",shadow:"Shadow",code:"Code"}};return void 0===t&&(e.SUNEDITOR_LANG||Object.defineProperty(e,"SUNEDITOR_LANG",{enumerable:!0,writable:!1,configurable:!1,value:{}}),Object.defineProperty(e.SUNEDITOR_LANG,"en",{enumerable:!0,writable:!0,configurable:!0,value:n})),n}))},9315:function(e){"use strict";!function(t,n){"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("SUNEDITOR_MODULES a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(e,t){const n={name:"component",set_container:function(e,t){const n=this.util.createElement("DIV");return n.className="se-component "+t,n.appendChild(e),n},set_cover:function(e){const t=this.util.createElement("FIGURE");return t.appendChild(e),t},create_caption:function(){const e=this.util.createElement("FIGCAPTION");return e.innerHTML="
      "+this.lang.dialogBox.caption+"
      ",e}};return void 0===t&&(e.SUNEDITOR_MODULES||Object.defineProperty(e,"SUNEDITOR_MODULES",{enumerable:!0,writable:!1,configurable:!1,value:{}}),Object.defineProperty(e.SUNEDITOR_MODULES,"component",{enumerable:!0,writable:!1,configurable:!1,value:n})),n}))},1350:function(e){"use strict";!function(t,n){"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("SUNEDITOR_MODULES a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(e,t){const n={name:"dialog",add:function(e){const t=e.context;t.dialog={kind:"",updateModal:!1,_closeSignal:!1};let n=e.util.createElement("DIV");n.className="se-dialog sun-editor-common";let i=e.util.createElement("DIV");i.className="se-dialog-back",i.style.display="none";let o=e.util.createElement("DIV");o.className="se-dialog-inner",o.style.display="none",n.appendChild(i),n.appendChild(o),t.dialog.modalArea=n,t.dialog.back=i,t.dialog.modal=o,t.dialog.modal.addEventListener("mousedown",this._onMouseDown_dialog.bind(e)),t.dialog.modal.addEventListener("click",this._onClick_dialog.bind(e)),t.element.relative.appendChild(n),n=null,i=null,o=null},_onMouseDown_dialog:function(e){/se-dialog-inner/.test(e.target.className)?this.context.dialog._closeSignal=!0:this.context.dialog._closeSignal=!1},_onClick_dialog:function(e){(/close/.test(e.target.getAttribute("data-command"))||this.context.dialog._closeSignal)&&this.plugins.dialog.close.call(this)},open:function(e,t){if(this.modalForm)return!1;this.plugins.dialog._bindClose&&(this._d.removeEventListener("keydown",this.plugins.dialog._bindClose),this.plugins.dialog._bindClose=null),this.plugins.dialog._bindClose=function(e){/27/.test(e.keyCode)&&this.plugins.dialog.close.call(this)}.bind(this),this._d.addEventListener("keydown",this.plugins.dialog._bindClose),this.context.dialog.updateModal=t,"full"===this.options.popupDisplay?this.context.dialog.modalArea.style.position="fixed":this.context.dialog.modalArea.style.position="absolute",this.context.dialog.kind=e,this.modalForm=this.context[e].modal;const n=this.context[e].focusElement;"function"==typeof this.plugins[e].on&&this.plugins[e].on.call(this,t),this.context.dialog.modalArea.style.display="block",this.context.dialog.back.style.display="block",this.context.dialog.modal.style.display="block",this.modalForm.style.display="block",n&&n.focus()},_bindClose:null,close:function(){this.plugins.dialog._bindClose&&(this._d.removeEventListener("keydown",this.plugins.dialog._bindClose),this.plugins.dialog._bindClose=null);const e=this.context.dialog.kind;this.modalForm.style.display="none",this.context.dialog.back.style.display="none",this.context.dialog.modalArea.style.display="none",this.context.dialog.updateModal=!1,"function"==typeof this.plugins[e].init&&this.plugins[e].init.call(this),this.context.dialog.kind="",this.modalForm=null,this.focus()}};return void 0===t&&(e.SUNEDITOR_MODULES||Object.defineProperty(e,"SUNEDITOR_MODULES",{enumerable:!0,writable:!1,configurable:!1,value:{}}),Object.defineProperty(e.SUNEDITOR_MODULES,"dialog",{enumerable:!0,writable:!1,configurable:!1,value:n})),n}))},8438:function(e){"use strict";!function(t,n){"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("SUNEDITOR_MODULES a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(e,t){const n={name:"fileBrowser",_xmlHttp:null,_loading:null,add:function(e){const t=e.context;t.fileBrowser={_closeSignal:!1,area:null,header:null,tagArea:null,body:null,list:null,tagElements:null,items:[],selectedTags:[],selectorHandler:null,contextPlugin:"",columnSize:4};let n=e.util.createElement("DIV");n.className="se-file-browser sun-editor-common";let i=e.util.createElement("DIV");i.className="se-file-browser-back";let o=e.util.createElement("DIV");o.className="se-file-browser-inner",o.innerHTML=this.set_browser(e),n.appendChild(i),n.appendChild(o),this._loading=n.querySelector(".se-loading-box"),t.fileBrowser.area=n,t.fileBrowser.header=o.querySelector(".se-file-browser-header"),t.fileBrowser.titleArea=o.querySelector(".se-file-browser-title"),t.fileBrowser.tagArea=o.querySelector(".se-file-browser-tags"),t.fileBrowser.body=o.querySelector(".se-file-browser-body"),t.fileBrowser.list=o.querySelector(".se-file-browser-list"),t.fileBrowser.tagArea.addEventListener("click",this.onClickTag.bind(e)),t.fileBrowser.list.addEventListener("click",this.onClickFile.bind(e)),o.addEventListener("mousedown",this._onMouseDown_browser.bind(e)),o.addEventListener("click",this._onClick_browser.bind(e)),t.element.relative.appendChild(n),n=null,i=null,o=null},set_browser:function(e){const t=e.lang;return'
      '},_onMouseDown_browser:function(e){/se-file-browser-inner/.test(e.target.className)?this.context.fileBrowser._closeSignal=!0:this.context.fileBrowser._closeSignal=!1},_onClick_browser:function(e){e.stopPropagation(),(/close/.test(e.target.getAttribute("data-command"))||this.context.fileBrowser._closeSignal)&&this.plugins.fileBrowser.close.call(this)},open:function(e,t){this.plugins.fileBrowser._bindClose&&(this._d.removeEventListener("keydown",this.plugins.fileBrowser._bindClose),this.plugins.fileBrowser._bindClose=null),this.plugins.fileBrowser._bindClose=function(e){/27/.test(e.keyCode)&&this.plugins.fileBrowser.close.call(this)}.bind(this),this._d.addEventListener("keydown",this.plugins.fileBrowser._bindClose);const n=this.context.fileBrowser;n.contextPlugin=e,n.selectorHandler=t;const i=this.context[e],o=i.listClass;this.util.hasClass(n.list,o)||(n.list.className="se-file-browser-list "+o),"full"===this.options.popupDisplay?n.area.style.position="fixed":n.area.style.position="absolute",n.titleArea.textContent=i.title,n.area.style.display="block",this.plugins.fileBrowser._drawFileList.call(this,this.context[e].url,this.context[e].header)},_bindClose:null,close:function(){const e=this.plugins.fileBrowser;e._xmlHttp&&e._xmlHttp.abort(),e._bindClose&&(this._d.removeEventListener("keydown",e._bindClose),e._bindClose=null);const t=this.context.fileBrowser;t.area.style.display="none",t.selectorHandler=null,t.selectedTags=[],t.items=[],t.list.innerHTML=t.tagArea.innerHTML=t.titleArea.textContent="","function"==typeof this.plugins[t.contextPlugin].init&&this.plugins[t.contextPlugin].init.call(this),t.contextPlugin=""},showBrowserLoading:function(){this._loading.style.display="block"},closeBrowserLoading:function(){this._loading.style.display="none"},_drawFileList:function(e,t){const n=this.plugins.fileBrowser,i=n._xmlHttp=this.util.getXMLHttpRequest();if(i.onreadystatechange=n._callBackGet.bind(this,i),i.open("get",e,!0),null!==t&&"object"==typeof t&&this._w.Object.keys(t).length>0)for(let e in t)i.setRequestHeader(e,t[e]);i.send(null),this.plugins.fileBrowser.showBrowserLoading()},_callBackGet:function(e){if(4===e.readyState)if(this.plugins.fileBrowser._xmlHttp=null,200===e.status)try{const t=JSON.parse(e.responseText);t.result.length>0?this.plugins.fileBrowser._drawListItem.call(this,t.result,!0):t.nullMessage&&(this.context.fileBrowser.list.innerHTML=t.nullMessage)}catch(e){throw Error('[SUNEDITOR.fileBrowser.drawList.fail] cause : "'+e.message+'"')}finally{this.plugins.fileBrowser.closeBrowserLoading(),this.context.fileBrowser.body.style.maxHeight=this._w.innerHeight-this.context.fileBrowser.header.offsetHeight-50+"px"}else if(this.plugins.fileBrowser.closeBrowserLoading(),0!==e.status){const t=e.responseText?JSON.parse(e.responseText):e,n="[SUNEDITOR.fileBrowser.get.serverException] status: "+e.status+", response: "+(t.errorMessage||e.responseText);throw Error(n)}},_drawListItem:function(e,t){const n=this.context.fileBrowser,i=this.context[n.contextPlugin],o=[],r=e.length,s=i.columnSize||n.columnSize,l=s<=1?1:Math.round(r/s)||1,a=i.itemTemplateHandler;let c="",u='
      ',d=1;for(let n,i,h=0;h
      '),t&&i.length>0)for(let e,t=0,n=i.length;t'+e+"");u+="
      ",n.list.innerHTML=u,t&&(n.items=e,n.tagArea.innerHTML=c,n.tagElements=n.tagArea.querySelectorAll("A"))},onClickTag:function(e){const t=e.target;if(!this.util.isAnchor(t))return;const n=t.textContent,i=this.plugins.fileBrowser,o=this.context.fileBrowser,r=o.tagArea.querySelector('a[title="'+n+'"]'),s=o.selectedTags,l=s.indexOf(n);l>-1?(s.splice(l,1),this.util.removeClass(r,"on")):(s.push(n),this.util.addClass(r,"on")),i._drawListItem.call(this,0===s.length?o.items:o.items.filter((function(e){return e.tag.some((function(e){return s.indexOf(e)>-1}))})),!1)},onClickFile:function(e){e.preventDefault(),e.stopPropagation();const t=this.context.fileBrowser,n=t.list;let i=e.target,o=null;if(i===n)return;for(;n!==i.parentNode&&(o=i.getAttribute("data-command"),!o);)i=i.parentNode;if(!o)return;(t.selectorHandler||this.context[t.contextPlugin].selectorHandler)(i,i.parentNode.querySelector(".__se__img_name").textContent),this.plugins.fileBrowser.close.call(this)}};return void 0===t&&(e.SUNEDITOR_MODULES||Object.defineProperty(e,"SUNEDITOR_MODULES",{enumerable:!0,writable:!1,configurable:!1,value:{}}),Object.defineProperty(e.SUNEDITOR_MODULES,"fileBrowser",{enumerable:!0,writable:!1,configurable:!1,value:n})),n}))},1913:function(e){"use strict";!function(t,n){"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("SUNEDITOR_MODULES a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(e,t){const n={name:"fileManager",_xmlHttp:null,_checkMediaComponent:function(e){return!/IMG/i.test(e)||(!/FIGURE/i.test(e.parentElement.nodeName)||!/FIGURE/i.test(e.parentElement.parentElement.nodeName))},upload:function(e,t,n,i,o){this.showLoading();const r=this.plugins.fileManager,s=r._xmlHttp=this.util.getXMLHttpRequest();if(s.onreadystatechange=r._callBackUpload.bind(this,s,i,o),s.open("post",e,!0),null!==t&&"object"==typeof t&&this._w.Object.keys(t).length>0)for(let e in t)s.setRequestHeader(e,t[e]);s.send(n)},_callBackUpload:function(e,t,n){if(4===e.readyState)if(200===e.status)try{t(e)}catch(e){throw Error('[SUNEDITOR.fileManager.upload.callBack.fail] cause : "'+e.message+'"')}finally{this.closeLoading()}else{this.closeLoading();const t=e.responseText?JSON.parse(e.responseText):e;if("function"!=typeof n||n("",t,this)){const n="[SUNEDITOR.fileManager.upload.serverException] status: "+e.status+", response: "+(t.errorMessage||e.responseText);throw this.functions.noticeOpen(n),Error(n)}}},checkInfo:function(e,t,n,i,o){let r=[];for(let e=0,n=t.length;e0;){const t=r.shift();this.util.getParentElement(t,this.util.isMediaComponent)&&s._checkMediaComponent(t)?!t.getAttribute("data-index")||h.indexOf(1*t.getAttribute("data-index"))<0?(d.push(l._infoIndex),t.removeAttribute("data-index"),c(e,t,n,null,o)):d.push(1*t.getAttribute("data-index")):(d.push(l._infoIndex),i(t))}for(let e,t=0;t-1||(a.splice(t,1),"function"==typeof n&&n(null,e,"delete",null,0,this),t--);o&&(this.context.resizing._resize_plugin=u)},setInfo:function(e,t,n,i,o){const r=o?this.context.resizing._resize_plugin:"";o&&(this.context.resizing._resize_plugin=e);const s=this.plugins[e],l=this.context[e],a=l._infoList;let c=t.getAttribute("data-index"),u=null,d="";if(i||(i={name:t.getAttribute("data-file-name")||("string"==typeof t.src?t.src.split("/").pop():""),size:t.getAttribute("data-file-size")||0}),!c||this._componentsInfoInit)d="create",c=l._infoIndex++,t.setAttribute("data-index",c),t.setAttribute("data-file-name",i.name),t.setAttribute("data-file-size",i.size),u={src:t.src,index:1*c,name:i.name,size:i.size},a.push(u);else{d="update",c*=1;for(let e=0,t=a.length;e=0){const i=this.context[e]._infoList;for(let e=0,o=i.length;e
      ",i},_module_getSizeX:function(e,t,n,i){return t||(t=e._element),n||(n=e._cover),i||(i=e._container),t?/%$/.test(t.style.width)?(i&&this.util.getNumber(i.style.width,2)||100)+"%":t.style.width:""},_module_getSizeY:function(e,t,n,i){return t||(t=e._element),n||(n=e._cover),i||(i=e._container),i&&n?this.util.getNumber(n.style.paddingBottom,0)>0&&!this.context.resizing._rotateVertical?n.style.height:/%$/.test(t.style.height)&&/%$/.test(t.style.width)?(i&&this.util.getNumber(i.style.height,2)||100)+"%":t.style.height:t&&t.style.height||""},_module_setModifyInputSize:function(e,t){const n=e._onlyPercentage&&this.context.resizing._rotateVertical;e.proportion.checked=e._proportionChecked="false"!==e._element.getAttribute("data-proportion");let i=n?"":this.plugins.resizing._module_getSizeX.call(this,e);if(i===e._defaultSizeX&&(i=""),e._onlyPercentage&&(i=this.util.getNumber(i,2)),e.inputX.value=i,t.setInputSize.call(this,"x"),!e._onlyPercentage){let t=n?"":this.plugins.resizing._module_getSizeY.call(this,e);t===e._defaultSizeY&&(t=""),e._onlyPercentage&&(t=this.util.getNumber(t,2)),e.inputY.value=t}e.inputX.disabled=!!n,e.inputY.disabled=!!n,e.proportion.disabled=!!n,t.setRatio.call(this)},_module_setInputSize:function(e,t){if(e._onlyPercentage)"x"===t&&e.inputX.value>100&&(e.inputX.value=100);else if(e.proportion.checked&&e._ratio&&/\d/.test(e.inputX.value)&&/\d/.test(e.inputY.value)){const n=e.inputX.value.replace(/\d+|\./g,"")||e.sizeUnit,i=e.inputY.value.replace(/\d+|\./g,"")||e.sizeUnit;if(n!==i)return;const o="%"===n?2:0;"x"===t?e.inputY.value=this.util.getNumber(e._ratioY*this.util.getNumber(e.inputX.value,o),o)+i:e.inputX.value=this.util.getNumber(e._ratioX*this.util.getNumber(e.inputY.value,o),o)+n}},_module_setRatio:function(e){const t=e.inputX.value,n=e.inputY.value;if(e.proportion.checked&&/\d+/.test(t)&&/\d+/.test(n)){if((t.replace(/\d+|\./g,"")||e.sizeUnit)!==(n.replace(/\d+|\./g,"")||e.sizeUnit))e._ratio=!1;else if(!e._ratio){const i=this.util.getNumber(t,0),o=this.util.getNumber(n,0);e._ratio=!0,e._ratioX=i/o,e._ratioY=o/i}}else e._ratio=!1},_module_sizeRevert:function(e){e._onlyPercentage?e.inputX.value=e._origin_w>100?100:e._origin_w:(e.inputX.value=e._origin_w,e.inputY.value=e._origin_h)},_module_saveCurrentSize:function(e){const t=this.plugins.resizing._module_getSizeX.call(this,e),n=this.plugins.resizing._module_getSizeY.call(this,e);e._element.setAttribute("width",t.replace("px","")),e._element.setAttribute("height",n.replace("px","")),e._element.setAttribute("data-size",t+","+n),e._videoRatio&&(e._videoRatio=n)},call_controller_resize:function(e,t){const n=this.context.resizing,i=this.context[t];n._resize_plugin=t;const o=n.resizeContainer,r=n.resizeDiv,s=this.util.getOffset(e,this.context.element.wysiwygFrame),l=n._rotateVertical=/^(90|270)$/.test(Math.abs(e.getAttribute("data-rotate")).toString()),a=l?e.offsetHeight:e.offsetWidth,c=l?e.offsetWidth:e.offsetHeight,u=s.top,d=s.left-this.context.element.wysiwygFrame.scrollLeft;o.style.top=u+"px",o.style.left=d+"px",o.style.width=a+"px",o.style.height=c+"px",r.style.top="0px",r.style.left="0px",r.style.width=a+"px",r.style.height=c+"px";let h=e.getAttribute("data-align")||"basic";h="none"===h?"basic":h;const p=this.util.getParentElement(e,this.util.isComponent),f=this.util.getParentElement(e,"FIGURE"),g=this.plugins.resizing._module_getSizeX.call(this,i,e,f,p)||"auto",m=i._onlyPercentage&&"image"===t?"":", "+(this.plugins.resizing._module_getSizeY.call(this,i,e,f,p)||"auto");this.util.changeTxt(n.resizeDisplay,this.lang.dialogBox[h]+" ("+g+m+")"),n.resizeButtonGroup.style.display=i._resizing?"":"none";const y=!i._resizing||i._resizeDotHide||i._onlyPercentage?"none":"flex",v=n.resizeHandles;for(let e=0,t=v.length;e=360?0:u;s.setAttribute("data-rotate",d),c._rotateVertical=/^(90|270)$/.test(this._w.Math.abs(d).toString()),this.plugins.resizing.setTransformSize.call(this,s,null,null),this.selectComponent(s,o);break;case"onalign":return void this.plugins.resizing.openAlignMenu.call(this);case"align":const h="basic"===i?"none":i;l.setAlign.call(this,h,null,null,null),this.selectComponent(s,o);break;case"caption":const p=!r._captionChecked;if(l.openModify.call(this,!0),r._captionChecked=r.captionCheckEl.checked=p,l.update_image.call(this,!1,!1,!1),p){const e=this.util.getChildElement(r._caption,(function(e){return 3===e.nodeType}));e?this.setRange(e,0,e,e.textContent.length):r._caption.focus(),this.controllersOff()}else this.selectComponent(s,o),l.openModify.call(this,!0);break;case"revert":l.setOriginSize.call(this),this.selectComponent(s,o);break;case"update":l.openModify.call(this),this.controllersOff();break;case"delete":l.destroy.call(this)}this.history.push(!1)}},resetTransform:function(e){const t=(e.getAttribute("data-size")||e.getAttribute("data-origin")||"").split(",");this.context.resizing._rotateVertical=!1,e.style.maxWidth="",e.style.transform="",e.style.transformOrigin="",e.setAttribute("data-rotate",""),e.setAttribute("data-rotateX",""),e.setAttribute("data-rotateY",""),this.plugins[this.context.resizing._resize_plugin].setSize.call(this,t[0]?t[0]:"auto",t[1]?t[1]:"",!0)},setTransformSize:function(e,t,n){let i=e.getAttribute("data-percentage");const o=this.context.resizing._rotateVertical,r=1*e.getAttribute("data-rotate");let s="";if(i&&!o)i=i.split(","),"auto"===i[0]&&"auto"===i[1]?this.plugins[this.context.resizing._resize_plugin].setAutoSize.call(this):this.plugins[this.context.resizing._resize_plugin].setPercentSize.call(this,i[0],i[1]);else{const i=this.util.getParentElement(e,"FIGURE"),l=t||e.offsetWidth,a=n||e.offsetHeight,c=(o?a:l)+"px",u=(o?l:a)+"px";if(this.plugins[this.context.resizing._resize_plugin].cancelPercentAttr.call(this),this.plugins[this.context.resizing._resize_plugin].setSize.call(this,l+"px",a+"px",!0),i.style.width=c,i.style.height=this.context[this.context.resizing._resize_plugin]._caption?"":u,o){s=90===r||-270===r?a/2+"px "+a/2+"px 0":l/2+"px "+l/2+"px 0"}}e.style.transformOrigin=s,this.plugins.resizing._setTransForm(e,r.toString(),e.getAttribute("data-rotateX")||"",e.getAttribute("data-rotateY")||""),e.style.maxWidth=o?"none":"",this.plugins.resizing.setCaptionPosition.call(this,e)},_setTransForm:function(e,t,n,i){let o=(e.offsetWidth-e.offsetHeight)*(/-/.test(t)?1:-1),r="";if(/[1-9]/.test(t)&&(n||i))switch(r=n?"Y":"X",t){case"90":r=n&&i?"X":i?r:"";break;case"270":o*=-1,r=n&&i?"Y":n?r:"";break;case"-90":r=n&&i?"Y":n?r:"";break;case"-270":o*=-1,r=n&&i?"X":i?r:"";break;default:r=""}t%180==0&&(e.style.maxWidth=""),e.style.transform="rotate("+t+"deg)"+(n?" rotateX("+n+"deg)":"")+(i?" rotateY("+i+"deg)":"")+(r?" translate"+r+"("+o+"px)":"")},setCaptionPosition:function(e){const t=this.util.getChildElement(this.util.getParentElement(e,"FIGURE"),"FIGCAPTION");t&&(t.style.marginTop=(this.context.resizing._rotateVertical?e.offsetWidth-e.offsetHeight:0)+"px")},onMouseDown_resize_handle:function(e){e.stopPropagation(),e.preventDefault();const t=this.context.resizing,n=t._resize_direction=e.target.classList[0];t._resizeClientX=e.clientX,t._resizeClientY=e.clientY,this.context.element.resizeBackground.style.display="block",t.resizeButton.style.display="none",t.resizeDiv.style.float=/l/.test(n)?"right":/r/.test(n)?"left":"none";const i=function(e){if("keydown"===e.type&&27!==e.keyCode)return;const r=t._isChange;t._isChange=!1,this.removeDocEvent("mousemove",o),this.removeDocEvent("mouseup",i),this.removeDocEvent("keydown",i),"keydown"===e.type?(this.controllersOff(),this.context.element.resizeBackground.style.display="none",this.plugins[this.context.resizing._resize_plugin].init.call(this)):(this.plugins.resizing.cancel_controller_resize.call(this,n),r&&this.history.push(!1))}.bind(this),o=this.plugins.resizing.resizing_element.bind(this,t,n,this.context[t._resize_plugin]);this.addDocEvent("mousemove",o),this.addDocEvent("mouseup",i),this.addDocEvent("keydown",i)},resizing_element:function(e,t,n,i){const o=i.clientX,r=i.clientY;let s=n._element_w,l=n._element_h;const a=n._element_w+(/r/.test(t)?o-e._resizeClientX:e._resizeClientX-o),c=n._element_h+(/b/.test(t)?r-e._resizeClientY:e._resizeClientY-r),u=n._element_h/n._element_w*a;/t/.test(t)&&(e.resizeDiv.style.top=n._element_h-(/h/.test(t)?c:u)+"px"),/l/.test(t)&&(e.resizeDiv.style.left=n._element_w-a+"px"),/r|l/.test(t)&&(e.resizeDiv.style.width=a+"px",s=a),/^(t|b)[^h]$/.test(t)?(e.resizeDiv.style.height=u+"px",l=u):/^(t|b)h$/.test(t)&&(e.resizeDiv.style.height=c+"px",l=c),e._resize_w=s,e._resize_h=l,this.util.changeTxt(e.resizeDisplay,this._w.Math.round(s)+" x "+this._w.Math.round(l)),e._isChange=!0},cancel_controller_resize:function(e){const t=this.context.resizing._rotateVertical;this.controllersOff(),this.context.element.resizeBackground.style.display="none";let n=this._w.Math.round(t?this.context.resizing._resize_h:this.context.resizing._resize_w),i=this._w.Math.round(t?this.context.resizing._resize_w:this.context.resizing._resize_h);if(!t&&!/%$/.test(n)){const e=16,t=this.context.element.wysiwygFrame.clientWidth-2*e-2;this.util.getNumber(n,0)>t&&(i=this._w.Math.round(i/n*t),n=t)}const o=this.context.resizing._resize_plugin;this.plugins[o].setSize.call(this,n,i,!1,e),t&&this.plugins.resizing.setTransformSize.call(this,this.context[this.context.resizing._resize_plugin]._element,n,i),this.selectComponent(this.context[o]._element,o)}};return void 0===t&&(e.SUNEDITOR_MODULES||Object.defineProperty(e,"SUNEDITOR_MODULES",{enumerable:!0,writable:!1,configurable:!1,value:{}}),Object.defineProperty(e.SUNEDITOR_MODULES,"resizing",{enumerable:!0,writable:!1,configurable:!1,value:n})),n}))},6262:(e,t)=>{"use strict";t.A=(e,t)=>{const n=e.__vccOpts||e;for(const[e,i]of t)n[e]=i;return n}},1842:(e,t,n)=>{function i(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var o=i(n(629)),r=n(6993),s=i(n(1684));function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&"back_forward"===window.performance.getEntriesByType("navigation")[0].type},n.handleBackForwardVisit=function(e){var t=this;window.history.state.version=e.version,this.setPage(window.history.state,{preserveScroll:!0,preserveState:!0}).then((function(){t.restoreScrollPositions(),b(e)}))},n.locationVisit=function(e,t){try{window.sessionStorage.setItem("inertiaLocationVisit",JSON.stringify({preserveScroll:t})),window.location.href=e.href,m(window.location).href===m(e).href&&window.location.reload()}catch(e){return!1}},n.isLocationVisit=function(){try{return null!==window.sessionStorage.getItem("inertiaLocationVisit")}catch(e){return!1}},n.handleLocationVisit=function(e){var t,n,i,o,r=this,s=JSON.parse(window.sessionStorage.getItem("inertiaLocationVisit")||"");window.sessionStorage.removeItem("inertiaLocationVisit"),e.url+=window.location.hash,e.rememberedState=null!=(t=null==(n=window.history.state)?void 0:n.rememberedState)?t:{},e.scrollRegions=null!=(i=null==(o=window.history.state)?void 0:o.scrollRegions)?i:[],this.setPage(e,{preserveScroll:s.preserveScroll,preserveState:!0}).then((function(){s.preserveScroll&&r.restoreScrollPositions(),b(e)}))},n.isLocationVisitResponse=function(e){return e&&409===e.status&&e.headers["x-inertia-location"]},n.isInertiaResponse=function(e){return null==e?void 0:e.headers["x-inertia"]},n.createVisitId=function(){return this.visitId={},this.visitId},n.cancelVisit=function(e,t){var n=t.cancelled,i=void 0!==n&&n,o=t.interrupted,r=void 0!==o&&o;!e||e.completed||e.cancelled||e.interrupted||(e.cancelToken.cancel(),e.onCancel(),e.completed=!1,e.cancelled=i,e.interrupted=r,v(e),e.onFinish(e))},n.finishVisit=function(e){e.cancelled||e.interrupted||(e.completed=!0,e.cancelled=!1,e.interrupted=!1,v(e),e.onFinish(e))},n.resolvePreserveOption=function(e,t){return"function"==typeof e?e(t):"errors"===e?Object.keys(t.props.errors||{}).length>0:e},n.visit=function(e,n){var i=this,r=void 0===n?{}:n,s=r.method,a=void 0===s?t.IT.GET:s,u=r.data,h=void 0===u?{}:u,p=r.replace,v=void 0!==p&&p,b=r.preserveScroll,_=void 0!==b&&b,w=r.preserveState,C=void 0!==w&&w,x=r.only,E=void 0===x?[]:x,S=r.headers,k=void 0===S?{}:S,T=r.errorBag,N=void 0===T?"":T,A=r.forceFormData,L=void 0!==A&&A,O=r.onCancelToken,B=void 0===O?function(){}:O,R=r.onBefore,P=void 0===R?function(){}:R,I=r.onStart,M=void 0===I?function(){}:I,z=r.onProgress,F=void 0===z?function(){}:z,j=r.onFinish,D=void 0===j?function(){}:j,H=r.onCancel,V=void 0===H?function(){}:H,U=r.onSuccess,W=void 0===U?function(){}:U,$=r.onError,q=void 0===$?function(){}:$,Z=r.queryStringArrayFormat,Y=void 0===Z?"brackets":Z,G="string"==typeof e?f(e):e;if(!function e(t){return t instanceof File||t instanceof Blob||t instanceof FileList&&t.length>0||t instanceof FormData&&Array.from(t.values()).some((function(t){return e(t)}))||"object"==typeof t&&null!==t&&Object.values(t).some((function(t){return e(t)}))}(h)&&!L||h instanceof FormData||(h=d(h)),!(h instanceof FormData)){var K=g(a,G,h,Y),X=K[1];G=f(K[0]),h=X}var J={url:G,method:a,data:h,replace:v,preserveScroll:_,preserveState:C,only:E,headers:k,errorBag:N,forceFormData:L,queryStringArrayFormat:Y,cancelled:!1,completed:!1,interrupted:!1};if(!1!==P(J)&&function(e){return y("before",{cancelable:!0,detail:{visit:e}})}(J)){this.activeVisit&&this.cancelVisit(this.activeVisit,{interrupted:!0}),this.saveScrollPositions();var Q=this.createVisitId();this.activeVisit=l({},J,{onCancelToken:B,onBefore:P,onStart:M,onProgress:F,onFinish:D,onCancel:V,onSuccess:W,onError:q,queryStringArrayFormat:Y,cancelToken:o.CancelToken.source()}),B({cancel:function(){i.activeVisit&&i.cancelVisit(i.activeVisit,{cancelled:!0})}}),function(e){y("start",{detail:{visit:e}})}(J),M(J),o({method:a,url:m(G).href,data:a===t.IT.GET?{}:h,params:a===t.IT.GET?h:{},cancelToken:this.activeVisit.cancelToken.token,headers:l({},k,{Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0},E.length?{"X-Inertia-Partial-Component":this.page.component,"X-Inertia-Partial-Data":E.join(",")}:{},N&&N.length?{"X-Inertia-Error-Bag":N}:{},this.page.version?{"X-Inertia-Version":this.page.version}:{}),onUploadProgress:function(e){h instanceof FormData&&(e.percentage=Math.round(e.loaded/e.total*100),function(e){y("progress",{detail:{progress:e}})}(e),F(e))}}).then((function(e){var t;if(!i.isInertiaResponse(e))return Promise.reject({response:e});var n=e.data;E.length&&n.component===i.page.component&&(n.props=l({},i.page.props,n.props)),_=i.resolvePreserveOption(_,n),(C=i.resolvePreserveOption(C,n))&&null!=(t=window.history.state)&&t.rememberedState&&n.component===i.page.component&&(n.rememberedState=window.history.state.rememberedState);var o=G,r=f(n.url);return o.hash&&!r.hash&&m(o).href===r.href&&(r.hash=o.hash,n.url=r.href),i.setPage(n,{visitId:Q,replace:v,preserveScroll:_,preserveState:C})})).then((function(){var e=i.page.props.errors||{};if(Object.keys(e).length>0){var t=N?e[N]?e[N]:{}:e;return function(e){y("error",{detail:{errors:e}})}(t),q(t)}return y("success",{detail:{page:i.page}}),W(i.page)})).catch((function(e){if(i.isInertiaResponse(e.response))return i.setPage(e.response.data,{visitId:Q});if(i.isLocationVisitResponse(e.response)){var t=f(e.response.headers["x-inertia-location"]),n=G;n.hash&&!t.hash&&m(n).href===t.href&&(t.hash=n.hash),i.locationVisit(t,!0===_)}else{if(!e.response)return Promise.reject(e);y("invalid",{cancelable:!0,detail:{response:e.response}})&&c.show(e.response.data)}})).then((function(){i.activeVisit&&i.finishVisit(i.activeVisit)})).catch((function(e){if(!o.isCancel(e)){var t=y("exception",{cancelable:!0,detail:{exception:e}});if(i.activeVisit&&i.finishVisit(i.activeVisit),t)return Promise.reject(e)}}))}},n.setPage=function(e,t){var n=this,i=void 0===t?{}:t,o=i.visitId,r=void 0===o?this.createVisitId():o,s=i.replace,l=void 0!==s&&s,a=i.preserveScroll,c=void 0!==a&&a,u=i.preserveState,d=void 0!==u&&u;return Promise.resolve(this.resolveComponent(e.component)).then((function(t){r===n.visitId&&(e.scrollRegions=e.scrollRegions||[],e.rememberedState=e.rememberedState||{},(l=l||f(e.url).href===window.location.href)?n.replaceState(e):n.pushState(e),n.swapComponent({component:t,page:e,preserveState:d}).then((function(){c||n.resetScrollPositions(),l||b(e)})))}))},n.pushState=function(e){this.page=e,window.history.pushState(e,"",e.url)},n.replaceState=function(e){this.page=e,window.history.replaceState(e,"",e.url)},n.handlePopstateEvent=function(e){var t=this;if(null!==e.state){var n=e.state,i=this.createVisitId();Promise.resolve(this.resolveComponent(n.component)).then((function(e){i===t.visitId&&(t.page=n,t.swapComponent({component:e,page:n,preserveState:!1}).then((function(){t.restoreScrollPositions(),b(n)})))}))}else{var o=f(this.page.url);o.hash=window.location.hash,this.replaceState(l({},this.page,{url:o.href})),this.resetScrollPositions()}},n.get=function(e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),this.visit(e,l({},i,{method:t.IT.GET,data:n}))},n.reload=function(e){return void 0===e&&(e={}),this.visit(window.location.href,l({},e,{preserveScroll:!0,preserveState:!0}))},n.replace=function(e,t){var n;return void 0===t&&(t={}),console.warn("Inertia.replace() has been deprecated and will be removed in a future release. Please use Inertia."+(null!=(n=t.method)?n:"get")+"() instead."),this.visit(e,l({preserveState:!0},t,{replace:!0}))},n.post=function(e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),this.visit(e,l({preserveState:!0},i,{method:t.IT.POST,data:n}))},n.put=function(e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),this.visit(e,l({preserveState:!0},i,{method:t.IT.PUT,data:n}))},n.patch=function(e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),this.visit(e,l({preserveState:!0},i,{method:t.IT.PATCH,data:n}))},n.delete=function(e,n){return void 0===n&&(n={}),this.visit(e,l({preserveState:!0},n,{method:t.IT.DELETE}))},n.remember=function(e,t){var n,i;void 0===t&&(t="default"),_||this.replaceState(l({},this.page,{rememberedState:l({},null==(n=this.page)?void 0:n.rememberedState,(i={},i[t]=e,i))}))},n.restore=function(e){var t,n;if(void 0===e&&(e="default"),!_)return null==(t=window.history.state)||null==(n=t.rememberedState)?void 0:n[e]},n.on=function(e,t){var n=function(e){var n=t(e);e.cancelable&&!e.defaultPrevented&&!1===n&&e.preventDefault()};return document.addEventListener("inertia:"+e,n),function(){return document.removeEventListener("inertia:"+e,n)}},e}(),C={buildDOMElement:function(e){var t=document.createElement("template");t.innerHTML=e;var n=t.content.firstChild;if(!e.startsWith("