/ * !
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md .
* /
! function ( t ) { t . en = Object . assign ( t . en || { } , { a : "Cannot upload file:" , b : "Image toolbar" , c : "Table toolbar" , d : "Bold" , e : "Code" , f : "Strikethrough" , g : "Italic" , h : "Dropdown toolbar" , i : "Upload in progress" , j : "Rich Text Editor, %0" , k : "Insert table" , l : "Header column" , m : "Insert column left" , n : "Insert column right" , o : "Delete column" , p : "Column" , q : "Header row" , r : "Insert row below" , s : "Insert row above" , t : "Delete row" , u : "Row" , v : "Merge cell up" , w : "Merge cell right" , x : "Merge cell down" , y : "Merge cell left" , z : "Split cell vertically" , aa : "Split cell horizontally" , ab : "Merge cells" , ac : "To-do List" , ad : "Widget toolbar" , ae : "Numbered List" , af : "Bulleted List" , ag : "Full size image" , ah : "Side image" , ai : "Left aligned image" , aj : "Centered image" , ak : "Right aligned image" , al : "Editor toolbar" , am : "Show more items" , an : "image widget" , ao : "Link" , ap : "Enter image caption" , aq : "Upload failed" , ar : "%0 of %1" , as : "Previous" , at : "Next" , au : "Change image text alternative" , av : "Save" , aw : "Cancel" , ax : "Text alternative" , ay : "Open in a new tab" , az : "Downloadable" , ba : "Unlink" , bb : "Edit link" , bc : "Open link in new tab" , bd : "This link has no URL" , be : "Link URL" , bf : "Undo" , bg : "Redo" , bh : "Insert image" , bi : "Choose heading" , bj : "Heading" , bk : "Block quote" , bl : "Paragraph" , bm : "Heading 1" , bn : "Heading 2" , bo : "Heading 3" , bp : "Heading 4" , bq : "Heading 5" , br : "Heading 6" } ) } ( window . CKEDITOR _TRANSLATIONS || ( window . CKEDITOR _TRANSLATIONS = { } ) ) , function ( t , e ) { "object" == typeof exports && "object" == typeof module ? module . exports = e ( ) : "function" == typeof define && define . amd ? define ( [ ] , e ) : "object" == typeof exports ? exports . OPEditor = e ( ) : t . OPEditor = e ( ) } ( window , ( function ( ) { return function ( t ) { var e = { } ; function n ( i ) { if ( e [ i ] ) return e [ i ] . exports ; var o = e [ i ] = { i : i , l : ! 1 , exports : { } } ; return t [ i ] . call ( o . exports , o , o . exports , n ) , o . l = ! 0 , o . exports } return n . m = t , n . c = e , n . d = function ( t , e , i ) { n . o ( t , e ) || Object . defineProperty ( t , e , { enumerable : ! 0 , get : i } ) } , n . r = function ( t ) { "undefined" != typeof Symbol && Symbol . toStringTag && Object . defineProperty ( t , Symbol . toStringTag , { value : "Module" } ) , Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) } , n . t = function ( t , e ) { if ( 1 & e && ( t = n ( t ) ) , 8 & e ) return t ; if ( 4 & e && "object" == typeof t && t && t . _ _esModule ) return t ; var i = Object . create ( null ) ; if ( n . r ( i ) , Object . defineProperty ( i , "default" , { enumerable : ! 0 , value : t } ) , 2 & e && "string" != typeof t ) for ( var o in t ) n . d ( i , o , function ( e ) { return t [ e ] } . bind ( null , o ) ) ; return i } , n . n = function ( t ) { var e = t && t . _ _esModule ? function ( ) { return t . default } : function ( ) { return t } ; return n . d ( e , "a" , e ) , e } , n . o = function ( t , e ) { return Object . prototype . hasOwnProperty . call ( t , e ) } , n . p = "" , n ( n . s = 159 ) } ( [ function ( t , e , n ) { "use strict" ; n . d ( e , "b" , ( function ( ) { return o } ) ) , n . d ( e , "a" , ( function ( ) { return r } ) ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const i = "https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html" ; class o extends Error { constructor ( t , e , n ) { t = r ( t ) , n && ( t += " " + JSON . stringify ( n ) ) , super ( t ) , this . name = "CKEditorError" , this . context = e , this . data = n } is ( t ) { return "CKEditorError" === t } static rethrowUnexpectedError ( t , e ) { if ( t . is && t . is ( "CKEditorError" ) ) throw t ; throw new o ( "unexpected-error" , e , { originalError : { message : t . message , stack : t . stack , name : t . name } } ) } } function r ( t ) { const e = t . match ( /^([^:]+):/ ) ; return e ? t + ` Read more: ${ i } #error- ${ e [ 1 ] } \n ` : t } } , function ( t , e , n ) { "use strict" ; var i , o = { } , r = function ( ) { return void 0 === i && ( i = Boolean ( window && document && document . all && ! window . atob ) ) , i } , s = function ( ) { var t = { } ; return function ( e ) { if ( void 0 === t [ e ] ) { var n = document . querySelector ( e ) ; if ( window . HTMLIFrameElement && n instanceof window . HTMLIFrameElement ) try { n = n . contentDocument . head } catch ( t ) { n = null } t [ e ] = n } return t [ e ] } } ( ) ; function a ( t , e ) { for ( var n = [ ] , i = { } , o = 0 ; o < t . length ; o ++ ) { var r = t [ o ] , s = e . base ? r [ 0 ] + e . base : r [ 0 ] , a = { css : r [ 1 ] , media : r [ 2 ] , sourceMap : r [ 3 ] } ; i [ s ] ? i [ s ] . parts . push ( a ) : n . push ( i [ s ] = { id : s , parts : [ a ] } ) } return n } function c ( t , e ) { for ( var n = 0 ; n < t . length ; n ++ ) { var i = t [ n ] , r = o [ i . id ] , s = 0 ; if ( r ) { for ( r . refs ++ ; s < r . parts . length ; s ++ ) r . parts [ s ] ( i . parts [ s ] ) ; for ( ; s < i . parts . length ; s ++ ) r . parts . push ( g ( i . parts [ s ] , e ) ) } else { for ( var a = [ ] ; s < i . parts . length ; s ++ ) a . push ( g ( i . parts [ s ] , e ) ) ; o [ i . id ] = { id : i . id , refs : 1 , parts : a } } } } function l ( t ) { var e = document . createElement ( "style" ) ; if ( void 0 === t . attributes . nonce ) { var i = n . nc ; i && ( t . attributes . nonce = i ) } if ( Object . keys ( t . attributes ) . forEach ( ( function ( n ) { e . setAttribute ( n , t . attributes [ n ] ) } ) ) , "function" == typeof t . insert ) t . insert ( e ) ; else { var o = s ( t . insert || "head" ) ; if ( ! o ) throw new Error ( "Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid." ) ; o . appendChild ( e ) } return e } var d , u = ( d = [ ] , function ( t , e ) { return d [ t ] = e , d . filter ( Boolean ) . join ( "\n" ) } ) ; function h ( t , e , n , i ) { var o = n ? "" : i . css ; if ( t . styleSheet ) t . styleSheet . cssText = u ( e , o ) ; else { var r = document . createTextNode ( o ) , s = t . childNodes ; s [ e ] && t . removeChild ( s [ e ] ) , s . length ? t . insertBefore ( r , s [ e ] ) : t . appendChild ( r ) } } function f ( t , e , n ) { var i = n . css , o = n . media , r = n . sourceMap ; if ( o && t . setAttribute ( "media" , o ) , r && btoa && ( i += "\n/*# sourceMappingURL=data:application/json;base64," . concat ( btoa ( unescape ( encodeURIComponent ( JSON . stringify ( r ) ) ) ) , " */" ) ) , t . styleSheet ) t . styleSheet . cssText = i ; else { for ( ; t . firstChild ; ) t . removeChild ( t . firstChild ) ; t . appendChild ( document . createTextNode ( i ) ) } } var p = null , m = 0 ; function g ( t , e ) { var n , i , o ; if ( e . singleton ) { var r = m ++ ; n = p || ( p = l ( e ) ) , i = h . bind ( null , n , r , ! 1 ) , o = h . bind ( null , n , r , ! 0 ) } else n = l ( e ) , i = f . bind ( null , n , e ) , o = function ( ) { ! function ( t ) { if ( null === t . parentNode ) return ! 1 ; t . parentNode . removeChild ( t ) } ( n ) } ; return i ( t ) , function ( e ) { if ( e ) { if ( e . css === t . css && e . media === t . media && e . sourceMap === t . sourceMap ) return ; i ( t = e ) } else o ( ) } } t . exports = function ( t , e ) { ( e = e || { } ) . attributes = "object" == typeof e . attributes ? e . attributes : { } , e . singleton || "boolean" == typeof e . singleton || ( e . singleton = r ( ) ) ; var n = a ( t , e ) ; return c ( n , e ) , function ( t ) { for ( var i = [ ] , r = 0 ; r < n . length ; r ++ ) { var s = n [ r ] , l = o [ s . id ] ; l && ( l . refs -- , i . push ( l ) ) } t && c ( a ( t , e ) , e ) ; for ( var d = 0 ; d < i . length ; d ++ ) { var u = i [ d ] ; if ( 0 === u . refs ) { for ( var h = 0 ; h < u . parts . length ; h ++ ) u . parts [ h ] ( ) ; delete o [ u . id ] } } } } } , function ( t , e , n ) { "use strict" ; var i = Object . prototype . hasOwnProperty ; function o ( t , e ) { return i . call ( t , e ) } function r ( t ) { return ! ( t >= 55296 && t <= 57343 ) && ( ! ( t >= 64976 && t <= 65007 ) && ( 65535 != ( 65535 & t ) && 65534 != ( 65535 & t ) && ( ! ( t >= 0 && t <= 8 ) && ( 11 !== t && ( ! ( t >= 14 && t <= 31 ) && ( ! ( t >= 127 && t <= 159 ) && ! ( t > 1114111 ) ) ) ) ) ) ) } function s ( t ) { if ( t > 65535 ) { var e = 55296 + ( ( t -= 65536 ) >> 10 ) , n = 56320 + ( 1023 & t ) ; return String . fromCharCode ( e , n ) } return String . fromCharCode ( t ) } var a = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g , c = new RegExp ( a . source + "|" + /&([a-z#][a-z0-9]{1,31});/gi . source , "gi" ) , l = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i , d = n ( 16 ) ; var u = /[&<>"]/ , h = /[&<>"]/g , f = { "&" : "&" , "<" : "<" , ">" : ">" , '"' : """ } ; function p ( t ) { return f [ t ] } var m = /[.?*+^$[\]\\(){}|-]/g ; var g = n ( 11 ) ; e . lib = { } , e . lib . mdurl = n ( 17 ) , e . lib . ucmicro = n ( 105 ) , e . assign = function ( t ) { return Array . prototype . slice . call ( arguments , 1 ) . forEach ( ( function ( e ) { if ( e ) { if ( " objec
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const o = "object" == typeof window ? window : t ; if ( o . CKEDITOR _VERSION ) throw new i . b ( "ckeditor-duplicated-modules: Some CKEditor 5 modules are duplicated." , null ) ; o . CKEDITOR _VERSION = e . a } ) . call ( this , n ( 9 ) ) } , function ( t , e , n ) { "use strict" ; ( function ( t ) { var n = "object" == typeof t && t && t . Object === Object && t ; e . a = n } ) . call ( this , n ( 9 ) ) } , function ( t , e ) { var n ; n = function ( ) { return this } ( ) ; try { n = n || new Function ( "return this" ) ( ) } catch ( t ) { "object" == typeof window && ( n = window ) } t . exports = n } , function ( t , e ) { t . exports = function ( t ) { if ( ! t . webpackPolyfill ) { var e = Object . create ( t ) ; e . children || ( e . children = [ ] ) , Object . defineProperty ( e , "loaded" , { enumerable : ! 0 , get : function ( ) { return e . l } } ) , Object . defineProperty ( e , "id" , { enumerable : ! 0 , get : function ( ) { return e . i } } ) , Object . defineProperty ( e , "exports" , { enumerable : ! 0 } ) , e . webpackPolyfill = 1 } return e } } , function ( t , e ) { t . exports = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/ } , function ( t , e , n ) { "use strict" ; function i ( ) { this . _ _rules _ _ = [ ] , this . _ _cache _ _ = null } i . prototype . _ _find _ _ = function ( t ) { for ( var e = 0 ; e < this . _ _rules _ _ . length ; e ++ ) if ( this . _ _rules _ _ [ e ] . name === t ) return e ; return - 1 } , i . prototype . _ _compile _ _ = function ( ) { var t = this , e = [ "" ] ; t . _ _rules _ _ . forEach ( ( function ( t ) { t . enabled && t . alt . forEach ( ( function ( t ) { e . indexOf ( t ) < 0 && e . push ( t ) } ) ) } ) ) , t . _ _cache _ _ = { } , e . forEach ( ( function ( e ) { t . _ _cache _ _ [ e ] = [ ] , t . _ _rules _ _ . forEach ( ( function ( n ) { n . enabled && ( e && n . alt . indexOf ( e ) < 0 || t . _ _cache _ _ [ e ] . push ( n . fn ) ) } ) ) } ) ) } , i . prototype . at = function ( t , e , n ) { var i = this . _ _find _ _ ( t ) , o = n || { } ; if ( - 1 === i ) throw new Error ( "Parser rule not found: " + t ) ; this . _ _rules _ _ [ i ] . fn = e , this . _ _rules _ _ [ i ] . alt = o . alt || [ ] , this . _ _cache _ _ = null } , i . prototype . before = function ( t , e , n , i ) { var o = this . _ _find _ _ ( t ) , r = i || { } ; if ( - 1 === o ) throw new Error ( "Parser rule not found: " + t ) ; this . _ _rules _ _ . splice ( o , 0 , { name : e , enabled : ! 0 , fn : n , alt : r . alt || [ ] } ) , this . _ _cache _ _ = null } , i . prototype . after = function ( t , e , n , i ) { var o = this . _ _find _ _ ( t ) , r = i || { } ; if ( - 1 === o ) throw new Error ( "Parser rule not found: " + t ) ; this . _ _rules _ _ . splice ( o + 1 , 0 , { name : e , enabled : ! 0 , fn : n , alt : r . alt || [ ] } ) , this . _ _cache _ _ = null } , i . prototype . push = function ( t , e , n ) { var i = n || { } ; this . _ _rules _ _ . push ( { name : t , enabled : ! 0 , fn : e , alt : i . alt || [ ] } ) , this . _ _cache _ _ = null } , i . prototype . enable = function ( t , e ) { Array . isArray ( t ) || ( t = [ t ] ) ; var n = [ ] ; return t . forEach ( ( function ( t ) { var i = this . _ _find _ _ ( t ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s K n { c o n s t r u c t o r ( t , e ) { t h i s . _ c o n f i g = { } , e & & t h i s . d e f i n e ( e ) , t & & t h i s . _ s e t O b j e c t T o T a r g e t ( t h i s . _ c o n f i g , t ) } s e t ( t , e ) { t h i s . _ s e t T o T a r g e t ( t h i s . _ c o n f i g , t , e ) } d e f i n e ( t , e ) { t h i s . _ s e t T o T a r g e t ( t h i s . _ c o n f i g , t , e , ! 0 ) } g e t ( t ) { r e t u r n t h i s . _ g e t F r o m S o u r c e ( t h i s . _ c o n f i g , t ) } _ s e t T o T a r g e t ( t , e , n , i = ! 1 ) { i f ( P ( e ) ) r e t u r n v o i d t h i s . _ s e t O b j e c t T o T a r g e t ( t , e , i ) ; c o n s t o = e . s p l i t ( " . " ) ; e = o . p o p ( ) ; f o r ( c o n s t e o f o ) P ( t [ e ] ) | | ( t [ e ] = { } ) , t = t [ e ] ; i f ( P ( n ) ) r e t u r n P ( t [ e ] ) | | ( t [ e ] = { } ) , t = t [ e ] , v o i d t h i s . _ s e t O b j e c t T o T a r g e t ( t , n , i ) ; i & & v o i d 0 ! = = t [ e ] | | ( t [ e ] = n ) } _ g e t F r o m S o u r c e ( t , e ) { c o n s t n = e . s p l i t ( " . " ) ; e = n . p o p ( ) ; f o r ( c o n s t e o f n ) { i f ( ! P ( t [ e ] ) ) { t = n u l l ; b r e a k } t = t [ e ] } r e t u r n t ? f u n c t i o n ( t ) { r e t u r n W n ( t , J n ) } ( t [ e ] ) : v o i d 0 } _ s e t O b j e c t T o T a r g e t ( t , e , n ) { O b j e c t . k e y s ( e ) . f o r E a c h ( i = > { t h i s . _ s e t T o T a r g e t ( t , i , e [ i ] , n ) } ) } } f u n c t i o n J n ( t ) { r e t u r n G n ( t ) ? t : v o i d 0 } v a r Z n = n ( 0 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / v a r Q n = f u n c t i o n ( ) { r e t u r n f u n c t i o n t ( ) { t . c a l l e d = ! 0 } } ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s Y n { c o n s t r u c t o r ( t , e ) { t h i s . s o u r c e = t , t h i s . n a m e = e , t h i s . p a t h = [ ] , t h i s . s t o p = Q n ( ) , t h i s . o f f = Q n ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n X n ( ) { l e t t = " e " ; f o r ( l e t e = 0 ; e < 8 ; e + + ) t + = M a t h . f l o o r ( 6 5 5 3 6 * ( 1 + M a t h . r a n d o m ( ) ) ) . t o S t r i n g ( 1 6 ) . s u b s t r i n g ( 1 ) ; r e t u r n t }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / v a r t i = { g e t ( t ) { r e t u r n " n u m b e r " ! = t y p e o f t ? t h i s [ t ] | | t h i s . n o r m a l : t } , h i g h e s t : 1 e 5 , h i g h : 1 e 3 , n o r m a l : 0 , l o w : - 1 e 3 , l o w e s t : - 1 e 5 } ; n ( 7 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const ei = Symbol ( "listeningTo" ) , ni = Symbol ( "emitterId" ) ; var ii = { on ( t , e , n = { } ) { this . listenTo ( this , t , e , n ) } , once ( t , e , n ) { let i = ! 1 ; this . listenTo ( this , t , ( function ( t , ... n ) { i || ( i = ! 0 , t . off ( ) , e . call ( this , t , ... n ) ) } ) , n ) } , off ( t , e ) { this . stopListening ( this , t , e ) } , listenTo ( t , e , n , i = { } ) { let o , r ; this [ ei ] || ( this [ ei ] = { } ) ; const s = this [ ei ] ; ri ( t ) || oi ( t ) ; const a = ri ( t ) ; ( o = s [ a ] ) || ( o = s [ a ] = { emitter : t , callbacks : { } } ) , ( r = o . callbacks [ e ] ) || ( r = o . callbacks [ e ] = [ ] ) , r . push ( n ) , function ( t , e ) { const n = si ( t ) ; if ( n [ e ] ) return ; let i = e , o = null ; const r = [ ] ; for ( ; "" !== i && ! n [ i ] ; ) n [ i ] = { callbacks : [ ] , childEvents : [ ] } , r . push ( n [ i ] ) , o && n [ i ] . childEvents . push ( o ) , o = i , i = i . substr ( 0 , i . lastIndexOf ( ":" ) ) ; if ( "" !== i ) { for ( const t of r ) t . callbacks = n [ i ] . callbacks . slice ( ) ; n [ i ] . childEvents . push ( o ) } } ( t , e ) ; const c = ai ( t , e ) , l = ti . get ( i . priority ) , d = { callback : n , priority : l } ; for ( const t of c ) { let e = ! 1 ; for ( let n = 0 ; n < t . length ; n ++ ) if ( t [ n ] . priority < l ) { t . splice ( n , 0 , d ) , e = ! 0 ; break } e || t . push ( d ) } } , stopListening ( t , e , n ) { const i = this [ ei ] ; let o = t && ri ( t ) ; const r = i && o && i [ o ] , s = r && e && r . callbacks [ e ] ; if ( ! ( ! i || t && ! r || e && ! s ) ) if ( n ) li ( t , e , n ) ; else if ( s ) { for ( ; n = s . pop ( ) ; ) li ( t , e , n ) ; delete r . callbacks [ e ] } else if ( r ) { for ( e in r . callbacks ) this . stopListening ( t , e ) ; delete i [ o ] } else { for ( o in i ) this . stopListening ( i [ o ] . emitter ) ; delete this [ ei ] } } , fire ( t , ... e ) { try { const n = t instanceof Yn ? t : new Yn ( this , t ) , i = n . name ; let o = function t ( e , n ) { let i ; if ( ! e . _events || ! ( i = e . _events [ n ] ) || ! i . callbacks . length ) return n . indexOf ( ":" ) > - 1 ? t ( e , n . substr ( 0 , n . lastIndexOf ( ":" ) ) ) : null ; return i . callbacks } ( this , i ) ; if ( n . path . push ( this ) , o ) { const t = [ n , ... e ] ; o = Array . from ( o ) ; for ( let e = 0 ; e < o . length && ( o [ e ] . callback . apply ( this , t ) , n . off . called && ( delete n . off . called , li ( this , i , o [ e ] . callback ) ) , ! n . stop . called ) ; e ++ ) ; } if ( this . _delegations ) { const t = this . _delegations . get ( i ) , o = this . _delegations . get ( "*" ) ; t && ci ( t , n , e ) , o && ci ( o , n , e ) } return n . return } catch ( t ) { Zn . b . rethrowUnexpectedError ( t , this ) } } , delegate ( ... t ) { return { to : ( e , n ) => { this . _delegations || ( this . _delegations = new Map ) , t . forEach ( t => { const i = this . _delegations . get ( t ) ; i ? i . set ( e , n ) : this . _delegations . set ( t , new Map ( [ [ e , n ] ] ) ) } ) } } } , stopDelegating ( t , e ) { if ( this . _delegations ) if ( t ) if ( e ) { const n = this . _delegations . get ( t ) ; n && n . delete ( e ) } else this . _delegations . delete ( t ) ; else this . _delegations . clear ( ) } } ; function oi ( t , e ) { t [ ni ] || ( t [ ni ] = e || Xn ( ) ) } function ri ( t ) { return t [ ni ] } function si ( t ) { return t . _events || Object . defineProperty ( t , "_events" , { value : { } } ) , t . _events } function ai ( t , e ) { const n = si ( t ) [ e ] ; if ( ! n ) return [ ] ; let i = [ n . callbacks ] ; for ( let e = 0 ; e < n . childEvents . length ; e ++ ) { const o = ai ( t , n . childEvents [ e ] ) ; i = i . concat ( o ) } return i } function ci ( t , e , n ) { for ( let [ i , o ] of t ) { o ? "function" == typeof o && ( o = o ( e . name ) ) : o = e . name ; const t = new Yn ( e . source , o ) ; t . path = [ ... e . path ] , i . fire ( t , ... n ) } } function li ( t , e , n ) { const i = ai ( t , e ) ; for ( const t of i ) for ( let e = 0 ; e < t . length ; e ++ ) t [ e ] . callback == n && ( t . splice ( e , 1 ) , e -- ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n d i ( t , . . . e ) { e . f o r E a c h ( e = > { O b j e c t . g e t O w n P r o p e r t y N a m e s ( e ) . c o n c a t ( O b j e c t . g e t O w n P r o p e r t y S y m b o l s ( e ) ) . f o r E a c h ( n = > { i f ( n i n t . p r o t o t y p e ) r e t u r n ; c o n s t i = O b j e c t . g e t O w n P r o p e r t y D e s c r i p t o r ( e , n ) ; i . e n u m e r a b l e = ! 1 , O b j e c t . d e f i n e P r o p e r t y ( t . p r o t o t y p e , n , i ) } ) } ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n u i ( t , e ) { c o n s t n = M a t h . m i n ( t . l e n g t h , e . l e n g t h ) ; f o r ( l e t i = 0 ; i < n ; i + + ) i f ( t [ i ] ! = e [ i ] ) r e t u r n i ; r e t u r n t . l e n g t h = = e . l e n g t h ? " s a m e " : t . l e n g t h < e . l e n g t h ? " p r e f i x " : " e x t e n s i o n " } v a r h i = 4 ; v a r f i = f u n c t i o n ( t ) { r e t u r n H n ( t , h i ) } ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s p i { c o n s t r u c t o r ( ) { t h i s . p a r e n t = n u l l } g e t i n d e x ( ) { l e t t ; i f ( ! t h i s . p a r e n t ) r e t u r n n u l l ; i f ( - 1 = = ( t = t h i s . p a r e n t . g e t C h i l d I n d e x ( t h i s ) ) ) t h r o w n e w Z n . b ( " v i e w - n o d e - n o t - f o u n d - i n - p a r e n t : T h e n o d e ' s p a r e n t d o e s n o t c o n t a i n t h i s n o d e . " , t h i s ) ; r e t u r n t } g e t n e x t S i b l i n g ( ) { c o n s t t = t h i s . i n d e x ; r e t u r n n u l l ! = = t & & t h i s . p a r e n t . g e t C h i l d ( t + 1 ) | | n u l l } g e t p r e v i o u s S i b l i n g ( ) { c o n s t t = t h i s . i n d e x ; r e t u r n n u l l ! = = t & & t h i s . p a r e n t . g e t C h i l d ( t - 1 ) | | n u l l } g e t r o o t ( ) { l e t t = t h i s ; f o r ( ; t . p a r e n t ; ) t = t . p a r e n t ; r e t u r n t } g e t d o c u m e n t ( ) { r e t u r n t h i s . p a r e n t i n s t a n c e o f p i ? t h i s . p a r e n t . d o c u m e n t : n u l l } g e t P a t h ( ) { c o n s t t = [ ] ; l e t e = t h i s ; f o r ( ; e . p a r e n t ; ) t . u n s h i f t ( e . i n d e x ) , e = e . p a r e n t ; r e t u r n t } g e t A n c e s t o r s ( t = { i n c l u d e S e l f : ! 1 , p a r e n t F i r s t : ! 1 } ) { c o n s t e = [ ] ; l e t n = t . i n c l u d e S e l f ? t h i s : t h i s . p a r e n t ; f o r ( ; n ; ) e [ t . p a r e n t F i r s t ? " p u s h " : " u n s h i f t " ] ( n ) , n = n . p a r e n t ; r e t u r n e } g e t C o m m o n A n c e s t o r ( t , e = { } ) { c o n s t n = t h i s . g e t A n c e s t o r s ( e ) , i = t . g e t A n c e s t o r s ( e ) ; l e t o = 0 ; f o r ( ; n [ o ] = = i [ o ] & & n [ o ] ; ) o + + ; r e t u r n 0 = = = o ? n u l l : n [ o - 1 ] } i s B e f o r e ( t ) { i f ( t h i s = = t ) r e t u r n ! 1 ; i f ( t h i s . r o o t ! = = t . r o o t ) r e t u r n ! 1 ; c o n s t e = t h i s . g e t P a t h ( ) , n = t . g e t P a t h ( ) , i = u i ( e , n ) ; s w i t c h ( i ) { c a s e " p r e f i x " : r e t u r n ! 0 ; c a s e " e x t e n s i o n " : r e t u r n ! 1 ; d e f a u l t : r e t u r n e [ i ] < n [ i ] } } i s A f t e r ( t ) { r e t u r n t h i s ! = t & & ( t h i s . r o o t = = = t . r o o t & & ! t h i s . i s B e f o r e ( t ) ) } _ r e m o v e ( ) { t h i s . p a r e n t . _ r e m o v e C h i l d r e n ( t h i s . i n d e x ) } _ f i r e C h a n g e ( t , e ) { t h i s . f i r e ( " c h a n g e : " + t , e ) , t h i s . p a r e n t & & t h i s . p a r e n t . _ f i r e C h a n g e ( t , e ) } t o J S O N ( ) { c o n s t t = f i ( t h i s ) ; r e t u r n d e l e t e t . p a r e n t , t } i s ( t ) { r e t u r n " n o d e " = = t | | " v i e w : n o d e " = = t } } d i ( p i , i i ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class mi extends pi { constructor ( t ) { super ( ) , this . _textData = t } is ( t ) { return "text" == t || "view:text" == t || super . is ( t ) } get data ( ) { return this . _textData } get _data ( ) { return this . data } set _data ( t ) { this . _fireChange ( "text" , this ) , this . _textData = t } isSimilar ( t ) { return t instanceof mi && ( this === t || this . data === t . data ) } _clone ( ) { return new mi ( this . data ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s g i { c o n s t r u c t o r ( t , e , n ) { i f ( t h i s . t e x t N o d e = t , e < 0 | | e > t . d a t a . l e n g t h ) t h r o w n e w Z n . b ( " v i e w - t e x t p r o x y - w r o n g - o f f s e t i n t e x t : G i v e n o f f s e t I n T e x t v a l u e i s i n c o r r e c t . " , t h i s ) ; i f ( n < 0 | | e + n > t . d a t a . l e n g t h ) t h r o w n e w Z n . b ( " v i e w - t e x t p r o x y - w r o n g - l e n g t h : G i v e n l e n g t h v a l u e i s i n c o r r e c t . " , t h i s ) ; t h i s . d a t a = t . d a t a . s u b s t r i n g ( e , e + n ) , t h i s . o f f s e t I n T e x t = e } g e t o f f s e t S i z e ( ) { r e t u r n t h i s . d a t a . l e n g t h } g e t i s P a r t i a l ( ) { r e t u r n t h i s . d a t a . l e n g t h ! = = t h i s . t e x t N o d e . d a t a . l e n g t h } g e t p a r e n t ( ) { r e t u r n t h i s . t e x t N o d e . p a r e n t } g e t r o o t ( ) { r e t u r n t h i s . t e x t N o d e . r o o t } g e t d o c u m e n t ( ) { r e t u r n t h i s . t e x t N o d e . d o c u m e n t } i s ( t ) { r e t u r n " t e x t P r o x y " = = t | | " v i e w : t e x t P r o x y " = = t } g e t A n c e s t o r s ( t = { i n c l u d e S e l f : ! 1 , p a r e n t F i r s t : ! 1 } ) { c o n s t e = [ ] ; l e t n = t . i n c l u d e S e l f ? t h i s . t e x t N o d e : t h i s . p a r e n t ; f o r ( ; n u l l ! = = n ; ) e [ t . p a r e n t F i r s t ? " p u s h " : " u n s h i f t " ] ( n ) , n = n . p a r e n t ; r e t u r n e } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n b i ( t ) { c o n s t e = n e w M a p ; f o r ( c o n s t n i n t ) e . s e t ( n , t [ n ] ) ; r e t u r n e }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n w i ( t ) { r e t u r n ! ( ! t | | ! t [ S y m b o l . i t e r a t o r ] ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s k i { c o n s t r u c t o r ( . . . t ) { t h i s . _ p a t t e r n s = [ ] , t h i s . a d d ( . . . t ) } a d d ( . . . t ) { f o r ( l e t e o f t ) ( " s t r i n g " = = t y p e o f e | | e i n s t a n c e o f R e g E x p ) & & ( e = { n a m e : e } ) , e . c l a s s e s & & ( " s t r i n g " = = t y p e o f e . c l a s s e s | | e . c l a s s e s i n s t a n c e o f R e g E x p ) & & ( e . c l a s s e s = [ e . c l a s s e s ] ) , t h i s . _ p a t t e r n s . p u s h ( e ) } m a t c h ( . . . t ) { f o r ( c o n s t e o f t ) f o r ( c o n s t t o f t h i s . _ p a t t e r n s ) { c o n s t n = _ i ( e , t ) ; i f ( n ) r e t u r n { e l e m e n t : e , p a t t e r n : t , m a t c h : n } } r e t u r n n u l l } m a t c h A l l ( . . . t ) { c o n s t e = [ ] ; f o r ( c o n s t n o f t ) f o r ( c o n s t t o f t h i s . _ p a t t e r n s ) { c o n s t i = _ i ( n , t ) ; i & & e . p u s h ( { e l e m e n t : n , p a t t e r n : t , m a t c h : i } ) } r e t u r n e . l e n g t h > 0 ? e : n u l l } g e t E l e m e n t N a m e ( ) { i f ( 1 ! = = t h i s . _ p a t t e r n s . l e n g t h ) r e t u r n n u l l ; c o n s t t = t h i s . _ p a t t e r n s [ 0 ] , e = t . n a m e ; r e t u r n " f u n c t i o n " = = t y p e o f t | | ! e | | e i n s t a n c e o f R e g E x p ? n u l l : e } } f u n c t i o n _ i ( t , e ) { i f ( " f u n c t i o n " = = t y p e o f e ) r e t u r n e ( t ) ; c o n s t n = { } ; r e t u r n e . n a m e & & ( n . n a m e = f u n c t i o n ( t , e ) { i f ( t i n s t a n c e o f R e g E x p ) r e t u r n t . t e s t ( e ) ; r e t u r n t = = = e } ( e . n a m e , t . n a m e ) , ! n . n a m e ) ? n u l l : e . a t t r i b u t e s & & ( n . a t t r i b u t e s = f u n c t i o n ( t , e ) { c o n s t n = [ ] ; f o r ( c o n s t i i n t ) { c o n s t o = t [ i ] ; i f ( ! e . h a s A t t r i b u t e ( i ) ) r e t u r n n u l l ; { c o n s t t = e . g e t A t t r i b u t e ( i ) ; i f ( ! 0 = = = o ) n . p u s h ( i ) ; e l s e i f ( o i n s t a n c e o f R e g E x p ) { i f ( ! o . t e s t ( t ) ) r e t u r n n u l l ; n . p u s h ( i ) } e l s e { i f ( t ! = = o ) r e t u r n n u l l ; n . p u s h ( i ) } } } r e t u r n n } ( e . a t t r i b u t e s , t ) , ! n . a t t r i b u t e s ) ? n u l l : ! ( e . c l a s s e s & & ( n . c l a s s e s = f u n c t i o n ( t , e ) { c o n s t n = [ ] ; f o r ( c o n s t i o f t ) i f ( i i n s t a n c e o f R e g E x p ) { c o n s t t = e . g e t C l a s s N a m e s ( ) ; f o r ( c o n s t e o f t ) i . t e s t ( e ) & & n . p u s h ( e ) ; i f ( 0 = = = n . l e n g t h ) r e t u r n n u l l } e l s e { i f ( ! e . h a s C l a s s ( i ) ) r e t u r n n u l l ; n . p u s h ( i ) } r e t u r n n } ( e . c l a s s e s , t ) , ! n . c l a s s e s ) ) & & ( ! ( e . s t y l e s & & ( n . s t y l e s = f u n c t i o n ( t , e ) { c o n s t n = [ ] ; f o r ( c o n s t i i n t ) { c o n s t o = t [ i ] ; i f ( ! e . h a s S t y l e ( i ) ) r e t u r n n u l l ; { c o n s t t = e . g e t S t y l e ( i ) ; i f ( o i n s t a n c e o f R e g E x p ) { i f ( ! o . t e s t ( t ) ) r e t u r n n u l l ; n . p u s h ( i ) } e l s e { i f ( t ! = = o ) r e t u r n n u l l ; n . p u s h ( i ) } } } r e t u r n n }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /(e.styles,t),!n.styles))&&n)}class vi extends pi{constructor(t,e,n){if(super(),this.name=t,this._attrs=function(t){t=P(t)?bi(t):new Map(t);for(const[e,n]of t)null===n?t.delete(e):"string"!=typeof n&&t.set(e,String(n));return t}(e),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const t=this._attrs.get("class");xi(this._classes,t),this._attrs.delete("class")}this._styles=new Map,this._attrs.has("style")&&(yi(this._styles,this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(t,e=null){const n=t.replace(/ ^ view : / , " " ) ; r e t u r n e ? " e l e m e n t " = = n & & e = = t h i s . n a m e : " e l e m e n t " = = n | | n = = t h i s . n a m e | | s u p e r . i s ( t ) } g e t C h i l d ( t ) { r e t u r n t h i s . _ c h i l d r e n [ t ] } g e t C h i l d I n d e x ( t ) { r e t u r n t h i s . _ c h i l d r e n . i n d e x O f ( t ) } g e t C h i l d r e n ( ) { r e t u r n t h i s . _ c h i l d r e n [ S y m b o l . i t e r a t o r ] ( ) } * g e t A t t r i b u t e K e y s ( ) { t h i s . _ c l a s s e s . s i z e > 0 & & ( y i e l d " c l a s s " ) , t h i s . _ s t y l e s . s i z e > 0 & & ( y i e l d " s t y l e " ) , y i e l d * t h i s . _ a t t r s . k e y s ( ) } * g e t A t t r i b u t e s ( ) { y i e l d * t h i s . _ a t t r s . e n t r i e s ( ) , t h i s . _ c l a s s e s . s i z e > 0 & & ( y i e l d [ " c l a s s " , t h i s . g e t A t t r i b u t e ( " c l a s s " ) ] ) , t h i s . _ s t y l e s . s i z e > 0 & & ( y i e l d [ " s t y l e " , t h i s . g e t A t t r i b u t e ( " s t y l e " ) ] ) } g e t A t t r i b u t e ( t ) { i f ( " c l a s s " = = t ) r e t u r n t h i s . _ c l a s s e s . s i z e > 0 ? [ . . . t h i s . _ c l a s s e s ] . j o i n ( " " ) : v o i d 0 ; i f ( " s t y l e " ! = t ) r e t u r n t h i s . _ a t t r s . g e t ( t ) ; i f ( t h i s . _ s t y l e s . s i z e > 0 ) { l e t t = " " ; f o r ( c o n s t [ e , n ] o f t h i s . _ s t y l e s ) t + = ` $ { e } : $ { n } ; ` ; r e t u r n t } } h a s A t t r i b u t e ( t ) { r e t u r n " c l a s s " = = t ? t h i s . _ c l a s s e s . s i z e > 0 : " s t y l e " = = t ? t h i s . _ s t y l e s . s i z e > 0 : t h i s . _ a t t r s . h a s ( t ) } i s S i m i l a r ( t ) { i f ( ! ( t i n s t a n c e o f v i ) ) r e t u r n ! 1 ; i f ( t h i s = = = t ) r e t u r n ! 0 ; i f ( t h i s . n a m e ! = t . n a m e ) r e t u r n ! 1 ; i f ( t h i s . _ a t t r s . s i z e ! = = t . _ a t t r s . s i z e | | t h i s . _ c l a s s e s . s i z e ! = = t . _ c l a s s e s . s i z e | | t h i s . _ s t y l e s . s i z e ! = = t . _ s t y l e s . s i z e ) r e t u r n ! 1 ; f o r ( c o n s t [ e , n ] o f t h i s . _ a t t r s ) i f ( ! t . _ a t t r s . h a s ( e ) | | t . _ a t t r s . g e t ( e ) ! = = n ) r e t u r n ! 1 ; f o r ( c o n s t e o f t h i s . _ c l a s s e s ) i f ( ! t . _ c l a s s e s . h a s ( e ) ) r e t u r n ! 1 ; f o r ( c o n s t [ e , n ] o f t h i s . _ s t y l e s ) i f ( ! t . _ s t y l e s . h a s ( e ) | | t . _ s t y l e s . g e t ( e ) ! = = n ) r e t u r n ! 1 ; r e t u r n ! 0 } h a s C l a s s ( . . . t ) { f o r ( c o n s t e o f t ) i f ( ! t h i s . _ c l a s s e s . h a s ( e ) ) r e t u r n ! 1 ; r e t u r n ! 0 } g e t C l a s s N a m e s ( ) { r e t u r n t h i s . _ c l a s s e s . k e y s ( ) } g e t S t y l e ( t ) { r e t u r n t h i s . _ s t y l e s . g e t ( t ) } g e t S t y l e N a m e s ( ) { r e t u r n t h i s . _ s t y l e s . k e y s ( ) } h a s S t y l e ( . . . t ) { f o r ( c o n s t e o f t ) i f ( ! t h i s . _ s t y l e s . h a s ( e ) ) r e t u r n ! 1 ; r e t u r n ! 0 } f i n d A n c e s t o r ( . . . t ) { c o n s t e = n e w k i ( . . . t ) ; l e t n = t h i s . p a r e n t ; f o r ( ; n ; ) { i f ( e . m a t c h ( n ) ) r e t u r n n ; n = n . p a r e n t } r e t u r n n u l l } g e t C u s t o m P r o p e r t y ( t ) { r e t u r n t h i s . _ c u s t o m P r o p e r t i e s . g e t ( t ) } * g e t C u s t o m P r o p e r t i e s ( ) { y i e l d * t h i s . _ c u s t o m P r o p e r t i e s . e n t r i e s ( ) } g e t I d e n t i t y ( ) { c o n s t t = A r r a y . f r o m ( t h i s . _ c l a s s e s ) . s o r t ( ) . j o i n ( " , " ) , e = A r r a y . f r o m ( t h i s . _ s t y l e s ) . m a p ( t = > ` $ { t [ 0 ] } : $ { t [ 1 ] } ` ) . s o r t ( ) . j o i n ( " ; " ) , n = A r r a y . f r o m ( t h i s . _ a t t r s ) . m a p ( t = > ` $ { t [ 0 ] } = " $ { t [ 1 ] } " ` ) . s o r t ( ) . j o i n ( " " ) ; r e t u r n t h i s . n a m e + ( " " = = t ? " " : ` c l a s s = " $ { t } " ` ) + ( " " = = e ? " " : ` s t y l e = " $ { e } " ` ) + ( " " = = n ? " " : ` $ { n } ` ) } _ c l o n e ( t = ! 1 ) { c o n s t e = [ ] ; i f ( t ) f o r ( c o n s t n o f t h i s . g e t C h i l d r e n ( ) ) e . p u s h ( n . _ c l o n e ( t ) ) ; c o n s t n = n e w t h i s . c o n s t r u c t o r ( t h i s . n a m e , t h i s . _ a t t r s , e ) ; r e t u r n n . _ c l a s s e s = n e w S e t ( t h i s . _ c l a s s e s ) , n . _ s t y l e s = n e w M a p ( t h i s . _ s t y l e s ) , n . _ c u s t o m P r o p e r t i e s = n e w M a p ( t h i s . _ c u s t o m P r o p e r t i e s ) , n . g e t F i l l e r O f f s e t = t h i s . g e t F i l l e r O f f s e t , n } _ a p p e n d C h i l d ( t ) { r e t u r n t h i s . _ i n s e r t C h i l d ( t h i s . c h i l d C o u n t , t ) } _ i n s e r t C h i l d ( t , e ) { t h i s . _ f i r e C h a n g e ( " c h i l d r e n " , t h i s ) ; l e t n = 0 ; c o n s t i = f u n c t i o n ( t ) { i f ( " s t r i n g " = = t y p e o f t ) r e t u r n [ n e w m i ( t ) ] ; w i ( t ) | | ( t = [ t ] ) ; r e t u r n A r r a y . f r o m ( t ) . m a p ( t = > " s t r i n g " = = t y p e o f t ? n e w m i ( t ) : t i n s t a n c e o f g i ? n e w m i ( t . d a t a ) : t ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /(e);for(const e of i)null!==e.parent&&e._remove(),e.parent=this,this._children.splice(t,0,e),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;n<t+e;n++)this._children[n].parent=null;return this._children.splice(t,e)}_setAttribute(t,e){e=String(e),this._fireChange("attributes",this),"class"==t?xi(this._classes,e):"style"==t?yi(this._styles,e):this._attrs.set(t,e)}_removeAttribute(t){return this._fireChange("attributes",this),"class"==t?this._classes.size>0&&(this._classes.clear(),!0):"style"==t?this._styles.size>0&&(this._styles.clear(),!0):this._attrs.delete(t)}_addClass(t){this._fireChange("attributes",this),(t=Array.isArray(t)?t:[t]).forEach(t=>this._classes.add(t))}_removeClass(t){this._fireChange("attributes",this),(t=Array.isArray(t)?t:[t]).forEach(t=>this._classes.delete(t))}_setStyle(t,e){if(this._fireChange("attributes",this),P(t)){const e=Object.keys(t);for(const n of e)this._styles.set(n,t[n])}else this._styles.set(t,e)}_removeStyle(t){this._fireChange("attributes",this),(t=Array.isArray(t)?t:[t]).forEach(t=>this._styles.delete(t))}_setCustomProperty(t,e){this._customProperties.set(t,e)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function yi(t,e){let n=null,i=0,o=0,r=null;if(t.clear(),""!==e){";"!=e.charAt(e.length-1)&&(e+=";");for(let s=0;s<e.length;s++){const a=e.charAt(s);if(null===n)switch(a){case":":r||(r=e.substr(i,s-i),o=s+1);break;case'"':case"'":n=a;break;case";":{const n=e.substr(o,s-o);r&&t.set(r.trim(),n.trim()),r=null,i=s+1;break}}else a===n&&(n=null)}}}function xi(t,e){const n=e.split(/ \ s + /);t.clear(),n.forEach(e=>t.add(e))}class Ci extends vi{constructor(t,e,n){super(t,e,n),this.getFillerOffset=Ai}is(t,e=null){const n=t&&t.replace(/ ^ view : / , " " ) ; r e t u r n e ? " c o n t a i n e r E l e m e n t " = = n & & e = = t h i s . n a m e | | s u p e r . i s ( t , e ) : " c o n t a i n e r E l e m e n t " = = n | | s u p e r . i s ( t ) } } f u n c t i o n A i ( ) { c o n s t t = [ . . . t h i s . g e t C h i l d r e n ( ) ] , e = t [ t h i s . c h i l d C o u n t - 1 ] ; i f ( e & & e . i s ( " e l e m e n t " , " b r " ) ) r e t u r n t h i s . c h i l d C o u n t ; f o r ( c o n s t e o f t ) i f ( ! e . i s ( " u i E l e m e n t " ) ) r e t u r n n u l l ; r e t u r n t h i s . c h i l d C o u n t } v a r P i = f u n c t i o n ( t ) { r e t u r n t } ; v a r T i = f u n c t i o n ( t , e , n ) { s w i t c h ( n . l e n g t h ) { c a s e 0 : r e t u r n t . c a l l ( e ) ; c a s e 1 : r e t u r n t . c a l l ( e , n [ 0 ] ) ; c a s e 2 : r e t u r n t . c a l l ( e , n [ 0 ] , n [ 1 ] ) ; c a s e 3 : r e t u r n t . c a l l ( e , n [ 0 ] , n [ 1 ] , n [ 2 ] ) } r e t u r n t . a p p l y ( e , n ) } , E i = M a t h . m a x ; v a r S i = f u n c t i o n ( t , e , n ) { r e t u r n e = E i ( v o i d 0 = = = e ? t . l e n g t h - 1 : e , 0 ) , f u n c t i o n ( ) { f o r ( v a r i = a r g u m e n t s , o = - 1 , r = E i ( i . l e n g t h - e , 0 ) , s = A r r a y ( r ) ; + + o < r ; ) s [ o ] = i [ e + o ] ; o = - 1 ; f o r ( v a r a = A r r a y ( e + 1 ) ; + + o < e ; ) a [ o ] = i [ o ] ; r e t u r n a [ e ] = n ( s ) , T i ( t , t h i s , a ) } } ; v a r R i = f u n c t i o n ( t ) { r e t u r n f u n c t i o n ( ) { r e t u r n t } } , I i = N t ? f u n c t i o n ( t , e ) { r e t u r n N t ( t , " t o S t r i n g " , { c o n f i g u r a b l e : ! 0 , e n u m e r a b l e : ! 1 , v a l u e : R i ( e ) , w r i t a b l e : ! 0 } ) } : P i , O i = 8 0 0 , D i = 1 6 , M i = D a t e . n o w ; v a r N i = f u n c t i o n ( t ) { v a r e = 0 , n = 0 ; r e t u r n f u n c t i o n ( ) { v a r i = M i ( ) , o = D i - ( i - n ) ; i f ( n = i , o > 0 ) { i f ( + + e > = O i ) r e t u r n a r g u m e n t s [ 0 ] } e l s e e = 0 ; r e t u r n t . a p p l y ( v o i d 0 , a r g u m e n t s ) } } ( I i ) ; v a r V i = f u n c t i o n ( t , e ) { r e t u r n N i ( S i ( t , e , P i ) , t + " " ) } ; v a r F i = f u n c t i o n ( t , e , n ) { i f ( ! q ( n ) ) r e t u r n ! 1 ; v a r i = t y p e o f e ; r e t u r n ! ! ( " n u m b e r " = = i ? f e ( n ) & & Q t ( e , n . l e n g t h ) : " s t r i n g " = = i & & e i n n ) & & E ( n [ e ] , t ) } ; v a r B i = f u n c t i o n ( t ) { r e t u r n V i ( ( f u n c t i o n ( e , n ) { v a r i = - 1 , o = n . l e n g t h , r = o > 1 ? n [ o - 1 ] : v o i d 0 , s = o > 2 ? n [ 2 ] : v o i d 0 ; f o r ( r = t . l e n g t h > 3 & & " f u n c t i o n " = = t y p e o f r ? ( o - - , r ) : v o i d 0 , s & & F i ( n [ 0 ] , n [ 1 ] , s ) & & ( r = o < 3 ? v o i d 0 : r , o = 1 ) , e = O b j e c t ( e ) ; + + i < o ; ) { v a r a = n [ i ] ; a & & t ( e , a , i , r ) } r e t u r n e } ) ) } ( ( f u n c t i o n ( t , e ) { L t ( e , k e ( e ) , t ) } ) ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const Li = Symbol ( "observableProperties" ) , zi = Symbol ( "boundObservables" ) , qi = Symbol ( "boundProperties" ) , ji = { set ( t , e ) { if ( q ( t ) ) return void Object . keys ( t ) . forEach ( e => { this . set ( e , t [ e ] ) } , this ) ; Ui ( this ) ; const n = this [ Li ] ; if ( t in this && ! n . has ( t ) ) throw new Zn . b ( "observable-set-cannot-override: Cannot override an existing property." , this ) ; Object . defineProperty ( this , t , { enumerable : ! 0 , configurable : ! 0 , get : ( ) => n . get ( t ) , set ( e ) { const i = n . get ( t ) ; let o = this . fire ( "set:" + t , t , e , i ) ; void 0 === o && ( o = e ) , i === o && n . has ( t ) || ( n . set ( t , o ) , this . fire ( "change:" + t , t , o , i ) ) } } ) , this [ t ] = e } , bind ( ... t ) { if ( ! t . length || ! Gi ( t ) ) throw new Zn . b ( "observable-bind-wrong-properties: All properties must be strings." , this ) ; if ( new Set ( t ) . size !== t . length ) throw new Zn . b ( "observable-bind-duplicate-properties: Properties must be unique." , this ) ; Ui ( this ) ; const e = this [ qi ] ; t . forEach ( t => { if ( e . has ( t ) ) throw new Zn . b ( "observable-bind-rebind: Cannot bind the same property more that once." , this ) } ) ; const n = new Map ; return t . forEach ( t => { const i = { property : t , to : [ ] } ; e . set ( t , i ) , n . set ( t , i ) } ) , { to : $i , toMany : Wi , _observable : this , _bindProperties : t , _to : [ ] , _bindings : n } } , unbind ( ... t ) { if ( ! ( Li in this ) ) return ; const e = this [ qi ] , n = this [ zi ] ; if ( t . length ) { if ( ! Gi ( t ) ) throw new Zn . b ( "observable-unbind-wrong-properties: Properties must be strings." , this ) ; t . forEach ( t => { const i = e . get ( t ) ; if ( ! i ) return ; let o , r , s , a ; i . to . forEach ( t => { o = t [ 0 ] , r = t [ 1 ] , s = n . get ( o ) , ( a = s [ r ] ) . delete ( i ) , a . size || delete s [ r ] , Object . keys ( s ) . length || ( n . delete ( o ) , this . stopListening ( o , "change" ) ) } ) , e . delete ( t ) } ) } else n . forEach ( ( t , e ) => { this . stopListening ( e , "change" ) } ) , n . clear ( ) , e . clear ( ) } , decorate ( t ) { const e = this [ t ] ; if ( ! e ) throw new Zn . b ( "observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method." , this , { object : this , methodName : t } ) ; this . on ( t , ( t , n ) => { t . return = e . apply ( this , n ) } ) , this [ t ] = function ( ... e ) { return this . fire ( t , e ) } } } ; Bi ( ji , ii ) ; var Hi = ji ; function Ui ( t ) { Li in t || ( Object . defineProperty ( t , Li , { value : new Map } ) , Object . defineProperty ( t , zi , { value : new Map } ) , Object . defineProperty ( t , qi , { value : new Map } ) ) } function $i ( ... t ) { const e = function ( ... t ) { if ( ! t . length ) throw new Zn . b ( "observable-bind-to-parse-error: Invalid argument syntax in `to()`." , null ) ; const e = { to : [ ] } ; let n ; "function" == typeof t [ t . length - 1 ] && ( e . callback = t . pop ( ) ) ; return t . forEach ( t => { if ( "string" == typeof t ) n . properties . push ( t ) ; else { if ( "object" != typeof t ) throw new Zn . b ( "observable-bind-to-parse-error: Invalid argument syntax in `to()`." , null ) ; n = { observable : t , properties : [ ] } , e . to . push ( n ) } } ) , e } ( ... t ) , n = Array . from ( this . _bindings . keys ( ) ) , i = n . length ; if ( ! e . callback && e . to . length > 1 ) throw new Zn . b ( "observable-bind-to-no-callback: Binding multiple observables only possible with callback." , this ) ; if ( i > 1 && e . callback ) throw new Zn . b ( "observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding." , this ) ; var o ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /e.to.forEach(t=>{if(t.properties.length&&t.properties.length!==i)throw new Zn.b("observable-bind-to-properties-length: The number of properties must match.",this);t.properties.length||(t.properties=this._bindProperties)}),this._to=e.to,e.callback&&(this._bindings.get(n[0]).callback=e.callback),o=this._observable,this._to.forEach(t=>{const e=o[zi];let n;e.get(t.observable)||o.listenTo(t.observable,"change",(i,r)=>{(n=e.get(t.observable)[r])&&n.forEach(t=>{Ki(o,t.property)})})}),function(t){let e;t._bindings.forEach((n,i)=>{t._to.forEach(o=>{e=o.properties[n.callback?0:t._bindProperties.indexOf(i)],n.to.push([o.observable,e]),function(t,e,n,i){const o=t[zi],r=o.get(n),s=r||{};s[i]||(s[i]=new Set);s[i].add(e),r||o.set(n,s)}(t._observable,n,o.observable,e)})})}(this),this._bindProperties.forEach(t=>{Ki(this._observable,t)})}function Wi(t,e,n){if(this._bindings.size>1)throw new Zn.b("observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().",this);this.to(...function(t,e){const n=t.map(t=>[t,e]);return Array.prototype.concat.apply([],n)}(t,e),n)}function Gi(t){return t.every(t=>"string"==typeof t)}function Ki(t,e){const n=t[qi].get(e);let i;i=n.callback?n.callback.apply(t,n.to.map(t=>t[0][t[1]])):(i=n.to[0])[0][i[1]],t.hasOwnProperty(e)?t[e]=i:t.set(e,i)}const Ji=Symbol("document");class Zi extends Ci{constructor(t,e,n){super(t,e,n),this.set("isReadOnly",!1),this.set("isFocused",!1)}is(t,e=null){const n=t&&t.replace(/ ^ view : / , " " ) ; r e t u r n e ? " e d i t a b l e E l e m e n t " = = n & & e = = t h i s . n a m e | | s u p e r . i s ( t , e ) : " e d i t a b l e E l e m e n t " = = n | | s u p e r . i s ( t ) } d e s t r o y ( ) { t h i s . s t o p L i s t e n i n g ( ) } g e t d o c u m e n t ( ) { r e t u r n t h i s . g e t C u s t o m P r o p e r t y ( J i ) } s e t _ d o c u m e n t ( t ) { i f ( t h i s . g e t C u s t o m P r o p e r t y ( J i ) ) t h r o w n e w Z n . b ( " v i e w - e d i t a b l e e l e m e n t - d o c u m e n t - a l r e a d y - s e t : V i e w d o c u m e n t i s a l r e a d y s e t . " , t h i s ) ; t h i s . _ s e t C u s t o m P r o p e r t y ( J i , t ) , t h i s . b i n d ( " i s R e a d O n l y " ) . t o ( t ) , t h i s . b i n d ( " i s F o c u s e d " ) . t o ( t , " i s F o c u s e d " , e = > e & & t . s e l e c t i o n . e d i t a b l e E l e m e n t = = t h i s ) , t h i s . l i s t e n T o ( t . s e l e c t i o n , " c h a n g e " , ( ) = > { t h i s . i s F o c u s e d = t . i s F o c u s e d & & t . s e l e c t i o n . e d i t a b l e E l e m e n t = = t h i s } ) } } d i ( Z i , H i ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const Qi = Symbol ( "rootName" ) ; class Yi extends Zi { constructor ( t ) { super ( t ) , this . rootName = "main" } is ( t , e = null ) { const n = t . replace ( /^view:/ , "" ) ; return e ? "rootElement" == n && e == this . name || super . is ( t , e ) : "rootElement" == n || super . is ( t ) } get rootName ( ) { return this . getCustomProperty ( Qi ) } set rootName ( t ) { this . _setCustomProperty ( Qi , t ) } set _name ( t ) { this . name = t } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s X i { c o n s t r u c t o r ( t = { } ) { i f ( ! t . b o u n d a r i e s & & ! t . s t a r t P o s i t i o n ) t h r o w n e w Z n . b ( " v i e w - t r e e - w a l k e r - n o - s t a r t - p o s i t i o n : N e i t h e r b o u n d a r i e s n o r s t a r t i n g p o s i t i o n h a v e b e e n d e f i n e d . " , n u l l ) ; i f ( t . d i r e c t i o n & & " f o r w a r d " ! = t . d i r e c t i o n & & " b a c k w a r d " ! = t . d i r e c t i o n ) t h r o w n e w Z n . b ( " v i e w - t r e e - w a l k e r - u n k n o w n - d i r e c t i o n : O n l y ` b a c k w a r d ` a n d ` f o r w a r d ` d i r e c t i o n a l l o w e d . " , t . s t a r t P o s i t i o n , { d i r e c t i o n : t . d i r e c t i o n } ) ; t h i s . b o u n d a r i e s = t . b o u n d a r i e s | | n u l l , t . s t a r t P o s i t i o n ? t h i s . p o s i t i o n = t o . _ c r e a t e A t ( t . s t a r t P o s i t i o n ) : t h i s . p o s i t i o n = t o . _ c r e a t e A t ( t . b o u n d a r i e s [ " b a c k w a r d " = = t . d i r e c t i o n ? " e n d " : " s t a r t " ] ) , t h i s . d i r e c t i o n = t . d i r e c t i o n | | " f o r w a r d " , t h i s . s i n g l e C h a r a c t e r s = ! ! t . s i n g l e C h a r a c t e r s , t h i s . s h a l l o w = ! ! t . s h a l l o w , t h i s . i g n o r e E l e m e n t E n d = ! ! t . i g n o r e E l e m e n t E n d , t h i s . _ b o u n d a r y S t a r t P a r e n t = t h i s . b o u n d a r i e s ? t h i s . b o u n d a r i e s . s t a r t . p a r e n t : n u l l , t h i s . _ b o u n d a r y E n d P a r e n t = t h i s . b o u n d a r i e s ? t h i s . b o u n d a r i e s . e n d . p a r e n t : n u l l } [ S y m b o l . i t e r a t o r ] ( ) { r e t u r n t h i s } s k i p ( t ) { l e t e , n , i ; d o { i = t h i s . p o s i t i o n , ( { d o n e : e , v a l u e : n } = t h i s . n e x t ( ) ) } w h i l e ( ! e & & t ( n ) ) ; e | | ( t h i s . p o s i t i o n = i ) } n e x t ( ) { r e t u r n " f o r w a r d " = = t h i s . d i r e c t i o n ? t h i s . _ n e x t ( ) : t h i s . _ p r e v i o u s ( ) } _ n e x t ( ) { l e t t = t h i s . p o s i t i o n . c l o n e ( ) ; c o n s t e = t h i s . p o s i t i o n , n = t . p a r e n t ; i f ( n u l l = = = n . p a r e n t & & t . o f f s e t = = = n . c h i l d C o u n t ) r e t u r n { d o n e : ! 0 } ; i f ( n = = = t h i s . _ b o u n d a r y E n d P a r e n t & & t . o f f s e t = = t h i s . b o u n d a r i e s . e n d . o f f s e t ) r e t u r n { d o n e : ! 0 } ; l e t i ; i f ( n i n s t a n c e o f m i ) { i f ( t . i s A t E n d ) r e t u r n t h i s . p o s i t i o n = t o . _ c r e a t e A f t e r ( n ) , t h i s . _ n e x t ( ) ; i = n . d a t a [ t . o f f s e t ] } e l s e i = n . g e t C h i l d ( t . o f f s e t ) ; i f ( i i n s t a n c e o f v i ) r e t u r n t h i s . s h a l l o w ? t . o f f s e t + + : t = n e w t o ( i , 0 ) , t h i s . p o s i t i o n = t , t h i s . _ f o r m a t R e t u r n V a l u e ( " e l e m e n t S t a r t " , i , e , t , 1 ) ; i f ( i i n s t a n c e o f m i ) { i f ( t h i s . s i n g l e C h a r a c t e r s ) r e t u r n t = n e w t o ( i , 0 ) , t h i s . p o s i t i o n = t , t h i s . _ n e x t ( ) ; { l e t n , o = i . d a t a . l e n g t h ; r e t u r n i = = t h i s . _ b o u n d a r y E n d P a r e n t ? ( o = t h i s . b o u n d a r i e s . e n d . o f f s e t , n = n e w g i ( i , 0 , o ) , t = t o . _ c r e a t e A f t e r ( n ) ) : ( n = n e w g i ( i , 0 , i . d a t a . l e n g t h ) , t . o f f s e t + + ) , t h i s . p o s i t i o n = t , t h i s . _ f o r m a t R e t u r n V a l u e ( " t e x t " , n , e , t , o ) } } i f ( " s t r i n g " = = t y p e o f i ) { l e t i ; i f ( t h i s . s i n g l e C h a r a c t e r s ) i = 1 ; e l s e { i = ( n = = = t h i s . _ b o u n d a r y E n d P a r e n t ? t h i s . b o u n d a r i e s . e n d . o f f s e t : n . d a t a . l e n g t h ) - t . o f f s e t } c o n s t o = n e w g i ( n , t . o f f s e t , i ) ; r e t u r n t . o f f s e t + = i , t h i s . p o s i t i o n = t , t h i s . _ f o r m a t R e t u r n V a l u e ( " t e x t " , o , e , t , i ) } r e t u r n t = t o . _ c r e a t e A f t e r ( n ) , t h i s . p o s i t i o n = t , t h i s . i g n o r e E l e m e n t E n d ? t h i s . _ n e x t ( ) : t h i s . _ f o r m a t R e t u r n V a l u e ( " e l e m e n t E n d " , n , e , t ) } _ p r e v i o u s ( ) { l e t t = t h i s . p o s i t i o n . c l o n e ( ) ; c o n s t e = t h i s . p o s i t i o n , n = t . p a r e n t ; i f ( n u l l = = = n . p a r e n t & & 0 = = = t . o f f s e t ) r e t u r n { d o n e : ! 0 } ; i f ( n = = t h i s . _ b o u n d a r y S t a r t P a r e n t & & t . o f f s e t = = t h i s . b o u n d a r i e s . s t a r t . o f f s e t ) r e t u r n { d o n e : ! 0 } ; l e t i ; i f ( n i n s t a n c e o f m i ) { i f ( t . i s A t S t a r t ) r e t u r n t h i s . p o s i t i o n = t o . _ c r e a t e B e f o r e ( n ) , t h i s . _ p r e v i o u s ( ) ; i = n . d a t a [ t . o f f s e t - 1 ] } e l s e i = n . g e t C h i l d ( t . o f f s e t - 1 ) ; i f ( i i n s t a n c e o f v i ) r e t u r n t h i s . s h a l l o w ? ( t . o f f s e t - - , t h i s . p o s i t i o n = t , t h i s . _ f o r m a t R e t u r n V a l u e ( " e l e m e n t S t a r t " , i , e , t , 1 ) ) : ( t = n e w t o ( i , i . c h i l d C o u n t ) , t h i s . p o s i t i o n = t , t h i s . i g n o r e E l e m e n t E n d ? t h i s . _ p r e v i o u s ( ) : t h i s . _ f o r m a t R e t u r n V a l u e ( " e l e m e n t E n d " , i , e , t ) ) ; i f ( i i n s t a n c e o f m i ) { i f ( t h i s . s i n g l e C h a r a c t e r s ) r e t u r n t = n e w t o ( i , i . d a t a . l e n g t h ) , t h i s . p o s i t i o n = t , t h i s . _ p r e v i o u s ( ) ; { l e t n , o = i . d a t a . l e n g t h ; i f ( i = = t h i s . _ b o u n d a r y S t a r t P a r e n t ) { c o n s t e = t h i s . b o u n d a r i e s . s t a r t . o f f s e t ; o = ( n = n e w g i ( i , e , i . d a t a . l e n g t h - e ) ) . d a t a . l e n g t h , t = t o . _ c r e a t e B e f o r e ( n ) } e l s e n = n e w g i ( i , 0 , i . d a t a . l e n g t h ) , t . o f f s e t - - ; r e t u r n t h i s . p o s i t i o n = t , t h i s . _ f o r m a t R e t u r n V a l u e ( " t e x t " , n , e , t , o ) } } i f ( " s t r i n g " = = t y p e o f i ) { l e t i ; i f ( t h i s . s i n g l e C h a r a c t e r s ) i = 1 ; e l s e { c o n s t e = n = = = t h i s . _ b o u n d a r y S t a r t P a r e n t ? t h i s . b o u n d a r i e s . s t a r t . o f f s e t : 0 ; i = t . o f f s e t - e } t . o f f s e t - = i ; c o n s t o = n e w g i ( n , t . o f f s e t , i ) ; r e t u r n t h i s . p o s i t i o n = t , t h i s . _ f o r m a t R e t u r n V a l u e ( " t e x t " , o , e , t , i ) } r e t u r n t = t o . _ c r e a t e B e f o r e ( n ) , t h i s . p o s i t i o n = t , t h i s . _ f o r m a t R e t u r n V a l u e ( " e l e m e n t S t a r t " , n , e , t , 1 ) } _ f o r m a t R e t u r n V a l u e ( t , e , n , i , o ) { r e t u r n e i n s t a n c e o f g i & & ( e . o f f s e t I n T e x t + e . d a t a . l e n g t h = = e . t e x t N o d e . d a t a . l e n g t h & & ( " f o r w a r d " ! = t h i s . d i r e c t i o n | | t h i s . b o u n d a r i e s & & t h i s . b o u n d a r i e s . e n d . i s E q u a l ( t h i s . p o s i t i o n ) ? n = t o . _ c r e a t e A f t e r ( e . t e x t N o d e ) : ( i = t o . _ c r e a t e A f t e r ( e . t e x t N o d e ) , t h i s . p o s i t i o n = i ) ) , 0 = = = e . o f f s e t I n T e x t & & ( " b a c k w a r d " ! = t h i s . d i r e c t i o n | | t h i s . b o u n d a r i e s & & t h i s . b o u n d a r i e s . s t a r t . i s E q u a l ( t h i s . p o s i t i o n ) ? n = t o . _ c r e a t e B e f o r e ( e . t e x t N o d e ) : ( i = t o . _ c r e a t e B e f o r e ( e . t e x t N o d e ) , t h i s . p o s i t i o n = i ) ) ) , { d o n e : ! 1 , v a l u e : { t y p e : t , i t e m : e , p r e v i o u s P o s i t i o n : n , n e x t P o s i t i o n :
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s t o { c o n s t r u c t o r ( t , e ) { t h i s . p a r e n t = t , t h i s . o f f s e t = e } g e t n o d e A f t e r ( ) { r e t u r n t h i s . p a r e n t . i s ( " t e x t " ) ? n u l l : t h i s . p a r e n t . g e t C h i l d ( t h i s . o f f s e t ) | | n u l l } g e t n o d e B e f o r e ( ) { r e t u r n t h i s . p a r e n t . i s ( " t e x t " ) ? n u l l : t h i s . p a r e n t . g e t C h i l d ( t h i s . o f f s e t - 1 ) | | n u l l } g e t i s A t S t a r t ( ) { r e t u r n 0 = = = t h i s . o f f s e t } g e t i s A t E n d ( ) { c o n s t t = t h i s . p a r e n t . i s ( " t e x t " ) ? t h i s . p a r e n t . d a t a . l e n g t h : t h i s . p a r e n t . c h i l d C o u n t ; r e t u r n t h i s . o f f s e t = = = t } g e t r o o t ( ) { r e t u r n t h i s . p a r e n t . r o o t } g e t e d i t a b l e E l e m e n t ( ) { l e t t = t h i s . p a r e n t ; f o r ( ; ! ( t i n s t a n c e o f Z i ) ; ) { i f ( ! t . p a r e n t ) r e t u r n n u l l ; t = t . p a r e n t } r e t u r n t } g e t S h i f t e d B y ( t ) { c o n s t e = t o . _ c r e a t e A t ( t h i s ) , n = e . o f f s e t + t ; r e t u r n e . o f f s e t = n < 0 ? 0 : n , e } g e t L a s t M a t c h i n g P o s i t i o n ( t , e = { } ) { e . s t a r t P o s i t i o n = t h i s ; c o n s t n = n e w X i ( e ) ; r e t u r n n . s k i p ( t ) , n . p o s i t i o n } g e t A n c e s t o r s ( ) { r e t u r n t h i s . p a r e n t . i s ( " d o c u m e n t F r a g m e n t " ) ? [ t h i s . p a r e n t ] : t h i s . p a r e n t . g e t A n c e s t o r s ( { i n c l u d e S e l f : ! 0 } ) } g e t C o m m o n A n c e s t o r ( t ) { c o n s t e = t h i s . g e t A n c e s t o r s ( ) , n = t . g e t A n c e s t o r s ( ) ; l e t i = 0 ; f o r ( ; e [ i ] = = n [ i ] & & e [ i ] ; ) i + + ; r e t u r n 0 = = = i ? n u l l : e [ i - 1 ] } i s ( t ) { r e t u r n " p o s i t i o n " = = t | | " v i e w : p o s i t i o n " = = t } i s E q u a l ( t ) { r e t u r n t h i s . p a r e n t = = t . p a r e n t & & t h i s . o f f s e t = = t . o f f s e t } i s B e f o r e ( t ) { r e t u r n " b e f o r e " = = t h i s . c o m p a r e W i t h ( t ) } i s A f t e r ( t ) { r e t u r n " a f t e r " = = t h i s . c o m p a r e W i t h ( t ) } c o m p a r e W i t h ( t ) { i f ( t h i s . r o o t ! = = t . r o o t ) r e t u r n " d i f f e r e n t " ; i f ( t h i s . i s E q u a l ( t ) ) r e t u r n " s a m e " ; c o n s t e = t h i s . p a r e n t . i s ( " n o d e " ) ? t h i s . p a r e n t . g e t P a t h ( ) : [ ] , n = t . p a r e n t . i s ( " n o d e " ) ? t . p a r e n t . g e t P a t h ( ) : [ ] ; e . p u s h ( t h i s . o f f s e t ) , n . p u s h ( t . o f f s e t ) ; c o n s t i = u i ( e , n ) ; s w i t c h ( i ) { c a s e " p r e f i x " : r e t u r n " b e f o r e " ; c a s e " e x t e n s i o n " : r e t u r n " a f t e r " ; d e f a u l t : r e t u r n e [ i ] < n [ i ] ? " b e f o r e " : " a f t e r " } } g e t W a l k e r ( t = { } ) { r e t u r n t . s t a r t P o s i t i o n = t h i s , n e w X i ( t ) } c l o n e ( ) { r e t u r n n e w t o ( t h i s . p a r e n t , t h i s . o f f s e t ) } s t a t i c _ c r e a t e A t ( t , e ) { i f ( t i n s t a n c e o f t o ) r e t u r n n e w t h i s ( t . p a r e n t , t . o f f s e t ) ; { c o n s t n = t ; i f ( " e n d " = = e ) e = n . i s ( " t e x t " ) ? n . d a t a . l e n g t h : n . c h i l d C o u n t ; e l s e { i f ( " b e f o r e " = = e ) r e t u r n t h i s . _ c r e a t e B e f o r e ( n ) ; i f ( " a f t e r " = = e ) r e t u r n t h i s . _ c r e a t e A f t e r ( n ) ; i f ( 0 ! = = e & & ! e ) t h r o w n e w Z n . b ( " v i e w - c r e a t e P o s i t i o n A t - o f f s e t - r e q u i r e d : V i e w # c r e a t e P o s i t i o n A t ( ) r e q u i r e s t h e o f f s e t w h e n t h e f i r s t p a r a m e t e r i s a v i e w i t e m . " , n ) } r e t u r n n e w t o ( n , e ) } } s t a t i c _ c r e a t e A f t e r ( t ) { i f ( t . i s ( " t e x t P r o x y " ) ) r e t u r n n e w t o ( t . t e x t N o d e , t . o f f s e t I n T e x t + t . d a t a . l e n g t h ) ; i f ( ! t . p a r e n t ) t h r o w n e w Z n . b ( " v i e w - p o s i t i o n - a f t e r - r o o t : Y o u c a n n o t m a k e p o s i t i o n a f t e r r o o t . " , t , { r o o t : t } ) ; r e t u r n n e w t o ( t . p a r e n t , t . i n d e x + 1 ) } s t a t i c _ c r e a t e B e f o r e ( t ) { i f ( t . i s ( " t e x t P r o x y " ) ) r e t u r n n e w t o ( t . t e x t N o d e , t . o f f s e t I n T e x t ) ; i f ( ! t . p a r e n t ) t h r o w n e w Z n . b ( " v i e w - p o s i t i o n - b e f o r e - r o o t : Y o u c a n n o t m a k e p o s i t i o n b e f o r e r o o t . " , t , { r o o t : t } ) ; r e t u r n n e w t o ( t . p a r e n t , t . i n d e x ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s e o { c o n s t r u c t o r ( t , e = n u l l ) { t h i s . s t a r t = t . c l o n e ( ) , t h i s . e n d = e ? e . c l o n e ( ) : t . c l o n e ( ) } * [ S y m b o l . i t e r a t o r ] ( ) { y i e l d * n e w X i ( { b o u n d a r i e s : t h i s , i g n o r e E l e m e n t E n d : ! 0 } ) } g e t i s C o l l a p s e d ( ) { r e t u r n t h i s . s t a r t . i s E q u a l ( t h i s . e n d ) } g e t i s F l a t ( ) { r e t u r n t h i s . s t a r t . p a r e n t = = = t h i s . e n d . p a r e n t } g e t r o o t ( ) { r e t u r n t h i s . s t a r t . r o o t } g e t E n l a r g e d ( ) { l e t t = t h i s . s t a r t . g e t L a s t M a t c h i n g P o s i t i o n ( n o , { d i r e c t i o n : " b a c k w a r d " } ) , e = t h i s . e n d . g e t L a s t M a t c h i n g P o s i t i o n ( n o ) ; r e t u r n t . p a r e n t . i s ( " t e x t " ) & & t . i s A t S t a r t & & ( t = t o . _ c r e a t e B e f o r e ( t . p a r e n t ) ) , e . p a r e n t . i s ( " t e x t " ) & & e . i s A t E n d & & ( e = t o . _ c r e a t e A f t e r ( e . p a r e n t ) ) , n e w e o ( t , e ) } g e t T r i m m e d ( ) { l e t t = t h i s . s t a r t . g e t L a s t M a t c h i n g P o s i t i o n ( n o ) ; i f ( t . i s A f t e r ( t h i s . e n d ) | | t . i s E q u a l ( t h i s . e n d ) ) r e t u r n n e w e o ( t , t ) ; l e t e = t h i s . e n d . g e t L a s t M a t c h i n g P o s i t i o n ( n o , { d i r e c t i o n : " b a c k w a r d " } ) ; c o n s t n = t . n o d e A f t e r , i = e . n o d e B e f o r e ; r e t u r n n & & n . i s ( " t e x t " ) & & ( t = n e w t o ( n , 0 ) ) , i & & i . i s ( " t e x t " ) & & ( e = n e w t o ( i , i . d a t a . l e n g t h ) ) , n e w e o ( t , e ) } i s E q u a l ( t ) { r e t u r n t h i s = = t | | t h i s . s t a r t . i s E q u a l ( t . s t a r t ) & & t h i s . e n d . i s E q u a l ( t . e n d ) } c o n t a i n s P o s i t i o n ( t ) { r e t u r n t . i s A f t e r ( t h i s . s t a r t ) & & t . i s B e f o r e ( t h i s . e n d ) } c o n t a i n s R a n g e ( t , e = ! 1 ) { t . i s C o l l a p s e d & & ( e = ! 1 ) ; c o n s t n = t h i s . c o n t a i n s P o s i t i o n ( t . s t a r t ) | | e & & t h i s . s t a r t . i s E q u a l ( t . s t a r t ) , i = t h i s . c o n t a i n s P o s i t i o n ( t . e n d ) | | e & & t h i s . e n d . i s E q u a l ( t . e n d ) ; r e t u r n n & & i } g e t D i f f e r e n c e ( t ) { c o n s t e = [ ] ; r e t u r n t h i s . i s I n t e r s e c t i n g ( t ) ? ( t h i s . c o n t a i n s P o s i t i o n ( t . s t a r t ) & & e . p u s h ( n e w e o ( t h i s . s t a r t , t . s t a r t ) ) , t h i s . c o n t a i n s P o s i t i o n ( t . e n d ) & & e . p u s h ( n e w e o ( t . e n d , t h i s . e n d ) ) ) : e . p u s h ( t h i s . c l o n e ( ) ) , e } g e t I n t e r s e c t i o n ( t ) { i f ( t h i s . i s I n t e r s e c t i n g ( t ) ) { l e t e = t h i s . s t a r t , n = t h i s . e n d ; r e t u r n t h i s . c o n t a i n s P o s i t i o n ( t . s t a r t ) & & ( e = t . s t a r t ) , t h i s . c o n t a i n s P o s i t i o n ( t . e n d ) & & ( n = t . e n d ) , n e w e o ( e , n ) } r e t u r n n u l l } g e t W a l k e r ( t = { } ) { r e t u r n t . b o u n d a r i e s = t h i s , n e w X i ( t ) } g e t C o m m o n A n c e s t o r ( ) { r e t u r n t h i s . s t a r t . g e t C o m m o n A n c e s t o r ( t h i s . e n d ) } c l o n e ( ) { r e t u r n n e w e o ( t h i s . s t a r t , t h i s . e n d ) } * g e t I t e m s ( t = { } ) { t . b o u n d a r i e s = t h i s , t . i g n o r e E l e m e n t E n d = ! 0 ; c o n s t e = n e w X i ( t ) ; f o r ( c o n s t t o f e ) y i e l d t . i t e m } * g e t P o s i t i o n s ( t = { } ) { t . b o u n d a r i e s = t h i s ; c o n s t e = n e w X i ( t ) ; y i e l d e . p o s i t i o n ; f o r ( c o n s t t o f e ) y i e l d t . n e x t P o s i t i o n } i s ( t ) { r e t u r n " r a n g e " = = t | | " v i e w : r a n g e " = = t } i s I n t e r s e c t i n g ( t ) { r e t u r n t h i s . s t a r t . i s B e f o r e ( t . e n d ) & & t h i s . e n d . i s A f t e r ( t . s t a r t ) } s t a t i c _ c r e a t e F r o m P a r e n t s A n d O f f s e t s ( t , e , n , i ) { r e t u r n n e w t h i s ( n e w t o ( t , e ) , n e w t o ( n , i ) ) } s t a t i c _ c r e a t e F r o m P o s i t i o n A n d S h i f t ( t , e ) { c o n s t n = t , i = t . g e t S h i f t e d B y ( e ) ; r e t u r n e > 0 ? n e w t h i s ( n , i ) : n e w t h i s ( i , n ) } s t a t i c _ c r e a t e I n ( t ) { r e t u r n t h i s . _ c r e a t e F r o m P a r e n t s A n d O f f s e t s ( t , 0 , t , t . c h i l d C o u n t ) } s t a t i c _ c r e a t e O n ( t ) { c o n s t e = t . i s ( " t e x t P r o x y " ) ? t . o f f s e t S i z e : 1 ; r e t u r n t h i s . _ c r e a t e F r o m P o s i t i o n A n d S h i f t ( t o . _ c r e a t e B e f o r e ( t ) , e ) } } f u n c t i o n n o ( t ) { r e t u r n ! ( ! t . i t e m . i s ( " a t t r i b u t e E l e m e n t " ) & & ! t . i t e m . i s ( " u i E l e m e n t " ) ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n i o ( t ) { l e t e = 0 ; f o r ( c o n s t n o f t ) e + + ; r e t u r n e }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s o o { c o n s t r u c t o r ( t = n u l l , e , n ) { t h i s . _ r a n g e s = [ ] , t h i s . _ l a s t R a n g e B a c k w a r d = ! 1 , t h i s . _ i s F a k e = ! 1 , t h i s . _ f a k e S e l e c t i o n L a b e l = " " , t h i s . s e t T o ( t , e , n ) } g e t i s F a k e ( ) { r e t u r n t h i s . _ i s F a k e } g e t f a k e S e l e c t i o n L a b e l ( ) { r e t u r n t h i s . _ f a k e S e l e c t i o n L a b e l } g e t a n c h o r ( ) { i f ( ! t h i s . _ r a n g e s . l e n g t h ) r e t u r n n u l l ; c o n s t t = t h i s . _ r a n g e s [ t h i s . _ r a n g e s . l e n g t h - 1 ] ; r e t u r n ( t h i s . _ l a s t R a n g e B a c k w a r d ? t . e n d : t . s t a r t ) . c l o n e ( ) } g e t f o c u s ( ) { i f ( ! t h i s . _ r a n g e s . l e n g t h ) r e t u r n n u l l ; c o n s t t = t h i s . _ r a n g e s [ t h i s . _ r a n g e s . l e n g t h - 1 ] ; r e t u r n ( t h i s . _ l a s t R a n g e B a c k w a r d ? t . s t a r t : t . e n d ) . c l o n e ( ) } g e t i s C o l l a p s e d ( ) { r e t u r n 1 = = = t h i s . r a n g e C o u n t & & t h i s . _ r a n g e s [ 0 ] . i s C o l l a p s e d } g e t r a n g e C o u n t ( ) { r e t u r n t h i s . _ r a n g e s . l e n g t h } g e t i s B a c k w a r d ( ) { r e t u r n ! t h i s . i s C o l l a p s e d & & t h i s . _ l a s t R a n g e B a c k w a r d } g e t e d i t a b l e E l e m e n t ( ) { r e t u r n t h i s . a n c h o r ? t h i s . a n c h o r . e d i t a b l e E l e m e n t : n u l l } * g e t R a n g e s ( ) { f o r ( c o n s t t o f t h i s . _ r a n g e s ) y i e l d t . c l o n e ( ) } g e t F i r s t R a n g e ( ) { l e t t = n u l l ; f o r ( c o n s t e o f t h i s . _ r a n g e s ) t & & ! e . s t a r t . i s B e f o r e ( t . s t a r t ) | | ( t = e ) ; r e t u r n t ? t . c l o n e ( ) : n u l l } g e t L a s t R a n g e ( ) { l e t t = n u l l ; f o r ( c o n s t e o f t h i s . _ r a n g e s ) t & & ! e . e n d . i s A f t e r ( t . e n d ) | | ( t = e ) ; r e t u r n t ? t . c l o n e ( ) : n u l l } g e t F i r s t P o s i t i o n ( ) { c o n s t t = t h i s . g e t F i r s t R a n g e ( ) ; r e t u r n t ? t . s t a r t . c l o n e ( ) : n u l l } g e t L a s t P o s i t i o n ( ) { c o n s t t = t h i s . g e t L a s t R a n g e ( ) ; r e t u r n t ? t . e n d . c l o n e ( ) : n u l l } i s E q u a l ( t ) { i f ( t h i s . i s F a k e ! = t . i s F a k e ) r e t u r n ! 1 ; i f ( t h i s . i s F a k e & & t h i s . f a k e S e l e c t i o n L a b e l ! = t . f a k e S e l e c t i o n L a b e l ) r e t u r n ! 1 ; i f ( t h i s . r a n g e C o u n t ! = t . r a n g e C o u n t ) r e t u r n ! 1 ; i f ( 0 = = = t h i s . r a n g e C o u n t ) r e t u r n ! 0 ; i f ( ! t h i s . a n c h o r . i s E q u a l ( t . a n c h o r ) | | ! t h i s . f o c u s . i s E q u a l ( t . f o c u s ) ) r e t u r n ! 1 ; f o r ( c o n s t e o f t h i s . _ r a n g e s ) { l e t n = ! 1 ; f o r ( c o n s t i o f t . _ r a n g e s ) i f ( e . i s E q u a l ( i ) ) { n = ! 0 ; b r e a k } i f ( ! n ) r e t u r n ! 1 } r e t u r n ! 0 } i s S i m i l a r ( t ) { i f ( t h i s . i s B a c k w a r d ! = t . i s B a c k w a r d ) r e t u r n ! 1 ; c o n s t e = i o ( t h i s . g e t R a n g e s ( ) ) ; i f ( e ! = i o ( t . g e t R a n g e s ( ) ) ) r e t u r n ! 1 ; i f ( 0 = = e ) r e t u r n ! 0 ; f o r ( l e t e o f t h i s . g e t R a n g e s ( ) ) { e = e . g e t T r i m m e d ( ) ; l e t n = ! 1 ; f o r ( l e t i o f t . g e t R a n g e s ( ) ) i f ( i = i . g e t T r i m m e d ( ) , e . s t a r t . i s E q u a l ( i . s t a r t ) & & e . e n d . i s E q u a l ( i . e n d ) ) { n = ! 0 ; b r e a k } i f ( ! n ) r e t u r n ! 1 } r e t u r n ! 0 } g e t S e l e c t e d E l e m e n t ( ) { i f ( 1 ! = = t h i s . r a n g e C o u n t ) r e t u r n n u l l ; c o n s t t = t h i s . g e t F i r s t R a n g e ( ) ; l e t e = t . s t a r t . n o d e A f t e r , n = t . e n d . n o d e B e f o r e ; r e t u r n t . s t a r t . p a r e n t . i s ( " t e x t " ) & & t . s t a r t . i s A t E n d & & t . s t a r t . p a r e n t . n e x t S i b l i n g & & ( e = t . s t a r t . p a r e n t . n e x t S i b l i n g ) , t . e n d . p a r e n t . i s ( " t e x t " ) & & t . e n d . i s A t S t a r t & & t . e n d . p a r e n t . p r e v i o u s S i b l i n g & & ( n = t . e n d . p a r e n t . p r e v i o u s S i b l i n g ) , e i n s t a n c e o f v i & & e = = n ? e : n u l l } s e t T o ( t , e , n ) { i f ( n u l l = = = t ) t h i s . _ s e t R a n g e s ( [ ] ) , t h i s . _ s e t F a k e O p t i o n s ( e ) ; e l s e i f ( t i n s t a n c e o f o o | | t i n s t a n c e o f r o ) t h i s . _ s e t R a n g e s ( t . g e t R a n g e s ( ) , t . i s B a c k w a r d ) , t h i s . _ s e t F a k e O p t i o n s ( { f a k e : t . i s F a k e , l a b e l : t . f a k e S e l e c t i o n L a b e l } ) ; e l s e i f ( t i n s t a n c e o f e o ) t h i s . _ s e t R a n g e s ( [ t ] , e & & e . b a c k w a r d ) , t h i s . _ s e t F a k e O p t i o n s ( e ) ; e l s e i f ( t i n s t a n c e o f t o ) t h i s . _ s e t R a n g e s ( [ n e w e o ( t ) ] ) , t h i s . _ s e t F a k e O p t i o n s ( e ) ; e l s e i f ( t i n s t a n c e o f p i ) { c o n s t i = ! ! n & & ! ! n . b a c k w a r d ; l e t o ; i f ( v o i d 0 = = = e ) t h r o w n e w Z n . b ( " v i e w - s e l e c t i o n - s e t T o - r e q u i r e d - s e c o n d - p a r a m e t e r : s e l e c t i o n . s e t T o r e q u i r e s t h e s e c o n d p a r a m e t e r w h e n t h e f i r s t p a r a m e t e r i s a n o d e . " , t h i s ) ; o = " i n " = = e ? e o . _ c r e a t e I n ( t ) : " o n " = = e ? e o . _ c r e a t e O n ( t ) : n e w e o ( t o . _ c r e a t e A t ( t , e ) ) , t h i s . _ s e t R a n g e s ( [ o ] , i ) , t h i s . _ s e t F a k e O p t i o n s ( n ) } e l s e { i f ( ! w i ( t ) ) t h r o w n e w Z n . b ( " v i e w - s e l e c t i o n - s e t T o - n o t - s e l e c t a b l e : C a n n o t s e t s e l e c t i o n t o g i v e n p l a c e . " , t h i s ) ; t h i s . _ s e t R a n g e s ( t , e & & e . b a c k w a r d ) , t h i s . _ s e t F a k e O p t i o n s ( e ) } t h i s . f i r e ( " c h a n g e " ) } s e t F o c u s ( t , e ) { i f ( n u l l = = = t h i s . a n c h o r ) t h r o w n e w Z n . b ( " v i e w - s e l e c t i o n - s e t F o c u s - n o - r a n g e s : C a n n o t s e t s e l e c t i o n f o c u s i f t h e r e a r e n o r a n g e s i n s e l e c t i o n . " , t h i s ) ; c o n s t n = t o . _ c r e a t e A t ( t , e ) ; i f ( " s a m e " = = n . c o m p a r e W i t h ( t h i s . f o c u s ) ) r e t u r n ; c o n s t i = t h i s . a n c h o r ; t h i s . _ r a n g e s . p o p ( ) , " b e f o r e " = = n . c o m p a r e W i t h ( i ) ? t h i s . _ a d d R a n g e ( n e w e o ( n , i ) , ! 0 ) : t h i s . _ a d d R a n g e ( n e w e o ( i , n ) ) , t h i s . f i r e ( " c h a n g e " ) } i s ( t ) { r e t u r n " s e l e c t i o n " = = t | | " v i e w : s e l e c t i o n " = = t } _ s e t R a n g e s ( t , e = ! 1 ) { t = A r r a y . f r o m ( t ) , t h i s . _ r a n g e s = [ ] ; f o r ( c o n s t e o f t ) t h i s . _ a d d R a n g e ( e ) ; t h i s . _ l a s t R a n g e B a c k w a r d = ! ! e } _ s e t F a k e O p t i o n s ( t = { } ) { t h i s . _ i s F a k e = ! ! t . f a k e , t h i s . _ f a k e S e l e c t i o n L a b e l = t . f a k e & & t . l a b e l | | " " } _ a d d R a n g e ( t , e = ! 1 ) { i f ( ! ( t i n s t a n c e o f e o ) ) t h r o w n e w Z n . b ( " v i e w - s e l e c t i o n - a d d - r a n g e - n o t - r a n g e : S e l e c t i o n r a n g e s e t t o a n o b j e c t t h a t i s n o t a n i n s t a n c e o f v i e w . R a n g e " , t h i s ) ; t h i s . _ p u s h R a n g e ( t ) , t h i s . _ l a s t R a n g e B a c k w a r d = ! ! e } _ p u s h R a n g e ( t ) { f o r ( c o n s t e o f t h i s . _ r a n g e s ) i f ( t . i s I n
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class ro { constructor ( t = null , e , n ) { this . _selection = new oo , this . _selection . delegate ( "change" ) . to ( this ) , this . _selection . setTo ( t , e , n ) } get isFake ( ) { return this . _selection . isFake } get fakeSelectionLabel ( ) { return this . _selection . fakeSelectionLabel } get anchor ( ) { return this . _selection . anchor } get focus ( ) { return this . _selection . focus } get isCollapsed ( ) { return this . _selection . isCollapsed } get rangeCount ( ) { return this . _selection . rangeCount } get isBackward ( ) { return this . _selection . isBackward } get editableElement ( ) { return this . _selection . editableElement } get _ranges ( ) { return this . _selection . _ranges } * getRanges ( ) { yield * this . _selection . getRanges ( ) } getFirstRange ( ) { return this . _selection . getFirstRange ( ) } getLastRange ( ) { return this . _selection . getLastRange ( ) } getFirstPosition ( ) { return this . _selection . getFirstPosition ( ) } getLastPosition ( ) { return this . _selection . getLastPosition ( ) } getSelectedElement ( ) { return this . _selection . getSelectedElement ( ) } isEqual ( t ) { return this . _selection . isEqual ( t ) } isSimilar ( t ) { return this . _selection . isSimilar ( t ) } is ( t ) { return "selection" == t || "documentSelection" == t || "view:selection" == t || "view:documentSelection" == t } _setTo ( t , e , n ) { this . _selection . setTo ( t , e , n ) } _setFocus ( t , e ) { this . _selection . setFocus ( t , e ) } } di ( ro , ii ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class so { constructor ( t = { } ) { this . _items = [ ] , this . _itemMap = new Map , this . _idProperty = t . idProperty || "id" , this . _bindToExternalToInternalMap = new WeakMap , this . _bindToInternalToExternalMap = new WeakMap , this . _skippedIndexesFromExternal = [ ] } get length ( ) { return this . _items . length } get first ( ) { return this . _items [ 0 ] || null } get last ( ) { return this . _items [ this . length - 1 ] || null } add ( t , e ) { let n ; const i = this . _idProperty ; if ( i in t ) { if ( "string" != typeof ( n = t [ i ] ) ) throw new Zn . b ( "collection-add-invalid-id" , this ) ; if ( this . get ( n ) ) throw new Zn . b ( "collection-add-item-already-exists" , this ) } else t [ i ] = n = Xn ( ) ; if ( void 0 === e ) e = this . _items . length ; else if ( e > this . _items . length || e < 0 ) throw new Zn . b ( "collection-add-item-invalid-index" , this ) ; return this . _items . splice ( e , 0 , t ) , this . _itemMap . set ( n , t ) , this . fire ( "add" , t , e ) , this } get ( t ) { let e ; if ( "string" == typeof t ) e = this . _itemMap . get ( t ) ; else { if ( "number" != typeof t ) throw new Zn . b ( "collection-get-invalid-arg: Index or id must be given." , this ) ; e = this . _items [ t ] } return e || null } has ( t ) { if ( "string" == typeof t ) return this . _itemMap . has ( t ) ; { const e = t [ this . _idProperty ] ; return this . _itemMap . has ( e ) } } getIndex ( t ) { let e ; return e = "string" == typeof t ? this . _itemMap . get ( t ) : t , this . _items . indexOf ( e ) } remove ( t ) { let e , n , i , o = ! 1 ; const r = this . _idProperty ; if ( "string" == typeof t ? ( n = t , o = ! ( i = this . _itemMap . get ( n ) ) , i && ( e = this . _items . indexOf ( i ) ) ) : "number" == typeof t ? ( e = t , o = ! ( i = this . _items [ e ] ) , i && ( n = i [ r ] ) ) : ( n = ( i = t ) [ r ] , o = - 1 == ( e = this . _items . indexOf ( i ) ) || ! this . _itemMap . get ( n ) ) , o ) throw new Zn . b ( "collection-remove-404: Item not found." , this ) ; this . _items . splice ( e , 1 ) , this . _itemMap . delete ( n ) ; const s = this . _bindToInternalToExternalMap . get ( i ) ; return this . _bindToInternalToExternalMap . delete ( i ) , this . _bindToExternalToInternalMap . delete ( s ) , this . fire ( "remove" , i , e ) , i } map ( t , e ) { return this . _items . map ( t , e ) } find ( t , e ) { return this . _items . find ( t , e ) } filter ( t , e ) { return this . _items . filter ( t , e ) } clear ( ) { for ( this . _bindToCollection && ( this . stopListening ( this . _bindToCollection ) , this . _bindToCollection = null ) ; this . length ; ) this . remove ( 0 ) } bindTo ( t ) { if ( this . _bindToCollection ) throw new Zn . b ( "collection-bind-to-rebind: The collection cannot be bound more than once." , this ) ; return this . _bindToCollection = t , { as : t => { this . _setUpBindToBinding ( e => new t ( e ) ) } , using : t => { "function" == typeof t ? this . _setUpBindToBinding ( e => t ( e ) ) : this . _setUpBindToBinding ( e => e [ t ] ) } } } _setUpBindToBinding ( t ) { const e = this . _bindToCollection , n = ( n , i , o ) => { const r = e . _bindToCollection == this , s = e . _bindToInternalToExternalMap . get ( i ) ; if ( r && s ) this . _bindToExternalToInternalMap . set ( i , s ) , this . _bindToInternalToExternalMap . set ( s , i ) ; else { const n = t ( i ) ; if ( ! n ) return void this . _skippedIndexesFromExternal . push ( o ) ; let r = o ; for ( const t of this . _skippedIndexesFromExternal ) o > t && r -- ; for ( const t of e . _skippedIndexesFromExternal ) r >= t && r ++ ; this . _bindToExternalToInternalMap . set ( i , n ) , this . _bindToInternalToExternalMap . set ( n , i ) , this . add ( n , r ) ; for ( let t = 0 ; t < e . _skippedIndexesFromExternal . length ; t ++ ) r <= e . _skippedIndexesFromExternal [ t ] && e . _skippedIndexesFromExternal [ t ] ++ } } ; for ( const t of e ) n ( 0 , t , e . getIndex ( t ) ) ; this . listenTo ( e , "add" , n ) , this . listenTo ( e , "remove" , ( t , e , n ) => { const i = this . _bindToExternalToInternalMap . get ( e ) ; i && this . remove ( i ) , this . _skippedIndexesFromExternal = this . _skippedIndexesFromExternal . reduce ( ( t , e ) => ( n < e && t . push ( e - 1 ) , n > e && t . push ( e ) , t ) , [ ] ) } ) } [ Symbol . iterator ] ( ) { return this . _items [ Symbol . iterator ] ( ) } } di ( so , ii ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class ao { constructor ( ) { this . selection = new ro , this . roots = new so ( { idProperty : "rootName" } ) , this . set ( "isReadOnly" , ! 1 ) , this . set ( "isFocused" , ! 1 ) , this . set ( "isComposing" , ! 1 ) , this . _postFixers = new Set } getRoot ( t = "main" ) { return this . roots . get ( t ) } registerPostFixer ( t ) { this . _postFixers . add ( t ) } destroy ( ) { this . roots . map ( t => t . destroy ( ) ) , this . stopListening ( ) } _callPostFixers ( t ) { let e = ! 1 ; do { for ( const n of this . _postFixers ) if ( e = n ( t ) ) break } while ( e ) } } di ( ao , Hi ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const co = 10 ; class lo extends vi { constructor ( t , e , n ) { super ( t , e , n ) , this . getFillerOffset = uo , this . _priority = co , this . _id = null , this . _clonesGroup = null } get priority ( ) { return this . _priority } get id ( ) { return this . _id } getElementsWithSameId ( ) { if ( null === this . id ) throw new Zn . b ( "attribute-element-get-elements-with-same-id-no-id: Cannot get elements with the same id for an attribute element without id." , this ) ; return new Set ( this . _clonesGroup ) } is ( t , e = null ) { const n = t && t . replace ( /^view:/ , "" ) ; return e ? "attributeElement" == n && e == this . name || super . is ( t , e ) : "attributeElement" == n || super . is ( t ) } isSimilar ( t ) { return null !== this . id || null !== t . id ? this . id === t . id : super . isSimilar ( t ) && this . priority == t . priority } _clone ( t ) { const e = super . _clone ( t ) ; return e . _priority = this . _priority , e . _id = this . _id , e } } function uo ( ) { if ( ho ( this ) ) return null ; let t = this . parent ; for ( ; t && t . is ( "attributeElement" ) ; ) { if ( ho ( t ) > 1 ) return null ; t = t . parent } return ! t || ho ( t ) > 1 ? null : this . childCount } function ho ( t ) { return Array . from ( t . getChildren ( ) ) . filter ( t => ! t . is ( "uiElement" ) ) . length }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /lo.DEFAULT_PRIORITY=co;class fo extends vi{constructor(t,e,n){super(t,e,n),this.getFillerOffset=po}is(t,e=null){const n=t.replace(/ ^ view : / , " " ) ; r e t u r n e ? " e m p t y E l e m e n t " = = n & & e = = t h i s . n a m e | | s u p e r . i s ( t , e ) : " e m p t y E l e m e n t " = = n | | s u p e r . i s ( t ) } _ i n s e r t C h i l d ( t , e ) { i f ( e & & ( e i n s t a n c e o f p i | | A r r a y . f r o m ( e ) . l e n g t h > 0 ) ) t h r o w n e w Z n . b ( " v i e w - e m p t y e l e m e n t - c a n n o t - a d d : C a n n o t a d d c h i l d n o d e s t o E m p t y E l e m e n t i n s t a n c e . " , [ t h i s , e ] ) } } f u n c t i o n p o ( ) { r e t u r n n u l l }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t m o = n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) ; v a r g o = { i s M a c : f u n c t i o n ( t ) { r e t u r n t . i n d e x O f ( " m a c i n t o s h " ) > - 1 } ( m o ) , i s E d g e : f u n c t i o n ( t ) { r e t u r n ! ! t . m a t c h ( / e d g e \ / ( \ d + . ? \ d * ) / ) } ( m o ) , i s G e c k o : f u n c t i o n ( t ) { r e t u r n ! ! t . m a t c h ( / g e c k o \ / \ d + / ) } ( m o ) , i s S a f a r i : f u n c t i o n ( t ) { r e t u r n t . i n d e x O f ( " a p p l e w e b k i t / " ) > - 1 & & - 1 = = = t . i n d e x O f ( " c h r o m e " ) } ( m o ) , i s A n d r o i d : f u n c t i o n ( t ) { r e t u r n t . i n d e x O f ( " a n d r o i d " ) > - 1 } ( m o ) , f e a t u r e s : { i s R e g E x p U n i c o d e P r o p e r t y S u p p o r t e d : f u n c t i o n ( ) { l e t t = ! 1 ; t r y { t = 0 = = = " ć " . s e a r c h ( n e w R e g E x p ( " [ \ \ p { L } ] " , " u " ) ) } c a t c h ( t ) { } r e t u r n t }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /()}};const bo={"⌘":"ctrl","⇧":"shift","⌥":"alt"},wo={ctrl:"⌘",shift:"⇧",alt:"⌥"},ko=function(){const t={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let e=65;e<=90;e++){const n=String.fromCharCode(e);t[n.toLowerCase()]=e}for(let e=48;e<=57;e++)t[e-48]=e;for(let e=112;e<=123;e++)t["f"+(e-111)]=e;return t}();function _o(t){let e;if("string"==typeof t){if(!(e=ko[t.toLowerCase()]))throw new Zn.b("keyboard-unknown-key: Unknown key name.",null,{key:t})}else e=t.keyCode+(t.altKey?ko.alt:0)+(t.ctrlKey?ko.ctrl:0)+(t.shiftKey?ko.shift:0);return e}function vo(t){return"string"==typeof t&&(t=yo(t)),t.map(t=>"string"==typeof t?_o(t):t).reduce((t,e)=>e+t,0)}function yo(t){return t.split(/ \ s * \ + \ s * / ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /class xo extends vi{constructor(t,e,n){super(t,e,n),this.getFillerOffset=Ao}is(t,e=null){const n=t.replace(/ ^ view : / , " " ) ; r e t u r n e ? " u i E l e m e n t " = = n & & e = = t h i s . n a m e | | s u p e r . i s ( t , e ) : " u i E l e m e n t " = = n | | s u p e r . i s ( t ) } _ i n s e r t C h i l d ( t , e ) { i f ( e & & ( e i n s t a n c e o f p i | | A r r a y . f r o m ( e ) . l e n g t h > 0 ) ) t h r o w n e w Z n . b ( " v i e w - u i e l e m e n t - c a n n o t - a d d : C a n n o t a d d c h i l d n o d e s t o U I E l e m e n t i n s t a n c e . " , t h i s ) } r e n d e r ( t ) { r e t u r n t h i s . t o D o m E l e m e n t ( t ) } t o D o m E l e m e n t ( t ) { c o n s t e = t . c r e a t e E l e m e n t ( t h i s . n a m e ) ; f o r ( c o n s t t o f t h i s . g e t A t t r i b u t e K e y s ( ) ) e . s e t A t t r i b u t e ( t , t h i s . g e t A t t r i b u t e ( t ) ) ; r e t u r n e } } f u n c t i o n C o ( t ) { t . d o c u m e n t . o n ( " k e y d o w n " , ( e , n ) = > ( f u n c t i o n ( t , e , n ) { i f ( e . k e y C o d e = = k o . a r r o w r i g h t ) { c o n s t t = e . d o m T a r g e t . o w n e r D o c u m e n t . d e f a u l t V i e w . g e t S e l e c t i o n ( ) , i = 1 = = t . r a n g e C o u n t & & t . g e t R a n g e A t ( 0 ) . c o l l a p s e d ; i f ( i | | e . s h i f t K e y ) { c o n s t e = t . f o c u s N o d e , o = t . f o c u s O f f s e t , r = n . d o m P o s i t i o n T o V i e w ( e , o ) ; i f ( n u l l = = = r ) r e t u r n ; l e t s = ! 1 ; c o n s t a = r . g e t L a s t M a t c h i n g P o s i t i o n ( t = > ( t . i t e m . i s ( " u i E l e m e n t " ) & & ( s = ! 0 ) , ! ( ! t . i t e m . i s ( " u i E l e m e n t " ) & & ! t . i t e m . i s ( " a t t r i b u t e E l e m e n t " ) ) ) ) ; i f ( s ) { c o n s t e = n . v i e w P o s i t i o n T o D o m ( a ) ; i ? t . c o l l a p s e ( e . p a r e n t , e . o f f s e t ) : t . e x t e n d ( e . p a r e n t , e . o f f s e t ) } } } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ) ( 0 , n , t . d o m C o n v e r t e r ) ) } f u n c t i o n A o ( ) { r e t u r n n u l l } c l a s s P o { c o n s t r u c t o r ( t ) { t h i s . _ c h i l d r e n = [ ] , t & & t h i s . _ i n s e r t C h i l d ( 0 , t ) } [ S y m b o l . i t e r a t o r ] ( ) { r e t u r n t h i s . _ c h i l d r e n [ S y m b o l . i t e r a t o r ] ( ) } g e t c h i l d C o u n t ( ) { r e t u r n t h i s . _ c h i l d r e n . l e n g t h } g e t i s E m p t y ( ) { r e t u r n 0 = = = t h i s . c h i l d C o u n t } g e t r o o t ( ) { r e t u r n t h i s } g e t p a r e n t ( ) { r e t u r n n u l l } i s ( t ) { r e t u r n " d o c u m e n t F r a g m e n t " = = t | | " v i e w : d o c u m e n t F r a g m e n t " = = t } _ a p p e n d C h i l d ( t ) { r e t u r n t h i s . _ i n s e r t C h i l d ( t h i s . c h i l d C o u n t , t ) } g e t C h i l d ( t ) { r e t u r n t h i s . _ c h i l d r e n [ t ] } g e t C h i l d I n d e x ( t ) { r e t u r n t h i s . _ c h i l d r e n . i n d e x O f ( t ) } g e t C h i l d r e n ( ) { r e t u r n t h i s . _ c h i l d r e n [ S y m b o l . i t e r a t o r ] ( ) } _ i n s e r t C h i l d ( t , e ) { t h i s . _ f i r e C h a n g e ( " c h i l d r e n " , t h i s ) ; l e t n = 0 ; c o n s t i = f u n c t i o n ( t ) { i f ( " s t r i n g " = = t y p e o f t ) r e t u r n [ n e w m i ( t ) ] ; w i ( t ) | | ( t = [ t ] ) ; r e t u r n A r r a y . f r o m ( t ) . m a p ( t = > " s t r i n g " = = t y p e o f t ? n e w m i ( t ) : t i n s t a n c e o f g i ? n e w m i ( t . d a t a ) : t ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( e ) ; f o r ( c o n s t e o f i ) n u l l ! = = e . p a r e n t & & e . _ r e m o v e ( ) , e . p a r e n t = t h i s , t h i s . _ c h i l d r e n . s p l i c e ( t , 0 , e ) , t + + , n + + ; r e t u r n n } _ r e m o v e C h i l d r e n ( t , e = 1 ) { t h i s . _ f i r e C h a n g e ( " c h i l d r e n " , t h i s ) ; f o r ( l e t n = t ; n < t + e ; n + + ) t h i s . _ c h i l d r e n [ n ] . p a r e n t = n u l l ; r e t u r n t h i s . _ c h i l d r e n . s p l i c e ( t , e ) } _ f i r e C h a n g e ( t , e ) { t h i s . f i r e ( " c h a n g e : " + t , e ) } } d i ( P o , i i ) ; c l a s s T o { c o n s t r u c t o r ( t ) { t h i s . d o c u m e n t = t , t h i s . _ c l o n e G r o u p s = n e w M a p } s e t S e l e c t i o n ( t , e , n ) { t h i s . d o c u m e n t . s e l e c t i o n . _ s e t T o ( t , e , n ) } s e t S e l e c t i o n F o c u s ( t , e ) { t h i s . d o c u m e n t . s e l e c t i o n . _ s e t F o c u s ( t , e ) } c r e a t e T e x t ( t ) { r e t u r n n e w m i ( t ) } c r e a t e A t t r i b u t e E l e m e n t ( t , e , n = { } ) { c o n s t i = n e w l o ( t , e ) ; r e t u r n n . p r i o r i t y & & ( i . _ p r i o r i t y = n . p r i o r i t y ) , n . i d & & ( i . _ i d = n . i d ) , i } c r e a t e C o n t a i n e r E l e m e n t ( t , e ) { r e t u r n n e w C i ( t , e ) } c r e a t e E d i t a b l e E l e m e n t ( t , e ) { c o n s t n = n e w Z i ( t , e ) ; r e t u r n n . _ d o c u m e n t = t h i s . d o c u m e n t , n } c r e a t e E m p t y E l e m e n t ( t , e ) { r e t u r n n e w f o ( t , e ) } c r e a t e U I E l e m e n t ( t , e , n ) { c o n s t i = n e w x o ( t , e ) ; r e t u r n n & & ( i . r e n d e r = n ) , i } s e t A t t r i b u t e ( t , e , n ) { n . _ s e t A t t r i b u t e ( t , e ) } r e m o v e A t t r i b u t e ( t , e ) { e . _ r e m o v e A t t r i b u t e ( t ) } a d d C l a s s ( t , e ) { e . _ a d d C l a s s ( t ) } r e m o v e C l a s s ( t , e ) { e . _ r e m o v e C l a s s ( t ) } s e t S t y l e ( t , e , n ) { P ( t ) & & v o i d 0 = = = n & & ( n = e ) , n . _ s e t S t y l e ( t , e ) } r e m o v e S t y l e ( t , e ) { e . _ r e m o v e S t y l e ( t ) } s e t C u s t o m P r o p e r t y ( t , e , n ) { n . _ s e t C u s t o m P r o p e r t y ( t , e ) } r e m o v e C u s t o m P r o p e r t y ( t , e ) { r e t u r n e . _ r e m o v e C u s t o m P r o p e r t y ( t ) } b r e a k A t t r i b u t e s ( t ) { r e t u r n t i n s t a n c e o f t o ? t h i s . _ b r e a k A t t r i b u t e s ( t ) : t h i s . _ b r e a k A t t r i b u t e s R a n g e ( t ) } b r e a k C o n t a i n e r ( t ) { c o n s t e = t . p a r e n t ; i f ( ! e . i s ( " c o n t a i n e r E l e m e n t " ) ) t h r o w n e w Z n . b ( " v i e w - w r i t e r - b r e a k - n o n - c o n t a i n e r - e l e m e n t : T r y i n g t o b r e a k a n e l e m e n t w h i c h i s n o t a c o n t a i n e r e l e m e n t . " , t h i s . d o c u m e n t ) ; i f ( ! e . p a r e n t ) t h r o w n e w Z n . b ( " v i e w - w r i t e r - b r e a k - r o o t : T r y i n g t o b r e a k r o o t e l e m e n t . " , t h i s . d o c u m e n t ) ; i f ( t . i s A t S t a r t ) r e t u r n t o . _ c r e a t e B e f o r e ( e ) ; i f ( ! t . i s A t E n d ) { c o n s t n = e . _ c l o n e ( ! 1 ) ; t h i s . i n s e r t ( t o . _ c r e a t e A f t e r ( e ) , n ) ; c o n s t i = n e w e o ( t , t o . _ c r e a t e A t ( e , " e n d " ) ) , o = n e w t o ( n , 0 ) ; t h i s . m o v e ( i , o ) } r e t u r n t o . _ c r e a t e A f t e r ( e ) } m e r g e A t t r i b u t e s ( t ) { c o n s t e = t . o f f s e t , n = t . p a r e n t ; i f ( n . i s ( " t e x t " ) ) r e t u r n t ; i f ( n . i s ( " a t t r i b u t e E l e m e n t " ) & & 0 = = = n . c h i l d C o u n t ) { c o n s t t = n . p a r e n t , e = n . i n d e x ; r e t u r n n . _ r e m o v e ( ) , t h i s . _ r e m o v e F r o m C l o n e d E l e m e n t s G r o u p ( n ) , t h i s . m e r g e A t t r i b u t e s ( n e w t o ( t , e ) ) } c o n s t i = n . g e t C h i l d ( e - 1 ) , o = n . g e t C h i l d ( e ) ; i f ( ! i | | ! o ) r e t u r n t ; i f ( i . i s ( " t e x t " ) & & o . i s ( " t e x t " ) ) r e t u r n O o ( i , o ) ; i f ( i . i s ( " a t t r i b u t e E l e m e n t " ) & & o . i s ( " a t t r i b u t e E l e m e n t " ) & & i . i s S i m i l a r ( o ) ) { c o n s t t = i . c h i l d C o u n t ; r e t u r n i . _ a p p e n d C h i l d ( o . g e t C h i l d r e n ( ) ) , o . _ r e m o v e ( ) , t h i s . _ r e m o v e F r o m C l o n e d E l e m e n t s G r o u p ( o ) , t h i s . m e r g e A t t r i b u t e s ( n e w t o ( i , t ) ) } r e t u r n t } m e r g e C o n t a i n e r s ( t ) { c o n s t e = t . n o d e B e f o r e , n = t . n o d e A f t e r ; i f ( ! ( e & & n & & e . i s ( " c o n t a i n e r E l e m e n t " ) & & n . i s ( " c o n t a i n e r E l e m e n t " ) ) ) t h r o w n e w Z n . b ( " v i e w - w r i t e r - m e r g e - c o n t a i n e r s - i n v a l i d - p o s i t i o n : E l e m e n t b e f o r e a n d a f t e r g i v e n p o s i t i o n c a n n o t b e m e r g e d . " , t h i s . d o c u m e n t ) ; c o n s t i = e . g e t C h i l d ( e . c h i l d C o u n t - 1 ) , o = i i n s t a n c e o f m i ? t o . _ c r e a t e A t ( i , " e n d " ) : t o . _ c r e a t e A t ( e , " e n d " ) ; r e t u r n t h i s . m o v e ( e o . _ c r e a t e I n ( n ) , t o . _ c r e a t e A t ( e , " e n d " ) ) , t h i s . r e m o v e ( e o . _ c r e a t e O n ( n ) ) , o } i n s e r t ( t , e ) { ( f u n c t i o n t ( e , n ) { f o r ( c o n s t i o f e ) { i f ( ! D o . s o m e ( t = > i i n s t a n c e o f t ) ) t h r o w n e w Z n . b ( " v i e w - w r i t e r - i n s e r t - i n v a l i d - n o d e " , n ) ; i . i s ( " t e x t " ) | | t ( i . g e t C h i l d r e n ( ) , n ) } } ) ( e = w i ( e ) ? [ . . . e ] : [ e ] , t h i s . d o c u m e n t ) ; c o n s t n = E o ( t ) ; i f ( ! n ) t h r o w n e w Z n . b ( " v i e w - w r i t e r - i n v a l i d - p o s i t i o n - c o n t a i n e r " , t h i s . d o c u m e n t ) ; c o n s t i = t h i s . _ b r e a k A t t r i b u t e s ( t , ! 0 ) , o = n . _ i n s e r t C h i l d ( i . o f f s e t , e ) ; f o r ( c o n s t t o f e ) t h i s . _ a d d T o C l o n e d E l e m e n t s G r o u p ( t ) ; c o n s t r = i . g e t S h i f t e d B y ( o ) , s = t h i s . m e r g e A t t r i b u t e s ( i ) ; i f ( 0 = = = o ) r e t u r n n e w e o ( s , s ) ; { s . i s E q u a l ( i ) | | r . o f f s e t - - ; c o n s t t = t h i s . m e r g e A t t r i b u t e s ( r ) ; r e t u r n n e w e o ( s , t ) } } r e m o v e ( t ) { c o n s t e = t i n s t a n c e o f e o ? t : e o . _ c r e a t e O n ( t ) ; i f ( N o ( e , t h i s . d o c u m e n t ) , e . i s C o l l a p s e d ) r e t u r n n e w P o ; c o n s t { s t a r t : n , e n d : i } = t h i s . _ b r e a k A t t r i b u t e s R a n g e ( e , ! 0 ) , o = n . p a r e n t , r = i . o f f s e t - n . o f f s e t , s = o . _ r e m o v e C h i l d r e n ( n . o f f s e t , r ) ; f o r ( c o n s t t o f s ) t h i s . _ r e m o v e F r o m C l o n e d E l e m e n t s G r o u p ( t ) ; c o n s t a = t h i s . m e r g e A t t r i b u t e s ( n ) ; r e t u r n e . s t a r t = a , e . e n d = a . c l o n e ( ) , n e w P o ( s ) } c l e a r ( t , e ) { N o ( t , t h i s . d o c u m e n t ) ; c o n s t n = t . g e t W a l k e r ( { d i r e c t i o n : " b a c k w a r d " , i g n o r e E l e m e n t E n d : ! 0 } ) ; f o r ( c o n s t i o f n ) { c o n s t n = i . i t e m ; l e t o ; i f ( n . i s ( " e l e m e n t " ) & & e . i s S i m i l a r ( n ) ) o = e o . _ c r e a t e O n ( n ) ; e l s e i f ( ! i . n e x t P o s i t i o n . i s A f t e r ( t . s t a r t ) & & n . i s ( " t e x t P r o x y " ) ) { c o n s t t = n . g e t A n c e s t o r s ( ) . f i n d ( t = > t . i s ( " e l e m e n t " ) & & e . i s S i m i l a r ( t ) ) ; t & & ( o = e o . _ c r e a t e I n ( t ) )
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n F o ( t ) { r e t u r n " [ o b j e c t T e x t ] " = = O b j e c t . p r o t o t y p e . t o S t r i n g . c a l l ( t ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t B o = t = > t . c r e a t e T e x t N o d e ( " " ) , L o = t = > { c o n s t e = t . c r e a t e E l e m e n t ( " b r " ) ; r e t u r n e . d a t a s e t . c k e F i l l e r = ! 0 , e } , z o = 7 , q o = ( ( ) = > { l e t t = " " ; f o r ( l e t e = 0 ; e < z o ; e + + ) t + = " " ; r e t u r n t } ) ( ) ; f u n c t i o n j o ( t ) { r e t u r n F o ( t ) & & t . d a t a . s u b s t r ( 0 , z o ) = = = q o } f u n c t i o n H o ( t ) { r e t u r n t . d a t a . l e n g t h = = z o & & j o ( t ) } f u n c t i o n U o ( t ) { r e t u r n j o ( t ) ? t . d a t a . s l i c e ( z o ) : t . d a t a } f u n c t i o n $ o ( t , e ) { i f ( e . k e y C o d e = = k o . a r r o w l e f t ) { c o n s t t = e . d o m T a r g e t . o w n e r D o c u m e n t . d e f a u l t V i e w . g e t S e l e c t i o n ( ) ; i f ( 1 = = t . r a n g e C o u n t & & t . g e t R a n g e A t ( 0 ) . c o l l a p s e d ) { c o n s t e = t . g e t R a n g e A t ( 0 ) . s t a r t C o n t a i n e r , n = t . g e t R a n g e A t ( 0 ) . s t a r t O f f s e t ; j o ( e ) & & n < = z o & & t . c o l l a p s e ( e , 0 ) } } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n W o ( t , e , n , i = ! 1 ) { n = n | | f u n c t i o n ( t , e ) { r e t u r n t = = = e } , A r r a y . i s A r r a y ( t ) | | ( t = A r r a y . f r o m ( t ) ) , A r r a y . i s A r r a y ( e ) | | ( e = A r r a y . f r o m ( e ) ) ; c o n s t o = f u n c t i o n ( t , e , n ) { c o n s t i = G o ( t , e , n ) ; i f ( - 1 = = = i ) r e t u r n { f i r s t I n d e x : - 1 , l a s t I n d e x O l d : - 1 , l a s t I n d e x N e w : - 1 } ; c o n s t o = K o ( t , i ) , r = K o ( e , i ) , s = G o ( o , r , n ) , a = t . l e n g t h - s , c = e . l e n g t h - s ; r e t u r n { f i r s t I n d e x : i , l a s t I n d e x O l d : a , l a s t I n d e x N e w : c } } ( t , e , n ) ; r e t u r n i ? f u n c t i o n ( t , e ) { c o n s t { f i r s t I n d e x : n , l a s t I n d e x O l d : i , l a s t I n d e x N e w : o } = t ; i f ( - 1 = = = n ) r e t u r n A r r a y ( e ) . f i l l ( " e q u a l " ) ; l e t r = [ ] ; n > 0 & & ( r = r . c o n c a t ( A r r a y ( n ) . f i l l ( " e q u a l " ) ) ) ; o - n > 0 & & ( r = r . c o n c a t ( A r r a y ( o - n ) . f i l l ( " i n s e r t " ) ) ) ; i - n > 0 & & ( r = r . c o n c a t ( A r r a y ( i - n ) . f i l l ( " d e l e t e " ) ) ) ; o < e & & ( r = r . c o n c a t ( A r r a y ( e - o ) . f i l l ( " e q u a l " ) ) ) ; r e t u r n r }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( o , e . l e n g t h ) : f u n c t i o n ( t , e ) { c o n s t n = [ ] , { f i r s t I n d e x : i , l a s t I n d e x O l d : o , l a s t I n d e x N e w : r } = e ; r - i > 0 & & n . p u s h ( { i n d e x : i , t y p e : " i n s e r t " , v a l u e s : t . s l i c e ( i , r ) } ) ; o - i > 0 & & n . p u s h ( { i n d e x : i + ( r - i ) , t y p e : " d e l e t e " , h o w M a n y : o - i } ) ; r e t u r n n } ( e , o ) } f u n c t i o n G o ( t , e , n ) { f o r ( l e t i = 0 ; i < M a t h . m a x ( t . l e n g t h , e . l e n g t h ) ; i + + ) i f ( v o i d 0 = = = t [ i ] | | v o i d 0 = = = e [ i ] | | ! n ( t [ i ] , e [ i ] ) ) r e t u r n i ; r e t u r n - 1 } f u n c t i o n K o ( t , e ) { r e t u r n t . s l i c e ( e ) . r e v e r s e ( ) } f u n c t i o n J o ( t , e , n ) { n = n | | f u n c t i o n ( t , e ) { r e t u r n t = = = e } ; c o n s t i = t . l e n g t h , o = e . l e n g t h ; i f ( i > 2 0 0 | | o > 2 0 0 | | i + o > 3 0 0 ) r e t u r n J o . f a s t D i f f ( t , e , n , ! 0 ) ; l e t r , s ; i f ( o < i ) { c o n s t n = t ; t = e , e = n , r = " d e l e t e " , s = " i n s e r t " } e l s e r = " i n s e r t " , s = " d e l e t e " ; c o n s t a = t . l e n g t h , c = e . l e n g t h , l = c - a , d = { } , u = { } ; f u n c t i o n h ( i ) { c o n s t o = ( v o i d 0 ! = = u [ i - 1 ] ? u [ i - 1 ] : - 1 ) + 1 , l = v o i d 0 ! = = u [ i + 1 ] ? u [ i + 1 ] : - 1 , h = o > l ? - 1 : 1 ; d [ i + h ] & & ( d [ i ] = d [ i + h ] . s l i c e ( 0 ) ) , d [ i ] | | ( d [ i ] = [ ] ) , d [ i ] . p u s h ( o > l ? r : s ) ; l e t f = M a t h . m a x ( o , l ) , p = f - i ; f o r ( ; p < a & & f < c & & n ( t [ p ] , e [ f ] ) ; ) p + + , f + + , d [ i ] . p u s h ( " e q u a l " ) ; r e t u r n f } l e t f , p = 0 ; d o { f o r ( f = - p ; f < l ; f + + ) u [ f ] = h ( f ) ; f o r ( f = l + p ; f > l ; f - - ) u [ f ] = h ( f ) ; u [ l ] = h ( l ) , p + + } w h i l e ( u [ l ] ! = = c ) ; r e t u r n d [ l ] . s l i c e ( 1 ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function Zo ( t , e , n ) { t . insertBefore ( n , t . childNodes [ e ] || null ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n Q o ( t ) { c o n s t e = t . p a r e n t N o d e ; e & & e . r e m o v e C h i l d ( t ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n Y o ( t ) { i f ( t ) { i f ( t . d e f a u l t V i e w ) r e t u r n t i n s t a n c e o f t . d e f a u l t V i e w . D o c u m e n t ; i f ( t . o w n e r D o c u m e n t & & t . o w n e r D o c u m e n t . d e f a u l t V i e w ) r e t u r n t i n s t a n c e o f t . o w n e r D o c u m e n t . d e f a u l t V i e w . N o d e } r e t u r n ! 1 }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / J o . f a s t D i f f = W o ; c l a s s X o { c o n s t r u c t o r ( t , e ) { t h i s . d o m D o c u m e n t s = n e w S e t , t h i s . d o m C o n v e r t e r = t , t h i s . m a r k e d A t t r i b u t e s = n e w S e t , t h i s . m a r k e d C h i l d r e n = n e w S e t , t h i s . m a r k e d T e x t s = n e w S e t , t h i s . s e l e c t i o n = e , t h i s . i s F o c u s e d = ! 1 , t h i s . _ i n l i n e F i l l e r = n u l l , t h i s . _ f a k e S e l e c t i o n C o n t a i n e r = n u l l } m a r k T o S y n c ( t , e ) { i f ( " t e x t " = = = t ) t h i s . d o m C o n v e r t e r . m a p V i e w T o D o m ( e . p a r e n t ) & & t h i s . m a r k e d T e x t s . a d d ( e ) ; e l s e { i f ( ! t h i s . d o m C o n v e r t e r . m a p V i e w T o D o m ( e ) ) r e t u r n ; i f ( " a t t r i b u t e s " = = = t ) t h i s . m a r k e d A t t r i b u t e s . a d d ( e ) ; e l s e { i f ( " c h i l d r e n " ! = = t ) t h r o w n e w Z n . b ( " v i e w - r e n d e r e r - u n k n o w n - t y p e : U n k n o w n t y p e p a s s e d t o R e n d e r e r . m a r k T o S y n c . " , t h i s ) ; t h i s . m a r k e d C h i l d r e n . a d d ( e ) } } } r e n d e r ( ) { l e t t ; f o r ( c o n s t t o f t h i s . m a r k e d C h i l d r e n ) t h i s . _ u p d a t e C h i l d r e n M a p p i n g s ( t ) ; t h i s . _ i n l i n e F i l l e r & & ! t h i s . _ i s S e l e c t i o n I n I n l i n e F i l l e r ( ) & & t h i s . _ r e m o v e I n l i n e F i l l e r ( ) , t h i s . _ i n l i n e F i l l e r ? t = t h i s . _ g e t I n l i n e F i l l e r P o s i t i o n ( ) : t h i s . _ n e e d s I n l i n e F i l l e r A t S e l e c t i o n ( ) & & ( t = t h i s . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) , t h i s . m a r k e d C h i l d r e n . a d d ( t . p a r e n t ) ) ; f o r ( c o n s t t o f t h i s . m a r k e d A t t r i b u t e s ) t h i s . _ u p d a t e A t t r s ( t ) ; f o r ( c o n s t e o f t h i s . m a r k e d C h i l d r e n ) t h i s . _ u p d a t e C h i l d r e n ( e , { i n l i n e F i l l e r P o s i t i o n : t } ) ; f o r ( c o n s t e o f t h i s . m a r k e d T e x t s ) ! t h i s . m a r k e d C h i l d r e n . h a s ( e . p a r e n t ) & & t h i s . d o m C o n v e r t e r . m a p V i e w T o D o m ( e . p a r e n t ) & & t h i s . _ u p d a t e T e x t ( e , { i n l i n e F i l l e r P o s i t i o n : t } ) ; i f ( t ) { c o n s t e = t h i s . d o m C o n v e r t e r . v i e w P o s i t i o n T o D o m ( t ) , n = e . p a r e n t . o w n e r D o c u m e n t ; j o ( e . p a r e n t ) ? t h i s . _ i n l i n e F i l l e r = e . p a r e n t : t h i s . _ i n l i n e F i l l e r = t r ( n , e . p a r e n t , e . o f f s e t ) } e l s e t h i s . _ i n l i n e F i l l e r = n u l l ; t h i s . _ u p d a t e S e l e c t i o n ( ) , t h i s . _ u p d a t e F o c u s ( ) , t h i s . m a r k e d T e x t s . c l e a r ( ) , t h i s . m a r k e d A t t r i b u t e s . c l e a r ( ) , t h i s . m a r k e d C h i l d r e n . c l e a r ( ) } _ u p d a t e C h i l d r e n M a p p i n g s ( t ) { c o n s t e = t h i s . d o m C o n v e r t e r . m a p V i e w T o D o m ( t ) ; i f ( ! e ) r e t u r n ; c o n s t n = t h i s . d o m C o n v e r t e r . m a p V i e w T o D o m ( t ) . c h i l d N o d e s , i = A r r a y . f r o m ( t h i s . d o m C o n v e r t e r . v i e w C h i l d r e n T o D o m ( t , e . o w n e r D o c u m e n t , { w i t h C h i l d r e n : ! 1 } ) ) , o = t h i s . _ d i f f N o d e L i s t s ( n , i ) , r = t h i s . _ f i n d R e p l a c e A c t i o n s ( o , n , i ) ; i f ( - 1 ! = = r . i n d e x O f ( " r e p l a c e " ) ) { c o n s t e = { e q u a l : 0 , i n s e r t : 0 , d e l e t e : 0 } ; f o r ( c o n s t o o f r ) i f ( " r e p l a c e " = = = o ) { c o n s t o = e . e q u a l + e . i n s e r t , r = e . e q u a l + e . d e l e t e , s = t . g e t C h i l d ( o ) ; s & & ! s . i s ( " u i E l e m e n t " ) & & t h i s . _ u p d a t e E l e m e n t M a p p i n g s ( s , n [ r ] ) , Q o ( i [ o ] ) , e . e q u a l + + } e l s e e [ o ] + + } } _ u p d a t e E l e m e n t M a p p i n g s ( t , e ) { t h i s . d o m C o n v e r t e r . u n b i n d D o m E l e m e n t ( e ) , t h i s . d o m C o n v e r t e r . b i n d E l e m e n t s ( e , t ) , t h i s . m a r k e d C h i l d r e n . a d d ( t ) , t h i s . m a r k e d A t t r i b u t e s . a d d ( t ) } _ g e t I n l i n e F i l l e r P o s i t i o n ( ) { c o n s t t = t h i s . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ; r e t u r n t . p a r e n t . i s ( " t e x t " ) ? t o . _ c r e a t e B e f o r e ( t h i s . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) . p a r e n t ) : t } _ i s S e l e c t i o n I n I n l i n e F i l l e r ( ) { i f ( 1 ! = t h i s . s e l e c t i o n . r a n g e C o u n t | | ! t h i s . s e l e c t i o n . i s C o l l a p s e d ) r e t u r n ! 1 ; c o n s t t = t h i s . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) , e = t h i s . d o m C o n v e r t e r . v i e w P o s i t i o n T o D o m ( t ) ; r e t u r n ! ! ( e & & F o ( e . p a r e n t ) & & j o ( e . p a r e n t ) ) } _ r e m o v e I n l i n e F i l l e r ( ) { c o n s t t = t h i s . _ i n l i n e F i l l e r ; i f ( ! j o ( t ) ) t h r o w n e w Z n . b ( " v i e w - r e n d e r e r - f i l l e r - w a s - l o s t : T h e i n l i n e f i l l e r n o d e w a s l o s t . " , t h i s ) ; H o ( t ) ? t . p a r e n t N o d e . r e m o v e C h i l d ( t ) : t . d a t a = t . d a t a . s u b s t r ( z o ) , t h i s . _ i n l i n e F i l l e r = n u l l } _ n e e d s I n l i n e F i l l e r A t S e l e c t i o n ( ) { i f ( 1 ! = t h i s . s e l e c t i o n . r a n g e C o u n t | | ! t h i s . s e l e c t i o n . i s C o l l a p s e d ) r e t u r n ! 1 ; c o n s t t = t h i s . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) , e = t . p a r e n t , n = t . o f f s e t ; i f ( ! t h i s . d o m C o n v e r t e r . m a p V i e w T o D o m ( e . r o o t ) ) r e t u r n ! 1 ; i f ( ! e . i s ( " e l e m e n t " ) ) r e t u r n ! 1 ; i f ( ! f u n c t i o n ( t ) { i f ( " f a l s e " = = t . g e t A t t r i b u t e ( " c o n t e n t e d i t a b l e " ) ) r e t u r n ! 1 ; c o n s t e = t . f i n d A n c e s t o r ( t = > t . h a s A t t r i b u t e ( " c o n t e n t e d i t a b l e " ) ) ; r e t u r n ! e | | " t r u e " = = e . g e t A t t r i b u t e ( " c o n t e n t e d i t a b l e " ) } ( e ) ) r e t u r n ! 1 ; i f ( n = = = e . g e t F i l l e r O f f s e t ( ) ) r e t u r n ! 1 ; c o n s t i = t . n o d e B e f o r e , o = t . n o d e A f t e r ; r e t u r n ! ( i i n s t a n c e o f m i | | o i n s t a n c e o f m i ) } _ u p d a t e T e x t ( t , e ) { c o n s t n = t h i s . d o m C o n v e r t e r . f i n d C o r r e s p o n d i n g D o m T e x t ( t ) , i = t h i s . d o m C o n v e r t e r . v i e w T o D o m ( t , n . o w n e r D o c u m e n t ) , o = n . d a t a ; l e t r = i . d a t a ; c o n s t s = e . i n l i n e F i l l e r P o s i t i o n ; i f ( s & & s . p a r e n t = = t . p a r e n t & & s . o f f s e t = = t . i n d e x & & ( r = q o + r ) , o ! = r ) { c o n s t t = W o ( o , r ) ; f o r ( c o n s t e o f t ) " i n s e r t " = = = e . t y p e ? n . i n s e r t D a t a ( e . i n d e x , e . v a l u e s . j o i n ( " " ) ) : n . d e l e t e D a t a ( e . i n d e x , e . h o w M a n y ) } } _ u p d a t e A t t r s ( t ) { c o n s t e = t h i s . d o m C o n v e r t e r . m a p V i e w T o D o m ( t ) ; i f ( ! e ) r e t u r n ; c o n s t n = A r r a y . f r o m ( e . a t t r i b u t e s ) . m a p ( t = > t . n a m e ) , i = t . g e t A t t r i b u t e K e y s ( ) ; f o r ( c o n s t n o f i ) e . s e t A t t r i b u t e ( n , t . g e t A t t r i b u t e ( n ) ) ; f o r ( c o n s t i o f n ) t . h a s A t t r i b u t e ( i ) | | e . r e m o v e A t t r i b u t e ( i ) } _ u p d a t e C h i l d r e n ( t , e ) { c o n s t n = t h i s . d o m C o n v e r t e r . m a p V i e w T o D o m ( t ) ; i f ( ! n ) r e t u r n ; c
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( e ) ) ; c o n s t n = t h i s . _ f a k e S e l e c t i o n C o n t a i n e r ; i f ( t h i s . d o m C o n v e r t e r . b i n d F a k e S e l e c t i o n ( n , t h i s . s e l e c t i o n ) , ! t h i s . _ f a k e S e l e c t i o n N e e d s U p d a t e ( t ) ) r e t u r n ; n . p a r e n t E l e m e n t & & n . p a r e n t E l e m e n t = = t | | t . a p p e n d C h i l d ( n ) , n . t e x t C o n t e n t = t h i s . s e l e c t i o n . f a k e S e l e c t i o n L a b e l | | " " ; c o n s t i = e . g e t S e l e c t i o n ( ) , o = e . c r e a t e R a n g e ( ) ; i . r e m o v e A l l R a n g e s ( ) , o . s e l e c t N o d e C o n t e n t s ( n ) , i . a d d R a n g e ( o ) } _ u p d a t e D o m S e l e c t i o n ( t ) { c o n s t e = t . o w n e r D o c u m e n t . d e f a u l t V i e w . g e t S e l e c t i o n ( ) ; i f ( ! t h i s . _ d o m S e l e c t i o n N e e d s U p d a t e ( e ) ) r e t u r n ; c o n s t n = t h i s . d o m C o n v e r t e r . v i e w P o s i t i o n T o D o m ( t h i s . s e l e c t i o n . a n c h o r ) , i = t h i s . d o m C o n v e r t e r . v i e w P o s i t i o n T o D o m ( t h i s . s e l e c t i o n . f o c u s ) ; t . f o c u s ( ) , e . c o l l a p s e ( n . p a r e n t , n . o f f s e t ) , e . e x t e n d ( i . p a r e n t , i . o f f s e t ) , g o . i s G e c k o & & f u n c t i o n ( t , e ) { c o n s t n = t . p a r e n t ; i f ( n . n o d e T y p e ! = N o d e . E L E M E N T _ N O D E | | t . o f f s e t ! = n . c h i l d N o d e s . l e n g t h - 1 ) r e t u r n ; c o n s t i = n . c h i l d N o d e s [ t . o f f s e t ] ; i & & " B R " = = i . t a g N a m e & & e . a d d R a n g e ( e . g e t R a n g e A t ( 0 ) ) } ( i , e ) } _ d o m S e l e c t i o n N e e d s U p d a t e ( t ) { i f ( ! t h i s . d o m C o n v e r t e r . i s D o m S e l e c t i o n C o r r e c t ( t ) ) r e t u r n ! 0 ; c o n s t e = t & & t h i s . d o m C o n v e r t e r . d o m S e l e c t i o n T o V i e w ( t ) ; r e t u r n ( ! e | | ! t h i s . s e l e c t i o n . i s E q u a l ( e ) ) & & ! ( ! t h i s . s e l e c t i o n . i s C o l l a p s e d & & t h i s . s e l e c t i o n . i s S i m i l a r ( e ) ) } _ f a k e S e l e c t i o n N e e d s U p d a t e ( t ) { c o n s t e = t h i s . _ f a k e S e l e c t i o n C o n t a i n e r , n = t . o w n e r D o c u m e n t . g e t S e l e c t i o n ( ) ; r e t u r n ! e | | e . p a r e n t E l e m e n t ! = = t | | ( n . a n c h o r N o d e ! = = e & & ! e . c o n t a i n s ( n . a n c h o r N o d e ) | | e . t e x t C o n t e n t ! = = t h i s . s e l e c t i o n . f a k e S e l e c t i o n L a b e l ) } _ r e m o v e D o m S e l e c t i o n ( ) { f o r ( c o n s t t o f t h i s . d o m D o c u m e n t s ) { i f ( t . g e t S e l e c t i o n ( ) . r a n g e C o u n t ) { c o n s t e = t . a c t i v e E l e m e n t , n = t h i s . d o m C o n v e r t e r . m a p D o m T o V i e w ( e ) ; e & & n & & t . g e t S e l e c t i o n ( ) . r e m o v e A l l R a n g e s ( ) } } } _ r e m o v e F a k e S e l e c t i o n ( ) { c o n s t t = t h i s . _ f a k e S e l e c t i o n C o n t a i n e r ; t & & t . r e m o v e ( ) } _ u p d a t e F o c u s ( ) { i f ( t h i s . i s F o c u s e d ) { c o n s t t = t h i s . s e l e c t i o n . e d i t a b l e E l e m e n t ; t & & t h i s . d o m C o n v e r t e r . f o c u s ( t ) } } } f u n c t i o n t r ( t , e , n ) { c o n s t i = e i n s t a n c e o f A r r a y ? e : e . c h i l d N o d e s , o = i [ n ] ; i f ( F o ( o ) ) r e t u r n o . d a t a = q o + o . d a t a , o ; { c o n s t o = t . c r e a t e T e x t N o d e ( q o ) ; r e t u r n A r r a y . i s A r r a y ( e ) ? i . s p l i c e ( n , 0 , o ) : Z o ( e , n , o ) , o } } f u n c t i o n e r ( t , e ) { r e t u r n Y o ( t ) & & Y o ( e ) & & ! F o ( t ) & & ! F o ( e ) & & t . t a g N a m e . t o L o w e r C a s e ( ) = = = e . t a g N a m e . t o L o w e r C a s e ( ) } f u n c t i o n n r ( t , e , n ) { r e t u r n e = = = n | | ( F o ( e ) & & F o ( n ) ? e . d a t a = = = n . d a t a : ! ( ! t . i s B l o c k F i l l e r ( e ) | | ! t . i s B l o c k F i l l e r ( n ) ) ) } d i ( X o , H i ) ; v a r i r = { w i n d o w : w i n d o w , d o c u m e n t : d o c u m e n t } ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n o r ( t ) { l e t e = 0 ; f o r ( ; t . p r e v i o u s S i b l i n g ; ) t = t . p r e v i o u s S i b l i n g , e + + ; r e t u r n e }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n r r ( t ) { c o n s t e = [ ] ; f o r ( ; t & & t . n o d e T y p e ! = N o d e . D O C U M E N T _ N O D E ; ) e . u n s h i f t ( t ) , t = t . p a r e n t N o d e ; r e t u r n e }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const sr = Lo ( document ) ; class ar { constructor ( t = { } ) { this . blockFillerMode = t . blockFillerMode || "br" , this . preElements = [ "pre" ] , this . blockElements = [ "p" , "div" , "h1" , "h2" , "h3" , "h4" , "h5" , "h6" , "li" , "dd" , "dt" , "figcaption" ] , this . _blockFiller = "br" == this . blockFillerMode ? Lo : Bo , this . _domToViewMapping = new WeakMap , this . _viewToDomMapping = new WeakMap , this . _fakeSelectionMapping = new WeakMap } bindFakeSelection ( t , e ) { this . _fakeSelectionMapping . set ( t , new oo ( e ) ) } fakeSelectionToView ( t ) { return this . _fakeSelectionMapping . get ( t ) } bindElements ( t , e ) { this . _domToViewMapping . set ( t , e ) , this . _viewToDomMapping . set ( e , t ) } unbindDomElement ( t ) { const e = this . _domToViewMapping . get ( t ) ; if ( e ) { this . _domToViewMapping . delete ( t ) , this . _viewToDomMapping . delete ( e ) ; for ( const e of Array . from ( t . childNodes ) ) this . unbindDomElement ( e ) } } bindDocumentFragments ( t , e ) { this . _domToViewMapping . set ( t , e ) , this . _viewToDomMapping . set ( e , t ) } viewToDom ( t , e , n = { } ) { if ( t . is ( "text" ) ) { const n = this . _processDataFromViewText ( t ) ; return e . createTextNode ( n ) } { if ( this . mapViewToDom ( t ) ) return this . mapViewToDom ( t ) ; let i ; if ( t . is ( "documentFragment" ) ) i = e . createDocumentFragment ( ) , n . bind && this . bindDocumentFragments ( i , t ) ; else { if ( t . is ( "uiElement" ) ) return i = t . render ( e ) , n . bind && this . bindElements ( i , t ) , i ; i = t . hasAttribute ( "xmlns" ) ? e . createElementNS ( t . getAttribute ( "xmlns" ) , t . name ) : e . createElement ( t . name ) , n . bind && this . bindElements ( i , t ) ; for ( const e of t . getAttributeKeys ( ) ) i . setAttribute ( e , t . getAttribute ( e ) ) } if ( n . withChildren || void 0 === n . withChildren ) for ( const o of this . viewChildrenToDom ( t , e , n ) ) i . appendChild ( o ) ; return i } } * viewChildrenToDom ( t , e , n = { } ) { const i = t . getFillerOffset && t . getFillerOffset ( ) ; let o = 0 ; for ( const r of t . getChildren ( ) ) i === o && ( yield this . _blockFiller ( e ) ) , yield this . viewToDom ( r , e , n ) , o ++ ; i === o && ( yield this . _blockFiller ( e ) ) } viewRangeToDom ( t ) { const e = this . viewPositionToDom ( t . start ) , n = this . viewPositionToDom ( t . end ) , i = document . createRange ( ) ; return i . setStart ( e . parent , e . offset ) , i . setEnd ( n . parent , n . offset ) , i } viewPositionToDom ( t ) { const e = t . parent ; if ( e . is ( "text" ) ) { const n = this . findCorrespondingDomText ( e ) ; if ( ! n ) return null ; let i = t . offset ; return jo ( n ) && ( i += zo ) , { parent : n , offset : i } } { let n , i , o ; if ( 0 === t . offset ) { if ( ! ( n = this . mapViewToDom ( e ) ) ) return null ; o = n . childNodes [ 0 ] } else { const e = t . nodeBefore ; if ( ! ( i = e . is ( "text" ) ? this . findCorrespondingDomText ( e ) : this . mapViewToDom ( t . nodeBefore ) ) ) return null ; n = i . parentNode , o = i . nextSibling } if ( Fo ( o ) && jo ( o ) ) return { parent : o , offset : zo } ; return { parent : n , offset : i ? or ( i ) + 1 : 0 } } } domToView ( t , e = { } ) { if ( this . isBlockFiller ( t , this . blockFillerMode ) ) return null ; const n = this . getParentUIElement ( t , this . _domToViewMapping ) ; if ( n ) return n ; if ( Fo ( t ) ) { if ( Ho ( t ) ) return null ; { const e = this . _processDataFromDomText ( t ) ; return "" === e ? null : new mi ( e ) } } if ( this . isComment ( t ) ) return null ; { if ( this . mapDomToView ( t ) ) return this . mapDomToView ( t ) ; let n ; if ( this . isDocumentFragment ( t ) ) n = new Po , e . bind && this . bindDocumentFragments ( t , n ) ; else { const i = e . keepOriginalCase ? t . tagName : t . tagName . toLowerCase ( ) ; n = new vi ( i ) , e . bind && this . bindElements ( t , n ) ; const o = t . attributes ; for ( let t = o . length - 1 ; t >= 0 ; t -- ) n . _setAttribute ( o [ t ] . name , o [ t ] . value ) } if ( e . withChildren || void 0 === e . withChildren ) for ( const i of this . domChildrenToView ( t , e ) ) n . _appendChild ( i ) ; return n } } * domChildrenToView ( t , e = { } ) { for ( let n = 0 ; n < t . childNodes . length ; n ++ ) { const i = t . childNodes [ n ] , o = this . domToView ( i , e ) ; null !== o && ( yield o ) } } domSelectionToView ( t ) { if ( 1 === t . rangeCount ) { let e = t . getRangeAt ( 0 ) . startContainer ; Fo ( e ) && ( e = e . parentNode ) ; const n = this . fakeSelectionToView ( e ) ; if ( n ) return n } const e = this . isDomSelectionBackward ( t ) , n = [ ] ; for ( let e = 0 ; e < t . rangeCount ; e ++ ) { const i = t . getRangeAt ( e ) , o = this . domRangeToView ( i ) ; o && n . push ( o ) } return new oo ( n , { backward : e } ) } domRangeToView ( t ) { const e = this . domPositionToView ( t . startContainer , t . startOffset ) , n = this . domPositionToView ( t . endContainer , t . endOffset ) ; return e && n ? new eo ( e , n ) : null } domPositionToView ( t , e ) { if ( this . isBlockFiller ( t , this . blockFillerMode ) ) return this . domPositionToView ( t . parentNode , or ( t ) ) ; const n = this . mapDomToView ( t ) ; if ( n && n . is ( "uiElement" ) ) return to . _createBefore ( n ) ; if ( Fo ( t ) ) { if ( Ho ( t ) ) return this . domPositionToView ( t . parentNode , or ( t ) ) ; const n = this . findCorrespondingViewText ( t ) ; let i = e ; return
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /(t,e)&&1===t.parentNode.childNodes.length}(t,this.blockElements)}isDomSelectionBackward(t){if(t.isCollapsed)return!1;const e=document.createRange();e.setStart(t.anchorNode,t.anchorOffset),e.setEnd(t.focusNode,t.focusOffset);const n=e.collapsed;return e.detach(),n}getParentUIElement(t){const e=rr(t);for(e.pop();e.length;){const t=e.pop(),n=this._domToViewMapping.get(t);if(n&&n.is("uiElement"))return n}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}_isDomSelectionPositionCorrect(t,e){if(Fo(t)&&jo(t)&&e<zo)return!1;if(this.isElement(t)&&jo(t.childNodes[e]))return!1;const n=this.mapDomToView(t);return!n||!n.is("uiElement")}_processDataFromViewText(t){let e=t.data;if(t.getAncestors().some(t=>this.preElements.includes(t.name)))return e;if(" "==e.charAt(0)){const n=this._getTouchingViewTextNode(t,!1);!(n&&this._nodeEndsWithSpace(n))&&n||(e=" "+e.substr(1))}if(" "==e.charAt(e.length-1)){const n=this._getTouchingViewTextNode(t,!0);" "!=e.charAt(e.length-2)&&n&&" "!=n.data.charAt(0)||(e=e.substr(0,e.length-1)+" ")}return e.replace(/ { 2 } / g , " " ) } _nodeEndsWithSpace ( t ) { if ( t . getAncestors ( ) . some ( t => this . preElements . includes ( t . name ) ) ) return ! 1 ; const e = this . _processDataFromViewText ( t ) ; return " " == e . charAt ( e . length - 1 ) } _processDataFromDomText ( t ) { let e = t . data ; if ( cr ( t , this . preElements ) ) return Uo ( t ) ; e = e . replace ( /[ \n\t\r]{1,}/g , " " ) ; const n = this . _getTouchingInlineDomNode ( t , ! 1 ) , i = this . _getTouchingInlineDomNode ( t , ! 0 ) , o = this . _checkShouldLeftTrimDomText ( n ) , r = this . _checkShouldRightTrimDomText ( t , i ) ; return o && ( e = e . replace ( /^ / , "" ) ) , r && ( e = e . replace ( / $/ , "" ) ) , e = ( e = Uo ( new Text ( e ) ) ) . replace ( / \u00A0/g , " " ) , ( /( |\u00A0)\u00A0$/ . test ( e ) || ! i || i . data && " " == i . data . charAt ( 0 ) ) && ( e = e . replace ( /\u00A0$/ , " " ) ) , o && ( e = e . replace ( /^\u00A0/ , " " ) ) , e } _checkShouldLeftTrimDomText ( t ) { return ! t || ( ! ! Gn ( t ) || /[^\S\u00A0]/ . test ( t . data . charAt ( t . data . length - 1 ) ) ) } _checkShouldRightTrimDomText ( t , e ) { return ! e && ! jo ( t ) } _getTouchingViewTextNode ( t , e ) { const n = new Xi ( { startPosition : e ? to . _createAfter ( t ) : to . _createBefore ( t ) , direction : e ? "forward" : "backward" } ) ; for ( const t of n ) { if ( t . item . is ( "containerElement" ) ) return null ; if ( t . item . is ( "br" ) ) return null ; if ( t . item . is ( "textProxy" ) ) return t . item } return null } _getTouchingInlineDomNode ( t , e ) { if ( ! t . parentNode ) return null ; const n = e ? "nextNode" : "previousNode" , i = t . ownerDocument , o = rr ( t ) [ 0 ] , r = i . createTreeWalker ( o , NodeFilter . SHOW _TEXT | NodeFilter . SHOW _ELEMENT , { acceptNode : t => Fo ( t ) ? NodeFilter . FILTER _ACCEPT : "BR" == t . tagName ? NodeFilter . FILTER _ACCEPT : NodeFilter . FILTER _SKIP } ) ; r . currentNode = t ; const s = r [ n ] ( ) ; if ( null !== s ) { const e = function ( t , e ) { const n = rr ( t ) , i = rr ( e ) ; let o = 0 ; for ( ; n [ o ] == i [ o ] && n [ o ] ; ) o ++ ; return 0 === o ? null : n [ o - 1 ] } ( t , s ) ; if ( e && ! cr ( t , this . blockElements , e ) && ! cr ( s , this . blockElements , e ) ) return s } return null } } function cr ( t , e , n ) { let i = rr ( t ) ; return n && ( i = i . slice ( i . indexOf ( n ) + 1 ) ) , i . some ( t => t . tagName && e . includes ( t . tagName . toLowerCase ( ) ) ) } function lr ( t , e ) { for ( ; t && t != ir . document ; ) e ( t ) , t = t . parentNode } function dr ( t ) { const e = Object . prototype . toString . apply ( t ) ; return "[object Window]" == e || "[object global]" == e }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / v a r u r = B i ( { } , i i , { l i s t e n T o ( t , . . . e ) { i f ( Y o ( t ) | | d r ( t ) ) { c o n s t n = t h i s . _ g e t P r o x y E m i t t e r ( t ) | | n e w h r ( t ) ; n . a t t a c h ( . . . e ) , t = n } i i . l i s t e n T o . c a l l ( t h i s , t , . . . e ) } , s t o p L i s t e n i n g ( t , e , n ) { i f ( Y o ( t ) | | d r ( t ) ) { c o n s t e = t h i s . _ g e t P r o x y E m i t t e r ( t ) ; i f ( ! e ) r e t u r n ; t = e } i i . s t o p L i s t e n i n g . c a l l ( t h i s , t , e , n ) , t i n s t a n c e o f h r & & t . d e t a c h ( e ) } , _ g e t P r o x y E m i t t e r ( t ) { r e t u r n e = t h i s , n = f r ( t ) , e [ e i ] & & e [ e i ] [ n ] ? e [ e i ] [ n ] . e m i t t e r : n u l l ; v a r e , n } } ) ; c l a s s h r { c o n s t r u c t o r ( t ) { o i ( t h i s , f r ( t ) ) , t h i s . _ d o m N o d e = t } } f u n c t i o n f r ( t ) { r e t u r n t [ " d a t a - c k - e x p a n d o " ] | | ( t [ " d a t a - c k - e x p a n d o " ] = X n ( ) ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / B i ( h r . p r o t o t y p e , i i , { a t t a c h ( t , e , n = { } ) { i f ( t h i s . _ d o m L i s t e n e r s & & t h i s . _ d o m L i s t e n e r s [ t ] ) r e t u r n ; c o n s t i = t h i s . _ c r e a t e D o m L i s t e n e r ( t , ! ! n . u s e C a p t u r e ) ; t h i s . _ d o m N o d e . a d d E v e n t L i s t e n e r ( t , i , ! ! n . u s e C a p t u r e ) , t h i s . _ d o m L i s t e n e r s | | ( t h i s . _ d o m L i s t e n e r s = { } ) , t h i s . _ d o m L i s t e n e r s [ t ] = i } , d e t a c h ( t ) { l e t e ; ! t h i s . _ d o m L i s t e n e r s [ t ] | | ( e = t h i s . _ e v e n t s [ t ] ) & & e . c a l l b a c k s . l e n g t h | | t h i s . _ d o m L i s t e n e r s [ t ] . r e m o v e L i s t e n e r ( ) } , _ c r e a t e D o m L i s t e n e r ( t , e ) { c o n s t n = e = > { t h i s . f i r e ( t , e ) } ; r e t u r n n . r e m o v e L i s t e n e r = ( ) = > { t h i s . _ d o m N o d e . r e m o v e E v e n t L i s t e n e r ( t , n , e ) , d e l e t e t h i s . _ d o m L i s t e n e r s [ t ] } , n } } ) ; c l a s s p r { c o n s t r u c t o r ( t ) { t h i s . v i e w = t , t h i s . d o c u m e n t = t . d o c u m e n t , t h i s . i s E n a b l e d = ! 1 } e n a b l e ( ) { t h i s . i s E n a b l e d = ! 0 } d i s a b l e ( ) { t h i s . i s E n a b l e d = ! 1 } d e s t r o y ( ) { t h i s . d i s a b l e ( ) , t h i s . s t o p L i s t e n i n g ( ) } } d i ( p r , u r ) ; v a r m r = " _ _ l o d a s h _ h a s h _ u n d e f i n e d _ _ " ; v a r g r = f u n c t i o n ( t ) { r e t u r n t h i s . _ _ d a t a _ _ . s e t ( t , m r ) , t h i s } ; v a r b r = f u n c t i o n ( t ) { r e t u r n t h i s . _ _ d a t a _ _ . h a s ( t ) } ; f u n c t i o n w r ( t ) { v a r e = - 1 , n = n u l l = = t ? 0 : t . l e n g t h ; f o r ( t h i s . _ _ d a t a _ _ = n e w S t ; + + e < n ; ) t h i s . a d d ( t [ e ] ) } w r . p r o t o t y p e . a d d = w r . p r o t o t y p e . p u s h = g r , w r . p r o t o t y p e . h a s = b r ; v a r k r = w r ; v a r _ r = f u n c t i o n ( t , e ) { f o r ( v a r n = - 1 , i = n u l l = = t ? 0 : t . l e n g t h ; + + n < i ; ) i f ( e ( t [ n ] , n , t ) ) r e t u r n ! 0 ; r e t u r n ! 1 } ; v a r v r = f u n c t i o n ( t , e ) { r e t u r n t . h a s ( e ) } , y r = 1 , x r = 2 ; v a r C r = f u n c t i o n ( t , e , n , i , o , r ) { v a r s = n & y r , a = t . l e n g t h , c = e . l e n g t h ; i f ( a ! = c & & ! ( s & & c > a ) ) r e t u r n ! 1 ; v a r l = r . g e t ( t ) ; i f ( l & & r . g e t ( e ) ) r e t u r n l = = e ; v a r d = - 1 , u = ! 0 , h = n & x r ? n e w k r : v o i d 0 ; f o r ( r . s e t ( t , e ) , r . s e t ( e , t ) ; + + d < a ; ) { v a r f = t [ d ] , p = e [ d ] ; i f ( i ) v a r m = s ? i ( p , f , d , e , t , r ) : i ( f , p , d , t , e , r ) ; i f ( v o i d 0 ! = = m ) { i f ( m ) c o n t i n u e ; u = ! 1 ; b r e a k } i f ( h ) { i f ( ! _ r ( e , ( f u n c t i o n ( t , e ) { i f ( ! v r ( h , e ) & & ( f = = = t | | o ( f , t , n , i , r ) ) ) r e t u r n h . p u s h ( e ) } ) ) ) { u = ! 1 ; b r e a k } } e l s e i f ( f ! = = p & & ! o ( f , p , n , i , r ) ) { u = ! 1 ; b r e a k } } r e t u r n r . d e l e t e ( t ) , r . d e l e t e ( e ) , u } ; v a r A r = f u n c t i o n ( t ) { v a r e = - 1 , n = A r r a y ( t . s i z e ) ; r e t u r n t . f o r E a c h ( ( f u n c t i o n ( t , i ) { n [ + + e ] = [ i , t ] } ) ) , n } ; v a r P r = f u n c t i o n ( t ) { v a r e = - 1 , n = A r r a y ( t . s i z e ) ; r e t u r n t . f o r E a c h ( ( f u n c t i o n ( t ) { n [ + + e ] = t } ) ) , n } , T r = 1 , E r = 2 , S r = " [ o b j e c t B o o l e a n ] " , R r = " [ o b j e c t D a t e ] " , I r = " [ o b j e c t E r r o r ] " , O r = " [ o b j e c t M a p ] " , D r = " [ o b j e c t N u m b e r ] " , M r = " [ o b j e c t R e g E x p ] " , N r = " [ o b j e c t S e t ] " , V r = " [ o b j e c t S t r i n g ] " , F r = " [ o b j e c t S y m b o l ] " , B r = " [ o b j e c t A r r a y B u f f e r ] " , L r = " [ o b j e c t D a t a V i e w ] " , z r = o ? o . p r o t o t y p e : v o i d 0 , q r = z r ? z r . v a l u e O f : v o i d 0 ; v a r j r = f u n c t i o n ( t , e , n , i , o , r , s ) { s w i t c h ( n ) { c a s e L r : i f ( t . b y t e L e n g t h ! = e . b y t e L e n g t h | | t . b y t e O f f s e t ! = e . b y t e O f f s e t ) r e t u r n ! 1 ; t = t . b u f f e r , e = e . b u f f e r ; c a s e B r : r e t u r n ! ( t . b y t e L e n g t h ! = e . b y t e L e n g t h | | ! r ( n e w K e ( t ) , n e w K e ( e ) ) ) ; c a s e S r : c a s e R r : c a s e D r : r e t u r n E ( + t , + e ) ; c a s e I r : r e t u r n t . n a m e = = e . n a m e & & t . m e s s a g e = = e . m e s s a g e ; c a s e M r : c a s e V r : r e t u r n t = = e + " " ; c a s e O r : v a r a = A r ; c a s e N r : v a r c = i & T r ; i f ( a | | ( a = P r ) , t . s i z e ! = e . s i z e & & ! c ) r e t u r n ! 1 ; v a r l = s . g e t ( t ) ; i f ( l ) r e t u r n l = = e ; i | = E r , s . s e t ( t , e ) ; v a r d = C r ( a ( t ) , a ( e ) , i , o , r , s ) ; r e t u r n s . d e l e t e ( t ) , d ; c a s e F r : i f ( q r ) r e t u r n q r . c a l l ( t ) = = q r . c a l l ( e ) } r e t u r n ! 1 } , H r = 1 , U r = O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y ; v a r $ r = f u n c t i o n ( t , e , n , i , o , r ) { v a r s = n & H r , a = D e ( t ) , c = a . l e n g t h ; i f ( c ! = D e ( e ) . l e n g t h & & ! s ) r e t u r n ! 1 ; f o r ( v a r l = c ; l - - ; ) { v a r d = a [ l ] ; i f ( ! ( s ? d i n e : U r . c a l l ( e , d ) ) ) r e t u r n ! 1 } v a r u = r . g e t ( t ) ; i f ( u & & r . g e t ( e ) ) r e t u r n u = = e ; v a r h = ! 0 ; r . s e t ( t , e ) , r . s e t ( e , t ) ; f o r ( v a r f = s ; + + l < c ; ) { v a r p = t [ d = a [ l ] ] , m = e [ d ] ; i f ( i ) v a r g = s ? i ( m , p , d , e , t , r ) : i ( p , m , d , t , e , r ) ; i f ( ! ( v o i d 0 = = = g ? p = = = m | | o ( p , m , n , i , r ) : g ) ) { h = ! 1 ; b r e a k } f | | ( f = " c o n s t r u c t o r " = = d ) } i f ( h & & ! f ) { v a r b = t . c o n s t r u c t o r , w = e . c o n s t r u c t o r ; b ! = w & & " c o n s t r u c t o r " i n t & & " c o n s t r u c t o r " i n e & & ! ( " f u n c t i o n " = = t y p e o f b & & b i n s t a n c e o f b & & " f u n c t i o n " = = t y p e o f w & & w i n s t a n c e o f w ) & & ( h = ! 1 ) } r e t u r n r . d e l e t e ( t ) , r . d e l e t e ( e ) , h } , W r = 1 , G r = " [ o b j e c t A r g u m e n t s ] " , K r = " [ o b j e c t A r r a y ] " , J r = " [ o b j e c t O b j e c t ] " , Z r = O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y ; v a r Q r = f u n c t i o n ( t , e , n , i , o , r ) { v a r s = G t ( t ) , a = G t ( e ) , c = s ? K r : $ e ( t ) , l = a ? K r : $ e ( e ) , d = ( c = c = = G r ? J r : c ) = = J r , u = ( l = l = = G r ? J r : l ) = = J r , h = c = = l ; i f ( h & & O b j e c t ( K t . a ) ( t ) ) { i f ( ! O b j e c t ( K t . a ) ( e ) ) r e t u r n ! 1 ; s = ! 0 , d = ! 1 } i f ( h & & ! d ) r e t u r n r | | ( r = n e w D t ) , s | | r e ( t ) ? C r ( t , e , n , i , o , r ) : j r ( t , e , c , n , i , o , r ) ; i f ( ! ( n & W r ) ) { v a r f = d & & Z r . c a l l ( t , " _ _ w r a p p e d _ _ " ) , p = u & & Z r . c a l l ( e , " _ _ w r a p p e d _ _ " ) ; i f ( f | | p ) { v a r m = f ? t . v a l u e ( ) : t , g = p ? e . v a l u e ( ) : e ; r e t u r n r | | ( r = n e w D t ) , o ( m , g , n , i , r ) } } r e t u r n ! ! h & & ( r | | ( r = n e w D t ) , $ r ( t , e , n , i , o , r ) ) } ; v a r Y r = f u n c t i o n t ( e , n , i , o , r ) { r e t u r n e = = = n | | ( n u l l = = e | | n u l l = = n | | ! w ( e ) & & ! w ( n ) ? e ! = e & & n ! = n : Q r ( e , n , i , o , t , r ) ) } ; v a r X r = f u n c t i o n ( t , e , n ) { v a r i = ( n = " f u n c t i o n " = = t y p e o f n ? n : v o i d 0 ) ? n ( t , e ) : v o i d 0 ; r e t u r n v o i d 0 = = = i ? Y r ( t , e , v o i
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s t s e x t e n d s p r { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . _ c o n f i g = { c h i l d L i s t : ! 0 , c h a r a c t e r D a t a : ! 0 , c h a r a c t e r D a t a O l d V a l u e : ! 0 , s u b t r e e : ! 0 } , t h i s . d o m C o n v e r t e r = t . d o m C o n v e r t e r , t h i s . r e n d e r e r = t . _ r e n d e r e r , t h i s . _ d o m E l e m e n t s = [ ] , t h i s . _ m u t a t i o n O b s e r v e r = n e w w i n d o w . M u t a t i o n O b s e r v e r ( t h i s . _ o n M u t a t i o n s . b i n d ( t h i s ) ) } f l u s h ( ) { t h i s . _ o n M u t a t i o n s ( t h i s . _ m u t a t i o n O b s e r v e r . t a k e R e c o r d s ( ) ) } o b s e r v e ( t ) { t h i s . _ d o m E l e m e n t s . p u s h ( t ) , t h i s . i s E n a b l e d & & t h i s . _ m u t a t i o n O b s e r v e r . o b s e r v e ( t , t h i s . _ c o n f i g ) } e n a b l e ( ) { s u p e r . e n a b l e ( ) ; f o r ( c o n s t t o f t h i s . _ d o m E l e m e n t s ) t h i s . _ m u t a t i o n O b s e r v e r . o b s e r v e ( t , t h i s . _ c o n f i g ) } d i s a b l e ( ) { s u p e r . d i s a b l e ( ) , t h i s . _ m u t a t i o n O b s e r v e r . d i s c o n n e c t ( ) } d e s t r o y ( ) { s u p e r . d e s t r o y ( ) , t h i s . _ m u t a t i o n O b s e r v e r . d i s c o n n e c t ( ) } _ o n M u t a t i o n s ( t ) { i f ( 0 = = = t . l e n g t h ) r e t u r n ; c o n s t e = t h i s . d o m C o n v e r t e r , n = n e w M a p , i = n e w S e t ; f o r ( c o n s t n o f t ) i f ( " c h i l d L i s t " = = = n . t y p e ) { c o n s t t = e . m a p D o m T o V i e w ( n . t a r g e t ) ; i f ( t & & t . i s ( " u i E l e m e n t " ) ) c o n t i n u e ; t & & ! t h i s . _ i s B o g u s B r M u t a t i o n ( n ) & & i . a d d ( t ) } f o r ( c o n s t o o f t ) { c o n s t t = e . m a p D o m T o V i e w ( o . t a r g e t ) ; i f ( ( ! t | | ! t . i s ( " u i E l e m e n t " ) ) & & " c h a r a c t e r D a t a " = = = o . t y p e ) { c o n s t t = e . f i n d C o r r e s p o n d i n g V i e w T e x t ( o . t a r g e t ) ; t & & ! i . h a s ( t . p a r e n t ) ? n . s e t ( t , { t y p e : " t e x t " , o l d T e x t : t . d a t a , n e w T e x t : U o ( o . t a r g e t ) , n o d e : t } ) : ! t & & j o ( o . t a r g e t ) & & i . a d d ( e . m a p D o m T o V i e w ( o . t a r g e t . p a r e n t N o d e ) ) } } c o n s t o = [ ] ; f o r ( c o n s t t o f n . v a l u e s ( ) ) t h i s . r e n d e r e r . m a r k T o S y n c ( " t e x t " , t . n o d e ) , o . p u s h ( t ) ; f o r ( c o n s t t o f i ) { c o n s t n = e . m a p V i e w T o D o m ( t ) , i = A r r a y . f r o m ( t . g e t C h i l d r e n ( ) ) , r = A r r a y . f r o m ( e . d o m C h i l d r e n T o V i e w ( n , { w i t h C h i l d r e n : ! 1 } ) ) ; X r ( i , r , a ) | | ( t h i s . r e n d e r e r . m a r k T o S y n c ( " c h i l d r e n " , t ) , o . p u s h ( { t y p e : " c h i l d r e n " , o l d C h i l d r e n : i , n e w C h i l d r e n : r , n o d e : t } ) ) } c o n s t r = t [ 0 ] . t a r g e t . o w n e r D o c u m e n t . g e t S e l e c t i o n ( ) ; l e t s = n u l l ; i f ( r & & r . a n c h o r N o d e ) { c o n s t t = e . d o m P o s i t i o n T o V i e w ( r . a n c h o r N o d e , r . a n c h o r O f f s e t ) , n = e . d o m P o s i t i o n T o V i e w ( r . f o c u s N o d e , r . f o c u s O f f s e t ) ; t & & n & & ( s = n e w o o ( t ) ) . s e t F o c u s ( n ) } f u n c t i o n a ( t , e ) { i f ( ! A r r a y . i s A r r a y ( t ) ) r e t u r n t = = = e | | ! ( ! t . i s ( " t e x t " ) | | ! e . i s ( " t e x t " ) ) & & t . d a t a = = = e . d a t a } t h i s . d o c u m e n t . f i r e ( " m u t a t i o n s " , o , s ) , t h i s . v i e w . f o r c e R e n d e r ( ) } _ i s B o g u s B r M u t a t i o n ( t ) { l e t e = n u l l ; r e t u r n n u l l = = = t . n e x t S i b l i n g & & 0 = = = t . r e m o v e d N o d e s . l e n g t h & & 1 = = t . a d d e d N o d e s . l e n g t h & & ( e = t h i s . d o m C o n v e r t e r . d o m T o V i e w ( t . a d d e d N o d e s [ 0 ] , { w i t h C h i l d r e n : ! 1 } ) ) , e & & e . i s ( " e l e m e n t " , " b r " ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s e s { c o n s t r u c t o r ( t , e , n ) { t h i s . v i e w = t , t h i s . d o c u m e n t = t . d o c u m e n t , t h i s . d o m E v e n t = e , t h i s . d o m T a r g e t = e . t a r g e t , B i ( t h i s , n ) } g e t t a r g e t ( ) { r e t u r n t h i s . v i e w . d o m C o n v e r t e r . m a p D o m T o V i e w ( t h i s . d o m T a r g e t ) } p r e v e n t D e f a u l t ( ) { t h i s . d o m E v e n t . p r e v e n t D e f a u l t ( ) } s t o p P r o p a g a t i o n ( ) { t h i s . d o m E v e n t . s t o p P r o p a g a t i o n ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s n s e x t e n d s p r { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . u s e C a p t u r e = ! 1 } o b s e r v e ( t ) { ( " s t r i n g " = = t y p e o f t h i s . d o m E v e n t T y p e ? [ t h i s . d o m E v e n t T y p e ] : t h i s . d o m E v e n t T y p e ) . f o r E a c h ( e = > { t h i s . l i s t e n T o ( t , e , ( t , e ) = > { t h i s . i s E n a b l e d & & t h i s . o n D o m E v e n t ( e ) } , { u s e C a p t u r e : t h i s . u s e C a p t u r e } ) } ) } f i r e ( t , e , n ) { t h i s . i s E n a b l e d & & t h i s . d o c u m e n t . f i r e ( t , n e w e s ( t h i s . v i e w , e , n ) ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /class is extends ns{constructor(t){super(t),this.domEventType=["keydown","keyup"]}onDomEvent(t){this.fire(t.type,t,{keyCode:t.keyCode,altKey:t.altKey,ctrlKey:t.ctrlKey||t.metaKey,shiftKey:t.shiftKey,get keystroke(){return _o(this)}})}}var os=function(){return i.a.Date.now()},rs="[object Symbol]";var ss=function(t){return"symbol"==typeof t||w(t)&&m(t)==rs},as=NaN,cs=/ ^ \ s + | \ s + $ / g , ls = /^[-+]0x[0-9a-f]+$/i , ds = /^0b[01]+$/i , us = /^0o[0-7]+$/i , hs = parseInt ; var fs = function ( t ) { if ( "number" == typeof t ) return t ; if ( ss ( t ) ) return as ; if ( q ( t ) ) { var e = "function" == typeof t . valueOf ? t . valueOf ( ) : t ; t = q ( e ) ? e + "" : e } if ( "string" != typeof t ) return 0 === t ? t : + t ; t = t . replace ( cs , "" ) ; var n = ds . test ( t ) ; return n || us . test ( t ) ? hs ( t . slice ( 2 ) , n ? 2 : 8 ) : ls . test ( t ) ? as : + t } , ps = "Expected a function" , ms = Math . max , gs = Math . min ; var bs = function ( t , e , n ) { var i , o , r , s , a , c , l = 0 , d = ! 1 , u = ! 1 , h = ! 0 ; if ( "function" != typeof t ) throw new TypeError ( ps ) ; function f ( e ) { var n = i , r = o ; return i = o = void 0 , l = e , s = t . apply ( r , n ) } function p ( t ) { var n = t - c ; return void 0 === c || n >= e || n < 0 || u && t - l >= r } function m ( ) { var t = os ( ) ; if ( p ( t ) ) return g ( t ) ; a = setTimeout ( m , function ( t ) { var n = e - ( t - c ) ; return u ? gs ( n , r - ( t - l ) ) : n } ( t ) ) } function g ( t ) { return a = void 0 , h && i ? f ( t ) : ( i = o = void 0 , s ) } function b ( ) { var t = os ( ) , n = p ( t ) ; if ( i = arguments , o = this , c = t , n ) { if ( void 0 === a ) return function ( t ) { return l = t , a = setTimeout ( m , e ) , d ? f ( t ) : s } ( c ) ; if ( u ) return clearTimeout ( a ) , a = setTimeout ( m , e ) , f ( c ) } return void 0 === a && ( a = setTimeout ( m , e ) ) , s } return e = fs ( e ) || 0 , q ( n ) && ( d = ! ! n . leading , r = ( u = "maxWait" in n ) ? ms ( fs ( n . maxWait ) || 0 , e ) : r , h = "trailing" in n ? ! ! n . trailing : h ) , b . cancel = function ( ) { void 0 !== a && clearTimeout ( a ) , l = 0 , i = c = o = a = void 0 } , b . flush = function ( ) { return void 0 === a ? s : g ( os ( ) ) } , b } ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s w s e x t e n d s p r { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . _ f i r e S e l e c t i o n C h a n g e D o n e D e b o u n c e d = b s ( t = > t h i s . d o c u m e n t . f i r e ( " s e l e c t i o n C h a n g e D o n e " , t ) , 2 0 0 ) } o b s e r v e ( ) { c o n s t t = t h i s . d o c u m e n t ; t . o n ( " k e y d o w n " , ( e , n ) = > { t . s e l e c t i o n . i s F a k e & & f u n c t i o n ( t ) { r e t u r n t = = k o . a r r o w r i g h t | | t = = k o . a r r o w l e f t | | t = = k o . a r r o w u p | | t = = k o . a r r o w d o w n }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( n . k e y C o d e ) & & t h i s . i s E n a b l e d & & ( n . p r e v e n t D e f a u l t ( ) , t h i s . _ h a n d l e S e l e c t i o n M o v e ( n . k e y C o d e ) ) } , { p r i o r i t y : " l o w e s t " } ) } d e s t r o y ( ) { s u p e r . d e s t r o y ( ) , t h i s . _ f i r e S e l e c t i o n C h a n g e D o n e D e b o u n c e d . c a n c e l ( ) } _ h a n d l e S e l e c t i o n M o v e ( t ) { c o n s t e = t h i s . d o c u m e n t . s e l e c t i o n , n = n e w o o ( e . g e t R a n g e s ( ) , { b a c k w a r d : e . i s B a c k w a r d , f a k e : ! 1 } ) ; t ! = k o . a r r o w l e f t & & t ! = k o . a r r o w u p | | n . s e t T o ( n . g e t F i r s t P o s i t i o n ( ) ) , t ! = k o . a r r o w r i g h t & & t ! = k o . a r r o w d o w n | | n . s e t T o ( n . g e t L a s t P o s i t i o n ( ) ) ; c o n s t i = { o l d S e l e c t i o n : e , n e w S e l e c t i o n : n , d o m S e l e c t i o n : n u l l } ; t h i s . d o c u m e n t . f i r e ( " s e l e c t i o n C h a n g e " , i ) , t h i s . _ f i r e S e l e c t i o n C h a n g e D o n e D e b o u n c e d ( i ) } } c l a s s k s e x t e n d s p r { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . m u t a t i o n O b s e r v e r = t . g e t O b s e r v e r ( t s ) , t h i s . s e l e c t i o n = t h i s . d o c u m e n t . s e l e c t i o n , t h i s . d o m C o n v e r t e r = t . d o m C o n v e r t e r , t h i s . _ d o c u m e n t s = n e w W e a k S e t , t h i s . _ f i r e S e l e c t i o n C h a n g e D o n e D e b o u n c e d = b s ( t = > t h i s . d o c u m e n t . f i r e ( " s e l e c t i o n C h a n g e D o n e " , t ) , 2 0 0 ) , t h i s . _ c l e a r I n f i n i t e L o o p I n t e r v a l = s e t I n t e r v a l ( ( ) = > t h i s . _ c l e a r I n f i n i t e L o o p ( ) , 1 e 3 ) , t h i s . _ l o o p b a c k C o u n t e r = 0 } o b s e r v e ( t ) { c o n s t e = t . o w n e r D o c u m e n t ; t h i s . _ d o c u m e n t s . h a s ( e ) | | ( t h i s . l i s t e n T o ( e , " s e l e c t i o n c h a n g e " , ( ) = > { t h i s . _ h a n d l e S e l e c t i o n C h a n g e ( e ) } ) , t h i s . _ d o c u m e n t s . a d d ( e ) ) } d e s t r o y ( ) { s u p e r . d e s t r o y ( ) , c l e a r I n t e r v a l ( t h i s . _ c l e a r I n f i n i t e L o o p I n t e r v a l ) , t h i s . _ f i r e S e l e c t i o n C h a n g e D o n e D e b o u n c e d . c a n c e l ( ) } _ h a n d l e S e l e c t i o n C h a n g e ( t ) { i f ( ! t h i s . i s E n a b l e d | | ! t h i s . d o c u m e n t . i s F o c u s e d & & ! t h i s . d o c u m e n t . i s R e a d O n l y ) r e t u r n ; t h i s . m u t a t i o n O b s e r v e r . f l u s h ( ) ; c o n s t e = t . d e f a u l t V i e w . g e t S e l e c t i o n ( ) , n = t h i s . d o m C o n v e r t e r . d o m S e l e c t i o n T o V i e w ( e ) ; i f ( ! ( t h i s . s e l e c t i o n . i s E q u a l ( n ) & & t h i s . d o m C o n v e r t e r . i s D o m S e l e c t i o n C o r r e c t ( e ) | | + + t h i s . _ l o o p b a c k C o u n t e r > 6 0 ) ) i f ( t h i s . s e l e c t i o n . i s S i m i l a r ( n ) ) t h i s . v i e w . f o r c e R e n d e r ( ) ; e l s e { c o n s t t = { o l d S e l e c t i o n : t h i s . s e l e c t i o n , n e w S e l e c t i o n : n , d o m S e l e c t i o n : e } ; t h i s . d o c u m e n t . f i r e ( " s e l e c t i o n C h a n g e " , t ) , t h i s . _ f i r e S e l e c t i o n C h a n g e D o n e D e b o u n c e d ( t ) } } _ c l e a r I n f i n i t e L o o p ( ) { t h i s . _ l o o p b a c k C o u n t e r = 0 } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s _ s e x t e n d s n s { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . d o m E v e n t T y p e = [ " f o c u s " , " b l u r " ] , t h i s . u s e C a p t u r e = ! 0 ; c o n s t e = t h i s . d o c u m e n t ; e . o n ( " f o c u s " , ( ) = > { e . i s F o c u s e d = ! 0 , t h i s . _ r e n d e r T i m e o u t I d = s e t T i m e o u t ( ( ) = > t . f o r c e R e n d e r ( ) , 5 0 ) } ) , e . o n ( " b l u r " , ( n , i ) = > { c o n s t o = e . s e l e c t i o n . e d i t a b l e E l e m e n t ; n u l l ! = = o & & o ! = = i . t a r g e t | | ( e . i s F o c u s e d = ! 1 , t . f o r c e R e n d e r ( ) ) } ) } o n D o m E v e n t ( t ) { t h i s . f i r e ( t . t y p e , t ) } d e s t r o y ( ) { t h i s . _ r e n d e r T i m e o u t I d & & c l e a r T i m e o u t ( t h i s . _ r e n d e r T i m e o u t I d ) , s u p e r . d e s t r o y ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s v s e x t e n d s n s { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . d o m E v e n t T y p e = [ " c o m p o s i t i o n s t a r t " , " c o m p o s i t i o n u p d a t e " , " c o m p o s i t i o n e n d " ] ; c o n s t e = t h i s . d o c u m e n t ; e . o n ( " c o m p o s i t i o n s t a r t " , ( ) = > { e . i s C o m p o s i n g = ! 0 } ) , e . o n ( " c o m p o s i t i o n e n d " , ( ) = > { e . i s C o m p o s i n g = ! 1 } ) } o n D o m E v e n t ( t ) { t h i s . f i r e ( t . t y p e , t ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2018 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md .
* / c l a s s y s e x t e n d s n s { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . d o m E v e n t T y p e = [ " b e f o r e i n p u t " ] } o n D o m E v e n t ( t ) { t h i s . f i r e ( t . t y p e , t ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n x s ( t ) { r e t u r n " [ o b j e c t R a n g e ] " = = O b j e c t . p r o t o t y p e . t o S t r i n g . a p p l y ( t ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n C s ( t ) { c o n s t e = t . o w n e r D o c u m e n t . d e f a u l t V i e w . g e t C o m p u t e d S t y l e ( t ) ; r e t u r n { t o p : p a r s e I n t ( e . b o r d e r T o p W i d t h , 1 0 ) , r i g h t : p a r s e I n t ( e . b o r d e r R i g h t W i d t h , 1 0 ) , b o t t o m : p a r s e I n t ( e . b o r d e r B o t t o m W i d t h , 1 0 ) , l e f t : p a r s e I n t ( e . b o r d e r L e f t W i d t h , 1 0 ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t A s = [ " t o p " , " r i g h t " , " b o t t o m " , " l e f t " , " w i d t h " , " h e i g h t " ] ; c l a s s P s { c o n s t r u c t o r ( t ) { c o n s t e = x s ( t ) ; i f ( O b j e c t . d e f i n e P r o p e r t y ( t h i s , " _ s o u r c e " , { v a l u e : t . _ s o u r c e | | t , w r i t a b l e : ! 0 , e n u m e r a b l e : ! 1 } ) , G n ( t ) | | e ) T s ( t h i s , e ? P s . g e t D o m R a n g e R e c t s ( t ) [ 0 ] : t . g e t B o u n d i n g C l i e n t R e c t ( ) ) ; e l s e i f ( d r ( t ) ) { c o n s t { i n n e r W i d t h : e , i n n e r H e i g h t : n } = t ; T s ( t h i s , { t o p : 0 , r i g h t : e , b o t t o m : n , l e f t : 0 , w i d t h : e , h e i g h t : n } ) } e l s e T s ( t h i s , t ) } c l o n e ( ) { r e t u r n n e w P s ( t h i s ) } m o v e T o ( t , e ) { r e t u r n t h i s . t o p = e , t h i s . r i g h t = t + t h i s . w i d t h , t h i s . b o t t o m = e + t h i s . h e i g h t , t h i s . l e f t = t , t h i s } m o v e B y ( t , e ) { r e t u r n t h i s . t o p + = e , t h i s . r i g h t + = t , t h i s . l e f t + = t , t h i s . b o t t o m + = e , t h i s } g e t I n t e r s e c t i o n ( t ) { c o n s t e = { t o p : M a t h . m a x ( t h i s . t o p , t . t o p ) , r i g h t : M a t h . m i n ( t h i s . r i g h t , t . r i g h t ) , b o t t o m : M a t h . m i n ( t h i s . b o t t o m , t . b o t t o m ) , l e f t : M a t h . m a x ( t h i s . l e f t , t . l e f t ) } ; r e t u r n e . w i d t h = e . r i g h t - e . l e f t , e . h e i g h t = e . b o t t o m - e . t o p , e . w i d t h < 0 | | e . h e i g h t < 0 ? n u l l : n e w P s ( e ) } g e t I n t e r s e c t i o n A r e a ( t ) { c o n s t e = t h i s . g e t I n t e r s e c t i o n ( t ) ; r e t u r n e ? e . g e t A r e a ( ) : 0 } g e t A r e a ( ) { r e t u r n t h i s . w i d t h * t h i s . h e i g h t } g e t V i s i b l e ( ) { c o n s t t = t h i s . _ s o u r c e ; l e t e = t h i s . c l o n e ( ) ; i f ( ! E s ( t ) ) { l e t n = t . p a r e n t N o d e | | t . c o m m o n A n c e s t o r C o n t a i n e r ; f o r ( ; n & & ! E s ( n ) ; ) { c o n s t t = n e w P s ( n ) , i = e . g e t I n t e r s e c t i o n ( t ) ; i f ( ! i ) r e t u r n n u l l ; i . g e t A r e a ( ) < e . g e t A r e a ( ) & & ( e = i ) , n = n . p a r e n t N o d e } } r e t u r n e } i s E q u a l ( t ) { f o r ( c o n s t e o f A s ) i f ( t h i s [ e ] ! = = t [ e ] ) r e t u r n ! 1 ; r e t u r n ! 0 } c o n t a i n s ( t ) { c o n s t e = t h i s . g e t I n t e r s e c t i o n ( t ) ; r e t u r n ! ( ! e | | ! e . i s E q u a l ( t ) ) } e x c l u d e S c r o l l b a r s A n d B o r d e r s ( ) { c o n s t t = t h i s . _ s o u r c e ; l e t e , n , i ; i f ( d r ( t ) ) e = t . i n n e r W i d t h - t . d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t W i d t h , n = t . i n n e r H e i g h t - t . d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t , i = t . g e t C o m p u t e d S t y l e ( t . d o c u m e n t . d o c u m e n t E l e m e n t ) . d i r e c t i o n ; e l s e { c o n s t o = C s ( t h i s . _ s o u r c e ) ; e = t . o f f s e t W i d t h - t . c l i e n t W i d t h - o . l e f t - o . r i g h t , n = t . o f f s e t H e i g h t - t . c l i e n t H e i g h t - o . t o p - o . b o t t o m , i = t . o w n e r D o c u m e n t . d e f a u l t V i e w . g e t C o m p u t e d S t y l e ( t ) . d i r e c t i o n , t h i s . l e f t + = o . l e f t , t h i s . t o p + = o . t o p , t h i s . r i g h t - = o . r i g h t , t h i s . b o t t o m - = o . b o t t o m , t h i s . w i d t h = t h i s . r i g h t - t h i s . l e f t , t h i s . h e i g h t = t h i s . b o t t o m - t h i s . t o p } r e t u r n t h i s . w i d t h - = e , " l t r " = = = i ? t h i s . r i g h t - = e : t h i s . l e f t + = e , t h i s . h e i g h t - = n , t h i s . b o t t o m - = n , t h i s } s t a t i c g e t D o m R a n g e R e c t s ( t ) { c o n s t e = [ ] , n = A r r a y . f r o m ( t . g e t C l i e n t R e c t s ( ) ) ; i f ( n . l e n g t h ) f o r ( c o n s t t o f n ) e . p u s h ( n e w P s ( t ) ) ; e l s e { l e t n = t . s t a r t C o n t a i n e r ; F o ( n ) & & ( n = n . p a r e n t N o d e ) ; c o n s t i = n e w P s ( n . g e t B o u n d i n g C l i e n t R e c t ( ) ) ; i . r i g h t = i . l e f t , i . w i d t h = 0 , e . p u s h ( i ) } r e t u r n e } } f u n c t i o n T s ( t , e ) { f o r ( c o n s t n o f A s ) t [ n ] = e [ n ] } f u n c t i o n E s ( t ) { r e t u r n ! ! G n ( t ) & & t = = = t . o w n e r D o c u m e n t . b o d y }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n S s ( { t a r g e t : t , v i e w p o r t O f f s e t : e = 0 } ) { c o n s t n = V s ( t ) ; l e t i = n , o = n u l l ; f o r ( ; i ; ) { l e t r ; I s ( r = F s ( i = = n ? t : o ) , ( ) = > B s ( t , i ) ) ; c o n s t s = B s ( t , i ) ; i f ( R s ( i , s , e ) , i . p a r e n t ! = i ) { i f ( o = i . f r a m e E l e m e n t , i = i . p a r e n t , ! o ) r e t u r n } e l s e i = n u l l } } f u n c t i o n R s ( t , e , n ) { c o n s t i = e . c l o n e ( ) . m o v e B y ( 0 , n ) , o = e . c l o n e ( ) . m o v e B y ( 0 , - n ) , r = n e w P s ( t ) . e x c l u d e S c r o l l b a r s A n d B o r d e r s ( ) ; i f ( ! [ o , i ] . e v e r y ( t = > r . c o n t a i n s ( t ) ) ) { l e t { s c r o l l X : s , s c r o l l Y : a } = t ; D s ( o , r ) ? a - = r . t o p - e . t o p + n : O s ( i , r ) & & ( a + = e . b o t t o m - r . b o t t o m + n ) , M s ( e , r ) ? s - = r . l e f t - e . l e f t + n : N s ( e , r ) & & ( s + = e . r i g h t - r . r i g h t + n ) , t . s c r o l l T o ( s , a ) } } f u n c t i o n I s ( t , e ) { c o n s t n = V s ( t ) ; l e t i , o ; f o r ( ; t ! = n . d o c u m e n t . b o d y ; ) o = e ( ) , ( i = n e w P s ( t ) . e x c l u d e S c r o l l b a r s A n d B o r d e r s ( ) ) . c o n t a i n s ( o ) | | ( D s ( o , i ) ? t . s c r o l l T o p - = i . t o p - o . t o p : O s ( o , i ) & & ( t . s c r o l l T o p + = o . b o t t o m - i . b o t t o m ) , M s ( o , i ) ? t . s c r o l l L e f t - = i . l e f t - o . l e f t : N s ( o , i ) & & ( t . s c r o l l L e f t + = o . r i g h t - i . r i g h t ) ) , t = t . p a r e n t N o d e } f u n c t i o n O s ( t , e ) { r e t u r n t . b o t t o m > e . b o t t o m } f u n c t i o n D s ( t , e ) { r e t u r n t . t o p < e . t o p } f u n c t i o n M s ( t , e ) { r e t u r n t . l e f t < e . l e f t } f u n c t i o n N s ( t , e ) { r e t u r n t . r i g h t > e . r i g h t } f u n c t i o n V s ( t ) { r e t u r n x s ( t ) ? t . s t a r t C o n t a i n e r . o w n e r D o c u m e n t . d e f a u l t V i e w : t . o w n e r D o c u m e n t . d e f a u l t V i e w } f u n c t i o n F s ( t ) { i f ( x s ( t ) ) { l e t e = t . c o m m o n A n c e s t o r C o n t a i n e r ; r e t u r n F o ( e ) & & ( e = e . p a r e n t N o d e ) , e } r e t u r n t . p a r e n t N o d e } f u n c t i o n B s ( t , e ) { c o n s t n = V s ( t ) , i = n e w P s ( t ) ; i f ( n = = = e ) r e t u r n i ; { l e t t = n ; f o r ( ; t ! = e ; ) { c o n s t e = t . f r a m e E l e m e n t , n = n e w P s ( e ) . e x c l u d e S c r o l l b a r s A n d B o r d e r s ( ) ; i . m o v e B y ( n . l e f t , n . t o p ) , t = t . p a r e n t } } r e t u r n i }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / O b j e c t . a s s i g n ( { } , { s c r o l l V i e w p o r t T o S h o w T a r g e t : S s , s c r o l l A n c e s t o r s T o S h o w T a r g e t : f u n c t i o n ( t ) { I s ( F s ( t ) , ( ) = > n e w P s ( t ) ) } } ) ; c l a s s L s { c o n s t r u c t o r ( ) { t h i s . d o c u m e n t = n e w a o , t h i s . d o m C o n v e r t e r = n e w a r , t h i s . d o m R o o t s = n e w M a p , t h i s . s e t ( " i s R e n d e r i n g I n P r o g r e s s " , ! 1 ) , t h i s . _ r e n d e r e r = n e w X o ( t h i s . d o m C o n v e r t e r , t h i s . d o c u m e n t . s e l e c t i o n ) , t h i s . _ r e n d e r e r . b i n d ( " i s F o c u s e d " ) . t o ( t h i s . d o c u m e n t ) , t h i s . _ i n i t i a l D o m R o o t A t t r i b u t e s = n e w W e a k M a p , t h i s . _ o b s e r v e r s = n e w M a p , t h i s . _ o n g o i n g C h a n g e = ! 1 , t h i s . _ p o s t F i x e r s I n P r o g r e s s = ! 1 , t h i s . _ r e n d e r i n g D i s a b l e d = ! 1 , t h i s . _ h a s C h a n g e d S i n c e T h e L a s t R e n d e r i n g = ! 1 , t h i s . _ w r i t e r = n e w T o ( t h i s . d o c u m e n t ) , t h i s . a d d O b s e r v e r ( t s ) , t h i s . a d d O b s e r v e r ( k s ) , t h i s . a d d O b s e r v e r ( _ s ) , t h i s . a d d O b s e r v e r ( i s ) , t h i s . a d d O b s e r v e r ( w s ) , t h i s . a d d O b s e r v e r ( v s ) , g o . i s A n d r o i d & & t h i s . a d d O b s e r v e r ( y s ) , t h i s . d o c u m e n t . o n ( " k e y d o w n " , $ o ) , C o ( t h i s ) , t h i s . o n ( " r e n d e r " , ( ) = > { t h i s . _ r e n d e r ( ) , t h i s . d o c u m e n t . f i r e ( " l a y o u t C h a n g e d " ) , t h i s . _ h a s C h a n g e d S i n c e T h e L a s t R e n d e r i n g = ! 1 } ) , t h i s . l i s t e n T o ( t h i s . d o c u m e n t . s e l e c t i o n , " c h a n g e " , ( ) = > { t h i s . _ h a s C h a n g e d S i n c e T h e L a s t R e n d e r i n g = ! 0 } ) } a t t a c h D o m R o o t ( t , e = " m a i n " ) { c o n s t n = t h i s . d o c u m e n t . g e t R o o t ( e ) ; n . _ n a m e = t . t a g N a m e . t o L o w e r C a s e ( ) ; c o n s t i = { } ; f o r ( c o n s t { n a m e : e , v a l u e : o } o f A r r a y . f r o m ( t . a t t r i b u t e s ) ) i [ e ] = o , " c l a s s " = = = e ? t h i s . _ w r i t e r . a d d C l a s s ( o . s p l i t ( " " ) , n ) : t h i s . _ w r i t e r . s e t A t t r i b u t e ( e , o , n ) ; t h i s . _ i n i t i a l D o m R o o t A t t r i b u t e s . s e t ( t , i ) ; c o n s t o = ( ) = > { t h i s . _ w r i t e r . s e t A t t r i b u t e ( " c o n t e n t e d i t a b l e " , ! n . i s R e a d O n l y , n ) , n . i s R e a d O n l y ? t h i s . _ w r i t e r . a d d C l a s s ( " c k - r e a d - o n l y " , n ) : t h i s . _ w r i t e r . r e m o v e C l a s s ( " c k - r e a d - o n l y " , n ) } ; o ( ) , t h i s . d o m R o o t s . s e t ( e , t ) , t h i s . d o m C o n v e r t e r . b i n d E l e m e n t s ( t , n ) , t h i s . _ r e n d e r e r . m a r k T o S y n c ( " c h i l d r e n " , n ) , t h i s . _ r e n d e r e r . m a r k T o S y n c ( " a t t r i b u t e s " , n ) , t h i s . _ r e n d e r e r . d o m D o c u m e n t s . a d d ( t . o w n e r D o c u m e n t ) , n . o n ( " c h a n g e : c h i l d r e n " , ( t , e ) = > t h i s . _ r e n d e r e r . m a r k T o S y n c ( " c h i l d r e n " , e ) ) , n . o n ( " c h a n g e : a t t r i b u t e s " , ( t , e ) = > t h i s . _ r e n d e r e r . m a r k T o S y n c ( " a t t r i b u t e s " , e ) ) , n . o n ( " c h a n g e : t e x t " , ( t , e ) = > t h i s . _ r e n d e r e r . m a r k T o S y n c ( " t e x t " , e ) ) , n . o n ( " c h a n g e : i s R e a d O n l y " , ( ) = > t h i s . c h a n g e ( o ) ) , n . o n ( " c h a n g e " , ( ) = > { t h i s . _ h a s C h a n g e d S i n c e T h e L a s t R e n d e r i n g = ! 0 } ) ; f o r ( c o n s t n o f t h i s . _ o b s e r v e r s . v a l u e s ( ) ) n . o b s e r v e ( t , e ) } d e t a c h D o m R o o t ( t ) { c o n s t e = t h i s . d o m R o o t s . g e t ( t ) ; A r r a y . f r o m ( e . a t t r i b u t e s ) . f o r E a c h ( ( { n a m e : t } ) = > e . r e m o v e A t t r i b u t e ( t ) ) ; c o n s t n = t h i s . _ i n i t i a l D o m R o o t A t t r i b u t e s . g e t ( e ) ; f o r ( c o n s t t i n n ) e . s e t A t t r i b u t e ( t , n [ t ] ) ; t h i s . d o m R o o t s . d e l e t e ( t ) , t h i s . d o m C o n v e r t e r . u n b i n d D o m E l e m e n t ( e ) } g e t D o m R o o t ( t = " m a i n " ) { r e t u r n t h i s . d o m R o o t s . g e t ( t ) } a d d O b s e r v e r ( t ) { l e t e = t h i s . _ o b s e r v e r s . g e t ( t ) ; i f ( e ) r e t u r n e ; e = n e w t ( t h i s ) , t h i s . _ o b s e r v e r s . s e t ( t , e ) ; f o r ( c o n s t [ t , n ] o f t h i s . d o m R o o t s ) e . o b s e r v e ( n , t ) ; r e t u r n e . e n a b l e ( ) , e } g e t O b s e r v e r ( t ) { r e t u r n t h i s . _ o b s e r v e r s . g e t ( t ) } d i s a b l e O b s e r v e r s ( ) { f o r ( c o n s t t o f t h i s . _ o b s e r v e r s . v a l u e s ( ) ) t . d i s a b l e ( ) } e n a b l e O b s e r v e r s ( ) { f o r ( c o n s t t o f t h i s . _ o b s e r v e r s . v a l u e s ( ) ) t . e n a b l e ( ) } s c r o l l T o T h e S e l e c t i o n ( ) { c o n s t t = t h i s . d o c u m e n t . s e l e c t i o n . g e t F i r s t R a n g e ( ) ; t & & S s ( { t a r g e t : t h i s . d o m C o n v e r t e r . v i e w R a n g e T o D o m ( t ) , v i e w p o r t O f f s e t : 2 0 } ) } f o c u s ( ) { i f ( ! t h i s . d o c u m e n t . i s F o c u s e d ) { c o n s t t = t h i s . d o c u m e n t . s e l e c t i o n . e d i t a b l e E l e m e n t ; t & & ( t h i s . d o m C o n v e r t e r . f o c u s ( t ) , t h i s . f o r c e R e n d e r ( ) ) } } c h a n g e ( t ) { i f ( t h i s . i s R e n d e r i n g I n P r o g r e s s | | t h i s . _ p o s t F i x e r s I n P r o g r e s s ) t h r o w n e w Z n . b ( " c a n n o t - c h a n g e - v i e w - t r e e : A t t e m p t i n g t o m a k e c h a n g e s t o t h e v i e w w h e n i t i s i n a n i n c o r r e c t s t a t e : r e n d e r i n g o r p o s t - f i x e r s a r e i n p r o g r e s s . T h i s m a y c a u s e s o m e u n e x p e c t e d b e h a v i o r a n d i n c o n s i s t e n c y b e t w e e n t h e D O M a n d t h e v i e w . " , t h i s ) ; t r y { i f ( t h i s . _ o n g o i n g C h a n g e ) r e t u r n t ( t h i s . _ w r i t e r ) ; t h i s . _ o n g o i n g C h a n g e = ! 0 ; c o n s t e = t ( t h i s . _ w r i t e r ) ; r e t u r n t h i s . _ o n g o i n g C h a n g e = ! 1 , ! t h i s . _ r e n d e r i n g D i s a b l e d & & t h i s . _ h a s C h a n g e d S i n c e T h e L a s t R e n d e r i n g & & ( t h i s . _ p o s t F i x e r s I n P r o g r e s s = ! 0 , t h i s . d o c u m e n t . _ c a l l P o s t F i x e r s ( t h i s . _ w r i t e r ) , t h i s . _ p o s t F i x e r s I n P r o g r e s s = ! 1 , t h i s . f i r e ( " r e n d e r " ) ) , e } c a t c h ( t ) { Z n . b . r e t h r o w U n e x p e c t e d E r r o r ( t , t h i s ) } } f o r c e R e n d e r ( ) { t h i s . _ h a s C h a n g e d S i n c e T h e L a s t R e n d e r i n g = ! 0 , t h i s . c h a n g e ( ( ) = > { } ) } d e s t r o y ( ) { f o r ( c o n s t t o f t h i s . _ o b s e r v e r s . v a l u e s ( ) ) t . d e s t r o y ( ) ; t h i s . d o c u m e n t . d e s t r o y ( ) , t h i s . s t o p L i s t e n i n g ( ) } c r e a t e P o s i t i o n A t ( t , e ) { r e t u r n t o . _ c r e a t e A t ( t , e ) } c r e a t e P o s i t i o n A f t e r ( t ) { r e t u r n t o . _ c r e a t e A f t e r ( t ) } c r e a t e P o s i t i o n B e f o r e ( t ) { r e t u r n t o . _ c r e a t e B e f o r e ( t ) } c r e a t e R a n g e ( t , e ) { r e t u r n n e w e o ( t , e ) } c r e a t e R a n g e O n ( t ) { r e t u r n e o . _ c r e a t e O n ( t ) } c r e a t e R a n g e I n ( t ) { r e t u r n e o . _ c r e a t e I n ( t ) } c r e a t e S e l e c
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function zs ( t ) { return P ( t ) ? bi ( t ) : new Map ( t ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / d i ( L s , H i ) ; c l a s s q s { c o n s t r u c t o r ( t ) { t h i s . p a r e n t = n u l l , t h i s . _ a t t r s = z s ( t ) } g e t i n d e x ( ) { l e t t ; i f ( ! t h i s . p a r e n t ) r e t u r n n u l l ; i f ( n u l l = = = ( t = t h i s . p a r e n t . g e t C h i l d I n d e x ( t h i s ) ) ) t h r o w n e w Z n . b ( " m o d e l - n o d e - n o t - f o u n d - i n - p a r e n t : T h e n o d e ' s p a r e n t d o e s n o t c o n t a i n t h i s n o d e . " , t h i s ) ; r e t u r n t } g e t s t a r t O f f s e t ( ) { l e t t ; i f ( ! t h i s . p a r e n t ) r e t u r n n u l l ; i f ( n u l l = = = ( t = t h i s . p a r e n t . g e t C h i l d S t a r t O f f s e t ( t h i s ) ) ) t h r o w n e w Z n . b ( " m o d e l - n o d e - n o t - f o u n d - i n - p a r e n t : T h e n o d e ' s p a r e n t d o e s n o t c o n t a i n t h i s n o d e . " , t h i s ) ; r e t u r n t } g e t o f f s e t S i z e ( ) { r e t u r n 1 } g e t e n d O f f s e t ( ) { r e t u r n t h i s . p a r e n t ? t h i s . s t a r t O f f s e t + t h i s . o f f s e t S i z e : n u l l } g e t n e x t S i b l i n g ( ) { c o n s t t = t h i s . i n d e x ; r e t u r n n u l l ! = = t & & t h i s . p a r e n t . g e t C h i l d ( t + 1 ) | | n u l l } g e t p r e v i o u s S i b l i n g ( ) { c o n s t t = t h i s . i n d e x ; r e t u r n n u l l ! = = t & & t h i s . p a r e n t . g e t C h i l d ( t - 1 ) | | n u l l } g e t r o o t ( ) { l e t t = t h i s ; f o r ( ; t . p a r e n t ; ) t = t . p a r e n t ; r e t u r n t } g e t d o c u m e n t ( ) { r e t u r n t h i s . r o o t = = t h i s ? n u l l : t h i s . r o o t . d o c u m e n t | | n u l l } g e t P a t h ( ) { c o n s t t = [ ] ; l e t e = t h i s ; f o r ( ; e . p a r e n t ; ) t . u n s h i f t ( e . s t a r t O f f s e t ) , e = e . p a r e n t ; r e t u r n t } g e t A n c e s t o r s ( t = { i n c l u d e S e l f : ! 1 , p a r e n t F i r s t : ! 1 } ) { c o n s t e = [ ] ; l e t n = t . i n c l u d e S e l f ? t h i s : t h i s . p a r e n t ; f o r ( ; n ; ) e [ t . p a r e n t F i r s t ? " p u s h " : " u n s h i f t " ] ( n ) , n = n . p a r e n t ; r e t u r n e } g e t C o m m o n A n c e s t o r ( t , e = { } ) { c o n s t n = t h i s . g e t A n c e s t o r s ( e ) , i = t . g e t A n c e s t o r s ( e ) ; l e t o = 0 ; f o r ( ; n [ o ] = = i [ o ] & & n [ o ] ; ) o + + ; r e t u r n 0 = = = o ? n u l l : n [ o - 1 ] } i s B e f o r e ( t ) { i f ( t h i s = = t ) r e t u r n ! 1 ; i f ( t h i s . r o o t ! = = t . r o o t ) r e t u r n ! 1 ; c o n s t e = t h i s . g e t P a t h ( ) , n = t . g e t P a t h ( ) , i = u i ( e , n ) ; s w i t c h ( i ) { c a s e " p r e f i x " : r e t u r n ! 0 ; c a s e " e x t e n s i o n " : r e t u r n ! 1 ; d e f a u l t : r e t u r n e [ i ] < n [ i ] } } i s A f t e r ( t ) { r e t u r n t h i s ! = t & & ( t h i s . r o o t = = = t . r o o t & & ! t h i s . i s B e f o r e ( t ) ) } h a s A t t r i b u t e ( t ) { r e t u r n t h i s . _ a t t r s . h a s ( t ) } g e t A t t r i b u t e ( t ) { r e t u r n t h i s . _ a t t r s . g e t ( t ) } g e t A t t r i b u t e s ( ) { r e t u r n t h i s . _ a t t r s . e n t r i e s ( ) } g e t A t t r i b u t e K e y s ( ) { r e t u r n t h i s . _ a t t r s . k e y s ( ) } t o J S O N ( ) { c o n s t t = { } ; r e t u r n t h i s . _ a t t r s . s i z e & & ( t . a t t r i b u t e s = A r r a y . f r o m ( t h i s . _ a t t r s ) . r e d u c e ( ( t , e ) = > ( t [ e [ 0 ] ] = e [ 1 ] , t ) , { } ) ) , t } i s ( t ) { r e t u r n " n o d e " = = t | | " m o d e l : n o d e " = = t } _ c l o n e ( ) { r e t u r n n e w q s ( t h i s . _ a t t r s ) } _ r e m o v e ( ) { t h i s . p a r e n t . _ r e m o v e C h i l d r e n ( t h i s . i n d e x ) } _ s e t A t t r i b u t e ( t , e ) { t h i s . _ a t t r s . s e t ( t , e ) } _ s e t A t t r i b u t e s T o ( t ) { t h i s . _ a t t r s = z s ( t ) } _ r e m o v e A t t r i b u t e ( t ) { r e t u r n t h i s . _ a t t r s . d e l e t e ( t ) } _ c l e a r A t t r i b u t e s ( ) { t h i s . _ a t t r s . c l e a r ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s j s e x t e n d s q s { c o n s t r u c t o r ( t , e ) { s u p e r ( e ) , t h i s . _ d a t a = t | | " " } g e t o f f s e t S i z e ( ) { r e t u r n t h i s . d a t a . l e n g t h } g e t d a t a ( ) { r e t u r n t h i s . _ d a t a } i s ( t ) { r e t u r n " t e x t " = = t | | " m o d e l : t e x t " = = t | | s u p e r . i s ( t ) } t o J S O N ( ) { c o n s t t = s u p e r . t o J S O N ( ) ; r e t u r n t . d a t a = t h i s . d a t a , t } _ c l o n e ( ) { r e t u r n n e w j s ( t h i s . d a t a , t h i s . g e t A t t r i b u t e s ( ) ) } s t a t i c f r o m J S O N ( t ) { r e t u r n n e w j s ( t . d a t a , t . a t t r i b u t e s ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s H s { c o n s t r u c t o r ( t , e , n ) { i f ( t h i s . t e x t N o d e = t , e < 0 | | e > t . o f f s e t S i z e ) t h r o w n e w Z n . b ( " m o d e l - t e x t p r o x y - w r o n g - o f f s e t i n t e x t : G i v e n o f f s e t I n T e x t v a l u e i s i n c o r r e c t . " , t h i s ) ; i f ( n < 0 | | e + n > t . o f f s e t S i z e ) t h r o w n e w Z n . b ( " m o d e l - t e x t p r o x y - w r o n g - l e n g t h : G i v e n l e n g t h v a l u e i s i n c o r r e c t . " , t h i s ) ; t h i s . d a t a = t . d a t a . s u b s t r i n g ( e , e + n ) , t h i s . o f f s e t I n T e x t = e } g e t s t a r t O f f s e t ( ) { r e t u r n n u l l ! = = t h i s . t e x t N o d e . s t a r t O f f s e t ? t h i s . t e x t N o d e . s t a r t O f f s e t + t h i s . o f f s e t I n T e x t : n u l l } g e t o f f s e t S i z e ( ) { r e t u r n t h i s . d a t a . l e n g t h } g e t e n d O f f s e t ( ) { r e t u r n n u l l ! = = t h i s . s t a r t O f f s e t ? t h i s . s t a r t O f f s e t + t h i s . o f f s e t S i z e : n u l l } g e t i s P a r t i a l ( ) { r e t u r n t h i s . o f f s e t S i z e ! = = t h i s . t e x t N o d e . o f f s e t S i z e } g e t p a r e n t ( ) { r e t u r n t h i s . t e x t N o d e . p a r e n t } g e t r o o t ( ) { r e t u r n t h i s . t e x t N o d e . r o o t } g e t d o c u m e n t ( ) { r e t u r n t h i s . t e x t N o d e . d o c u m e n t } i s ( t ) { r e t u r n " t e x t P r o x y " = = t | | " m o d e l : t e x t P r o x y " = = t } g e t P a t h ( ) { c o n s t t = t h i s . t e x t N o d e . g e t P a t h ( ) ; r e t u r n t . l e n g t h > 0 & & ( t [ t . l e n g t h - 1 ] + = t h i s . o f f s e t I n T e x t ) , t } g e t A n c e s t o r s ( t = { i n c l u d e S e l f : ! 1 , p a r e n t F i r s t : ! 1 } ) { c o n s t e = [ ] ; l e t n = t . i n c l u d e S e l f ? t h i s : t h i s . p a r e n t ; f o r ( ; n ; ) e [ t . p a r e n t F i r s t ? " p u s h " : " u n s h i f t " ] ( n ) , n = n . p a r e n t ; r e t u r n e } h a s A t t r i b u t e ( t ) { r e t u r n t h i s . t e x t N o d e . h a s A t t r i b u t e ( t ) } g e t A t t r i b u t e ( t ) { r e t u r n t h i s . t e x t N o d e . g e t A t t r i b u t e ( t ) } g e t A t t r i b u t e s ( ) { r e t u r n t h i s . t e x t N o d e . g e t A t t r i b u t e s ( ) } g e t A t t r i b u t e K e y s ( ) { r e t u r n t h i s . t e x t N o d e . g e t A t t r i b u t e K e y s ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s U s { c o n s t r u c t o r ( t ) { t h i s . _ n o d e s = [ ] , t & & t h i s . _ i n s e r t N o d e s ( 0 , t ) } [ S y m b o l . i t e r a t o r ] ( ) { r e t u r n t h i s . _ n o d e s [ S y m b o l . i t e r a t o r ] ( ) } g e t l e n g t h ( ) { r e t u r n t h i s . _ n o d e s . l e n g t h } g e t m a x O f f s e t ( ) { r e t u r n t h i s . _ n o d e s . r e d u c e ( ( t , e ) = > t + e . o f f s e t S i z e , 0 ) } g e t N o d e ( t ) { r e t u r n t h i s . _ n o d e s [ t ] | | n u l l } g e t N o d e I n d e x ( t ) { c o n s t e = t h i s . _ n o d e s . i n d e x O f ( t ) ; r e t u r n - 1 = = e ? n u l l : e } g e t N o d e S t a r t O f f s e t ( t ) { c o n s t e = t h i s . g e t N o d e I n d e x ( t ) ; r e t u r n n u l l = = = e ? n u l l : t h i s . _ n o d e s . s l i c e ( 0 , e ) . r e d u c e ( ( t , e ) = > t + e . o f f s e t S i z e , 0 ) } i n d e x T o O f f s e t ( t ) { i f ( t = = t h i s . _ n o d e s . l e n g t h ) r e t u r n t h i s . m a x O f f s e t ; c o n s t e = t h i s . _ n o d e s [ t ] ; i f ( ! e ) t h r o w n e w Z n . b ( " m o d e l - n o d e l i s t - i n d e x - o u t - o f - b o u n d s : G i v e n i n d e x c a n n o t b e f o u n d i n t h e n o d e l i s t . " , t h i s ) ; r e t u r n t h i s . g e t N o d e S t a r t O f f s e t ( e ) } o f f s e t T o I n d e x ( t ) { l e t e = 0 ; f o r ( c o n s t n o f t h i s . _ n o d e s ) { i f ( t > = e & & t < e + n . o f f s e t S i z e ) r e t u r n t h i s . g e t N o d e I n d e x ( n ) ; e + = n . o f f s e t S i z e } i f ( e ! = t ) t h r o w n e w Z n . b ( " m o d e l - n o d e l i s t - o f f s e t - o u t - o f - b o u n d s : G i v e n o f f s e t c a n n o t b e f o u n d i n t h e n o d e l i s t . " , t h i s , { o f f s e t : t , n o d e L i s t : t h i s } ) ; r e t u r n t h i s . l e n g t h } _ i n s e r t N o d e s ( t , e ) { f o r ( c o n s t t o f e ) i f ( ! ( t i n s t a n c e o f q s ) ) t h r o w n e w Z n . b ( " m o d e l - n o d e l i s t - i n s e r t N o d e s - n o t - n o d e : T r y i n g t o i n s e r t a n o b j e c t w h i c h i s n o t a N o d e i n s t a n c e . " , t h i s ) ; t h i s . _ n o d e s . s p l i c e ( t , 0 , . . . e ) } _ r e m o v e N o d e s ( t , e = 1 ) { r e t u r n t h i s . _ n o d e s . s p l i c e ( t , e ) } t o J S O N ( ) { r e t u r n t h i s . _ n o d e s . m a p ( t = > t . t o J S O N ( ) ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /class $s extends qs{constructor(t,e,n){super(e),this.name=t,this._children=new Us,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(t,e=null){const n=t.replace(/ ^ model : / , " " ) ; r e t u r n e ? " e l e m e n t " = = n & & e = = t h i s . n a m e : " e l e m e n t " = = n | | n = = t h i s . n a m e | | s u p e r . i s ( t ) } g e t C h i l d ( t ) { r e t u r n t h i s . _ c h i l d r e n . g e t N o d e ( t ) } g e t C h i l d r e n ( ) { r e t u r n t h i s . _ c h i l d r e n [ S y m b o l . i t e r a t o r ] ( ) } g e t C h i l d I n d e x ( t ) { r e t u r n t h i s . _ c h i l d r e n . g e t N o d e I n d e x ( t ) } g e t C h i l d S t a r t O f f s e t ( t ) { r e t u r n t h i s . _ c h i l d r e n . g e t N o d e S t a r t O f f s e t ( t ) } o f f s e t T o I n d e x ( t ) { r e t u r n t h i s . _ c h i l d r e n . o f f s e t T o I n d e x ( t ) } g e t N o d e B y P a t h ( t ) { l e t e = t h i s ; f o r ( c o n s t n o f t ) e = e . g e t C h i l d ( e . o f f s e t T o I n d e x ( n ) ) ; r e t u r n e } t o J S O N ( ) { c o n s t t = s u p e r . t o J S O N ( ) ; i f ( t . n a m e = t h i s . n a m e , t h i s . _ c h i l d r e n . l e n g t h > 0 ) { t . c h i l d r e n = [ ] ; f o r ( c o n s t e o f t h i s . _ c h i l d r e n ) t . c h i l d r e n . p u s h ( e . t o J S O N ( ) ) } r e t u r n t } _ c l o n e ( t = ! 1 ) { c o n s t e = t ? A r r a y . f r o m ( t h i s . _ c h i l d r e n ) . m a p ( t = > t . _ c l o n e ( ! 0 ) ) : n u l l ; r e t u r n n e w $ s ( t h i s . n a m e , t h i s . g e t A t t r i b u t e s ( ) , e ) } _ a p p e n d C h i l d ( t ) { t h i s . _ i n s e r t C h i l d ( t h i s . c h i l d C o u n t , t ) } _ i n s e r t C h i l d ( t , e ) { c o n s t n = f u n c t i o n ( t ) { i f ( " s t r i n g " = = t y p e o f t ) r e t u r n [ n e w j s ( t ) ] ; w i ( t ) | | ( t = [ t ] ) ; r e t u r n A r r a y . f r o m ( t ) . m a p ( t = > " s t r i n g " = = t y p e o f t ? n e w j s ( t ) : t i n s t a n c e o f H s ? n e w j s ( t . d a t a , t . g e t A t t r i b u t e s ( ) ) : t ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( e ) ; f o r ( c o n s t t o f n ) n u l l ! = = t . p a r e n t & & t . _ r e m o v e ( ) , t . p a r e n t = t h i s ; t h i s . _ c h i l d r e n . _ i n s e r t N o d e s ( t , n ) } _ r e m o v e C h i l d r e n ( t , e = 1 ) { c o n s t n = t h i s . _ c h i l d r e n . _ r e m o v e N o d e s ( t , e ) ; f o r ( c o n s t t o f n ) t . p a r e n t = n u l l ; r e t u r n n } s t a t i c f r o m J S O N ( t ) { l e t e = n u l l ; i f ( t . c h i l d r e n ) { e = [ ] ; f o r ( c o n s t n o f t . c h i l d r e n ) n . n a m e ? e . p u s h ( $ s . f r o m J S O N ( n ) ) : e . p u s h ( j s . f r o m J S O N ( n ) ) } r e t u r n n e w $ s ( t . n a m e , t . a t t r i b u t e s , e ) } } c l a s s W s { c o n s t r u c t o r ( t = { } ) { i f ( ! t . b o u n d a r i e s & & ! t . s t a r t P o s i t i o n ) t h r o w n e w Z n . b ( " m o d e l - t r e e - w a l k e r - n o - s t a r t - p o s i t i o n : N e i t h e r b o u n d a r i e s n o r s t a r t i n g p o s i t i o n h a v e b e e n d e f i n e d . " , n u l l ) ; c o n s t e = t . d i r e c t i o n | | " f o r w a r d " ; i f ( " f o r w a r d " ! = e & & " b a c k w a r d " ! = e ) t h r o w n e w Z n . b ( " m o d e l - t r e e - w a l k e r - u n k n o w n - d i r e c t i o n : O n l y ` b a c k w a r d ` a n d ` f o r w a r d ` d i r e c t i o n a l l o w e d . " , t , { d i r e c t i o n : e } ) ; t h i s . d i r e c t i o n = e , t h i s . b o u n d a r i e s = t . b o u n d a r i e s | | n u l l , t . s t a r t P o s i t i o n ? t h i s . p o s i t i o n = t . s t a r t P o s i t i o n . c l o n e ( ) : t h i s . p o s i t i o n = J s . _ c r e a t e A t ( t h i s . b o u n d a r i e s [ " b a c k w a r d " = = t h i s . d i r e c t i o n ? " e n d " : " s t a r t " ] ) , t h i s . p o s i t i o n . s t i c k i n e s s = " t o N o n e " , t h i s . s i n g l e C h a r a c t e r s = ! ! t . s i n g l e C h a r a c t e r s , t h i s . s h a l l o w = ! ! t . s h a l l o w , t h i s . i g n o r e E l e m e n t E n d = ! ! t . i g n o r e E l e m e n t E n d , t h i s . _ b o u n d a r y S t a r t P a r e n t = t h i s . b o u n d a r i e s ? t h i s . b o u n d a r i e s . s t a r t . p a r e n t : n u l l , t h i s . _ b o u n d a r y E n d P a r e n t = t h i s . b o u n d a r i e s ? t h i s . b o u n d a r i e s . e n d . p a r e n t : n u l l , t h i s . _ v i s i t e d P a r e n t = t h i s . p o s i t i o n . p a r e n t } [ S y m b o l . i t e r a t o r ] ( ) { r e t u r n t h i s } s k i p ( t ) { l e t e , n , i , o ; d o { i = t h i s . p o s i t i o n , o = t h i s . _ v i s i t e d P a r e n t , ( { d o n e : e , v a l u e : n } = t h i s . n e x t ( ) ) } w h i l e ( ! e & & t ( n ) ) ; e | | ( t h i s . p o s i t i o n = i , t h i s . _ v i s i t e d P a r e n t = o ) } n e x t ( ) { r e t u r n " f o r w a r d " = = t h i s . d i r e c t i o n ? t h i s . _ n e x t ( ) : t h i s . _ p r e v i o u s ( ) } _ n e x t ( ) { c o n s t t = t h i s . p o s i t i o n , e = t h i s . p o s i t i o n . c l o n e ( ) , n = t h i s . _ v i s i t e d P a r e n t ; i f ( n u l l = = = n . p a r e n t & & e . o f f s e t = = = n . m a x O f f s e t ) r e t u r n { d o n e : ! 0 } ; i f ( n = = = t h i s . _ b o u n d a r y E n d P a r e n t & & e . o f f s e t = = t h i s . b o u n d a r i e s . e n d . o f f s e t ) r e t u r n { d o n e : ! 0 } ; c o n s t i = e . t e x t N o d e ? e . t e x t N o d e : e . n o d e A f t e r ; i f ( i i n s t a n c e o f $ s ) r e t u r n t h i s . s h a l l o w ? e . o f f s e t + + : ( e . p a t h . p u s h ( 0 ) , t h i s . _ v i s i t e d P a r e n t = i ) , t h i s . p o s i t i o n = e , G s ( " e l e m e n t S t a r t " , i , t , e , 1 ) ; i f ( i i n s t a n c e o f j s ) { l e t o ; i f ( t h i s . s i n g l e C h a r a c t e r s ) o = 1 ; e l s e { l e t t = i . e n d O f f s e t ; t h i s . _ b o u n d a r y E n d P a r e n t = = n & & t h i s . b o u n d a r i e s . e n d . o f f s e t < t & & ( t = t h i s . b o u n d a r i e s . e n d . o f f s e t ) , o = t - e . o f f s e t } c o n s t r = e . o f f s e t - i . s t a r t O f f s e t , s = n e w H s ( i , r , o ) ; r e t u r n e . o f f s e t + = o , t h i s . p o s i t i o n = e , G s ( " t e x t " , s , t , e , o ) } r e t u r n e . p a t h . p o p ( ) , e . o f f s e t + + , t h i s . p o s i t i o n = e , t h i s . _ v i s i t e d P a r e n t = n . p a r e n t , t h i s . i g n o r e E l e m e n t E n d ? t h i s . _ n e x t ( ) : G s ( " e l e m e n t E n d " , n , t , e ) } _ p r e v i o u s ( ) { c o n s t t = t h i s . p o s i t i o n , e = t h i s . p o s i t i o n . c l o n e ( ) , n = t h i s . _ v i s i t e d P a r e n t ; i f ( n u l l = = = n . p a r e n t & & 0 = = = e . o f f s e t ) r e t u r n { d o n e : ! 0 } ; i f ( n = = t h i s . _ b o u n d a r y S t a r t P a r e n t & & e . o f f s e t = = t h i s . b o u n d a r i e s . s t a r t . o f f s e t ) r e t u r n { d o n e : ! 0 } ; c o n s t i = e . t e x t N o d e ? e . t e x t N o d e : e . n o d e B e f o r e ; i f ( i i n s t a n c e o f $ s ) r e t u r n e . o f f s e t - - , t h i s . s h a l l o w ? ( t h i s . p o s i t i o n = e , G s ( " e l e m e n t S t a r t " , i , t , e , 1 ) ) : ( e . p a t h . p u s h ( i . m a x O f f s e t ) , t h i s . p o s i t i o n = e , t h i s . _ v i s i t e d P a r e n t = i , t h i s . i g n o r e E l e m e n t E n d ? t h i s . _ p r e v i o u s ( ) : G s ( " e l e m e n t E n d " , i , t , e ) ) ; i f ( i i n s t a n c e o f j s ) { l e t o ; i f ( t h i s . s i n g l e C h a r a c t e r s ) o = 1 ; e l s e { l e t t = i . s t a r t O f f s e t ; t h i s . _ b o u n d a r y S t a r t P a r e n t = = n & & t h i s . b o u n d a r i e s . s t a r t . o f f s e t > t & & ( t = t h i s . b o u n d a r i e s . s t a r t . o f f s e t ) , o = e . o f f s e t - t } c o n s t r = e . o f f s e t - i . s t a r t O f f s e t , s = n e w H s ( i , r - o , o ) ; r e t u r n e . o f f s e t - = o , t h i s . p o s i t i o n = e , G s ( " t e x t " , s , t , e , o ) } r e t u r n e . p a t h . p o p ( ) , t h i s . p o s i t i o n = e , t h i s . _ v i s i t e d P a r e n t = n . p a r e n t , G s ( " e l e m e n t S t a r t " , n , t , e , 1 ) } } f u n c t i o n G s ( t , e , n , i , o ) { r e t u r n { d o n e : ! 1 , v a l u e : { t y p e : t , i t e m : e , p r e v i o u s P o s i t i o n : n , n e x t P o s i t i o n : i , l e n g t h : o } } } v a r K s = f u n c t i o n ( t ) { v a r e = n u l l = = t ? 0 : t . l e n g t h ; r e t u r n e ? t [ e - 1 ] : v o i d 0 } ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s J s { c o n s t r u c t o r ( t , e , n = " t o N o n e " ) { i f ( ! t . i s ( " e l e m e n t " ) & & ! t . i s ( " d o c u m e n t F r a g m e n t " ) ) t h r o w n e w Z n . b ( " m o d e l - p o s i t i o n - r o o t - i n v a l i d : P o s i t i o n r o o t i n v a l i d . " , t ) ; i f ( ! ( e i n s t a n c e o f A r r a y ) | | 0 = = = e . l e n g t h ) t h r o w n e w Z n . b ( " m o d e l - p o s i t i o n - p a t h - i n c o r r e c t - f o r m a t : P o s i t i o n p a t h m u s t b e a n a r r a y w i t h a t l e a s t o n e i t e m . " , t , { p a t h : e } ) ; e = t . g e t P a t h ( ) . c o n c a t ( e ) , t = t . r o o t , t h i s . r o o t = t , t h i s . p a t h = e , t h i s . s t i c k i n e s s = n } g e t o f f s e t ( ) { r e t u r n K s ( t h i s . p a t h ) } s e t o f f s e t ( t ) { t h i s . p a t h [ t h i s . p a t h . l e n g t h - 1 ] = t } g e t p a r e n t ( ) { l e t t = t h i s . r o o t ; f o r ( l e t e = 0 ; e < t h i s . p a t h . l e n g t h - 1 ; e + + ) i f ( ! ( t = t . g e t C h i l d ( t . o f f s e t T o I n d e x ( t h i s . p a t h [ e ] ) ) ) ) t h r o w n e w Z n . b ( " m o d e l - p o s i t i o n - p a t h - i n c o r r e c t : T h e p o s i t i o n ' s p a t h i s i n c o r r e c t . " , t h i s , { p o s i t i o n : t h i s } ) ; i f ( t . i s ( " t e x t " ) ) t h r o w n e w Z n . b ( " m o d e l - p o s i t i o n - p a t h - i n c o r r e c t : T h e p o s i t i o n ' s p a t h i s i n c o r r e c t . " , t h i s , { p o s i t i o n : t h i s } ) ; r e t u r n t } g e t i n d e x ( ) { r e t u r n t h i s . p a r e n t . o f f s e t T o I n d e x ( t h i s . o f f s e t ) } g e t t e x t N o d e ( ) { c o n s t t = t h i s . p a r e n t . g e t C h i l d ( t h i s . i n d e x ) ; r e t u r n t i n s t a n c e o f j s & & t . s t a r t O f f s e t < t h i s . o f f s e t ? t : n u l l } g e t n o d e A f t e r ( ) { r e t u r n n u l l = = = t h i s . t e x t N o d e ? t h i s . p a r e n t . g e t C h i l d ( t h i s . i n d e x ) : n u l l } g e t n o d e B e f o r e ( ) { r e t u r n n u l l = = = t h i s . t e x t N o d e ? t h i s . p a r e n t . g e t C h i l d ( t h i s . i n d e x - 1 ) : n u l l } g e t i s A t S t a r t ( ) { r e t u r n 0 = = = t h i s . o f f s e t } g e t i s A t E n d ( ) { r e t u r n t h i s . o f f s e t = = t h i s . p a r e n t . m a x O f f s e t } c o m p a r e W i t h ( t ) { i f ( t h i s . r o o t ! = t . r o o t ) r e t u r n " d i f f e r e n t " ; c o n s t e = u i ( t h i s . p a t h , t . p a t h ) ; s w i t c h ( e ) { c a s e " s a m e " : r e t u r n " s a m e " ; c a s e " p r e f i x " : r e t u r n " b e f o r e " ; c a s e " e x t e n s i o n " : r e t u r n " a f t e r " ; d e f a u l t : r e t u r n t h i s . p a t h [ e ] < t . p a t h [ e ] ? " b e f o r e " : " a f t e r " } } g e t L a s t M a t c h i n g P o s i t i o n ( t , e = { } ) { e . s t a r t P o s i t i o n = t h i s ; c o n s t n = n e w W s ( e ) ; r e t u r n n . s k i p ( t ) , n . p o s i t i o n } g e t P a r e n t P a t h ( ) { r e t u r n t h i s . p a t h . s l i c e ( 0 , - 1 ) } g e t A n c e s t o r s ( ) { r e t u r n t h i s . p a r e n t . i s ( " d o c u m e n t F r a g m e n t " ) ? [ t h i s . p a r e n t ] : t h i s . p a r e n t . g e t A n c e s t o r s ( { i n c l u d e S e l f : ! 0 } ) } g e t C o m m o n P a t h ( t ) { i f ( t h i s . r o o t ! = t . r o o t ) r e t u r n [ ] ; c o n s t e = u i ( t h i s . p a t h , t . p a t h ) , n = " s t r i n g " = = t y p e o f e ? M a t h . m i n ( t h i s . p a t h . l e n g t h , t . p a t h . l e n g t h ) : e ; r e t u r n t h i s . p a t h . s l i c e ( 0 , n ) } g e t C o m m o n A n c e s t o r ( t ) { c o n s t e = t h i s . g e t A n c e s t o r s ( ) , n = t . g e t A n c e s t o r s ( ) ; l e t i = 0 ; f o r ( ; e [ i ] = = n [ i ] & & e [ i ] ; ) i + + ; r e t u r n 0 = = = i ? n u l l : e [ i - 1 ] } g e t S h i f t e d B y ( t ) { c o n s t e = t h i s . c l o n e ( ) , n = e . o f f s e t + t ; r e t u r n e . o f f s e t = n < 0 ? 0 : n , e } i s A f t e r ( t ) { r e t u r n " a f t e r " = = t h i s . c o m p a r e W i t h ( t ) } i s B e f o r e ( t ) { r e t u r n " b e f o r e " = = t h i s . c o m p a r e W i t h ( t ) } i s E q u a l ( t ) { r e t u r n " s a m e " = = t h i s . c o m p a r e W i t h ( t ) } i s T o u c h i n g ( t ) { l e t e = n u l l , n = n u l l ; s w i t c h ( t h i s . c o m p a r e W i t h ( t ) ) { c a s e " s a m e " : r e t u r n ! 0 ; c a s e " b e f o r e " : e = J s . _ c r e a t e A t ( t h i s ) , n = J s . _ c r e a t e A t ( t ) ; b r e a k ; c a s e " a f t e r " : e = J s . _ c r e a t e A t ( t ) , n = J s . _ c r e a t e A t ( t h i s ) ; b r e a k ; d e f a u l t : r e t u r n ! 1 } l e t i = e . p a r e n t ; f o r ( ; e . p a t h . l e n g t h + n . p a t h . l e n g t h ; ) { i f ( e . i s E q u a l ( n ) ) r e t u r n ! 0 ; i f ( e . p a t h . l e n g t h > n . p a t h . l e n g t h ) { i f ( e . o f f s e t ! = = i . m a x O f f s e t ) r e t u r n ! 1 ; e . p a t h = e . p a t h . s l i c e ( 0 , - 1 ) , i = i . p a r e n t , e . o f f s e t + + } e l s e { i f ( 0 ! = = n . o f f s e t ) r e t u r n ! 1 ; n . p a t h = n . p a t h . s l i c e ( 0 , - 1 ) } } } i s ( t ) { r e t u r n " p o s i t i o n " = = t | | " m o d e l : p o s i t i o n " = = t } h a s S a m e P a r e n t A s ( t ) { i f ( t h i s . r o o t ! = = t . r o o t ) r e t u r n ! 1 ; r e t u r n " s a m e " = = u i ( t h i s . g e t P a r e n t P a t h ( ) , t . g e t P a r e n t P a t h ( ) ) } g e t T r a n s f o r m e d B y O p e r a t i o n ( t ) { l e t e ; s w i t c h ( t . t y p e ) { c a s e " i n s e r t " : e = t h i s . _ g e t T r a n s f o r m e d B y I n s e r t O p e r a t i o n ( t ) ; b r e a k ; c a s e " m o v e " : c a s e " r e m o v e " : c a s e " r e i n s e r t " : e = t h i s . _ g e t T r a n s f o r m e d B y M o v e O p e r a t i o n ( t ) ; b r e a k ; c a s e " s p l i t " : e = t h i s . _ g e t T r a n s f o r m e d B y S p l i t O p e r a t i o n ( t ) ; b r e a k ; c a s e " m e r g e " : e = t h i s . _ g e t T r a n s f o r m e d B y M e r g e O p e r a t i o n ( t ) ; b r e a k ; d e f a u l t : e = J s . _ c r e a t e A t ( t h i s ) } r e t u r n e } _ g e t T r a n s f o r m e d B y I n s e r t O p e r a t i o n ( t ) { r e t u r n t h i s . _ g e t T r a n s f o r m e d B y I n s e r t i o n ( t . p o s i t i o n , t . h o w M a n y ) } _ g e t T r a n s f o r m e d B y M o v e O p e r a t i o n ( t ) { r e t u r n t h i s . _ g e t T r a n s f o r m e d B y M o v e ( t . s o u r c e P o s i t i o n , t . t a r g e t P o s i t i o n , t . h o w M a n y ) } _ g e t T r a n s f o r m e d B y S p l i t O p e r a t i o n ( t ) { c o n s t e = t . m o v e d R a n g e ; r e t u r n e . c o n t a i n s P o s i t i o n ( t h i s ) | | e . s t a r t . i s E q u a l ( t h i s ) & & " t o N e x t " = = t h i s . s t i c k i n e s s ? t h i s . _ g e t C o m b i n e d ( t . s p l i t P o s i t i o n , t . m o v e T a r g e t P o s i t i o n ) : t . g r a v e y a r d P o s i t i o n ? t h i s . _ g e t T r a n s f o r m e d B y M o v e ( t . g r a v e y a r d P o s i t i o n , t . i n s e r t i o n P o s i t i o n , 1 ) : t h i s . _ g e t T r a n s f o r m e d B y I n s e r t i o n ( t . i n s e r t i o n P o s i t i o n , 1 ) } _ g e t T r a n s f o r m e d B y M e r g e O p e r a t i o n ( t ) { c o n s t e = t . m o v e d R a n g e ; l e t n ; r e t u r n e . c o n t a i n s P o s i t i o n ( t h i s ) | | e . s t a r t . i s E q u a l ( t h i s ) ? ( n = t h i s . _ g e t C o m b i n e d ( t . s o u r c e P o s i t i o n , t . t a r g e t P o s i t i o n ) , t . s o u r c e P o s i t i o n . i s B e f o r e ( t . t a r g e t P o s i t i o n ) & & ( n = n . _ g e t T r a n s f o r m e d B y D e l e t i o n ( t . d e l e t i o n P o s i t i o n , 1 ) ) ) : n = t h i s . i s E q u a l ( t . d e l e t i o n P o s i t i o n ) ? J s . _ c r e a t e A
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s Z s { c o n s t r u c t o r ( t , e = n u l l ) { t h i s . s t a r t = J s . _ c r e a t e A t ( t ) , t h i s . e n d = e ? J s . _ c r e a t e A t ( e ) : J s . _ c r e a t e A t ( t ) , t h i s . s t a r t . s t i c k i n e s s = t h i s . i s C o l l a p s e d ? " t o N o n e " : " t o N e x t " , t h i s . e n d . s t i c k i n e s s = t h i s . i s C o l l a p s e d ? " t o N o n e " : " t o P r e v i o u s " } * [ S y m b o l . i t e r a t o r ] ( ) { y i e l d * n e w W s ( { b o u n d a r i e s : t h i s , i g n o r e E l e m e n t E n d : ! 0 } ) } g e t i s C o l l a p s e d ( ) { r e t u r n t h i s . s t a r t . i s E q u a l ( t h i s . e n d ) } g e t i s F l a t ( ) { r e t u r n " s a m e " = = u i ( t h i s . s t a r t . g e t P a r e n t P a t h ( ) , t h i s . e n d . g e t P a r e n t P a t h ( ) ) } g e t r o o t ( ) { r e t u r n t h i s . s t a r t . r o o t } c o n t a i n s P o s i t i o n ( t ) { r e t u r n t . i s A f t e r ( t h i s . s t a r t ) & & t . i s B e f o r e ( t h i s . e n d ) } c o n t a i n s R a n g e ( t , e = ! 1 ) { t . i s C o l l a p s e d & & ( e = ! 1 ) ; c o n s t n = t h i s . c o n t a i n s P o s i t i o n ( t . s t a r t ) | | e & & t h i s . s t a r t . i s E q u a l ( t . s t a r t ) , i = t h i s . c o n t a i n s P o s i t i o n ( t . e n d ) | | e & & t h i s . e n d . i s E q u a l ( t . e n d ) ; r e t u r n n & & i } c o n t a i n s I t e m ( t ) { c o n s t e = J s . _ c r e a t e B e f o r e ( t ) ; r e t u r n t h i s . c o n t a i n s P o s i t i o n ( e ) | | t h i s . s t a r t . i s E q u a l ( e ) } i s ( t ) { r e t u r n " r a n g e " = = t | | " m o d e l : r a n g e " = = t } i s E q u a l ( t ) { r e t u r n t h i s . s t a r t . i s E q u a l ( t . s t a r t ) & & t h i s . e n d . i s E q u a l ( t . e n d ) } i s I n t e r s e c t i n g ( t ) { r e t u r n t h i s . s t a r t . i s B e f o r e ( t . e n d ) & & t h i s . e n d . i s A f t e r ( t . s t a r t ) } g e t D i f f e r e n c e ( t ) { c o n s t e = [ ] ; r e t u r n t h i s . i s I n t e r s e c t i n g ( t ) ? ( t h i s . c o n t a i n s P o s i t i o n ( t . s t a r t ) & & e . p u s h ( n e w Z s ( t h i s . s t a r t , t . s t a r t ) ) , t h i s . c o n t a i n s P o s i t i o n ( t . e n d ) & & e . p u s h ( n e w Z s ( t . e n d , t h i s . e n d ) ) ) : e . p u s h ( n e w Z s ( t h i s . s t a r t , t h i s . e n d ) ) , e } g e t I n t e r s e c t i o n ( t ) { i f ( t h i s . i s I n t e r s e c t i n g ( t ) ) { l e t e = t h i s . s t a r t , n = t h i s . e n d ; r e t u r n t h i s . c o n t a i n s P o s i t i o n ( t . s t a r t ) & & ( e = t . s t a r t ) , t h i s . c o n t a i n s P o s i t i o n ( t . e n d ) & & ( n = t . e n d ) , n e w Z s ( e , n ) } r e t u r n n u l l } g e t M i n i m a l F l a t R a n g e s ( ) { c o n s t t = [ ] , e = t h i s . s t a r t . g e t C o m m o n P a t h ( t h i s . e n d ) . l e n g t h , n = J s . _ c r e a t e A t ( t h i s . s t a r t ) ; l e t i = n . p a r e n t ; f o r ( ; n . p a t h . l e n g t h > e + 1 ; ) { c o n s t e = i . m a x O f f s e t - n . o f f s e t ; 0 ! = = e & & t . p u s h ( n e w Z s ( n , n . g e t S h i f t e d B y ( e ) ) ) , n . p a t h = n . p a t h . s l i c e ( 0 , - 1 ) , n . o f f s e t + + , i = i . p a r e n t } f o r ( ; n . p a t h . l e n g t h < = t h i s . e n d . p a t h . l e n g t h ; ) { c o n s t e = t h i s . e n d . p a t h [ n . p a t h . l e n g t h - 1 ] , i = e - n . o f f s e t ; 0 ! = = i & & t . p u s h ( n e w Z s ( n , n . g e t S h i f t e d B y ( i ) ) ) , n . o f f s e t = e , n . p a t h . p u s h ( 0 ) } r e t u r n t } g e t W a l k e r ( t = { } ) { r e t u r n t . b o u n d a r i e s = t h i s , n e w W s ( t ) } * g e t I t e m s ( t = { } ) { t . b o u n d a r i e s = t h i s , t . i g n o r e E l e m e n t E n d = ! 0 ; c o n s t e = n e w W s ( t ) ; f o r ( c o n s t t o f e ) y i e l d t . i t e m } * g e t P o s i t i o n s ( t = { } ) { t . b o u n d a r i e s = t h i s ; c o n s t e = n e w W s ( t ) ; y i e l d e . p o s i t i o n ; f o r ( c o n s t t o f e ) y i e l d t . n e x t P o s i t i o n } g e t T r a n s f o r m e d B y O p e r a t i o n ( t ) { s w i t c h ( t . t y p e ) { c a s e " i n s e r t " : r e t u r n t h i s . _ g e t T r a n s f o r m e d B y I n s e r t O p e r a t i o n ( t ) ; c a s e " m o v e " : c a s e " r e m o v e " : c a s e " r e i n s e r t " : r e t u r n t h i s . _ g e t T r a n s f o r m e d B y M o v e O p e r a t i o n ( t ) ; c a s e " s p l i t " : r e t u r n [ t h i s . _ g e t T r a n s f o r m e d B y S p l i t O p e r a t i o n ( t ) ] ; c a s e " m e r g e " : r e t u r n [ t h i s . _ g e t T r a n s f o r m e d B y M e r g e O p e r a t i o n ( t ) ] } r e t u r n [ n e w Z s ( t h i s . s t a r t , t h i s . e n d ) ] } g e t T r a n s f o r m e d B y O p e r a t i o n s ( t ) { c o n s t e = [ n e w Z s ( t h i s . s t a r t , t h i s . e n d ) ] ; f o r ( c o n s t n o f t ) f o r ( l e t t = 0 ; t < e . l e n g t h ; t + + ) { c o n s t i = e [ t ] . g e t T r a n s f o r m e d B y O p e r a t i o n ( n ) ; e . s p l i c e ( t , 1 , . . . i ) , t + = i . l e n g t h - 1 } f o r ( l e t t = 0 ; t < e . l e n g t h ; t + + ) { c o n s t n = e [ t ] ; f o r ( l e t i = t + 1 ; i < e . l e n g t h ; i + + ) { c o n s t t = e [ i ] ; ( n . c o n t a i n s R a n g e ( t ) | | t . c o n t a i n s R a n g e ( n ) | | n . i s E q u a l ( t ) ) & & e . s p l i c e ( i , 1 ) } } r e t u r n e } g e t C o m m o n A n c e s t o r ( ) { r e t u r n t h i s . s t a r t . g e t C o m m o n A n c e s t o r ( t h i s . e n d ) } t o J S O N ( ) { r e t u r n { s t a r t : t h i s . s t a r t . t o J S O N ( ) , e n d : t h i s . e n d . t o J S O N ( ) } } c l o n e ( ) { r e t u r n n e w t h i s . c o n s t r u c t o r ( t h i s . s t a r t , t h i s . e n d ) } _ g e t T r a n s f o r m e d B y I n s e r t O p e r a t i o n ( t , e = ! 1 ) { r e t u r n t h i s . _ g e t T r a n s f o r m e d B y I n s e r t i o n ( t . p o s i t i o n , t . h o w M a n y , e ) } _ g e t T r a n s f o r m e d B y M o v e O p e r a t i o n ( t , e = ! 1 ) { c o n s t n = t . s o u r c e P o s i t i o n , i = t . h o w M a n y , o = t . t a r g e t P o s i t i o n ; r e t u r n t h i s . _ g e t T r a n s f o r m e d B y M o v e ( n , o , i , e ) } _ g e t T r a n s f o r m e d B y S p l i t O p e r a t i o n ( t ) { c o n s t e = t h i s . s t a r t . _ g e t T r a n s f o r m e d B y S p l i t O p e r a t i o n ( t ) ; l e t n = t h i s . e n d . _ g e t T r a n s f o r m e d B y S p l i t O p e r a t i o n ( t ) ; r e t u r n t h i s . e n d . i s E q u a l ( t . i n s e r t i o n P o s i t i o n ) & & ( n = t h i s . e n d . g e t S h i f t e d B y ( 1 ) ) , e . r o o t ! = n . r o o t & & ( n = t h i s . e n d . g e t S h i f t e d B y ( - 1 ) ) , n e w Z s ( e , n ) } _ g e t T r a n s f o r m e d B y M e r g e O p e r a t i o n ( t ) { i f ( t h i s . s t a r t . i s E q u a l ( t . t a r g e t P o s i t i o n ) & & t h i s . e n d . i s E q u a l ( t . d e l e t i o n P o s i t i o n ) ) r e t u r n n e w Z s ( t h i s . s t a r t ) ; l e t e = t h i s . s t a r t . _ g e t T r a n s f o r m e d B y M e r g e O p e r a t i o n ( t ) , n = t h i s . e n d . _ g e t T r a n s f o r m e d B y M e r g e O p e r a t i o n ( t ) ; r e t u r n e . r o o t ! = n . r o o t & & ( n = t h i s . e n d . g e t S h i f t e d B y ( - 1 ) ) , e . i s A f t e r ( n ) ? ( t . s o u r c e P o s i t i o n . i s B e f o r e ( t . t a r g e t P o s i t i o n ) ? ( e = J s . _ c r e a t e A t ( n ) ) . o f f s e t = 0 : ( t . d e l e t i o n P o s i t i o n . i s E q u a l ( e ) | | ( n = t . d e l e t i o n P o s i t i o n ) , e = t . t a r g e t P o s i t i o n ) , n e w Z s ( e , n ) ) : n e w Z s ( e , n ) } _ g e t T r a n s f o r m e d B y I n s e r t i o n ( t , e , n = ! 1 ) { i f ( n & & t h i s . c o n t a i n s P o s i t i o n ( t ) ) r e t u r n [ n e w Z s ( t h i s . s
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s Q s { c o n s t r u c t o r ( ) { t h i s . _ m o d e l T o V i e w M a p p i n g = n e w W e a k M a p , t h i s . _ v i e w T o M o d e l M a p p i n g = n e w W e a k M a p , t h i s . _ v i e w T o M o d e l L e n g t h C a l l b a c k s = n e w M a p , t h i s . _ m a r k e r N a m e T o E l e m e n t s = n e w M a p , t h i s . _ e l e m e n t T o M a r k e r N a m e s = n e w M a p , t h i s . _ u n b o u n d M a r k e r N a m e s = n e w S e t , t h i s . o n ( " m o d e l T o V i e w P o s i t i o n " , ( t , e ) = > { i f ( e . v i e w P o s i t i o n ) r e t u r n ; c o n s t n = t h i s . _ m o d e l T o V i e w M a p p i n g . g e t ( e . m o d e l P o s i t i o n . p a r e n t ) ; e . v i e w P o s i t i o n = t h i s . _ f i n d P o s i t i o n I n ( n , e . m o d e l P o s i t i o n . o f f s e t ) } , { p r i o r i t y : " l o w " } ) , t h i s . o n ( " v i e w T o M o d e l P o s i t i o n " , ( t , e ) = > { i f ( e . m o d e l P o s i t i o n ) r e t u r n ; c o n s t n = t h i s . f i n d M a p p e d V i e w A n c e s t o r ( e . v i e w P o s i t i o n ) , i = t h i s . _ v i e w T o M o d e l M a p p i n g . g e t ( n ) , o = t h i s . _ t o M o d e l O f f s e t ( e . v i e w P o s i t i o n . p a r e n t , e . v i e w P o s i t i o n . o f f s e t , n ) ; e . m o d e l P o s i t i o n = J s . _ c r e a t e A t ( i , o ) } , { p r i o r i t y : " l o w " } ) } b i n d E l e m e n t s ( t , e ) { t h i s . _ m o d e l T o V i e w M a p p i n g . s e t ( t , e ) , t h i s . _ v i e w T o M o d e l M a p p i n g . s e t ( e , t ) } u n b i n d V i e w E l e m e n t ( t ) { c o n s t e = t h i s . t o M o d e l E l e m e n t ( t ) ; i f ( t h i s . _ v i e w T o M o d e l M a p p i n g . d e l e t e ( t ) , t h i s . _ e l e m e n t T o M a r k e r N a m e s . h a s ( t ) ) f o r ( c o n s t e o f t h i s . _ e l e m e n t T o M a r k e r N a m e s . g e t ( t ) ) t h i s . _ u n b o u n d M a r k e r N a m e s . a d d ( e ) ; t h i s . _ m o d e l T o V i e w M a p p i n g . g e t ( e ) = = t & & t h i s . _ m o d e l T o V i e w M a p p i n g . d e l e t e ( e ) } u n b i n d M o d e l E l e m e n t ( t ) { c o n s t e = t h i s . t o V i e w E l e m e n t ( t ) ; t h i s . _ m o d e l T o V i e w M a p p i n g . d e l e t e ( t ) , t h i s . _ v i e w T o M o d e l M a p p i n g . g e t ( e ) = = t & & t h i s . _ v i e w T o M o d e l M a p p i n g . d e l e t e ( e ) } b i n d E l e m e n t T o M a r k e r ( t , e ) { c o n s t n = t h i s . _ m a r k e r N a m e T o E l e m e n t s . g e t ( e ) | | n e w S e t ; n . a d d ( t ) ; c o n s t i = t h i s . _ e l e m e n t T o M a r k e r N a m e s . g e t ( t ) | | n e w S e t ; i . a d d ( e ) , t h i s . _ m a r k e r N a m e T o E l e m e n t s . s e t ( e , n ) , t h i s . _ e l e m e n t T o M a r k e r N a m e s . s e t ( t , i ) } u n b i n d E l e m e n t F r o m M a r k e r N a m e ( t , e ) { c o n s t n = t h i s . _ m a r k e r N a m e T o E l e m e n t s . g e t ( e ) ; n & & ( n . d e l e t e ( t ) , 0 = = n . s i z e & & t h i s . _ m a r k e r N a m e T o E l e m e n t s . d e l e t e ( e ) ) ; c o n s t i = t h i s . _ e l e m e n t T o M a r k e r N a m e s . g e t ( t ) ; i & & ( i . d e l e t e ( e ) , 0 = = i . s i z e & & t h i s . _ e l e m e n t T o M a r k e r N a m e s . d e l e t e ( t ) ) } f l u s h U n b o u n d M a r k e r N a m e s ( ) { c o n s t t = A r r a y . f r o m ( t h i s . _ u n b o u n d M a r k e r N a m e s ) ; r e t u r n t h i s . _ u n b o u n d M a r k e r N a m e s . c l e a r ( ) , t } c l e a r B i n d i n g s ( ) { t h i s . _ m o d e l T o V i e w M a p p i n g = n e w W e a k M a p , t h i s . _ v i e w T o M o d e l M a p p i n g = n e w W e a k M a p , t h i s . _ m a r k e r N a m e T o E l e m e n t s = n e w M a p , t h i s . _ e l e m e n t T o M a r k e r N a m e s = n e w M a p , t h i s . _ u n b o u n d M a r k e r N a m e s = n e w S e t } t o M o d e l E l e m e n t ( t ) { r e t u r n t h i s . _ v i e w T o M o d e l M a p p i n g . g e t ( t ) } t o V i e w E l e m e n t ( t ) { r e t u r n t h i s . _ m o d e l T o V i e w M a p p i n g . g e t ( t ) } t o M o d e l R a n g e ( t ) { r e t u r n n e w Z s ( t h i s . t o M o d e l P o s i t i o n ( t . s t a r t ) , t h i s . t o M o d e l P o s i t i o n ( t . e n d ) ) } t o V i e w R a n g e ( t ) { r e t u r n n e w e o ( t h i s . t o V i e w P o s i t i o n ( t . s t a r t ) , t h i s . t o V i e w P o s i t i o n ( t . e n d ) ) } t o M o d e l P o s i t i o n ( t ) { c o n s t e = { v i e w P o s i t i o n : t , m a p p e r : t h i s } ; r e t u r n t h i s . f i r e ( " v i e w T o M o d e l P o s i t i o n " , e ) , e . m o d e l P o s i t i o n } t o V i e w P o s i t i o n ( t , e = { i s P h a n t o m : ! 1 } ) { c o n s t n = { m o d e l P o s i t i o n : t , m a p p e r : t h i s , i s P h a n t o m : e . i s P h a n t o m } ; r e t u r n t h i s . f i r e ( " m o d e l T o V i e w P o s i t i o n " , n ) , n . v i e w P o s i t i o n } m a r k e r N a m e T o E l e m e n t s ( t ) { c o n s t e = t h i s . _ m a r k e r N a m e T o E l e m e n t s . g e t ( t ) ; i f ( ! e ) r e t u r n n u l l ; c o n s t n = n e w S e t ; f o r ( c o n s t t o f e ) i f ( t . i s ( " a t t r i b u t e E l e m e n t " ) ) f o r ( c o n s t e o f t . g e t E l e m e n t s W i t h S a m e I d ( ) ) n . a d d ( e ) ; e l s e n . a d d ( t ) ; r e t u r n n } r e g i s t e r V i e w T o M o d e l L e n g t h ( t , e ) { t h i s . _ v i e w T o M o d e l L e n g t h C a l l b a c k s . s e t ( t , e ) } f i n d M a p p e d V i e w A n c e s t o r ( t ) { l e t e = t . p a r e n t ; f o r ( ; ! t h i s . _ v i e w T o M o d e l M a p p i n g . h a s ( e ) ; ) e = e . p a r e n t ; r e t u r n e } _ t o M o d e l O f f s e t ( t , e , n ) { i f ( n ! = t ) { r e t u r n t h i s . _ t o M o d e l O f f s e t ( t . p a r e n t , t . i n d e x , n ) + t h i s . _ t o M o d e l O f f s e t ( t , e , t ) } i f ( t . i s ( " t e x t " ) ) r e t u r n e ; l e t i = 0 ; f o r ( l e t n = 0 ; n < e ; n + + ) i + = t h i s . g e t M o d e l L e n g t h ( t . g e t C h i l d ( n ) ) ; r e t u r n i } g e t M o d e l L e n g t h ( t ) { i f ( t h i s . _ v i e w T o M o d e l L e n g t h C a l l b a c k s . g e t ( t . n a m e ) ) { r e t u r n t h i s . _ v i e w T o M o d e l L e n g t h C a l l b a c k s . g e t ( t . n a m e ) ( t ) } i f ( t h i s . _ v i e w T o M o d e l M a p p i n g . h a s ( t ) ) r e t u r n 1 ; i f ( t . i s ( " t e x t " ) ) r e t u r n t . d a t a . l e n g t h ; i f ( t . i s ( " u i E l e m e n t " ) ) r e t u r n 0 ; { l e t e = 0 ; f o r ( c o n s t n o f t . g e t C h i l d r e n ( ) ) e + = t h i s . g e t M o d e l L e n g t h ( n ) ; r e t u r n e } } _ f i n d P o s i t i o n I n ( t , e ) { l e t n , i = 0 , o = 0 , r = 0 ; i f ( t . i s ( " t e x t " ) ) r e t u r n n e w t o ( t , e ) ; f o r ( ; o < e ; ) n = t . g e t C h i l d ( r ) , o + = i = t h i s . g e t M o d e l L e n g t h ( n ) , r + + ; r e t u r n o = = e ? t h i s . _ m o v e V i e w P o s i t i o n T o T e x t N o d e ( n e w t o ( t , r ) ) : t h i s . _ f i n d P o s i t i o n I n ( n , e - ( o - i ) ) } _ m o v e V i e w P o s i t i o n T o T e x t N o d e ( t ) { c o n s t e = t . n o d e B e f o r e , n = t . n o d e A f t e r ; r e t u r n e i n s t a n c e o f m i ? n e w t o ( e , e . d a t a . l e n g t h ) : n i n s t a n c e o f m i ? n e w t o ( n , 0 ) : t } } d i ( Q s , i i ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Ys { constructor ( ) { this . _consumable = new Map , this . _textProxyRegistry = new Map } add ( t , e ) { e = Xs ( e ) , t instanceof Hs && ( t = this . _getSymbolForTextProxy ( t ) ) , this . _consumable . has ( t ) || this . _consumable . set ( t , new Map ) , this . _consumable . get ( t ) . set ( e , ! 0 ) } consume ( t , e ) { return e = Xs ( e ) , t instanceof Hs && ( t = this . _getSymbolForTextProxy ( t ) ) , ! ! this . test ( t , e ) && ( this . _consumable . get ( t ) . set ( e , ! 1 ) , ! 0 ) } test ( t , e ) { e = Xs ( e ) , t instanceof Hs && ( t = this . _getSymbolForTextProxy ( t ) ) ; const n = this . _consumable . get ( t ) ; if ( void 0 === n ) return null ; const i = n . get ( e ) ; return void 0 === i ? null : i } revert ( t , e ) { e = Xs ( e ) , t instanceof Hs && ( t = this . _getSymbolForTextProxy ( t ) ) ; const n = this . test ( t , e ) ; return ! 1 === n ? ( this . _consumable . get ( t ) . set ( e , ! 0 ) , ! 0 ) : ! 0 !== n && null } _getSymbolForTextProxy ( t ) { let e = null ; const n = this . _textProxyRegistry . get ( t . startOffset ) ; if ( n ) { const i = n . get ( t . endOffset ) ; i && ( e = i . get ( t . parent ) ) } return e || ( e = this . _addSymbolForTextProxy ( t . startOffset , t . endOffset , t . parent ) ) , e } _addSymbolForTextProxy ( t , e , n ) { const i = Symbol ( "textProxySymbol" ) ; let o , r ; return ( o = this . _textProxyRegistry . get ( t ) ) || ( o = new Map , this . _textProxyRegistry . set ( t , o ) ) , ( r = o . get ( e ) ) || ( r = new Map , o . set ( e , r ) ) , r . set ( n , i ) , i } } function Xs ( t ) { const e = t . split ( ":" ) ; return e . length > 1 ? e [ 0 ] + ":" + e [ 1 ] : e [ 0 ] }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s t a { c o n s t r u c t o r ( t ) { t h i s . c o n v e r s i o n A p i = B i ( { d i s p a t c h e r : t h i s } , t ) } c o n v e r t C h a n g e s ( t , e , n ) { f o r ( c o n s t e o f t . g e t M a r k e r s T o R e m o v e ( ) ) t h i s . c o n v e r t M a r k e r R e m o v e ( e . n a m e , e . r a n g e , n ) ; f o r ( c o n s t e o f t . g e t C h a n g e s ( ) ) " i n s e r t " = = e . t y p e ? t h i s . c o n v e r t I n s e r t ( Z s . _ c r e a t e F r o m P o s i t i o n A n d S h i f t ( e . p o s i t i o n , e . l e n g t h ) , n ) : " r e m o v e " = = e . t y p e ? t h i s . c o n v e r t R e m o v e ( e . p o s i t i o n , e . l e n g t h , e . n a m e , n ) : t h i s . c o n v e r t A t t r i b u t e ( e . r a n g e , e . a t t r i b u t e K e y , e . a t t r i b u t e O l d V a l u e , e . a t t r i b u t e N e w V a l u e , n ) ; f o r ( c o n s t t o f t h i s . c o n v e r s i o n A p i . m a p p e r . f l u s h U n b o u n d M a r k e r N a m e s ( ) ) { c o n s t i = e . g e t ( t ) . g e t R a n g e ( ) ; t h i s . c o n v e r t M a r k e r R e m o v e ( t , i , n ) , t h i s . c o n v e r t M a r k e r A d d ( t , i , n ) } f o r ( c o n s t e o f t . g e t M a r k e r s T o A d d ( ) ) t h i s . c o n v e r t M a r k e r A d d ( e . n a m e , e . r a n g e , n ) } c o n v e r t I n s e r t ( t , e ) { t h i s . c o n v e r s i o n A p i . w r i t e r = e , t h i s . c o n v e r s i o n A p i . c o n s u m a b l e = t h i s . _ c r e a t e I n s e r t C o n s u m a b l e ( t ) ; f o r ( c o n s t e o f t ) { c o n s t t = e . i t e m , n = { i t e m : t , r a n g e : Z s . _ c r e a t e F r o m P o s i t i o n A n d S h i f t ( e . p r e v i o u s P o s i t i o n , e . l e n g t h ) } ; t h i s . _ t e s t A n d F i r e ( " i n s e r t " , n ) ; f o r ( c o n s t e o f t . g e t A t t r i b u t e K e y s ( ) ) n . a t t r i b u t e K e y = e , n . a t t r i b u t e O l d V a l u e = n u l l , n . a t t r i b u t e N e w V a l u e = t . g e t A t t r i b u t e ( e ) , t h i s . _ t e s t A n d F i r e ( ` a t t r i b u t e : $ { e } ` , n ) } t h i s . _ c l e a r C o n v e r s i o n A p i ( ) } c o n v e r t R e m o v e ( t , e , n , i ) { t h i s . c o n v e r s i o n A p i . w r i t e r = i , t h i s . f i r e ( " r e m o v e : " + n , { p o s i t i o n : t , l e n g t h : e } , t h i s . c o n v e r s i o n A p i ) , t h i s . _ c l e a r C o n v e r s i o n A p i ( ) } c o n v e r t A t t r i b u t e ( t , e , n , i , o ) { t h i s . c o n v e r s i o n A p i . w r i t e r = o , t h i s . c o n v e r s i o n A p i . c o n s u m a b l e = t h i s . _ c r e a t e C o n s u m a b l e F o r R a n g e ( t , ` a t t r i b u t e : $ { e } ` ) ; f o r ( c o n s t o o f t ) { c o n s t t = { i t e m : o . i t e m , r a n g e : Z s . _ c r e a t e F r o m P o s i t i o n A n d S h i f t ( o . p r e v i o u s P o s i t i o n , o . l e n g t h ) , a t t r i b u t e K e y : e , a t t r i b u t e O l d V a l u e : n , a t t r i b u t e N e w V a l u e : i } ; t h i s . _ t e s t A n d F i r e ( ` a t t r i b u t e : $ { e } ` , t ) } t h i s . _ c l e a r C o n v e r s i o n A p i ( ) } c o n v e r t S e l e c t i o n ( t , e , n ) { c o n s t i = A r r a y . f r o m ( e . g e t M a r k e r s A t P o s i t i o n ( t . g e t F i r s t P o s i t i o n ( ) ) ) ; i f ( t h i s . c o n v e r s i o n A p i . w r i t e r = n , t h i s . c o n v e r s i o n A p i . c o n s u m a b l e = t h i s . _ c r e a t e S e l e c t i o n C o n s u m a b l e ( t , i ) , t h i s . f i r e ( " s e l e c t i o n " , { s e l e c t i o n : t } , t h i s . c o n v e r s i o n A p i ) , t . i s C o l l a p s e d ) { f o r ( c o n s t e o f i ) { c o n s t n = e . g e t R a n g e ( ) ; i f ( ! e a ( t . g e t F i r s t P o s i t i o n ( ) , e , t h i s . c o n v e r s i o n A p i . m a p p e r ) ) c o n t i n u e ; c o n s t i = { i t e m : t , m a r k e r N a m e : e . n a m e , m a r k e r R a n g e : n } ; t h i s . c o n v e r s i o n A p i . c o n s u m a b l e . t e s t ( t , " a d d M a r k e r : " + e . n a m e ) & & t h i s . f i r e ( " a d d M a r k e r : " + e . n a m e , i , t h i s . c o n v e r s i o n A p i ) } f o r ( c o n s t e o f t . g e t A t t r i b u t e K e y s ( ) ) { c o n s t n = { i t e m : t , r a n g e : t . g e t F i r s t R a n g e ( ) , a t t r i b u t e K e y : e , a t t r i b u t e O l d V a l u e : n u l l , a t t r i b u t e N e w V a l u e : t . g e t A t t r i b u t e ( e ) } ; t h i s . c o n v e r s i o n A p i . c o n s u m a b l e . t e s t ( t , " a t t r i b u t e : " + n . a t t r i b u t e K e y ) & & t h i s . f i r e ( " a t t r i b u t e : " + n . a t t r i b u t e K e y + " : $ t e x t " , n , t h i s . c o n v e r s i o n A p i ) } t h i s . _ c l e a r C o n v e r s i o n A p i ( ) } } c o n v e r t M a r k e r A d d ( t , e , n ) { i f ( ! e . r o o t . d o c u m e n t | | " $ g r a v e y a r d " = = e . r o o t . r o o t N a m e ) r e t u r n ; t h i s . c o n v e r s i o n A p i . w r i t e r = n ; c o n s t i = " a d d M a r k e r : " + t , o = n e w Y s ; i f ( o . a d d ( e , i ) , t h i s . c o n v e r s i o n A p i . c o n s u m a b l e = o , t h i s . f i r e ( i , { m a r k e r N a m e : t , m a r k e r R a n g e : e } , t h i s . c o n v e r s i o n A p i ) , o . t e s t ( e , i ) ) { t h i s . c o n v e r s i o n A p i . c o n s u m a b l e = t h i s . _ c r e a t e C o n s u m a b l e F o r R a n g e ( e , i ) ; f o r ( c o n s t n o f e . g e t I t e m s ( ) ) { i f ( ! t h i s . c o n v e r s i o n A p i . c o n s u m a b l e . t e s t ( n , i ) ) c o n t i n u e ; c o n s t o = { i t e m : n , r a n g e : Z s . _ c r e a t e O n ( n ) , m a r k e r N a m e : t , m a r k e r R a n g e : e } ; t h i s . f i r e ( i , o , t h i s . c o n v e r s i o n A p i ) } t h i s . _ c l e a r C o n v e r s i o n A p i ( ) } } c o n v e r t M a r k e r R e m o v e ( t , e , n ) { e . r o o t . d o c u m e n t & & " $ g r a v e y a r d " ! = e . r o o t . r o o t N a m e & & ( t h i s . c o n v e r s i o n A p i . w r i t e r = n , t h i s . f i r e ( " r e m o v e M a r k e r : " + t , { m a r k e r N a m e : t , m a r k e r R a n g e : e } , t h i s . c o n v e r s i o n A p i ) , t h i s . _ c l e a r C o n v e r s i o n A p i ( ) ) } _ c r e a t e I n s e r t C o n s u m a b l e ( t ) { c o n s t e = n e w Y s ; f o r ( c o n s t n o f t ) { c o n s t t = n . i t e m ; e . a d d ( t , " i n s e r t " ) ; f o r ( c o n s t n o f t . g e t A t t r i b u t e K e y s ( ) ) e . a d d ( t , " a t t r i b u t e : " + n ) } r e t u r n e } _ c r e a t e C o n s u m a b l e F o r R a n g e ( t , e ) { c o n s t n = n e w Y s ; f o r ( c o n s t i o f t . g e t I t e m s ( ) ) n . a d d ( i , e ) ; r e t u r n n } _ c r e a t e S e l e c t i o n C o n s u m a b l e ( t , e ) { c o n s t n = n e w Y s ; n . a d d ( t , " s e l e c t i o n " ) ; f o r ( c o n s t i o f e ) n . a d d ( t , " a d d M a r k e r : " + i . n a m e ) ; f o r ( c o n s t e o f t . g e t A t t r i b u t e K e y s ( ) ) n . a d d ( t , " a t t r i b u t e : " + e ) ; r e t u r n n } _ t e s t A n d F i r e ( t , e ) { i f ( ! t h i s . c o n v e r s i o n A p i . c o n s u m a b l e . t e s t ( e . i t e m , t ) ) r e t u r n ; c o n s t n = e . i t e m . n a m e | | " $ t e x t " ; t h i s . f i r e ( t + " : " + n , e , t h i s . c o n v e r s i o n A p i ) } _ c l e a r C o n v e r s i o n A p i ( ) { d e l e t e t h i s . c o n v e r s i o n A p i . w r i t e r , d e l e t e t h i s . c o n v e r s i o n A p i . c o n s u m a b l e } } f u n c t i o n e a ( t , e , n ) { c o n s t i = e . g e t R a n g e ( ) , o = A r r a y . f r o m ( t . g e t A n c e s t o r s ( ) ) ; r e t u r n o . s h i f t ( ) , o . r e v e r s e ( ) , ! o . s o m e ( t = > { i f ( i . c o n t a i n s I t e m ( t ) ) { r e t u r n ! ! n . t o V i e w E l e m e n t ( t ) . g e t C u s t o m P r o p e r t y ( " a d d H i g h l i g h t " ) } } ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / d i ( t a , i i ) ; c l a s s n a { c o n s t r u c t o r ( t , e , n ) { t h i s . _ l a s t R a n g e B a c k w a r d = ! 1 , t h i s . _ r a n g e s = [ ] , t h i s . _ a t t r s = n e w M a p , t & & t h i s . s e t T o ( t , e , n ) } g e t a n c h o r ( ) { i f ( t h i s . _ r a n g e s . l e n g t h > 0 ) { c o n s t t = t h i s . _ r a n g e s [ t h i s . _ r a n g e s . l e n g t h - 1 ] ; r e t u r n t h i s . _ l a s t R a n g e B a c k w a r d ? t . e n d : t . s t a r t } r e t u r n n u l l } g e t f o c u s ( ) { i f ( t h i s . _ r a n g e s . l e n g t h > 0 ) { c o n s t t = t h i s . _ r a n g e s [ t h i s . _ r a n g e s . l e n g t h - 1 ] ; r e t u r n t h i s . _ l a s t R a n g e B a c k w a r d ? t . s t a r t : t . e n d } r e t u r n n u l l } g e t i s C o l l a p s e d ( ) { r e t u r n 1 = = = t h i s . _ r a n g e s . l e n g t h & & t h i s . _ r a n g e s [ 0 ] . i s C o l l a p s e d } g e t r a n g e C o u n t ( ) { r e t u r n t h i s . _ r a n g e s . l e n g t h } g e t i s B a c k w a r d ( ) { r e t u r n ! t h i s . i s C o l l a p s e d & & t h i s . _ l a s t R a n g e B a c k w a r d } i s E q u a l ( t ) { i f ( t h i s . r a n g e C o u n t ! = t . r a n g e C o u n t ) r e t u r n ! 1 ; i f ( 0 = = = t h i s . r a n g e C o u n t ) r e t u r n ! 0 ; i f ( ! t h i s . a n c h o r . i s E q u a l ( t . a n c h o r ) | | ! t h i s . f o c u s . i s E q u a l ( t . f o c u s ) ) r e t u r n ! 1 ; f o r ( c o n s t e o f t h i s . _ r a n g e s ) { l e t n = ! 1 ; f o r ( c o n s t i o f t . _ r a n g e s ) i f ( e . i s E q u a l ( i ) ) { n = ! 0 ; b r e a k } i f ( ! n ) r e t u r n ! 1 } r e t u r n ! 0 } * g e t R a n g e s ( ) { f o r ( c o n s t t o f t h i s . _ r a n g e s ) y i e l d n e w Z s ( t . s t a r t , t . e n d ) } g e t F i r s t R a n g e ( ) { l e t t = n u l l ; f o r ( c o n s t e o f t h i s . _ r a n g e s ) t & & ! e . s t a r t . i s B e f o r e ( t . s t a r t ) | | ( t = e ) ; r e t u r n t ? n e w Z s ( t . s t a r t , t . e n d ) : n u l l } g e t L a s t R a n g e ( ) { l e t t = n u l l ; f o r ( c o n s t e o f t h i s . _ r a n g e s ) t & & ! e . e n d . i s A f t e r ( t . e n d ) | | ( t = e ) ; r e t u r n t ? n e w Z s ( t . s t a r t , t . e n d ) : n u l l } g e t F i r s t P o s i t i o n ( ) { c o n s t t = t h i s . g e t F i r s t R a n g e ( ) ; r e t u r n t ? t . s t a r t . c l o n e ( ) : n u l l } g e t L a s t P o s i t i o n ( ) { c o n s t t = t h i s . g e t L a s t R a n g e ( ) ; r e t u r n t ? t . e n d . c l o n e ( ) : n u l l } s e t T o ( t , e , n ) { i f ( n u l l = = = t ) t h i s . _ s e t R a n g e s ( [ ] ) ; e l s e i f ( t i n s t a n c e o f n a ) t h i s . _ s e t R a n g e s ( t . g e t R a n g e s ( ) , t . i s B a c k w a r d ) ; e l s e i f ( t & & " f u n c t i o n " = = t y p e o f t . g e t R a n g e s ) t h i s . _ s e t R a n g e s ( t . g e t R a n g e s ( ) , t . i s B a c k w a r d ) ; e l s e i f ( t i n s t a n c e o f Z s ) t h i s . _ s e t R a n g e s ( [ t ] , ! ! e & & ! ! e . b a c k w a r d ) ; e l s e i f ( t i n s t a n c e o f J s ) t h i s . _ s e t R a n g e s ( [ n e w Z s ( t ) ] ) ; e l s e i f ( t i n s t a n c e o f q s ) { c o n s t i = ! ! n & & ! ! n . b a c k w a r d ; l e t o ; i f ( " i n " = = e ) o = Z s . _ c r e a t e I n ( t ) ; e l s e i f ( " o n " = = e ) o = Z s . _ c r e a t e O n ( t ) ; e l s e { i f ( v o i d 0 = = = e ) t h r o w n e w Z n . b ( " m o d e l - s e l e c t i o n - s e t T o - r e q u i r e d - s e c o n d - p a r a m e t e r : s e l e c t i o n . s e t T o r e q u i r e s t h e s e c o n d p a r a m e t e r w h e n t h e f i r s t p a r a m e t e r i s a n o d e . " , [ t h i s , t ] ) ; o = n e w Z s ( J s . _ c r e a t e A t ( t , e ) ) } t h i s . _ s e t R a n g e s ( [ o ] , i ) } e l s e { i f ( ! w i ( t ) ) t h r o w n e w Z n . b ( " m o d e l - s e l e c t i o n - s e t T o - n o t - s e l e c t a b l e : C a n n o t s e t t h e s e l e c t i o n t o t h e g i v e n p l a c e . " , [ t h i s , t ] ) ; t h i s . _ s e t R a n g e s ( t , e & & ! ! e . b a c k w a r d ) } } _ s e t R a n g e s ( t , e = ! 1 ) { c o n s t n = ( t = A r r a y . f r o m ( t ) ) . s o m e ( e = > { i f ( ! ( e i n s t a n c e o f Z s ) ) t h r o w n e w Z n . b ( " m o d e l - s e l e c t i o n - s e t - r a n g e s - n o t - r a n g e : S e l e c t i o n r a n g e s e t t o a n o b j e c t t h a t i s n o t a n i n s t a n c e o f m o d e l . R a n g e . " , [ t h i s , t ] ) ; r e t u r n t h i s . _ r a n g e s . e v e r y ( t = > ! t . i s E q u a l ( e ) ) } ) ; i f ( t . l e n g t h ! = = t h i s . _ r a n g e s . l e n g t h | | n ) { t h i s . _ r e m o v e A l l R a n g e s ( ) ; f o r ( c o n s t e o f t ) t h i s . _ p u s h R a n g e ( e ) ; t h i s . _ l a s t R a n g e B a c k w a r d = ! ! e , t h i s . f i r e ( " c h a n g e : r a n g e " , { d i r e c t C h a n g e : ! 0 } ) } } s e t F o c u s ( t , e ) { i f ( n u l l = = = t h i s . a n c h o r ) t h r o w n e w Z n . b ( " m o d e l - s e l e c t i o n - s e t F o c u s - n o - r a n g e s : C a n n o t s e t s e l e c t i o n f o c u s i f t h e r e a r e n o r a n g e s i n s e l e c t i o n . " , [ t h i s , t ] ) ; c o n s t n = J s . _ c r e a t e A t ( t , e ) ; i f ( " s a m e " = = n . c o m p a r e W i t h ( t h i s . f o c u s ) ) r e t u r n ; c o n s t i = t h i s . a n c h o r ; t h i s . _ r a n g e s . l e n g t h & & t h i s . _ p o p R a n g e ( ) , " b e f o r e " = = n . c o m p a r e W i t h ( i ) ? ( t h i s . _ p u s h R a n g e ( n e w Z s ( n , i ) ) , t h i s . _ l a s t R a n g e B a c k w a r d = ! 0 ) : ( t h i s . _ p u s h R a n g e ( n e w Z s ( i , n ) ) , t h i s . _ l a s t R a n g e B a c k w a r d = ! 1 ) , t h i s . f i r e ( " c h a n g e : r a n g e " , { d i r e c t C h a n g e : ! 0 } ) } g e t A t t r i b u t e ( t ) { r e t u r n t h i s . _ a t t r s . g e t ( t ) } g e t A t t r i b u t e s ( ) { r e t u r n t h i s . _ a t t r s . e n t r i e s ( ) } g e t A t t r i b u t e K e y s ( ) { r e t u r n t h i s . _ a t t r s . k e y s ( ) } h a s A t t r i b u t e ( t ) { r e t u r n t h i s . _ a t t r s . h a s ( t ) } r e m o v e A t t r i b u t e ( t ) { t h i s . h a s A t t r i b u t e ( t ) & & ( t h i s . _ a t t r s . d e l e t e ( t ) , t h i s . f i r e ( " c h a n g e : a t t r i b u t e " , { a t t r i b u t e K e y s : [ t ] , d i r e c t C h a n g e : ! 0 } ) ) } s e t A t t r i b u t e ( t , e ) { t h i s . g e t A t t r i b u t e ( t ) ! = = e & & ( t h i s . _ a t t r s . s e t ( t , e ) , t h i s . f i r e ( " c h a n g e : a t t r i b u t e " , { a t t r i b u t e K e y s : [ t ] , d i r e c t C h a n g e : ! 0 } ) ) } g e t S e l e c t e d E l e m e n t ( ) { i f ( 1 ! = = t h i s . r a n g e C o u n t ) r e t u r n n u l l ; c o n s t t = t h i s . g e t F i r s t R a n g e ( ) , e = t . s t a r t . n o d e A f t e r , n = t . e n d . n o d e B e f o r e ; r e t u r n e i n s t a n c e o f $ s & & e = = n ? e : n u l l } i s ( t ) { r e t u r n " s e l e c t i o n " = = t | | " m o d e l : s e l e c t i o n " = = t } * g e t S e l e c t e d B l o c k s ( ) { c o n s t t = n e w W e a k S e t ; f o r ( c o n s t e o f t h i s . g e t R a n g e s ( ) ) { c o n s t n = r a ( e . s t a r t , t ) ; n & & s a ( n , e ) & & ( y i e l d n ) ; f o r ( c o n s t n o f e . g e t W a l k e r ( ) ) { c o n s t i = n . i t e m ; " e l e m e n t E n d " = = n . t y p e & & o a ( i , t , e ) & & ( y i e l d i ) } c o n s t i = r a ( e . e n d , t ) ; i & & ! e . e n d . i s T o u c h i n g ( J s . _ c r e a t e A t ( i , 0 ) ) & & s a ( i , e ) & & ( y i e l d i ) } } c o n t a i n s E n t i r e C o n t e n t ( t = t h i s . a n c h o r . r o o t ) { c o n s t e = J s . _ c r e a t e A t ( t , 0 ) , n = J s . _ c r e a t e A t ( t , " e n d " ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( t ) ; r e t u r n ! n | | ! e . c o n t a i n s R a n g e ( Z s . _ c r e a t e O n ( n ) , ! 0 ) } d i ( n a , i i ) ; c l a s s a a e x t e n d s Z s { c o n s t r u c t o r ( t , e ) { s u p e r ( t , e ) , c a . c a l l ( t h i s ) } d e t a c h ( ) { t h i s . s t o p L i s t e n i n g ( ) } i s ( t ) { r e t u r n " l i v e R a n g e " = = t | | " m o d e l : l i v e R a n g e " = = t | | s u p e r . i s ( t ) } t o R a n g e ( ) { r e t u r n n e w Z s ( t h i s . s t a r t , t h i s . e n d ) } s t a t i c f r o m R a n g e ( t ) { r e t u r n n e w a a ( t . s t a r t , t . e n d ) } } f u n c t i o n c a ( ) { t h i s . l i s t e n T o ( t h i s . r o o t . d o c u m e n t . m o d e l , " a p p l y O p e r a t i o n " , ( t , e ) = > { c o n s t n = e [ 0 ] ; n . i s D o c u m e n t O p e r a t i o n & & l a . c a l l ( t h i s , n ) } , { p r i o r i t y : " l o w " } ) } f u n c t i o n l a ( t ) { c o n s t e = t h i s . g e t T r a n s f o r m e d B y O p e r a t i o n ( t ) , n = Z s . _ c r e a t e F r o m R a n g e s ( e ) , i = ! n . i s E q u a l ( t h i s ) , o = f u n c t i o n ( t , e ) { s w i t c h ( e . t y p e ) { c a s e " i n s e r t " : r e t u r n t . c o n t a i n s P o s i t i o n ( e . p o s i t i o n ) ; c a s e " m o v e " : c a s e " r e m o v e " : c a s e " r e i n s e r t " : c a s e " m e r g e " : r e t u r n t . c o n t a i n s P o s i t i o n ( e . s o u r c e P o s i t i o n ) | | t . s t a r t . i s E q u a l ( e . s o u r c e P o s i t i o n ) | | t . c o n t a i n s P o s i t i o n ( e . t a r g e t P o s i t i o n ) ; c a s e " s p l i t " : r e t u r n t . c o n t a i n s P o s i t i o n ( e . s p l i t P o s i t i o n ) | | t . c o n t a i n s P o s i t i o n ( e . i n s e r t i o n P o s i t i o n ) } r e t u r n ! 1 } ( t h i s , t ) ; l e t r = n u l l ; i f ( i ) { " $ g r a v e y a r d " = = n . r o o t . r o o t N a m e & & ( r = " r e m o v e " = = t . t y p e ? t . s o u r c e P o s i t i o n : t . d e l e t i o n P o s i t i o n ) ; c o n s t e = t h i s . t o R a n g e ( ) ; t h i s . s t a r t = n . s t a r t , t h i s . e n d = n . e n d , t h i s . f i r e ( " c h a n g e : r a n g e " , e , { d e l e t i o n P o s i t i o n : r } ) } e l s e o & & t h i s . f i r e ( " c h a n g e : c o n t e n t " , t h i s . t o R a n g e ( ) , { d e l e t i o n P o s i t i o n : r } ) } d i ( a a , i i ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const da = "selection:" ; class ua { constructor ( t ) { this . _selection = new ha ( t ) , this . _selection . delegate ( "change:range" ) . to ( this ) , this . _selection . delegate ( "change:attribute" ) . to ( this ) } get isCollapsed ( ) { return this . _selection . isCollapsed } get anchor ( ) { return this . _selection . anchor } get focus ( ) { return this . _selection . focus } get rangeCount ( ) { return this . _selection . rangeCount } get hasOwnRange ( ) { return this . _selection . hasOwnRange } get isBackward ( ) { return this . _selection . isBackward } get isGravityOverridden ( ) { return this . _selection . isGravityOverridden } get markers ( ) { return this . _selection . markers } get _ranges ( ) { return this . _selection . _ranges } getRanges ( ) { return this . _selection . getRanges ( ) } getFirstPosition ( ) { return this . _selection . getFirstPosition ( ) } getLastPosition ( ) { return this . _selection . getLastPosition ( ) } getFirstRange ( ) { return this . _selection . getFirstRange ( ) } getLastRange ( ) { return this . _selection . getLastRange ( ) } getSelectedBlocks ( ) { return this . _selection . getSelectedBlocks ( ) } getSelectedElement ( ) { return this . _selection . getSelectedElement ( ) } containsEntireContent ( t ) { return this . _selection . containsEntireContent ( t ) } destroy ( ) { this . _selection . destroy ( ) } getAttributeKeys ( ) { return this . _selection . getAttributeKeys ( ) } getAttributes ( ) { return this . _selection . getAttributes ( ) } getAttribute ( t ) { return this . _selection . getAttribute ( t ) } hasAttribute ( t ) { return this . _selection . hasAttribute ( t ) } refresh ( ) { this . _selection . _updateMarkers ( ) , this . _selection . _updateAttributes ( ! 1 ) } is ( t ) { return "selection" == t || "model:selection" == t || "documentSelection" == t || "model:documentSelection" == t } _setFocus ( t , e ) { this . _selection . setFocus ( t , e ) } _setTo ( t , e , n ) { this . _selection . setTo ( t , e , n ) } _setAttribute ( t , e ) { this . _selection . setAttribute ( t , e ) } _removeAttribute ( t ) { this . _selection . removeAttribute ( t ) } _getStoredAttributes ( ) { return this . _selection . _getStoredAttributes ( ) } _overrideGravity ( ) { return this . _selection . overrideGravity ( ) } _restoreGravity ( t ) { this . _selection . restoreGravity ( t ) } static _getStoreAttributeKey ( t ) { return da + t } static _isStoreAttributeKey ( t ) { return t . startsWith ( da ) } } di ( ua , ii ) ; class ha extends na { constructor ( t ) { super ( ) , this . markers = new so ( { idProperty : "name" } ) , this . _model = t . model , this . _document = t , this . _attributePriority = new Map , this . _fixGraveyardRangesData = [ ] , this . _hasChangedRange = ! 1 , this . _overriddenGravityRegister = new Set , this . listenTo ( this . _model , "applyOperation" , ( t , e ) => { const n = e [ 0 ] ; if ( n . isDocumentOperation && "marker" != n . type && "rename" != n . type && "noop" != n . type ) { for ( ; this . _fixGraveyardRangesData . length ; ) { const { liveRange : t , sourcePosition : e } = this . _fixGraveyardRangesData . shift ( ) ; this . _fixGraveyardSelection ( t , e ) } this . _hasChangedRange && ( this . _hasChangedRange = ! 1 , this . fire ( "change:range" , { directChange : ! 1 } ) ) } } , { priority : "lowest" } ) , this . on ( "change:range" , ( ) => { for ( const t of this . getRanges ( ) ) if ( ! this . _document . _validateSelectionRange ( t ) ) throw new Zn . b ( "document-selection-wrong-position: Range from document selection starts or ends at incorrect position." , this , { range : t } ) } ) , this . listenTo ( this . _model . markers , "update" , ( ) => this . _updateMarkers ( ) ) , this . listenTo ( this . _document , "change" , ( t , e ) => { ! function ( t , e ) { const n = t . document . differ ; for ( const i of n . getChanges ( ) ) { if ( "insert" != i . type ) continue ; const n = i . position . parent ; i . length === n . maxOffset && t . enqueueChange ( e , t => { const e = Array . from ( n . getAttributeKeys ( ) ) . filter ( t => t . startsWith ( da ) ) ; for ( const i of e ) t . removeAttribute ( i , n ) } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( t h i s . _ m o d e l , e ) } ) } g e t i s C o l l a p s e d ( ) { r e t u r n 0 = = = t h i s . _ r a n g e s . l e n g t h ? t h i s . _ d o c u m e n t . _ g e t D e f a u l t R a n g e ( ) . i s C o l l a p s e d : s u p e r . i s C o l l a p s e d } g e t a n c h o r ( ) { r e t u r n s u p e r . a n c h o r | | t h i s . _ d o c u m e n t . _ g e t D e f a u l t R a n g e ( ) . s t a r t } g e t f o c u s ( ) { r e t u r n s u p e r . f o c u s | | t h i s . _ d o c u m e n t . _ g e t D e f a u l t R a n g e ( ) . e n d } g e t r a n g e C o u n t ( ) { r e t u r n t h i s . _ r a n g e s . l e n g t h ? t h i s . _ r a n g e s . l e n g t h : 1 } g e t h a s O w n R a n g e ( ) { r e t u r n t h i s . _ r a n g e s . l e n g t h > 0 } g e t i s G r a v i t y O v e r r i d d e n ( ) { r e t u r n ! ! t h i s . _ o v e r r i d d e n G r a v i t y R e g i s t e r . s i z e } d e s t r o y ( ) { f o r ( l e t t = 0 ; t < t h i s . _ r a n g e s . l e n g t h ; t + + ) t h i s . _ r a n g e s [ t ] . d e t a c h ( ) ; t h i s . s t o p L i s t e n i n g ( ) } * g e t R a n g e s ( ) { t h i s . _ r a n g e s . l e n g t h ? y i e l d * s u p e r . g e t R a n g e s ( ) : y i e l d t h i s . _ d o c u m e n t . _ g e t D e f a u l t R a n g e ( ) } g e t F i r s t R a n g e ( ) { r e t u r n s u p e r . g e t F i r s t R a n g e ( ) | | t h i s . _ d o c u m e n t . _ g e t D e f a u l t R a n g e ( ) } g e t L a s t R a n g e ( ) { r e t u r n s u p e r . g e t L a s t R a n g e ( ) | | t h i s . _ d o c u m e n t . _ g e t D e f a u l t R a n g e ( ) } s e t T o ( t , e , n ) { s u p e r . s e t T o ( t , e , n ) , t h i s . _ u p d a t e A t t r i b u t e s ( ! 0 ) } s e t F o c u s ( t , e ) { s u p e r . s e t F o c u s ( t , e ) , t h i s . _ u p d a t e A t t r i b u t e s ( ! 0 ) } s e t A t t r i b u t e ( t , e ) { i f ( t h i s . _ s e t A t t r i b u t e ( t , e ) ) { c o n s t e = [ t ] ; t h i s . f i r e ( " c h a n g e : a t t r i b u t e " , { a t t r i b u t e K e y s : e , d i r e c t C h a n g e : ! 0 } ) } } r e m o v e A t t r i b u t e ( t ) { i f ( t h i s . _ r e m o v e A t t r i b u t e ( t ) ) { c o n s t e = [ t ] ; t h i s . f i r e ( " c h a n g e : a t t r i b u t e " , { a t t r i b u t e K e y s : e , d i r e c t C h a n g e : ! 0 } ) } } o v e r r i d e G r a v i t y ( ) { c o n s t t = X n ( ) ; r e t u r n t h i s . _ o v e r r i d d e n G r a v i t y R e g i s t e r . a d d ( t ) , 1 = = = t h i s . _ o v e r r i d d e n G r a v i t y R e g i s t e r . s i z e & & t h i s . _ u p d a t e A t t r i b u t e s ( ! 0 ) , t } r e s t o r e G r a v i t y ( t ) { i f ( ! t h i s . _ o v e r r i d d e n G r a v i t y R e g i s t e r . h a s ( t ) ) t h r o w n e w Z n . b ( " d o c u m e n t - s e l e c t i o n - g r a v i t y - w r o n g - r e s t o r e : A t t e m p t i n g t o r e s t o r e t h e s e l e c t i o n g r a v i t y f o r a n u n k n o w n U I D . " , t h i s , { u i d : t } ) ; t h i s . _ o v e r r i d d e n G r a v i t y R e g i s t e r . d e l e t e ( t ) , t h i s . i s G r a v i t y O v e r r i d d e n | | t h i s . _ u p d a t e A t t r i b u t e s ( ! 0 ) } _ p o p R a n g e ( ) { t h i s . _ r a n g e s . p o p ( ) . d e t a c h ( ) } _ p u s h R a n g e ( t ) { c o n s t e = t h i s . _ p r e p a r e R a n g e ( t ) ; e & & t h i s . _ r a n g e s . p u s h ( e ) } _ p r e p a r e R a n g e ( t ) { i f ( t h i s . _ c h e c k R a n g e ( t ) , t . r o o t = = t h i s . _ d o c u m e n t . g r a v e y a r d ) r e t u r n ; c o n s t e = a a . f r o m R a n g e ( t ) ; r e t u r n e . o n ( " c h a n g e : r a n g e " , ( t , n , i ) = > { t h i s . _ h a s C h a n g e d R a n g e = ! 0 , e . r o o t = = t h i s . _ d o c u m e n t . g r a v e y a r d & & t h i s . _ f i x G r a v e y a r d R a n g e s D a t a . p u s h ( { l i v e R a n g e : e , s o u r c e P o s i t i o n : i . d e l e t i o n P o s i t i o n } ) } ) , e } _ u p d a t e M a r k e r s ( ) { c o n s t t = [ ] ; f o r ( c o n s t e o f t h i s . _ m o d e l . m a r k e r s ) { c o n s t n = e . g e t R a n g e ( ) ; f o r ( c o n s t i o f t h i s . g e t R a n g e s ( ) ) n . c o n t a i n s R a n g e ( i , ! i . i s C o l l a p s e d ) & & t . p u s h ( e ) } f o r ( c o n s t e o f t ) t h i s . m a r k e r s . h a s ( e ) | | t h i s . m a r k e r s . a d d ( e ) ; f o r ( c o n s t e o f A r r a y . f r o m ( t h i s . m a r k e r s ) ) t . i n c l u d e s ( e ) | | t h i s . m a r k e r s . r e m o v e ( e ) } _ u p d a t e A t t r i b u t e s ( t ) { c o n s t e = z s ( t h i s . _ g e t S u r r o u n d i n g A t t r i b u t e s ( ) ) , n = z s ( t h i s . g e t A t t r i b u t e s ( ) ) ; i f ( t ) t h i s . _ a t t r i b u t e P r i o r i t y = n e w M a p , t h i s . _ a t t r s = n e w M a p ; e l s e f o r ( c o n s t [ t , e ] o f t h i s . _ a t t r i b u t e P r i o r i t y ) " l o w " = = e & & ( t h i s . _ a t t r s . d e l e t e ( t ) , t h i s . _ a t t r i b u t e P r i o r i t y . d e l e t e ( t ) ) ; t h i s . _ s e t A t t r i b u t e s T o ( e ) ; c o n s t i = [ ] ; f o r ( c o n s t [ t , e ] o f t h i s . g e t A t t r i b u t e s ( ) ) n . h a s ( t ) & & n . g e t ( t ) = = = e | | i . p u s h ( t ) ; f o r ( c o n s t [ t ] o f n ) t h i s . h a s A t t r i b u t e ( t ) | | i . p u s h ( t ) ; i . l e n g t h > 0 & & t h i s . f i r e ( " c h a n g e : a t t r i b u t e " , { a t t r i b u t e K e y s : i , d i r e c t C h a n g e : ! 1 } ) } _ s e t A t t r i b u t e ( t , e , n = ! 0 ) { c o n s t i = n ? " n o r m a l " : " l o w " ; r e t u r n ( " l o w " ! = i | | " n o r m a l " ! = t h i s . _ a t t r i b u t e P r i o r i t y . g e t ( t ) ) & & ( s u p e r . g e t A t t r i b u t e ( t ) ! = = e & & ( t h i s . _ a t t r s . s e t ( t , e ) , t h i s . _ a t t r i b u t e P r i o r i t y . s e t ( t , i ) , ! 0 ) ) } _ r e m o v e A t t r i b u t e ( t , e = ! 0 ) { c o n s t n = e ? " n o r m a l " : " l o w " ; r e t u r n ( " l o w " ! = n | | " n o r m a l " ! = t h i s . _ a t t r i b u t e P r i o r i t y . g e t ( t ) ) & & ( t h i s . _ a t t r i b u t e P r i o r i t y . s e t ( t , n ) , ! ! s u p e r . h a s A t t r i b u t e ( t ) & & ( t h i s . _ a t t r s . d e l e t e ( t ) , ! 0 ) ) } _ s e t A t t r i b u t e s T o ( t ) { c o n s t e = n e w S e t ; f o r ( c o n s t [ e , n ] o f t h i s . g e t A t t r i b u t e s ( ) ) t . g e t ( e ) ! = = n & & t h i s . _ r e m o v e A t t r i b u t e ( e , ! 1 ) ; f o r ( c o n s t [ n , i ] o f t ) { t h i s . _ s e t A t t r i b u t e ( n , i , ! 1 ) & & e . a d d ( n ) } r e t u r n e } * _ g e t S t o r e d A t t r i b u t e s ( ) { c o n s t t = t h i s . g e t F i r s t P o s i t i o n ( ) . p a r e n t ; i f ( t h i s . i s C o l l a p s e d & & t . i s E m p t y ) f o r ( c o n s t e o f t . g e t A t t r i b u t e K e y s ( ) ) i f ( e . s t a r t s W i t h ( d a ) ) { c o n s t n = e . s u b s t r ( d a . l e n g t h ) ; y i e l d [ n , t . g e t A t t r i b u t e ( e ) ] } } _ g e t S u r r o u n d i n g A t t r i b u t e s ( ) { c o n s t t = t h i s . g e t F i r s t P o s i t i o n ( ) , e = t h i s . _ m o d e l . s c h e m a ; l e t n = n u l l ; i f ( t h i s . i s C o l l a p s e d ) { c o n s t e = t . t e x t N o d e ? t . t e x t N o d e : t . n o d e B e f o r e , i = t . t e x t N o d e ? t . t e x t N o d e : t . n o d e A f t e r ; i f ( t h i s . i s G r a v i t y O v e r r i d d e n | | ( n = f a ( e ) ) , n | | ( n = f a ( i ) ) , ! t h i s . i s G r a v i t y O v e r r i d d e n & & ! n ) { l e t t = e ; f o r ( ; t & & ! n ; ) n = f a ( t = t . p r e v i o u s S i b l i n g ) } i f ( ! n ) { l e t t = i ; f o r ( ; t & & ! n ; ) n = f a ( t = t . n e x t S i b l i n g ) } n | | ( n = t h i s . _ g e t S t o r e d A t t r i b u t e s ( ) ) } e l s e { c o n s t t = t h i s . g e t F i r s t R a n g e ( ) ; f o r ( c o n s t i o f t ) { i f ( i . i t e m . i s ( " e l e m e n t " ) & & e . i s O b j e c t ( i . i t e m ) ) b
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s w a e x t e n d s p a { e l e m e n t T o E l e m e n t ( t ) { r e t u r n t h i s . a d d ( f u n c t i o n ( t ) { r e t u r n ( t = b a ( t ) ) . v i e w = _ a ( t . v i e w , " c o n t a i n e r " ) , e = > { e . o n ( " i n s e r t : " + t . m o d e l , f u n c t i o n ( t ) { r e t u r n ( e , n , i ) = > { c o n s t o = t ( n . i t e m , i . w r i t e r ) ; i f ( ! o ) r e t u r n ; i f ( ! i . c o n s u m a b l e . c o n s u m e ( n . i t e m , " i n s e r t " ) ) r e t u r n ; c o n s t r = i . m a p p e r . t o V i e w P o s i t i o n ( n . r a n g e . s t a r t ) ; i . m a p p e r . b i n d E l e m e n t s ( n . i t e m , o ) , i . w r i t e r . i n s e r t ( r , o ) } } ( t . v i e w ) , { p r i o r i t y : t . c o n v e r t e r P r i o r i t y | | " n o r m a l " } ) } } ( t ) ) } a t t r i b u t e T o E l e m e n t ( t ) { r e t u r n t h i s . a d d ( f u n c t i o n ( t ) { l e t e = " a t t r i b u t e : " + ( ( t = b a ( t ) ) . m o d e l . k e y ? t . m o d e l . k e y : t . m o d e l ) ; t . m o d e l . n a m e & & ( e + = " : " + t . m o d e l . n a m e ) ; i f ( t . m o d e l . v a l u e s ) f o r ( c o n s t e o f t . m o d e l . v a l u e s ) t . v i e w [ e ] = _ a ( t . v i e w [ e ] , " a t t r i b u t e " ) ; e l s e t . v i e w = _ a ( t . v i e w , " a t t r i b u t e " ) ; c o n s t n = v a ( t ) ; r e t u r n i = > { i . o n ( e , f u n c t i o n ( t ) { r e t u r n ( e , n , i ) = > { c o n s t o = t ( n . a t t r i b u t e O l d V a l u e , i . w r i t e r ) , r = t ( n . a t t r i b u t e N e w V a l u e , i . w r i t e r ) ; i f ( ! o & & ! r ) r e t u r n ; i f ( ! i . c o n s u m a b l e . c o n s u m e ( n . i t e m , e . n a m e ) ) r e t u r n ; c o n s t s = i . w r i t e r , a = s . d o c u m e n t . s e l e c t i o n ; i f ( n . i t e m i n s t a n c e o f n a | | n . i t e m i n s t a n c e o f u a ) s . w r a p ( a . g e t F i r s t R a n g e ( ) , r ) ; e l s e { l e t t = i . m a p p e r . t o V i e w R a n g e ( n . r a n g e ) ; n u l l ! = = n . a t t r i b u t e O l d V a l u e & & o & & ( t = s . u n w r a p ( t , o ) ) , n u l l ! = = n . a t t r i b u t e N e w V a l u e & & r & & s . w r a p ( t , r ) } } } ( n ) , { p r i o r i t y : t . c o n v e r t e r P r i o r i t y | | " n o r m a l " } ) } } ( t ) ) } a t t r i b u t e T o A t t r i b u t e ( t ) { r e t u r n t h i s . a d d ( f u n c t i o n ( t ) { l e t e = " a t t r i b u t e : " + ( ( t = b a ( t ) ) . m o d e l . k e y ? t . m o d e l . k e y : t . m o d e l ) ; t . m o d e l . n a m e & & ( e + = " : " + t . m o d e l . n a m e ) ; i f ( t . m o d e l . v a l u e s ) f o r ( c o n s t e o f t . m o d e l . v a l u e s ) t . v i e w [ e ] = y a ( t . v i e w [ e ] ) ; e l s e t . v i e w = y a ( t . v i e w ) ; c o n s t n = v a ( t ) ; r e t u r n i = > { i . o n ( e , f u n c t i o n ( t ) { r e t u r n ( e , n , i ) = > { c o n s t o = t ( n . a t t r i b u t e O l d V a l u e , n ) , r = t ( n . a t t r i b u t e N e w V a l u e , n ) ; i f ( ! o & & ! r ) r e t u r n ; i f ( ! i . c o n s u m a b l e . c o n s u m e ( n . i t e m , e . n a m e ) ) r e t u r n ; c o n s t s = i . m a p p e r . t o V i e w E l e m e n t ( n . i t e m ) , a = i . w r i t e r ; i f ( ! s ) t h r o w n e w Z n . b ( " c o n v e r s i o n - a t t r i b u t e - t o - a t t r i b u t e - o n - t e x t : T r y i n g t o c o n v e r t t e x t n o d e ' s a t t r i b u t e w i t h a t t r i b u t e - t o - a t t r i b u t e c o n v e r t e r . " , [ n , i ] ) ; i f ( n u l l ! = = n . a t t r i b u t e O l d V a l u e & & o ) i f ( " c l a s s " = = o . k e y ) { c o n s t t = A r r a y . i s A r r a y ( o . v a l u e ) ? o . v a l u e : [ o . v a l u e ] ; f o r ( c o n s t e o f t ) a . r e m o v e C l a s s ( e , s ) } e l s e i f ( " s t y l e " = = o . k e y ) { c o n s t t = O b j e c t . k e y s ( o . v a l u e ) ; f o r ( c o n s t e o f t ) a . r e m o v e S t y l e ( e , s ) } e l s e a . r e m o v e A t t r i b u t e ( o . k e y , s ) ; i f ( n u l l ! = = n . a t t r i b u t e N e w V a l u e & & r ) i f ( " c l a s s " = = r . k e y ) { c o n s t t = A r r a y . i s A r r a y ( r . v a l u e ) ? r . v a l u e : [ r . v a l u e ] ; f o r ( c o n s t e o f t ) a . a d d C l a s s ( e , s ) } e l s e i f ( " s t y l e " = = r . k e y ) { c o n s t t = O b j e c t . k e y s ( r . v a l u e ) ; f o r ( c o n s t e o f t ) a . s e t S t y l e ( e , r . v a l u e [ e ] , s ) } e l s e a . s e t A t t r i b u t e ( r . k e y , r . v a l u e , s ) } } ( n ) , { p r i o r i t y : t . c o n v e r t e r P r i o r i t y | | " n o r m a l " } ) } } ( t ) ) } m a r k e r T o E l e m e n t ( t ) { r e t u r n t h i s . a d d ( f u n c t i o n ( t ) { r e t u r n ( t = b a ( t ) ) . v i e w = _ a ( t . v i e w , " u i " ) , e = > { e . o n ( " a d d M a r k e r : " + t . m o d e l , f u n c t i o n ( t ) { r e t u r n ( e , n , i ) = > { n . i s O p e n i n g = ! 0 ; c o n s t o = t ( n , i . w r i t e r ) ; n . i s O p e n i n g = ! 1 ; c o n s t r = t ( n , i . w r i t e r ) ; i f ( ! o | | ! r ) r e t u r n ; c o n s t s = n . m a r k e r R a n g e ; i f ( s . i s C o l l a p s e d & & ! i . c o n s u m a b l e . c o n s u m e ( s , e . n a m e ) ) r e t u r n ; f o r ( c o n s t t o f s ) i f ( ! i . c o n s u m a b l e . c o n s u m e ( t . i t e m , e . n a m e ) ) r e t u r n ; c o n s t a = i . m a p p e r , c = i . w r i t e r ; c . i n s e r t ( a . t o V i e w P o s i t i o n ( s . s t a r t ) , o ) , i . m a p p e r . b i n d E l e m e n t T o M a r k e r ( o , n . m a r k e r N a m e ) , s . i s C o l l a p s e d | | ( c . i n s e r t ( a . t o V i e w P o s i t i o n ( s . e n d ) , r ) , i . m a p p e r . b i n d E l e m e n t T o M a r k e r ( r , n . m a r k e r N a m e ) ) , e . s t o p ( ) } } ( t . v i e w ) , { p r i o r i t y : t . c o n v e r t e r P r i o r i t y | | " n o r m a l " } ) , e . o n ( " r e m o v e M a r k e r : " + t . m o d e l , ( t . v i e w , ( t , e , n ) = > { c o n s t i = n . m a p p e r . m a r k e r N a m e T o E l e m e n t s ( e . m a r k e r N a m e ) ; i f ( i ) { f o r ( c o n s t t o f i ) n . m a p p e r . u n b i n d E l e m e n t F r o m M a r k e r N a m e ( t , e . m a r k e r N a m e ) , n . w r i t e r . c l e a r ( n . w r i t e r . c r e a t e R a n g e O n ( t ) , t ) ; n . w r i t e r . c l e a r C l o n e d E l e m e n t s G r o u p ( e . m a r k e r N a m e ) , t . s t o p ( ) } } ) , { p r i o r i t y : t . c o n v e r t e r P r i o r i t y | | " n o r m a l " } ) } } ( t ) ) } m a r k e r T o H i g h l i g h t ( t ) { r e t u r n t h i s . a d d ( f u n c t i o n ( t ) { r e t u r n e = > { e . o n ( " a d d M a r k e r : " + t . m o d e l , f u n c t i o n ( t ) { r e t u r n ( e , n , i ) = > { i f ( ! n . i t e m ) r e t u r n ; i f ( ! ( n . i t e m i n s t a n c e o f n a | | n . i t e m i n s t a n c e o f u a | | n . i t e m . i s ( " t e x t P r o x y " ) ) ) r e t u r n ; c o n s t o = x a ( t , n , i ) ; i f ( ! o ) r e t u r n ; i f ( ! i . c o n s u m a b l e . c o n s u m e ( n . i t e m , e . n a m e ) ) r e t u r n ; c o n s t r = k a ( o ) , s = i . w r i t e r , a = s . d o c u m e n t . s e l e c t i o n ; i f ( n . i t e m i n s t a n c e o f n a | | n . i t e m i n s t a n c e o f u a ) s . w r a p ( a . g e t F i r s t R a n g e ( ) , r , a ) ; e l s e { c o n s t t = i . m a p p e r . t o V i e w R a n g e ( n . r a n g e ) , e = s . w r a p ( t , r ) ; f o r ( c o n s t t o f e . g e t I t e m s ( ) ) i f ( t . i s ( " a t t r i b u t e E l e m e n t " ) & & t . i s S i m i l a r ( r ) ) { i . m a p p e r . b i n d E l e m e n t T o M a r k e r ( t , n . m a r k e r N a m e ) ; b r e a k } } } } ( t . v i e w ) , { p r i o r i t y : t . c o n v e r t e r P r i o r i t y | | " n o r m a l " } ) , e . o n ( " a d d M a r k e r : " + t . m o d e l , f u n c t i o n ( t ) { r e t u r n ( e , n , i ) = > { i f ( ! n . i t e m ) r e t u r n ; i f ( ! ( n . i t e
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /class Ca extends pa{elementToElement(t){return this.add(Aa(t))}elementToAttribute(t){return this.add(function(t){Ta(t=ba(t));const e=Ea(t,!1),n=Pa(t.view),i=n?"element:"+n:"element";return n=>{n.on(i,e,{priority:t.converterPriority||"low"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=ba(t);let e=null;("string"==typeof t.view||t.view.key)&&(e=function(t){"string"==typeof t.view&&(t.view={key:t.view});const e=t.view.key;let n;if("class"==e||"style"==e){n={["class"==e?"classes":"styles"]:t.view.value}}else{const i=void 0===t.view.value?/ [ \ s \ S ] * / : t . v i e w . v a l u e ; n = { a t t r i b u t e s : { [ e ] : i } } } t . v i e w . n a m e & & ( n . n a m e = t . v i e w . n a m e ) ; r e t u r n t . v i e w = n , e } ( t ) ) ; T a ( t , e ) ; c o n s t n = E a ( t , ! 0 ) ; r e t u r n e = > { e . o n ( " e l e m e n t " , n , { p r i o r i t y : t . c o n v e r t e r P r i o r i t y | | " l o w " } ) } } ( t ) ) } e l e m e n t T o M a r k e r ( t ) { r e t u r n t h i s . a d d ( f u n c t i o n ( t ) { r e t u r n f u n c t i o n ( t ) { c o n s t e = t . m o d e l ; t . m o d e l = ( t , n ) = > { c o n s t i = " s t r i n g " = = t y p e o f e ? e : e ( t ) ; r e t u r n n . c r e a t e E l e m e n t ( " $ m a r k e r " , { " d a t a - n a m e " : i } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( t = b a ( t ) ) , A a ( t ) } ( t ) ) } } f u n c t i o n A a ( t ) { c o n s t e = f u n c t i o n ( t ) { c o n s t e = t . v i e w ? n e w k i ( t . v i e w ) : n u l l ; r e t u r n ( n , i , o ) = > { l e t r = { } ; i f ( e ) { c o n s t t = e . m a t c h ( i . v i e w I t e m ) ; i f ( ! t ) r e t u r n ; r = t . m a t c h } r . n a m e = ! 0 ; c o n s t s = f u n c t i o n ( t , e , n ) { r e t u r n t i n s t a n c e o f F u n c t i o n ? t ( e , n ) : n . c r e a t e E l e m e n t ( t ) } ( t . m o d e l , i . v i e w I t e m , o . w r i t e r ) ; i f ( ! s ) r e t u r n ; i f ( ! o . c o n s u m a b l e . t e s t ( i . v i e w I t e m , r ) ) r e t u r n ; c o n s t a = o . s p l i t T o A l l o w e d P a r e n t ( s , i . m o d e l C u r s o r ) ; i f ( ! a ) r e t u r n ; o . w r i t e r . i n s e r t ( s , a . p o s i t i o n ) , o . c o n v e r t C h i l d r e n ( i . v i e w I t e m , o . w r i t e r . c r e a t e P o s i t i o n A t ( s , 0 ) ) , o . c o n s u m a b l e . c o n s u m e ( i . v i e w I t e m , r ) ; c o n s t c = o . g e t S p l i t P a r t s ( s ) ; i . m o d e l R a n g e = n e w Z s ( o . w r i t e r . c r e a t e P o s i t i o n B e f o r e ( s ) , o . w r i t e r . c r e a t e P o s i t i o n A f t e r ( c [ c . l e n g t h - 1 ] ) ) , a . c u r s o r P a r e n t ? i . m o d e l C u r s o r = o . w r i t e r . c r e a t e P o s i t i o n A t ( a . c u r s o r P a r e n t , 0 ) : i . m o d e l C u r s o r = i . m o d e l R a n g e . e n d } } ( t = b a ( t ) ) , n = P a ( t . v i e w ) , i = n ? " e l e m e n t : " + n : " e l e m e n t " ; r e t u r n n = > { n . o n ( i , e , { p r i o r i t y : t . c o n v e r t e r P r i o r i t y | | " n o r m a l " } ) } } f u n c t i o n P a ( t ) { r e t u r n " s t r i n g " = = t y p e o f t ? t : " o b j e c t " = = t y p e o f t & & " s t r i n g " = = t y p e o f t . n a m e ? t . n a m e : n u l l } f u n c t i o n T a ( t , e = n u l l ) { c o n s t n = n u l l = = = e | | ( t = > t . g e t A t t r i b u t e ( e ) ) , i = " o b j e c t " ! = t y p e o f t . m o d e l ? t . m o d e l : t . m o d e l . k e y , o = " o b j e c t " ! = t y p e o f t . m o d e l | | v o i d 0 = = = t . m o d e l . v a l u e ? n : t . m o d e l . v a l u e ; t . m o d e l = { k e y : i , v a l u e : o } } f u n c t i o n E a ( t , e ) { c o n s t n = n e w k i ( t . v i e w ) ; r e t u r n ( i , o , r ) = > { c o n s t s = n . m a t c h ( o . v i e w I t e m ) ; i f ( ! s ) r e t u r n ; c o n s t a = t . m o d e l . k e y , c = " f u n c t i o n " = = t y p e o f t . m o d e l . v a l u e ? t . m o d e l . v a l u e ( o . v i e w I t e m ) : t . m o d e l . v a l u e ; n u l l ! = = c & & ( ! f u n c t i o n ( t , e ) { c o n s t n = " f u n c t i o n " = = t y p e o f t ? t ( e ) : t ; i f ( " o b j e c t " = = t y p e o f n & & ! P a ( n ) ) r e t u r n ! 1 ; r e t u r n ! n . c l a s s e s & & ! n . a t t r i b u t e s & & ! n . s t y l e s } ( t . v i e w , o . v i e w I t e m ) ? d e l e t e s . m a t c h . n a m e : s . m a t c h . n a m e = ! 0 , r . c o n s u m a b l e . t e s t ( o . v i e w I t e m , s . m a t c h ) & & ( o . m o d e l R a n g e | | ( o = O b j e c t . a s s i g n ( o , r . c o n v e r t C h i l d r e n ( o . v i e w I t e m , o . m o d e l C u r s o r ) ) ) , f u n c t i o n ( t , e , n , i ) { l e t o = ! 1 ; f o r ( c o n s t r o f A r r a y . f r o m ( t . g e t I t e m s ( { s h a l l o w : n } ) ) ) i . s c h e m a . c h e c k A t t r i b u t e ( r , e . k e y ) & & ( i . w r i t e r . s e t A t t r i b u t e ( e . k e y , e . v a l u e , r ) , o = ! 0 ) ; r e t u r n o } ( o . m o d e l R a n g e , { k e y : a , v a l u e : c } , e , r ) & & r . c o n s u m a b l e . c o n s u m e ( o . v i e w I t e m , s . m a t c h ) ) ) } } c l a s s S a { c o n s t r u c t o r ( t ) { t h i s . m o d e l = t , t h i s . v i e w = n e w L s , t h i s . m a p p e r = n e w Q s , t h i s . d o w n c a s t D i s p a t c h e r = n e w t a ( { m a p p e r : t h i s . m a p p e r } ) ; c o n s t e = t h i s . m o d e l . d o c u m e n t , n = e . s e l e c t i o n , i = t h i s . m o d e l . m a r k e r s ; t h i s . l i s t e n T o ( t h i s . m o d e l , " _ b e f o r e C h a n g e s " , ( ) = > { t h i s . v i e w . _ d i s a b l e R e n d e r i n g ( ! 0 ) } , { p r i o r i t y : " h i g h e s t " } ) , t h i s . l i s t e n T o ( t h i s . m o d e l , " _ a f t e r C h a n g e s " , ( ) = > { t h i s . v i e w . _ d i s a b l e R e n d e r i n g ( ! 1 ) } , { p r i o r i t y : " l o w e s t " } ) , t h i s . l i s t e n T o ( e , " c h a n g e " , ( ) = > { t h i s . v i e w . c h a n g e ( t = > { t h i s . d o w n c a s t D i s p a t c h e r . c o n v e r t C h a n g e s ( e . d i f f e r , i , t ) , t h i s . d o w n c a s t D i s p a t c h e r . c o n v e r t S e l e c t i o n ( n , i , t ) } ) } , { p r i o r i t y : " l o w " } ) , t h i s . l i s t e n T o ( t h i s . v i e w . d o c u m e n t , " s e l e c t i o n C h a n g e " , f u n c t i o n ( t , e ) { r e t u r n ( n , i ) = > { c o n s t o = i . n e w S e l e c t i o n , r = n e w n a , s = [ ] ; f o r ( c o n s t t o f o . g e t R a n g e s ( ) ) s . p u s h ( e . t o M o d e l R a n g e ( t ) ) ; r . s e t T o ( s , { b a c k w a r d : o . i s B a c k w a r d } ) , r . i s E q u a l ( t . d o c u m e n t . s e l e c t i o n ) | | t . c h a n g e ( t = > { t . s e t S e l e c t i o n ( r ) } ) } } ( t h i s . m o d e l , t h i s . m a p p e r ) ) , t h i s . d o w n c a s t D i s p a t c h e r . o n ( " i n s e r t : $ t e x t " , ( t , e , n ) = > { i f ( ! n . c o n s u m a b l e . c o n s u m e ( e . i t e m , " i n s e r t " ) ) r e t u r n ; c o n s t i = n . w r i t e r , o = n . m a p p e r . t o V i e w P o s i t i o n ( e . r a n g e . s t a r t ) , r = i . c r e a t e T e x t ( e . i t e m . d a t a ) ; i . i n s e r t ( o , r ) } , { p r i o r i t y : " l o w e s t " } ) , t h i s . d o w n c a s t D i s p a t c h e r . o n ( " r e m o v e " , ( t , e , n ) = > { c o n s t i = n . m a p p e r . t o V i e w P o s i t i o n ( e . p o s i t i o n ) , o = e . p o s i t i o n . g e t S h i f t e d B y ( e . l e n g t h ) , r = n . m a p p e r . t o V i e w P o s i t i o n ( o , { i s P h a n t o m : ! 0 } ) , s = n . w r i t e r . c r e a t e R a n g e ( i , r ) , a = n . w r i t e r . r e m o v e ( s . g e t T r i m m e d ( ) ) ; f o r ( c o n s t t o f n . w r i t e r . c r e a t e R a n g e I n ( a ) . g e t I t e m s ( ) ) n . m a p p e r . u n b i n d V i e w E l e m e n t ( t ) } , { p r i o r i t y : " l o w " } ) , t h i s . d o w n c a s t D i s p a t c h e r . o n ( " s e l e c t i o n " , ( t , e , n ) = > { c o n s t i = n . w r i t e r , o = i . d o c u m e n t . s e l e c t i o n ; f o r ( c o n s t t o f o . g e t R a n g e s ( ) ) t . i s C o l l a p s e d & & t . e n d . p a r e n t . d o c u m e n t & & n . w r i t e r . m e r g e A t t r i b u t e s ( t . s t a r t ) ; i . s e t S e l e c t i o n ( n u l l ) } , { p r i o r i t y : " l o w " } ) , t h i s . d o w n c a s t D i s p a t c h e r . o n ( " s e l e c t i o n " , ( t , e , n ) = > { c o n s t i = e . s e l e c t i o n ; i f ( i . i s C o l l a p s e d ) r e t u r n ; i f ( ! n . c o n s u m a b l e . c o n s u m e ( i , " s e l e c t i o n " ) ) r e t u r n ; c o n s t o = [ ] ; f o r ( c o n s t t o f i . g e t R a n g e s ( ) ) { c o n s t e = n . m a p p e r . t o V i e w R a n g e ( t ) ; o . p u s h ( e ) } n . w r i t e r . s e t S e l e c t i o n ( o , { b a c k w a r d : i . i s B a c k w a r d } ) } , { p r i o r i t y : " l o w " } ) , t h i s . d o w n c a s t D i s p a t c h e r . o n ( " s e l e c t i o n " , ( t , e , n ) = > { c o n s t i = e . s e l e c t i o n ; i f ( ! i . i s C o l l a p s e d ) r e t u r n ; i f ( ! n . c o n s u m a b l e . c o n s u m e ( i , " s e l e c t i o n " ) ) r e t u r n ; c o n s t o = n . w r i t e r , r = i . g e t F i r s t P o s i t i o n ( ) , s = n . m a p p e r . t o V i e w P o s i t i o n ( r ) , a = o . b r
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Ra { constructor ( t , e = [ ] ) { this . _editor = t , this . _availablePlugins = new Map , this . _plugins = new Map ; for ( const t of e ) this . _availablePlugins . set ( t , t ) , t . pluginName && this . _availablePlugins . set ( t . pluginName , t ) } * [ Symbol . iterator ] ( ) { for ( const t of this . _plugins ) "function" == typeof t [ 0 ] && ( yield t ) } get ( t ) { const e = this . _plugins . get ( t ) ; if ( ! e ) { const e = "plugincollection-plugin-not-loaded: The requested plugin is not loaded." ; let n = t ; throw "function" == typeof t && ( n = t . pluginName || t . name ) , new Zn . b ( e , this . _editor , { plugin : n } ) } return e } has ( t ) { return this . _plugins . has ( t ) } init ( t , e = [ ] ) { const n = this , i = this . _editor , o = new Set , r = [ ] , s = h ( t ) , a = h ( e ) , c = function ( t ) { const e = [ ] ; for ( const n of t ) u ( n ) || e . push ( n ) ; return e . length ? e : null } ( t ) ; if ( c ) { const t = "plugincollection-plugin-not-found: Some plugins are not available and could not be loaded." ; return console . error ( Object ( Zn . a ) ( t ) , { plugins : c } ) , Promise . reject ( new Zn . b ( t , this . _editor , { plugins : c } ) ) } return Promise . all ( s . map ( l ) ) . then ( ( ) => d ( r , "init" ) ) . then ( ( ) => d ( r , "afterInit" ) ) . then ( ( ) => r ) ; function l ( t ) { if ( ! a . includes ( t ) && ! n . _plugins . has ( t ) && ! o . has ( t ) ) return function ( t ) { return new Promise ( s => { o . add ( t ) , t . requires && t . requires . forEach ( n => { const o = u ( n ) ; if ( e . includes ( o ) ) throw new Zn . b ( "plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option." , i , { plugin : o , requiredBy : t } ) ; l ( o ) } ) ; const a = new t ( i ) ; n . _add ( t , a ) , r . push ( a ) , s ( ) } ) } ( t ) . catch ( e => { throw console . error ( Object ( Zn . a ) ( "plugincollection-load: It was not possible to load the plugin." ) , { plugin : t } ) , e } ) } function d ( t , e ) { return t . reduce ( ( t , n ) => n [ e ] ? t . then ( n [ e ] . bind ( n ) ) : t , Promise . resolve ( ) ) } function u ( t ) { return "function" == typeof t ? t : n . _availablePlugins . get ( t ) } function h ( t ) { return t . map ( t => u ( t ) ) . filter ( t => ! ! t ) } } destroy ( ) { const t = Array . from ( this ) . map ( ( [ , t ] ) => t ) . filter ( t => "function" == typeof t . destroy ) . map ( t => t . destroy ( ) ) ; return Promise . all ( t ) } _add ( t , e ) { this . _plugins . set ( t , e ) ; const n = t . pluginName ; if ( n ) { if ( this . _plugins . has ( n ) ) throw new Zn . b ( "plugincollection-plugin-name-conflict: Two plugins with the same name were loaded." , null , { pluginName : n , plugin1 : this . _plugins . get ( n ) . constructor , plugin2 : t } ) ; this . _plugins . set ( n , e ) } } } di ( Ra , ii ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Ia { constructor ( ) { this . _commands = new Map } add ( t , e ) { this . _commands . set ( t , e ) } get ( t ) { return this . _commands . get ( t ) } execute ( t , ... e ) { const n = this . get ( t ) ; if ( ! n ) throw new Zn . b ( "commandcollection-command-not-found: Command does not exist." , this , { commandName : t } ) ; n . execute ( ... e ) } * names ( ) { yield * this . _commands . keys ( ) } * commands ( ) { yield * this . _commands . values ( ) } [ Symbol . iterator ] ( ) { return this . _commands [ Symbol . iterator ] ( ) } destroy ( ) { for ( const t of this . commands ( ) ) t . destroy ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /function Oa(t,e){const n=Object.keys(window.CKEDITOR_TRANSLATIONS).length;return 1===n&&(t=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]),0!==n&&function(t,e){return t in window.CKEDITOR_TRANSLATIONS&&e in window.CKEDITOR_TRANSLATIONS[t]}(t,e)?window.CKEDITOR_TRANSLATIONS[t][e].replace(/ \ [ context : [ ^ \ ] ] + \ ] $ / , "" ) : e . replace ( / \[context: [^\]]+\]$/ , "" ) } window . CKEDITOR _TRANSLATIONS || ( window . CKEDITOR _TRANSLATIONS = { } ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const Da = [ "ar" , "fa" , "he" , "ku" , "ug" ] ; class Ma { constructor ( t = { } ) { this . uiLanguage = t . uiLanguage || "en" , this . contentLanguage = t . contentLanguage || this . uiLanguage , this . uiLanguageDirection = Na ( this . uiLanguage ) , this . contentLanguageDirection = Na ( this . contentLanguage ) , this . t = ( ... t ) => this . _t ( ... t ) } get language ( ) { return console . warn ( "locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead." ) , this . uiLanguage } _t ( t , e ) { let n = Oa ( this . uiLanguage , t ) ; return e && ( n = n . replace ( /%(\d+)/g , ( t , n ) => n < e . length ? e [ n ] : t ) ) , n } } function Na ( t ) { return Da . includes ( t ) ? "rtl" : "ltr" }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s V a { c o n s t r u c t o r ( ) { t h i s . _ c o n s u m a b l e s = n e w M a p } a d d ( t , e ) { l e t n ; t . i s ( " t e x t " ) | | t . i s ( " d o c u m e n t F r a g m e n t " ) ? t h i s . _ c o n s u m a b l e s . s e t ( t , ! 0 ) : ( t h i s . _ c o n s u m a b l e s . h a s ( t ) ? n = t h i s . _ c o n s u m a b l e s . g e t ( t ) : ( n = n e w F a , t h i s . _ c o n s u m a b l e s . s e t ( t , n ) ) , n . a d d ( e ) ) } t e s t ( t , e ) { c o n s t n = t h i s . _ c o n s u m a b l e s . g e t ( t ) ; r e t u r n v o i d 0 = = = n ? n u l l : t . i s ( " t e x t " ) | | t . i s ( " d o c u m e n t F r a g m e n t " ) ? n : n . t e s t ( e ) } c o n s u m e ( t , e ) { r e t u r n ! ! t h i s . t e s t ( t , e ) & & ( t . i s ( " t e x t " ) | | t . i s ( " d o c u m e n t F r a g m e n t " ) ? t h i s . _ c o n s u m a b l e s . s e t ( t , ! 1 ) : t h i s . _ c o n s u m a b l e s . g e t ( t ) . c o n s u m e ( e ) , ! 0 ) } r e v e r t ( t , e ) { c o n s t n = t h i s . _ c o n s u m a b l e s . g e t ( t ) ; v o i d 0 ! = = n & & ( t . i s ( " t e x t " ) | | t . i s ( " d o c u m e n t F r a g m e n t " ) ? t h i s . _ c o n s u m a b l e s . s e t ( t , ! 0 ) : n . r e v e r t ( e ) ) } s t a t i c c o n s u m a b l e s F r o m E l e m e n t ( t ) { c o n s t e = { n a m e : ! 0 , a t t r i b u t e s : [ ] , c l a s s e s : [ ] , s t y l e s : [ ] } , n = t . g e t A t t r i b u t e K e y s ( ) ; f o r ( c o n s t t o f n ) " s t y l e " ! = t & & " c l a s s " ! = t & & e . a t t r i b u t e s . p u s h ( t ) ; c o n s t i = t . g e t C l a s s N a m e s ( ) ; f o r ( c o n s t t o f i ) e . c l a s s e s . p u s h ( t ) ; c o n s t o = t . g e t S t y l e N a m e s ( ) ; f o r ( c o n s t t o f o ) e . s t y l e s . p u s h ( t ) ; r e t u r n e } s t a t i c c r e a t e F r o m ( t , e ) { i f ( e | | ( e = n e w V a ) , t . i s ( " t e x t " ) ) r e t u r n e . a d d ( t ) , e ; t . i s ( " e l e m e n t " ) & & e . a d d ( t , V a . c o n s u m a b l e s F r o m E l e m e n t ( t ) ) , t . i s ( " d o c u m e n t F r a g m e n t " ) & & e . a d d ( t ) ; f o r ( c o n s t n o f t . g e t C h i l d r e n ( ) ) e = V a . c r e a t e F r o m ( n , e ) ; r e t u r n e } } c l a s s F a { c o n s t r u c t o r ( ) { t h i s . _ c a n C o n s u m e N a m e = n u l l , t h i s . _ c o n s u m a b l e s = { a t t r i b u t e s : n e w M a p , s t y l e s : n e w M a p , c l a s s e s : n e w M a p } } a d d ( t ) { t . n a m e & & ( t h i s . _ c a n C o n s u m e N a m e = ! 0 ) ; f o r ( c o n s t e i n t h i s . _ c o n s u m a b l e s ) e i n t & & t h i s . _ a d d ( e , t [ e ] ) } t e s t ( t ) { i f ( t . n a m e & & ! t h i s . _ c a n C o n s u m e N a m e ) r e t u r n t h i s . _ c a n C o n s u m e N a m e ; f o r ( c o n s t e i n t h i s . _ c o n s u m a b l e s ) i f ( e i n t ) { c o n s t n = t h i s . _ t e s t ( e , t [ e ] ) ; i f ( ! 0 ! = = n ) r e t u r n n } r e t u r n ! 0 } c o n s u m e ( t ) { t . n a m e & & ( t h i s . _ c a n C o n s u m e N a m e = ! 1 ) ; f o r ( c o n s t e i n t h i s . _ c o n s u m a b l e s ) e i n t & & t h i s . _ c o n s u m e ( e , t [ e ] ) } r e v e r t ( t ) { t . n a m e & & ( t h i s . _ c a n C o n s u m e N a m e = ! 0 ) ; f o r ( c o n s t e i n t h i s . _ c o n s u m a b l e s ) e i n t & & t h i s . _ r e v e r t ( e , t [ e ] ) } _ a d d ( t , e ) { c o n s t n = G t ( e ) ? e : [ e ] , i = t h i s . _ c o n s u m a b l e s [ t ] ; f o r ( c o n s t e o f n ) { i f ( " a t t r i b u t e s " = = = t & & ( " c l a s s " = = = e | | " s t y l e " = = = e ) ) t h r o w n e w Z n . b ( " v i e w c o n s u m a b l e - i n v a l i d - a t t r i b u t e : C l a s s e s a n d s t y l e s s h o u l d b e h a n d l e d s e p a r a t e l y . " , t h i s ) ; i . s e t ( e , ! 0 ) } } _ t e s t ( t , e ) { c o n s t n = G t ( e ) ? e : [ e ] , i = t h i s . _ c o n s u m a b l e s [ t ] ; f o r ( c o n s t e o f n ) i f ( " a t t r i b u t e s " ! = = t | | " c l a s s " ! = = e & & " s t y l e " ! = = e ) { c o n s t t = i . g e t ( e ) ; i f ( v o i d 0 = = = t ) r e t u r n n u l l ; i f ( ! t ) r e t u r n ! 1 } e l s e { c o n s t t = " c l a s s " = = e ? " c l a s s e s " : " s t y l e s " , n = t h i s . _ t e s t ( t , [ . . . t h i s . _ c o n s u m a b l e s [ t ] . k e y s ( ) ] ) ; i f ( ! 0 ! = = n ) r e t u r n n } r e t u r n ! 0 } _ c o n s u m e ( t , e ) { c o n s t n = G t ( e ) ? e : [ e ] , i = t h i s . _ c o n s u m a b l e s [ t ] ; f o r ( c o n s t e o f n ) i f ( " a t t r i b u t e s " ! = = t | | " c l a s s " ! = = e & & " s t y l e " ! = = e ) i . s e t ( e , ! 1 ) ; e l s e { c o n s t t = " c l a s s " = = e ? " c l a s s e s " : " s t y l e s " ; t h i s . _ c o n s u m e ( t , [ . . . t h i s . _ c o n s u m a b l e s [ t ] . k e y s ( ) ] ) } } _ r e v e r t ( t , e ) { c o n s t n = G t ( e ) ? e : [ e ] , i = t h i s . _ c o n s u m a b l e s [ t ] ; f o r ( c o n s t e o f n ) i f ( " a t t r i b u t e s " ! = = t | | " c l a s s " ! = = e & & " s t y l e " ! = = e ) { ! 1 = = = i . g e t ( e ) & & i . s e t ( e , ! 0 ) } e l s e { c o n s t t = " c l a s s " = = e ? " c l a s s e s " : " s t y l e s " ; t h i s . _ r e v e r t ( t , [ . . . t h i s . _ c o n s u m a b l e s [ t ] . k e y s ( ) ] ) } } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s B a { c o n s t r u c t o r ( ) { t h i s . _ s o u r c e D e f i n i t i o n s = { } , t h i s . _ a t t r i b u t e P r o p e r t i e s = { } , t h i s . d e c o r a t e ( " c h e c k C h i l d " ) , t h i s . d e c o r a t e ( " c h e c k A t t r i b u t e " ) , t h i s . o n ( " c h e c k A t t r i b u t e " , ( t , e ) = > { e [ 0 ] = n e w L a ( e [ 0 ] ) } , { p r i o r i t y : " h i g h e s t " } ) , t h i s . o n ( " c h e c k C h i l d " , ( t , e ) = > { e [ 0 ] = n e w L a ( e [ 0 ] ) , e [ 1 ] = t h i s . g e t D e f i n i t i o n ( e [ 1 ] ) } , { p r i o r i t y : " h i g h e s t " } ) } r e g i s t e r ( t , e ) { i f ( t h i s . _ s o u r c e D e f i n i t i o n s [ t ] ) t h r o w n e w Z n . b ( " s c h e m a - c a n n o t - r e g i s t e r - i t e m - t w i c e : A s i n g l e i t e m c a n n o t b e r e g i s t e r e d t w i c e i n t h e s c h e m a . " , t h i s , { i t e m N a m e : t } ) ; t h i s . _ s o u r c e D e f i n i t i o n s [ t ] = [ O b j e c t . a s s i g n ( { } , e ) ] , t h i s . _ c l e a r C a c h e ( ) } e x t e n d ( t , e ) { i f ( ! t h i s . _ s o u r c e D e f i n i t i o n s [ t ] ) t h r o w n e w Z n . b ( " s c h e m a - c a n n o t - e x t e n d - m i s s i n g - i t e m : C a n n o t e x t e n d a n i t e m w h i c h w a s n o t r e g i s t e r e d y e t . " , t h i s , { i t e m N a m e : t } ) ; t h i s . _ s o u r c e D e f i n i t i o n s [ t ] . p u s h ( O b j e c t . a s s i g n ( { } , e ) ) , t h i s . _ c l e a r C a c h e ( ) } g e t D e f i n i t i o n s ( ) { r e t u r n t h i s . _ c o m p i l e d D e f i n i t i o n s | | t h i s . _ c o m p i l e ( ) , t h i s . _ c o m p i l e d D e f i n i t i o n s } g e t D e f i n i t i o n ( t ) { l e t e ; r e t u r n e = " s t r i n g " = = t y p e o f t ? t : t . i s & & ( t . i s ( " t e x t " ) | | t . i s ( " t e x t P r o x y " ) ) ? " $ t e x t " : t . n a m e , t h i s . g e t D e f i n i t i o n s ( ) [ e ] } i s R e g i s t e r e d ( t ) { r e t u r n ! ! t h i s . g e t D e f i n i t i o n ( t ) } i s B l o c k ( t ) { c o n s t e = t h i s . g e t D e f i n i t i o n ( t ) ; r e t u r n ! ( ! e | | ! e . i s B l o c k ) } i s L i m i t ( t ) { c o n s t e = t h i s . g e t D e f i n i t i o n ( t ) ; r e t u r n ! ! e & & ! ( ! e . i s L i m i t & & ! e . i s O b j e c t ) } i s O b j e c t ( t ) { c o n s t e = t h i s . g e t D e f i n i t i o n ( t ) ; r e t u r n ! ( ! e | | ! e . i s O b j e c t ) } i s I n l i n e ( t ) { c o n s t e = t h i s . g e t D e f i n i t i o n ( t ) ; r e t u r n ! ( ! e | | ! e . i s I n l i n e ) } c h e c k C h i l d ( t , e ) { r e t u r n ! ! e & & t h i s . _ c h e c k C o n t e x t M a t c h ( e , t ) } c h e c k A t t r i b u t e ( t , e ) { c o n s t n = t h i s . g e t D e f i n i t i o n ( t . l a s t ) ; r e t u r n ! ! n & & n . a l l o w A t t r i b u t e s . i n c l u d e s ( e ) } c h e c k M e r g e ( t , e = n u l l ) { i f ( t i n s t a n c e o f J s ) { c o n s t e = t . n o d e B e f o r e , n = t . n o d e A f t e r ; i f ( ! ( e i n s t a n c e o f $ s ) ) t h r o w n e w Z n . b ( " s c h e m a - c h e c k - m e r g e - n o - e l e m e n t - b e f o r e : T h e n o d e b e f o r e t h e m e r g e p o s i t i o n m u s t b e a n e l e m e n t . " , t h i s ) ; i f ( ! ( n i n s t a n c e o f $ s ) ) t h r o w n e w Z n . b ( " s c h e m a - c h e c k - m e r g e - n o - e l e m e n t - a f t e r : T h e n o d e a f t e r t h e m e r g e p o s i t i o n m u s t b e a n e l e m e n t . " , t h i s ) ; r e t u r n t h i s . c h e c k M e r g e ( e , n ) } f o r ( c o n s t n o f e . g e t C h i l d r e n ( ) ) i f ( ! t h i s . c h e c k C h i l d ( t , n ) ) r e t u r n ! 1 ; r e t u r n ! 0 } a d d C h i l d C h e c k ( t ) { t h i s . o n ( " c h e c k C h i l d " , ( e , [ n , i ] ) = > { i f ( ! i ) r e t u r n ; c o n s t o = t ( n , i ) ; " b o o l e a n " = = t y p e o f o & & ( e . s t o p ( ) , e . r e t u r n = o ) } , { p r i o r i t y : " h i g h " } ) } a d d A t t r i b u t e C h e c k ( t ) { t h i s . o n ( " c h e c k A t t r i b u t e " , ( e , [ n , i ] ) = > { c o n s t o = t ( n , i ) ; " b o o l e a n " = = t y p e o f o & & ( e . s t o p ( ) , e . r e t u r n = o ) } , { p r i o r i t y : " h i g h " } ) } s e t A t t r i b u t e P r o p e r t i e s ( t , e ) { t h i s . _ a t t r i b u t e P r o p e r t i e s [ t ] = O b j e c t . a s s i g n ( t h i s . g e t A t t r i b u t e P r o p e r t i e s ( t ) , e ) } g e t A t t r i b u t e P r o p e r t i e s ( t ) { r e t u r n t h i s . _ a t t r i b u t e P r o p e r t i e s [ t ] | | { } } g e t L i m i t E l e m e n t ( t ) { l e t e ; i f ( t i n s t a n c e o f J s ) e = t . p a r e n t ; e l s e { e = ( t i n s t a n c e o f Z s ? [ t ] : A r r a y . f r o m ( t . g e t R a n g e s ( ) ) ) . r e d u c e ( ( t , e ) = > { c o n s t n = e . g e t C o m m o n A n c e s t o r ( ) ; r e t u r n t ? t . g e t C o m m o n A n c e s t o r ( n , { i n c l u d e S e l f : ! 0 } ) : n } , n u l l ) } f o r ( ; ! t h i s . i s L i m i t ( e ) & & e . p a r e n t ; ) e = e . p a r e n t ; r e t u r n e } c h e c k A t t r i b u t e I n S e l e c t i o n ( t , e ) { i f ( t . i s C o l l a p s e d ) { c o n s t n = [ . . . t . g e t F i r s t P o s i t i o n ( ) . g e t A n c e s t o r s ( ) , n e w j s ( " " , t . g e t A t t r i b u t e s ( ) ) ] ; r e t u r n t h i s . c h e c k A t t r i b u t e ( n , e ) } { c o n s t n = t . g e t R a n g e s ( ) ; f o r ( c o n s t t o f n ) f o r ( c o n s t n o f t ) i f ( t h i s . c h e c k A t t r i b u t e ( n . i t e m , e ) ) r e t u r n ! 0 } r e t u r n ! 1 } * g e t V a l i d R a n g e s ( t , e ) { t = f u n c t i o n * ( t ) { f o r ( c o n s t e o f t ) y i e l d * e . g e t M i n i m a l F l a t R a n g e s ( ) } ( t ) ; f o r ( c o n s t n o f t ) y i e l d * t h i s . _ g e t V a l i d R a n g e s F o r R a n g e ( n , e ) } g e t N e a r e s t S e l e c t i o n R a n g e ( t , e = " b o t h " ) { i f ( t h i s . c h e c k C h i l d ( t , " $ t e x t " ) ) r e t u r n n e w Z s ( t ) ; l e t n , i ; " b o t h " ! = e & & " b a c k w a r d " ! = e | | ( n = n e w W s ( { s t a r t P o s i t i o n : t , d i r e c t i o n : " b a c k w a r d " } ) ) , " b o t h " ! = e & & " f o r w a r d " ! = e | | ( i = n e w W s ( { s t a r t P o s i t i o n : t } ) ) ; f o r ( c o n s t t o f f u n c t i o n * ( t , e ) { l e t n = ! 1 ; f o r ( ; ! n ; ) { i f ( n = ! 0 , t ) { c o n s t e = t . n e x t ( ) ; e . d o n e | | ( n = ! 1 , y i e l d { w a l k e r : t , v a l u e : e . v a l u e } ) } i f ( e ) { c o n s t t = e . n e x t ( ) ; t . d o n e | | ( n = ! 1 , y i e l d { w a l k e r : e , v a l u e : t . v a l u e } ) } } } ( n , i ) ) { c o n s t e = t . w a l k e r = = n ? " e l e m e n t E n d " : " e l e m e n t S t a r t " , i = t . v a l u e ; i f ( i . t y p e = = e & & t h i s . i s O b j e c t ( i . i t e m ) ) r e t u r n Z s . _ c r e a t e O n ( i . i t e m ) ; i f ( t h i s . c h e c k C h i l d ( i . n e x t P o s i t i o n , " $ t e x t " ) ) r e t u r n n e w Z s ( i . n e x t P o s i t i o n ) } r e t u r n n u l l } f i n d A l l o w e d P a r e n t ( t , e ) { l e t n = t . p a r e n t ; f o r ( ; n ; ) { i f ( t h i s . c h e c k C h i l d ( n , e ) ) r e t u r n n ; i f ( t h i s . i s L i m i t ( n ) ) r e t u r n n u l l ; n = n . p a r e n t } r e t u r n n u l l } r e m o v e D i s a l l o w e d A t t r i b u t e s ( t , e ) { f o r ( c o n s t n o f t ) i f ( n . i s ( " t e x t " ) ) Z a ( t h i s , n , e ) ; e l s e { c o n s t t = Z s . _ c r e a t e I n ( n ) . g e t P o s i t i o n s ( ) ; f o r ( c o n s t n o f t ) { Z a ( t h i s , n . n o d e B e f o r e | | n . p a r e n t , e ) } } } c r e a t e C o n t e x t ( t ) { r e t u r n n e w L a ( t ) } _ c l e a r C a c h e ( ) { t h i s . _ c o m p i l e d D e f i n i t i o n s = n u l l } _ c o
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s Q a { c o n s t r u c t o r ( t = { } ) { t h i s . _ s p l i t P a r t s = n e w M a p , t h i s . _ m o d e l C u r s o r = n u l l , t h i s . c o n v e r s i o n A p i = O b j e c t . a s s i g n ( { } , t ) , t h i s . c o n v e r s i o n A p i . c o n v e r t I t e m = t h i s . _ c o n v e r t I t e m . b i n d ( t h i s ) , t h i s . c o n v e r s i o n A p i . c o n v e r t C h i l d r e n = t h i s . _ c o n v e r t C h i l d r e n . b i n d ( t h i s ) , t h i s . c o n v e r s i o n A p i . s p l i t T o A l l o w e d P a r e n t = t h i s . _ s p l i t T o A l l o w e d P a r e n t . b i n d ( t h i s ) , t h i s . c o n v e r s i o n A p i . g e t S p l i t P a r t s = t h i s . _ g e t S p l i t P a r t s . b i n d ( t h i s ) } c o n v e r t ( t , e , n = [ " $ r o o t " ] ) { t h i s . f i r e ( " v i e w C l e a n u p " , t ) , t h i s . _ m o d e l C u r s o r = f u n c t i o n ( t , e ) { l e t n ; f o r ( c o n s t i o f n e w L a ( t ) ) { c o n s t t = { } ; f o r ( c o n s t e o f i . g e t A t t r i b u t e K e y s ( ) ) t [ e ] = i . g e t A t t r i b u t e ( e ) ; c o n s t o = e . c r e a t e E l e m e n t ( i . n a m e , t ) ; n & & e . a p p e n d ( o , n ) , n = J s . _ c r e a t e A t ( o , 0 ) } r e t u r n n }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( n , e ) , t h i s . c o n v e r s i o n A p i . w r i t e r = e , t h i s . c o n v e r s i o n A p i . c o n s u m a b l e = V a . c r e a t e F r o m ( t ) , t h i s . c o n v e r s i o n A p i . s t o r e = { } ; c o n s t { m o d e l R a n g e : i } = t h i s . _ c o n v e r t I t e m ( t , t h i s . _ m o d e l C u r s o r ) , o = e . c r e a t e D o c u m e n t F r a g m e n t ( ) ; i f ( i ) { t h i s . _ r e m o v e E m p t y E l e m e n t s ( ) ; f o r ( c o n s t t o f A r r a y . f r o m ( t h i s . _ m o d e l C u r s o r . p a r e n t . g e t C h i l d r e n ( ) ) ) e . a p p e n d ( t , o ) ; o . m a r k e r s = f u n c t i o n ( t , e ) { c o n s t n = n e w S e t , i = n e w M a p , o = Z s . _ c r e a t e I n ( t ) . g e t I t e m s ( ) ; f o r ( c o n s t t o f o ) " $ m a r k e r " = = t . n a m e & & n . a d d ( t ) ; f o r ( c o n s t t o f n ) { c o n s t n = t . g e t A t t r i b u t e ( " d a t a - n a m e " ) , o = e . c r e a t e P o s i t i o n B e f o r e ( t ) ; i . h a s ( n ) ? i . g e t ( n ) . e n d = o . c l o n e ( ) : i . s e t ( n , n e w Z s ( o . c l o n e ( ) ) ) , e . r e m o v e ( t ) } r e t u r n i } ( o , e ) } r e t u r n t h i s . _ m o d e l C u r s o r = n u l l , t h i s . _ s p l i t P a r t s . c l e a r ( ) , t h i s . c o n v e r s i o n A p i . w r i t e r = n u l l , t h i s . c o n v e r s i o n A p i . s t o r e = n u l l , o } _ c o n v e r t I t e m ( t , e ) { c o n s t n = O b j e c t . a s s i g n ( { v i e w I t e m : t , m o d e l C u r s o r : e , m o d e l R a n g e : n u l l } ) ; i f ( t . i s ( " e l e m e n t " ) ? t h i s . f i r e ( " e l e m e n t : " + t . n a m e , n , t h i s . c o n v e r s i o n A p i ) : t . i s ( " t e x t " ) ? t h i s . f i r e ( " t e x t " , n , t h i s . c o n v e r s i o n A p i ) : t h i s . f i r e ( " d o c u m e n t F r a g m e n t " , n , t h i s . c o n v e r s i o n A p i ) , n . m o d e l R a n g e & & ! ( n . m o d e l R a n g e i n s t a n c e o f Z s ) ) t h r o w n e w Z n . b ( " v i e w - c o n v e r s i o n - d i s p a t c h e r - i n c o r r e c t - r e s u l t : I n c o r r e c t c o n v e r s i o n r e s u l t w a s d r o p p e d . " , t h i s ) ; r e t u r n { m o d e l R a n g e : n . m o d e l R a n g e , m o d e l C u r s o r : n . m o d e l C u r s o r } } _ c o n v e r t C h i l d r e n ( t , e ) { c o n s t n = n e w Z s ( e ) ; l e t i = e ; f o r ( c o n s t e o f A r r a y . f r o m ( t . g e t C h i l d r e n ( ) ) ) { c o n s t t = t h i s . _ c o n v e r t I t e m ( e , i ) ; t . m o d e l R a n g e i n s t a n c e o f Z s & & ( n . e n d = t . m o d e l R a n g e . e n d , i = t . m o d e l C u r s o r ) } r e t u r n { m o d e l R a n g e : n , m o d e l C u r s o r : i } } _ s p l i t T o A l l o w e d P a r e n t ( t , e ) { c o n s t n = t h i s . c o n v e r s i o n A p i . s c h e m a . f i n d A l l o w e d P a r e n t ( e , t ) ; i f ( ! n ) r e t u r n n u l l ; i f ( n = = = e . p a r e n t ) r e t u r n { p o s i t i o n : e } ; i f ( t h i s . _ m o d e l C u r s o r . p a r e n t . g e t A n c e s t o r s ( ) . i n c l u d e s ( n ) ) r e t u r n n u l l ; c o n s t i = t h i s . c o n v e r s i o n A p i . w r i t e r . s p l i t ( e , n ) , o = [ ] ; f o r ( c o n s t t o f i . r a n g e . g e t W a l k e r ( ) ) i f ( " e l e m e n t E n d " = = t . t y p e ) o . p u s h ( t . i t e m ) ; e l s e { c o n s t e = o . p o p ( ) , n = t . i t e m ; t h i s . _ r e g i s t e r S p l i t P a i r ( e , n ) } r e t u r n { p o s i t i o n : i . p o s i t i o n , c u r s o r P a r e n t : i . r a n g e . e n d . p a r e n t } } _ r e g i s t e r S p l i t P a i r ( t , e ) { t h i s . _ s p l i t P a r t s . h a s ( t ) | | t h i s . _ s p l i t P a r t s . s e t ( t , [ t ] ) ; c o n s t n = t h i s . _ s p l i t P a r t s . g e t ( t ) ; t h i s . _ s p l i t P a r t s . s e t ( e , n ) , n . p u s h ( e ) } _ g e t S p l i t P a r t s ( t ) { l e t e ; r e t u r n e = t h i s . _ s p l i t P a r t s . h a s ( t ) ? t h i s . _ s p l i t P a r t s . g e t ( t ) : [ t ] } _ r e m o v e E m p t y E l e m e n t s ( ) { l e t t = ! 1 ; f o r ( c o n s t e o f t h i s . _ s p l i t P a r t s . k e y s ( ) ) e . i s E m p t y & & ( t h i s . c o n v e r s i o n A p i . w r i t e r . r e m o v e ( e ) , t h i s . _ s p l i t P a r t s . d e l e t e ( e ) , t = ! 0 ) ; t & & t h i s . _ r e m o v e E m p t y E l e m e n t s ( ) } } d i ( Q a , i i ) ; c l a s s Y a { c o n s t r u c t o r ( t , e ) { t h i s . m o d e l = t , t h i s . p r o c e s s o r = e , t h i s . m a p p e r = n e w Q s , t h i s . d o w n c a s t D i s p a t c h e r = n e w t a ( { m a p p e r : t h i s . m a p p e r } ) , t h i s . d o w n c a s t D i s p a t c h e r . o n ( " i n s e r t : $ t e x t " , ( t , e , n ) = > { i f ( ! n . c o n s u m a b l e . c o n s u m e ( e . i t e m , " i n s e r t " ) ) r e t u r n ; c o n s t i = n . w r i t e r , o = n . m a p p e r . t o V i e w P o s i t i o n ( e . r a n g e . s t a r t ) , r = i . c r e a t e T e x t ( e . i t e m . d a t a ) ; i . i n s e r t ( o , r ) } , { p r i o r i t y : " l o w e s t " } ) , t h i s . u p c a s t D i s p a t c h e r = n e w Q a ( { s c h e m a : t . s c h e m a } ) , t h i s . u p c a s t D i s p a t c h e r . o n ( " t e x t " , ( t , e , n ) = > { i f ( n . s c h e m a . c h e c k C h i l d ( e . m o d e l C u r s o r , " $ t e x t " ) & & n . c o n s u m a b l e . c o n s u m e ( e . v i e w I t e m ) ) { c o n s t t = n . w r i t e r . c r e a t e T e x t ( e . v i e w I t e m . d a t a ) ; n . w r i t e r . i n s e r t ( t , e . m o d e l C u r s o r ) , e . m o d e l R a n g e = Z s . _ c r e a t e F r o m P o s i t i o n A n d S h i f t ( e . m o d e l C u r s o r , t . o f f s e t S i z e ) , e . m o d e l C u r s o r = e . m o d e l R a n g e . e n d } } , { p r i o r i t y : " l o w e s t " } ) , t h i s . u p c a s t D i s p a t c h e r . o n ( " e l e m e n t " , ( t , e , n ) = > { i f ( ! e . m o d e l R a n g e & & n . c o n s u m a b l e . c o n s u m e ( e . v i e w I t e m , { n a m e : ! 0 } ) ) { c o n s t { m o d e l R a n g e : t , m o d e l C u r s o r : i } = n . c o n v e r t C h i l d r e n ( e . v i e w I t e m , e . m o d e l C u r s o r ) ; e . m o d e l R a n g e = t , e . m o d e l C u r s o r = i } } , { p r i o r i t y : " l o w e s t " } ) , t h i s . u p c a s t D i s p a t c h e r . o n ( " d o c u m e n t F r a g m e n t " , ( t , e , n ) = > { i f ( ! e . m o d e l R a n g e & & n . c o n s u m a b l e . c o n s u m e ( e . v i e w I t e m , { n a m e : ! 0 } ) ) { c o n s t { m o d e l R a n g e : t , m o d e l C u r s o r : i } = n . c o n v e r t C h i l d r e n ( e . v i e w I t e m , e . m o d e l C u r s o r ) ; e . m o d e l R a n g e = t , e . m o d e l C u r s o r = i } } , { p r i o r i t y : " l o w e s t " } ) , t h i s . d e c o r a t e ( " i n i t " ) , t h i s . o n ( " i n i t " , ( ) = > { t h i s . f i r e ( " r e a d y " ) } , { p r i o r i t y : " l o w e s t " } ) } g e t ( t ) { c o n s t { r o o t N a m e : e = " m a i n " , t r i m : n = " e m p t y " } = t | | { } ; i f ( ! t h i s . _ c h e c k I f R o o t s E x i s t s ( [ e ] ) ) t h r o w n e w Z n . b ( " d a t a c o n t r o l l e r - g e t - n o n - e x i s t e n t - r o o t : A t t e m p t i n g t o g e t d a t a f r o m a n o n - e x i s t i n g r o o t . " , t h i s ) ; c o n s t i = t h i s . m o d e l . d o c u m e n t . g e t R o o t ( e ) ; r e t u r n " e m p t y " ! = = n | | t h i s . m o d e l . h a s C o n t e n t ( i , { i g n o r e W h i t e s p a c e s : ! 0 } ) ? t h i s . s t r i n g i f y ( i ) : " " } s t r i n g i f y ( t ) { c o n s t e = t h i s . t o V i e w ( t ) ; r e t u r n t h i s . p r o c e s s o r . t o D a t a ( e ) } t o V i e w ( t ) { t h i s . m a p p e r . c l e a r B i n d i n g s ( ) ; c o n s t e = Z s . _ c r e a t e I n ( t ) , n = n e w P o , i = n e w T o ( n e w a o ) ; i f ( t h i s . m a p p e r . b i n d E l e m e n t s ( t ,
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( t ) ; f o r ( c o n s t [ t , n ] o f e ) t h i s . d o w n c a s t D i s p a t c h e r . c o n v e r t M a r k e r A d d ( t , n , i ) } r e t u r n n } i n i t ( t ) { i f ( t h i s . m o d e l . d o c u m e n t . v e r s i o n ) t h r o w n e w Z n . b ( " d a t a c o n t r o l l e r - i n i t - d o c u m e n t - n o t - e m p t y : T r y i n g t o s e t i n i t i a l d a t a t o n o t e m p t y d o c u m e n t . " , t h i s ) ; l e t e = { } ; i f ( " s t r i n g " = = t y p e o f t ? e . m a i n = t : e = t , ! t h i s . _ c h e c k I f R o o t s E x i s t s ( O b j e c t . k e y s ( e ) ) ) t h r o w n e w Z n . b ( " d a t a c o n t r o l l e r - i n i t - n o n - e x i s t e n t - r o o t : A t t e m p t i n g t o i n i t d a t a o n a n o n - e x i s t i n g r o o t . " , t h i s ) ; r e t u r n t h i s . m o d e l . e n q u e u e C h a n g e ( " t r a n s p a r e n t " , t = > { f o r ( c o n s t n o f O b j e c t . k e y s ( e ) ) { c o n s t i = t h i s . m o d e l . d o c u m e n t . g e t R o o t ( n ) ; t . i n s e r t ( t h i s . p a r s e ( e [ n ] , i ) , i , 0 ) } } ) , P r o m i s e . r e s o l v e ( ) } s e t ( t ) { l e t e = { } ; i f ( " s t r i n g " = = t y p e o f t ? e . m a i n = t : e = t , ! t h i s . _ c h e c k I f R o o t s E x i s t s ( O b j e c t . k e y s ( e ) ) ) t h r o w n e w Z n . b ( " d a t a c o n t r o l l e r - s e t - n o n - e x i s t e n t - r o o t : A t t e m p t i n g t o s e t d a t a o n a n o n - e x i s t i n g r o o t . " , t h i s ) ; t h i s . m o d e l . e n q u e u e C h a n g e ( " t r a n s p a r e n t " , t = > { t . s e t S e l e c t i o n ( n u l l ) , t . r e m o v e S e l e c t i o n A t t r i b u t e ( t h i s . m o d e l . d o c u m e n t . s e l e c t i o n . g e t A t t r i b u t e K e y s ( ) ) ; f o r ( c o n s t n o f O b j e c t . k e y s ( e ) ) { c o n s t i = t h i s . m o d e l . d o c u m e n t . g e t R o o t ( n ) ; t . r e m o v e ( t . c r e a t e R a n g e I n ( i ) ) , t . i n s e r t ( t h i s . p a r s e ( e [ n ] , i ) , i , 0 ) } } ) } p a r s e ( t , e = " $ r o o t " ) { c o n s t n = t h i s . p r o c e s s o r . t o V i e w ( t ) ; r e t u r n t h i s . t o M o d e l ( n , e ) } t o M o d e l ( t , e = " $ r o o t " ) { r e t u r n t h i s . m o d e l . c h a n g e ( n = > t h i s . u p c a s t D i s p a t c h e r . c o n v e r t ( t , n , e ) ) } d e s t r o y ( ) { t h i s . s t o p L i s t e n i n g ( ) } _ c h e c k I f R o o t s E x i s t s ( t ) { f o r ( c o n s t e o f t ) i f ( ! t h i s . m o d e l . d o c u m e n t . g e t R o o t N a m e s ( ) . i n c l u d e s ( e ) ) r e t u r n ! 1 ; r e t u r n ! 0 } } d i ( Y a , H i ) ; c l a s s X a { c o n s t r u c t o r ( t , e ) { t h i s . _ h e l p e r s = n e w M a p , t h i s . _ d o w n c a s t = A r r a y . i s A r r a y ( t ) ? t : [ t ] , t h i s . _ c r e a t e C o n v e r s i o n H e l p e r s ( { n a m e : " d o w n c a s t " , d i s p a t c h e r s : t h i s . _ d o w n c a s t , i s D o w n c a s t : ! 0 } ) , t h i s . _ u p c a s t = A r r a y . i s A r r a y ( e ) ? e : [ e ] , t h i s . _ c r e a t e C o n v e r s i o n H e l p e r s ( { n a m e : " u p c a s t " , d i s p a t c h e r s : t h i s . _ u p c a s t , i s D o w n c a s t : ! 1 } ) } a d d A l i a s ( t , e ) { c o n s t n = t h i s . _ d o w n c a s t . i n c l u d e s ( e ) ; i f ( ! t h i s . _ u p c a s t . i n c l u d e s ( e ) & & ! n ) t h r o w n e w Z n . b ( " c o n v e r s i o n - a d d - a l i a s - d i s p a t c h e r - n o t - r e g i s t e r e d : T r y i n g t o r e g i s t e r a n d a l i a s f o r a d i s p a t c h e r t h a t n a s n o t b e e n r e g i s t e r e d . " , t h i s ) ; t h i s . _ c r e a t e C o n v e r s i o n H e l p e r s ( { n a m e : t , d i s p a t c h e r s : [ e ] , i s D o w n c a s t : n } ) } f o r ( t ) { i f ( ! t h i s . _ h e l p e r s . h a s ( t ) ) t h r o w n e w Z n . b ( " c o n v e r s i o n - f o r - u n k n o w n - g r o u p : T r y i n g t o a d d a c o n v e r t e r t o a n u n k n o w n d i s p a t c h e r s g r o u p . " , t h i s ) ; r e t u r n t h i s . _ h e l p e r s . g e t ( t ) } e l e m e n t T o E l e m e n t ( t ) { t h i s . f o r ( " d o w n c a s t " ) . e l e m e n t T o E l e m e n t ( t ) ; f o r ( c o n s t { m o d e l : e , v i e w : n } o f t c ( t ) ) t h i s . f o r ( " u p c a s t " ) . e l e m e n t T o E l e m e n t ( { m o d e l : e , v i e w : n , c o n v e r t e r P r i o r i t y : t . c o n v e r t e r P r i o r i t y } ) } a t t r i b u t e T o E l e m e n t ( t ) { t h i s . f o r ( " d o w n c a s t " ) . a t t r i b u t e T o E l e m e n t ( t ) ; f o r ( c o n s t { m o d e l : e , v i e w : n } o f t c ( t ) ) t h i s . f o r ( " u p c a s t " ) . e l e m e n t T o A t t r i b u t e ( { v i e w : n , m o d e l : e , c o n v e r t e r P r i o r i t y : t . c o n v e r t e r P r i o r i t y } ) } a t t r i b u t e T o A t t r i b u t e ( t ) { t h i s . f o r ( " d o w n c a s t " ) . a t t r i b u t e T o A t t r i b u t e ( t ) ; f o r ( c o n s t { m o d e l : e , v i e w : n } o f t c ( t ) ) t h i s . f o r ( " u p c a s t " ) . a t t r i b u t e T o A t t r i b u t e ( { v i e w : n , m o d e l : e } ) } _ c r e a t e C o n v e r s i o n H e l p e r s ( { n a m e : t , d i s p a t c h e r s : e , i s D o w n c a s t : n } ) { i f ( t h i s . _ h e l p e r s . h a s ( t ) ) t h r o w n e w Z n . b ( " c o n v e r s i o n - g r o u p - e x i s t s : T r y i n g t o r e g i s t e r a g r o u p n a m e t h a t h a s a l r e a d y b e e n r e g i s t e r e d . " , t h i s ) ; c o n s t i = n ? n e w w a ( e ) : n e w C a ( e ) ; t h i s . _ h e l p e r s . s e t ( t , i ) } } f u n c t i o n * t c ( t ) { i f ( t . m o d e l . v a l u e s ) f o r ( c o n s t e o f t . m o d e l . v a l u e s ) { c o n s t n = { k e y : t . m o d e l . k e y , v a l u e : e } , i = t . v i e w [ e ] , o = t . u p c a s t A l s o ? t . u p c a s t A l s o [ e ] : v o i d 0 ; y i e l d * e c ( n , i , o ) } e l s e y i e l d * e c ( t . m o d e l , t . v i e w , t . u p c a s t A l s o ) } f u n c t i o n * e c ( t , e , n ) { i f ( y i e l d { m o d e l : t , v i e w : e } , n ) { n = A r r a y . i s A r r a y ( n ) ? n : [ n ] ; f o r ( c o n s t e o f n ) y i e l d { m o d e l : t , v i e w : e } } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s n c { c o n s t r u c t o r ( t = " d e f a u l t " ) { t h i s . o p e r a t i o n s = [ ] , t h i s . t y p e = t } g e t b a s e V e r s i o n ( ) { f o r ( c o n s t t o f t h i s . o p e r a t i o n s ) i f ( n u l l ! = = t . b a s e V e r s i o n ) r e t u r n t . b a s e V e r s i o n ; r e t u r n n u l l } a d d O p e r a t i o n ( t ) { r e t u r n t . b a t c h = t h i s , t h i s . o p e r a t i o n s . p u s h ( t ) , t } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s i c { c o n s t r u c t o r ( t ) { t h i s . b a s e V e r s i o n = t , t h i s . i s D o c u m e n t O p e r a t i o n = n u l l ! = = t h i s . b a s e V e r s i o n , t h i s . b a t c h = n u l l } _ v a l i d a t e ( ) { } t o J S O N ( ) { c o n s t t = O b j e c t . a s s i g n ( { } , t h i s ) ; r e t u r n t . _ _ c l a s s N a m e = t h i s . c o n s t r u c t o r . c l a s s N a m e , d e l e t e t . b a t c h , d e l e t e t . i s D o c u m e n t O p e r a t i o n , t } s t a t i c g e t c l a s s N a m e ( ) { r e t u r n " O p e r a t i o n " } s t a t i c f r o m J S O N ( t ) { r e t u r n n e w t h i s ( t . b a s e V e r s i o n ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s o c { c o n s t r u c t o r ( t ) { t h i s . m a r k e r s = n e w M a p , t h i s . _ c h i l d r e n = n e w U s , t & & t h i s . _ i n s e r t C h i l d ( 0 , t ) } [ S y m b o l . i t e r a t o r ] ( ) { r e t u r n t h i s . g e t C h i l d r e n ( ) } g e t c h i l d C o u n t ( ) { r e t u r n t h i s . _ c h i l d r e n . l e n g t h } g e t m a x O f f s e t ( ) { r e t u r n t h i s . _ c h i l d r e n . m a x O f f s e t } g e t i s E m p t y ( ) { r e t u r n 0 = = = t h i s . c h i l d C o u n t } g e t r o o t ( ) { r e t u r n t h i s } g e t p a r e n t ( ) { r e t u r n n u l l } i s ( t ) { r e t u r n " d o c u m e n t F r a g m e n t " = = t | | " m o d e l : d o c u m e n t F r a g m e n t " = = t } g e t C h i l d ( t ) { r e t u r n t h i s . _ c h i l d r e n . g e t N o d e ( t ) } g e t C h i l d r e n ( ) { r e t u r n t h i s . _ c h i l d r e n [ S y m b o l . i t e r a t o r ] ( ) } g e t C h i l d I n d e x ( t ) { r e t u r n t h i s . _ c h i l d r e n . g e t N o d e I n d e x ( t ) } g e t C h i l d S t a r t O f f s e t ( t ) { r e t u r n t h i s . _ c h i l d r e n . g e t N o d e S t a r t O f f s e t ( t ) } g e t P a t h ( ) { r e t u r n [ ] } g e t N o d e B y P a t h ( t ) { l e t e = t h i s ; f o r ( c o n s t n o f t ) e = e . g e t C h i l d ( e . o f f s e t T o I n d e x ( n ) ) ; r e t u r n e } o f f s e t T o I n d e x ( t ) { r e t u r n t h i s . _ c h i l d r e n . o f f s e t T o I n d e x ( t ) } t o J S O N ( ) { c o n s t t = [ ] ; f o r ( c o n s t e o f t h i s . _ c h i l d r e n ) t . p u s h ( e . t o J S O N ( ) ) ; r e t u r n t } s t a t i c f r o m J S O N ( t ) { c o n s t e = [ ] ; f o r ( c o n s t n o f t ) n . n a m e ? e . p u s h ( $ s . f r o m J S O N ( n ) ) : e . p u s h ( j s . f r o m J S O N ( n ) ) ; r e t u r n n e w o c ( e ) } _ a p p e n d C h i l d ( t ) { t h i s . _ i n s e r t C h i l d ( t h i s . c h i l d C o u n t , t ) } _ i n s e r t C h i l d ( t , e ) { c o n s t n = f u n c t i o n ( t ) { i f ( " s t r i n g " = = t y p e o f t ) r e t u r n [ n e w j s ( t ) ] ; w i ( t ) | | ( t = [ t ] ) ; r e t u r n A r r a y . f r o m ( t ) . m a p ( t = > " s t r i n g " = = t y p e o f t ? n e w j s ( t ) : t i n s t a n c e o f H s ? n e w j s ( t . d a t a , t . g e t A t t r i b u t e s ( ) ) : t ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( e ) ; f o r ( c o n s t t o f n ) n u l l ! = = t . p a r e n t & & t . _ r e m o v e ( ) , t . p a r e n t = t h i s ; t h i s . _ c h i l d r e n . _ i n s e r t N o d e s ( t , n ) } _ r e m o v e C h i l d r e n ( t , e = 1 ) { c o n s t n = t h i s . _ c h i l d r e n . _ r e m o v e N o d e s ( t , e ) ; f o r ( c o n s t t o f n ) t . p a r e n t = n u l l ; r e t u r n n } } f u n c t i o n r c ( t , e ) { c o n s t n = ( e = c c ( e ) ) . r e d u c e ( ( t , e ) = > t + e . o f f s e t S i z e , 0 ) , i = t . p a r e n t ; d c ( t ) ; c o n s t o = t . i n d e x ; r e t u r n i . _ i n s e r t C h i l d ( o , e ) , l c ( i , o + e . l e n g t h ) , l c ( i , o ) , n e w Z s ( t , t . g e t S h i f t e d B y ( n ) ) } f u n c t i o n s c ( t ) { i f ( ! t . i s F l a t ) t h r o w n e w Z n . b ( " o p e r a t i o n - u t i l s - r e m o v e - r a n g e - n o t - f l a t : T r y i n g t o r e m o v e a r a n g e w h i c h s t a r t s a n d e n d s i n d i f f e r e n t e l e m e n t . " , t h i s ) ; c o n s t e = t . s t a r t . p a r e n t ; d c ( t . s t a r t ) , d c ( t . e n d ) ; c o n s t n = e . _ r e m o v e C h i l d r e n ( t . s t a r t . i n d e x , t . e n d . i n d e x - t . s t a r t . i n d e x ) ; r e t u r n l c ( e , t . s t a r t . i n d e x ) , n } f u n c t i o n a c ( t , e ) { i f ( ! t . i s F l a t ) t h r o w n e w Z n . b ( " o p e r a t i o n - u t i l s - m o v e - r a n g e - n o t - f l a t : T r y i n g t o m o v e a r a n g e w h i c h s t a r t s a n d e n d s i n d i f f e r e n t e l e m e n t . " , t h i s ) ; c o n s t n = s c ( t ) ; r e t u r n r c ( e = e . _ g e t T r a n s f o r m e d B y D e l e t i o n ( t . s t a r t , t . e n d . o f f s e t - t . s t a r t . o f f s e t ) , n ) } f u n c t i o n c c ( t ) { c o n s t e = [ ] ; t i n s t a n c e o f A r r a y | | ( t = [ t ] ) ; f o r ( l e t n = 0 ; n < t . l e n g t h ; n + + ) i f ( " s t r i n g " = = t y p e o f t [ n ] ) e . p u s h ( n e w j s ( t [ n ] ) ) ; e l s e i f ( t [ n ] i n s t a n c e o f H s ) e . p u s h ( n e w j s ( t [ n ] . d a t a , t [ n ] . g e t A t t r i b u t e s ( ) ) ) ; e l s e i f ( t [ n ] i n s t a n c e o f o c | | t [ n ] i n s t a n c e o f U s ) f o r ( c o n s t i o f t [ n ] ) e . p u s h ( i ) ; e l s e t [ n ] i n s t a n c e o f q s & & e . p u s h ( t [ n ] ) ; f o r ( l e t t = 1 ; t < e . l e n g t h ; t + + ) { c o n s t n = e [ t ] , i = e [ t - 1 ] ; n i n s t a n c e o f j s & & i i n s t a n c e o f j s & & u c ( n , i ) & & ( e . s p l i c e ( t - 1 , 2 , n e w j s ( i . d a t a + n . d a t a , i . g e t A t t r i b u t e s ( ) ) ) , t - - ) } r e t u r n e } f u n c t i o n l c ( t , e ) { c o n s t n = t . g e t C h i l d ( e - 1 ) , i = t . g e t C h i l d ( e ) ; i f ( n & & i & & n . i s ( " t e x t " ) & & i . i s ( " t e x t " ) & & u c ( n , i ) ) { c o n s t o = n e w j s ( n . d a t a + i . d a t a , n . g e t A t t r i b u t e s ( ) ) ; t . _ r e m o v e C h i l d r e n ( e - 1 , 2 ) , t . _ i n s e r t C h i l d ( e - 1 , o ) } } f u n c t i o n d c ( t ) { c o n s t e = t . t e x t N o d e , n = t . p a r e n t ; i f ( e ) { c o n s t i = t . o f f s e t - e . s t a r t O f f s e t , o = e . i n d e x ; n . _ r e m o v e C h i l d r e n ( o , 1 ) ; c o n s t r = n e w j s ( e . d a t a . s u b s t r ( 0 , i ) , e . g e t A t t r i b u t e s ( ) ) , s = n e w j s ( e . d a t a . s u b s t r ( i ) , e . g e t A t t r i b u t e s ( ) ) ; n . _ i n s e r t C h i l d ( o , [ r , s ] ) } } f u n c t i o n u c ( t , e ) { c o n s t n = t . g e t A t t r i b u t e s ( ) , i = e . g e t A t t r i b u t e s ( ) ; f o r ( c o n s t t o f n ) { i f ( t [ 1 ] ! = = e . g e t A t t r i b u t e ( t [ 0 ] ) ) r e t u r n ! 1 ; i . n e x t ( ) } r e t u r n i . n e x t ( ) . d o n e } v a r h c = f u n c t i o n ( t , e ) { r e t u r n Y r ( t , e ) } ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s f c e x t e n d s i c { c o n s t r u c t o r ( t , e , n , i , o ) { s u p e r ( o ) , t h i s . r a n g e = t . c l o n e ( ) , t h i s . k e y = e , t h i s . o l d V a l u e = v o i d 0 = = = n ? n u l l : n , t h i s . n e w V a l u e = v o i d 0 = = = i ? n u l l : i } g e t t y p e ( ) { r e t u r n n u l l = = = t h i s . o l d V a l u e ? " a d d A t t r i b u t e " : n u l l = = = t h i s . n e w V a l u e ? " r e m o v e A t t r i b u t e " : " c h a n g e A t t r i b u t e " } c l o n e ( ) { r e t u r n n e w f c ( t h i s . r a n g e , t h i s . k e y , t h i s . o l d V a l u e , t h i s . n e w V a l u e , t h i s . b a s e V e r s i o n ) } g e t R e v e r s e d ( ) { r e t u r n n e w f c ( t h i s . r a n g e , t h i s . k e y , t h i s . n e w V a l u e , t h i s . o l d V a l u e , t h i s . b a s e V e r s i o n + 1 ) } t o J S O N ( ) { c o n s t t = s u p e r . t o J S O N ( ) ; r e t u r n t . r a n g e = t h i s . r a n g e . t o J S O N ( ) , t } _ v a l i d a t e ( ) { i f ( ! t h i s . r a n g e . i s F l a t ) t h r o w n e w Z n . b ( " a t t r i b u t e - o p e r a t i o n - r a n g e - n o t - f l a t : T h e r a n g e t o c h a n g e i s n o t f l a t . " , t h i s ) ; f o r ( c o n s t t o f t h i s . r a n g e . g e t I t e m s ( { s h a l l o w : ! 0 } ) ) { i f ( n u l l ! = = t h i s . o l d V a l u e & & ! h c ( t . g e t A t t r i b u t e ( t h i s . k e y ) , t h i s . o l d V a l u e ) ) t h r o w n e w Z n . b ( " a t t r i b u t e - o p e r a t i o n - w r o n g - o l d - v a l u e : C h a n g e d n o d e h a s d i f f e r e n t a t t r i b u t e v a l u e t h a n o p e r a t i o n ' s o l d a t t r i b u t e v a l u e . " , t h i s , { i t e m : t , k e y : t h i s . k e y , v a l u e : t h i s . o l d V a l u e } ) ; i f ( n u l l = = = t h i s . o l d V a l u e & & n u l l ! = = t h i s . n e w V a l u e & & t . h a s A t t r i b u t e ( t h i s . k e y ) ) t h r o w n e w Z n . b ( " a t t r i b u t e - o p e r a t i o n - a t t r i b u t e - e x i s t s : T h e a t t r i b u t e w i t h g i v e n k e y a l r e a d y e x i s t s . " , t h i s , { n o d e : t , k e y : t h i s . k e y } ) } } _ e x e c u t e ( ) { h c ( t h i s . o l d V a l u e , t h i s . n e w V a l u e ) | | f u n c t i o n ( t , e , n ) { d c ( t . s t a r t ) , d c ( t . e n d ) ; f o r ( c o n s t i o f t . g e t I t e m s ( { s h a l l o w : ! 0 } ) ) { c o n s t t = i . i s ( " t e x t P r o x y " ) ? i . t e x t N o d e : i ; n u l l ! = = n ? t . _ s e t A t t r i b u t e ( e , n ) : t . _ r e m o v e A t t r i b u t e ( e ) , l c ( t . p a r e n t , t . i n d e x ) } l c ( t . e n d . p a r e n t , t . e n d . i n d e x ) } ( t h i s . r a n g e , t h i s . k e y , t h i s . n e w V a l u e ) } s t a t i c g e t c l a s s N a m e ( ) { r e t u r n " A t t r i b u t e O p e r a t i o n " } s t a t i c f r o m J S O N ( t , e ) { r e t u r n n e w f c ( Z s . f r o m J S O N ( t . r a n g e , e ) , t . k e y , t . o l d V a l u e , t . n e w V a l u e , t . b a s e V e r s i o n ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s p c e x t e n d s i c { c o n s t r u c t o r ( t , e ) { s u p e r ( n u l l ) , t h i s . s o u r c e P o s i t i o n = t . c l o n e ( ) , t h i s . h o w M a n y = e } g e t t y p e ( ) { r e t u r n " d e t a c h " } t o J S O N ( ) { c o n s t t = s u p e r . t o J S O N ( ) ; r e t u r n t . s o u r c e P o s i t i o n = t h i s . s o u r c e P o s i t i o n . t o J S O N ( ) , t } _ v a l i d a t e ( ) { i f ( t h i s . s o u r c e P o s i t i o n . r o o t . d o c u m e n t ) t h r o w n e w Z n . b ( " d e t a c h - o p e r a t i o n - o n - d o c u m e n t - n o d e : C a n n o t d e t a c h d o c u m e n t n o d e . " , t h i s ) } _ e x e c u t e ( ) { s c ( Z s . _ c r e a t e F r o m P o s i t i o n A n d S h i f t ( t h i s . s o u r c e P o s i t i o n , t h i s . h o w M a n y ) ) } s t a t i c g e t c l a s s N a m e ( ) { r e t u r n " D e t a c h O p e r a t i o n " } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s m c e x t e n d s i c { c o n s t r u c t o r ( t , e , n , i ) { s u p e r ( i ) , t h i s . s o u r c e P o s i t i o n = t . c l o n e ( ) , t h i s . s o u r c e P o s i t i o n . s t i c k i n e s s = " t o N e x t " , t h i s . h o w M a n y = e , t h i s . t a r g e t P o s i t i o n = n . c l o n e ( ) , t h i s . t a r g e t P o s i t i o n . s t i c k i n e s s = " t o N o n e " } g e t t y p e ( ) { r e t u r n " $ g r a v e y a r d " = = t h i s . t a r g e t P o s i t i o n . r o o t . r o o t N a m e ? " r e m o v e " : " $ g r a v e y a r d " = = t h i s . s o u r c e P o s i t i o n . r o o t . r o o t N a m e ? " r e i n s e r t " : " m o v e " } c l o n e ( ) { r e t u r n n e w t h i s . c o n s t r u c t o r ( t h i s . s o u r c e P o s i t i o n , t h i s . h o w M a n y , t h i s . t a r g e t P o s i t i o n , t h i s . b a s e V e r s i o n ) } g e t M o v e d R a n g e S t a r t ( ) { r e t u r n t h i s . t a r g e t P o s i t i o n . _ g e t T r a n s f o r m e d B y D e l e t i o n ( t h i s . s o u r c e P o s i t i o n , t h i s . h o w M a n y ) } g e t R e v e r s e d ( ) { c o n s t t = t h i s . s o u r c e P o s i t i o n . _ g e t T r a n s f o r m e d B y I n s e r t i o n ( t h i s . t a r g e t P o s i t i o n , t h i s . h o w M a n y ) ; r e t u r n n e w t h i s . c o n s t r u c t o r ( t h i s . g e t M o v e d R a n g e S t a r t ( ) , t h i s . h o w M a n y , t , t h i s . b a s e V e r s i o n + 1 ) } _ v a l i d a t e ( ) { c o n s t t = t h i s . s o u r c e P o s i t i o n . p a r e n t , e = t h i s . t a r g e t P o s i t i o n . p a r e n t , n = t h i s . s o u r c e P o s i t i o n . o f f s e t , i = t h i s . t a r g e t P o s i t i o n . o f f s e t ; i f ( n + t h i s . h o w M a n y > t . m a x O f f s e t ) t h r o w n e w Z n . b ( " m o v e - o p e r a t i o n - n o d e s - d o - n o t - e x i s t : T h e n o d e s w h i c h s h o u l d b e m o v e d d o n o t e x i s t . " , t h i s ) ; i f ( t = = = e & & n < i & & i < n + t h i s . h o w M a n y ) t h r o w n e w Z n . b ( " m o v e - o p e r a t i o n - r a n g e - i n t o - i t s e l f : T r y i n g t o m o v e a r a n g e o f n o d e s t o t h e i n s i d e o f t h a t r a n g e . " , t h i s ) ; i f ( t h i s . s o u r c e P o s i t i o n . r o o t = = t h i s . t a r g e t P o s i t i o n . r o o t & & " p r e f i x " = = u i ( t h i s . s o u r c e P o s i t i o n . g e t P a r e n t P a t h ( ) , t h i s . t a r g e t P o s i t i o n . g e t P a r e n t P a t h ( ) ) ) { c o n s t t = t h i s . s o u r c e P o s i t i o n . p a t h . l e n g t h - 1 ; i f ( t h i s . t a r g e t P o s i t i o n . p a t h [ t ] > = n & & t h i s . t a r g e t P o s i t i o n . p a t h [ t ] < n + t h i s . h o w M a n y ) t h r o w n e w Z n . b ( " m o v e - o p e r a t i o n - n o d e - i n t o - i t s e l f : T r y i n g t o m o v e a r a n g e o f n o d e s i n t o o n e o f n o d e s f r o m t h a t r a n g e . " , t h i s ) } } _ e x e c u t e ( ) { a c ( Z s . _ c r e a t e F r o m P o s i t i o n A n d S h i f t ( t h i s . s o u r c e P o s i t i o n , t h i s . h o w M a n y ) , t h i s . t a r g e t P o s i t i o n ) } t o J S O N ( ) { c o n s t t = s u p e r . t o J S O N ( ) ; r e t u r n t . s o u r c e P o s i t i o n = t h i s . s o u r c e P o s i t i o n . t o J S O N ( ) , t . t a r g e t P o s i t i o n = t h i s . t a r g e t P o s i t i o n . t o J S O N ( ) , t } s t a t i c g e t c l a s s N a m e ( ) { r e t u r n " M o v e O p e r a t i o n " } s t a t i c f r o m J S O N ( t , e ) { c o n s t n = J s . f r o m J S O N ( t . s o u r c e P o s i t i o n , e ) , i = J s . f r o m J S O N ( t . t a r g e t P o s i t i o n , e ) ; r e t u r n n e w t h i s ( n , t . h o w M a n y , i , t . b a s e V e r s i o n ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s g c e x t e n d s i c { c o n s t r u c t o r ( t , e , n ) { s u p e r ( n ) , t h i s . p o s i t i o n = t . c l o n e ( ) , t h i s . p o s i t i o n . s t i c k i n e s s = " t o N o n e " , t h i s . n o d e s = n e w U s ( c c ( e ) ) , t h i s . s h o u l d R e c e i v e A t t r i b u t e s = ! 1 } g e t t y p e ( ) { r e t u r n " i n s e r t " } g e t h o w M a n y ( ) { r e t u r n t h i s . n o d e s . m a x O f f s e t } c l o n e ( ) { c o n s t t = n e w U s ( [ . . . t h i s . n o d e s ] . m a p ( t = > t . _ c l o n e ( ! 0 ) ) ) , e = n e w g c ( t h i s . p o s i t i o n , t , t h i s . b a s e V e r s i o n ) ; r e t u r n e . s h o u l d R e c e i v e A t t r i b u t e s = t h i s . s h o u l d R e c e i v e A t t r i b u t e s , e } g e t R e v e r s e d ( ) { c o n s t t = t h i s . p o s i t i o n . r o o t . d o c u m e n t . g r a v e y a r d , e = n e w J s ( t , [ 0 ] ) ; r e t u r n n e w m c ( t h i s . p o s i t i o n , t h i s . n o d e s . m a x O f f s e t , e , t h i s . b a s e V e r s i o n + 1 ) } _ v a l i d a t e ( ) { c o n s t t = t h i s . p o s i t i o n . p a r e n t ; i f ( ! t | | t . m a x O f f s e t < t h i s . p o s i t i o n . o f f s e t ) t h r o w n e w Z n . b ( " i n s e r t - o p e r a t i o n - p o s i t i o n - i n v a l i d : I n s e r t i o n p o s i t i o n i s i n v a l i d . " , t h i s ) } _ e x e c u t e ( ) { c o n s t t = t h i s . n o d e s ; t h i s . n o d e s = n e w U s ( [ . . . t ] . m a p ( t = > t . _ c l o n e ( ! 0 ) ) ) , r c ( t h i s . p o s i t i o n , t ) } t o J S O N ( ) { c o n s t t = s u p e r . t o J S O N ( ) ; r e t u r n t . p o s i t i o n = t h i s . p o s i t i o n . t o J S O N ( ) , t . n o d e s = t h i s . n o d e s . t o J S O N ( ) , t } s t a t i c g e t c l a s s N a m e ( ) { r e t u r n " I n s e r t O p e r a t i o n " } s t a t i c f r o m J S O N ( t , e ) { c o n s t n = [ ] ; f o r ( c o n s t e o f t . n o d e s ) e . n a m e ? n . p u s h ( $ s . f r o m J S O N ( e ) ) : n . p u s h ( j s . f r o m J S O N ( e ) ) ; c o n s t i = n e w g c ( J s . f r o m J S O N ( t . p o s i t i o n , e ) , n , t . b a s e V e r s i o n ) ; r e t u r n i . s h o u l d R e c e i v e A t t r i b u t e s = t . s h o u l d R e c e i v e A t t r i b u t e s , i } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s b c e x t e n d s i c { c o n s t r u c t o r ( t , e , n , i , o , r ) { s u p e r ( r ) , t h i s . n a m e = t , t h i s . o l d R a n g e = e ? e . c l o n e ( ) : n u l l , t h i s . n e w R a n g e = n ? n . c l o n e ( ) : n u l l , t h i s . a f f e c t s D a t a = o , t h i s . _ m a r k e r s = i } g e t t y p e ( ) { r e t u r n " m a r k e r " } c l o n e ( ) { r e t u r n n e w b c ( t h i s . n a m e , t h i s . o l d R a n g e , t h i s . n e w R a n g e , t h i s . _ m a r k e r s , t h i s . a f f e c t s D a t a , t h i s . b a s e V e r s i o n ) } g e t R e v e r s e d ( ) { r e t u r n n e w b c ( t h i s . n a m e , t h i s . n e w R a n g e , t h i s . o l d R a n g e , t h i s . _ m a r k e r s , t h i s . a f f e c t s D a t a , t h i s . b a s e V e r s i o n + 1 ) } _ e x e c u t e ( ) { c o n s t t = t h i s . n e w R a n g e ? " _ s e t " : " _ r e m o v e " ; t h i s . _ m a r k e r s [ t ] ( t h i s . n a m e , t h i s . n e w R a n g e , ! 0 , t h i s . a f f e c t s D a t a ) } t o J S O N ( ) { c o n s t t = s u p e r . t o J S O N ( ) ; r e t u r n t h i s . o l d R a n g e & & ( t . o l d R a n g e = t h i s . o l d R a n g e . t o J S O N ( ) ) , t h i s . n e w R a n g e & & ( t . n e w R a n g e = t h i s . n e w R a n g e . t o J S O N ( ) ) , d e l e t e t . _ m a r k e r s , t } s t a t i c g e t c l a s s N a m e ( ) { r e t u r n " M a r k e r O p e r a t i o n " } s t a t i c f r o m J S O N ( t , e ) { r e t u r n n e w b c ( t . n a m e , t . o l d R a n g e ? Z s . f r o m J S O N ( t . o l d R a n g e , e ) : n u l l , t . n e w R a n g e ? Z s . f r o m J S O N ( t . n e w R a n g e , e ) : n u l l , e . m o d e l . m a r k e r s , t . a f f e c t s D a t a , t . b a s e V e r s i o n ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s w c e x t e n d s i c { c o n s t r u c t o r ( t , e , n , i ) { s u p e r ( i ) , t h i s . p o s i t i o n = t , t h i s . p o s i t i o n . s t i c k i n e s s = " t o N e x t " , t h i s . o l d N a m e = e , t h i s . n e w N a m e = n } g e t t y p e ( ) { r e t u r n " r e n a m e " } c l o n e ( ) { r e t u r n n e w w c ( t h i s . p o s i t i o n . c l o n e ( ) , t h i s . o l d N a m e , t h i s . n e w N a m e , t h i s . b a s e V e r s i o n ) } g e t R e v e r s e d ( ) { r e t u r n n e w w c ( t h i s . p o s i t i o n . c l o n e ( ) , t h i s . n e w N a m e , t h i s . o l d N a m e , t h i s . b a s e V e r s i o n + 1 ) } _ v a l i d a t e ( ) { c o n s t t = t h i s . p o s i t i o n . n o d e A f t e r ; i f ( ! ( t i n s t a n c e o f $ s ) ) t h r o w n e w Z n . b ( " r e n a m e - o p e r a t i o n - w r o n g - p o s i t i o n : G i v e n p o s i t i o n i s i n v a l i d o r n o d e a f t e r i t i s n o t a n i n s t a n c e o f E l e m e n t . " , t h i s ) ; i f ( t . n a m e ! = = t h i s . o l d N a m e ) t h r o w n e w Z n . b ( " r e n a m e - o p e r a t i o n - w r o n g - n a m e : E l e m e n t t o c h a n g e h a s d i f f e r e n t n a m e t h a n o p e r a t i o n ' s o l d n a m e . " , t h i s ) } _ e x e c u t e ( ) { t h i s . p o s i t i o n . n o d e A f t e r . n a m e = t h i s . n e w N a m e } t o J S O N ( ) { c o n s t t = s u p e r . t o J S O N ( ) ; r e t u r n t . p o s i t i o n = t h i s . p o s i t i o n . t o J S O N ( ) , t } s t a t i c g e t c l a s s N a m e ( ) { r e t u r n " R e n a m e O p e r a t i o n " } s t a t i c f r o m J S O N ( t , e ) { r e t u r n n e w w c ( J s . f r o m J S O N ( t . p o s i t i o n , e ) , t . o l d N a m e , t . n e w N a m e , t . b a s e V e r s i o n ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s k c e x t e n d s i c { c o n s t r u c t o r ( t , e , n , i , o ) { s u p e r ( o ) , t h i s . r o o t = t , t h i s . k e y = e , t h i s . o l d V a l u e = n , t h i s . n e w V a l u e = i } g e t t y p e ( ) { r e t u r n n u l l = = = t h i s . o l d V a l u e ? " a d d R o o t A t t r i b u t e " : n u l l = = = t h i s . n e w V a l u e ? " r e m o v e R o o t A t t r i b u t e " : " c h a n g e R o o t A t t r i b u t e " } c l o n e ( ) { r e t u r n n e w k c ( t h i s . r o o t , t h i s . k e y , t h i s . o l d V a l u e , t h i s . n e w V a l u e , t h i s . b a s e V e r s i o n ) } g e t R e v e r s e d ( ) { r e t u r n n e w k c ( t h i s . r o o t , t h i s . k e y , t h i s . n e w V a l u e , t h i s . o l d V a l u e , t h i s . b a s e V e r s i o n + 1 ) } _ v a l i d a t e ( ) { i f ( t h i s . r o o t ! = t h i s . r o o t . r o o t | | t h i s . r o o t . i s ( " d o c u m e n t F r a g m e n t " ) ) t h r o w n e w Z n . b ( " r o o t a t t r i b u t e - o p e r a t i o n - n o t - a - r o o t : T h e e l e m e n t t o c h a n g e i s n o t a r o o t e l e m e n t . " , t h i s , { r o o t : t h i s . r o o t , k e y : t h i s . k e y } ) ; i f ( n u l l ! = = t h i s . o l d V a l u e & & t h i s . r o o t . g e t A t t r i b u t e ( t h i s . k e y ) ! = = t h i s . o l d V a l u e ) t h r o w n e w Z n . b ( " r o o t a t t r i b u t e - o p e r a t i o n - w r o n g - o l d - v a l u e : C h a n g e d n o d e h a s d i f f e r e n t a t t r i b u t e v a l u e t h a n o p e r a t i o n ' s o l d a t t r i b u t e v a l u e . " , t h i s , { r o o t : t h i s . r o o t , k e y : t h i s . k e y } ) ; i f ( n u l l = = = t h i s . o l d V a l u e & & n u l l ! = = t h i s . n e w V a l u e & & t h i s . r o o t . h a s A t t r i b u t e ( t h i s . k e y ) ) t h r o w n e w Z n . b ( " r o o t a t t r i b u t e - o p e r a t i o n - a t t r i b u t e - e x i s t s : T h e a t t r i b u t e w i t h g i v e n k e y a l r e a d y e x i s t s . " , t h i s , { r o o t : t h i s . r o o t , k e y : t h i s . k e y } ) } _ e x e c u t e ( ) { n u l l ! = = t h i s . n e w V a l u e ? t h i s . r o o t . _ s e t A t t r i b u t e ( t h i s . k e y , t h i s . n e w V a l u e ) : t h i s . r o o t . _ r e m o v e A t t r i b u t e ( t h i s . k e y ) } t o J S O N ( ) { c o n s t t = s u p e r . t o J S O N ( ) ; r e t u r n t . r o o t = t h i s . r o o t . t o J S O N ( ) , t } s t a t i c g e t c l a s s N a m e ( ) { r e t u r n " R o o t A t t r i b u t e O p e r a t i o n " } s t a t i c f r o m J S O N ( t , e ) { i f ( ! e . g e t R o o t ( t . r o o t ) ) t h r o w n e w Z n . b ( " r o o t a t t r i b u t e - o p e r a t i o n - f r o m j s o n - n o - r o o t : C a n n o t c r e a t e R o o t A t t r i b u t e O p e r a t i o n . R o o t w i t h s p e c i f i e d n a m e d o e s n o t e x i s t . " , t h i s , { r o o t N a m e : t . r o o t } ) ; r e t u r n n e w k c ( e . g e t R o o t ( t . r o o t ) , t . k e y , t . o l d V a l u e , t . n e w V a l u e , t . b a s e V e r s i o n ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s _ c e x t e n d s i c { c o n s t r u c t o r ( t , e , n , i , o ) { s u p e r ( o ) , t h i s . s o u r c e P o s i t i o n = t . c l o n e ( ) , t h i s . s o u r c e P o s i t i o n . s t i c k i n e s s = " t o P r e v i o u s " , t h i s . h o w M a n y = e , t h i s . t a r g e t P o s i t i o n = n . c l o n e ( ) , t h i s . t a r g e t P o s i t i o n . s t i c k i n e s s = " t o N e x t " , t h i s . g r a v e y a r d P o s i t i o n = i . c l o n e ( ) } g e t t y p e ( ) { r e t u r n " m e r g e " } g e t d e l e t i o n P o s i t i o n ( ) { r e t u r n n e w J s ( t h i s . s o u r c e P o s i t i o n . r o o t , t h i s . s o u r c e P o s i t i o n . p a t h . s l i c e ( 0 , - 1 ) ) } g e t m o v e d R a n g e ( ) { c o n s t t = t h i s . s o u r c e P o s i t i o n . g e t S h i f t e d B y ( N u m b e r . P O S I T I V E _ I N F I N I T Y ) ; r e t u r n n e w Z s ( t h i s . s o u r c e P o s i t i o n , t ) } c l o n e ( ) { r e t u r n n e w t h i s . c o n s t r u c t o r ( t h i s . s o u r c e P o s i t i o n , t h i s . h o w M a n y , t h i s . t a r g e t P o s i t i o n , t h i s . g r a v e y a r d P o s i t i o n , t h i s . b a s e V e r s i o n ) } g e t R e v e r s e d ( ) { c o n s t t = t h i s . t a r g e t P o s i t i o n . _ g e t T r a n s f o r m e d B y M e r g e O p e r a t i o n ( t h i s ) , e = t h i s . s o u r c e P o s i t i o n . p a t h . s l i c e ( 0 , - 1 ) , n = n e w J s ( t h i s . s o u r c e P o s i t i o n . r o o t , e ) . _ g e t T r a n s f o r m e d B y M e r g e O p e r a t i o n ( t h i s ) , i = n e w v c ( t , t h i s . h o w M a n y , t h i s . g r a v e y a r d P o s i t i o n , t h i s . b a s e V e r s i o n + 1 ) ; r e t u r n i . i n s e r t i o n P o s i t i o n = n , i } _ v a l i d a t e ( ) { c o n s t t = t h i s . s o u r c e P o s i t i o n . p a r e n t , e = t h i s . t a r g e t P o s i t i o n . p a r e n t ; i f ( ! t . p a r e n t ) t h r o w n e w Z n . b ( " m e r g e - o p e r a t i o n - s o u r c e - p o s i t i o n - i n v a l i d : M e r g e s o u r c e p o s i t i o n i s i n v a l i d . " , t h i s ) ; i f ( ! e . p a r e n t ) t h r o w n e w Z n . b ( " m e r g e - o p e r a t i o n - t a r g e t - p o s i t i o n - i n v a l i d : M e r g e t a r g e t p o s i t i o n i s i n v a l i d . " , t h i s ) ; i f ( t h i s . h o w M a n y ! = t . m a x O f f s e t ) t h r o w n e w Z n . b ( " m e r g e - o p e r a t i o n - h o w - m a n y - i n v a l i d : M e r g e o p e r a t i o n s p e c i f i e s w r o n g n u m b e r o f n o d e s t o m o v e . " , t h i s ) } _ e x e c u t e ( ) { c o n s t t = t h i s . s o u r c e P o s i t i o n . p a r e n t ; a c ( Z s . _ c r e a t e I n ( t ) , t h i s . t a r g e t P o s i t i o n ) , a c ( Z s . _ c r e a t e O n ( t ) , t h i s . g r a v e y a r d P o s i t i o n ) } t o J S O N ( ) { c o n s t t = s u p e r . t o J S O N ( ) ; r e t u r n t . s o u r c e P o s i t i o n = t . s o u r c e P o s i t i o n . t o J S O N ( ) , t . t a r g e t P o s i t i o n = t . t a r g e t P o s i t i o n . t o J S O N ( ) , t . g r a v e y a r d P o s i t i o n = t . g r a v e y a r d P o s i t i o n . t o J S O N ( ) , t } s t a t i c g e t c l a s s N a m e ( ) { r e t u r n " M e r g e O p e r a t i o n " } s t a t i c f r o m J S O N ( t , e ) { c o n s t n = J s . f r o m J S O N ( t . s o u r c e P o s i t i o n , e ) , i = J s . f r o m J S O N ( t . t a r g e t P o s i t i o n , e ) , o = J s . f r o m J S O N ( t . g r a v e y a r d P o s i t i o n , e ) ; r e t u r n n e w t h i s ( n , t . h o w M a n y , i , o , t . b a s e V e r s i o n ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s v c e x t e n d s i c { c o n s t r u c t o r ( t , e , n , i ) { s u p e r ( i ) , t h i s . s p l i t P o s i t i o n = t . c l o n e ( ) , t h i s . s p l i t P o s i t i o n . s t i c k i n e s s = " t o N e x t " , t h i s . h o w M a n y = e , t h i s . i n s e r t i o n P o s i t i o n = v c . g e t I n s e r t i o n P o s i t i o n ( t ) , t h i s . i n s e r t i o n P o s i t i o n . s t i c k i n e s s = " t o N o n e " , t h i s . g r a v e y a r d P o s i t i o n = n ? n . c l o n e ( ) : n u l l , t h i s . g r a v e y a r d P o s i t i o n & & ( t h i s . g r a v e y a r d P o s i t i o n . s t i c k i n e s s = " t o N e x t " ) } g e t t y p e ( ) { r e t u r n " s p l i t " } g e t m o v e T a r g e t P o s i t i o n ( ) { c o n s t t = t h i s . i n s e r t i o n P o s i t i o n . p a t h . s l i c e ( ) ; r e t u r n t . p u s h ( 0 ) , n e w J s ( t h i s . i n s e r t i o n P o s i t i o n . r o o t , t ) } g e t m o v e d R a n g e ( ) { c o n s t t = t h i s . s p l i t P o s i t i o n . g e t S h i f t e d B y ( N u m b e r . P O S I T I V E _ I N F I N I T Y ) ; r e t u r n n e w Z s ( t h i s . s p l i t P o s i t i o n , t ) } c l o n e ( ) { c o n s t t = n e w t h i s . c o n s t r u c t o r ( t h i s . s p l i t P o s i t i o n , t h i s . h o w M a n y , t h i s . g r a v e y a r d P o s i t i o n , t h i s . b a s e V e r s i o n ) ; r e t u r n t . i n s e r t i o n P o s i t i o n = t h i s . i n s e r t i o n P o s i t i o n , t } g e t R e v e r s e d ( ) { c o n s t t = t h i s . s p l i t P o s i t i o n . r o o t . d o c u m e n t . g r a v e y a r d , e = n e w J s ( t , [ 0 ] ) ; r e t u r n n e w _ c ( t h i s . m o v e T a r g e t P o s i t i o n , t h i s . h o w M a n y , t h i s . s p l i t P o s i t i o n , e , t h i s . b a s e V e r s i o n + 1 ) } _ v a l i d a t e ( ) { c o n s t t = t h i s . s p l i t P o s i t i o n . p a r e n t , e = t h i s . s p l i t P o s i t i o n . o f f s e t ; i f ( ! t | | t . m a x O f f s e t < e ) t h r o w n e w Z n . b ( " s p l i t - o p e r a t i o n - p o s i t i o n - i n v a l i d : S p l i t p o s i t i o n i s i n v a l i d . " , t h i s ) ; i f ( ! t . p a r e n t ) t h r o w n e w Z n . b ( " s p l i t - o p e r a t i o n - s p l i t - i n - r o o t : C a n n o t s p l i t r o o t e l e m e n t . " , t h i s ) ; i f ( t h i s . h o w M a n y ! = t . m a x O f f s e t - t h i s . s p l i t P o s i t i o n . o f f s e t ) t h r o w n e w Z n . b ( " s p l i t - o p e r a t i o n - h o w - m a n y - i n v a l i d : S p l i t o p e r a t i o n s p e c i f i e s w r o n g n u m b e r o f n o d e s t o m o v e . " , t h i s ) ; i f ( t h i s . g r a v e y a r d P o s i t i o n & & ! t h i s . g r a v e y a r d P o s i t i o n . n o d e A f t e r ) t h r o w n e w Z n . b ( " s p l i t - o p e r a t i o n - g r a v e y a r d - p o s i t i o n - i n v a l i d : G r a v e y a r d p o s i t i o n i n v a l i d . " , t h i s ) } _ e x e c u t e ( ) { c o n s t t = t h i s . s p l i t P o s i t i o n . p a r e n t ; i f ( t h i s . g r a v e y a r d P o s i t i o n ) a c ( Z s . _ c r e a t e F r o m P o s i t i o n A n d S h i f t ( t h i s . g r a v e y a r d P o s i t i o n , 1 ) , t h i s . i n s e r t i o n P o s i t i o n ) ; e l s e { c o n s t e = t . _ c l o n e ( ) ; r c ( t h i s . i n s e r t i o n P o s i t i o n , e ) } a c ( n e w Z s ( J s . _ c r e a t e A t ( t , t h i s . s p l i t P o s i t i o n . o f f s e t ) , J s . _ c r e a t e A t ( t , t . m a x O f f s e t ) ) , t h i s . m o v e T a r g e t P o s i t i o n ) } t o J S O N ( ) { c o n s t t = s u p e r . t o J S O N ( ) ; r e t u r n t . s p l i t P o s i t i o n = t h i s . s p l i t P o s i t i o n . t o J S O N ( ) , t . i n s e r t i o n P o s i t i o n = t h i s . i n s e r t i o n P o s i t i o n . t o J S O N ( ) , t h i s . g r a v e y a r d P o s i t i o n & & ( t . g r a v e y a r d P o s i t i o n = t h i s . g r a v e y a r d P o s i t i o n . t o J S O N ( ) ) , t } s t a t i c g e t c l a s s N a m e ( ) { r e t u r n " S p l i t O p e r a t i o n " } s t a t i c g e t I n s e r t i o n P o s i t i o n ( t ) { c o n s t e = t . p a t h . s l i c e ( 0 , - 1 ) ; r e t u r n e [ e . l e n g t h - 1 ] + + , n e w J s ( t . r o o t , e ) } s t a t i c f r o m J S O N ( t , e ) { c o n s t n = J s . f r o m J S O N ( t . s p l i t P o s i t i o n , e ) , i = J s . f r o m J S O N ( t . i n s e r t i o n P o s i t i o n , e ) , o = t . g r a v e y a r d P o s i t i o n ? J s . f r o m J S O N ( t . g r a v e y a r d P o s i t i o n , e ) : n u l l , r = n e w t h i s ( n , t . h o w M a n y , o , t . b a s e V e r s i o n ) ; r e t u r n r . i n s e r t i o n P o s i t i o n = i , r } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s y c e x t e n d s $ s { c o n s t r u c t o r ( t , e , n = " m a i n " ) { s u p e r ( e ) , t h i s . _ d o c = t , t h i s . r o o t N a m e = n } g e t d o c u m e n t ( ) { r e t u r n t h i s . _ d o c } i s ( t , e ) { c o n s t n = t . r e p l a c e ( " m o d e l : " , " " ) ; r e t u r n e ? " r o o t E l e m e n t " = = n & & e = = t h i s . n a m e | | s u p e r . i s ( t , e ) : " r o o t E l e m e n t " = = n | | s u p e r . i s ( t ) } t o J S O N ( ) { r e t u r n t h i s . r o o t N a m e } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s x c { c o n s t r u c t o r ( t , e ) { t h i s . m o d e l = t , t h i s . b a t c h = e } c r e a t e T e x t ( t , e ) { r e t u r n n e w j s ( t , e ) } c r e a t e E l e m e n t ( t , e ) { r e t u r n n e w $ s ( t , e ) } c r e a t e D o c u m e n t F r a g m e n t ( ) { r e t u r n n e w o c } i n s e r t ( t , e , n = 0 ) { i f ( t h i s . _ a s s e r t W r i t e r U s e d C o r r e c t l y ( ) , t i n s t a n c e o f j s & & " " = = t . d a t a ) r e t u r n ; c o n s t i = J s . _ c r e a t e A t ( e , n ) ; i f ( t . p a r e n t ) { i f ( E c ( t . r o o t , i . r o o t ) ) r e t u r n v o i d t h i s . m o v e ( Z s . _ c r e a t e O n ( t ) , i ) ; i f ( t . r o o t . d o c u m e n t ) t h r o w n e w Z n . b ( " m o d e l - w r i t e r - i n s e r t - f o r b i d d e n - m o v e : C a n n o t m o v e a n o d e f r o m a d o c u m e n t t o a d i f f e r e n t t r e e . I t i s f o r b i d d e n t o m o v e a n o d e t h a t w a s a l r e a d y i n a d o c u m e n t o u t s i d e o f i t . " , t h i s ) ; t h i s . r e m o v e ( t ) } c o n s t o = i . r o o t . d o c u m e n t ? i . r o o t . d o c u m e n t . v e r s i o n : n u l l , r = n e w g c ( i , t , o ) ; i f ( t i n s t a n c e o f j s & & ( r . s h o u l d R e c e i v e A t t r i b u t e s = ! 0 ) , t h i s . b a t c h . a d d O p e r a t i o n ( r ) , t h i s . m o d e l . a p p l y O p e r a t i o n ( r ) , t i n s t a n c e o f o c ) f o r ( c o n s t [ e , n ] o f t . m a r k e r s ) { c o n s t t = J s . _ c r e a t e A t ( n . r o o t , 0 ) , o = { r a n g e : n e w Z s ( n . s t a r t . _ g e t C o m b i n e d ( t , i ) , n . e n d . _ g e t C o m b i n e d ( t , i ) ) , u s i n g O p e r a t i o n : ! 0 , a f f e c t s D a t a : ! 0 } ; t h i s . m o d e l . m a r k e r s . h a s ( e ) ? t h i s . u p d a t e M a r k e r ( e , o ) : t h i s . a d d M a r k e r ( e , o ) } } i n s e r t T e x t ( t , e , n , i ) { e i n s t a n c e o f o c | | e i n s t a n c e o f $ s | | e i n s t a n c e o f J s ? t h i s . i n s e r t ( t h i s . c r e a t e T e x t ( t ) , e , n ) : t h i s . i n s e r t ( t h i s . c r e a t e T e x t ( t , e ) , n , i ) } i n s e r t E l e m e n t ( t , e , n , i ) { e i n s t a n c e o f o c | | e i n s t a n c e o f $ s | | e i n s t a n c e o f J s ? t h i s . i n s e r t ( t h i s . c r e a t e E l e m e n t ( t ) , e , n ) : t h i s . i n s e r t ( t h i s . c r e a t e E l e m e n t ( t , e ) , n , i ) } a p p e n d ( t , e ) { t h i s . i n s e r t ( t , e , " e n d " ) } a p p e n d T e x t ( t , e , n ) { e i n s t a n c e o f o c | | e i n s t a n c e o f $ s ? t h i s . i n s e r t ( t h i s . c r e a t e T e x t ( t ) , e , " e n d " ) : t h i s . i n s e r t ( t h i s . c r e a t e T e x t ( t , e ) , n , " e n d " ) } a p p e n d E l e m e n t ( t , e , n ) { e i n s t a n c e o f o c | | e i n s t a n c e o f $ s ? t h i s . i n s e r t ( t h i s . c r e a t e E l e m e n t ( t ) , e , " e n d " ) : t h i s . i n s e r t ( t h i s . c r e a t e E l e m e n t ( t , e ) , n , " e n d " ) } s e t A t t r i b u t e ( t , e , n ) { i f ( t h i s . _ a s s e r t W r i t e r U s e d C o r r e c t l y ( ) , n i n s t a n c e o f Z s ) { c o n s t i = n . g e t M i n i m a l F l a t R a n g e s ( ) ; f o r ( c o n s t n o f i ) C c ( t h i s , t , e , n ) } e l s e A c ( t h i s , t , e , n ) } s e t A t t r i b u t e s ( t , e ) { f o r ( c o n s t [ n , i ] o f z s ( t ) ) t h i s . s e t A t t r i b u t e ( n , i , e ) } r e m o v e A t t r i b u t e ( t , e ) { i f ( t h i s . _ a s s e r t W r i t e r U s e d C o r r e c t l y ( ) , e i n s t a n c e o f Z s ) { c o n s t n = e . g e t M i n i m a l F l a t R a n g e s ( ) ; f o r ( c o n s t e o f n ) C c ( t h i s , t , n u l l , e ) } e l s e A c ( t h i s , t , n u l l , e ) } c l e a r A t t r i b u t e s ( t ) { t h i s . _ a s s e r t W r i t e r U s e d C o r r e c t l y ( ) ; c o n s t e = t = > { f o r ( c o n s t e o f t . g e t A t t r i b u t e K e y s ( ) ) t h i s . r e m o v e A t t r i b u t e ( e , t ) } ; i f ( t i n s t a n c e o f Z s ) f o r ( c o n s t n o f t . g e t I t e m s ( ) ) e ( n ) ; e l s e e ( t ) } m o v e ( t , e , n ) { i f ( t h i s . _ a s s e r t W r i t e r U s e d C o r r e c t l y ( ) , ! ( t i n s t a n c e o f Z s ) ) t h r o w n e w Z n . b ( " w r i t e r - m o v e - i n v a l i d - r a n g e : I n v a l i d r a n g e t o m o v e . " , t h i s ) ; i f ( ! t . i s F l a t ) t h r o w n e w Z n . b ( " w r i t e r - m o v e - r a n g e - n o t - f l a t : R a n g e t o m o v e i s n o t f l a t . " , t h i s ) ; c o n s t i = J s . _ c r e a t e A t ( e , n ) ; i f ( i . i s E q u a l ( t . s t a r t ) ) r e t u r n ; i f ( t h i s . _ a d d O p e r a t i o n F o r A f f e c t e d M a r k e r s ( " m o v e " , t ) , ! E c ( t . r o o t , i . r o o t ) ) t h r o w n e w Z n . b ( " w r i t e r - m o v e - d i f f e r e n t - d o c u m e n t : R a n g e i s g o i n g t o b e m o v e d b e t w e e n d i f f e r e n t d o c u m e n t s . " , t h i s ) ; c o n s t o = t . r o o t . d o c u m e n t ? t . r o o t . d o c u m e n t . v e r s i o n : n u l l , r = n e w m c ( t . s t a r t , t . e n d . o f f s e t - t . s t a r t . o f f s e t , i , o ) ; t h i s . b a t c h . a d d O p e r a t i o n ( r ) , t h i s . m o d e l . a p p l y O p e r a t i o n ( r ) } r e m o v e ( t ) { t h i s . _ a s s e r t W r i t e r U s e d C o r r e c t l y ( ) ; c o n s t e = ( t i n s t a n c e o f Z s ? t : Z s . _ c r e a t e O n ( t ) ) . g e t M i n i m a l F l a t R a n g e s ( ) . r e v e r s e ( ) ; f o r ( c o n s t t o f e ) t h i s . _ a d d O p e r a t i o n F o r A f f e c t e d M a r k e r s ( " m o v e " , t ) , T c ( t . s t a r t , t . e n d . o f f s e t - t . s t a r t . o f f s e t , t h i s . b a t c h , t h i s . m o d e l ) } m e r g e ( t ) { t h i s . _ a s s e r t W r i t e r U s e d C o r r e c t l y ( ) ; c o n s t e = t . n o d e B e f o r e , n = t . n o d e A f t e r ; i f ( t h i s . _ a d d O p e r a t i o n F o r A f f e c t e d M a r k e r s ( " m e r g e " , t ) , ! ( e i n s t a n c e o f $ s ) ) t h r o w n e w Z n . b ( " w r i t e r - m e r g e - n o - e l e m e n t - b e f o r e : N o d e b e f o r e m e r g e p o s i t i o n m u s t b e a n e l e m e n t . " , t h i s ) ; i f ( ! ( n i n s t a n c e o f $ s ) ) t h r o w n e w Z n . b ( " w r i t e r - m e r g e - n o - e l e m e n t - a f t e r : N o d e a f t e r m e r g e p o s i t i o n m u s t b e a n e l e m e n t . " , t h i s ) ; t . r o o t . d o c u m e n t ? t h i s . _ m e r g e ( t ) : t h i s . _ m e r g e D e t a c h e d ( t ) } c r e a t e P o s i t i o n F r o m P a t h ( t , e , n ) { r e t u r n t h i s . m o d e l . c r e a t e P o s i t i o n F r o m P a t h ( t , e , n ) } c r e a t e P o s i t i o n A t ( t , e ) { r e t u r n t h i s . m o d e l . c r e a t e P o s i t i o n A t ( t , e ) } c r e a t e P o s i t i o n A f t e r ( t ) { r e t u r n t h i s . m o d e l . c r e a t e P o s i t i o n A f t e r ( t ) } c r e a t e P o s i t i o n B e f o r e ( t ) { r e t u r n t h i s . m o d e l . c r e a t e P o s i t i o n B e f o r e ( t ) } c r e a t e R a n g e ( t , e ) { r e t u r n t h i s . m o d e l . c r e a t e R a n g e ( t , e ) } c r e a t e R a n g e I n ( t ) { r e t u r n t h i s . m o d e l . c r e a t e R a n g e I n ( t ) } c r e a t e R a n g e O n ( t ) { r e t u r n t h i s . m o d e l . c r e a t e R a n g e O n ( t ) } c r e a t e S e l e c t i o n ( t , e , n ) { r e t u r n t h i s . m o d e l . c r e a t e S e l e c t i o n ( t , e , n ) } _ m e r g e D e t a c h e d ( t ) { c o n s t e = t . n o d e B e f o r e , n = t . n o d e A f t e r ; t h i s . m o v e ( Z s . _ c r e a t e I n ( n ) , J s . _ c r e a t e A t ( e , " e n d " ) ) , t h i s . r e m o v e
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s S c { c o n s t r u c t o r ( t ) { t h i s . _ m a r k e r C o l l e c t i o n = t , t h i s . _ c h a n g e s I n E l e m e n t = n e w M a p , t h i s . _ e l e m e n t S n a p s h o t s = n e w M a p , t h i s . _ c h a n g e d M a r k e r s = n e w M a p , t h i s . _ c h a n g e C o u n t = 0 , t h i s . _ c a c h e d C h a n g e s = n u l l , t h i s . _ c a c h e d C h a n g e s W i t h G r a v e y a r d = n u l l } g e t i s E m p t y ( ) { r e t u r n 0 = = t h i s . _ c h a n g e s I n E l e m e n t . s i z e & & 0 = = t h i s . _ c h a n g e d M a r k e r s . s i z e } r e f r e s h I t e m ( t ) { i f ( t h i s . _ i s I n I n s e r t e d E l e m e n t ( t . p a r e n t ) ) r e t u r n ; t h i s . _ m a r k R e m o v e ( t . p a r e n t , t . s t a r t O f f s e t , t . o f f s e t S i z e ) , t h i s . _ m a r k I n s e r t ( t . p a r e n t , t . s t a r t O f f s e t , t . o f f s e t S i z e ) ; c o n s t e = Z s . _ c r e a t e O n ( t ) ; f o r ( c o n s t t o f t h i s . _ m a r k e r C o l l e c t i o n . g e t M a r k e r s I n t e r s e c t i n g R a n g e ( e ) ) { c o n s t e = t . g e t R a n g e ( ) ; t h i s . b u f f e r M a r k e r C h a n g e ( t . n a m e , e , e , t . a f f e c t s D a t a ) } t h i s . _ c a c h e d C h a n g e s = n u l l } b u f f e r O p e r a t i o n ( t ) { s w i t c h ( t . t y p e ) { c a s e " i n s e r t " : i f ( t h i s . _ i s I n I n s e r t e d E l e m e n t ( t . p o s i t i o n . p a r e n t ) ) r e t u r n ; t h i s . _ m a r k I n s e r t ( t . p o s i t i o n . p a r e n t , t . p o s i t i o n . o f f s e t , t . n o d e s . m a x O f f s e t ) ; b r e a k ; c a s e " a d d A t t r i b u t e " : c a s e " r e m o v e A t t r i b u t e " : c a s e " c h a n g e A t t r i b u t e " : f o r ( c o n s t e o f t . r a n g e . g e t I t e m s ( { s h a l l o w : ! 0 } ) ) t h i s . _ i s I n I n s e r t e d E l e m e n t ( e . p a r e n t ) | | t h i s . _ m a r k A t t r i b u t e ( e ) ; b r e a k ; c a s e " r e m o v e " : c a s e " m o v e " : c a s e " r e i n s e r t " : { i f ( t . s o u r c e P o s i t i o n . i s E q u a l ( t . t a r g e t P o s i t i o n ) | | t . s o u r c e P o s i t i o n . g e t S h i f t e d B y ( t . h o w M a n y ) . i s E q u a l ( t . t a r g e t P o s i t i o n ) ) r e t u r n ; c o n s t e = t h i s . _ i s I n I n s e r t e d E l e m e n t ( t . s o u r c e P o s i t i o n . p a r e n t ) , n = t h i s . _ i s I n I n s e r t e d E l e m e n t ( t . t a r g e t P o s i t i o n . p a r e n t ) ; e | | t h i s . _ m a r k R e m o v e ( t . s o u r c e P o s i t i o n . p a r e n t , t . s o u r c e P o s i t i o n . o f f s e t , t . h o w M a n y ) , n | | t h i s . _ m a r k I n s e r t ( t . t a r g e t P o s i t i o n . p a r e n t , t . g e t M o v e d R a n g e S t a r t ( ) . o f f s e t , t . h o w M a n y ) ; b r e a k } c a s e " r e n a m e " : { i f ( t h i s . _ i s I n I n s e r t e d E l e m e n t ( t . p o s i t i o n . p a r e n t ) ) r e t u r n ; t h i s . _ m a r k R e m o v e ( t . p o s i t i o n . p a r e n t , t . p o s i t i o n . o f f s e t , 1 ) , t h i s . _ m a r k I n s e r t ( t . p o s i t i o n . p a r e n t , t . p o s i t i o n . o f f s e t , 1 ) ; c o n s t e = Z s . _ c r e a t e F r o m P o s i t i o n A n d S h i f t ( t . p o s i t i o n , 1 ) ; f o r ( c o n s t t o f t h i s . _ m a r k e r C o l l e c t i o n . g e t M a r k e r s I n t e r s e c t i n g R a n g e ( e ) ) { c o n s t e = t . g e t R a n g e ( ) ; t h i s . b u f f e r M a r k e r C h a n g e ( t . n a m e , e , e , t . a f f e c t s D a t a ) } b r e a k } c a s e " s p l i t " : { c o n s t e = t . s p l i t P o s i t i o n . p a r e n t ; t h i s . _ i s I n I n s e r t e d E l e m e n t ( e ) | | t h i s . _ m a r k R e m o v e ( e , t . s p l i t P o s i t i o n . o f f s e t , t . h o w M a n y ) , t h i s . _ i s I n I n s e r t e d E l e m e n t ( t . i n s e r t i o n P o s i t i o n . p a r e n t ) | | t h i s . _ m a r k I n s e r t ( t . i n s e r t i o n P o s i t i o n . p a r e n t , t . i n s e r t i o n P o s i t i o n . o f f s e t , 1 ) , t . g r a v e y a r d P o s i t i o n & & t h i s . _ m a r k R e m o v e ( t . g r a v e y a r d P o s i t i o n . p a r e n t , t . g r a v e y a r d P o s i t i o n . o f f s e t , 1 ) ; b r e a k } c a s e " m e r g e " : { c o n s t e = t . s o u r c e P o s i t i o n . p a r e n t ; t h i s . _ i s I n I n s e r t e d E l e m e n t ( e . p a r e n t ) | | t h i s . _ m a r k R e m o v e ( e . p a r e n t , e . s t a r t O f f s e t , 1 ) ; c o n s t n = t . g r a v e y a r d P o s i t i o n . p a r e n t ; t h i s . _ m a r k I n s e r t ( n , t . g r a v e y a r d P o s i t i o n . o f f s e t , 1 ) ; c o n s t i = t . t a r g e t P o s i t i o n . p a r e n t ; t h i s . _ i s I n I n s e r t e d E l e m e n t ( i ) | | t h i s . _ m a r k I n s e r t ( i , t . t a r g e t P o s i t i o n . o f f s e t , e . m a x O f f s e t ) ; b r e a k } } t h i s . _ c a c h e d C h a n g e s = n u l l } b u f f e r M a r k e r C h a n g e ( t , e , n , i ) { c o n s t o = t h i s . _ c h a n g e d M a r k e r s . g e t ( t ) ; o ? ( o . n e w R a n g e = n , o . a f f e c t s D a t a = i , n u l l = = o . o l d R a n g e & & n u l l = = o . n e w R a n g e & & t h i s . _ c h a n g e d M a r k e r s . d e l e t e ( t ) ) : t h i s . _ c h a n g e d M a r k e r s . s e t ( t , { o l d R a n g e : e , n e w R a n g e : n , a f f e c t s D a t a : i } ) } g e t M a r k e r s T o R e m o v e ( ) { c o n s t t = [ ] ; f o r ( c o n s t [ e , n ] o f t h i s . _ c h a n g e d M a r k e r s ) n u l l ! = n . o l d R a n g e & & t . p u s h ( { n a m e : e , r a n g e : n . o l d R a n g e } ) ; r e t u r n t } g e t M a r k e r s T o A d d ( ) { c o n s t t = [ ] ; f o r ( c o n s t [ e , n ] o f t h i s . _ c h a n g e d M a r k e r s ) n u l l ! = n . n e w R a n g e & & t . p u s h ( { n a m e : e , r a n g e : n . n e w R a n g e } ) ; r e t u r n t } g e t C h a n g e d M a r k e r s ( ) { r e t u r n A r r a y . f r o m ( t h i s . _ c h a n g e d M a r k e r s ) . m a p ( t = > ( { n a m e : t [ 0 ] , d a t a : { o l d R a n g e : t [ 1 ] . o l d R a n g e , n e w R a n g e : t [ 1 ] . n e w R a n g e } } ) ) } h a s D a t a C h a n g e s ( ) { f o r ( c o n s t [ , t ] o f t h i s . _ c h a n g e d M a r k e r s ) i f ( t . a f f e c t s D a t a ) r e t u r n ! 0 ; r e t u r n t h i s . _ c h a n g e s I n E l e m e n t . s i z e > 0 } g e t C h a n g e s ( t = { i n c l u d e C h a n g e s I n G r a v e y a r d : ! 1 } ) { i f ( t h i s . _ c a c h e d C h a n g e s ) r e t u r n t . i n c l u d e C h a n g e s I n G r a v e y a r d ? t h i s . _ c a c h e d C h a n g e s W i t h G r a v e y a r d . s l i c e ( ) : t h i s . _ c a c h e d C h a n g e s . s l i c e ( ) ; c o n s t e = [ ] ; f o r ( c o n s t t o f t h i s . _ c h a n g e s I n E l e m e n t . k e y s ( ) ) { c o n s t n = t h i s . _ c h a n g e s I n E l e m e n t . g e t ( t ) . s o r t ( ( t , e ) = > t . o f f s e t = = = e . o f f s e t ? t . t y p e ! = e . t y p e ? " r e m o v e " = = t . t y p e ? - 1 : 1 : 0 : t . o f f s e t < e . o f f s e t ? - 1 : 1 ) , i = t h i s . _ e l e m e n t S n a p s h o t s . g e t ( t ) , o = R c ( t . g e t C h i l d r e n ( ) ) , r = I c ( i . l e n g t h , n ) ; l e t s = 0 , a = 0 ; f o r ( c o n s t n o f r ) i f ( " i " = = = n ) e . p u s h ( t h i s . _ g e t I n s e r t D i f f ( t , s , o [ s ] . n a m e ) ) , s + + ; e l s e i f ( " r " = = = n ) e . p u s h ( t h i s . _ g e t R e m o v e D i f f ( t , s , i [ a ] . n a m e ) ) , a + + ; e l s e i f ( " a " = = = n ) { c o n s t n = o [ s ] . a t t r i b u t e s , r = i [ a ] . a t t r i b u t e s ; l e t c ; i f ( " $ t e x t " = = o [ s ] . n a m e ) c = n e w Z s ( J s . _ c r e a t e A t ( t , s ) , J s . _ c r e a t e A t ( t , s + 1 ) ) ; e l s e { c o n s t e = t . o f f s e t T o I n d e x ( s ) ; c = n e w Z s ( J s . _ c r e a t e A t ( t , s ) , J s . _ c r e a t e A t ( t .
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s D c { c o n s t r u c t o r ( ) { t h i s . _ o p e r a t i o n s = [ ] , t h i s . _ u n d o P a i r s = n e w M a p , t h i s . _ u n d o n e O p e r a t i o n s = n e w S e t } a d d O p e r a t i o n ( t ) { t h i s . _ o p e r a t i o n s . i n c l u d e s ( t ) | | t h i s . _ o p e r a t i o n s . p u s h ( t ) } g e t O p e r a t i o n s ( t = 0 , e = N u m b e r . P O S I T I V E _ I N F I N I T Y ) { r e t u r n t < 0 ? [ ] : t h i s . _ o p e r a t i o n s . s l i c e ( t , e ) } g e t O p e r a t i o n ( t ) { r e t u r n t h i s . _ o p e r a t i o n s [ t ] } s e t O p e r a t i o n A s U n d o n e ( t , e ) { t h i s . _ u n d o P a i r s . s e t ( e , t ) , t h i s . _ u n d o n e O p e r a t i o n s . a d d ( t ) } i s U n d o i n g O p e r a t i o n ( t ) { r e t u r n t h i s . _ u n d o P a i r s . h a s ( t ) } i s U n d o n e O p e r a t i o n ( t ) { r e t u r n t h i s . _ u n d o n e O p e r a t i o n s . h a s ( t ) } g e t U n d o n e O p e r a t i o n ( t ) { r e t u r n t h i s . _ u n d o P a i r s . g e t ( t ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /function Mc(t,e){return!!(n=t.charAt(e-1))&&1==n.length&&/ [ \ud800 - \udbff ] / . test ( n ) && function ( t ) { return ! ! t && 1 == t . length && /[\udc00-\udfff]/ . test ( t ) } ( t . charAt ( e ) ) ; var n } function Nc ( t , e ) { return ! ! ( n = t . charAt ( e ) ) && 1 == n . length && /[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/ . test ( n ) ; var n }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t V c = " $ g r a v e y a r d " ; c l a s s F c { c o n s t r u c t o r ( t ) { t h i s . m o d e l = t , t h i s . v e r s i o n = 0 , t h i s . h i s t o r y = n e w D c ( t h i s ) , t h i s . s e l e c t i o n = n e w u a ( t h i s ) , t h i s . r o o t s = n e w s o ( { i d P r o p e r t y : " r o o t N a m e " } ) , t h i s . d i f f e r = n e w S c ( t . m a r k e r s ) , t h i s . _ p o s t F i x e r s = n e w S e t , t h i s . _ h a s S e l e c t i o n C h a n g e d F r o m T h e L a s t C h a n g e B l o c k = ! 1 , t h i s . c r e a t e R o o t ( " $ r o o t " , V c ) , t h i s . l i s t e n T o ( t , " a p p l y O p e r a t i o n " , ( t , e ) = > { c o n s t n = e [ 0 ] ; i f ( n . i s D o c u m e n t O p e r a t i o n & & n . b a s e V e r s i o n ! = = t h i s . v e r s i o n ) t h r o w n e w Z n . b ( " m o d e l - d o c u m e n t - a p p l y O p e r a t i o n - w r o n g - v e r s i o n : O n l y o p e r a t i o n s w i t h m a t c h i n g v e r s i o n s c a n b e a p p l i e d . " , t h i s , { o p e r a t i o n : n } ) } , { p r i o r i t y : " h i g h e s t " } ) , t h i s . l i s t e n T o ( t , " a p p l y O p e r a t i o n " , ( t , e ) = > { c o n s t n = e [ 0 ] ; n . i s D o c u m e n t O p e r a t i o n & & t h i s . d i f f e r . b u f f e r O p e r a t i o n ( n ) } , { p r i o r i t y : " h i g h " } ) , t h i s . l i s t e n T o ( t , " a p p l y O p e r a t i o n " , ( t , e ) = > { c o n s t n = e [ 0 ] ; n . i s D o c u m e n t O p e r a t i o n & & ( t h i s . v e r s i o n + + , t h i s . h i s t o r y . a d d O p e r a t i o n ( n ) ) } , { p r i o r i t y : " l o w " } ) , t h i s . l i s t e n T o ( t h i s . s e l e c t i o n , " c h a n g e " , ( ) = > { t h i s . _ h a s S e l e c t i o n C h a n g e d F r o m T h e L a s t C h a n g e B l o c k = ! 0 } ) , t h i s . l i s t e n T o ( t . m a r k e r s , " u p d a t e " , ( t , e , n , i ) = > { t h i s . d i f f e r . b u f f e r M a r k e r C h a n g e ( e . n a m e , n , i , e . a f f e c t s D a t a ) , n u l l = = = n & & e . o n ( " c h a n g e " , ( t , n ) = > { t h i s . d i f f e r . b u f f e r M a r k e r C h a n g e ( e . n a m e , n , e . g e t R a n g e ( ) , e . a f f e c t s D a t a ) } ) } ) } g e t g r a v e y a r d ( ) { r e t u r n t h i s . g e t R o o t ( V c ) } c r e a t e R o o t ( t = " $ r o o t " , e = " m a i n " ) { i f ( t h i s . r o o t s . g e t ( e ) ) t h r o w n e w Z n . b ( " m o d e l - d o c u m e n t - c r e a t e R o o t - n a m e - e x i s t s : R o o t w i t h s p e c i f i e d n a m e a l r e a d y e x i s t s . " , t h i s , { n a m e : e } ) ; c o n s t n = n e w y c ( t h i s , t , e ) ; r e t u r n t h i s . r o o t s . a d d ( n ) , n } d e s t r o y ( ) { t h i s . s e l e c t i o n . d e s t r o y ( ) , t h i s . s t o p L i s t e n i n g ( ) } g e t R o o t ( t = " m a i n " ) { r e t u r n t h i s . r o o t s . g e t ( t ) } g e t R o o t N a m e s ( ) { r e t u r n A r r a y . f r o m ( t h i s . r o o t s , t = > t . r o o t N a m e ) . f i l t e r ( t = > t ! = V c ) } r e g i s t e r P o s t F i x e r ( t ) { t h i s . _ p o s t F i x e r s . a d d ( t ) } t o J S O N ( ) { c o n s t t = f i ( t h i s ) ; r e t u r n t . s e l e c t i o n = " [ e n g i n e . m o d e l . D o c u m e n t S e l e c t i o n ] " , t . m o d e l = " [ e n g i n e . m o d e l . M o d e l ] " , t } _ h a n d l e C h a n g e B l o c k ( t ) { t h i s . _ h a s D o c u m e n t C h a n g e d F r o m T h e L a s t C h a n g e B l o c k ( ) & & ( t h i s . _ c a l l P o s t F i x e r s ( t ) , t h i s . s e l e c t i o n . r e f r e s h ( ) , t h i s . d i f f e r . h a s D a t a C h a n g e s ( ) ? t h i s . f i r e ( " c h a n g e : d a t a " , t . b a t c h ) : t h i s . f i r e ( " c h a n g e " , t . b a t c h ) , t h i s . s e l e c t i o n . r e f r e s h ( ) , t h i s . d i f f e r . r e s e t ( ) ) , t h i s . _ h a s S e l e c t i o n C h a n g e d F r o m T h e L a s t C h a n g e B l o c k = ! 1 } _ h a s D o c u m e n t C h a n g e d F r o m T h e L a s t C h a n g e B l o c k ( ) { r e t u r n ! t h i s . d i f f e r . i s E m p t y | | t h i s . _ h a s S e l e c t i o n C h a n g e d F r o m T h e L a s t C h a n g e B l o c k } _ g e t D e f a u l t R o o t ( ) { f o r ( c o n s t t o f t h i s . r o o t s ) i f ( t ! = = t h i s . g r a v e y a r d ) r e t u r n t ; r e t u r n t h i s . g r a v e y a r d } _ g e t D e f a u l t R a n g e ( ) { c o n s t t = t h i s . _ g e t D e f a u l t R o o t ( ) , e = t h i s . m o d e l , n = e . s c h e m a , i = e . c r e a t e P o s i t i o n F r o m P a t h ( t , [ 0 ] ) ; r e t u r n n . g e t N e a r e s t S e l e c t i o n R a n g e ( i ) | | e . c r e a t e R a n g e ( i ) } _ v a l i d a t e S e l e c t i o n R a n g e ( t ) { r e t u r n B c ( t . s t a r t ) & & B c ( t . e n d ) } _ c a l l P o s t F i x e r s ( t ) { l e t e = ! 1 ; d o { f o r ( c o n s t n o f t h i s . _ p o s t F i x e r s ) i f ( t h i s . s e l e c t i o n . r e f r e s h ( ) , e = n ( t ) ) b r e a k } w h i l e ( e ) } } f u n c t i o n B c ( t ) { c o n s t e = t . t e x t N o d e ; i f ( e ) { c o n s t n = e . d a t a , i = t . o f f s e t - e . s t a r t O f f s e t ; r e t u r n ! M c ( n , i ) & & ! N c ( n , i ) } r e t u r n ! 0 }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / d i ( F c , i i ) ; c l a s s L c { c o n s t r u c t o r ( ) { t h i s . _ m a r k e r s = n e w M a p } [ S y m b o l . i t e r a t o r ] ( ) { r e t u r n t h i s . _ m a r k e r s . v a l u e s ( ) } h a s ( t ) { r e t u r n t h i s . _ m a r k e r s . h a s ( t ) } g e t ( t ) { r e t u r n t h i s . _ m a r k e r s . g e t ( t ) | | n u l l } _ s e t ( t , e , n = ! 1 , i = ! 1 ) { c o n s t o = t i n s t a n c e o f z c ? t . n a m e : t , r = t h i s . _ m a r k e r s . g e t ( o ) ; i f ( r ) { c o n s t t = r . g e t R a n g e ( ) ; l e t s = ! 1 ; r e t u r n t . i s E q u a l ( e ) | | ( r . _ a t t a c h L i v e R a n g e ( a a . f r o m R a n g e ( e ) ) , s = ! 0 ) , n ! = r . m a n a g e d U s i n g O p e r a t i o n s & & ( r . _ m a n a g e d U s i n g O p e r a t i o n s = n , s = ! 0 ) , " b o o l e a n " = = t y p e o f i & & i ! = r . a f f e c t s D a t a & & ( r . _ a f f e c t s D a t a = i , s = ! 0 ) , s & & t h i s . f i r e ( " u p d a t e : " + o , r , t , e ) , r } c o n s t s = a a . f r o m R a n g e ( e ) , a = n e w z c ( o , s , n , i ) ; r e t u r n t h i s . _ m a r k e r s . s e t ( o , a ) , t h i s . f i r e ( " u p d a t e : " + o , a , n u l l , e ) , a } _ r e m o v e ( t ) { c o n s t e = t i n s t a n c e o f z c ? t . n a m e : t , n = t h i s . _ m a r k e r s . g e t ( e ) ; r e t u r n ! ! n & & ( t h i s . _ m a r k e r s . d e l e t e ( e ) , t h i s . f i r e ( " u p d a t e : " + e , n , n . g e t R a n g e ( ) , n u l l ) , t h i s . _ d e s t r o y M a r k e r ( n ) , ! 0 ) } _ r e f r e s h ( t ) { c o n s t e = t i n s t a n c e o f z c ? t . n a m e : t , n = t h i s . _ m a r k e r s . g e t ( e ) ; i f ( ! n ) t h r o w n e w Z n . b ( " m a r k e r c o l l e c t i o n - r e f r e s h - m a r k e r - n o t - e x i s t s : M a r k e r w i t h p r o v i d e d n a m e d o e s n o t e x i s t s . " , t h i s ) ; c o n s t i = n . g e t R a n g e ( ) ; t h i s . f i r e ( " u p d a t e : " + e , n , i , i , n . m a n a g e d U s i n g O p e r a t i o n s , n . a f f e c t s D a t a ) } * g e t M a r k e r s A t P o s i t i o n ( t ) { f o r ( c o n s t e o f t h i s ) e . g e t R a n g e ( ) . c o n t a i n s P o s i t i o n ( t ) & & ( y i e l d e ) } * g e t M a r k e r s I n t e r s e c t i n g R a n g e ( t ) { f o r ( c o n s t e o f t h i s ) n u l l ! = = e . g e t R a n g e ( ) . g e t I n t e r s e c t i o n ( t ) & & ( y i e l d e ) } d e s t r o y ( ) { f o r ( c o n s t t o f t h i s . _ m a r k e r s . v a l u e s ( ) ) t h i s . _ d e s t r o y M a r k e r ( t ) ; t h i s . _ m a r k e r s = n u l l , t h i s . s t o p L i s t e n i n g ( ) } * g e t M a r k e r s G r o u p ( t ) { f o r ( c o n s t e o f t h i s . _ m a r k e r s . v a l u e s ( ) ) e . n a m e . s t a r t s W i t h ( t + " : " ) & & ( y i e l d e ) } _ d e s t r o y M a r k e r ( t ) { t . s t o p L i s t e n i n g ( ) , t . _ d e t a c h L i v e R a n g e ( ) } } d i ( L c , i i ) ; c l a s s z c { c o n s t r u c t o r ( t , e , n , i ) { t h i s . n a m e = t , t h i s . _ l i v e R a n g e = t h i s . _ a t t a c h L i v e R a n g e ( e ) , t h i s . _ m a n a g e d U s i n g O p e r a t i o n s = n , t h i s . _ a f f e c t s D a t a = i } g e t m a n a g e d U s i n g O p e r a t i o n s ( ) { i f ( ! t h i s . _ l i v e R a n g e ) t h r o w n e w Z n . b ( " m a r k e r - d e s t r o y e d : C a n n o t u s e a d e s t r o y e d m a r k e r i n s t a n c e . " , t h i s ) ; r e t u r n t h i s . _ m a n a g e d U s i n g O p e r a t i o n s } g e t a f f e c t s D a t a ( ) { i f ( ! t h i s . _ l i v e R a n g e ) t h r o w n e w Z n . b ( " m a r k e r - d e s t r o y e d : C a n n o t u s e a d e s t r o y e d m a r k e r i n s t a n c e . " , t h i s ) ; r e t u r n t h i s . _ a f f e c t s D a t a } g e t S t a r t ( ) { i f ( ! t h i s . _ l i v e R a n g e ) t h r o w n e w Z n . b ( " m a r k e r - d e s t r o y e d : C a n n o t u s e a d e s t r o y e d m a r k e r i n s t a n c e . " , t h i s ) ; r e t u r n t h i s . _ l i v e R a n g e . s t a r t . c l o n e ( ) } g e t E n d ( ) { i f ( ! t h i s . _ l i v e R a n g e ) t h r o w n e w Z n . b ( " m a r k e r - d e s t r o y e d : C a n n o t u s e a d e s t r o y e d m a r k e r i n s t a n c e . " , t h i s ) ; r e t u r n t h i s . _ l i v e R a n g e . e n d . c l o n e ( ) } g e t R a n g e ( ) { i f ( ! t h i s . _ l i v e R a n g e ) t h r o w n e w Z n . b ( " m a r k e r - d e s t r o y e d : C a n n o t u s e a d e s t r o y e d m a r k e r i n s t a n c e . " , t h i s ) ; r e t u r n t h i s . _ l i v e R a n g e . t o R a n g e ( ) } i s ( t ) { r e t u r n " m a r k e r " = = t | | " m o d e l : m a r k e r " = = t } _ a t t a c h L i v e R a n g e ( t ) { r e t u r n t h i s . _ l i v e R a n g e & & t h i s . _ d e t a c h L i v e R a n g e ( ) , t . d e l e g a t e ( " c h a n g e : r a n g e " ) . t o ( t h i s ) , t . d e l e g a t e ( " c h a n g e : c o n t e n t " ) . t o ( t h i s ) , t h i s . _ l i v e R a n g e = t , t } _ d e t a c h L i v e R a n g e ( ) { t h i s . _ l i v e R a n g e . s t o p D e l e g a t i n g ( " c h a n g e : r a n g e " , t h i s ) , t h i s . _ l i v e R a n g e . s t o p D e l e g a t i n g ( " c h a n g e : c o n t e n t " , t h i s ) , t h i s . _ l i v e R a n g e . d e t a c h ( ) , t h i s . _ l i v e R a n g e = n u l l } } d i ( z c , i i ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class qc extends Js { constructor ( t , e , n = "toNone" ) { if ( super ( t , e , n ) , ! this . root . is ( "rootElement" ) ) throw new Zn . b ( "model-liveposition-root-not-rootelement: LivePosition's root has to be an instance of RootElement." , t ) ; jc . call ( this ) } detach ( ) { this . stopListening ( ) } is ( t ) { return "livePosition" == t || "model:livePosition" == t || super . is ( t ) } toPosition ( ) { return new Js ( this . root , this . path . slice ( ) , this . stickiness ) } static fromPosition ( t , e ) { return new this ( t . root , t . path . slice ( ) , e || t . stickiness ) } } function jc ( ) { this . listenTo ( this . root . document . model , "applyOperation" , ( t , e ) => { const n = e [ 0 ] ; n . isDocumentOperation && Hc . call ( this , n ) } , { priority : "low" } ) } function Hc ( t ) { const e = this . getTransformedByOperation ( t ) ; if ( ! this . isEqual ( e ) ) { const t = this . toPosition ( ) ; this . path = e . path , this . root = e . root , this . fire ( "change" , t ) } } di ( qc , ii ) ; class Uc { constructor ( t , e , n ) { this . model = t , this . writer = e , this . position = n , this . canMergeWith = new Set ( [ this . position . parent ] ) , this . schema = t . schema , this . _filterAttributesOf = [ ] , this . _affectedStart = null , this . _affectedEnd = null } handleNodes ( t , e ) { t = Array . from ( t ) ; for ( let n = 0 ; n < t . length ; n ++ ) { const i = t [ n ] ; this . _handleNode ( i , { isFirst : 0 === n && e . isFirst , isLast : n === t . length - 1 && e . isLast } ) } this . schema . removeDisallowedAttributes ( this . _filterAttributesOf , this . writer ) , this . _filterAttributesOf = [ ] } getSelectionRange ( ) { return this . nodeToSelect ? Zs . _createOn ( this . nodeToSelect ) : this . model . schema . getNearestSelectionRange ( this . position ) } getAffectedRange ( ) { return this . _affectedStart ? new Zs ( this . _affectedStart , this . _affectedEnd ) : null } destroy ( ) { this . _affectedStart && this . _affectedStart . detach ( ) , this . _affectedEnd && this . _affectedEnd . detach ( ) } _handleNode ( t , e ) { if ( this . schema . isObject ( t ) ) return void this . _handleObject ( t , e ) ; this . _checkAndSplitToAllowedPosition ( t , e ) ? ( this . _insert ( t ) , this . _mergeSiblingsOf ( t , e ) ) : this . _handleDisallowedNode ( t , e ) } _handleObject ( t , e ) { this . _checkAndSplitToAllowedPosition ( t ) ? this . _insert ( t ) : this . _tryAutoparagraphing ( t , e ) } _handleDisallowedNode ( t , e ) { t . is ( "element" ) ? this . handleNodes ( t . getChildren ( ) , e ) : this . _tryAutoparagraphing ( t , e ) } _insert ( t ) { if ( ! this . schema . checkChild ( this . position , t ) ) throw new Zn . b ( "insertcontent-wrong-position: Given node cannot be inserted on the given position." , this , { node : t , position : this . position } ) ; const e = qc . fromPosition ( this . position , "toNext" ) ; this . _setAffectedBoundaries ( this . position ) , this . writer . insert ( t , this . position ) , this . position = e . toPosition ( ) , e . detach ( ) , this . schema . isObject ( t ) && ! this . schema . checkChild ( this . position , "$text" ) ? this . nodeToSelect = t : this . nodeToSelect = null , this . _filterAttributesOf . push ( t ) } _setAffectedBoundaries ( t ) { this . _affectedStart || ( this . _affectedStart = qc . fromPosition ( t , "toPrevious" ) ) , this . _affectedEnd && ! this . _affectedEnd . isBefore ( t ) || ( this . _affectedEnd && this . _affectedEnd . detach ( ) , this . _affectedEnd = qc . fromPosition ( t , "toNext" ) ) } _mergeSiblingsOf ( t , e ) { if ( ! ( t instanceof $s ) ) return ; const n = this . _canMergeLeft ( t , e ) , i = this . _canMergeRight ( t , e ) , o = qc . _createBefore ( t ) ; o . stickiness = "toNext" ; const r = qc . _createAfter ( t ) ; if ( r . stickiness = "toNext" , n ) { const t = qc . fromPosition ( this . position ) ; t . stickiness = "toNext" , this . _affectedStart . isEqual ( o ) && ( this . _affectedStart . detach ( ) , this . _affectedStart = qc . _createAt ( o . nodeBefore , "end" , "toPrevious" ) ) , this . writer . merge ( o ) , o . isEqual ( this . _affectedEnd ) && e . isLast && ( this . _affectedEnd . detach ( ) , this . _affectedEnd = qc . _createAt ( o . nodeBefore , "end" , "toNext" ) ) , this . position = t . toPosition ( ) , t . detach ( ) } if ( i ) { if ( ! this . position . isEqual ( r ) ) throw new Zn . b ( "insertcontent-invalid-insertion-position" , this ) ; this . position = Js . _createAt ( r . nodeBefore , "end" ) ; const t = qc . fromPosition ( this . position , "toPrevious" ) ; this . _affectedEnd . isEqual ( r ) && ( this . _affectedEnd . detach ( ) , this . _affectedEnd = qc . _createAt ( r . nodeBefore , "end" , "toNext" ) ) , this . writer . merge ( r ) , r . getShiftedBy ( - 1 ) . isEqual ( this . _affectedStart ) && e . isFirst && ( this . _affectedStart . detach ( ) , this . _affectedStart = qc . _createAt ( r . nodeBefore , 0 , "toPrevious" ) ) , this . position = t . toPosition ( ) , t . detach ( ) } ( n || i ) && this . _filterAttributesOf . push ( this . position . parent ) , o . detach ( ) , r . detach ( ) } _canMergeLeft ( t , e ) { const n = t . previousSibling ; return e . isFirst && n instanceof $s && this . canMergeWith . has ( n ) && this . mo
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n $ c ( t , e , n = { } ) { i f ( e . i s C o l l a p s e d ) r e t u r n ; c o n s t i = e . g e t F i r s t R a n g e ( ) ; i f ( " $ g r a v e y a r d " = = i . r o o t . r o o t N a m e ) r e t u r n ; c o n s t o = t . s c h e m a ; t . c h a n g e ( t = > { i f ( ! n . d o N o t R e s e t E n t i r e C o n t e n t & & f u n c t i o n ( t , e ) { c o n s t n = t . g e t L i m i t E l e m e n t ( e ) ; i f ( ! e . c o n t a i n s E n t i r e C o n t e n t ( n ) ) r e t u r n ! 1 ; c o n s t i = e . g e t F i r s t R a n g e ( ) ; i f ( i . s t a r t . p a r e n t = = i . e n d . p a r e n t ) r e t u r n ! 1 ; r e t u r n t . c h e c k C h i l d ( n , " p a r a g r a p h " ) } ( o , e ) ) r e t u r n v o i d f u n c t i o n ( t , e ) { c o n s t n = t . m o d e l . s c h e m a . g e t L i m i t E l e m e n t ( e ) ; t . r e m o v e ( t . c r e a t e R a n g e I n ( n ) ) , W c ( t , t . c r e a t e P o s i t i o n A t ( n , 0 ) , e ) } ( t , e ) ; c o n s t r = i . s t a r t , s = q c . f r o m P o s i t i o n ( i . e n d , " t o N e x t " ) ; i f ( i . s t a r t . i s T o u c h i n g ( i . e n d ) | | t . r e m o v e ( i ) , n . l e a v e U n m e r g e d | | ( ! f u n c t i o n t ( e , n , i ) { c o n s t o = n . p a r e n t ; c o n s t r = i . p a r e n t ; i f ( o = = r ) r e t u r n ; i f ( e . m o d e l . s c h e m a . i s L i m i t ( o ) | | e . m o d e l . s c h e m a . i s L i m i t ( r ) ) r e t u r n ; i f ( ! f u n c t i o n ( t , e , n ) { c o n s t i = n e w Z s ( t , e ) ; f o r ( c o n s t t o f i . g e t W a l k e r ( ) ) i f ( n . i s L i m i t ( t . i t e m ) ) r e t u r n ! 1 ; r e t u r n ! 0 } ( n , i , e . m o d e l . s c h e m a ) ) r e t u r n ; n = e . c r e a t e P o s i t i o n A f t e r ( o ) ; i = e . c r e a t e P o s i t i o n B e f o r e ( r ) ; i . i s E q u a l ( n ) | | e . i n s e r t ( r , n ) ; e . m e r g e ( n ) ; f o r ( ; i . p a r e n t . i s E m p t y ; ) { c o n s t t = i . p a r e n t ; i = e . c r e a t e P o s i t i o n B e f o r e ( t ) , e . r e m o v e ( t ) } t ( e , n , i ) } ( t , r , s ) , o . r e m o v e D i s a l l o w e d A t t r i b u t e s ( r . p a r e n t . g e t C h i l d r e n ( ) , t ) ) , G c ( t , e , r ) , f u n c t i o n ( t , e ) { c o n s t n = t . c h e c k C h i l d ( e , " $ t e x t " ) , i = t . c h e c k C h i l d ( e , " p a r a g r a p h " ) ; r e t u r n ! n & & i } ( o , r ) ) { c o n s t i = o . g e t N e a r e s t S e l e c t i o n R a n g e ( r ) ; n . d o N o t A u t o p a r a g r a p h & & i ? G c ( t , e , i ) : W c ( t , r , e ) } s . d e t a c h ( ) } ) } f u n c t i o n W c ( t , e , n ) { c o n s t i = t . c r e a t e E l e m e n t ( " p a r a g r a p h " ) ; t . i n s e r t ( i , e ) , G c ( t , n , t . c r e a t e P o s i t i o n A t ( i , 0 ) ) } f u n c t i o n G c ( t , e , n ) { e i n s t a n c e o f u a ? t . s e t S e l e c t i o n ( n ) : e . s e t T o ( n ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t K c = ' , . ? ! : ; " - ( ) ' ; f u n c t i o n J c ( t , e ) { i f ( " t e x t " = = e . t y p e ) r e t u r n " w o r d " = = = t . u n i t ? f u n c t i o n ( t , e ) { l e t n = t . p o s i t i o n . t e x t N o d e ; i f ( n ) { l e t i = t . p o s i t i o n . o f f s e t - n . s t a r t O f f s e t ; f o r ( ; ! Q c ( n . d a t a , i , e ) & & ! Y c ( n , i , e ) ; ) { t . n e x t ( ) ; c o n s t o = e ? t . p o s i t i o n . n o d e A f t e r : t . p o s i t i o n . n o d e B e f o r e ; i f ( o & & o . i s ( " t e x t " ) ) { c o n s t i = o . d a t a . c h a r A t ( e ? 0 : o . d a t a . l e n g t h - 1 ) ; K c . i n c l u d e s ( i ) | | ( t . n e x t ( ) , n = t . p o s i t i o n . t e x t N o d e ) } i = t . p o s i t i o n . o f f s e t - n . s t a r t O f f s e t } } r e t u r n t . p o s i t i o n } ( t . w a l k e r , t . i s F o r w a r d ) : f u n c t i o n ( t , e ) { c o n s t n = t . p o s i t i o n . t e x t N o d e ; i f ( n ) { c o n s t i = n . d a t a ; l e t o = t . p o s i t i o n . o f f s e t - n . s t a r t O f f s e t ; f o r ( ; M c ( i , o ) | | " c h a r a c t e r " = = e & & N c ( i , o ) ; ) t . n e x t ( ) , o = t . p o s i t i o n . o f f s e t - n . s t a r t O f f s e t } r e t u r n t . p o s i t i o n } ( t . w a l k e r , t . u n i t , t . i s F o r w a r d ) ; i f ( e . t y p e = = ( t . i s F o r w a r d ? " e l e m e n t S t a r t " : " e l e m e n t E n d " ) ) { i f ( t . s c h e m a . i s O b j e c t ( e . i t e m ) ) r e t u r n J s . _ c r e a t e A t ( e . i t e m , t . i s F o r w a r d ? " a f t e r " : " b e f o r e " ) ; i f ( t . s c h e m a . c h e c k C h i l d ( e . n e x t P o s i t i o n , " $ t e x t " ) ) r e t u r n e . n e x t P o s i t i o n } e l s e { i f ( t . s c h e m a . i s L i m i t ( e . i t e m ) ) r e t u r n v o i d t . w a l k e r . s k i p ( ( ) = > ! 0 ) ; i f ( t . s c h e m a . c h e c k C h i l d ( e . n e x t P o s i t i o n , " $ t e x t " ) ) r e t u r n e . n e x t P o s i t i o n } } f u n c t i o n Z c ( t , e ) { c o n s t n = t . r o o t , i = J s . _ c r e a t e A t ( n , e ? " e n d " : 0 ) ; r e t u r n e ? n e w Z s ( t , i ) : n e w Z s ( i , t ) } f u n c t i o n Q c ( t , e , n ) { c o n s t i = e + ( n ? 0 : - 1 ) ; r e t u r n K c . i n c l u d e s ( t . c h a r A t ( i ) ) } f u n c t i o n Y c ( t , e , n ) { r e t u r n e = = = ( n ? t . e n d O f f s e t : 0 ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n X c ( t , e ) { c o n s t n = [ ] ; A r r a y . f r o m ( t . g e t I t e m s ( { d i r e c t i o n : " b a c k w a r d " } ) ) . m a p ( t = > e . c r e a t e R a n g e O n ( t ) ) . f i l t e r ( e = > { r e t u r n ( e . s t a r t . i s A f t e r ( t . s t a r t ) | | e . s t a r t . i s E q u a l ( t . s t a r t ) ) & & ( e . e n d . i s B e f o r e ( t . e n d ) | | e . e n d . i s E q u a l ( t . e n d ) ) } ) . f o r E a c h ( t = > { n . p u s h ( t . s t a r t . p a r e n t ) , e . r e m o v e ( t ) } ) , n . f o r E a c h ( t = > { l e t n = t ; f o r ( ; n . p a r e n t & & n . i s E m p t y ; ) { c o n s t t = e . c r e a t e R a n g e O n ( n ) ; n = n . p a r e n t , e . r e m o v e ( t ) } } ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n t l ( t ) { t . d o c u m e n t . r e g i s t e r P o s t F i x e r ( e = > ( f u n c t i o n ( t , e ) { c o n s t n = e . d o c u m e n t . s e l e c t i o n , i = e . s c h e m a , o = [ ] ; l e t r = ! 1 ; f o r ( c o n s t t o f n . g e t R a n g e s ( ) ) { c o n s t e = e l ( t , i ) ; e ? ( o . p u s h ( e ) , r = ! 0 ) : o . p u s h ( t ) } i f ( r ) { l e t e = o ; i f ( o . l e n g t h > 1 ) { c o n s t t = o [ 0 ] . s t a r t , n = o [ o . l e n g t h - 1 ] . e n d ; e = [ n e w Z s ( t , n ) ] } t . s e t S e l e c t i o n ( e , { b a c k w a r d : n . i s B a c k w a r d } ) } } ) ( e , t ) ) } f u n c t i o n e l ( t , e ) { r e t u r n t . i s C o l l a p s e d ? f u n c t i o n ( t , e ) { c o n s t n = t . s t a r t , i = e . g e t N e a r e s t S e l e c t i o n R a n g e ( n ) ; i f ( ! i ) r e t u r n n u l l ; c o n s t o = i . s t a r t ; i f ( n . i s E q u a l ( o ) ) r e t u r n n u l l ; i f ( o . n o d e A f t e r & & e . i s L i m i t ( o . n o d e A f t e r ) ) r e t u r n n e w Z s ( o , J s . _ c r e a t e A f t e r ( o . n o d e A f t e r ) ) ; r e t u r n n e w Z s ( o ) } ( t , e ) : f u n c t i o n ( t , e ) { c o n s t n = t . s t a r t , i = t . e n d , o = e . c h e c k C h i l d ( n , " $ t e x t " ) , r = e . c h e c k C h i l d ( i , " $ t e x t " ) , s = e . g e t L i m i t E l e m e n t ( n ) , a = e . g e t L i m i t E l e m e n t ( i ) ; i f ( s = = = a ) { i f ( o & & r ) r e t u r n n u l l ; i f ( f u n c t i o n ( t , e , n ) { c o n s t i = t . n o d e A f t e r & & ! n . i s L i m i t ( t . n o d e A f t e r ) | | n . c h e c k C h i l d ( t , " $ t e x t " ) , o = e . n o d e B e f o r e & & ! n . i s L i m i t ( e . n o d e B e f o r e ) | | n . c h e c k C h i l d ( e , " $ t e x t " ) ; r e t u r n i | | o } ( n , i , e ) ) { c o n s t t = n . n o d e A f t e r & & e . i s O b j e c t ( n . n o d e A f t e r ) ? n u l l : e . g e t N e a r e s t S e l e c t i o n R a n g e ( n , " f o r w a r d " ) , o = i . n o d e B e f o r e & & e . i s O b j e c t ( i . n o d e B e f o r e ) ? n u l l : e . g e t N e a r e s t S e l e c t i o n R a n g e ( i , " b a c k w a r d " ) , r = t ? t . s t a r t : n , s = o ? o . s t a r t : i ; r e t u r n n e w Z s ( r , s ) } } c o n s t c = s & & ! s . i s ( " r o o t E l e m e n t " ) , l = a & & ! a . i s ( " r o o t E l e m e n t " ) ; i f ( c | | l ) { c o n s t t = n . n o d e A f t e r & & i . n o d e B e f o r e & & n . n o d e A f t e r . p a r e n t = = = i . n o d e B e f o r e . p a r e n t , o = c & & ( ! t | | ! i l ( n . n o d e A f t e r , e ) ) , r = l & & ( ! t | | ! i l ( i . n o d e B e f o r e , e ) ) ; l e t d = n , u = i ; r e t u r n o & & ( d = J s . _ c r e a t e B e f o r e ( n l ( s , e ) ) ) , r & & ( u = J s . _ c r e a t e A f t e r ( n l ( a , e ) ) ) , n e w Z s ( d , u ) } r e t u r n n u l l } ( t , e ) } f u n c t i o n n l ( t , e ) { l e t n = t , i = n ; f o r ( ; e . i s L i m i t ( i ) & & i . p a r e n t ; ) n = i , i = i . p a r e n t ; r e t u r n n } f u n c t i o n i l ( t , e ) { r e t u r n t & & e . i s O b j e c t ( t ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s o l { c o n s t r u c t o r ( ) { t h i s . m a r k e r s = n e w L c , t h i s . d o c u m e n t = n e w F c ( t h i s ) , t h i s . s c h e m a = n e w B a , t h i s . _ p e n d i n g C h a n g e s = [ ] , t h i s . _ c u r r e n t W r i t e r = n u l l , [ " i n s e r t C o n t e n t " , " d e l e t e C o n t e n t " , " m o d i f y S e l e c t i o n " , " g e t S e l e c t e d C o n t e n t " , " a p p l y O p e r a t i o n " ] . f o r E a c h ( t = > t h i s . d e c o r a t e ( t ) ) , t h i s . o n ( " a p p l y O p e r a t i o n " , ( t , e ) = > { e [ 0 ] . _ v a l i d a t e ( ) } , { p r i o r i t y : " h i g h e s t " } ) , t h i s . s c h e m a . r e g i s t e r ( " $ r o o t " , { i s L i m i t : ! 0 } ) , t h i s . s c h e m a . r e g i s t e r ( " $ b l o c k " , { a l l o w I n : " $ r o o t " , i s B l o c k : ! 0 } ) , t h i s . s c h e m a . r e g i s t e r ( " $ t e x t " , { a l l o w I n : " $ b l o c k " , i s I n l i n e : ! 0 } ) , t h i s . s c h e m a . r e g i s t e r ( " $ c l i p b o a r d H o l d e r " , { a l l o w C o n t e n t O f : " $ r o o t " , i s L i m i t : ! 0 } ) , t h i s . s c h e m a . e x t e n d ( " $ t e x t " , { a l l o w I n : " $ c l i p b o a r d H o l d e r " } ) , t h i s . s c h e m a . r e g i s t e r ( " $ m a r k e r " ) , t h i s . s c h e m a . a d d C h i l d C h e c k ( ( t , e ) = > { i f ( " $ m a r k e r " = = = e . n a m e ) r e t u r n ! 0 } ) , t l ( t h i s ) } c h a n g e ( t ) { t r y { r e t u r n 0 = = = t h i s . _ p e n d i n g C h a n g e s . l e n g t h ? ( t h i s . _ p e n d i n g C h a n g e s . p u s h ( { b a t c h : n e w n c , c a l l b a c k : t } ) , t h i s . _ r u n P e n d i n g C h a n g e s ( ) [ 0 ] ) : t ( t h i s . _ c u r r e n t W r i t e r ) } c a t c h ( t ) { Z n . b . r e t h r o w U n e x p e c t e d E r r o r ( t , t h i s ) } } e n q u e u e C h a n g e ( t , e ) { t r y { " s t r i n g " = = t y p e o f t ? t = n e w n c ( t ) : " f u n c t i o n " = = t y p e o f t & & ( e = t , t = n e w n c ) , t h i s . _ p e n d i n g C h a n g e s . p u s h ( { b a t c h : t , c a l l b a c k : e } ) , 1 = = t h i s . _ p e n d i n g C h a n g e s . l e n g t h & & t h i s . _ r u n P e n d i n g C h a n g e s ( ) } c a t c h ( t ) { Z n . b . r e t h r o w U n e x p e c t e d E r r o r ( t , t h i s ) } } a p p l y O p e r a t i o n ( t ) { t . _ e x e c u t e ( ) } i n s e r t C o n t e n t ( t , e , n ) {
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
return function ( t , e , n , i ) { return t . change ( o => { let r ; const s = ( r = n ? n instanceof na || n instanceof ua ? n : o . createSelection ( n , i ) : t . document . selection ) . getFirstPosition ( ) ; r . isCollapsed || t . deleteContent ( r , { doNotAutoparagraph : ! 0 } ) ; const a = new Uc ( t , o , s ) ; let c ; c = e . is ( "documentFragment" ) ? e . getChildren ( ) : [ e ] , a . handleNodes ( c , { isFirst : ! 0 , isLast : ! 0 } ) ; const l = a . getSelectionRange ( ) ; l && ( r instanceof ua ? o . setSelection ( l ) : r . setTo ( l ) ) ; const d = a . getAffectedRange ( ) || t . createRange ( s ) ; return a . destroy ( ) , d } ) } ( this , t , e , n ) } deleteContent ( t , e ) { $c ( this , t , e ) } modifySelection ( t , e ) { ! function ( t , e , n = { } ) { const i = t . schema , o = "backward" != n . direction , r = n . unit ? n . unit : "character" , s = e . focus , a = new Ws ( { boundaries : Zc ( s , o ) , singleCharacters : ! 0 , direction : o ? "forward" : "backward" } ) , c = { walker : a , schema : i , isForward : o , unit : r } ; let l ; for ( ; l = a . next ( ) ; ) { if ( l . done ) return ; const n = Jc ( c , l . value ) ; if ( n ) return void ( e instanceof ua ? t . change ( t => { t . setSelectionFocus ( n ) } ) : e . setFocus ( n ) ) } } ( this , t , e ) } getSelectedContent ( t ) { return function ( t , e ) { return t . change ( t => { const n = t . createDocumentFragment ( ) , i = e . getFirstRange ( ) ; if ( ! i || i . isCollapsed ) return n ; const o = i . start . root , r = i . start . getCommonPath ( i . end ) , s = o . getNodeByPath ( r ) ; let a ; const c = ( a = i . start . parent == i . end . parent ? i : t . createRange ( t . createPositionAt ( s , i . start . path [ r . length ] ) , t . createPositionAt ( s , i . end . path [ r . length ] + 1 ) ) ) . end . offset - a . start . offset ; for ( const e of a . getItems ( { shallow : ! 0 } ) ) e . is ( "textProxy" ) ? t . appendText ( e . data , e . getAttributes ( ) , n ) : t . append ( e . _clone ( ! 0 ) , n ) ; if ( a != i ) { const e = i . _getTransformedByMove ( a . start , t . createPositionAt ( n , 0 ) , c ) [ 0 ] , o = t . createRange ( t . createPositionAt ( n , 0 ) , e . start ) ; Xc ( t . createRange ( e . end , t . createPositionAt ( n , "end" ) ) , t ) , Xc ( o , t ) } return n } ) } ( this , t ) } hasContent ( t , e ) { const n = t instanceof $s ? Zs . _createIn ( t ) : t ; if ( n . isCollapsed ) return ! 1 ; for ( const t of this . markers . getMarkersIntersectingRange ( n ) ) if ( t . affectsData ) return ! 0 ; const { ignoreWhitespaces : i = ! 1 } = e || { } ; for ( const t of n . getItems ( ) ) if ( t . is ( "textProxy" ) ) { if ( ! i ) return ! 0 ; if ( - 1 !== t . data . search ( /\S/ ) ) return ! 0 } else if ( this . schema . isObject ( t ) ) return ! 0 ; return ! 1 } createPositionFromPath ( t , e , n ) { return new Js ( t , e , n ) } createPositionAt ( t , e ) { return Js . _createAt ( t , e ) } createPositionAfter ( t ) { return Js . _createAfter ( t ) } createPositionBefore ( t ) { return Js . _createBefore ( t ) } createRange ( t , e ) { return new Zs ( t , e ) } createRangeIn ( t ) { return Zs . _createIn ( t ) } createRangeOn ( t ) { return Zs . _createOn ( t ) } createSelection ( t , e , n ) { return new na ( t , e , n ) } createBatch ( t ) { return new nc ( t ) } destroy ( ) { this . document . destroy ( ) , this . stopListening ( ) } _runPendingChanges ( ) { const t = [ ] ; for ( this . fire ( "_beforeChanges" ) ; this . _pendingChanges . length ; ) { const e = this . _pendingChanges [ 0 ] . batch ; this . _currentWriter = new xc ( this , e ) ; const n = this . _pendingChanges [ 0 ] . callback ( this . _currentWriter ) ; t . push ( n ) , this . document . _handleChangeBlock ( this . _currentWriter ) , this . _pendingChanges . shift ( ) , this . _currentWriter = null } return this . fire ( "_afterChanges" ) , t } } di ( ol , Hi ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class rl { constructor ( ) { this . _listener = Object . create ( ur ) } listenTo ( t ) { this . _listener . listenTo ( t , "keydown" , ( t , e ) => { this . _listener . fire ( "_keydown:" + _o ( e ) , e ) } ) } set ( t , e , n = { } ) { const i = vo ( t ) , o = n . priority ; this . _listener . listenTo ( this . _listener , "_keydown:" + i , ( t , n ) => { e ( n , ( ) => { n . preventDefault ( ) , n . stopPropagation ( ) , t . stop ( ) } ) , t . return = ! 0 } , { priority : o } ) } press ( t ) { return ! ! this . _listener . fire ( "_keydown:" + _o ( t ) , t ) } destroy ( ) { this . _listener . stopListening ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s s l e x t e n d s r l { c o n s t r u c t o r ( t ) { s u p e r ( ) , t h i s . e d i t o r = t } s e t ( t , e , n = { } ) { i f ( " s t r i n g " = = t y p e o f e ) { c o n s t t = e ; e = ( e , n ) = > { t h i s . e d i t o r . e x e c u t e ( t ) , n ( ) } } s u p e r . s e t ( t , e , n ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s a l { c o n s t r u c t o r ( t ) { c o n s t e = t h i s . c o n s t r u c t o r . b u i l t i n P l u g i n s ; t h i s . c o n f i g = n e w K n ( t , t h i s . c o n s t r u c t o r . d e f a u l t C o n f i g ) , t h i s . c o n f i g . d e f i n e ( " p l u g i n s " , e ) , t h i s . p l u g i n s = n e w R a ( t h i s , e ) , t h i s . c o m m a n d s = n e w I a ; c o n s t n = t h i s . c o n f i g . g e t ( " l a n g u a g e " ) | | { } ; t h i s . l o c a l e = n e w M a ( { u i L a n g u a g e : " s t r i n g " = = t y p e o f n ? n : n . u i , c o n t e n t L a n g u a g e : t h i s . c o n f i g . g e t ( " l a n g u a g e . c o n t e n t " ) } ) , t h i s . t = t h i s . l o c a l e . t , t h i s . s e t ( " s t a t e " , " i n i t i a l i z i n g " ) , t h i s . o n c e ( " r e a d y " , ( ) = > t h i s . s t a t e = " r e a d y " , { p r i o r i t y : " h i g h " } ) , t h i s . o n c e ( " d e s t r o y " , ( ) = > t h i s . s t a t e = " d e s t r o y e d " , { p r i o r i t y : " h i g h " } ) , t h i s . s e t ( " i s R e a d O n l y " , ! 1 ) , t h i s . m o d e l = n e w o l , t h i s . d a t a = n e w Y a ( t h i s . m o d e l ) , t h i s . e d i t i n g = n e w S a ( t h i s . m o d e l ) , t h i s . e d i t i n g . v i e w . d o c u m e n t . b i n d ( " i s R e a d O n l y " ) . t o ( t h i s ) , t h i s . c o n v e r s i o n = n e w X a ( [ t h i s . e d i t i n g . d o w n c a s t D i s p a t c h e r , t h i s . d a t a . d o w n c a s t D i s p a t c h e r ] , t h i s . d a t a . u p c a s t D i s p a t c h e r ) , t h i s . c o n v e r s i o n . a d d A l i a s ( " d a t a D o w n c a s t " , t h i s . d a t a . d o w n c a s t D i s p a t c h e r ) , t h i s . c o n v e r s i o n . a d d A l i a s ( " e d i t i n g D o w n c a s t " , t h i s . e d i t i n g . d o w n c a s t D i s p a t c h e r ) , t h i s . k e y s t r o k e s = n e w s l ( t h i s ) , t h i s . k e y s t r o k e s . l i s t e n T o ( t h i s . e d i t i n g . v i e w . d o c u m e n t ) } i n i t P l u g i n s ( ) { c o n s t t = t h i s . c o n f i g , e = t . g e t ( " p l u g i n s " ) | | [ ] , n = t . g e t ( " r e m o v e P l u g i n s " ) | | [ ] , i = t . g e t ( " e x t r a P l u g i n s " ) | | [ ] ; r e t u r n t h i s . p l u g i n s . i n i t ( e . c o n c a t ( i ) , n ) } d e s t r o y ( ) { l e t t = P r o m i s e . r e s o l v e ( ) ; r e t u r n " i n i t i a l i z i n g " = = t h i s . s t a t e & & ( t = n e w P r o m i s e ( t = > t h i s . o n c e ( " r e a d y " , t ) ) ) , t . t h e n ( ( ) = > { t h i s . f i r e ( " d e s t r o y " ) , t h i s . s t o p L i s t e n i n g ( ) , t h i s . c o m m a n d s . d e s t r o y ( ) } ) . t h e n ( ( ) = > t h i s . p l u g i n s . d e s t r o y ( ) ) . t h e n ( ( ) = > { t h i s . m o d e l . d e s t r o y ( ) , t h i s . d a t a . d e s t r o y ( ) , t h i s . e d i t i n g . d e s t r o y ( ) , t h i s . k e y s t r o k e s . d e s t r o y ( ) } ) } e x e c u t e ( . . . t ) { t r y { t h i s . c o m m a n d s . e x e c u t e ( . . . t ) } c a t c h ( t ) { Z n . b . r e t h r o w U n e x p e c t e d E r r o r ( t , t h i s ) } } } d i ( a l , H i ) ; v a r c l = { s e t D a t a ( t ) { t h i s . d a t a . s e t ( t ) } , g e t D a t a ( t ) { r e t u r n t h i s . d a t a . g e t ( t ) } } ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s l l { g e t H t m l ( t ) { c o n s t e = d o c u m e n t . i m p l e m e n t a t i o n . c r e a t e H T M L D o c u m e n t ( " " ) . c r e a t e E l e m e n t ( " d i v " ) ; r e t u r n e . a p p e n d C h i l d ( t ) , e . i n n e r H T M L } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s d l { c o n s t r u c t o r ( ) { t h i s . _ d o m P a r s e r = n e w D O M P a r s e r , t h i s . _ d o m C o n v e r t e r = n e w a r ( { b l o c k F i l l e r M o d e : " n b s p " } ) , t h i s . _ h t m l W r i t e r = n e w l l } t o D a t a ( t ) { c o n s t e = t h i s . _ d o m C o n v e r t e r . v i e w T o D o m ( t , d o c u m e n t ) ; r e t u r n t h i s . _ h t m l W r i t e r . g e t H t m l ( e ) } t o V i e w ( t ) { c o n s t e = t h i s . _ t o D o m ( t ) ; r e t u r n t h i s . _ d o m C o n v e r t e r . d o m T o V i e w ( e ) } _ t o D o m ( t ) { c o n s t e = t h i s . _ d o m P a r s e r . p a r s e F r o m S t r i n g ( t , " t e x t / h t m l " ) , n = e . c r e a t e D o c u m e n t F r a g m e n t ( ) , i = e . b o d y . c h i l d N o d e s ; f o r ( ; i . l e n g t h > 0 ; ) n . a p p e n d C h i l d ( i [ 0 ] ) ; r e t u r n n } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s u l { c o n s t r u c t o r ( t ) { t h i s . e d i t o r = t , t h i s . _ c o m p o n e n t s = n e w M a p } * n a m e s ( ) { f o r ( c o n s t t o f t h i s . _ c o m p o n e n t s . v a l u e s ( ) ) y i e l d t . o r i g i n a l N a m e } a d d ( t , e ) { i f ( t h i s . h a s ( t ) ) t h r o w n e w Z n . b ( " c o m p o n e n t f a c t o r y - i t e m - e x i s t s : T h e i t e m a l r e a d y e x i s t s i n t h e c o m p o n e n t f a c t o r y . " , t h i s , { n a m e : t } ) ; t h i s . _ c o m p o n e n t s . s e t ( h l ( t ) , { c a l l b a c k : e , o r i g i n a l N a m e : t } ) } c r e a t e ( t ) { i f ( ! t h i s . h a s ( t ) ) t h r o w n e w Z n . b ( " c o m p o n e n t f a c t o r y - i t e m - m i s s i n g : T h e r e q u i r e d c o m p o n e n t i s n o t r e g i s t e r e d i n t h e f a c t o r y . " , t h i s , { n a m e : t } ) ; r e t u r n t h i s . _ c o m p o n e n t s . g e t ( h l ( t ) ) . c a l l b a c k ( t h i s . e d i t o r . l o c a l e ) } h a s ( t ) { r e t u r n t h i s . _ c o m p o n e n t s . h a s ( h l ( t ) ) } } f u n c t i o n h l ( t ) { r e t u r n S t r i n g ( t ) . t o L o w e r C a s e ( ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s f l { c o n s t r u c t o r ( ) { t h i s . s e t ( " i s F o c u s e d " , ! 1 ) , t h i s . s e t ( " f o c u s e d E l e m e n t " , n u l l ) , t h i s . _ e l e m e n t s = n e w S e t , t h i s . _ n e x t E v e n t L o o p T i m e o u t = n u l l } a d d ( t ) { i f ( t h i s . _ e l e m e n t s . h a s ( t ) ) t h r o w n e w Z n . b ( " f o c u s T r a c k e r - a d d - e l e m e n t - a l r e a d y - e x i s t " , t h i s ) ; t h i s . l i s t e n T o ( t , " f o c u s " , ( ) = > t h i s . _ f o c u s ( t ) , { u s e C a p t u r e : ! 0 } ) , t h i s . l i s t e n T o ( t , " b l u r " , ( ) = > t h i s . _ b l u r ( ) , { u s e C a p t u r e : ! 0 } ) , t h i s . _ e l e m e n t s . a d d ( t ) } r e m o v e ( t ) { t = = = t h i s . f o c u s e d E l e m e n t & & t h i s . _ b l u r ( t ) , t h i s . _ e l e m e n t s . h a s ( t ) & & ( t h i s . s t o p L i s t e n i n g ( t ) , t h i s . _ e l e m e n t s . d e l e t e ( t ) ) } d e s t r o y ( ) { t h i s . s t o p L i s t e n i n g ( ) } _ f o c u s ( t ) { c l e a r T i m e o u t ( t h i s . _ n e x t E v e n t L o o p T i m e o u t ) , t h i s . f o c u s e d E l e m e n t = t , t h i s . i s F o c u s e d = ! 0 } _ b l u r ( ) { c l e a r T i m e o u t ( t h i s . _ n e x t E v e n t L o o p T i m e o u t ) , t h i s . _ n e x t E v e n t L o o p T i m e o u t = s e t T i m e o u t ( ( ) = > { t h i s . f o c u s e d E l e m e n t = n u l l , t h i s . i s F o c u s e d = ! 1 } , 0 ) } } d i ( f l , u r ) , d i ( f l , H i ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class pl { constructor ( t ) { this . editor = t , this . componentFactory = new ul ( t ) , this . focusTracker = new fl , this . _editableElementsMap = new Map , this . listenTo ( t . editing . view . document , "layoutChanged" , ( ) => this . update ( ) ) } get element ( ) { return null } update ( ) { this . fire ( "update" ) } destroy ( ) { this . stopListening ( ) , this . focusTracker . destroy ( ) ; for ( const t of this . _editableElementsMap . values ( ) ) t . ckeditorInstance = null ; this . _editableElementsMap = new Map } setEditableElement ( t , e ) { this . _editableElementsMap . set ( t , e ) , e . ckeditorInstance || ( e . ckeditorInstance = this . editor ) } getEditableElement ( t = "main" ) { return this . _editableElementsMap . get ( t ) } getEditableElementsNames ( ) { return this . _editableElementsMap . keys ( ) } get _editableElements ( ) { return console . warn ( "editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future." , { editorUI : this } ) , this . _editableElementsMap } } di ( pl , ii ) ; n ( 27 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t m l = n e w W e a k M a p ; f u n c t i o n g l ( t ) { c o n s t { v i e w : e , e l e m e n t : n , t e x t : i , i s D i r e c t H o s t : o = ! 0 } = t , r = e . d o c u m e n t ; m l . h a s ( r ) | | ( m l . s e t ( r , n e w M a p ) , r . r e g i s t e r P o s t F i x e r ( t = > w l ( r , t ) ) ) , m l . g e t ( r ) . s e t ( n , { t e x t : i , i s D i r e c t H o s t : o } ) , e . c h a n g e ( t = > w l ( r , t ) ) } f u n c t i o n b l ( t , e ) { r e t u r n ! ! e . h a s C l a s s ( " c k - p l a c e h o l d e r " ) & & ( t . r e m o v e C l a s s ( " c k - p l a c e h o l d e r " , e ) , ! 0 ) } f u n c t i o n w l ( t , e ) { c o n s t n = m l . g e t ( t ) ; l e t i = ! 1 ; f o r ( c o n s t [ t , o ] o f n ) k l ( e , t , o ) & & ( i = ! 0 ) ; r e t u r n i } f u n c t i o n k l ( t , e , n ) { c o n s t { t e x t : i , i s D i r e c t H o s t : o } = n , r = o ? e : f u n c t i o n ( t ) { i f ( 1 = = = t . c h i l d C o u n t ) { c o n s t e = t . g e t C h i l d ( 0 ) ; i f ( e . i s ( " e l e m e n t " ) & & ! e . i s ( " u i E l e m e n t " ) ) r e t u r n e } r e t u r n n u l l }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( e ) ; l e t s = ! 1 ; r e t u r n ! ! r & & ( n . h o s t E l e m e n t = r , r . g e t A t t r i b u t e ( " d a t a - p l a c e h o l d e r " ) ! = = i & & ( t . s e t A t t r i b u t e ( " d a t a - p l a c e h o l d e r " , i , r ) , s = ! 0 ) , ! f u n c t i o n ( t ) { c o n s t e = t . d o c u m e n t ; i f ( ! e ) r e t u r n ! 1 ; c o n s t n = ! A r r a y . f r o m ( t . g e t C h i l d r e n ( ) ) . s o m e ( t = > ! t . i s ( " u i E l e m e n t " ) ) ; i f ( ! e . i s F o c u s e d & & n ) r e t u r n ! 0 ; c o n s t i = e . s e l e c t i o n . a n c h o r ; r e t u r n ! ( ! n | | ! i | | i . p a r e n t = = = t ) } ( r ) ? b l ( t , r ) & & ( s = ! 0 ) : f u n c t i o n ( t , e ) { r e t u r n ! e . h a s C l a s s ( " c k - p l a c e h o l d e r " ) & & ( t . a d d C l a s s ( " c k - p l a c e h o l d e r " , e ) , ! 0 ) } ( t , r ) & & ( s = ! 0 ) , s ) } c l a s s _ l e x t e n d s p l { c o n s t r u c t o r ( t , e ) {
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
var n ; super ( t ) , this . view = e , this . _toolbarConfig = ( n = t . config . get ( "toolbar" ) , Array . isArray ( n ) ? { items : n } : n ? Object . assign ( { items : [ ] } , n ) : { items : [ ] } ) } init ( ) { const t = this . editor , e = this . view , n = t . editing . view , i = e . editable , o = n . document . getRoot ( ) ; e . editable . name = o . rootName , e . render ( ) ; const r = i . element ; this . setEditableElement ( i . name , r ) , this . focusTracker . add ( r ) , e . editable . bind ( "isFocused" ) . to ( this . focusTracker ) , n . attachDomRoot ( r ) , this . _initPlaceholder ( ) , this . _initToolbar ( ) , this . fire ( "ready" ) } destroy ( ) { const t = this . view ; this . editor . editing . view . detachDomRoot ( t . editable . name ) , t . destroy ( ) , super . destroy ( ) } _initToolbar ( ) { const t = this . editor , e = this . view . toolbar ; e . fillFromConfig ( this . _toolbarConfig . items , this . componentFactory ) ,
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function ( { origin : t , originKeystrokeHandler : e , originFocusTracker : n , toolbar : i , beforeFocus : o , afterBlur : r } ) { n . add ( i . element ) , e . set ( "Alt+F10" , ( t , e ) => { n . isFocused && ! i . focusTracker . isFocused && ( o && o ( ) , i . focus ( ) , e ( ) ) } ) , i . keystrokes . set ( "Esc" , ( e , n ) => { i . focusTracker . isFocused && ( t . focus ( ) , r && r ( ) , n ( ) ) } ) } ( { origin : t . editing . view , originFocusTracker : this . focusTracker , originKeystrokeHandler : t . keystrokes , toolbar : e } ) } _initPlaceholder ( ) { const t = this . editor , e = t . editing . view , n = e . document . getRoot ( ) , i = t . sourceElement , o = t . config . get ( "placeholder" ) || i && "textarea" === i . tagName . toLowerCase ( ) && i . getAttribute ( "placeholder" ) ; o && gl ( { view : e , element : n , text : o , isDirectHost : ! 1 } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s v l e x t e n d s s o { c o n s t r u c t o r ( t ) { s u p e r ( { i d P r o p e r t y : " v i e w U i d " } ) , t h i s . o n ( " a d d " , ( t , e , n ) = > { e . i s R e n d e r e d | | e . r e n d e r ( ) , e . e l e m e n t & & t h i s . _ p a r e n t E l e m e n t & & t h i s . _ p a r e n t E l e m e n t . i n s e r t B e f o r e ( e . e l e m e n t , t h i s . _ p a r e n t E l e m e n t . c h i l d r e n [ n ] ) } ) , t h i s . o n ( " r e m o v e " , ( t , e ) = > { e . e l e m e n t & & t h i s . _ p a r e n t E l e m e n t & & e . e l e m e n t . r e m o v e ( ) } ) , t h i s . l o c a l e = t , t h i s . _ p a r e n t E l e m e n t = n u l l } d e s t r o y ( ) { t h i s . m a p ( t = > t . d e s t r o y ( ) ) } s e t P a r e n t ( t ) { t h i s . _ p a r e n t E l e m e n t = t } d e l e g a t e ( . . . t ) { i f ( ! t . l e n g t h | | ! t . e v e r y ( t = > " s t r i n g " = = t y p e o f t ) ) t h r o w n e w Z n . b ( " u i - v i e w c o l l e c t i o n - d e l e g a t e - w r o n g - e v e n t s : A l l e v e n t n a m e s m u s t b e s t r i n g s . " , t h i s ) ; r e t u r n { t o : e = > { f o r ( c o n s t n o f t h i s ) f o r ( c o n s t i o f t ) n . d e l e g a t e ( i ) . t o ( e ) ; t h i s . o n ( " a d d " , ( n , i ) = > { f o r ( c o n s t n o f t ) i . d e l e g a t e ( n ) . t o ( e ) } ) , t h i s . o n ( " r e m o v e " , ( n , i ) = > { f o r ( c o n s t n o f t ) i . s t o p D e l e g a t i n g ( n , e ) } ) } } } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const yl = "http://www.w3.org/1999/xhtml" ; class xl { constructor ( t ) { Object . assign ( this , Dl ( Ol ( t ) ) ) , this . _isRendered = ! 1 , this . _revertData = null } render ( ) { const t = this . _renderNode ( { intoFragment : ! 0 } ) ; return this . _isRendered = ! 0 , t } apply ( t ) { return this . _revertData = { children : [ ] , bindings : [ ] , attributes : { } } , this . _renderNode ( { node : t , isApplying : ! 0 , revertData : this . _revertData } ) , t } revert ( t ) { if ( ! this . _revertData ) throw new Zn . b ( "ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet." , [ this , t ] ) ; this . _revertTemplateFromNode ( t , this . _revertData ) } * getViews ( ) { yield * function * t ( e ) { if ( e . children ) for ( const n of e . children ) Bl ( n ) ? yield n : Ll ( n ) && ( yield * t ( n ) ) } ( this ) } static bind ( t , e ) { return { to : ( n , i ) => new Al ( { eventNameOrFunction : n , attribute : n , observable : t , emitter : e , callback : i } ) , if : ( n , i , o ) => new Pl ( { observable : t , emitter : e , attribute : n , valueIfTrue : i , callback : o } ) } } static extend ( t , e ) { if ( t . _isRendered ) throw new Zn . b ( "template-extend-render: Attempting to extend a template which has already been rendered." , [ this , t ] ) ; ! function t ( e , n ) { n . attributes && ( e . attributes || ( e . attributes = { } ) , Vl ( e . attributes , n . attributes ) ) ; n . eventListeners && ( e . eventListeners || ( e . eventListeners = { } ) , Vl ( e . eventListeners , n . eventListeners ) ) ; n . text && e . text . push ( ... n . text ) ; if ( n . children && n . children . length ) { if ( e . children . length != n . children . length ) throw new Zn . b ( "ui-template-extend-children-mismatch: The number of children in extended definition does not match." , e ) ; let i = 0 ; for ( const o of n . children ) t ( e . children [ i ++ ] , o ) } } ( t , Dl ( Ol ( e ) ) ) } _renderNode ( t ) { let e ; if ( e = t . node ? this . tag && this . text : this . tag ? this . text : ! this . text ) throw new Zn . b ( 'ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering a new Node.' , this ) ; return this . text ? this . _renderText ( t ) : this . _renderElement ( t ) } _renderElement ( t ) { let e = t . node ; return e || ( e = t . node = document . createElementNS ( this . ns || yl , this . tag ) ) , this . _renderAttributes ( t ) , this . _renderElementChildren ( t ) , this . _setUpListeners ( t ) , e } _renderText ( t ) { let e = t . node ; return e ? t . revertData . text = e . textContent : e = t . node = document . createTextNode ( "" ) , Tl ( this . text ) ? this . _bindToObservable ( { schema : this . text , updater : Sl ( e ) , data : t } ) : e . textContent = this . text . join ( "" ) , e } _renderAttributes ( t ) { let e , n , i , o ; if ( ! this . attributes ) return ; const r = t . node , s = t . revertData ; for ( e in this . attributes ) if ( i = r . getAttribute ( e ) , n = this . attributes [ e ] , s && ( s . attributes [ e ] = i ) , o = q ( n [ 0 ] ) && n [ 0 ] . ns ? n [ 0 ] . ns : null , Tl ( n ) ) { const a = o ? n [ 0 ] . value : n ; s && ql ( e ) && a . unshift ( i ) , this . _bindToObservable ( { schema : a , updater : Rl ( r , e , o ) , data : t } ) } else "style" == e && "string" != typeof n [ 0 ] ? this . _renderStyleAttribute ( n [ 0 ] , t ) : ( s && i && ql ( e ) && n . unshift ( i ) , Fl ( n = n . map ( t => t && t . value || t ) . reduce ( ( t , e ) => t . concat ( e ) , [ ] ) . reduce ( Nl , "" ) ) || r . setAttributeNS ( o , e , n ) ) } _renderStyleAttribute ( t , e ) { const n = e . node ; for ( const i in t ) { const o = t [ i ] ; Tl ( o ) ? this . _bindToObservable ( { schema : [ o ] , updater : Il ( n , i ) , data : e } ) : n . style [ i ] = o } } _renderElementChildren ( t ) { const e = t . node , n = t . intoFragment ? document . createDocumentFragment ( ) : e , i = t . isApplying ; let o = 0 ; for ( const r of this . children ) if ( zl ( r ) ) { if ( ! i ) { r . setParent ( e ) ; for ( const t of r ) n . appendChild ( t . element ) } } else if ( Bl ( r ) ) i || ( r . isRendered || r . render ( ) , n . appendChild ( r . element ) ) ; else if ( Yo ( r ) ) n . appendChild ( r ) ; else if ( i ) { const e = { children : [ ] , bindings : [ ] , attributes : { } } ; t . revertData . children . push ( e ) , r . _renderNode ( { node : n . childNodes [ o ++ ] , isApplying : ! 0 , revertData : e } ) } else n . appendChild ( r . render ( ) ) ; t . intoFragment && e . appendChild ( n ) } _setUpListeners ( t ) { if ( this . eventListeners ) for ( const e in this . eventListeners ) { const n = this . eventListeners [ e ] . map ( n => { const [ i , o ] = e . split ( "@" ) ; return n . activateDomEventListener ( i , o , t ) } ) ; t . revertData && t . revertData . bindings . push ( n ) } } _bindToObservable ( { schema : t , updater : e , data : n } ) { const i = n . revertData ; El ( t , e , n ) ; const o = t . filter ( t => ! Fl ( t ) ) . filter ( t => t . observable ) . map ( i => i . activateAttributeListener ( t , e , n ) ) ; i && i . bindings . push ( o ) } _revertTemplateFromNode ( t , e ) { for ( const t of e . bindings ) for ( const e of t ) e ( ) ; if ( e . text ) t . textContent = e . text ; else { for ( const n in e . attributes ) { const i = e . attributes [ n ] ; null === i ? t . removeAttribute ( n ) : t . setAttribute ( n , i ) } for ( let n = 0 ; n < e . children . length ; ++ n ) this . _revertTempl
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s j l { c o n s t r u c t o r ( t ) { t h i s . e l e m e n t = n u l l , t h i s . i s R e n d e r e d = ! 1 , t h i s . l o c a l e = t , t h i s . t = t & & t . t , t h i s . _ v i e w C o l l e c t i o n s = n e w s o , t h i s . _ u n b o u n d C h i l d r e n = t h i s . c r e a t e C o l l e c t i o n ( ) , t h i s . _ v i e w C o l l e c t i o n s . o n ( " a d d " , ( e , n ) = > { n . l o c a l e = t } ) , t h i s . d e c o r a t e ( " r e n d e r " ) } g e t b i n d T e m p l a t e ( ) { r e t u r n t h i s . _ b i n d T e m p l a t e ? t h i s . _ b i n d T e m p l a t e : t h i s . _ b i n d T e m p l a t e = x l . b i n d ( t h i s , t h i s ) } c r e a t e C o l l e c t i o n ( ) { c o n s t t = n e w v l ; r e t u r n t h i s . _ v i e w C o l l e c t i o n s . a d d ( t ) , t } r e g i s t e r C h i l d ( t ) { w i ( t ) | | ( t = [ t ] ) ; f o r ( c o n s t e o f t ) t h i s . _ u n b o u n d C h i l d r e n . a d d ( e ) } d e r e g i s t e r C h i l d ( t ) { w i ( t ) | | ( t = [ t ] ) ; f o r ( c o n s t e o f t ) t h i s . _ u n b o u n d C h i l d r e n . r e m o v e ( e ) } s e t T e m p l a t e ( t ) { t h i s . t e m p l a t e = n e w x l ( t ) } e x t e n d T e m p l a t e ( t ) { x l . e x t e n d ( t h i s . t e m p l a t e , t ) } r e n d e r ( ) { i f ( t h i s . i s R e n d e r e d ) t h r o w n e w Z n . b ( " u i - v i e w - r e n d e r - a l r e a d y - r e n d e r e d : T h i s V i e w h a s a l r e a d y b e e n r e n d e r e d . " , t h i s ) ; t h i s . t e m p l a t e & & ( t h i s . e l e m e n t = t h i s . t e m p l a t e . r e n d e r ( ) , t h i s . r e g i s t e r C h i l d ( t h i s . t e m p l a t e . g e t V i e w s ( ) ) ) , t h i s . i s R e n d e r e d = ! 0 } d e s t r o y ( ) { t h i s . s t o p L i s t e n i n g ( ) , t h i s . _ v i e w C o l l e c t i o n s . m a p ( t = > t . d e s t r o y ( ) ) , t h i s . t e m p l a t e & & t h i s . t e m p l a t e . _ r e v e r t D a t a & & t h i s . t e m p l a t e . r e v e r t ( t h i s . e l e m e n t ) } } d i ( j l , u r ) , d i ( j l , H i ) ; n ( 3 1 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s H l e x t e n d s j l { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . b o d y = t h i s . c r e a t e C o l l e c t i o n ( ) } r e n d e r ( ) { s u p e r . r e n d e r ( ) , t h i s . _ r e n d e r B o d y C o l l e c t i o n ( ) } d e s t r o y ( ) { r e t u r n t h i s . _ b o d y C o l l e c t i o n C o n t a i n e r . r e m o v e ( ) , s u p e r . d e s t r o y ( ) } _ r e n d e r B o d y C o l l e c t i o n ( ) { c o n s t t = t h i s . l o c a l e , e = t h i s . _ b o d y C o l l e c t i o n C o n t a i n e r = n e w x l ( { t a g : " d i v " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - r e s e t _ a l l " , " c k - b o d y " , " c k - r o u n d e d - c o r n e r s " ] , d i r : t . u i L a n g u a g e D i r e c t i o n } , c h i l d r e n : t h i s . b o d y } ) . r e n d e r ( ) ; d o c u m e n t . b o d y . a p p e n d C h i l d ( e ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s U l e x t e n d s j l { c o n s t r u c t o r ( t , e , n ) { s u p e r ( t ) , t h i s . s e t T e m p l a t e ( { t a g : " d i v " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - c o n t e n t " , " c k - e d i t o r _ _ e d i t a b l e " , " c k - r o u n d e d - c o r n e r s " ] , l a n g : t . c o n t e n t L a n g u a g e , d i r : t . c o n t e n t L a n g u a g e D i r e c t i o n } } ) , t h i s . n a m e = n u l l , t h i s . s e t ( " i s F o c u s e d " , ! 1 ) , t h i s . _ e d i t a b l e E l e m e n t = n , t h i s . _ h a s E x t e r n a l E l e m e n t = ! ! t h i s . _ e d i t a b l e E l e m e n t , t h i s . _ e d i t i n g V i e w = e } r e n d e r ( ) { s u p e r . r e n d e r ( ) , t h i s . _ h a s E x t e r n a l E l e m e n t ? t h i s . t e m p l a t e . a p p l y ( t h i s . e l e m e n t = t h i s . _ e d i t a b l e E l e m e n t ) : t h i s . _ e d i t a b l e E l e m e n t = t h i s . e l e m e n t , t h i s . o n ( " c h a n g e : i s F o c u s e d " , ( ) = > t h i s . _ u p d a t e I s F o c u s e d C l a s s e s ( ) ) , t h i s . _ u p d a t e I s F o c u s e d C l a s s e s ( ) } d e s t r o y ( ) { t h i s . _ h a s E x t e r n a l E l e m e n t & & t h i s . t e m p l a t e . r e v e r t ( t h i s . _ e d i t a b l e E l e m e n t ) , s u p e r . d e s t r o y ( ) } _ u p d a t e I s F o c u s e d C l a s s e s ( ) { c o n s t t = t h i s . _ e d i t i n g V i e w ; f u n c t i o n e ( e ) { t . c h a n g e ( n = > { c o n s t i = t . d o c u m e n t . g e t R o o t ( e . n a m e ) ; n . a d d C l a s s ( e . i s F o c u s e d ? " c k - f o c u s e d " : " c k - b l u r r e d " , i ) , n . r e m o v e C l a s s ( e . i s F o c u s e d ? " c k - b l u r r e d " : " c k - f o c u s e d " , i ) } ) } t . i s R e n d e r i n g I n P r o g r e s s ? f u n c t i o n n ( i ) { t . o n c e ( " c h a n g e : i s R e n d e r i n g I n P r o g r e s s " , ( t , o , r ) = > { r ? n ( i ) : e ( i ) } ) } ( t h i s ) : e ( t h i s ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s $ l e x t e n d s U l { c o n s t r u c t o r ( t , e , n ) { s u p e r ( t , e , n ) , t h i s . e x t e n d T e m p l a t e ( { a t t r i b u t e s : { r o l e : " t e x t b o x " , c l a s s : " c k - e d i t o r _ _ e d i t a b l e _ i n l i n e " } } ) } r e n d e r ( ) { s u p e r . r e n d e r ( ) ; c o n s t t = t h i s . _ e d i t i n g V i e w , e = t h i s . t ; t . c h a n g e ( n = > { c o n s t i = t . d o c u m e n t . g e t R o o t ( t h i s . n a m e ) ; n . s e t A t t r i b u t e ( " a r i a - l a b e l " , e ( " j " , [ t h i s . n a m e ] ) , i ) } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s W l { c o n s t r u c t o r ( t ) { i f ( O b j e c t . a s s i g n ( t h i s , t ) , t . a c t i o n s & & t . k e y s t r o k e H a n d l e r ) f o r ( c o n s t e i n t . a c t i o n s ) { l e t n = t . a c t i o n s [ e ] ; " s t r i n g " = = t y p e o f n & & ( n = [ n ] ) ; f o r ( c o n s t i o f n ) t . k e y s t r o k e H a n d l e r . s e t ( i , ( t , n ) = > { t h i s [ e ] ( ) , n ( ) } ) } } g e t f i r s t ( ) { r e t u r n t h i s . f o c u s a b l e s . f i n d ( G l ) | | n u l l } g e t l a s t ( ) { r e t u r n t h i s . f o c u s a b l e s . f i l t e r ( G l ) . s l i c e ( - 1 ) [ 0 ] | | n u l l } g e t n e x t ( ) { r e t u r n t h i s . _ g e t F o c u s a b l e I t e m ( 1 ) } g e t p r e v i o u s ( ) { r e t u r n t h i s . _ g e t F o c u s a b l e I t e m ( - 1 ) } g e t c u r r e n t ( ) { l e t t = n u l l ; r e t u r n n u l l = = = t h i s . f o c u s T r a c k e r . f o c u s e d E l e m e n t ? n u l l : ( t h i s . f o c u s a b l e s . f i n d ( ( e , n ) = > { c o n s t i = e . e l e m e n t = = = t h i s . f o c u s T r a c k e r . f o c u s e d E l e m e n t ; r e t u r n i & & ( t = n ) , i } ) , t ) } f o c u s F i r s t ( ) { t h i s . _ f o c u s ( t h i s . f i r s t ) } f o c u s L a s t ( ) { t h i s . _ f o c u s ( t h i s . l a s t ) } f o c u s N e x t ( ) { t h i s . _ f o c u s ( t h i s . n e x t ) } f o c u s P r e v i o u s ( ) { t h i s . _ f o c u s ( t h i s . p r e v i o u s ) } _ f o c u s ( t ) { t & & t . f o c u s ( ) } _ g e t F o c u s a b l e I t e m ( t ) { c o n s t e = t h i s . c u r r e n t , n = t h i s . f o c u s a b l e s . l e n g t h ; i f ( ! n ) r e t u r n n u l l ; i f ( n u l l = = = e ) r e t u r n t h i s [ 1 = = = t ? " f i r s t " : " l a s t " ] ; l e t i = ( e + n + t ) % n ; d o { c o n s t e = t h i s . f o c u s a b l e s . g e t ( i ) ; i f ( G l ( e ) ) r e t u r n e ; i = ( i + n + t ) % n } w h i l e ( i ! = = e ) ; r e t u r n n u l l } } f u n c t i o n G l ( t ) { r e t u r n ! ( ! t . f o c u s | | " n o n e " = = i r . w i n d o w . g e t C o m p u t e d S t y l e ( t . e l e m e n t ) . d i s p l a y ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s K l e x t e n d s j l { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . s e t T e m p l a t e ( { t a g : " s p a n " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - t o o l b a r _ _ s e p a r a t o r " ] } } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t J l = 1 0 0 ; c l a s s Z l { c o n s t r u c t o r ( t ) { t h i s . _ c a l l b a c k = t , t h i s . _ e l e m e n t s = n e w S e t , t h i s . _ p r e v i o u s R e c t s = n e w M a p , t h i s . _ p e r i o d i c C h e c k T i m e o u t = n u l l } o b s e r v e ( t ) { t h i s . _ e l e m e n t s . a d d ( t ) , 1 = = = t h i s . _ e l e m e n t s . s i z e & & t h i s . _ s t a r t P e r i o d i c C h e c k ( ) } u n o b s e r v e ( t ) { t h i s . _ e l e m e n t s . d e l e t e ( t ) , t h i s . _ p r e v i o u s R e c t s . d e l e t e ( t ) , t h i s . _ e l e m e n t s . s i z e | | t h i s . _ s t o p P e r i o d i c C h e c k ( ) } d i s c o n n e c t ( ) { t h i s . _ e l e m e n t s . f o r E a c h ( t = > t h i s . u n o b s e r v e ( t ) ) } _ s t a r t P e r i o d i c C h e c k ( ) { c o n s t t = ( ) = > { t h i s . _ c h e c k E l e m e n t R e c t s A n d E x e c u t e C a l l b a c k ( ) , t h i s . _ p e r i o d i c C h e c k T i m e o u t = s e t T i m e o u t ( t , J l ) } ; t h i s . l i s t e n T o ( i r . w i n d o w , " r e s i z e " , ( ) = > { t h i s . _ c h e c k E l e m e n t R e c t s A n d E x e c u t e C a l l b a c k ( ) } ) , t ( ) } _ s t o p P e r i o d i c C h e c k ( ) { c l e a r T i m e o u t ( t h i s . _ p e r i o d i c C h e c k T i m e o u t ) , t h i s . s t o p L i s t e n i n g ( ) , t h i s . _ p r e v i o u s R e c t s . c l e a r ( ) } _ c h e c k E l e m e n t R e c t s A n d E x e c u t e C a l l b a c k ( ) { c o n s t t = [ ] ; f o r ( c o n s t e o f t h i s . _ e l e m e n t s ) t h i s . _ h a s R e c t C h a n g e d ( e ) & & t . p u s h ( { t a r g e t : e , c o n t e n t R e c t : t h i s . _ p r e v i o u s R e c t s . g e t ( e ) } ) ; t . l e n g t h & & t h i s . _ c a l l b a c k ( t ) } _ h a s R e c t C h a n g e d ( t ) { i f ( ! t . o w n e r D o c u m e n t . b o d y . c o n t a i n s ( t ) ) r e t u r n ! 1 ; c o n s t e = n e w P s ( t ) , n = t h i s . _ p r e v i o u s R e c t s . g e t ( t ) , i = ! n | | ! n . i s E q u a l ( e ) ; r e t u r n t h i s . _ p r e v i o u s R e c t s . s e t ( t , e ) , i } } d i ( Z l , u r ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Ql extends jl { constructor ( t ) { super ( t ) ; const e = this . bindTemplate ; this . set ( "isVisible" , ! 1 ) , this . set ( "position" , "se" ) , this . children = this . createCollection ( ) , this . setTemplate ( { tag : "div" , attributes : { class : [ "ck" , "ck-reset" , "ck-dropdown__panel" , e . to ( "position" , t => ` ck-dropdown__panel_ ${ t } ` ) , e . if ( "isVisible" , "ck-dropdown__panel-visible" ) ] } , children : this . children , on : { selectstart : e . to ( t => t . preventDefault ( ) ) } } ) } focus ( ) { this . children . length && this . children . first . focus ( ) } focusLast ( ) { if ( this . children . length ) { const t = this . children . last ; "function" == typeof t . focusLast ? t . focusLast ( ) : t . focus ( ) } } } n ( 33 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function Yl ( { element : t , target : e , positions : n , limiter : i , fitInViewport : o } ) { G ( e ) && ( e = e ( ) ) , G ( i ) && ( i = i ( ) ) ; const r = function ( t ) { for ( ; t && "html" != t . tagName . toLowerCase ( ) ; ) { if ( "static" != ir . window . getComputedStyle ( t ) . position ) return t ; t = t . parentElement } return null } ( t . parentElement ) , s = new Ps ( t ) , a = new Ps ( e ) ; let c , l ; if ( i || o ) { const t = i && new Ps ( i ) . getVisible ( ) , e = o && new Ps ( ir . window ) ; [ l , c ] = function ( t , e , n , i , o ) { let r , s , a = 0 , c = 0 ; const l = n . getArea ( ) ; return t . some ( t => { const [ d , u ] = Xl ( t , e , n ) ; let h , f ; if ( i ) if ( o ) { const t = i . getIntersection ( o ) ; h = t ? t . getIntersectionArea ( u ) : 0 } else h = i . getIntersectionArea ( u ) ; function p ( ) { c = f , a = h , r = u , s = d } return o && ( f = o . getIntersectionArea ( u ) ) , o && ! i ? f > c && p ( ) : ! o && i ? h > a && p ( ) : f > c && h >= a ? p ( ) : f >= c && h > a && p ( ) , h === l } ) , r ? [ s , r ] : null } ( n , a , s , t , e ) || Xl ( n [ 0 ] , a , s ) } else [ l , c ] = Xl ( n [ 0 ] , a , s ) ; let { left : d , top : u } = td ( c ) ; if ( r ) { const t = td ( new Ps ( r ) ) , e = Cs ( r ) ; d -= t . left , u -= t . top , d += r . scrollLeft , u += r . scrollTop , d -= e . left , u -= e . top } return { left : d , top : u , name : l } } function Xl ( t , e , n ) { const { left : i , top : o , name : r } = t ( e , n ) ; return [ r , n . clone ( ) . moveTo ( i , o ) ] } function td ( { left : t , top : e } ) { const { scrollX : n , scrollY : i } = ir . window ; return { left : t + n , top : e + i } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s e d e x t e n d s j l { c o n s t r u c t o r ( t , e , n ) { s u p e r ( t ) ; c o n s t i = t h i s . b i n d T e m p l a t e ; t h i s . b u t t o n V i e w = e , t h i s . p a n e l V i e w = n , t h i s . s e t ( " i s O p e n " , ! 1 ) , t h i s . s e t ( " i s E n a b l e d " , ! 0 ) , t h i s . s e t ( " c l a s s " ) , t h i s . s e t ( " p a n e l P o s i t i o n " , " a u t o " ) , t h i s . f o c u s T r a c k e r = n e w f l , t h i s . k e y s t r o k e s = n e w r l , t h i s . s e t T e m p l a t e ( { t a g : " d i v " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - d r o p d o w n " , i . t o ( " c l a s s " ) , i . i f ( " i s E n a b l e d " , " c k - d i s a b l e d " , t = > ! t ) ] } , c h i l d r e n : [ e , n ] } ) , e . e x t e n d T e m p l a t e ( { a t t r i b u t e s : { c l a s s : [ " c k - d r o p d o w n _ _ b u t t o n " ] } } ) } r e n d e r ( ) { s u p e r . r e n d e r ( ) , t h i s . l i s t e n T o ( t h i s . b u t t o n V i e w , " o p e n " , ( ) = > { t h i s . i s O p e n = ! t h i s . i s O p e n } ) , t h i s . p a n e l V i e w . b i n d ( " i s V i s i b l e " ) . t o ( t h i s , " i s O p e n " ) , t h i s . o n ( " c h a n g e : i s O p e n " , ( ) = > { t h i s . i s O p e n & & ( " a u t o " = = = t h i s . p a n e l P o s i t i o n ? t h i s . p a n e l V i e w . p o s i t i o n = e d . _ g e t O p t i m a l P o s i t i o n ( { e l e m e n t : t h i s . p a n e l V i e w . e l e m e n t , t a r g e t : t h i s . b u t t o n V i e w . e l e m e n t , f i t I n V i e w p o r t : ! 0 , p o s i t i o n s : t h i s . _ p a n e l P o s i t i o n s } ) . n a m e : t h i s . p a n e l V i e w . p o s i t i o n = t h i s . p a n e l P o s i t i o n ) } ) , t h i s . k e y s t r o k e s . l i s t e n T o ( t h i s . e l e m e n t ) , t h i s . f o c u s T r a c k e r . a d d ( t h i s . e l e m e n t ) ; c o n s t t = ( t , e ) = > { t h i s . i s O p e n & & ( t h i s . b u t t o n V i e w . f o c u s ( ) , t h i s . i s O p e n = ! 1 , e ( ) ) } ; t h i s . k e y s t r o k e s . s e t ( " a r r o w d o w n " , ( t , e ) = > { t h i s . b u t t o n V i e w . i s E n a b l e d & & ! t h i s . i s O p e n & & ( t h i s . i s O p e n = ! 0 , e ( ) ) } ) , t h i s . k e y s t r o k e s . s e t ( " a r r o w r i g h t " , ( t , e ) = > { t h i s . i s O p e n & & e ( ) } ) , t h i s . k e y s t r o k e s . s e t ( " a r r o w l e f t " , t ) , t h i s . k e y s t r o k e s . s e t ( " e s c " , t ) } f o c u s ( ) { t h i s . b u t t o n V i e w . f o c u s ( ) } g e t _ p a n e l P o s i t i o n s ( ) { c o n s t { s o u t h E a s t : t , s o u t h W e s t : e , n o r t h E a s t : n , n o r t h W e s t : i } = e d . d e f a u l t P a n e l P o s i t i o n s ; r e t u r n " l t r " = = = t h i s . l o c a l e . u i L a n g u a g e D i r e c t i o n ? [ t , e , n , i ] : [ e , t , i , n ] } } e d . d e f a u l t P a n e l P o s i t i o n s = { s o u t h E a s t : t = > ( { t o p : t . b o t t o m , l e f t : t . l e f t , n a m e : " s e " } ) , s o u t h W e s t : ( t , e ) = > ( { t o p : t . b o t t o m , l e f t : t . l e f t - e . w i d t h + t . w i d t h , n a m e : " s w " } ) , n o r t h E a s t : ( t , e ) = > ( { t o p : t . t o p - e . h e i g h t , l e f t : t . l e f t , n a m e : " n e " } ) , n o r t h W e s t : ( t , e ) = > ( { t o p : t . b o t t o m - e . h e i g h t , l e f t : t . l e f t - e . w i d t h + t . w i d t h , n a m e : " n w " } ) } , e d . _ g e t O p t i m a l P o s i t i o n = Y l ; n ( 3 5 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /class nd extends jl{constructor(){super();const t=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.setTemplate({tag:"svg",ns:"http:/ / www . w3 . org / 2000 / svg ",attributes:{class:[" ck "," ck - icon "],viewBox:t.to(" viewBox ")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on(" change : content ",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on(" change : fillColor ",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const t=(new DOMParser).parseFromString(this.content.trim()," image / svg + xml ").querySelector(" svg "),e=t.getAttribute(" viewBox ");for(e&&(this.viewBox=e),this.element.innerHTML=" ";t.childNodes.length>0;)this.element.appendChild(t.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(" . ck - icon _ _fill " ) . forEach ( t => { t . style . fill = this . fillColor } ) } } n ( 37 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s i d e x t e n d s j l { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . s e t ( " t e x t " , " " ) , t h i s . s e t ( " p o s i t i o n " , " s " ) ; c o n s t e = t h i s . b i n d T e m p l a t e ; t h i s . s e t T e m p l a t e ( { t a g : " s p a n " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - t o o l t i p " , e . t o ( " p o s i t i o n " , t = > " c k - t o o l t i p _ " + t ) , e . i f ( " t e x t " , " c k - h i d d e n " , t = > ! t . t r i m ( ) ) ] } , c h i l d r e n : [ { t a g : " s p a n " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - t o o l t i p _ _ t e x t " ] } , c h i l d r e n : [ { t e x t : e . t o ( " t e x t " ) } ] } ] } ) } } n ( 3 9 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /class od extends jl{constructor(t){super(t);const e=this.bindTemplate,n=Xn();this.set("class"),this.set("labelStyle"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(n),this.iconView=new nd,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this)),this.setTemplate({tag:"button",attributes:{class:["ck","ck-button",e.to("class"),e.if("isEnabled","ck-disabled",t=>!t),e.if("isVisible","ck-hidden",t=>!t),e.to("isOn",t=>t?"ck-on":"ck-off"),e.if("withText","ck-button_with-text")],type:e.to("type",t=>t||"button"),tabindex:e.to("tabindex"),"aria-labelledby":`ck-editor__aria-label_${n}`,"aria-disabled":e.if("isEnabled",!0,t=>!t),"aria-pressed":e.to("isOn",t=>!!this.isToggleable&&String(t))},children:this.children,on:{mousedown:e.to(t=>{t.preventDefault()}),click:e.to(t=>{this.isEnabled?this.fire("execute"):t.preventDefault()})}})}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView)}focus(){this.element.focus()}_createTooltipView(){const t=new id;return t.bind("text").to(this,"_tooltipString"),t.bind("position").to(this,"tooltipPosition"),t}_createLabelView(t){const e=new jl,n=this.bindTemplate;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:n.to("labelStyle"),id:`ck-editor__aria-label_${t}`},children:[{text:this.bindTemplate.to("label")}]}),e}_getTooltipString(t,e,n){return t?"string"==typeof t?t:(n&&(n=function(t){return go.isMac?yo(t).map(t=>wo[t.toLowerCase()]||t).reduce((t,e)=>t.slice(-1)in bo?t+e:t+"+"+e):t}(n)),t instanceof Function?t(e,n):`${e}${n?` (${n})`:""}`):""}}var rd='<svg viewBox="0 0 10 10" xmlns="http:/ / www . w3 . org / 2000 / svg "><path d=" M . 941 4.523 a . 75.75 0 1 1 1.06 - 1.06 l3 . 006 3.005 3.005 - 3.005 a . 75.75 0 1 1 1.06 1.06 l - 3.549 3.55 a . 75.75 0 0 1 - 1.168 - . 136 L . 941 4.523 z " / > < / s v g > ' ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s s d e x t e n d s o d { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . a r r o w V i e w = t h i s . _ c r e a t e A r r o w V i e w ( ) , t h i s . e x t e n d T e m p l a t e ( { a t t r i b u t e s : { " a r i a - h a s p o p u p " : ! 0 } } ) , t h i s . d e l e g a t e ( " e x e c u t e " ) . t o ( t h i s , " o p e n " ) } r e n d e r ( ) { s u p e r . r e n d e r ( ) , t h i s . c h i l d r e n . a d d ( t h i s . a r r o w V i e w ) } _ c r e a t e A r r o w V i e w ( ) { c o n s t t = n e w n d ; r e t u r n t . c o n t e n t = r d , t . e x t e n d T e m p l a t e ( { a t t r i b u t e s : { c l a s s : " c k - d r o p d o w n _ _ a r r o w " } } ) , t } } n ( 4 1 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s a d e x t e n d s j l { c o n s t r u c t o r ( ) { s u p e r ( ) , t h i s . i t e m s = t h i s . c r e a t e C o l l e c t i o n ( ) , t h i s . f o c u s T r a c k e r = n e w f l , t h i s . k e y s t r o k e s = n e w r l , t h i s . _ f o c u s C y c l e r = n e w W l ( { f o c u s a b l e s : t h i s . i t e m s , f o c u s T r a c k e r : t h i s . f o c u s T r a c k e r , k e y s t r o k e H a n d l e r : t h i s . k e y s t r o k e s , a c t i o n s : { f o c u s P r e v i o u s : " a r r o w u p " , f o c u s N e x t : " a r r o w d o w n " } } ) , t h i s . s e t T e m p l a t e ( { t a g : " u l " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - r e s e t " , " c k - l i s t " ] } , c h i l d r e n : t h i s . i t e m s } ) } r e n d e r ( ) { s u p e r . r e n d e r ( ) ; f o r ( c o n s t t o f t h i s . i t e m s ) t h i s . f o c u s T r a c k e r . a d d ( t . e l e m e n t ) ; t h i s . i t e m s . o n ( " a d d " , ( t , e ) = > { t h i s . f o c u s T r a c k e r . a d d ( e . e l e m e n t ) } ) , t h i s . i t e m s . o n ( " r e m o v e " , ( t , e ) = > { t h i s . f o c u s T r a c k e r . r e m o v e ( e . e l e m e n t ) } ) , t h i s . k e y s t r o k e s . l i s t e n T o ( t h i s . e l e m e n t ) } f o c u s ( ) { t h i s . _ f o c u s C y c l e r . f o c u s F i r s t ( ) } f o c u s L a s t ( ) { t h i s . _ f o c u s C y c l e r . f o c u s L a s t ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s c d e x t e n d s j l { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . c h i l d r e n = t h i s . c r e a t e C o l l e c t i o n ( ) , t h i s . s e t T e m p l a t e ( { t a g : " l i " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - l i s t _ _ i t e m " ] } , c h i l d r e n : t h i s . c h i l d r e n } ) } f o c u s ( ) { t h i s . c h i l d r e n . f i r s t . f o c u s ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s l d e x t e n d s j l { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . s e t T e m p l a t e ( { t a g : " l i " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - l i s t _ _ s e p a r a t o r " ] } } ) } } n ( 4 3 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s d d e x t e n d s o d { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . i s T o g g l e a b l e = ! 0 , t h i s . t o g g l e S w i t c h V i e w = t h i s . _ c r e a t e T o g g l e V i e w ( ) , t h i s . e x t e n d T e m p l a t e ( { a t t r i b u t e s : { c l a s s : " c k - s w i t c h b u t t o n " } } ) } r e n d e r ( ) { s u p e r . r e n d e r ( ) , t h i s . c h i l d r e n . a d d ( t h i s . t o g g l e S w i t c h V i e w ) } _ c r e a t e T o g g l e V i e w ( ) { c o n s t t = n e w j l ; r e t u r n t . s e t T e m p l a t e ( { t a g : " s p a n " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - b u t t o n _ _ t o g g l e " ] } , c h i l d r e n : [ { t a g : " s p a n " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - b u t t o n _ _ t o g g l e _ _ i n n e r " ] } } ] } ) , t } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n u d ( { e m i t t e r : t , a c t i v a t o r : e , c a l l b a c k : n , c o n t e x t E l e m e n t s : i } ) { t . l i s t e n T o ( d o c u m e n t , " m o u s e d o w n " , ( t , { t a r g e t : o } ) = > { i f ( e ( ) ) { f o r ( c o n s t t o f i ) i f ( t . c o n t a i n s ( o ) ) r e t u r n ; n ( ) } } ) } n ( 4 5 ) , n ( 4 7 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function hd ( t , e = sd ) { const n = new e ( t ) , i = new Ql ( t ) , o = new ed ( t , n , i ) ; return n . bind ( "isEnabled" ) . to ( o ) , n instanceof sd ? n . bind ( "isOn" ) . to ( o , "isOpen" ) : n . arrowView . bind ( "isOn" ) . to ( o , "isOpen" ) , function ( t ) { ( function ( t ) { t . on ( "render" , ( ) => { ud ( { emitter : t , activator : ( ) => t . isOpen , callback : ( ) => { t . isOpen = ! 1 } , contextElements : [ t . element ] } ) } ) } ) ( t ) , function ( t ) { t . on ( "execute" , e => { e . source instanceof dd || ( t . isOpen = ! 1 ) } ) } ( t ) , function ( t ) { t . keystrokes . set ( "arrowdown" , ( e , n ) => { t . isOpen && ( t . panelView . focus ( ) , n ( ) ) } ) , t . keystrokes . set ( "arrowup" , ( e , n ) => { t . isOpen && ( t . panelView . focusLast ( ) , n ( ) ) } ) } ( t ) } ( o ) , o } function fd ( t , e ) { const n = t . locale , i = n . t , o = t . toolbarView = new gd ( n ) ; o . set ( "ariaLabel" , i ( "h" ) ) , t . extendTemplate ( { attributes : { class : [ "ck-toolbar-dropdown" ] } } ) , e . map ( t => o . items . add ( t ) ) , t . panelView . children . add ( o ) , o . items . delegate ( "execute" ) . to ( t ) } function pd ( t , e ) { const n = t . locale , i = t . listView = new ad ( n ) ; i . items . bindTo ( e ) . using ( ( { type : t , model : e } ) => { if ( "separator" === t ) return new ld ( n ) ; if ( "button" === t || "switchbutton" === t ) { const i = new cd ( n ) ; let o ; return ( o = "button" === t ? new od ( n ) : new dd ( n ) ) . bind ( ... Object . keys ( e ) ) . to ( e ) , o . delegate ( "execute" ) . to ( i ) , i . children . add ( o ) , i } } ) , t . panelView . children . add ( i ) , i . items . delegate ( "execute" ) . to ( t ) } var md = '<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>\n' ; n ( 49 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class gd extends jl { constructor ( t , e ) { super ( t ) ; const n = this . bindTemplate , i = this . t ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
var o ; this . options = e || { } , this . set ( "ariaLabel" , i ( "al" ) ) , this . items = this . createCollection ( ) , this . focusTracker = new fl , this . keystrokes = new rl , this . set ( "class" ) , this . itemsView = new bd ( t ) , this . children = this . createCollection ( ) , this . children . add ( this . itemsView ) , this . focusables = this . createCollection ( ) , this . _focusCycler = new Wl ( { focusables : this . focusables , focusTracker : this . focusTracker , keystrokeHandler : this . keystrokes , actions : { focusPrevious : [ "arrowleft" , "arrowup" ] , focusNext : [ "arrowright" , "arrowdown" ] } } ) , this . setTemplate ( { tag : "div" , attributes : { class : [ "ck" , "ck-toolbar" , n . to ( "class" ) ] , role : "toolbar" , "aria-label" : n . to ( "ariaLabel" ) } , children : this . children , on : { mousedown : ( o = this , o . bindTemplate . to ( t => { t . target === o . element && t . preventDefault ( ) } ) ) } } ) , this . _behavior = this . options . shouldGroupWhenFull ? new kd ( this ) : new wd ( this ) } render ( ) { super . render ( ) ; for ( const t of this . items ) this . focusTracker . add ( t . element ) ; this . items . on ( "add" , ( t , e ) => { this . focusTracker . add ( e . element ) } ) , this . items . on ( "remove" , ( t , e ) => { this . focusTracker . remove ( e . element ) } ) , this . keystrokes . listenTo ( this . element ) , this . _behavior . render ( this ) } destroy ( ) { return this . _behavior . destroy ( ) , super . destroy ( ) } focus ( ) { this . _focusCycler . focusFirst ( ) } focusLast ( ) { this . _focusCycler . focusLast ( ) } fillFromConfig ( t , e ) { t . map ( t => { "|" == t ? this . items . add ( new Kl ) : e . has ( t ) ? this . items . add ( e . create ( t ) ) : console . warn ( Object ( Zn . a ) ( "toolbarview-item-unavailable: The requested toolbar item is unavailable." ) , { name : t } ) } ) } } class bd extends jl { constructor ( t ) { super ( t ) , this . children = this . createCollection ( ) , this . setTemplate ( { tag : "div" , attributes : { class : [ "ck" , "ck-toolbar__items" ] } , children : this . children } ) } } class wd { constructor ( t ) { const e = t . bindTemplate ; t . set ( "isVertical" , ! 1 ) , t . itemsView . children . bindTo ( t . items ) . using ( t => t ) , t . focusables . bindTo ( t . items ) . using ( t => t ) , t . extendTemplate ( { attributes : { class : [ e . if ( "isVertical" , "ck-toolbar_vertical" ) ] } } ) } render ( ) { } destroy ( ) { } } class kd { constructor ( t ) { this . viewChildren = t . children , this . viewFocusables = t . focusables , this . viewItemsView = t . itemsView , this . viewFocusTracker = t . focusTracker , this . viewLocale = t . locale , this . ungroupedItems = t . createCollection ( ) , this . groupedItems = t . createCollection ( ) , this . groupedItemsDropdown = this . _createGroupedItemsDropdown ( ) , this . resizeObserver = null , this . cachedPadding = null , t . itemsView . children . bindTo ( this . ungroupedItems ) . using ( t => t ) , this . ungroupedItems . on ( "add" , this . _updateFocusCycleableItems . bind ( this ) ) , this . ungroupedItems . on ( "remove" , this . _updateFocusCycleableItems . bind ( this ) ) , t . children . on ( "add" , this . _updateFocusCycleableItems . bind ( this ) ) , t . children . on ( "remove" , this . _updateFocusCycleableItems . bind ( this ) ) , t . items . on ( "add" , ( t , e , n ) => { n > this . ungroupedItems . length ? this . groupedItems . add ( e , n - this . ungroupedItems . length ) : this . ungroupedItems . add ( e , n ) , this . _updateGrouping ( ) } ) , t . items . on ( "remove" , ( t , e , n ) => { n > this . ungroupedItems . length ? this . groupedItems . remove ( e ) : this . ungroupedItems . remove ( e ) , this . _updateGrouping ( ) } ) , t . extendTemplate ( { attributes : { class : [ "ck-toolbar_grouping" ] } } ) } render ( t ) { this . viewElement = t . element , this . _enableGroupingOnResize ( ) } destroy ( ) { this . groupedItemsDropdown . destroy ( ) , this . resizeObserver . disconnect ( ) } _updateGrouping ( ) { if ( ! this . viewElement . ownerDocument . body . contains ( this . viewElement ) ) return ; let t ; for ( ; this . _areItemsOverflowing ; ) this . _groupLastItem ( ) , t = ! 0 ; if ( ! t && this . groupedItems . length ) { for ( ; this . groupedItems . length && ! this . _areItemsOverflowing ; ) this . _ungroupFirstItem ( ) ; this . _areItemsOverflowing && this . _groupLastItem ( ) } } get _areItemsOverflowing ( ) { if ( ! this . ungroupedItems . length ) return ! 1 ; const t = this . viewElement , e = this . viewLocale . uiLanguageDirection , n = new Ps ( t . lastChild ) , i = new Ps ( t ) ; if ( ! this . cachedPadding ) { const n = ir . window . getComputedStyle ( t ) , i = "ltr" === e ? "paddingRight" : "paddingLeft" ; this . cachedPadding = Number . parseInt ( n [ i ] ) } return "ltr" === e ? n . right > i . right - this . cachedPadding : n . left < i . left + this . cachedPadding } _enableGroupingOnResize ( ) { let t ; var e ; this . resizeObserver = ( e = ( [ e ] ) => { t && t === e . contentRect . width || ( this . _updateGrouping ( ) , t = e . contentRect . width ) } , "function" == typeof ir . window . ResizeObserver ? new ir . window . ResizeObserver ( e ) : new Zl ( e ) ) , this . resizeObserver . observe ( th
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s _ d e x t e n d s H l { c o n s t r u c t o r ( t , e , n ) { s u p e r ( t ) , t h i s . t o o l b a r = n e w g d ( t , { s h o u l d G r o u p W h e n F u l l : ! 0 } ) , t h i s . e d i t a b l e = n e w $ l ( t , e , n ) , t h i s . t o o l b a r . e x t e n d T e m p l a t e ( { a t t r i b u t e s : { c l a s s : [ " c k - r e s e t _ a l l " , " c k - r o u n d e d - c o r n e r s " ] , d i r : t . u i L a n g u a g e D i r e c t i o n } } ) } r e n d e r ( ) { s u p e r . r e n d e r ( ) , t h i s . r e g i s t e r C h i l d ( [ t h i s . t o o l b a r , t h i s . e d i t a b l e ] ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class vd extends al { constructor ( t , e ) { super ( e ) , Gn ( t ) && ( this . sourceElement = t ,
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function ( t ) { const e = t . sourceElement ; if ( e ) { if ( e . ckeditorInstance ) throw new Zn . b ( "editor-source-element-already-used: The DOM element cannot be used to create multiple editor instances." , t ) ; e . ckeditorInstance = t , t . once ( "destroy" , ( ) => { delete e . ckeditorInstance } ) } } ( this ) ) , this . data . processor = new dl , this . model . document . createRoot ( ) ; const n = new _d ( this . locale , this . editing . view , this . sourceElement ) ; this . ui = new _l ( this , n ) } destroy ( ) { const t = this . getData ( ) ; return this . ui . destroy ( ) , super . destroy ( ) . then ( ( ) => { this . sourceElement &&
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function ( t , e ) { t instanceof HTMLTextAreaElement && ( t . value = e ) , t . innerHTML = e } ( this . sourceElement , t ) } ) } static create ( t , e = { } ) { return new Promise ( n => { const i = Gn ( t ) ; if ( i && "TEXTAREA" === t . tagName ) throw new Zn . b ( "editor-wrong-element: This type of editor cannot be initialized inside <textarea> element." , null ) ; const o = new this ( t , e ) ; n ( o . initPlugins ( ) . then ( ( ) => { o . ui . init ( ) } ) . then ( ( ) => { if ( ! i && e . initialData ) throw new Zn . b ( "editor-create-initial-data: The config.initialData option cannot be used together with initial data passed in Editor.create()." , null ) ; const n = e . initialData || function ( t ) { return Gn ( t ) ? ( e = t , e instanceof HTMLTextAreaElement ? e . value : e . innerHTML ) : t ; var e }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( t ) ; r e t u r n o . d a t a . i n i t ( n ) } ) . t h e n ( ( ) = > o . f i r e ( " r e a d y " ) ) . t h e n ( ( ) = > o ) ) } ) } } d i ( v d , c l ) ; c l a s s y d { c o n s t r u c t o r ( t ) { t h i s . e d i t o r = t } d e s t r o y ( ) { t h i s . s t o p L i s t e n i n g ( ) } } d i ( y d , H i ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class xd { constructor ( ) { this . _stack = [ ] } add ( t , e ) { const n = this . _stack , i = n [ 0 ] ; this . _insertDescriptor ( t ) ; const o = n [ 0 ] ; i === o || Cd ( i , o ) || this . fire ( "change:top" , { oldDescriptor : i , newDescriptor : o , writer : e } ) } remove ( t , e ) { const n = this . _stack , i = n [ 0 ] ; this . _removeDescriptor ( t ) ; const o = n [ 0 ] ; i === o || Cd ( i , o ) || this . fire ( "change:top" , { oldDescriptor : i , newDescriptor : o , writer : e } ) } _insertDescriptor ( t ) { const e = this . _stack , n = e . findIndex ( e => e . id === t . id ) ; if ( Cd ( t , e [ n ] ) ) return ; n > - 1 && e . splice ( n , 1 ) ; let i = 0 ; for ( ; e [ i ] && Ad ( e [ i ] , t ) ; ) i ++ ; e . splice ( i , 0 , t ) } _removeDescriptor ( t ) { const e = this . _stack , n = e . findIndex ( e => e . id === t ) ; n > - 1 && e . splice ( n , 1 ) } } function Cd ( t , e ) { return t && e && t . priority == e . priority && Pd ( t . classes ) == Pd ( e . classes ) } function Ad ( t , e ) { return t . priority > e . priority || ! ( t . priority < e . priority ) && Pd ( t . classes ) > Pd ( e . classes ) } function Pd ( t ) { return Array . isArray ( t ) ? t . sort ( ) . join ( "," ) : t } di ( xd , ii ) ; var Td = '<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>' ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t E d = " c k - w i d g e t " , S d = " c k - w i d g e t _ s e l e c t e d " ; f u n c t i o n R d ( t ) { r e t u r n ! ! t . i s ( " e l e m e n t " ) & & ! ! t . g e t C u s t o m P r o p e r t y ( " w i d g e t " ) } f u n c t i o n I d ( t , e , n = { } ) { r e t u r n g o . i s E d g e | | e . s e t A t t r i b u t e ( " c o n t e n t e d i t a b l e " , " f a l s e " , t ) , e . a d d C l a s s ( E d , t ) , e . s e t C u s t o m P r o p e r t y ( " w i d g e t " , ! 0 , t ) , t . g e t F i l l e r O f f s e t = N d , n . l a b e l & & f u n c t i o n ( t , e , n ) { n . s e t C u s t o m P r o p e r t y ( " w i d g e t L a b e l " , e , t ) } ( t , n . l a b e l , e ) , n . h a s S e l e c t i o n H a n d l e & & f u n c t i o n ( t , e ) { c o n s t n = e . c r e a t e U I E l e m e n t ( " d i v " , { c l a s s : " c k c k - w i d g e t _ _ s e l e c t i o n - h a n d l e " } , ( f u n c t i o n ( t ) { c o n s t e = t h i s . t o D o m E l e m e n t ( t ) , n = n e w n d ; r e t u r n n . s e t ( " c o n t e n t " , T d ) , n . r e n d e r ( ) , e . a p p e n d C h i l d ( n . e l e m e n t ) , e } ) ) ; e . i n s e r t ( e . c r e a t e P o s i t i o n A t ( t , 0 ) , n ) , e . a d d C l a s s ( [ " c k - w i d g e t _ w i t h - s e l e c t i o n - h a n d l e " ] , t ) } ( t , e ) , f u n c t i o n ( t , e , n , i ) { c o n s t o = n e w x d ; o . o n ( " c h a n g e : t o p " , ( e , o ) = > { o . o l d D e s c r i p t o r & & i ( t , o . o l d D e s c r i p t o r , o . w r i t e r ) , o . n e w D e s c r i p t o r & & n ( t , o . n e w D e s c r i p t o r , o . w r i t e r ) } ) , e . s e t C u s t o m P r o p e r t y ( " a d d H i g h l i g h t " , ( t , e , n ) = > o . a d d ( e , n ) , t ) , e . s e t C u s t o m P r o p e r t y ( " r e m o v e H i g h l i g h t " , ( t , e , n ) = > o . r e m o v e ( e , n ) , t ) } ( t , e , ( t , e , n ) = > n . a d d C l a s s ( i ( e . c l a s s e s ) , t ) , ( t , e , n ) = > n . r e m o v e C l a s s ( i ( e . c l a s s e s ) , t ) ) , t ; f u n c t i o n i ( t ) { r e t u r n A r r a y . i s A r r a y ( t ) ? t : [ t ] } } f u n c t i o n O d ( t ) { c o n s t e = t . g e t C u s t o m P r o p e r t y ( " w i d g e t L a b e l " ) ; r e t u r n e ? " f u n c t i o n " = = t y p e o f e ? e ( ) : e : " " } f u n c t i o n D d ( t , e ) { r e t u r n e . a d d C l a s s ( [ " c k - e d i t o r _ _ e d i t a b l e " , " c k - e d i t o r _ _ n e s t e d - e d i t a b l e " ] , t ) , g o . i s E d g e | | ( e . s e t A t t r i b u t e ( " c o n t e n t e d i t a b l e " , t . i s R e a d O n l y ? " f a l s e " : " t r u e " , t ) , t . o n ( " c h a n g e : i s R e a d O n l y " , ( n , i , o ) = > { e . s e t A t t r i b u t e ( " c o n t e n t e d i t a b l e " , o ? " f a l s e " : " t r u e " , t ) } ) ) , t . o n ( " c h a n g e : i s F o c u s e d " , ( n , i , o ) = > { o ? e . a d d C l a s s ( " c k - e d i t o r _ _ n e s t e d - e d i t a b l e _ f o c u s e d " , t ) : e . r e m o v e C l a s s ( " c k - e d i t o r _ _ n e s t e d - e d i t a b l e _ f o c u s e d " , t ) } ) , t } f u n c t i o n M d ( t , e ) { c o n s t n = t . g e t S e l e c t e d E l e m e n t ( ) ; i f ( n & & e . s c h e m a . i s B l o c k ( n ) ) r e t u r n e . c r e a t e P o s i t i o n A f t e r ( n ) ; c o n s t i = t . g e t S e l e c t e d B l o c k s ( ) . n e x t ( ) . v a l u e ; i f ( i ) { i f ( i . i s E m p t y ) r e t u r n e . c r e a t e P o s i t i o n A t ( i , 0 ) ; c o n s t n = e . c r e a t e P o s i t i o n A f t e r ( i ) ; r e t u r n t . f o c u s . i s T o u c h i n g ( n ) ? n : e . c r e a t e P o s i t i o n B e f o r e ( i ) } r e t u r n t . f o c u s } f u n c t i o n N d ( ) { r e t u r n n u l l } c l a s s V d e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " O P M a c r o T o c " } s t a t i c g e t b u t t o n N a m e ( ) { r e t u r n " i n s e r t T o c " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . m o d e l , n = t . c o n v e r s i o n ; e . s c h e m a . r e g i s t e r ( " o p - m a c r o - t o c " , { a l l o w W h e r e : " $ b l o c k " , i s B l o c k : ! 0 , i s L i m i t : ! 0 } ) , n . f o r ( " u p c a s t " ) . e l e m e n t T o E l e m e n t ( { v i e w : { n a m e : " m a c r o " , c l a s s e s : " t o c " } , m o d e l : " o p - m a c r o - t o c " } ) , n . f o r ( " e d i t i n g D o w n c a s t " ) . e l e m e n t T o E l e m e n t ( { m o d e l : " o p - m a c r o - t o c " , v i e w : ( t , e ) = > I d ( t h i s . c r e a t e T o c V i e w E l e m e n t ( e ) , e , { l a b e l : t h i s . l a b e l } ) } ) , n . f o r ( " d a t a D o w n c a s t " ) . e l e m e n t T o E l e m e n t ( { m o d e l : " o p - m a c r o - t o c " , v i e w : ( t , e ) = > t h i s . c r e a t e T o c D a t a E l e m e n t ( e ) } ) , t . u i . c o m p o n e n t F a c t o r y . a d d ( V d . b u t t o n N a m e , e = > { c o n s t n = n e w o d ( e ) ; r e t u r n n . s e t ( { l a b e l : t h i s . l a b e l , w i t h T e x t : ! 0 } ) , n . o n ( " e x e c u t e " , ( ) = > { t . m o d e l . c h a n g e ( e = > { c o n s t n = e . c r e a t e E l e m e n t ( " o p - m a c r o - t o c " , { } ) ; t . m o d e l . i n s e r t C o n t e n t ( n , t . m o d e l . d o c u m e n t . s e l e c t i o n ) } ) } ) , n } ) } g e t l a b e l ( ) { r e t u r n w i n d o w . I 1 8 n . t ( " j s . e d i t o r . m a c r o . t o c " ) } c r e a t e T o c V i e w E l e m e n t ( t ) { c o n s t e = t . c r e a t e T e x t ( t h i s . l a b e l ) , n = t . c r e a t e C o n t a i n e r E l e m e n t ( " d i v " , { c l a s s : " m a c r o - t o c " } ) ; r e t u r n t . i n s e r t ( t . c r e a t e P o s i t i o n A t ( n , 0 ) , e ) , n } c r e a t e T o c D a t a E l e m e n t ( t ) { r e t u r n t . c r e a t e C o n t a i n e r E l e m e n t ( " m a c r o " , { c l a s s : " t o c " } ) } } c o n s t F d = S y m b o l ( " i s O P E m b e d d e d T a b l e " ) ; f u n c t i o n B d ( t ) { c o n s t e = t . g e t S e l e c t e d E l e m e n t ( ) ; r e t u r n ! ( ! e | | ! f u n c t i o n ( t ) { r e t u r n ! ! t . g e t C u s t o m P r o p e r t y ( F d ) & & R d ( t ) } ( e ) ) } f u n c t i o n L d ( t , e ) { r e t u r n z d ( t ) . s e r v i c e s [ e ] } f u n c t i o n z d ( t ) { r e t u r n _ . g e t ( t . c o n f i g , " _ c o n f i g . o p e n P r o j e c t . p l u g i n C o n t e x t " ) } f u n c t i o n q d ( t ) { r e t u r n _ . g e t ( t . c o n f i g , " _ c o n f i g . o p e n P r o j e c t . c o n t e x t . r e s o u r c e " ) } f u n c t i o n j d ( t , e ) { r e t u r n L d ( t , " p a t h H e l p e r S e r v i c e " ) } c l a s s H d e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " E m b e d d e d T a b l e E d i t i n g " } s t a t i c g e t b u t t o n N a m e ( ) { r e t u r n " i n s e r t E m b e d d e d T a b l e " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . m o d e l , n = t . c o n v e r s i o n , i = z d ( t ) ; t h i s . t e x t = { b u t t o n : w i n d o w . I 1 8 n . t ( " j s . e d i t o r . m a c r o . e m b e d d e d _ t a b l e . b u t t o n " ) , m a c r o _ t e x t : w i n d o w . I 1 8 n . t ( " j s . e d i t o r . m a c r o . e m b e d d e d _ t a b l e . t e x t " ) } , e . s c h e m a . r e g i s t e r ( " o p - m a c r o - e m b e d d e d - t a b l e " , { a l l o w W h e r e : " $ b l o c k " , a l l o w A t t r i b u t e s : [ " o p E m b e d d e d T a b l e Q u e r y " ] , i s B l o c k : ! 0 , i s O b j e c t : ! 0 } ) , n . f o r ( " u p c a s t " ) . e l e m e n t T o E l e m e n t ( { v i e w : { n a m e : " m a c r o " , c l a s s e s : " e m b e d d e d - t a b l e " } , m o d e l : ( t , e ) = > { c o n s t n = t . g e t A t t r i b u t e ( " d a t a - q u e r y - p r o p s " ) ; r e t u r n e . c r e a t e E l e m e n t ( " o p - m a c r o - e m b e d d e d - t a b l e " , { o p E m b e d d e d T a b l e Q u e r y : n ? J S O N . p a r s e ( n ) : { } } ) } } ) , n
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s U d e x t e n d s n s { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . d o m E v e n t T y p e = " m o u s e d o w n " } o n D o m E v e n t ( t ) { t h i s . f i r e ( t . t y p e , t ) } } n ( 5 1 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t $ d = v o ( " C t r l + A " ) ; c l a s s W d e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " W i d g e t " } i n i t ( ) { c o n s t t = t h i s . e d i t o r . e d i t i n g . v i e w , e = t . d o c u m e n t ; t h i s . _ p r e v i o u s l y S e l e c t e d = n e w S e t , t h i s . e d i t o r . e d i t i n g . d o w n c a s t D i s p a t c h e r . o n ( " s e l e c t i o n " , ( t , e , n ) = > { t h i s . _ c l e a r P r e v i o u s l y S e l e c t e d W i d g e t s ( n . w r i t e r ) ; c o n s t i = n . w r i t e r , o = i . d o c u m e n t . s e l e c t i o n , r = o . g e t S e l e c t e d E l e m e n t ( ) ; l e t s = n u l l ; f o r ( c o n s t t o f o . g e t R a n g e s ( ) ) f o r ( c o n s t e o f t ) { c o n s t t = e . i t e m ; R d ( t ) & & ! G d ( t , s ) & & ( i . a d d C l a s s ( S d , t ) , t h i s . _ p r e v i o u s l y S e l e c t e d . a d d ( t ) , s = t , t = = r & & i . s e t S e l e c t i o n ( o . g e t R a n g e s ( ) , { f a k e : ! 0 , l a b e l : O d ( r ) } ) ) } } , { p r i o r i t y : " l o w " } ) , t . a d d O b s e r v e r ( U d ) , t h i s . l i s t e n T o ( e , " m o u s e d o w n " , ( . . . t ) = > t h i s . _ o n M o u s e d o w n ( . . . t ) ) , t h i s . l i s t e n T o ( e , " k e y d o w n " , ( . . . t ) = > t h i s . _ o n K e y d o w n ( . . . t ) , { p r i o r i t y : " h i g h " } ) , t h i s . l i s t e n T o ( e , " d e l e t e " , ( t , e ) = > { t h i s . _ h a n d l e D e l e t e ( " f o r w a r d " = = e . d i r e c t i o n ) & & ( e . p r e v e n t D e f a u l t ( ) , t . s t o p ( ) ) } , { p r i o r i t y : " h i g h " } ) } _ o n M o u s e d o w n ( t , e ) { c o n s t n = t h i s . e d i t o r , i = n . e d i t i n g . v i e w , o = i . d o c u m e n t ; l e t r = e . t a r g e t ; i f ( f u n c t i o n ( t ) { f o r ( ; t ; ) { i f ( t . i s ( " e d i t a b l e E l e m e n t " ) & & ! t . i s ( " r o o t E l e m e n t " ) ) r e t u r n ! 0 ; i f ( R d ( t ) ) r e t u r n ! 1 ; t = t . p a r e n t } r e t u r n ! 1 } ( r ) ) { i f ( g o . i s S a f a r i & & e . d o m E v e n t . d e t a i l > = 3 ) { c o n s t t = n . e d i t i n g . m a p p e r . t o M o d e l E l e m e n t ( r ) ; t h i s . e d i t o r . m o d e l . c h a n g e ( n = > { e . p r e v e n t D e f a u l t ( ) , n . s e t S e l e c t i o n ( t , " i n " ) } ) } r e t u r n } i f ( ! R d ( r ) & & ! ( r = r . f i n d A n c e s t o r ( R d ) ) ) r e t u r n ; e . p r e v e n t D e f a u l t ( ) , o . i s F o c u s e d | | i . f o c u s ( ) ; c o n s t s = n . e d i t i n g . m a p p e r . t o M o d e l E l e m e n t ( r ) ; t h i s . _ s e t S e l e c t i o n O v e r E l e m e n t ( s ) } _ o n K e y d o w n ( t , e ) { c o n s t n = e . k e y C o d e , i = " l t r " = = = t h i s . e d i t o r . l o c a l e . c o n t e n t L a n g u a g e D i r e c t i o n , o = n = = k o . a r r o w d o w n | | n = = k o [ i ? " a r r o w r i g h t " : " a r r o w l e f t " ] ; l e t r = ! 1 ; ! f u n c t i o n ( t ) { r e t u r n t = = k o . a r r o w r i g h t | | t = = k o . a r r o w l e f t | | t = = k o . a r r o w u p | | t = = k o . a r r o w d o w n } ( n ) ? ! f u n c t i o n ( t ) { r e t u r n _ o ( t ) = = $ d } ( e ) ? n = = = k o . e n t e r & & ( r = t h i s . _ h a n d l e E n t e r K e y ( e . s h i f t K e y ) ) : r = t h i s . _ s e l e c t A l l N e s t e d E d i t a b l e C o n t e n t ( ) | | t h i s . _ s e l e c t A l l C o n t e n t ( ) : r = t h i s . _ h a n d l e A r r o w K e y s ( o ) , r & & ( e . p r e v e n t D e f a u l t ( ) , t . s t o p ( ) ) } _ h a n d l e D e l e t e ( t ) { i f ( t h i s . e d i t o r . i s R e a d O n l y ) r e t u r n ; c o n s t e = t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n ; i f ( ! e . i s C o l l a p s e d ) r e t u r n ; c o n s t n = t h i s . _ g e t O b j e c t E l e m e n t N e x t T o S e l e c t i o n ( t ) ; r e t u r n n ? ( t h i s . e d i t o r . m o d e l . c h a n g e ( t = > { l e t i = e . a n c h o r . p a r e n t ; f o r ( ; i . i s E m p t y ; ) { c o n s t e = i ; i = e . p a r e n t , t . r e m o v e ( e ) } t h i s . _ s e t S e l e c t i o n O v e r E l e m e n t ( n ) } ) , ! 0 ) : v o i d 0 } _ h a n d l e A r r o w K e y s ( t ) { c o n s t e = t h i s . e d i t o r . m o d e l , n = e . s c h e m a , i = e . d o c u m e n t . s e l e c t i o n , o = i . g e t S e l e c t e d E l e m e n t ( ) ; i f ( o & & n . i s O b j e c t ( o ) ) { c o n s t o = t ? i . g e t L a s t P o s i t i o n ( ) : i . g e t F i r s t P o s i t i o n ( ) , r = n . g e t N e a r e s t S e l e c t i o n R a n g e ( o , t ? " f o r w a r d " : " b a c k w a r d " ) ; r e t u r n r & & e . c h a n g e ( t = > { t . s e t S e l e c t i o n ( r ) } ) , ! 0 } i f ( ! i . i s C o l l a p s e d ) r e t u r n ; c o n s t r = t h i s . _ g e t O b j e c t E l e m e n t N e x t T o S e l e c t i o n ( t ) ; r e t u r n r & & n . i s O b j e c t ( r ) ? ( t h i s . _ s e t S e l e c t i o n O v e r E l e m e n t ( r ) , ! 0 ) : v o i d 0 } _ h a n d l e E n t e r K e y ( t ) { c o n s t e = t h i s . e d i t o r . m o d e l , n = e . d o c u m e n t . s e l e c t i o n . g e t S e l e c t e d E l e m e n t ( ) ; i f ( i = n , o = e . s c h e m a , i & & o . i s O b j e c t ( i ) & & ! o . i s I n l i n e ( i ) ) r e t u r n e . c h a n g e ( i = > { l e t o = i . c r e a t e P o s i t i o n A t ( n , t ? " b e f o r e " : " a f t e r " ) ; c o n s t r = i . c r e a t e E l e m e n t ( " p a r a g r a p h " ) ; i f ( e . s c h e m a . i s B l o c k ( n . p a r e n t ) ) { c o n s t t = e . s c h e m a . f i n d A l l o w e d P a r e n t ( o , r ) ; o = i . s p l i t ( o , t ) . p o s i t i o n } i . i n s e r t ( r , o ) , i . s e t S e l e c t i o n ( r , " i n " ) } ) , ! 0 ; v a r i , o ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / } _ s e l e c t A l l N e s t e d E d i t a b l e C o n t e n t ( ) { c o n s t t = t h i s . e d i t o r . m o d e l , e = t . d o c u m e n t . s e l e c t i o n , n = t . s c h e m a . g e t L i m i t E l e m e n t ( e ) ; r e t u r n e . g e t F i r s t R a n g e ( ) . r o o t ! = n & & ( t . c h a n g e ( t = > { t . s e t S e l e c t i o n ( t . c r e a t e R a n g e I n ( n ) ) } ) , ! 0 ) } _ s e l e c t A l l C o n t e n t ( ) { c o n s t t = t h i s . e d i t o r . m o d e l , e = t h i s . e d i t o r . e d i t i n g , n = e . v i e w . d o c u m e n t . s e l e c t i o n . g e t S e l e c t e d E l e m e n t ( ) ; i f ( n & & R d ( n ) ) { c o n s t i = e . m a p p e r . t o M o d e l E l e m e n t ( n . p a r e n t ) ; r e t u r n t . c h a n g e ( t = > { t . s e t S e l e c t i o n ( t . c r e a t e R a n g e I n ( i ) ) } ) , ! 0 } r e t u r n ! 1 } _ s e t S e l e c t i o n O v e r E l e m e n t ( t ) { t h i s . e d i t o r . m o d e l . c h a n g e ( e = > { e . s e t S e l e c t i o n ( e . c r e a t e R a n g e O n ( t ) ) } ) } _ g e t O b j e c t E l e m e n t N e x t T o S e l e c t i o n ( t ) { c o n s t e = t h i s . e d i t o r . m o d e l , n = e . s c h e m a , i = e . d o c u m e n t . s e l e c t i o n , o = e . c r e a t e S e l e c t i o n ( i ) ; e . m o d i f y S e l e c t i o n ( o , { d i r e c t i o n : t ? " f o r w a r d " : " b a c k w a r d " } ) ; c o n s t r = t ? o . f o c u s . n o d e B e f o r e : o . f o c u s . n o d e A f t e r ; r e t u r n r & & n . i s O b j e c t ( r ) ? r : n u l l } _ c l e a r P r e v i o u s l y S e l e c t e d W i d g e t s ( t ) { f o r ( c o n s t e o f t h i s . _ p r e v i o u s l y S e l e c t e d ) t . r e m o v e C l a s s ( S d , e ) ; t h i s . _ p r e v i o u s l y S e l e c t e d . c l e a r ( ) } } f u n c t i o n G d ( t , e ) { r e t u r n ! ! e & & A r r a y . f r o m ( t . g e t A n c e s t o r s ( ) ) . i n c l u d e s ( e ) } f u n c t i o n K d ( t ) { r e t u r n e = > e + t } n ( 5 3 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md .
* / c o n s t J d = K d ( " p x " ) , Z d = i r . d o c u m e n t . b o d y ; c l a s s Q d e x t e n d s j l { c o n s t r u c t o r ( t ) { s u p e r ( t ) ; c o n s t e = t h i s . b i n d T e m p l a t e ; t h i s . s e t ( " t o p " , 0 ) , t h i s . s e t ( " l e f t " , 0 ) , t h i s . s e t ( " p o s i t i o n " , " a r r o w _ n w " ) , t h i s . s e t ( " i s V i s i b l e " , ! 1 ) , t h i s . s e t ( " w i t h A r r o w " , ! 0 ) , t h i s . s e t ( " c l a s s " ) , t h i s . c o n t e n t = t h i s . c r e a t e C o l l e c t i o n ( ) , t h i s . s e t T e m p l a t e ( { t a g : " d i v " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - b a l l o o n - p a n e l " , e . t o ( " p o s i t i o n " , t = > ` c k - b a l l o o n - p a n e l _ $ { t } ` ) , e . i f ( " i s V i s i b l e " , " c k - b a l l o o n - p a n e l _ v i s i b l e " ) , e . i f ( " w i t h A r r o w " , " c k - b a l l o o n - p a n e l _ w i t h - a r r o w " ) , e . t o ( " c l a s s " ) ] , s t y l e : { t o p : e . t o ( " t o p " , J d ) , l e f t : e . t o ( " l e f t " , J d ) } } , c h i l d r e n : t h i s . c o n t e n t } ) } s h o w ( ) { t h i s . i s V i s i b l e = ! 0 } h i d e ( ) { t h i s . i s V i s i b l e = ! 1 } a t t a c h T o ( t ) { t h i s . s h o w ( ) ; c o n s t e = Q d . d e f a u l t P o s i t i o n s , n = O b j e c t . a s s i g n ( { } , { e l e m e n t : t h i s . e l e m e n t , p o s i t i o n s : [ e . s o u t h A r r o w N o r t h , e . s o u t h A r r o w N o r t h W e s t , e . s o u t h A r r o w N o r t h E a s t , e . n o r t h A r r o w S o u t h , e . n o r t h A r r o w S o u t h W e s t , e . n o r t h A r r o w S o u t h E a s t ] , l i m i t e r : Z d , f i t I n V i e w p o r t : ! 0 } , t ) , i = Q d . _ g e t O p t i m a l P o s i t i o n ( n ) , o = p a r s e I n t ( i . l e f t ) , r = p a r s e I n t ( i . t o p ) , s = i . n a m e ; O b j e c t . a s s i g n ( t h i s , { t o p : r , l e f t : o , p o s i t i o n : s } ) } p i n ( t ) { t h i s . u n p i n ( ) , t h i s . _ p i n W h e n I s V i s i b l e C a l l b a c k = ( ) = > { t h i s . i s V i s i b l e ? t h i s . _ s t a r t P i n n i n g ( t ) : t h i s . _ s t o p P i n n i n g ( ) } , t h i s . _ s t a r t P i n n i n g ( t ) , t h i s . l i s t e n T o ( t h i s , " c h a n g e : i s V i s i b l e " , t h i s . _ p i n W h e n I s V i s i b l e C a l l b a c k ) } u n p i n ( ) { t h i s . _ p i n W h e n I s V i s i b l e C a l l b a c k & & ( t h i s . _ s t o p P i n n i n g ( ) , t h i s . s t o p L i s t e n i n g ( t h i s , " c h a n g e : i s V i s i b l e " , t h i s . _ p i n W h e n I s V i s i b l e C a l l b a c k ) , t h i s . _ p i n W h e n I s V i s i b l e C a l l b a c k = n u l l , t h i s . h i d e ( ) ) } _ s t a r t P i n n i n g ( t ) { t h i s . a t t a c h T o ( t ) ; c o n s t e = Y d ( t . t a r g e t ) , n = t . l i m i t e r ? Y d ( t . l i m i t e r ) : Z d ; t h i s . l i s t e n T o ( i r . d o c u m e n t , " s c r o l l " , ( i , o ) = > { c o n s t r = o . t a r g e t , s = e & & r . c o n t a i n s ( e ) , a = n & & r . c o n t a i n s ( n ) ; ! s & & ! a & & e & & n | | t h i s . a t t a c h T o ( t ) } , { u s e C a p t u r e : ! 0 } ) , t h i s . l i s t e n T o ( i r . w i n d o w , " r e s i z e " , ( ) = > { t h i s . a t t a c h T o ( t ) } ) } _ s t o p P i n n i n g ( ) { t h i s . s t o p L i s t e n i n g ( i r . d o c u m e n t , " s c r o l l " ) , t h i s . s t o p L i s t e n i n g ( i r . w i n d o w , " r e s i z e " ) } } f u n c t i o n Y d ( t ) { r e t u r n G n ( t ) ? t : x s ( t ) ? t . c o m m o n A n c e s t o r C o n t a i n e r : " f u n c t i o n " = = t y p e o f t ? Y d ( t ( ) ) : n u l l } f u n c t i o n X d ( t , e ) { r e t u r n t . t o p - e . h e i g h t - Q d . a r r o w V e r t i c a l O f f s e t } f u n c t i o n t u ( t ) { r e t u r n t . b o t t o m + Q d . a r r o w V e r t i c a l O f f s e t } Q d . a r r o w H o r i z o n t a l O f f s e t = 2 5 , Q d . a r r o w V e r t i c a l O f f s e t = 1 0 , Q d . _ g e t O p t i m a l P o s i t i o n = Y l , Q d . d e f a u l t P o s i t i o n s = { n o r t h A r r o w S o u t h : ( t , e ) = > ( { t o p : X d ( t , e ) , l e f t : t . l e f t + t . w i d t h / 2 - e . w i d t h / 2 , n a m e : " a r r o w _ s " } ) , n o r t h A r r o w S o u t h E a s t : ( t , e ) = > ( { t o p : X d ( t , e ) , l e f t : t . l e f t + t . w i d t h / 2 - e . w i d t h + Q d . a r r o w H o r i z o n t a l O f f s e t , n a m e : " a r r o w _ s e " } ) , n o r t h A r r o w S o u t h W e s t : ( t , e ) = > ( { t o p : X d ( t , e ) , l e f t : t . l e f t + t . w i d t h / 2 - Q d . a r r o w H o r i z o n t a l O f f s e t , n a m e : " a r r o w _ s w " } ) , n o r t h W e s t A r r o w S o u t h : ( t , e ) = > ( { t o p : X d ( t , e ) , l e f t : t . l e f t - e . w i d t h / 2 , n a m e : " a r r o w _ s " } ) , n o r t h W e s t A r r o w S o u t h W e s t : ( t , e ) = > ( { t o p : X d ( t , e ) , l e f t : t . l e f t - Q d . a r r o w H o r i z o n t a l O f f s e t , n a m e : " a r r o w _ s w " } ) , n o r t h W e s t A r r o w S o u t h E a s t : ( t , e ) = > ( { t o p : X d ( t , e ) , l e f t : t . l e f t - e . w i d t h + Q d . a r r o w H o r i z o n t a l O f f s e t , n a m e : " a r r o w _ s e " } ) , n o r t h E a s t A r r o w S o u t h : ( t , e ) = > ( { t o p : X d ( t , e ) , l e f t : t . r i g h t - e . w i d t h / 2 , n a m e : " a r r o w _ s " } ) , n o r t h E a s t A r r o w S o u t h E a s t : ( t , e ) = > ( { t o p : X d ( t , e ) , l e f t : t . r i g h t - e . w i d t h + Q d . a r r o w H o r i z o n t a l O f f s e t , n a m e : " a r r o w _ s e " } ) , n o r t h E a s t A r r o w S o u t h W e s t : ( t , e ) = > ( { t o p : X d ( t , e ) , l e f t : t . r i g h t - Q d . a r r o w H o r i z o n t a l O f f s e t , n a m e : " a r r o w _ s w " } ) , s o u t h A r r o w N o r t h : ( t , e ) = > ( { t o p : t u ( t ) , l e f t : t . l e f t + t . w i d t h / 2 - e . w i d t h / 2 , n a m e : " a r r o w _ n " } ) , s o u t h A r r o w N o r t h E a s t : ( t , e ) = > ( { t o p : t u ( t ) , l e f t : t . l e f t + t . w i d t h / 2 - e . w i d t h + Q d . a r r o w H o r i z o n t a l O f f s e t , n a m e : " a r r o w _ n e " } ) , s o u t h A r r o w N o r t h W e s t : ( t , e ) = > ( { t o p : t u ( t ) , l e f t : t . l e f t + t . w i d t h / 2 - Q d . a r r o w H o r i z o n t a l O f f s e t , n a m e : " a r r o w _ n w " } ) , s o u t h W e s t A r r o w N o r t h : ( t , e ) = > ( { t o p : t u ( t ) , l e f t : t . l e f t - e . w i d t h / 2 , n a m e : " a r r o w _ n " } ) , s o u t h W e s t A r r o w N o r t h W e s t : ( t , e ) = > ( { t o p : t u ( t ) , l e f t : t . l e f t - Q d . a r r o w H o r i z o n t a l O f f s e t , n a m e : " a r r o w _ n w " } ) , s o u t h W e s t A r r o w N o r t h E a s t : ( t , e ) = > ( { t o p : t u ( t ) , l e f t : t . l e f t - e . w i d t h + Q d . a r r o w H o r i z o n t a l O f f s e t , n a m e : " a r r o w _ n e " } ) , s o u t h E a s t A r r o w N o r t h : ( t , e ) = > ( { t o p : t u ( t ) , l e f t : t . r i g h t - e . w i d t h / 2 , n a m e : " a r r o w _ n " } ) , s o u t h E a s t A r r o w N o r t h E a s t : ( t , e ) = > ( { t o p : t u ( t ) , l e f t : t . r i g h t - e . w i d t h + Q d . a r r o w H o r i z o n t a l O f f s e t , n a m e : " a r r o w _ n e " } ) , s o u t h E a s t A r r o w N o r t h W e s t : ( t , e ) = > ( { t o p : t u ( t ) , l e f t : t . r i g h t - Q d . a r r o w H o r i z o n t a l O f f s e t , n a m e : " a r r o w _ n w " } ) } ; v a r e u = ' < s v g v i e w B o x = " 0 0 2 0 2 0 " x m l n s = " h t t p : / / w w w . w 3 . o r g / 2 0 0 0 / s v g " > < p a t h d = " M 1 1 . 4 6 3 5 . 1 8 7 a . 8 8 8 . 8 8 8 0 1 1 1 . 2 5 4 1 . 2 5 5 L 9 . 1 6 1 0 l 3 . 5 5 7 3 . 5 5 7 a . 8 8 8 . 8 8 8 0 1 1 - 1 . 2 5 4 1 . 2 5 5 L 7 . 2 6 1 0 . 6 1 a . 8 8 8 . 8 8 8 0 0 1 . 1 6 - 1 . 3 8 2 l 4 . 0 4 3 - 4 . 0 4 2 z " / > < / s v g > \ n ' , n u = ' < s v g v i e w B o
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const iu = Kd ( "px" ) ; class ou extends yd { static get pluginName ( ) { return "ContextualBalloon" } constructor ( t ) { super ( t ) , this . positionLimiter = ( ) => { const t = this . editor . editing . view , e = t . document . selection . editableElement ; return e ? t . domConverter . mapViewToDom ( e . root ) : null } , this . set ( "visibleView" , null ) , this . view = new Qd ( t . locale ) , t . ui . view . body . add ( this . view ) , t . ui . focusTracker . add ( this . view . element ) , this . _viewToStack = new Map , this . _idToStack = new Map , this . set ( "_numberOfStacks" , 0 ) , this . set ( "_singleViewMode" , ! 1 ) , this . _rotatorView = this . _createRotatorView ( ) , this . _fakePanelsView = this . _createFakePanelsView ( ) } hasView ( t ) { return Array . from ( this . _viewToStack . keys ( ) ) . includes ( t ) } add ( t ) { if ( this . hasView ( t . view ) ) throw new Zn . b ( "contextualballoon-add-view-exist: Cannot add configuration of the same view twice." , [ this , t ] ) ; const e = t . stackId || "main" ; if ( ! this . _idToStack . has ( e ) ) return this . _idToStack . set ( e , new Map ( [ [ t . view , t ] ] ) ) , this . _viewToStack . set ( t . view , this . _idToStack . get ( e ) ) , this . _numberOfStacks = this . _idToStack . size , void ( this . _visibleStack && ! t . singleViewMode || this . showStack ( e ) ) ; const n = this . _idToStack . get ( e ) ; t . singleViewMode && this . showStack ( e ) , n . set ( t . view , t ) , this . _viewToStack . set ( t . view , n ) , n === this . _visibleStack && this . _showView ( t ) } remove ( t ) { if ( ! this . hasView ( t ) ) throw new Zn . b ( "contextualballoon-remove-view-not-exist: Cannot remove the configuration of a non-existent view." , [ this , t ] ) ; const e = this . _viewToStack . get ( t ) ; this . _singleViewMode && this . visibleView === t && ( this . _singleViewMode = ! 1 ) , this . visibleView === t && ( 1 === e . size ? this . _idToStack . size > 1 ? this . _showNextStack ( ) : ( this . view . hide ( ) , this . visibleView = null , this . _rotatorView . hideView ( ) ) : this . _showView ( Array . from ( e . values ( ) ) [ e . size - 2 ] ) ) , 1 === e . size ? ( this . _idToStack . delete ( this . _getStackId ( e ) ) , this . _numberOfStacks = this . _idToStack . size ) : e . delete ( t ) , this . _viewToStack . delete ( t ) } updatePosition ( t ) { t && ( this . _visibleStack . get ( this . visibleView ) . position = t ) , this . view . pin ( this . _getBalloonPosition ( ) ) , this . _fakePanelsView . updatePosition ( ) } showStack ( t ) { this . visibleStack = t ; const e = this . _idToStack . get ( t ) ; if ( ! e ) throw new Zn . b ( "contextualballoon-showstack-stack-not-exist: Cannot show a stack that does not exist." , this ) ; this . _visibleStack !== e && this . _showView ( Array . from ( e . values ( ) ) . pop ( ) ) } get _visibleStack ( ) { return this . _viewToStack . get ( this . visibleView ) } _getStackId ( t ) { return Array . from ( this . _idToStack . entries ( ) ) . find ( e => e [ 1 ] === t ) [ 0 ] } _showNextStack ( ) { const t = Array . from ( this . _idToStack . values ( ) ) ; let e = t . indexOf ( this . _visibleStack ) + 1 ; t [ e ] || ( e = 0 ) , this . showStack ( this . _getStackId ( t [ e ] ) ) } _showPrevStack ( ) { const t = Array . from ( this . _idToStack . values ( ) ) ; let e = t . indexOf ( this . _visibleStack ) - 1 ; t [ e ] || ( e = t . length - 1 ) , this . showStack ( this . _getStackId ( t [ e ] ) ) } _createRotatorView ( ) { const t = new ru ( this . editor . locale ) , e = this . editor . locale . t ; return this . view . content . add ( t ) , t . bind ( "isNavigationVisible" ) . to ( this , "_numberOfStacks" , this , "_singleViewMode" , ( t , e ) => ! e && t > 1 ) , t . on ( "change:isNavigationVisible" , ( ) => this . updatePosition ( ) , { priority : "low" } ) , t . bind ( "counter" ) . to ( this , "visibleView" , this , "_numberOfStacks" , ( t , n ) => { if ( n < 2 ) return "" ; const i = Array . from ( this . _idToStack . values ( ) ) . indexOf ( this . _visibleStack ) + 1 ; return e ( "ar" , [ i , n ] ) } ) , t . buttonNextView . on ( "execute" , ( ) => { t . focusTracker . isFocused && this . editor . editing . view . focus ( ) , this . _showNextStack ( ) } ) , t . buttonPrevView . on ( "execute" , ( ) => { t . focusTracker . isFocused && this . editor . editing . view . focus ( ) , this . _showPrevStack ( ) } ) , t } _createFakePanelsView ( ) { const t = new su ( this . editor . locale , this . view ) ; return t . bind ( "numberOfPanels" ) . to ( this , "_numberOfStacks" , this , "_singleViewMode" , ( t , e ) => { return ! e && t >= 2 ? Math . min ( t - 1 , 2 ) : 0 } ) , t . listenTo ( this . view , "change:top" , ( ) => t . updatePosition ( ) ) , t . listenTo ( this . view , "change:left" , ( ) => t . updatePosition ( ) ) , this . editor . ui . view . body . add ( t ) , t } _showView ( { view : t , balloonClassName : e = "" , withArrow : n = ! 0 , singleViewMode : i = ! 1 } ) { this . view . class = e , this . view . withArrow = n , this . _rotatorView . showView ( t ) , this . visibleView = t , this . view . pin ( this . _getBalloonPosition ( ) ) , this . _fakePanelsView . updatePosition ( ) , i && ( this . _singleViewMode = ! 0 ) } _getBalloonPosition ( ) { let t = Array . from ( this . _visibleStack . values ( ) ) . pop ( ) . position ; return t
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class bu extends yd { static get pluginName ( ) { return "PendingActions" } init ( ) { this . set ( "hasAny" , ! 1 ) , this . _actions = new so ( { idProperty : "_id" } ) , this . _actions . delegate ( "add" , "remove" ) . to ( this ) } add ( t ) { if ( "string" != typeof t ) throw new Zn . b ( "pendingactions-add-invalid-message: The message must be a string." , this ) ; const e = Object . create ( Hi ) ; return e . set ( "message" , t ) , this . _actions . add ( e ) , this . hasAny = ! 0 , e } remove ( t ) { this . _actions . remove ( t ) , this . hasAny = ! ! this . _actions . length } get first ( ) { return this . _actions . get ( 0 ) } [ Symbol . iterator ] ( ) { return this . _actions [ Symbol . iterator ] ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s w u { c o n s t r u c t o r ( ) { c o n s t t = n e w w i n d o w . F i l e R e a d e r ; t h i s . _ r e a d e r = t , t h i s . _ d a t a = v o i d 0 , t h i s . s e t ( " l o a d e d " , 0 ) , t . o n p r o g r e s s = t = > { t h i s . l o a d e d = t . l o a d e d } } g e t e r r o r ( ) { r e t u r n t h i s . _ r e a d e r . e r r o r } g e t d a t a ( ) { r e t u r n t h i s . _ d a t a } r e a d ( t ) { c o n s t e = t h i s . _ r e a d e r ; r e t u r n t h i s . t o t a l = t . s i z e , n e w P r o m i s e ( ( n , i ) = > { e . o n l o a d = ( ) = > { c o n s t t = e . r e s u l t ; t h i s . _ d a t a = t , n ( t ) } , e . o n e r r o r = ( ) = > { i ( " e r r o r " ) } , e . o n a b o r t = ( ) = > { i ( " a b o r t e d " ) } , t h i s . _ r e a d e r . r e a d A s D a t a U R L ( t ) } ) } a b o r t ( ) { t h i s . _ r e a d e r . a b o r t ( ) } } d i ( w u , H i ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class ku extends yd { static get pluginName ( ) { return "FileRepository" } static get requires ( ) { return [ bu ] } init ( ) { this . loaders = new so , this . loaders . on ( "add" , ( ) => this . _updatePendingAction ( ) ) , this . loaders . on ( "remove" , ( ) => this . _updatePendingAction ( ) ) , this . _loadersMap = new Map , this . _pendingAction = null , this . set ( "uploaded" , 0 ) , this . set ( "uploadTotal" , null ) , this . bind ( "uploadedPercent" ) . to ( this , "uploaded" , this , "uploadTotal" , ( t , e ) => e ? t / e * 100 : 0 ) } getLoader ( t ) { return this . _loadersMap . get ( t ) || null } createLoader ( t ) { if ( ! this . createUploadAdapter ) return console . warn ( Object ( Zn . a ) ( "filerepository-no-upload-adapter: Upload adapter is not defined." ) ) , null ; const e = new _u ( Promise . resolve ( t ) , this . createUploadAdapter ) ; return this . loaders . add ( e ) , this . _loadersMap . set ( t , e ) , t instanceof Promise && e . file . then ( t => { this . _loadersMap . set ( t , e ) } ) . catch ( ( ) => { } ) , e . on ( "change:uploaded" , ( ) => { let t = 0 ; for ( const e of this . loaders ) t += e . uploaded ; this . uploaded = t } ) , e . on ( "change:uploadTotal" , ( ) => { let t = 0 ; for ( const e of this . loaders ) e . uploadTotal && ( t += e . uploadTotal ) ; this . uploadTotal = t } ) , e } destroyLoader ( t ) { const e = t instanceof _u ? t : this . getLoader ( t ) ; e . _destroy ( ) , this . loaders . remove ( e ) , this . _loadersMap . forEach ( ( t , n ) => { t === e && this . _loadersMap . delete ( n ) } ) } _updatePendingAction ( ) { const t = this . editor . plugins . get ( bu ) ; if ( this . loaders . length ) { if ( ! this . _pendingAction ) { const e = this . editor . t , n = t => ` ${ e ( "i" ) } ${ parseInt ( t ) } %. ` ; this . _pendingAction = t . add ( n ( this . uploadedPercent ) ) , this . _pendingAction . bind ( "message" ) . to ( this , "uploadedPercent" , n ) } } else t . remove ( this . _pendingAction ) , this . _pendingAction = null } } di ( ku , Hi ) ; class _u { constructor ( t , e ) { this . id = Xn ( ) , this . _filePromiseWrapper = this . _createFilePromiseWrapper ( t ) , this . _adapter = e ( this ) , this . _reader = new wu , this . set ( "status" , "idle" ) , this . set ( "uploaded" , 0 ) , this . set ( "uploadTotal" , null ) , this . bind ( "uploadedPercent" ) . to ( this , "uploaded" , this , "uploadTotal" , ( t , e ) => e ? t / e * 100 : 0 ) , this . set ( "uploadResponse" , null ) } get file ( ) { return this . _filePromiseWrapper ? this . _filePromiseWrapper . promise . then ( t => this . _filePromiseWrapper ? t : null ) : Promise . resolve ( null ) } get data ( ) { return this . _reader . data } read ( ) { if ( "idle" != this . status ) throw new Zn . b ( "filerepository-read-wrong-status: You cannot call read if the status is different than idle." , this ) ; return this . status = "reading" , this . file . then ( t => this . _reader . read ( t ) ) . then ( t => { if ( "reading" !== this . status ) throw this . status ; return this . status = "idle" , t } ) . catch ( t => { if ( "aborted" === t ) throw this . status = "aborted" , "aborted" ; throw this . status = "error" , this . _reader . error ? this . _reader . error : t } ) } upload ( ) { if ( "idle" != this . status ) throw new Zn . b ( "filerepository-upload-wrong-status: You cannot call upload if the status is different than idle." , this ) ; return this . status = "uploading" , this . file . then ( ( ) => this . _adapter . upload ( ) ) . then ( t => ( this . uploadResponse = t , this . status = "idle" , t ) ) . catch ( t => { if ( "aborted" === this . status ) throw "aborted" ; throw this . status = "error" , t } ) } abort ( ) { const t = this . status ; this . status = "aborted" , this . _filePromiseWrapper . isFulfilled ? "reading" == t ? this . _reader . abort ( ) : "uploading" == t && this . _adapter . abort && this . _adapter . abort ( ) : ( this . _filePromiseWrapper . promise . catch ( ( ) => { } ) , this . _filePromiseWrapper . rejecter ( "aborted" ) ) , this . _destroy ( ) } _destroy ( ) { this . _filePromiseWrapper = void 0 , this . _reader = void 0 , this . _adapter = void 0 , this . uploadResponse = void 0 } _createFilePromiseWrapper ( t ) { const e = { } ; return e . promise = new Promise ( ( n , i ) => { e . rejecter = i , e . isFulfilled = ! 1 , t . then ( t => { e . isFulfilled = ! 0 , n ( t ) } ) . catch ( t => { e . isFulfilled = ! 0 , i ( t ) } ) } ) , e } } di ( _u , Hi ) ; class vu { constructor ( t , e , n ) { this . loader = t , this . resource = e , this . editor = n } upload ( ) { const t = this . resource ; if ( ! t || ! t . uploadAttachments ) { const e = t ? t . name : "Missing context" ; return console . warn ( ` uploadAttachments not present on context: ${ e } ` ) , Promise . reject ( "You're not allowed to upload attachments on this resource." ) } return this . loader . file . then ( e => t . uploadAttachments ( [ e ] ) . then ( t => ( this . editor . model . fire ( "op:attachment-added" , t ) , this . buildResponse ( t [ 0 ] ) ) ) . catch ( t => { console . error ( "Failed upload %O" , t ) } ) ) } buildResponse ( t ) { return { default : t . uploadUrl } } abort ( ) { return ! 1 } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /class yu extends jl{constructor(t){super(t),this.buttonView=new od(t),this._fileInputView=new xu(t),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",()=>{this._fileInputView.open()})}focus(){this.buttonView.focus()}}class xu extends jl{constructor(t){super(t),this.set("acceptedType"),this.set("allowMultipleFiles",!1);const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:e.to("acceptedType"),multiple:e.to("allowMultipleFiles")},on:{change:e.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}var Cu='<svg viewBox="0 0 20 20" xmlns="http:/ / www . w3 . org / 2000 / svg "><path d=" M6 . 91 10.54 c . 26 - . 23.64 - . 21.88 . 03 l3 . 36 3.14 2.23 - 2.06 a . 64.64 0 0 1 . 87 0 l2 . 52 2.97 V4 . 5 H3 . 2 v10 . 12 l3 . 71 - 4.08 zm10 . 27 - 7.51 c . 6 0 1.09 . 47 1.09 1.05 v11 . 84 c0 . 59 - . 49 1.06 - 1.09 1.06 H2 . 79 c - . 6 0 - 1.09 - . 47 - 1.09 - 1.06 V4 . 08 c0 - . 58.49 - 1.05 1.1 - 1.05 h14 . 38 zm - 5.22 5.56 a1 . 96 1.96 0 1 1 3.4 - 1.96 1.96 1.96 0 0 1 - 3.4 1.96 z " / > < / s v g > ' ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /function Au(t){const e=t.map(t=>t.replace("+","\\+"));return new RegExp(`^image\\/ ( $ { e . join ( "|" ) } ) $ ` )}function Pu(t){return new Promise((e,n)=>{const i=t.getAttribute("src");fetch(i).then(t=>t.blob()).then(t=>{const o=function(t,e){return t.type?t.type:e.match(/data:(image \/ \w +);base64/)?e.match(/data:(image \/ \w +);base64/)[1].toLowerCase():"image/jpeg"}(t,i),r=function(t,e,n){try{return new File([t],e,{type:n})}catch(t){return null}}
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /(t,`image.${o.replace("image/ "," ")}`,o);r?e(r):n()}).catch(n)})}class Tu extends yd{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(" imageUpload ",n=>{const i=new yu(n),o=t.commands.get(" imageUpload "),r=t.config.get(" image . upload . types "),s=Au(r);return i.set({acceptedType:r.map(t=>`image/${t}`).join(" , "),allowMultipleFiles:!0}),i.buttonView.set({label:e(" bh "),icon:Cu,tooltip:!0}),i.buttonView.bind(" isEnabled ").to(o),i.on(" done ",(e,n)=>{const i=Array.from(n).filter(t=>s.test(t.type));i.length&&t.execute(" imageUpload ",{file:i})}),i})}}var Eu='<svg xmlns=" http : //www.w3.org/2000/svg" viewBox="0 0 700 250"><rect rx="4"/></svg>';n(59),n(61),n(63);
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Su extends yd { constructor ( t ) { super ( t ) , this . placeholder = "data:image/svg+xml;utf8," + encodeURIComponent ( Eu ) } init ( ) { this . editor . editing . downcastDispatcher . on ( "attribute:uploadStatus:image" , ( ... t ) => this . uploadStatusChange ( ... t ) ) } uploadStatusChange ( t , e , n ) { const i = this . editor , o = e . item , r = o . getAttribute ( "uploadId" ) ; if ( ! n . consumable . consume ( e . item , t . name ) ) return ; const s = i . plugins . get ( ku ) , a = r ? e . attributeNewValue : null , c = this . placeholder , l = i . editing . mapper . toViewElement ( o ) , d = n . writer ; if ( "reading" == a ) return Ru ( l , d ) , void Iu ( c , l , d ) ; if ( "uploading" == a ) { const t = s . loaders . get ( r ) ; return Ru ( l , d ) , void ( t ? ( Ou ( l , d ) , function ( t , e , n , i ) { const o = function ( t ) { const e = t . createUIElement ( "div" , { class : "ck-progress-bar" } ) ; return t . setCustomProperty ( "progressBar" , ! 0 , e ) , e } ( e ) ; e . insert ( e . createPositionAt ( t , "end" ) , o ) , n . on ( "change:uploadedPercent" , ( t , e , n ) => { i . change ( t => { t . setStyle ( "width" , n + "%" , o ) } ) } ) } ( l , d , t , i . editing . view ) , function ( t , e , n ) { if ( n . data ) { const i = t . getChild ( 0 ) ; e . setAttribute ( "src" , n . data , i ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( l , d , t ) ) : I u ( c , l , d ) ) } " c o m p l e t e " = = a & & s . l o a d e r s . g e t ( r ) & & ! g o . i s E d g e & & f u n c t i o n ( t , e , n ) { c o n s t i = e . c r e a t e U I E l e m e n t ( " d i v " , { c l a s s : " c k - i m a g e - u p l o a d - c o m p l e t e - i c o n " } ) ; e . i n s e r t ( e . c r e a t e P o s i t i o n A t ( t , " e n d " ) , i ) , s e t T i m e o u t ( ( ) = > { n . c h a n g e ( t = > t . r e m o v e ( t . c r e a t e R a n g e O n ( i ) ) ) } , 3 e 3 ) } ( l , d , i . e d i t i n g . v i e w ) , f u n c t i o n ( t , e ) { M u ( t , e , " p r o g r e s s B a r " ) } ( l , d ) , O u ( l , d ) , f u n c t i o n ( t , e ) { e . r e m o v e C l a s s ( " c k - a p p e a r " , t ) } ( l , d ) } } f u n c t i o n R u ( t , e ) { t . h a s C l a s s ( " c k - a p p e a r " ) | | e . a d d C l a s s ( " c k - a p p e a r " , t ) } f u n c t i o n I u ( t , e , n ) { e . h a s C l a s s ( " c k - i m a g e - u p l o a d - p l a c e h o l d e r " ) | | n . a d d C l a s s ( " c k - i m a g e - u p l o a d - p l a c e h o l d e r " , e ) ; c o n s t i = e . g e t C h i l d ( 0 ) ; i . g e t A t t r i b u t e ( " s r c " ) ! = = t & & n . s e t A t t r i b u t e ( " s r c " , t , i ) , D u ( e , " p l a c e h o l d e r " ) | | n . i n s e r t ( n . c r e a t e P o s i t i o n A f t e r ( i ) , f u n c t i o n ( t ) { c o n s t e = t . c r e a t e U I E l e m e n t ( " d i v " , { c l a s s : " c k - u p l o a d - p l a c e h o l d e r - l o a d e r " } ) ; r e t u r n t . s e t C u s t o m P r o p e r t y ( " p l a c e h o l d e r " , ! 0 , e ) , e } ( n ) ) } f u n c t i o n O u ( t , e ) { t . h a s C l a s s ( " c k - i m a g e - u p l o a d - p l a c e h o l d e r " ) & & e . r e m o v e C l a s s ( " c k - i m a g e - u p l o a d - p l a c e h o l d e r " , t ) , M u ( t , e , " p l a c e h o l d e r " ) } f u n c t i o n D u ( t , e ) { f o r ( c o n s t n o f t . g e t C h i l d r e n ( ) ) i f ( n . g e t C u s t o m P r o p e r t y ( e ) ) r e t u r n n } f u n c t i o n M u ( t , e , n ) { c o n s t i = D u ( t , n ) ; i & & e . r e m o v e ( e . c r e a t e R a n g e O n ( i ) ) } c l a s s N u e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " N o t i f i c a t i o n " } i n i t ( ) { t h i s . o n ( " s h o w : w a r n i n g " , ( t , e ) = > { w i n d o w . a l e r t ( e . m e s s a g e ) } , { p r i o r i t y : " l o w e s t " } ) } s h o w S u c c e s s ( t , e = { } ) { t h i s . _ s h o w N o t i f i c a t i o n ( { m e s s a g e : t , t y p e : " s u c c e s s " , n a m e s p a c e : e . n a m e s p a c e , t i t l e : e . t i t l e } ) } s h o w I n f o ( t , e = { } ) { t h i s . _ s h o w N o t i f i c a t i o n ( { m e s s a g e : t , t y p e : " i n f o " , n a m e s p a c e : e . n a m e s p a c e , t i t l e : e . t i t l e } ) } s h o w W a r n i n g ( t , e = { } ) { t h i s . _ s h o w N o t i f i c a t i o n ( { m e s s a g e : t , t y p e : " w a r n i n g " , n a m e s p a c e : e . n a m e s p a c e , t i t l e : e . t i t l e } ) } _ s h o w N o t i f i c a t i o n ( t ) { c o n s t e = ` s h o w : $ { t . t y p e } ` + ( t . n a m e s p a c e ? ` : $ { t . n a m e s p a c e } ` : " " ) ; t h i s . f i r e ( e , { m e s s a g e : t . m e s s a g e , t y p e : t . t y p e , t i t l e : t . t i t l e | | " " } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s V u { c o n s t r u c t o r ( t ) { t h i s . f i l e s = f u n c t i o n ( t ) { c o n s t e = t . f i l e s ? A r r a y . f r o m ( t . f i l e s ) : [ ] , n = t . i t e m s ? A r r a y . f r o m ( t . i t e m s ) : [ ] ; i f ( e . l e n g t h ) r e t u r n e ; r e t u r n n . f i l t e r ( t = > " f i l e " = = = t . k i n d ) . m a p ( t = > t . g e t A s F i l e ( ) ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( t ) , t h i s . _ n a t i v e = t } g e t t y p e s ( ) { r e t u r n t h i s . _ n a t i v e . t y p e s } g e t D a t a ( t ) { r e t u r n t h i s . _ n a t i v e . g e t D a t a ( t ) } s e t D a t a ( t , e ) { t h i s . _ n a t i v e . s e t D a t a ( t , e ) } } c l a s s F u e x t e n d s n s { c o n s t r u c t o r ( t ) { s u p e r ( t ) ; c o n s t e = t h i s . d o c u m e n t ; f u n c t i o n n ( t , n ) { n . p r e v e n t D e f a u l t ( ) ; c o n s t i = n . d r o p R a n g e ? [ n . d r o p R a n g e ] : A r r a y . f r o m ( e . s e l e c t i o n . g e t R a n g e s ( ) ) , o = n e w Y n ( e , " c l i p b o a r d I n p u t " ) ; e . f i r e ( o , { d a t a T r a n s f e r : n . d a t a T r a n s f e r , t a r g e t R a n g e s : i } ) , o . s t o p . c a l l e d & & n . s t o p P r o p a g a t i o n ( ) } t h i s . d o m E v e n t T y p e = [ " p a s t e " , " c o p y " , " c u t " , " d r o p " , " d r a g o v e r " ] , t h i s . l i s t e n T o ( e , " p a s t e " , n , { p r i o r i t y : " l o w " } ) , t h i s . l i s t e n T o ( e , " d r o p " , n , { p r i o r i t y : " l o w " } ) } o n D o m E v e n t ( t ) { c o n s t e = { d a t a T r a n s f e r : n e w V u ( t . c l i p b o a r d D a t a ? t . c l i p b o a r d D a t a : t . d a t a T r a n s f e r ) } ; " d r o p " = = t . t y p e & & ( e . d r o p R a n g e = f u n c t i o n ( t , e ) { c o n s t n = e . t a r g e t . o w n e r D o c u m e n t , i = e . c l i e n t X , o = e . c l i e n t Y ; l e t r ; n . c a r e t R a n g e F r o m P o i n t & & n . c a r e t R a n g e F r o m P o i n t ( i , o ) ? r = n . c a r e t R a n g e F r o m P o i n t ( i , o ) : e . r a n g e P a r e n t & & ( ( r = n . c r e a t e R a n g e ( ) ) . s e t S t a r t ( e . r a n g e P a r e n t , e . r a n g e O f f s e t ) , r . c o l l a p s e ( ! 0 ) ) ; r e t u r n r ? t . d o m C o n v e r t e r . d o m R a n g e T o V i e w ( r ) : t . d o c u m e n t . s e l e c t i o n . g e t F i r s t R a n g e ( ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( t h i s . v i e w , t ) ) , t h i s . f i r e ( t . t y p e , t , e ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const Bu = [ "figcaption" , "li" ] ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Lu extends yd { static get pluginName ( ) { return "Clipboard" } init ( ) { const t = this . editor , e = t . model . document , n = t . editing . view , i = n . document ; function o ( n , o ) { const r = o . dataTransfer ; o . preventDefault ( ) ; const s = t . data . toView ( t . model . getSelectedContent ( e . selection ) ) ; i . fire ( "clipboardOutput" , { dataTransfer : r , content : s , method : n . name } ) } this . _htmlDataProcessor = new dl , n . addObserver ( Fu ) , this . listenTo ( i , "clipboardInput" , e => { t . isReadOnly && e . stop ( ) } , { priority : "highest" } ) , this . listenTo ( i , "clipboardInput" , ( t , e ) => { const i = e . dataTransfer ; let o = "" ; i . getData ( "text/html" ) ? o =
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function ( t ) { return t . replace ( /<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g , ( t , e ) => 1 == e . length ? " " : e ) } ( i . getData ( "text/html" ) ) : i . getData ( "text/plain" ) && ( o = function ( t ) { return ( t = t . replace ( /</g , "<" ) . replace ( />/g , ">" ) . replace ( /\n/g , "</p><p>" ) . replace ( /^\s/ , " " ) . replace ( /\s$/ , " " ) . replace ( /\s\s/g , " " ) ) . indexOf ( "</p><p>" ) > - 1 && ( t = ` <p> ${ t } </p> ` ) , t } ( i . getData ( "text/plain" ) ) ) , o = this . _htmlDataProcessor . toView ( o ) , this . fire ( "inputTransformation" , { content : o , dataTransfer : i } ) , n . scrollToTheSelection ( ) } , { priority : "low" } ) , this . listenTo ( this , "inputTransformation" , ( t , e ) => { if ( ! e . content . isEmpty ) { const t = this . editor . data , n = this . editor . model , i = t . toModel ( e . content , "$clipboardHolder" ) ; if ( 0 == i . childCount ) return ; n . insertContent ( i ) } } , { priority : "low" } ) , this . listenTo ( i , "copy" , o , { priority : "low" } ) , this . listenTo ( i , "cut" , ( e , n ) => { t . isReadOnly ? n . preventDefault ( ) : o ( e , n ) } , { priority : "low" } ) , this . listenTo ( i , "clipboardOutput" , ( n , i ) => { i . content . isEmpty || ( i . dataTransfer . setData ( "text/html" , this . _htmlDataProcessor . toData ( i . content ) ) , i . dataTransfer . setData ( "text/plain" , function t ( e ) { let n = "" ; if ( e . is ( "text" ) || e . is ( "textProxy" ) ) n = e . data ; else if ( e . is ( "img" ) && e . hasAttribute ( "alt" ) ) n = e . getAttribute ( "alt" ) ; else { let i = null ; for ( const o of e . getChildren ( ) ) { const e = t ( o ) ; i && ( i . is ( "containerElement" ) || o . is ( "containerElement" ) ) && ( Bu . includes ( i . name ) || Bu . includes ( o . name ) ? n += "\n" : n += "\n\n" ) , n += e , i = o } } return n } ( i . content ) ) ) , "cut" == i . method && t . model . deleteContent ( e . selection ) } , { priority : "low" } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s z u { c r e a t e D o c u m e n t F r a g m e n t ( t ) { r e t u r n n e w P o ( t ) } c r e a t e E l e m e n t ( t , e , n ) { r e t u r n n e w v i ( t , e , n ) } c r e a t e T e x t ( t ) { r e t u r n n e w m i ( t ) } c l o n e ( t , e = ! 1 ) { r e t u r n t . _ c l o n e ( e ) } a p p e n d C h i l d ( t , e ) { r e t u r n e . _ a p p e n d C h i l d ( t ) } i n s e r t C h i l d ( t , e , n ) { r e t u r n n . _ i n s e r t C h i l d ( t , e ) } r e m o v e C h i l d r e n ( t , e , n ) { r e t u r n n . _ r e m o v e C h i l d r e n ( t , e ) } r e m o v e ( t ) { c o n s t e = t . p a r e n t ; r e t u r n e ? t h i s . r e m o v e C h i l d r e n ( e . g e t C h i l d I n d e x ( t ) , 1 , e ) : [ ] } r e p l a c e ( t , e ) { c o n s t n = t . p a r e n t ; i f ( n ) { c o n s t i = n . g e t C h i l d I n d e x ( t ) ; r e t u r n t h i s . r e m o v e C h i l d r e n ( i , 1 , n ) , t h i s . i n s e r t C h i l d ( i , e , n ) , ! 0 } r e t u r n ! 1 } u n w r a p E l e m e n t ( t ) { c o n s t e = t . p a r e n t ; i f ( e ) { c o n s t n = e . g e t C h i l d I n d e x ( t ) ; t h i s . r e m o v e ( t ) , t h i s . i n s e r t C h i l d ( n , t . g e t C h i l d r e n ( ) , e ) } } r e n a m e ( t , e ) { c o n s t n = n e w v i ( t , e . g e t A t t r i b u t e s ( ) , e . g e t C h i l d r e n ( ) ) ; r e t u r n t h i s . r e p l a c e ( e , n ) ? n : n u l l } s e t A t t r i b u t e ( t , e , n ) { n . _ s e t A t t r i b u t e ( t , e ) } r e m o v e A t t r i b u t e ( t , e ) { e . _ r e m o v e A t t r i b u t e ( t ) } a d d C l a s s ( t , e ) { e . _ a d d C l a s s ( t ) } r e m o v e C l a s s ( t , e ) { e . _ r e m o v e C l a s s ( t ) } s e t S t y l e ( t , e , n ) { P ( t ) & & v o i d 0 = = = n & & ( n = e ) , n . _ s e t S t y l e ( t , e ) } r e m o v e S t y l e ( t , e ) { e . _ r e m o v e S t y l e ( t ) } s e t C u s t o m P r o p e r t y ( t , e , n ) { n . _ s e t C u s t o m P r o p e r t y ( t , e ) } r e m o v e C u s t o m P r o p e r t y ( t , e ) { r e t u r n e . _ r e m o v e C u s t o m P r o p e r t y ( t ) } c r e a t e P o s i t i o n A t ( t , e ) { r e t u r n t o . _ c r e a t e A t ( t , e ) } c r e a t e P o s i t i o n A f t e r ( t ) { r e t u r n t o . _ c r e a t e A f t e r ( t ) } c r e a t e P o s i t i o n B e f o r e ( t ) { r e t u r n t o . _ c r e a t e B e f o r e ( t ) } c r e a t e R a n g e ( t , e ) { r e t u r n n e w e o ( t , e ) } c r e a t e R a n g e O n ( t ) { r e t u r n e o . _ c r e a t e O n ( t ) } c r e a t e R a n g e I n ( t ) { r e t u r n e o . _ c r e a t e I n ( t ) } c r e a t e S e l e c t i o n ( t , e , n ) { r e t u r n n e w o o ( t , e , n ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s q u { c o n s t r u c t o r ( t ) { t h i s . e d i t o r = t , t h i s . s e t ( " v a l u e " , v o i d 0 ) , t h i s . s e t ( " i s E n a b l e d " , ! 1 ) , t h i s . _ d i s a b l e S t a c k = n e w S e t , t h i s . d e c o r a t e ( " e x e c u t e " ) , t h i s . l i s t e n T o ( t h i s . e d i t o r . m o d e l . d o c u m e n t , " c h a n g e " , ( ) = > { t h i s . r e f r e s h ( ) } ) , t h i s . o n ( " e x e c u t e " , t = > { t h i s . i s E n a b l e d | | t . s t o p ( ) } , { p r i o r i t y : " h i g h " } ) , t h i s . l i s t e n T o ( t , " c h a n g e : i s R e a d O n l y " , ( t , e , n ) = > { n ? t h i s . f o r c e D i s a b l e d ( " r e a d O n l y M o d e " ) : t h i s . c l e a r F o r c e D i s a b l e d ( " r e a d O n l y M o d e " ) } ) } r e f r e s h ( ) { t h i s . i s E n a b l e d = ! 0 } f o r c e D i s a b l e d ( t ) { t h i s . _ d i s a b l e S t a c k . a d d ( t ) , 1 = = t h i s . _ d i s a b l e S t a c k . s i z e & & ( t h i s . o n ( " s e t : i s E n a b l e d " , j u , { p r i o r i t y : " h i g h e s t " } ) , t h i s . i s E n a b l e d = ! 1 ) } c l e a r F o r c e D i s a b l e d ( t ) { t h i s . _ d i s a b l e S t a c k . d e l e t e ( t ) , 0 = = t h i s . _ d i s a b l e S t a c k . s i z e & & ( t h i s . o f f ( " s e t : i s E n a b l e d " , j u ) , t h i s . r e f r e s h ( ) ) } e x e c u t e ( ) { } d e s t r o y ( ) { t h i s . s t o p L i s t e n i n g ( ) } } f u n c t i o n j u ( t ) { t . r e t u r n = ! 1 , t . s t o p ( ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n H u ( t ) { c o n s t e = t . g e t S e l e c t e d E l e m e n t ( ) ; r e t u r n e & & f u n c t i o n ( t ) { r e t u r n ! ! t . g e t C u s t o m P r o p e r t y ( " i m a g e " ) & & R d ( t ) } ( e ) ? e : n u l l } f u n c t i o n U u ( t ) { r e t u r n ! ! t & & t . i s ( " i m a g e " ) } f u n c t i o n $ u ( t , e , n = { } ) { c o n s t i = t . c r e a t e E l e m e n t ( " i m a g e " , n ) , o = M d ( e . d o c u m e n t . s e l e c t i o n , e ) ; e . i n s e r t C o n t e n t ( i , o ) , i . p a r e n t & & t . s e t S e l e c t i o n ( i , " o n " ) } f u n c t i o n W u ( t ) { c o n s t e = t . s c h e m a , n = t . d o c u m e n t . s e l e c t i o n ; r e t u r n f u n c t i o n ( t , e , n ) { c o n s t i = f u n c t i o n ( t , e ) { c o n s t n = M d ( t , e ) . p a r e n t ; i f ( n . i s E m p t y & & ! n . i s ( " $ r o o t " ) ) r e t u r n n . p a r e n t ; r e t u r n n }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( t , n ) ; r e t u r n e . c h e c k C h i l d ( i , " i m a g e " ) } ( n , e , t ) & & ! f u n c t i o n ( t , e ) { c o n s t n = t . g e t S e l e c t e d E l e m e n t ( ) ; r e t u r n n & & e . i s O b j e c t ( n ) } ( n , e ) & & f u n c t i o n ( t ) { r e t u r n [ . . . t . f o c u s . g e t A n c e s t o r s ( ) ] . e v e r y ( t = > ! t . i s ( " i m a g e " ) ) } ( n ) } d i ( q u , H i ) ; c l a s s G u e x t e n d s q u { r e f r e s h ( ) { t h i s . i s E n a b l e d = W u ( t h i s . e d i t o r . m o d e l ) } e x e c u t e ( t ) { c o n s t e = t h i s . e d i t o r , n = e . m o d e l , i = e . p l u g i n s . g e t ( k u ) ; n . c h a n g e ( e = > { c o n s t o = A r r a y . i s A r r a y ( t . f i l e ) ? t . f i l e : [ t . f i l e ] ; f o r ( c o n s t t o f o ) K u ( e , n , i , t ) } ) } } f u n c t i o n K u ( t , e , n , i ) { c o n s t o = n . c r e a t e L o a d e r ( i ) ; o & & $ u ( t , e , { u p l o a d I d : o . i d } ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s J u e x t e n d s y d { s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ k u , N u , L u ] } s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " I m a g e U p l o a d E d i t i n g " } c o n s t r u c t o r ( t ) { s u p e r ( t ) , t . c o n f i g . d e f i n e ( " i m a g e " , { u p l o a d : { t y p e s : [ " j p e g " , " p n g " , " g i f " , " b m p " , " w e b p " , " t i f f " ] } } ) } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . m o d e l . d o c u m e n t , n = t . m o d e l . s c h e m a , i = t . c o n v e r s i o n , o = t . p l u g i n s . g e t ( k u ) , r = A u ( t . c o n f i g . g e t ( " i m a g e . u p l o a d . t y p e s " ) ) ; n . e x t e n d ( " i m a g e " , { a l l o w A t t r i b u t e s : [ " u p l o a d I d " , " u p l o a d S t a t u s " ] } ) , t . c o m m a n d s . a d d ( " i m a g e U p l o a d " , n e w G u ( t ) ) , i . f o r ( " u p c a s t " ) . a t t r i b u t e T o A t t r i b u t e ( { v i e w : { n a m e : " i m g " , k e y : " u p l o a d I d " } , m o d e l : " u p l o a d I d " } ) , t h i s . l i s t e n T o ( t . e d i t i n g . v i e w . d o c u m e n t , " c l i p b o a r d I n p u t " , ( e , n ) = > { i f ( f u n c t i o n ( t ) { r e t u r n A r r a y . f r o m ( t . t y p e s ) . i n c l u d e s ( " t e x t / h t m l " ) & & " " ! = = t . g e t D a t a ( " t e x t / h t m l " ) } ( n . d a t a T r a n s f e r ) ) r e t u r n ; c o n s t i = A r r a y . f r o m ( n . d a t a T r a n s f e r . f i l e s ) . f i l t e r ( t = > ! ! t & & r . t e s t ( t . t y p e ) ) , o = n . t a r g e t R a n g e s . m a p ( e = > t . e d i t i n g . m a p p e r . t o M o d e l R a n g e ( e ) ) ; t . m o d e l . c h a n g e ( n = > { n . s e t S e l e c t i o n ( o ) , i . l e n g t h & & ( e . s t o p ( ) , t . m o d e l . e n q u e u e C h a n g e ( " d e f a u l t " , ( ) = > { t . e x e c u t e ( " i m a g e U p l o a d " , { f i l e : i } ) } ) ) } ) } ) , t h i s . l i s t e n T o ( t . p l u g i n s . g e t ( L u ) , " i n p u t T r a n s f o r m a t i o n " , ( e , n ) = > { c o n s t i = A r r a y . f r o m ( t . e d i t i n g . v i e w . c r e a t e R a n g e I n ( n . c o n t e n t ) ) . f i l t e r ( t = > ( f u n c t i o n ( t ) { r e t u r n ! ( ! t . i s ( " e l e m e n t " , " i m g " ) | | ! t . g e t A t t r i b u t e ( " s r c " ) ) & & ( t . g e t A t t r i b u t e ( " s r c " ) . m a t c h ( / ^ d a t a : i m a g e \ / \ w + ; b a s e 6 4 , / g ) | | t . g e t A t t r i b u t e ( " s r c " ) . m a t c h ( / ^ b l o b : / g ) ) } ) ( t . i t e m ) & & ! t . i t e m . g e t A t t r i b u t e ( " u p l o a d P r o c e s s e d " ) ) . m a p ( t = > ( { p r o m i s e : P u ( t . i t e m ) , i m a g e E l e m e n t : t . i t e m } ) ) ; i f ( ! i . l e n g t h ) r e t u r n ; c o n s t r = n e w z u ; f o r ( c o n s t t o f i ) { r . s e t A t t r i b u t e ( " u p l o a d P r o c e s s e d " , ! 0 , t . i m a g e E l e m e n t ) ; c o n s t e = o . c r e a t e L o a d e r ( t . p r o m i s e ) ; e & & ( r . s e t A t t r i b u t e ( " s r c " , " " , t . i m a g e E l e m e n t ) , r . s e t A t t r i b u t e ( " u p l o a d I d " , e . i d , t . i m a g e E l e m e n t ) ) } } ) , t . e d i t i n g . v i e w . d o c u m e n t . o n ( " d r a g o v e r " , ( t , e ) = > { e . p r e v e n t D e f a u l t ( ) } ) , e . o n ( " c h a n g e " , ( ) = > { c o n s t n = e . d i f f e r . g e t C h a n g e s ( { i n c l u d e C h a n g e s I n G r a v e y a r d : ! 0 } ) ; f o r ( c o n s t e o f n ) i f ( " i n s e r t " = = e . t y p e & & " $ t e x t " ! = e . n a m e ) { c o n s t n = e . p o s i t i o n . n o d e A f t e r , i = " $ g r a v e y a r d " = = e . p o s i t i o n . r o o t . r o o t N a m e ; f o r ( c o n s t e o f Z u ( t , n ) ) { c o n s t t = e . g e t A t t r i b u t e ( " u p l o a d I d " ) ; i f ( ! t ) c o n t i n u e ; c o n s t n = o . l o a d e r s . g e t ( t ) ; n & & ( i ? n . a b o r t ( ) : " i d l e " = = n . s t a t u s & & t h i s . _ r e a d A n d U p l o a d ( n , e ) ) } } } ) } _ r e a d A n d U p l o a d ( t , e ) { c o n s t n = t h i s . e d i t o r , i = n . m o d e l , o = n . l o c a l e . t , r = n . p l u g i n s . g e t ( k u ) , s = n . p l u g i n s . g e t ( N u ) ; r e t u r n i . e n q u e u e C h a n g e ( " t r a n s p a r e n t " , t = > { t . s e t A t t r i b u t e ( " u p l o a d S t a t u s " , " r e a d i n g " , e ) } ) , t . r e a d ( ) . t h e n ( ( ) = > { c o n s t o = t . u p l o a d ( ) ; i f ( g o . i s S a f a r i ) { c o n s t t = n . e d i t i n g . m a p p e r . t o V i e w E l e m e n t ( e ) . g e t C h i l d ( 0 ) ; n . e d i t i n g . v i e w . o n c e ( " r e n d e r " , ( ) = > { i f ( ! t . p a r e n t ) r e t u r n ; c o n s t e = n . e d i t i n g . v i e w . d o m C o n v e r t e r . m a p V i e w T o D o m ( t . p a r e n t ) ; i f ( ! e ) r e t u r n ; c o n s t i = e . s t y l e . d i s p l a y ; e . s t y l e . d i s p l a y = " n o n e " , e . _ c k H a c k = e . o f f s e t H e i g h t , e . s t y l e . d i s p l a y = i } ) } r e t u r n i . e n q u e u e C h a n g e ( " t r a n s p a r e n t " , t = > { t . s e t A t t r i b u t e ( " u p l o a d S t a t u s " , " u p l o a d i n g " , e ) } ) , o } ) . t h e n ( t = > { i . e n q u e u e C h a n g e ( " t r a n s p a r e n t " , n = > { n . s e t A t t r i b u t e s ( { u p l o a d S t a t u s : " c o m p l e t e " , s r c : t . d e f a u l t } , e ) , t h i s . _ p a r s e A n d S e t S r c s e t A t t r i b u t e O n I m a g e ( t , e , n ) } ) , a ( ) } ) . c a t c h ( n = > { i f ( " e r r o r " ! = = t . s t a t u s & & " a b o r t e d " ! = = t . s t a t u s ) t h r o w n ; " e r r o r " = = t . s t a t u s & & n & & s . s h o w W a r n i n g ( n , { t i t l e : o ( " a q " ) , n a m e s p a c e : " u p l o a d " } ) , a ( ) , i . e n q u e u e C h a n g e ( " t r a n s p a r e n t " , t = > { t . r e m o v e ( e ) } ) } ) ; f u n c t i o n a ( ) { i . e n q u e u e C h a n g e ( " t r a n s p a r e n t " , t = > { t . r e m o v e A t t r i b u t e ( " u p l o a d I d " , e ) , t . r e m o v e A t t r i b u t e ( " u p l o a d S t a t u s " , e ) } ) , r . d e s t r o y L o a d e r ( t ) } } _ p a r s e A n d S e t S r c s e t A t t r i b u t e O n I m a g e ( t , e , n ) { l e t i = 0 ; c o n s t o = O b j e c t . k e y s ( t ) . f i l t e r ( t = > { c o n s t e = p a r s e I n t ( t , 1 0 ) ; i f ( ! i s N a N ( e ) ) r e t u r n i = M a t h . m a x ( i , e ) , ! 0 } ) . m a p ( e = > ` $ { t [ e ] } $ { e } w ` ) . j o i n ( " , " ) ; " " ! = o & & n . s e t A t t r i b u t e ( " s r c s e t " , { d a t a : o , w i d t h : i } , e ) } } f u n c t i o n Z u ( t , e ) { r e t u r n A r r a y . f r o m ( t . m o d e l . c r e a t e R a n g e O n ( e ) ) . f i l t e r ( t = > t . i t e m . i s ( " i m a g e " ) ) . m a p ( t = > t . i t e m ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s Q u e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " I m a g e U p l o a d " } s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ J u , T u , S u ] } } c o n s t Y u = S y m b o l ( " i s W p B u t t o n M a c r o S y m b o l " ) ; f u n c t i o n X u ( t ) { c o n s t e = t . g e t S e l e c t e d E l e m e n t ( ) ; r e t u r n ! ( ! e | | ! f u n c t i o n ( t ) { r e t u r n ! ! t . g e t C u s t o m P r o p e r t y ( Y u ) & & R d ( t ) } ( e ) ) } c l a s s t h e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " O P C h i l d P a g e s E d i t i n g " } s t a t i c g e t b u t t o n N a m e ( ) { r e t u r n " i n s e r t C h i l d P a g e s " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . m o d e l , n = t . c o n v e r s i o n ; e . s c h e m a . r e g i s t e r ( " o p - m a c r o - c h i l d - p a g e s " , { a l l o w W h e r e : [ " $ b l o c k " ] , a l l o w A t t r i b u t e s : [ " p a g e " ] , i s B l o c k : ! 0 , i s L i m i t : ! 0 } ) , n . f o r ( " u p c a s t " ) . e l e m e n t T o E l e m e n t ( { v i e w : { n a m e : " m a c r o " , c l a s s e s : " c h i l d _ p a g e s " } , m o d e l : ( t , e ) = > { c o n s t n = t . g e t A t t r i b u t e ( " d a t a - p a g e " ) | | " " , i = " t r u e " = = t . g e t A t t r i b u t e ( " d a t a - i n c l u d e - p a r e n t " ) ; r e t u r n e . c r e a t e E l e m e n t ( " o p - m a c r o - c h i l d - p a g e s " , { p a g e : n , i n c l u d e P a r e n t : i } ) } } ) , n . f o r ( " e d i t i n g D o w n c a s t " ) . e l e m e n t T o E l e m e n t ( { m o d e l : " o p - m a c r o - c h i l d - p a g e s " , v i e w : ( t , e ) = > t h i s . c r e a t e M a c r o V i e w E l e m e n t ( t , e ) } ) . a d d ( t = > t . o n ( " a t t r i b u t e : p a g e " , t h i s . m o d e l A t t r i b u t e T o V i e w . b i n d ( t h i s ) ) ) . a d d ( t = > t . o n ( " a t t r i b u t e : i n c l u d e P a r e n t " , t h i s . m o d e l A t t r i b u t e T o V i e w . b i n d ( t h i s ) ) ) , n . f o r ( " d a t a D o w n c a s t " ) . e l e m e n t T o E l e m e n t ( { m o d e l : " o p - m a c r o - c h i l d - p a g e s " , v i e w : ( t , e ) = > { r e t u r n e . c r e a t e C o n t a i n e r E l e m e n t ( " m a c r o " , { c l a s s : " c h i l d _ p a g e s " , " d a t a - p a g e " : t . g e t A t t r i b u t e ( " p a g e " ) | | " " , " d a t a - i n c l u d e - p a r e n t " : t . g e t A t t r i b u t e ( " i n c l u d e P a r e n t " ) | | " " } ) } } ) , t . u i . c o m p o n e n t F a c t o r y . a d d ( t h . b u t t o n N a m e , e = > { c o n s t n = n e w o d ( e ) ; r e t u r n n . s e t ( { l a b e l : w i n d o w . I 1 8 n . t ( " j s . e d i t o r . m a c r o . c h i l d _ p a g e s . b u t t o n " ) , w i t h T e x t : ! 0 } ) , n . o n ( " e x e c u t e " , ( ) = > { t . m o d e l . c h a n g e ( e = > { c o n s t n = e . c r e a t e E l e m e n t ( " o p - m a c r o - c h i l d - p a g e s " , { } ) ; t . m o d e l . i n s e r t C o n t e n t ( n , t . m o d e l . d o c u m e n t . s e l e c t i o n ) } ) } ) , n } ) } m o d e l A t t r i b u t e T o V i e w ( t , e , n ) { c o n s t i = e . i t e m ; i f ( ! i . i s ( " o p - m a c r o - c h i l d - p a g e s " ) ) r e t u r n ; n . c o n s u m a b l e . c o n s u m e ( e . i t e m , t . n a m e ) ; c o n s t o = n . m a p p e r . t o V i e w E l e m e n t ( i ) ; n . w r i t e r . r e m o v e ( n . w r i t e r . c r e a t e R a n g e I n ( o ) ) , t h i s . s e t P l a c e h o l d e r C o n t e n t ( n . w r i t e r , i , o ) } m a c r o L a b e l ( ) { r e t u r n w i n d o w . I 1 8 n . t ( " j s . e d i t o r . m a c r o . c h i l d _ p a g e s . t e x t " ) } p a g e L a b e l ( t ) { r e t u r n t & & t . l e n g t h > 0 ? t : w i n d o w . I 1 8 n . t ( " j s . e d i t o r . m a c r o . c h i l d _ p a g e s . t h i s _ p a g e " ) } i n c l u d e P a r e n t T e x t ( t ) { r e t u r n t ? ` ( $ { w i n d o w . I 1 8 n . t ( " j s . e d i t o r . m a c r o . c h i l d _ p a g e s . i n c l u d e _ p a r e n t " ) } ) ` : " " } c r e a t e M a c r o V i e w E l e m e n t ( t , e ) { c o n s t n = e . c r e a t e C o n t a i n e r E l e m e n t ( " d i v " , { c l a s s : " m a c r o - c h i l d _ p a g e s " } ) ; r e t u r n t h i s . s e t P l a c e h o l d e r C o n t e n t ( e , t , n ) , f u n c t i o n ( t , e , n ) { r e t u r n e . s e t C u s t o m P r o p e r t y ( Y u , ! 0 , t ) , I d ( t , e , { l a b e l : n } ) } ( n , e , { l a b e l : t h i s . m a c r o L a b e l ( ) } ) } s e t P l a c e h o l d e r C o n t e n t ( t , e , n ) { c o n s t i = e . g e t A t t r i b u t e ( " p a g e " ) , o = e . g e t A t t r i b u t e ( " i n c l u d e P a r e n t " ) , r = t h i s . m a c r o L a b e l ( ) , s = t h i s . p a g e L a b e l ( i ) , a = t . c r e a t e C o n t a i n e r E l e m e n t ( " s p a n " , { c l a s s : " m a c r o - v a l u e " } ) ; l e t c = [ t . c r e a t e T e x t ( ` $ { r } ` ) ] ; t . i n s e r t ( t . c r e a t e P o s i t i o n A t ( a , 0 ) , t . c r e a t e T e x t ( ` $ { s } ` ) ) , c . p u s h ( a ) , c . p u s h ( t . c r e a t e T e x t ( t h i s . i n c l u d e P a r e n t T e x t ( o ) ) ) , t . i n s e r t ( t . c r e a t e P o s i t i o n A t ( n , 0 ) , c ) } } c l a s s e h e x t e n d s y d { s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ o u ] } s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " O P C h i l d P a g e s T o o l b a r " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t h i s . e d i t o r . m o d e l , n = z d ( t ) ; c u ( t , " o p E d i t C h i l d P a g e s M a c r o B u t t o n " , t = > { c o n s t i = n . s e r v i c e s . m a c r o s , o = t . g e t A t t r i b u t e ( " p a g e " ) , r = t . g e t A t t r i b u t e ( " i n c l u d e P a r e n t " ) , s = o & & o . l e n g t h > 0 ? o : " " ; i . c o n f i g u r e C h i l d P a g e s ( s , r ) . t h e n ( n = > e . c h a n g e ( e = > { e . s e t A t t r i b u t e ( " p a g e " , n . p a g e , t ) , e . s e t A t t r i b u t e ( " i n c l u d e P a r e n t " , n . i n c l u d e P a r e n t , t ) } ) ) } ) } a f t e r I n i t ( ) { d u ( t h i s , t h i s . e d i t o r , " O P C h i l d P a g e s " , X u ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function * nh ( t , e ) { for ( const n of e ) n && t . getAttributeProperties ( n [ 0 ] ) . copyOnEnter && ( yield n ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s i h e x t e n d s q u { e x e c u t e ( ) { c o n s t t = t h i s . e d i t o r . m o d e l , e = t . d o c u m e n t ; t . c h a n g e ( n = > { ! f u n c t i o n ( t , e , n , i ) { c o n s t o = n . i s C o l l a p s e d , r = n . g e t F i r s t R a n g e ( ) , s = r . s t a r t . p a r e n t , a = r . e n d . p a r e n t ; i f ( i . i s L i m i t ( s ) | | i . i s L i m i t ( a ) ) r e t u r n v o i d ( o | | s ! = a | | t . d e l e t e C o n t e n t ( n ) ) ; i f ( o ) { c o n s t t = n h ( e . m o d e l . s c h e m a , n . g e t A t t r i b u t e s ( ) ) ; o h ( e , r . s t a r t ) , e . s e t S e l e c t i o n A t t r i b u t e ( t ) } e l s e { c o n s t i = ! ( r . s t a r t . i s A t S t a r t & & r . e n d . i s A t E n d ) , o = s = = a ; t . d e l e t e C o n t e n t ( n , { l e a v e U n m e r g e d : i } ) , i & & ( o ? o h ( e , n . f o c u s ) : e . s e t S e l e c t i o n ( a , 0 ) ) } } ( t h i s . e d i t o r . m o d e l , n , e . s e l e c t i o n , t . s c h e m a ) , t h i s . f i r e ( " a f t e r E x e c u t e " , { w r i t e r : n } ) } ) } } f u n c t i o n o h ( t , e ) { t . s p l i t ( e ) , t . s e t S e l e c t i o n ( e . p a r e n t . n e x t S i b l i n g , 0 ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s r h e x t e n d s p r { c o n s t r u c t o r ( t ) { s u p e r ( t ) ; c o n s t e = t h i s . d o c u m e n t ; e . o n ( " k e y d o w n " , ( t , n ) = > { i f ( t h i s . i s E n a b l e d & & n . k e y C o d e = = k o . e n t e r ) { l e t i ; e . o n c e ( " e n t e r " , t = > i = t , { p r i o r i t y : " h i g h e s t " } ) , e . f i r e ( " e n t e r " , n e w e s ( e , n . d o m E v e n t , { i s S o f t : n . s h i f t K e y } ) ) , i & & i . s t o p . c a l l e d & & t . s t o p ( ) } } ) } o b s e r v e ( ) { } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s s h e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " E n t e r " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . e d i t i n g . v i e w , n = e . d o c u m e n t ; e . a d d O b s e r v e r ( r h ) , t . c o m m a n d s . a d d ( " e n t e r " , n e w i h ( t ) ) , t h i s . l i s t e n T o ( n , " e n t e r " , ( n , i ) = > { i . p r e v e n t D e f a u l t ( ) , i . i s S o f t | | ( t . e x e c u t e ( " e n t e r " ) , e . s c r o l l T o T h e S e l e c t i o n ( ) ) } , { p r i o r i t y : " l o w " } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s a h e x t e n d s q u { e x e c u t e ( ) { c o n s t t = t h i s . e d i t o r . m o d e l , e = t . d o c u m e n t ; t . c h a n g e ( n = > { ! f u n c t i o n ( t , e , n ) { c o n s t i = n . i s C o l l a p s e d , o = n . g e t F i r s t R a n g e ( ) , r = o . s t a r t . p a r e n t , s = o . e n d . p a r e n t , a = r = = s ; i f ( i ) { c o n s t i = n h ( t . s c h e m a , n . g e t A t t r i b u t e s ( ) ) ; c h ( e , o . e n d ) , e . r e m o v e S e l e c t i o n A t t r i b u t e ( n . g e t A t t r i b u t e K e y s ( ) ) , e . s e t S e l e c t i o n A t t r i b u t e ( i ) } e l s e { c o n s t i = ! ( o . s t a r t . i s A t S t a r t & & o . e n d . i s A t E n d ) ; t . d e l e t e C o n t e n t ( n , { l e a v e U n m e r g e d : i } ) , a ? c h ( e , n . f o c u s ) : i & & e . s e t S e l e c t i o n ( s , 0 ) } } ( t , n , e . s e l e c t i o n ) , t h i s . f i r e ( " a f t e r E x e c u t e " , { w r i t e r : n } ) } ) } r e f r e s h ( ) { c o n s t t = t h i s . e d i t o r . m o d e l , e = t . d o c u m e n t ; t h i s . i s E n a b l e d = f u n c t i o n ( t , e ) { i f ( e . r a n g e C o u n t > 1 ) r e t u r n ! 1 ; c o n s t n = e . a n c h o r ; i f ( ! n | | ! t . c h e c k C h i l d ( n , " s o f t B r e a k " ) ) r e t u r n ! 1 ; c o n s t i = e . g e t F i r s t R a n g e ( ) , o = i . s t a r t . p a r e n t , r = i . e n d . p a r e n t ; i f ( ( l h ( o , t ) | | l h ( r , t ) ) & & o ! = = r ) r e t u r n ! 1 ; r e t u r n ! 0 } ( t . s c h e m a , e . s e l e c t i o n ) } } f u n c t i o n c h ( t , e ) { c o n s t n = t . c r e a t e E l e m e n t ( " s o f t B r e a k " ) ; t . i n s e r t ( n , e ) , t . s e t S e l e c t i o n ( n , " a f t e r " ) } f u n c t i o n l h ( t , e ) { r e t u r n ! t . i s ( " r o o t E l e m e n t " ) & & ( e . i s L i m i t ( t ) | | l h ( t . p a r e n t , e ) ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s d h e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " S h i f t E n t e r " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . m o d e l . s c h e m a , n = t . c o n v e r s i o n , i = t . e d i t i n g . v i e w , o = i . d o c u m e n t ; e . r e g i s t e r ( " s o f t B r e a k " , { a l l o w W h e r e : " $ t e x t " , i s I n l i n e : ! 0 } ) , n . f o r ( " u p c a s t " ) . e l e m e n t T o E l e m e n t ( { m o d e l : " s o f t B r e a k " , v i e w : " b r " } ) , n . f o r ( " d o w n c a s t " ) . e l e m e n t T o E l e m e n t ( { m o d e l : " s o f t B r e a k " , v i e w : ( t , e ) = > e . c r e a t e E m p t y E l e m e n t ( " b r " ) } ) , i . a d d O b s e r v e r ( r h ) , t . c o m m a n d s . a d d ( " s h i f t E n t e r " , n e w a h ( t ) ) , t h i s . l i s t e n T o ( o , " e n t e r " , ( e , n ) = > { n . p r e v e n t D e f a u l t ( ) , n . i s S o f t & & ( t . e x e c u t e ( " s h i f t E n t e r " ) , i . s c r o l l T o T h e S e l e c t i o n ( ) ) } , { p r i o r i t y : " l o w " } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s u h { c o n s t r u c t o r ( t , e = 2 0 ) { t h i s . m o d e l = t , t h i s . s i z e = 0 , t h i s . l i m i t = e , t h i s . i s L o c k e d = ! 1 , t h i s . _ c h a n g e C a l l b a c k = ( t , e ) = > { " t r a n s p a r e n t " ! = e . t y p e & & e ! = = t h i s . _ b a t c h & & t h i s . _ r e s e t ( ! 0 ) } , t h i s . _ s e l e c t i o n C h a n g e C a l l b a c k = ( ) = > { t h i s . _ r e s e t ( ) } , t h i s . m o d e l . d o c u m e n t . o n ( " c h a n g e " , t h i s . _ c h a n g e C a l l b a c k ) , t h i s . m o d e l . d o c u m e n t . s e l e c t i o n . o n ( " c h a n g e : r a n g e " , t h i s . _ s e l e c t i o n C h a n g e C a l l b a c k ) , t h i s . m o d e l . d o c u m e n t . s e l e c t i o n . o n ( " c h a n g e : a t t r i b u t e " , t h i s . _ s e l e c t i o n C h a n g e C a l l b a c k ) } g e t b a t c h ( ) { r e t u r n t h i s . _ b a t c h | | ( t h i s . _ b a t c h = t h i s . m o d e l . c r e a t e B a t c h ( ) ) , t h i s . _ b a t c h } i n p u t ( t ) { t h i s . s i z e + = t , t h i s . s i z e > = t h i s . l i m i t & & t h i s . _ r e s e t ( ! 0 ) } l o c k ( ) { t h i s . i s L o c k e d = ! 0 } u n l o c k ( ) { t h i s . i s L o c k e d = ! 1 } d e s t r o y ( ) { t h i s . m o d e l . d o c u m e n t . o f f ( " c h a n g e " , t h i s . _ c h a n g e C a l l b a c k ) , t h i s . m o d e l . d o c u m e n t . s e l e c t i o n . o f f ( " c h a n g e : r a n g e " , t h i s . _ s e l e c t i o n C h a n g e C a l l b a c k ) , t h i s . m o d e l . d o c u m e n t . s e l e c t i o n . o f f ( " c h a n g e : a t t r i b u t e " , t h i s . _ s e l e c t i o n C h a n g e C a l l b a c k ) } _ r e s e t ( t ) { t h i s . i s L o c k e d & & ! t | | ( t h i s . _ b a t c h = n u l l , t h i s . s i z e = 0 ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s h h e x t e n d s q u { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ b u f f e r = n e w u h ( t . m o d e l , e ) , t h i s . _ b a t c h e s = n e w W e a k S e t } g e t b u f f e r ( ) { r e t u r n t h i s . _ b u f f e r } d e s t r o y ( ) { s u p e r . d e s t r o y ( ) , t h i s . _ b u f f e r . d e s t r o y ( ) } e x e c u t e ( t = { } ) { c o n s t e = t h i s . e d i t o r . m o d e l , n = e . d o c u m e n t , i = t . t e x t | | " " , o = i . l e n g t h , r = t . r a n g e | | n . s e l e c t i o n . g e t F i r s t R a n g e ( ) , s = t . r e s u l t R a n g e ; e . e n q u e u e C h a n g e ( t h i s . _ b u f f e r . b a t c h , t = > { c o n s t a = r . i s C o l l a p s e d ; t h i s . _ b u f f e r . l o c k ( ) , e . d e l e t e C o n t e n t ( e . c r e a t e S e l e c t i o n ( r ) ) , i & & e . i n s e r t C o n t e n t ( t . c r e a t e T e x t ( i , n . s e l e c t i o n . g e t A t t r i b u t e s ( ) ) , r . s t a r t ) , s ? t . s e t S e l e c t i o n ( s ) : a & & t . s e t S e l e c t i o n ( r . s t a r t . g e t S h i f t e d B y ( o ) ) , t h i s . _ b u f f e r . u n l o c k ( ) , t h i s . _ b u f f e r . i n p u t ( o ) , t h i s . _ b a t c h e s . a d d ( t h i s . _ b u f f e r . b a t c h ) } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n f h ( t ) { l e t e = n u l l ; c o n s t n = t . m o d e l , i = t . e d i t i n g . v i e w , o = t . c o m m a n d s . g e t ( " i n p u t " ) ; f u n c t i o n r ( t ) { c o n s t r = n . d o c u m e n t , a = i . d o c u m e n t . i s C o m p o s i n g , c = e & & e . i s E q u a l ( r . s e l e c t i o n ) ; e = n u l l , o . i s E n a b l e d & & ( f u n c t i o n ( t ) { i f ( t . c t r l K e y ) r e t u r n ! 0 ; r e t u r n p h . i n c l u d e s ( t . k e y C o d e ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( t ) | | r . s e l e c t i o n . i s C o l l a p s e d | | a & & 2 2 9 = = = t . k e y C o d e | | ! a & & 2 2 9 = = = t . k e y C o d e & & c | | s ( ) ) } f u n c t i o n s ( ) { c o n s t t = o . b u f f e r ; t . l o c k ( ) , n . e n q u e u e C h a n g e ( t . b a t c h , ( ) = > { n . d e l e t e C o n t e n t ( n . d o c u m e n t . s e l e c t i o n ) } ) , t . u n l o c k ( ) } g o . i s A n d r o i d ? i . d o c u m e n t . o n ( " b e f o r e i n p u t " , ( t , e ) = > r ( e ) , { p r i o r i t y : " l o w e s t " } ) : i . d o c u m e n t . o n ( " k e y d o w n " , ( t , e ) = > r ( e ) , { p r i o r i t y : " l o w e s t " } ) , i . d o c u m e n t . o n ( " c o m p o s i t i o n s t a r t " , ( f u n c t i o n ( ) { c o n s t t = n . d o c u m e n t , e = 1 ! = = t . s e l e c t i o n . r a n g e C o u n t | | t . s e l e c t i o n . g e t F i r s t R a n g e ( ) . i s F l a t ; i f ( t . s e l e c t i o n . i s C o l l a p s e d | | e ) r e t u r n ; s ( ) } ) , { p r i o r i t y : " l o w e s t " } ) , i . d o c u m e n t . o n ( " c o m p o s i t i o n e n d " , ( ) = > { e = n . c r e a t e S e l e c t i o n ( n . d o c u m e n t . s e l e c t i o n ) } , { p r i o r i t y : " l o w e s t " } ) } c o n s t p h = [ _ o ( " a r r o w U p " ) , _ o ( " a r r o w R i g h t " ) , _ o ( " a r r o w D o w n " ) , _ o ( " a r r o w L e f t " ) , 9 , 1 6 , 1 7 , 1 8 , 1 9 , 2 0 , 2 7 , 3 3 , 3 4 , 3 5 , 3 6 , 4 5 , 9 1 , 9 3 , 1 4 4 , 1 4 5 , 1 7 3 , 1 7 4 , 1 7 5 , 1 7 6 , 1 7 7 , 1 7 8 , 1 7 9 , 2 5 5 ] ; f o r ( l e t t = 1 1 2 ; t < = 1 3 5 ; t + + ) p h . p u s h ( t ) ; f u n c t i o n m h ( t ) { i f ( t . n e w C h i l d r e n . l e n g t h - t . o l d C h i l d r e n . l e n g t h ! = 1 ) r e t u r n ; c o n s t e = f u n c t i o n ( t , e ) { c o n s t n = [ ] ; l e t i , o = 0 ; r e t u r n t . f o r E a c h ( t = > { " e q u a l " = = t ? ( r ( ) , o + + ) : " i n s e r t " = = t ? ( s ( " i n s e r t " ) ? i . v a l u e s . p u s h ( e [ o ] ) : ( r ( ) , i = { t y p e : " i n s e r t " , i n d e x : o , v a l u e s : [ e [ o ] ] } ) , o + + ) : s ( " d e l e t e " ) ? i . h o w M a n y + + : ( r ( ) , i = { t y p e : " d e l e t e " , i n d e x : o , h o w M a n y : 1 } ) } ) , r ( ) , n ; f u n c t i o n r ( ) { i & & ( n . p u s h ( i ) , i = n u l l ) } f u n c t i o n s ( t ) { r e t u r n i & & i . t y p e = = t } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( J o ( t . o l d C h i l d r e n , t . n e w C h i l d r e n , g h ) , t . n e w C h i l d r e n ) ; i f ( e . l e n g t h > 1 ) r e t u r n ; c o n s t n = e [ 0 ] ; r e t u r n n . v a l u e s [ 0 ] & & n . v a l u e s [ 0 ] . i s ( " t e x t " ) ? n : v o i d 0 } f u n c t i o n g h ( t , e ) { r e t u r n t & & t . i s ( " t e x t " ) & & e & & e . i s ( " t e x t " ) ? t . d a t a = = = e . d a t a : t = = = e }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /class bh{constructor(t){this.editor=t,this.editing=this.editor.editing}handle(t,e){if(function(t){if(0==t.length)return!1;for(const e of t)if("children"===e.type&&!mh(e))return!0;return!1}(t))this._handleContainerChildrenMutations(t,e);else for(const n of t)this._handleTextMutation(n,e),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(t,e){const n=function(t){const e=t.map(t=>t.node).reduce((t,e)=>t.getCommonAncestor(e,{includeSelf:!0}));if(!e)return;return e.getAncestors({includeSelf:!0,parentFirst:!0}).find(t=>t.is("containerElement")||t.is("rootElement"))}(t);if(!n)return;const i=this.editor.editing.view.domConverter.mapViewToDom(n),o=new ar,r=this.editor.data.toModel(o.domToView(i)).getChild(0),s=this.editor.editing.mapper.toModelElement(n);if(!s)return;const a=Array.from(r.getChildren()),c=Array.from(s.getChildren()),l=a[a.length-1],d=c[c.length-1];l&&l.is("softBreak")&&d&&!d.is("softBreak")&&a.pop();const u=this.editor.model.schema;if(!wh(a,u)||!wh(c,u))return;const h=a.map(t=>t.is("text")?t.data:"@").join("").replace(/ \u00A0 / g , " " ) , f = c . map ( t => t . is ( "text" ) ? t . data : "@" ) . join ( "" ) . replace ( /\u00A0/g , " " ) ; if ( f === h ) return ; const p = Jo ( f , h ) , { firstChangeAt : m , insertions : g , deletions : b } = kh ( p ) ; let w = null ; e && ( w = this . editing . mapper . toModelRange ( e . getFirstRange ( ) ) ) ; const k = h . substr ( m , g ) , _ = this . editor . model . createRange ( this . editor . model . createPositionAt ( s , m ) , this . editor . model . createPositionAt ( s , m + b ) ) ; this . editor . execute ( "input" , { text : k , range : _ , resultRange : w } ) } _handleTextMutation ( t , e ) { if ( "text" != t . type ) return ; const n = t . newText . replace ( /\u00A0/g , " " ) , i = t . oldText . replace ( /\u00A0/g , " " ) ; if ( i === n ) return ; const o = Jo ( i , n ) , { firstChangeAt : r , insertions : s , deletions : a } = kh ( o ) ; let c = null ; e && ( c = this . editing . mapper . toModelRange ( e . getFirstRange ( ) ) ) ; const l = this . editing . view . createPositionAt ( t . node , r ) , d = this . editing . mapper . toModelPosition ( l ) , u = this . editor . model . createRange ( d , d . getShiftedBy ( a ) ) , h = n . substr ( r , s ) ; this . editor . execute ( "input" , { text : h , range : u , resultRange : c } ) } _handleTextNodeInsertion ( t ) { if ( "children" != t . type ) return ; const e = mh ( t ) , n = this . editing . view . createPositionAt ( t . node , e . index ) , i = this . editing . mapper . toModelPosition ( n ) , o = e . values [ 0 ] . data ; this . editor . execute ( "input" , { text : o . replace ( /\u00A0/g , " " ) , range : this . editor . model . createRange ( i ) } ) } } function wh ( t , e ) { return t . every ( t => e . isInline ( t ) ) } function kh ( t ) { let e = null , n = null ; for ( let i = 0 ; i < t . length ; i ++ ) { "equal" != t [ i ] && ( e = null === e ? i : e , n = i ) } let i = 0 , o = 0 ; for ( let r = e ; r <= n ; r ++ ) "insert" != t [ r ] && i ++ , "delete" != t [ r ] && o ++ ; return { insertions : o , deletions : i , firstChangeAt : e } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s _ h e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " I n p u t " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = n e w h h ( t , t . c o n f i g . g e t ( " t y p i n g . u n d o S t e p " ) | | 2 0 ) ; t . c o m m a n d s . a d d ( " i n p u t " , e ) , f h ( t ) , f u n c t i o n ( t ) { t . e d i t i n g . v i e w . d o c u m e n t . o n ( " m u t a t i o n s " , ( e , n , i ) = > { n e w b h ( t ) . h a n d l e ( n , i ) } ) } ( t ) } i s I n p u t ( t ) { r e t u r n t h i s . e d i t o r . c o m m a n d s . g e t ( " i n p u t " ) . _ b a t c h e s . h a s ( t ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s v h e x t e n d s q u { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . d i r e c t i o n = e , t h i s . _ b u f f e r = n e w u h ( t . m o d e l , t . c o n f i g . g e t ( " t y p i n g . u n d o S t e p " ) ) } g e t b u f f e r ( ) { r e t u r n t h i s . _ b u f f e r } e x e c u t e ( t = { } ) { c o n s t e = t h i s . e d i t o r . m o d e l , n = e . d o c u m e n t ; e . e n q u e u e C h a n g e ( t h i s . _ b u f f e r . b a t c h , i = > { t h i s . _ b u f f e r . l o c k ( ) ; c o n s t o = i . c r e a t e S e l e c t i o n ( t . s e l e c t i o n | | n . s e l e c t i o n ) , r = o . i s C o l l a p s e d ; i f ( o . i s C o l l a p s e d & & e . m o d i f y S e l e c t i o n ( o , { d i r e c t i o n : t h i s . d i r e c t i o n , u n i t : t . u n i t } ) , t h i s . _ s h o u l d E n t i r e C o n t e n t B e R e p l a c e d W i t h P a r a g r a p h ( t . s e q u e n c e | | 1 ) ) r e t u r n v o i d t h i s . _ r e p l a c e E n t i r e C o n t e n t W i t h P a r a g r a p h ( i ) ; i f ( o . i s C o l l a p s e d ) r e t u r n ; l e t s = 0 ; o . g e t F i r s t R a n g e ( ) . g e t M i n i m a l F l a t R a n g e s ( ) . f o r E a c h ( t = > { s + = i o ( t . g e t W a l k e r ( { s i n g l e C h a r a c t e r s : ! 0 , i g n o r e E l e m e n t E n d : ! 0 , s h a l l o w : ! 0 } ) ) } ) , e . d e l e t e C o n t e n t ( o , { d o N o t R e s e t E n t i r e C o n t e n t : r } ) , t h i s . _ b u f f e r . i n p u t ( s ) , i . s e t S e l e c t i o n ( o ) , t h i s . _ b u f f e r . u n l o c k ( ) } ) } _ s h o u l d E n t i r e C o n t e n t B e R e p l a c e d W i t h P a r a g r a p h ( t ) { i f ( t > 1 ) r e t u r n ! 1 ; c o n s t e = t h i s . e d i t o r . m o d e l , n = e . d o c u m e n t . s e l e c t i o n , i = e . s c h e m a . g e t L i m i t E l e m e n t ( n ) ; i f ( ! ( n . i s C o l l a p s e d & & n . c o n t a i n s E n t i r e C o n t e n t ( i ) ) ) r e t u r n ! 1 ; i f ( ! e . s c h e m a . c h e c k C h i l d ( i , " p a r a g r a p h " ) ) r e t u r n ! 1 ; c o n s t o = i . g e t C h i l d ( 0 ) ; r e t u r n ! o | | " p a r a g r a p h " ! = = o . n a m e } _ r e p l a c e E n t i r e C o n t e n t W i t h P a r a g r a p h ( t ) { c o n s t e = t h i s . e d i t o r . m o d e l , n = e . d o c u m e n t . s e l e c t i o n , i = e . s c h e m a . g e t L i m i t E l e m e n t ( n ) , o = t . c r e a t e E l e m e n t ( " p a r a g r a p h " ) ; t . r e m o v e ( t . c r e a t e R a n g e I n ( i ) ) , t . i n s e r t ( o , i ) , t . s e t S e l e c t i o n ( o , 0 ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s y h e x t e n d s p r { c o n s t r u c t o r ( t ) { s u p e r ( t ) ; c o n s t e = t . d o c u m e n t ; l e t n = 0 ; f u n c t i o n i ( t , n , i ) { l e t o ; e . o n c e ( " d e l e t e " , t = > o = t , { p r i o r i t y : N u m b e r . P O S I T I V E _ I N F I N I T Y } ) , e . f i r e ( " d e l e t e " , n e w e s ( e , n , i ) ) , o & & o . s t o p . c a l l e d & & t . s t o p ( ) } e . o n ( " k e y u p " , ( t , e ) = > { e . k e y C o d e ! = k o . d e l e t e & & e . k e y C o d e ! = k o . b a c k s p a c e | | ( n = 0 ) } ) , e . o n ( " k e y d o w n " , ( t , e ) = > { c o n s t o = { } ; i f ( e . k e y C o d e = = k o . d e l e t e ) o . d i r e c t i o n = " f o r w a r d " , o . u n i t = " c h a r a c t e r " ; e l s e { i f ( e . k e y C o d e ! = k o . b a c k s p a c e ) r e t u r n ; o . d i r e c t i o n = " b a c k w a r d " , o . u n i t = " c o d e P o i n t " } c o n s t r = g o . i s M a c ? e . a l t K e y : e . c t r l K e y ; o . u n i t = r ? " w o r d " : o . u n i t , o . s e q u e n c e = + + n , i ( t , e . d o m E v e n t , o ) } ) , g o . i s A n d r o i d & & e . o n ( " b e f o r e i n p u t " , ( e , n ) = > { i f ( " d e l e t e C o n t e n t B a c k w a r d " ! = n . d o m E v e n t . i n p u t T y p e ) r e t u r n ; c o n s t o = { u n i t : " c o d e p o i n t " , d i r e c t i o n : " b a c k w a r d " , s e q u e n c e : 1 } , r = n . d o m T a r g e t . o w n e r D o c u m e n t . d e f a u l t V i e w . g e t S e l e c t i o n ( ) ; r . a n c h o r N o d e = = r . f o c u s N o d e & & r . a n c h o r O f f s e t + 1 ! = r . f o c u s O f f s e t & & ( o . s e l e c t i o n T o R e m o v e = t . d o m C o n v e r t e r . d o m S e l e c t i o n T o V i e w ( r ) ) , i ( e , n . d o m E v e n t , o ) } ) } o b s e r v e ( ) { } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s x h e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " D e l e t e " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . e d i t i n g . v i e w , n = e . d o c u m e n t ; i f ( e . a d d O b s e r v e r ( y h ) , t . c o m m a n d s . a d d ( " f o r w a r d D e l e t e " , n e w v h ( t , " f o r w a r d " ) ) , t . c o m m a n d s . a d d ( " d e l e t e " , n e w v h ( t , " b a c k w a r d " ) ) , t h i s . l i s t e n T o ( n , " d e l e t e " , ( n , i ) = > { c o n s t o = { u n i t : i . u n i t , s e q u e n c e : i . s e q u e n c e } ; i f ( i . s e l e c t i o n T o R e m o v e ) { c o n s t e = t . m o d e l . c r e a t e S e l e c t i o n ( ) , n = [ ] ; f o r ( c o n s t e o f i . s e l e c t i o n T o R e m o v e . g e t R a n g e s ( ) ) n . p u s h ( t . e d i t i n g . m a p p e r . t o M o d e l R a n g e ( e ) ) ; e . s e t T o ( n ) , o . s e l e c t i o n = e } t . e x e c u t e ( " f o r w a r d " = = i . d i r e c t i o n ? " f o r w a r d D e l e t e " : " d e l e t e " , o ) , i . p r e v e n t D e f a u l t ( ) , e . s c r o l l T o T h e S e l e c t i o n ( ) } ) , g o . i s A n d r o i d ) { l e t t = n u l l ; t h i s . l i s t e n T o ( n , " d e l e t e " , ( e , n ) = > { c o n s t i = n . d o m T a r g e t . o w n e r D o c u m e n t . d e f a u l t V i e w . g e t S e l e c t i o n ( ) ; t = { a n c h o r N o d e : i . a n c h o r N o d e , a n c h o r O f f s e t : i . a n c h o r O f f s e t , f o c u s N o d e : i . f o c u s N o d e , f o c u s O f f s e t : i . f o c u s O f f s e t } } , { p r i o r i t y : " l o w e s t " } ) , t h i s . l i s t e n T o ( n , " k e y u p " , ( e , n ) = > { i f ( t ) { c o n s t e = n . d o m T a r g e t . o w n e r D o c u m e n t . d e f a u l t V i e w . g e t S e l e c t i o n ( ) ; e . c o l l a p s e ( t . a n c h o r N o d e , t . a n c h o r O f f s e t ) , e . e x t e n d ( t . f o c u s N o d e , t . f o c u s O f f s e t ) , t = n u l l } } ) } } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s C h e x t e n d s y d { s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ _ h , x h ] } s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " T y p i n g " } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s A h e x t e n d s i c { g e t t y p e ( ) { r e t u r n " n o o p " } c l o n e ( ) { r e t u r n n e w A h ( t h i s . b a s e V e r s i o n ) } g e t R e v e r s e d ( ) { r e t u r n n e w A h ( t h i s . b a s e V e r s i o n + 1 ) } _ e x e c u t e ( ) { } s t a t i c g e t c l a s s N a m e ( ) { r e t u r n " N o O p e r a t i o n " } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t P h = n e w M a p ; f u n c t i o n T h ( t , e , n ) { l e t i = P h . g e t ( t ) ; i | | ( i = n e w M a p , P h . s e t ( t , i ) ) , i . s e t ( e , n ) } f u n c t i o n E h ( t ) { r e t u r n [ t ] } f u n c t i o n S h ( t , e , n = { } ) { c o n s t i = f u n c t i o n ( t , e ) { c o n s t n = P h . g e t ( t ) ; r e t u r n n & & n . h a s ( e ) ? n . g e t ( e ) : E h } ( t . c o n s t r u c t o r , e . c o n s t r u c t o r ) ; t r y { r e t u r n i ( t = t . c l o n e ( ) , e , n ) } c a t c h ( t ) { t h r o w t } } f u n c t i o n R h ( t , e , n ) { t = t . s l i c e ( ) , e = e . s l i c e ( ) ; c o n s t i = n e w I h ( n . d o c u m e n t , n . u s e R e l a t i o n s , n . f o r c e W e a k R e m o v e ) ; i . s e t O r i g i n a l O p e r a t i o n s ( t ) , i . s e t O r i g i n a l O p e r a t i o n s ( e ) ; c o n s t o = i . o r i g i n a l O p e r a t i o n s ; i f ( 0 = = t . l e n g t h | | 0 = = e . l e n g t h ) r e t u r n { o p e r a t i o n s A : t , o p e r a t i o n s B : e , o r i g i n a l O p e r a t i o n s : o } ; c o n s t r = n e w W e a k M a p ; f o r ( c o n s t e o f t ) r . s e t ( e , 0 ) ; c o n s t s = { n e x t B a s e V e r s i o n A : t [ t . l e n g t h - 1 ] . b a s e V e r s i o n + 1 , n e x t B a s e V e r s i o n B : e [ e . l e n g t h - 1 ] . b a s e V e r s i o n + 1 , o r i g i n a l O p e r a t i o n s A C o u n t : t . l e n g t h , o r i g i n a l O p e r a t i o n s B C o u n t : e . l e n g t h } ; l e t a = 0 ; f o r ( ; a < t . l e n g t h ; ) { c o n s t n = t [ a ] , o = r . g e t ( n ) ; i f ( o = = e . l e n g t h ) { a + + ; c o n t i n u e } c o n s t s = e [ o ] , c = S h ( n , s , i . g e t C o n t e x t ( n , s , ! 0 ) ) , l = S h ( s , n , i . g e t C o n t e x t ( s , n , ! 1 ) ) ; i . u p d a t e R e l a t i o n ( n , s ) , i . s e t O r i g i n a l O p e r a t i o n s ( c , n ) , i . s e t O r i g i n a l O p e r a t i o n s ( l , s ) ; f o r ( c o n s t t o f c ) r . s e t ( t , o + l . l e n g t h ) ; t . s p l i c e ( a , 1 , . . . c ) , e . s p l i c e ( o , 1 , . . . l ) } i f ( n . p a d W i t h N o O p s ) { c o n s t n = t . l e n g t h - s . o r i g i n a l O p e r a t i o n s A C o u n t , i = e . l e n g t h - s . o r i g i n a l O p e r a t i o n s B C o u n t ; D h ( t , i - n ) , D h ( e , n - i ) } r e t u r n O h ( t , s . n e x t B a s e V e r s i o n B ) , O h ( e , s . n e x t B a s e V e r s i o n A ) , { o p e r a t i o n s A : t , o p e r a t i o n s B : e , o r i g i n a l O p e r a t i o n s : o } } c l a s s I h { c o n s t r u c t o r ( t , e , n = ! 1 ) { t h i s . o r i g i n a l O p e r a t i o n s = n e w M a p , t h i s . _ h i s t o r y = t . h i s t o r y , t h i s . _ u s e R e l a t i o n s = e , t h i s . _ f o r c e W e a k R e m o v e = ! ! n , t h i s . _ r e l a t i o n s = n e w M a p } s e t O r i g i n a l O p e r a t i o n s ( t , e = n u l l ) { c o n s t n = e ? t h i s . o r i g i n a l O p e r a t i o n s . g e t ( e ) : n u l l ; f o r ( c o n s t e o f t ) t h i s . o r i g i n a l O p e r a t i o n s . s e t ( e , n | | e ) } u p d a t e R e l a t i o n ( t , e ) { s w i t c h ( t . c o n s t r u c t o r ) { c a s e m c : s w i t c h ( e . c o n s t r u c t o r ) { c a s e _ c : t . t a r g e t P o s i t i o n . i s E q u a l ( e . s o u r c e P o s i t i o n ) | | e . m o v e d R a n g e . c o n t a i n s P o s i t i o n ( t . t a r g e t P o s i t i o n ) ? t h i s . _ s e t R e l a t i o n ( t , e , " i n s e r t A t S o u r c e " ) : t . t a r g e t P o s i t i o n . i s E q u a l ( e . d e l e t i o n P o s i t i o n ) ? t h i s . _ s e t R e l a t i o n ( t , e , " i n s e r t B e t w e e n " ) : t . t a r g e t P o s i t i o n . i s A f t e r ( e . s o u r c e P o s i t i o n ) & & t h i s . _ s e t R e l a t i o n ( t , e , " m o v e T a r g e t A f t e r " ) ; b r e a k ; c a s e m c : t . t a r g e t P o s i t i o n . i s E q u a l ( e . s o u r c e P o s i t i o n ) | | t . t a r g e t P o s i t i o n . i s B e f o r e ( e . s o u r c e P o s i t i o n ) ? t h i s . _ s e t R e l a t i o n ( t , e , " i n s e r t B e f o r e " ) : t h i s . _ s e t R e l a t i o n ( t , e , " i n s e r t A f t e r " ) } b r e a k ; c a s e v c : s w i t c h ( e . c o n s t r u c t o r ) { c a s e _ c : t . s p l i t P o s i t i o n . i s B e f o r e ( e . s o u r c e P o s i t i o n ) & & t h i s . _ s e t R e l a t i o n ( t , e , " s p l i t B e f o r e " ) ; b r e a k ; c a s e m c : ( t . s p l i t P o s i t i o n . i s E q u a l ( e . s o u r c e P o s i t i o n ) | | t . s p l i t P o s i t i o n . i s B e f o r e ( e . s o u r c e P o s i t i o n ) ) & & t h i s . _ s e t R e l a t i o n ( t , e , " s p l i t B e f o r e " ) } b r e a k ; c a s e _ c : s w i t c h ( e . c o n s t r u c t o r ) { c a s e _ c : t . t a r g e t P o s i t i o n . i s E q u a l ( e . s o u r c e P o s i t i o n ) | | t h i s . _ s e t R e l a t i o n ( t , e , " m e r g e T a r g e t N o t M o v e d " ) , t . s o u r c e P o s i t i o n . i s E q u a l ( e . t a r g e t P o s i t i o n ) & & t h i s . _ s e t R e l a t i o n ( t , e , " m e r g e S o u r c e N o t M o v e d " ) , t . s o u r c e P o s i t i o n . i s E q u a l ( e . s o u r c e P o s i t i o n ) & & t h i s . _ s e t R e l a t i o n ( t , e , " m e r g e S a m e E l e m e n t " ) ; b r e a k ; c a s e v c : t . s o u r c e P o s i t i o n . i s E q u a l ( e . s p l i t P o s i t i o n ) & & t h i s . _ s e t R e l a t i o n ( t , e , " s p l i t A t S o u r c e " ) } b r e a k ; c a s e b c : { c o n s t n = t . n e w R a n g e ; i f ( ! n ) r e t u r n ; s w i t c h ( e . c o n s t r u c t o r ) { c a s e m c : { c o n s t i = Z s . _ c r e a t e F r o m P o s i t i o n A n d S h i f t ( e . s o u r c e P o s i t i o n , e . h o w M a n y ) , o = i . c o n t a i n s P o s i t i o n ( n . s t a r t ) | | i . s t a r t . i s E q u a l ( n . s t a r t ) , r = i . c o n t a i n s P o s i t i o n ( n . e n d ) | | i . e n d . i s E q u a l ( n . e n d ) ; ! o & & ! r | | i . c o n t a i n s R a n g e ( n ) | | t h i s . _ s e t R e l a t i o n ( t , e , { s i d e : o ? " l e f t " : " r i g h t " , p a t h : o ? n . s t a r t . p a t h . s l i c e ( ) : n . e n d . p a t h . s l i c e ( ) } ) ; b r e a k } c a s e _ c : { c o n s t i = n . s t a r t . i s E q u a l ( e . t a r g e t P o s i t i o n ) , o = n . s t a r t . i s E q u a l ( e . d e l e t i o n P o s i t i o n ) , r = n . e n d . i s E q u a l ( e . d e l e t i o n P o s i t i o n ) , s = n . e n d . i s E q u a l ( e . s o u r c e P o s i t i o n ) ; ( i | | o | | r | | s ) & & t h i s . _ s e t R e l a t i o n ( t , e , { w a s I n L e f t E l e m e n t : i , w a s S t a r t B e f o r e M e r g e d E l e m e n t : o , w a s E n d B e f o r e M e r g e d E l e m e n t : r , w a s I n R i g h t E l e m e n t : s } ) ; b r e a k } } b r e a k } } } g e t C o n t e x t ( t , e , n ) { r e t u r n { a I s S t r o n g : n , a W a s U n d o n e : t h i s . _ w a s U n d o n e ( t ) , b W a s U n d o n e : t h i s . _ w a s U n d o n e ( e ) , a b R e l a t i o n : t h i s . _ u s e R e l a t i o n s ? t h i s . _ g e t R e l a t i o n ( t , e ) : n u l l , b a R e l a t i o n : t h i s . _ u s e R e l a t i o n s ? t h i s . _ g e t R e l a t i o n ( e , t ) : n u l l , f o r c e W e a k R e m o v e : t h i s . _ f o r c e W e a k R e m o v e } } _ w a s U n d o n e ( t ) { c o n s t e = t h i s . o r i g i n a l O p e r a t i o n s . g e t ( t ) ; r e t u r n e . w a s U n d o n e | | t h i s . _ h i s t o r y . i s U n d o n e O p e r a t i o n ( e ) } _ g e t R e l a t i o n ( t , e ) { c o n s t n = t h i s . o r i g i n a l O p e r a t i o n s . g e t ( e ) , i = t h i s . _ h i s t o r y . g e t U n d o n e O p e r a t i o n ( n ) ; i f ( ! i ) r e t u r n n u l l ; c o n s t o = t h i s . o r i g i n a l O p e r a t i o n s . g e t ( t ) , r = t h i s . _ r e l a t i o n s . g e t ( o ) ; r e t u r n r & & r . g e t ( i ) | | n u l l } _ s e t R e l a t i o n ( t
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / T h ( f c , f c , ( t , e , n ) = > { i f ( t . k e y = = = e . k e y ) { c o n s t i = t . r a n g e . g e t D i f f e r e n c e ( e . r a n g e ) . m a p ( e = > n e w f c ( e , t . k e y , t . o l d V a l u e , t . n e w V a l u e , 0 ) ) , o = t . r a n g e . g e t I n t e r s e c t i o n ( e . r a n g e ) ; r e t u r n o & & n . a I s S t r o n g & & i . p u s h ( n e w f c ( o , e . k e y , e . n e w V a l u e , t . n e w V a l u e , 0 ) ) , 0 = = i . l e n g t h ? [ n e w A h ( 0 ) ] : i } r e t u r n [ t ] } ) , T h ( f c , g c , ( t , e ) = > { i f ( t . r a n g e . s t a r t . h a s S a m e P a r e n t A s ( e . p o s i t i o n ) & & t . r a n g e . c o n t a i n s P o s i t i o n ( e . p o s i t i o n ) ) { c o n s t n = t . r a n g e . _ g e t T r a n s f o r m e d B y I n s e r t i o n ( e . p o s i t i o n , e . h o w M a n y , ! e . s h o u l d R e c e i v e A t t r i b u t e s ) . m a p ( e = > n e w f c ( e , t . k e y , t . o l d V a l u e , t . n e w V a l u e , t . b a s e V e r s i o n ) ) ; i f ( e . s h o u l d R e c e i v e A t t r i b u t e s ) { c o n s t i = M h ( e , t . k e y , t . o l d V a l u e ) ; i & & n . u n s h i f t ( i ) } r e t u r n n } r e t u r n t . r a n g e = t . r a n g e . _ g e t T r a n s f o r m e d B y I n s e r t i o n ( e . p o s i t i o n , e . h o w M a n y , ! 1 ) [ 0 ] , [ t ] } ) , T h ( f c , _ c , ( t , e ) = > { c o n s t n = [ ] ; t . r a n g e . s t a r t . h a s S a m e P a r e n t A s ( e . d e l e t i o n P o s i t i o n ) & & ( t . r a n g e . c o n t a i n s P o s i t i o n ( e . d e l e t i o n P o s i t i o n ) | | t . r a n g e . s t a r t . i s E q u a l ( e . d e l e t i o n P o s i t i o n ) ) & & n . p u s h ( Z s . _ c r e a t e F r o m P o s i t i o n A n d S h i f t ( e . g r a v e y a r d P o s i t i o n , 1 ) ) ; c o n s t i = t . r a n g e . _ g e t T r a n s f o r m e d B y M e r g e O p e r a t i o n ( e ) ; r e t u r n i . i s C o l l a p s e d | | n . p u s h ( i ) , n . m a p ( e = > n e w f c ( e , t . k e y , t . o l d V a l u e , t . n e w V a l u e , t . b a s e V e r s i o n ) ) } ) , T h ( f c , m c , ( t , e ) = > { r e t u r n f u n c t i o n ( t , e ) { c o n s t n = Z s . _ c r e a t e F r o m P o s i t i o n A n d S h i f t ( e . s o u r c e P o s i t i o n , e . h o w M a n y ) ; l e t i = n u l l , o = [ ] ; n . c o n t a i n s R a n g e ( t , ! 0 ) ? i = t : t . s t a r t . h a s S a m e P a r e n t A s ( n . s t a r t ) ? ( o = t . g e t D i f f e r e n c e ( n ) , i = t . g e t I n t e r s e c t i o n ( n ) ) : o = [ t ] ; c o n s t r = [ ] ; f o r ( l e t t o f o ) { t = t . _ g e t T r a n s f o r m e d B y D e l e t i o n ( e . s o u r c e P o s i t i o n , e . h o w M a n y ) ; c o n s t n = e . g e t M o v e d R a n g e S t a r t ( ) , i = t . s t a r t . h a s S a m e P a r e n t A s ( n ) ; t = t . _ g e t T r a n s f o r m e d B y I n s e r t i o n ( n , e . h o w M a n y , i ) , r . p u s h ( . . . t ) } i & & r . p u s h ( i . _ g e t T r a n s f o r m e d B y M o v e ( e . s o u r c e P o s i t i o n , e . t a r g e t P o s i t i o n , e . h o w M a n y , ! 1 ) [ 0 ] ) ; r e t u r n r } ( t . r a n g e , e ) . m a p ( e = > n e w f c ( e , t . k e y , t . o l d V a l u e , t . n e w V a l u e , t . b a s e V e r s i o n ) ) } ) , T h ( f c , v c , ( t , e ) = > { i f ( t . r a n g e . e n d . i s E q u a l ( e . i n s e r t i o n P o s i t i o n ) ) r e t u r n e . g r a v e y a r d P o s i t i o n | | t . r a n g e . e n d . o f f s e t + + , [ t ] ; i f ( t . r a n g e . s t a r t . h a s S a m e P a r e n t A s ( e . s p l i t P o s i t i o n ) & & t . r a n g e . c o n t a i n s P o s i t i o n ( e . s p l i t P o s i t i o n ) ) { c o n s t n = t . c l o n e ( ) ; r e t u r n n . r a n g e = n e w Z s ( e . m o v e T a r g e t P o s i t i o n . c l o n e ( ) , t . r a n g e . e n d . _ g e t C o m b i n e d ( e . s p l i t P o s i t i o n , e . m o v e T a r g e t P o s i t i o n ) ) , t . r a n g e . e n d = e . s p l i t P o s i t i o n . c l o n e ( ) , t . r a n g e . e n d . s t i c k i n e s s = " t o P r e v i o u s " , [ t , n ] } r e t u r n t . r a n g e = t . r a n g e . _ g e t T r a n s f o r m e d B y S p l i t O p e r a t i o n ( e ) , [ t ] } ) , T h ( g c , f c , ( t , e ) = > { c o n s t n = [ t ] ; i f ( t . s h o u l d R e c e i v e A t t r i b u t e s & & t . p o s i t i o n . h a s S a m e P a r e n t A s ( e . r a n g e . s t a r t ) & & e . r a n g e . c o n t a i n s P o s i t i o n ( t . p o s i t i o n ) ) { c o n s t i = M h ( t , e . k e y , e . n e w V a l u e ) ; i & & n . p u s h ( i ) } r e t u r n n } ) , T h ( g c , g c , ( t , e , n ) = > t . p o s i t i o n . i s E q u a l ( e . p o s i t i o n ) & & n . a I s S t r o n g ? [ t ] : ( t . p o s i t i o n = t . p o s i t i o n . _ g e t T r a n s f o r m e d B y I n s e r t O p e r a t i o n ( e ) , [ t ] ) ) , T h ( g c , m c , ( t , e ) = > ( t . p o s i t i o n = t . p o s i t i o n . _ g e t T r a n s f o r m e d B y M o v e O p e r a t i o n ( e ) , [ t ] ) ) , T h ( g c , v c , ( t , e ) = > ( t . p o s i t i o n = t . p o s i t i o n . _ g e t T r a n s f o r m e d B y S p l i t O p e r a t i o n ( e ) , [ t ] ) ) , T h ( g c , _ c , ( t , e ) = > ( t . p o s i t i o n = t . p o s i t i o n . _ g e t T r a n s f o r m e d B y M e r g e O p e r a t i o n ( e ) , [ t ] ) ) , T h ( b c , g c , ( t , e ) = > ( t . o l d R a n g e & & ( t . o l d R a n g e = t . o l d R a n g e . _ g e t T r a n s f o r m e d B y I n s e r t O p e r a t i o n ( e ) [ 0 ] ) , t . n e w R a n g e & & ( t . n e w R a n g e = t . n e w R a n g e . _ g e t T r a n s f o r m e d B y I n s e r t O p e r a t i o n ( e ) [ 0 ] ) , [ t ] ) ) , T h ( b c , b c , ( t , e , n ) = > { i f ( t . n a m e = = e . n a m e ) { i f ( ! n . a I s S t r o n g ) r e t u r n [ n e w A h ( 0 ) ] ; t . o l d R a n g e = e . n e w R a n g e ? e . n e w R a n g e . c l o n e ( ) : n u l l } r e t u r n [ t ] } ) , T h ( b c , _ c , ( t , e ) = > ( t . o l d R a n g e & & ( t . o l d R a n g e = t . o l d R a n g e . _ g e t T r a n s f o r m e d B y M e r g e O p e r a t i o n ( e ) ) , t . n e w R a n g e & & ( t . n e w R a n g e = t . n e w R a n g e . _ g e t T r a n s f o r m e d B y M e r g e O p e r a t i o n ( e ) ) , [ t ] ) ) , T h ( b c , m c , ( t , e , n ) = > { i f ( t . o l d R a n g e & & ( t . o l d R a n g e = Z s . _ c r e a t e F r o m R a n g e s ( t . o l d R a n g e . _ g e t T r a n s f o r m e d B y M o v e O p e r a t i o n ( e ) ) ) , t . n e w R a n g e ) { i f ( n . a b R e l a t i o n ) { c o n s t i = Z s . _ c r e a t e F r o m R a n g e s ( t . n e w R a n g e . _ g e t T r a n s f o r m e d B y M o v e O p e r a t i o n ( e ) ) ; i f ( " l e f t " = = n . a b R e l a t i o n . s i d e & & e . t a r g e t P o s i t i o n . i s E q u a l ( t . n e w R a n g e . s t a r t ) ) r e t u r n t . n e w R a n g e . s t a r t . p a t h = n . a b R e l a t i o n . p a t h , t . n e w R a n g e . e n d = i . e n d , [ t ] ; i f ( " r i g h t " = = n . a b R e l a t i o n . s i d e & & e . t a r g e t P o s i t i o n . i s E q u a l ( t . n e w R a n g e . e n d ) ) r e t u r n t . n e w R a n g e . s t a r t = i . s t a r t , t . n e w R a n g e . e n d . p a t h = n . a b R e l a t i o n . p a t h , [ t ] } t . n e w R a n g e = Z s . _ c r e a t e F r o m R a n g e s ( t . n e w R a n g e . _ g e t T r a n s f o r m e d B y M o v e O p e r a t i o n ( e ) ) } r e t u r n [ t ] } ) , T h ( b c , v c , ( t , e , n ) = > { i f ( t . o l d R a n g e & & ( t . o l d R a n g e = t . o l d R a n g e . _ g e t T r a n s f o r m e d B y S p l i t O p e r a t i o n ( e ) ) , t . n e w R a n g e ) { i f ( n . a b R e l a t i o n ) { c o n s t i = t . n e w R a n g e . _ g e t T r a n s f o r m e d B y S p l i t O p e r a t i o n ( e ) ; r e t u r n t . n e w R a n g e . s t a r t . i s E q u a l ( e . s p l i t P o s i t i o n ) & & n . a b R e l a t i o n . w a s S t a r t B e f o r e M e r g e d E l e m e n t ? t . n e w R a n g e . s t a r t = J s . _ c r e a t e A t ( e . i n s
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s L h e x t e n d s F h { e x e c u t e ( t = n u l l ) { c o n s t e = t ? t h i s . _ s t a c k . f i n d I n d e x ( e = > e . b a t c h = = t ) : t h i s . _ s t a c k . l e n g t h - 1 , n = t h i s . _ s t a c k . s p l i c e ( e , 1 ) [ 0 ] , i = t h i s . e d i t o r . m o d e l . c r e a t e B a t c h ( " t r a n s p a r e n t " ) ; t h i s . e d i t o r . m o d e l . e n q u e u e C h a n g e ( i , ( ) = > { t h i s . _ u n d o ( n . b a t c h , i ) ; c o n s t t = t h i s . e d i t o r . m o d e l . d o c u m e n t . h i s t o r y . g e t O p e r a t i o n s ( n . b a t c h . b a s e V e r s i o n ) ; t h i s . _ r e s t o r e S e l e c t i o n ( n . s e l e c t i o n . r a n g e s , n . s e l e c t i o n . i s B a c k w a r d , t ) , t h i s . f i r e ( " r e v e r t " , n . b a t c h , i ) } ) , t h i s . r e f r e s h ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s z h e x t e n d s F h { e x e c u t e ( ) { c o n s t t = t h i s . _ s t a c k . p o p ( ) , e = t h i s . e d i t o r . m o d e l . c r e a t e B a t c h ( " t r a n s p a r e n t " ) ; t h i s . e d i t o r . m o d e l . e n q u e u e C h a n g e ( e , ( ) = > { c o n s t n = t . b a t c h . o p e r a t i o n s [ t . b a t c h . o p e r a t i o n s . l e n g t h - 1 ] . b a s e V e r s i o n + 1 , i = t h i s . e d i t o r . m o d e l . d o c u m e n t . h i s t o r y . g e t O p e r a t i o n s ( n ) ; t h i s . _ r e s t o r e S e l e c t i o n ( t . s e l e c t i o n . r a n g e s , t . s e l e c t i o n . i s B a c k w a r d , i ) , t h i s . _ u n d o ( t . b a t c h , e ) } ) , t h i s . r e f r e s h ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /class qh extends yd{static get pluginName(){return"UndoEditing"}constructor(t){super(t),this._batchRegistry=new WeakSet}init(){const t=this.editor;this._undoCommand=new Lh(t),this._redoCommand=new zh(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",(t,e)=>{const n=e[0];if(!n.isDocumentOperation)return;const i=n.batch,o=this._redoCommand._createdBatches.has(i),r=this._undoCommand._createdBatches.has(i);this._batchRegistry.has(i)||"transparent"==i.type&&!o&&!r||(o?this._undoCommand.addBatch(i):r||(this._undoCommand.addBatch(i),this._redoCommand.clearStack()),this._batchRegistry.add(i))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(t,e,n)=>{this._redoCommand.addBatch(n)}),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo")}}var jh='<svg viewBox="0 0 20 20" xmlns="http:/ / www . w3 . org / 2000 / svg "><path d=" M5 . 042 9.367 l2 . 189 1.837 a . 75.75 0 0 1 - . 965 1.149 l - 3.788 - 3.18 a . 747.747 0 0 1 - . 21 - . 284.75 . 75 0 0 1 . 17 - . 945 L6 . 23 4.762 a . 75.75 0 1 1 . 964 1.15 L4 . 863 7.866 h8 . 917 A . 75.75 0 0 1 14 7.9 a4 4 0 1 1 - 1.477 7.718 l . 344 - 1.489 a2 . 5 2.5 0 1 0 1.094 - 4.73 l . 008 - . 032 H5 . 042 z "/></svg>',Hh='<svg viewBox=" 0 0 20 20 " xmlns=" http : //www.w3.org/2000/svg"><path d="M14.958 9.367l-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/></svg>';
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Uh extends yd { init ( ) { const t = this . editor , e = t . locale , n = t . t , i = "ltr" == e . uiLanguageDirection ? jh : Hh , o = "ltr" == e . uiLanguageDirection ? Hh : jh ; this . _addButton ( "undo" , n ( "bf" ) , "CTRL+Z" , i ) , this . _addButton ( "redo" , n ( "bg" ) , "CTRL+Y" , o ) } _addButton ( t , e , n , i ) { const o = this . editor ; o . ui . componentFactory . add ( t , r => { const s = o . commands . get ( t ) , a = new od ( r ) ; return a . set ( { label : e , icon : i , keystroke : n , tooltip : ! 0 } ) , a . bind ( "isEnabled" ) . to ( s , "isEnabled" ) , this . listenTo ( a , "execute" , ( ) => o . execute ( t ) ) , a } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s $ h e x t e n d s y d { s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ q h , U h ] } s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " U n d o " } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const Wh = "ckCsrfToken" , Gh = 40 , Kh = "abcdefghijklmnopqrstuvwxyz0123456789" ; function Jh ( ) { let t = function ( t ) { t = t . toLowerCase ( ) ; const e = document . cookie . split ( ";" ) ; for ( const n of e ) { const e = n . split ( "=" ) ; if ( decodeURIComponent ( e [ 0 ] . trim ( ) . toLowerCase ( ) ) === t ) return decodeURIComponent ( e [ 1 ] ) } return null } ( Wh ) ; var e , n ; return t && t . length == Gh || ( t = function ( t ) { let e = "" ; const n = new Uint8Array ( t ) ; window . crypto . getRandomValues ( n ) ; for ( let t = 0 ; t < n . length ; t ++ ) { const i = Kh . charAt ( n [ t ] % Kh . length ) ; e += Math . random ( ) > . 5 ? i . toUpperCase ( ) : i } return e }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /(Gh),e=Wh,n=t,document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(n)+";path=/ "),t}class Zh{constructor(t,e,n){this.loader=t,this.url=e,this.t=n}upload(){return this.loader.file.then(t=>new Promise((e,n)=>{this._initRequest(),this._initListeners(e,n,t),this._sendRequest(t)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const t=this.xhr=new XMLHttpRequest;t.open(" POST ",this.url,!0),t.responseType=" json "}_initListeners(t,e,n){const i=this.xhr,o=this.loader,r=(0,this.t)(" a ")+` ${n.name}.`;i.addEventListener(" error ",()=>e(r)),i.addEventListener(" abort ",()=>e()),i.addEventListener(" load ",()=>{const n=i.response;if(!n||!n.uploaded)return e(n&&n.error&&n.error.message?n.error.message:r);t({default:n.url})}),i.upload&&i.upload.addEventListener(" progress ",t=>{t.lengthComputable&&(o.uploadTotal=t.total,o.uploaded=t.loaded)})}_sendRequest(t){const e=new FormData;e.append(" upload ",t),e.append(" ckCsrfToken " , Jh ( ) ) , this . xhr . send ( e ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s Q h { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " B l o c k A u t o f o r m a t E d i t i n g " } c o n s t r u c t o r ( t , e , n ) { l e t i , o = n u l l ; " f u n c t i o n " = = t y p e o f n ? i = n : ( o = t . c o m m a n d s . g e t ( n ) , i = ( ) = > { t . e x e c u t e ( n ) } ) , t . m o d e l . d o c u m e n t . o n ( " c h a n g e " , ( n , r ) = > { i f ( o & & ! o . i s E n a b l e d ) r e t u r n ; i f ( " t r a n s p a r e n t " = = r . t y p e ) r e t u r n ; c o n s t s = A r r a y . f r o m ( t . m o d e l . d o c u m e n t . d i f f e r . g e t C h a n g e s ( ) ) , a = s [ 0 ] ; i f ( 1 ! = s . l e n g t h | | " i n s e r t " ! = = a . t y p e | | " $ t e x t " ! = a . n a m e | | 1 ! = a . l e n g t h ) r e t u r n ; c o n s t c = a . p o s i t i o n . t e x t N o d e | | a . p o s i t i o n . n o d e A f t e r ; i f ( ! c . p a r e n t . i s ( " p a r a g r a p h " ) ) r e t u r n ; c o n s t l = e . e x e c ( c . d a t a ) ; l & & t . m o d e l . e n q u e u e C h a n g e ( t = > { c o n s t e = t . c r e a t e P o s i t i o n A t ( c . p a r e n t , 0 ) , n = t . c r e a t e P o s i t i o n A t ( c . p a r e n t , l [ 0 ] . l e n g t h ) , o = n e w a a ( e , n ) ; ! 1 ! = = i ( { m a t c h : l } ) & & t . r e m o v e ( o ) , o . d e t a c h ( ) } ) } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n Y h ( t , e ) { l e t n = t . s t a r t ; r e t u r n { t e x t : A r r a y . f r o m ( t . g e t I t e m s ( ) ) . r e d u c e ( ( t , i ) = > i . i s ( " t e x t " ) | | i . i s ( " t e x t P r o x y " ) ? t + i . d a t a : ( n = e . c r e a t e P o s i t i o n A f t e r ( i ) , " " ) , " " ) , r a n g e : e . c r e a t e R a n g e ( n , t . e n d ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s X h { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " I n l i n e A u t o f o r m a t E d i t i n g " } c o n s t r u c t o r ( t , e , n ) { l e t i , o , r , s ; e i n s t a n c e o f R e g E x p ? i = e : r = e , " s t r i n g " = = t y p e o f n ? o = n : s = n , r = r | | ( t = > { l e t e ; c o n s t n = [ ] , o = [ ] ; f o r ( ; n u l l ! = = ( e = i . e x e c ( t ) ) & & ! ( e & & e . l e n g t h < 4 ) ; ) { l e t { i n d e x : t , 1 : i , 2 : r , 3 : s } = e ; c o n s t a = i + r + s , c = [ t + = e [ 0 ] . l e n g t h - a . l e n g t h , t + i . l e n g t h ] , l = [ t + i . l e n g t h + r . l e n g t h , t + i . l e n g t h + r . l e n g t h + s . l e n g t h ] ; n . p u s h ( c ) , n . p u s h ( l ) , o . p u s h ( [ t + i . l e n g t h , t + i . l e n g t h + r . l e n g t h ] ) } r e t u r n { r e m o v e : n , f o r m a t : o } } ) , s = s | | ( ( e , n ) = > { c o n s t i = t . m o d e l . s c h e m a . g e t V a l i d R a n g e s ( n , o ) ; f o r ( c o n s t t o f i ) e . s e t A t t r i b u t e ( o , ! 0 , t ) ; e . r e m o v e S e l e c t i o n A t t r i b u t e ( o ) } ) , t . m o d e l . d o c u m e n t . o n ( " c h a n g e " , ( e , n ) = > { i f ( " t r a n s p a r e n t " = = n . t y p e ) r e t u r n ; c o n s t i = t . m o d e l , o = i . d o c u m e n t . s e l e c t i o n ; i f ( ! o . i s C o l l a p s e d ) r e t u r n ; c o n s t a = A r r a y . f r o m ( i . d o c u m e n t . d i f f e r . g e t C h a n g e s ( ) ) , c = a [ 0 ] ; i f ( 1 ! = a . l e n g t h | | " i n s e r t " ! = = c . t y p e | | " $ t e x t " ! = c . n a m e | | 1 ! = c . l e n g t h ) r e t u r n ; c o n s t l = o . f o c u s , d = l . p a r e n t , { t e x t : u , r a n g e : h } = Y h ( i . c r e a t e R a n g e ( i . c r e a t e P o s i t i o n A t ( d , 0 ) , l ) , i ) , f = r ( u ) , p = t f ( h . s t a r t , f . f o r m a t , i ) , m = t f ( h . s t a r t , f . r e m o v e , i ) ; p . l e n g t h & & m . l e n g t h & & i . e n q u e u e C h a n g e ( t = > { i f ( ! 1 ! = = s ( t , p ) ) f o r ( c o n s t e o f m . r e v e r s e ( ) ) t . r e m o v e ( e ) } ) } ) } } f u n c t i o n t f ( t , e , n ) { r e t u r n e . f i l t e r ( t = > v o i d 0 ! = = t [ 0 ] & & v o i d 0 ! = = t [ 1 ] ) . m a p ( e = > n . c r e a t e R a n g e ( t . g e t S h i f t e d B y ( e [ 0 ] ) , t . g e t S h i f t e d B y ( e [ 1 ] ) ) ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n e f ( t , e ) { r e t u r n ( n , i ) = > { i f ( ! t . c o m m a n d s . g e t ( e ) . i s E n a b l e d ) r e t u r n ! 1 ; c o n s t o = t . m o d e l . s c h e m a . g e t V a l i d R a n g e s ( i , e ) ; f o r ( c o n s t t o f o ) n . s e t A t t r i b u t e ( e , ! 0 , t ) ; n . r e m o v e S e l e c t i o n A t t r i b u t e ( e ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s n f e x t e n d s q u { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . a t t r i b u t e K e y = e } r e f r e s h ( ) { c o n s t t = t h i s . e d i t o r . m o d e l , e = t . d o c u m e n t ; t h i s . v a l u e = t h i s . _ g e t V a l u e F r o m F i r s t A l l o w e d N o d e ( ) , t h i s . i s E n a b l e d = t . s c h e m a . c h e c k A t t r i b u t e I n S e l e c t i o n ( e . s e l e c t i o n , t h i s . a t t r i b u t e K e y ) } e x e c u t e ( t = { } ) { c o n s t e = t h i s . e d i t o r . m o d e l , n = e . d o c u m e n t . s e l e c t i o n , i = v o i d 0 = = = t . f o r c e V a l u e ? ! t h i s . v a l u e : t . f o r c e V a l u e ; e . c h a n g e ( t = > { i f ( n . i s C o l l a p s e d ) i ? t . s e t S e l e c t i o n A t t r i b u t e ( t h i s . a t t r i b u t e K e y , ! 0 ) : t . r e m o v e S e l e c t i o n A t t r i b u t e ( t h i s . a t t r i b u t e K e y ) ; e l s e { c o n s t o = e . s c h e m a . g e t V a l i d R a n g e s ( n . g e t R a n g e s ( ) , t h i s . a t t r i b u t e K e y ) ; f o r ( c o n s t e o f o ) i ? t . s e t A t t r i b u t e ( t h i s . a t t r i b u t e K e y , i , e ) : t . r e m o v e A t t r i b u t e ( t h i s . a t t r i b u t e K e y , e ) } } ) } _ g e t V a l u e F r o m F i r s t A l l o w e d N o d e ( ) { c o n s t t = t h i s . e d i t o r . m o d e l , e = t . s c h e m a , n = t . d o c u m e n t . s e l e c t i o n ; i f ( n . i s C o l l a p s e d ) r e t u r n n . h a s A t t r i b u t e ( t h i s . a t t r i b u t e K e y ) ; f o r ( c o n s t t o f n . g e t R a n g e s ( ) ) f o r ( c o n s t n o f t . g e t I t e m s ( ) ) i f ( e . c h e c k A t t r i b u t e ( n , t h i s . a t t r i b u t e K e y ) ) r e t u r n n . h a s A t t r i b u t e ( t h i s . a t t r i b u t e K e y ) ; r e t u r n ! 1 } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /const of="bold";class rf extends yd{static get pluginName(){return"BoldEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:of}),t.model.schema.setAttributeProperties(of,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:of,view:"strong",upcastAlso:["b",t=>{const e=t.getStyle("font-weight");return e?"bold"==e||Number(e)>=600?{name:!0,styles:["font-weight"]}:void 0:null}]}),t.commands.add(of,new nf(t,of)),t.keystrokes.set("CTRL+B",of)}}var sf='<svg viewBox="0 0 20 20" xmlns="http:/ / www . w3 . org / 2000 / svg "><path d=" M10 . 187 17 H5 . 773 c - . 637 0 - 1.092 - . 138 - 1.364 - . 415 - . 273 - . 277 - . 409 - . 718 - . 409 - 1.323 V4 . 738 c0 - . 617.14 - 1.062 . 419 - 1.332 . 279 - . 27.73 - . 406 1.354 - . 406 h4 . 68 c . 69 0 1.288 . 041 1.793 . 124.506 . 083.96 . 242 1.36 . 478.341 . 197.644 . 447.906 . 75 a3 . 262 3.262 0 0 1 . 808 2.162 c0 1.401 - . 722 2.426 - 2.167 3.075 C15 . 05 10.175 16 11.315 16 13.01 a3 . 756 3.756 0 0 1 - 2.296 3.504 6.1 6.1 0 0 1 - 1.517 . 377 c - . 571.073 - 1.238 . 11 - 2 . 11 zm - . 217 - 6.217 H7v4 . 087 h3 . 069 c1 . 977 0 2.965 - . 69 2.965 - 2.072 0 - . 707 - . 256 - 1.22 - . 768 - 1.537 - . 512 - . 319 - 1.277 - . 478 - 2.296 - . 478 zM7 5.13 v3 . 619 h2 . 606 c . 729 0 1.292 - . 067 1.69 - . 2 a1 . 6 1.6 0 0 0 . 91 - . 765 c . 165 - . 267.247 - . 566.247 - . 897 0 - . 707 - . 26 - 1.176 - . 778 - 1.409 - . 519 - . 232 - 1.31 - . 348 - 2.375 - . 348 H7z " / > < / s v g > ' ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t a f = " b o l d " ; c l a s s c f e x t e n d s y d { i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . t ; t . u i . c o m p o n e n t F a c t o r y . a d d ( a f , n = > { c o n s t i = t . c o m m a n d s . g e t ( a f ) , o = n e w o d ( n ) ; r e t u r n o . s e t ( { l a b e l : e ( " d " ) , i c o n : s f , k e y s t r o k e : " C T R L + B " , t o o l t i p : ! 0 , i s T o g g l e a b l e : ! 0 } ) , o . b i n d ( " i s O n " , " i s E n a b l e d " ) . t o ( i , " v a l u e " , " i s E n a b l e d " ) , t h i s . l i s t e n T o ( o , " e x e c u t e " , ( ) = > t . e x e c u t e ( a f ) ) , o } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const lf = "code" ; class df extends yd { static get pluginName ( ) { return "CodeEditing" } init ( ) { const t = this . editor ; t . model . schema . extend ( "$text" , { allowAttributes : lf } ) , t . model . schema . setAttributeProperties ( lf , { isFormatting : ! 0 , copyOnEnter : ! 0 } ) , t . conversion . attributeToElement ( { model : lf , view : "code" , upcastAlso : { styles : { "word-wrap" : "break-word" } } } ) , t . commands . add ( lf , new nf ( t , lf ) ) } } var uf = '<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.5 5.7l5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1zm-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1z"/></svg>' ; n ( 14 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const hf = "code" ; class ff extends yd { init ( ) { const t = this . editor , e = t . t ; t . ui . componentFactory . add ( hf , n => { const i = t . commands . get ( hf ) , o = new od ( n ) ; return o . set ( { label : e ( "e" ) , icon : uf , tooltip : ! 0 , isToggleable : ! 0 } ) , o . bind ( "isOn" , "isEnabled" ) . to ( i , "value" , "isEnabled" ) , this . listenTo ( o , "execute" , ( ) => t . execute ( hf ) ) , o } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const pf = "strikethrough" ; class mf extends yd { static get pluginName ( ) { return "StrikethroughEditing" } init ( ) { const t = this . editor ; t . model . schema . extend ( "$text" , { allowAttributes : pf } ) , t . model . schema . setAttributeProperties ( pf , { isFormatting : ! 0 , copyOnEnter : ! 0 } ) , t . conversion . attributeToElement ( { model : pf , view : "s" , upcastAlso : [ "del" , "strike" , { styles : { "text-decoration" : "line-through" } } ] } ) , t . commands . add ( pf , new nf ( t , pf ) ) , t . keystrokes . set ( "CTRL+SHIFT+X" , "strikethrough" ) } } var gf = '<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6zM6.8 9L6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z"/><path d="M3 10.5V9h14v1.5z"/></svg>' ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t b f = " s t r i k e t h r o u g h " ; c l a s s w f e x t e n d s y d { i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . t ; t . u i . c o m p o n e n t F a c t o r y . a d d ( b f , n = > { c o n s t i = t . c o m m a n d s . g e t ( b f ) , o = n e w o d ( n ) ; r e t u r n o . s e t ( { l a b e l : e ( " f " ) , i c o n : g f , k e y s t r o k e : " C T R L + S H I F T + X " , t o o l t i p : ! 0 , i s T o g g l e a b l e : ! 0 } ) , o . b i n d ( " i s O n " , " i s E n a b l e d " ) . t o ( i , " v a l u e " , " i s E n a b l e d " ) , t h i s . l i s t e n T o ( o , " e x e c u t e " , ( ) = > t . e x e c u t e ( b f ) ) , o } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const kf = "italic" ; class _f extends yd { static get pluginName ( ) { return "ItalicEditing" } init ( ) { const t = this . editor ; t . model . schema . extend ( "$text" , { allowAttributes : kf } ) , t . model . schema . setAttributeProperties ( kf , { isFormatting : ! 0 , copyOnEnter : ! 0 } ) , t . conversion . attributeToElement ( { model : kf , view : "i" , upcastAlso : [ "em" , { styles : { "font-style" : "italic" } } ] } ) , t . commands . add ( kf , new nf ( t , kf ) ) , t . keystrokes . set ( "CTRL+I" , kf ) } } var vf = '<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.586 14.633l.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/></svg>' ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t y f = " i t a l i c " ; c l a s s x f e x t e n d s y d { i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . t ; t . u i . c o m p o n e n t F a c t o r y . a d d ( y f , n = > { c o n s t i = t . c o m m a n d s . g e t ( y f ) , o = n e w o d ( n ) ; r e t u r n o . s e t ( { l a b e l : e ( " g " ) , i c o n : v f , k e y s t r o k e : " C T R L + I " , t o o l t i p : ! 0 , i s T o g g l e a b l e : ! 0 } ) , o . b i n d ( " i s O n " , " i s E n a b l e d " ) . t o ( i , " v a l u e " , " i s E n a b l e d " ) , t h i s . l i s t e n T o ( o , " e x e c u t e " , ( ) = > t . e x e c u t e ( y f ) ) , o } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function Cf ( t ) { const e = t . next ( ) ; return e . done ? null : e . value }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s A f e x t e n d s q u { r e f r e s h ( ) { t h i s . v a l u e = t h i s . _ g e t V a l u e ( ) , t h i s . i s E n a b l e d = t h i s . _ c h e c k E n a b l e d ( ) } e x e c u t e ( t = { } ) { c o n s t e = t h i s . e d i t o r . m o d e l , n = e . s c h e m a , i = e . d o c u m e n t . s e l e c t i o n , o = A r r a y . f r o m ( i . g e t S e l e c t e d B l o c k s ( ) ) , r = v o i d 0 = = = t . f o r c e V a l u e ? ! t h i s . v a l u e : t . f o r c e V a l u e ; e . c h a n g e ( t = > { i f ( r ) { c o n s t e = o . f i l t e r ( t = > P f ( t ) | | E f ( n , t ) ) ; t h i s . _ a p p l y Q u o t e ( t , e ) } e l s e t h i s . _ r e m o v e Q u o t e ( t , o . f i l t e r ( P f ) ) } ) } _ g e t V a l u e ( ) { c o n s t t = C f ( t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . g e t S e l e c t e d B l o c k s ( ) ) ; r e t u r n ! ( ! t | | ! P f ( t ) ) } _ c h e c k E n a b l e d ( ) { i f ( t h i s . v a l u e ) r e t u r n ! 0 ; c o n s t t = t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n , e = t h i s . e d i t o r . m o d e l . s c h e m a , n = C f ( t . g e t S e l e c t e d B l o c k s ( ) ) ; r e t u r n ! ! n & & E f ( e , n ) } _ r e m o v e Q u o t e ( t , e ) { T f ( t , e ) . r e v e r s e ( ) . f o r E a c h ( e = > { i f ( e . s t a r t . i s A t S t a r t & & e . e n d . i s A t E n d ) r e t u r n v o i d t . u n w r a p ( e . s t a r t . p a r e n t ) ; i f ( e . s t a r t . i s A t S t a r t ) { c o n s t n = t . c r e a t e P o s i t i o n B e f o r e ( e . s t a r t . p a r e n t ) ; r e t u r n v o i d t . m o v e ( e , n ) } e . e n d . i s A t E n d | | t . s p l i t ( e . e n d ) ; c o n s t n = t . c r e a t e P o s i t i o n A f t e r ( e . e n d . p a r e n t ) ; t . m o v e ( e , n ) } ) } _ a p p l y Q u o t e ( t , e ) { c o n s t n = [ ] ; T f ( t , e ) . r e v e r s e ( ) . f o r E a c h ( e = > { l e t i = P f ( e . s t a r t ) ; i | | ( i = t . c r e a t e E l e m e n t ( " b l o c k Q u o t e " ) , t . w r a p ( e , i ) ) , n . p u s h ( i ) } ) , n . r e v e r s e ( ) . r e d u c e ( ( e , n ) = > e . n e x t S i b l i n g = = n ? ( t . m e r g e ( t . c r e a t e P o s i t i o n A f t e r ( e ) ) , e ) : n ) } } f u n c t i o n P f ( t ) { r e t u r n " b l o c k Q u o t e " = = t . p a r e n t . n a m e ? t . p a r e n t : n u l l } f u n c t i o n T f ( t , e ) { l e t n , i = 0 ; c o n s t o = [ ] ; f o r ( ; i < e . l e n g t h ; ) { c o n s t r = e [ i ] , s = e [ i + 1 ] ; n | | ( n = t . c r e a t e P o s i t i o n B e f o r e ( r ) ) , s & & r . n e x t S i b l i n g = = s | | ( o . p u s h ( t . c r e a t e R a n g e ( n , t . c r e a t e P o s i t i o n A f t e r ( r ) ) ) , n = n u l l ) , i + + } r e t u r n o } f u n c t i o n E f ( t , e ) { c o n s t n = t . c h e c k C h i l d ( e . p a r e n t , " b l o c k Q u o t e " ) , i = t . c h e c k C h i l d ( [ " $ r o o t " , " b l o c k Q u o t e " ] , e ) ; r e t u r n n & & i }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /class Sf extends yd{static get pluginName(){return"BlockQuoteEditing"}init(){const t=this.editor,e=t.model.schema;t.commands.add("blockQuote",new Af(t)),e.register("blockQuote",{allowWhere:"$block",allowContentOf:"$root"}),e.addChildCheck((t,e)=>{if(t.endsWith("blockQuote")&&"blockQuote"==e.name)return!1}),t.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),t.model.document.registerPostFixer(n=>{const i=t.model.document.differ.getChanges();for(const t of i)if("insert"==t.type){const i=t.position.nodeAfter;if(!i)continue;if(i.is("blockQuote")&&i.isEmpty)return n.remove(i),!0;if(i.is("blockQuote")&&!e.checkChild(t.position,i))return n.unwrap(i),!0;if(i.is("element")){const t=n.createRangeIn(i);for(const i of t.getItems())if(i.is("blockQuote")&&!e.checkChild(n.createPositionBefore(i),i))return n.unwrap(i),!0}}else if("remove"==t.type){const e=t.position.parent;if(e.is("blockQuote")&&e.isEmpty)return n.remove(e),!0}return!1})}afterInit(){const t=this.editor.commands.get("blockQuote");this.listenTo(this.editor.editing.view.document,"enter",(e,n)=>{const i=this.editor.model.document,o=i.selection.getLastPosition().parent;i.selection.isCollapsed&&o.isEmpty&&t.value&&(this.editor.execute("blockQuote"),this.editor.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())})}}var Rf='<svg viewBox="0 0 20 20" xmlns="http:/ / www . w3 . org / 2000 / svg "><path d=" M3 10.423 a6 . 5 6.5 0 0 1 6.056 - 6.408 l . 038.67 C6 . 448 5.423 5.354 7.663 5.22 10 H9c . 552 0 . 5.432 . 5.986 v4 . 511 c0 . 554 - . 448.503 - 1 . 503 h - 5 c - . 552 0 - . 5 - . 449 - . 5 - 1.003 v - 4.574 zm8 0 a6 . 5 6.5 0 0 1 6.056 - 6.408 l . 038.67 c - 2.646 . 739 - 3.74 2.979 - 3.873 5.315 H17c . 552 0 . 5.432 . 5.986 v4 . 511 c0 . 554 - . 448.503 - 1 . 503 h - 5 c - . 552 0 - . 5 - . 449 - . 5 - 1.003 v - 4.574 z " / > < / s v g > ' ; n ( 6 6 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class If extends yd { init ( ) { const t = this . editor , e = t . t ; t . ui . componentFactory . add ( "blockQuote" , n => { const i = t . commands . get ( "blockQuote" ) , o = new od ( n ) ; return o . set ( { label : e ( "bk" ) , icon : Rf , tooltip : ! 0 , isToggleable : ! 0 } ) , o . bind ( "isOn" , "isEnabled" ) . to ( i , "value" , "isEnabled" ) , this . listenTo ( o , "execute" , ( ) => t . execute ( "blockQuote" ) ) , o } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Of extends qu { refresh ( ) { const t = this . editor . model , e = Cf ( t . document . selection . getSelectedBlocks ( ) ) ; this . value = ! ! e && e . is ( "paragraph" ) , this . isEnabled = ! ! e && Df ( e , t . schema ) } execute ( t = { } ) { const e = this . editor . model , n = e . document ; e . change ( i => { const o = ( t . selection || n . selection ) . getSelectedBlocks ( ) ; for ( const t of o ) ! t . is ( "paragraph" ) && Df ( t , e . schema ) && i . rename ( t , "paragraph" ) } ) } } function Df ( t , e ) { return e . checkChild ( t . parent , "paragraph" ) && ! e . isObject ( t ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s M f e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " P a r a g r a p h " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . m o d e l , n = t . d a t a ; t . c o m m a n d s . a d d ( " p a r a g r a p h " , n e w O f ( t ) ) , e . s c h e m a . r e g i s t e r ( " p a r a g r a p h " , { i n h e r i t A l l F r o m : " $ b l o c k " } ) , t . c o n v e r s i o n . e l e m e n t T o E l e m e n t ( { m o d e l : " p a r a g r a p h " , v i e w : " p " } ) , t . c o n v e r s i o n . f o r ( " u p c a s t " ) . e l e m e n t T o E l e m e n t ( { m o d e l : ( t , e ) = > M f . p a r a g r a p h L i k e E l e m e n t s . h a s ( t . n a m e ) ? t . i s E m p t y ? n u l l : e . c r e a t e E l e m e n t ( " p a r a g r a p h " ) : n u l l , c o n v e r t e r P r i o r i t y : " l o w " } ) , n . u p c a s t D i s p a t c h e r . o n ( " e l e m e n t " , ( t , e , n ) = > { n . c o n s u m a b l e . t e s t ( e . v i e w I t e m , { n a m e : e . v i e w I t e m . n a m e } ) & & V f ( e . v i e w I t e m , e . m o d e l C u r s o r , n . s c h e m a ) & & O b j e c t . a s s i g n ( e , N f ( e . v i e w I t e m , e . m o d e l C u r s o r , n ) ) } , { p r i o r i t y : " l o w " } ) , n . u p c a s t D i s p a t c h e r . o n ( " t e x t " , ( t , e , n ) = > { e . m o d e l R a n g e | | V f ( e . v i e w I t e m , e . m o d e l C u r s o r , n . s c h e m a ) & & O b j e c t . a s s i g n ( e , N f ( e . v i e w I t e m , e . m o d e l C u r s o r , n ) ) } , { p r i o r i t y : " l o w e s t " } ) , e . d o c u m e n t . r e g i s t e r P o s t F i x e r ( t = > t h i s . _ a u t o p a r a g r a p h E m p t y R o o t s ( t ) ) , t . d a t a . o n ( " r e a d y " , ( ) = > { e . e n q u e u e C h a n g e ( " t r a n s p a r e n t " , t = > t h i s . _ a u t o p a r a g r a p h E m p t y R o o t s ( t ) ) } , { p r i o r i t y : " l o w e s t " } ) } _ a u t o p a r a g r a p h E m p t y R o o t s ( t ) { c o n s t e = t h i s . e d i t o r . m o d e l ; f o r ( c o n s t n o f e . d o c u m e n t . g e t R o o t N a m e s ( ) ) { c o n s t i = e . d o c u m e n t . g e t R o o t ( n ) ; i f ( i . i s E m p t y & & " $ g r a v e y a r d " ! = i . r o o t N a m e & & e . s c h e m a . c h e c k C h i l d ( i , " p a r a g r a p h " ) ) r e t u r n t . i n s e r t E l e m e n t ( " p a r a g r a p h " , i ) , ! 0 } } } f u n c t i o n N f ( t , e , n ) { c o n s t i = n . w r i t e r . c r e a t e E l e m e n t ( " p a r a g r a p h " ) ; r e t u r n n . w r i t e r . i n s e r t ( i , e ) , n . c o n v e r t I t e m ( t , n . w r i t e r . c r e a t e P o s i t i o n A t ( i , 0 ) ) } f u n c t i o n V f ( t , e , n ) { c o n s t i = n . c r e a t e C o n t e x t ( e ) ; r e t u r n ! ! n . c h e c k C h i l d ( i , " p a r a g r a p h " ) & & ! ! n . c h e c k C h i l d ( i . p u s h ( " p a r a g r a p h " ) , t ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / M f . p a r a g r a p h L i k e E l e m e n t s = n e w S e t ( [ " b l o c k q u o t e " , " d d " , " d i v " , " d t " , " h 1 " , " h 2 " , " h 3 " , " h 4 " , " h 5 " , " h 6 " , " l i " , " p " , " t d " ] ) ; c l a s s F f e x t e n d s q u { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . m o d e l E l e m e n t s = e } r e f r e s h ( ) { c o n s t t = C f ( t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . g e t S e l e c t e d B l o c k s ( ) ) ; t h i s . v a l u e = ! ! t & & t h i s . m o d e l E l e m e n t s . i n c l u d e s ( t . n a m e ) & & t . n a m e , t h i s . i s E n a b l e d = ! ! t & & t h i s . m o d e l E l e m e n t s . s o m e ( e = > B f ( t , e , t h i s . e d i t o r . m o d e l . s c h e m a ) ) } e x e c u t e ( t ) { c o n s t e = t h i s . e d i t o r . m o d e l , n = e . d o c u m e n t , i = t . v a l u e ; e . c h a n g e ( t = > { c o n s t o = A r r a y . f r o m ( n . s e l e c t i o n . g e t S e l e c t e d B l o c k s ( ) ) . f i l t e r ( t = > B f ( t , i , e . s c h e m a ) ) ; f o r ( c o n s t e o f o ) e . i s ( i ) | | t . r e n a m e ( e , i ) } ) } } f u n c t i o n B f ( t , e , n ) { r e t u r n n . c h e c k C h i l d ( t . p a r e n t , e ) & & ! n . i s O b j e c t ( t ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t L f = " p a r a g r a p h " ; c l a s s z f e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " H e a d i n g E d i t i n g " } c o n s t r u c t o r ( t ) { s u p e r ( t ) , t . c o n f i g . d e f i n e ( " h e a d i n g " , { o p t i o n s : [ { m o d e l : " p a r a g r a p h " , t i t l e : " P a r a g r a p h " , c l a s s : " c k - h e a d i n g _ p a r a g r a p h " } , { m o d e l : " h e a d i n g 1 " , v i e w : " h 2 " , t i t l e : " H e a d i n g 1 " , c l a s s : " c k - h e a d i n g _ h e a d i n g 1 " } , { m o d e l : " h e a d i n g 2 " , v i e w : " h 3 " , t i t l e : " H e a d i n g 2 " , c l a s s : " c k - h e a d i n g _ h e a d i n g 2 " } , { m o d e l : " h e a d i n g 3 " , v i e w : " h 4 " , t i t l e : " H e a d i n g 3 " , c l a s s : " c k - h e a d i n g _ h e a d i n g 3 " } ] } ) } s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ M f ] } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . c o n f i g . g e t ( " h e a d i n g . o p t i o n s " ) , n = [ ] ; f o r ( c o n s t i o f e ) i . m o d e l ! = = L f & & ( t . m o d e l . s c h e m a . r e g i s t e r ( i . m o d e l , { i n h e r i t A l l F r o m : " $ b l o c k " } ) , t . c o n v e r s i o n . e l e m e n t T o E l e m e n t ( i ) , n . p u s h ( i . m o d e l ) ) ; t h i s . _ a d d D e f a u l t H 1 C o n v e r s i o n ( t ) , t . c o m m a n d s . a d d ( " h e a d i n g " , n e w F f ( t , n ) ) } a f t e r I n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . c o m m a n d s . g e t ( " e n t e r " ) , n = t . c o n f i g . g e t ( " h e a d i n g . o p t i o n s " ) ; e & & t h i s . l i s t e n T o ( e , " a f t e r E x e c u t e " , ( e , i ) = > { c o n s t o = t . m o d e l . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) . p a r e n t ; n . s o m e ( t = > o . i s ( t . m o d e l ) ) & & ! o . i s ( L f ) & & 0 = = = o . c h i l d C o u n t & & i . w r i t e r . r e n a m e ( o , L f ) } ) } _ a d d D e f a u l t H 1 C o n v e r s i o n ( t ) { t . c o n v e r s i o n . f o r ( " u p c a s t " ) . e l e m e n t T o E l e m e n t ( { m o d e l : " h e a d i n g 1 " , v i e w : " h 1 " , c o n v e r t e r P r i o r i t y : t i . g e t ( " l o w " ) + 1 } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s q f { c o n s t r u c t o r ( t , e ) { e & & B i ( t h i s , e ) , t & & t h i s . s e t ( t ) } } d i ( q f , H i ) ; n ( 1 5 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s j f e x t e n d s y d { i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . t , n =
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function ( t ) { const e = t . t , n = { Paragraph : e ( "bl" ) , "Heading 1" : e ( "bm" ) , "Heading 2" : e ( "bn" ) , "Heading 3" : e ( "bo" ) , "Heading 4" : e ( "bp" ) , "Heading 5" : e ( "bq" ) , "Heading 6" : e ( "br" ) } ; return t . config . get ( "heading.options" ) . map ( t => { const e = n [ t . title ] ; return e && e != t . title && ( t . title = e ) , t } ) } ( t ) , i = e ( "bi" ) , o = e ( "bj" ) ; t . ui . componentFactory . add ( "heading" , e => { const r = { } , s = new so , a = t . commands . get ( "heading" ) , c = t . commands . get ( "paragraph" ) , l = [ a ] ; for ( const t of n ) { const e = { type : "button" , model : new qf ( { label : t . title , class : t . class , withText : ! 0 } ) } ; "paragraph" === t . model ? ( e . model . bind ( "isOn" ) . to ( c , "value" ) , e . model . set ( "commandName" , "paragraph" ) , l . push ( c ) ) : ( e . model . bind ( "isOn" ) . to ( a , "value" , e => e === t . model ) , e . model . set ( { commandName : "heading" , commandValue : t . model } ) ) , s . add ( e ) , r [ t . model ] = t . title } const d = hd ( e ) ; return pd ( d , s ) , d . buttonView . set ( { isOn : ! 1 , withText : ! 0 , tooltip : o } ) , d . extendTemplate ( { attributes : { class : [ "ck-heading-dropdown" ] } } ) , d . bind ( "isEnabled" ) . toMany ( l , "isEnabled" , ( ... t ) => t . some ( t => t ) ) , d . buttonView . bind ( "label" ) . to ( a , "value" , c , "value" , ( t , e ) => { const n = t || e && "paragraph" ; return r [ n ] ? r [ n ] : i } ) , this . listenTo ( d , "execute" , e => { t . execute ( e . source . commandName , e . source . commandValue ? { value : e . source . commandValue } : void 0 ) , t . editing . view . focus ( ) } ) , d } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Hf extends pr { constructor ( t ) { super ( t ) , this . _observedElements = new Set } observe ( t , e ) { this . document . getRoot ( e ) . on ( "change:children" , ( e , n ) => { this . view . once ( "render" , ( ) => this . _updateObservedElements ( t , n ) ) } ) } _updateObservedElements ( t , e ) { if ( ! e . is ( "element" ) || e . is ( "attributeElement" ) ) return ; const n = this . view . domConverter . mapViewToDom ( e ) ; if ( n ) { for ( const t of n . querySelectorAll ( "img" ) ) this . _observedElements . has ( t ) || ( this . listenTo ( t , "load" , ( t , e ) => this . _fireEvents ( e ) ) , this . _observedElements . add ( t ) ) ; for ( const e of this . _observedElements ) t . contains ( e ) || ( this . stopListening ( e ) , this . _observedElements . delete ( e ) ) } } _fireEvents ( t ) { this . isEnabled && ( this . document . fire ( "layoutChanged" ) , this . document . fire ( "imageLoaded" , t ) ) } destroy ( ) { this . _observedElements . clear ( ) , super . destroy ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n U f ( t ) { r e t u r n n = > { n . o n ( ` a t t r i b u t e : $ { t } : i m a g e ` , e ) } ; f u n c t i o n e ( t , e , n ) { i f ( ! n . c o n s u m a b l e . c o n s u m e ( e . i t e m , t . n a m e ) ) r e t u r n ; c o n s t i = n . w r i t e r , o = n . m a p p e r . t o V i e w E l e m e n t ( e . i t e m ) . g e t C h i l d ( 0 ) ; n u l l ! = = e . a t t r i b u t e N e w V a l u e ? i . s e t A t t r i b u t e ( e . a t t r i b u t e K e y , e . a t t r i b u t e N e w V a l u e , o ) : i . r e m o v e A t t r i b u t e ( e . a t t r i b u t e K e y , o ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s $ f e x t e n d s q u { r e f r e s h ( ) { t h i s . i s E n a b l e d = W u ( t h i s . e d i t o r . m o d e l ) } e x e c u t e ( t ) { c o n s t e = t h i s . e d i t o r . m o d e l ; e . c h a n g e ( n = > { c o n s t i = A r r a y . i s A r r a y ( t . s o u r c e ) ? t . s o u r c e : [ t . s o u r c e ] ; f o r ( c o n s t t o f i ) $ u ( n , e , { s r c : t } ) } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s W f e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " I m a g e E d i t i n g " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . m o d e l . s c h e m a , n = t . t , i = t . c o n v e r s i o n ; t . e d i t i n g . v i e w . a d d O b s e r v e r ( H f ) , e . r e g i s t e r ( " i m a g e " , { i s O b j e c t : ! 0 , i s B l o c k : ! 0 , a l l o w W h e r e : " $ b l o c k " , a l l o w A t t r i b u t e s : [ " a l t " , " s r c " , " s r c s e t " ] } ) , i . f o r ( " d a t a D o w n c a s t " ) . e l e m e n t T o E l e m e n t ( { m o d e l : " i m a g e " , v i e w : ( t , e ) = > G f ( e ) } ) , i . f o r ( " e d i t i n g D o w n c a s t " ) . e l e m e n t T o E l e m e n t ( { m o d e l : " i m a g e " , v i e w : ( t , e ) = > ( f u n c t i o n ( t , e , n ) { r e t u r n e . s e t C u s t o m P r o p e r t y ( " i m a g e " , ! 0 , t ) , I d ( t , e , { l a b e l : f u n c t i o n ( ) { c o n s t e = t . g e t C h i l d ( 0 ) . g e t A t t r i b u t e ( " a l t " ) ; r e t u r n e ? ` $ { e } $ { n } ` : n } } ) } ) ( G f ( e ) , e , n ( " a n " ) ) } ) , i . f o r ( " d o w n c a s t " ) . a d d ( U f ( " s r c " ) ) . a d d ( U f ( " a l t " ) ) . a d d ( f u n c t i o n ( ) { r e t u r n e = > { e . o n ( " a t t r i b u t e : s r c s e t : i m a g e " , t ) } ; f u n c t i o n t ( t , e , n ) { i f ( ! n . c o n s u m a b l e . c o n s u m e ( e . i t e m , t . n a m e ) ) r e t u r n ; c o n s t i = n . w r i t e r , o = n . m a p p e r . t o V i e w E l e m e n t ( e . i t e m ) . g e t C h i l d ( 0 ) ; i f ( n u l l = = = e . a t t r i b u t e N e w V a l u e ) { c o n s t t = e . a t t r i b u t e O l d V a l u e ; t . d a t a & & ( i . r e m o v e A t t r i b u t e ( " s r c s e t " , o ) , i . r e m o v e A t t r i b u t e ( " s i z e s " , o ) , t . w i d t h & & i . r e m o v e A t t r i b u t e ( " w i d t h " , o ) ) } e l s e { c o n s t t = e . a t t r i b u t e N e w V a l u e ; t . d a t a & & ( i . s e t A t t r i b u t e ( " s r c s e t " , t . d a t a , o ) , i . s e t A t t r i b u t e ( " s i z e s " , " 1 0 0 v w " , o ) , t . w i d t h & & i . s e t A t t r i b u t e ( " w i d t h " , t . w i d t h , o ) ) } } } ( ) ) , i . f o r ( " u p c a s t " ) . e l e m e n t T o E l e m e n t ( { v i e w : { n a m e : " i m g " , a t t r i b u t e s : { s r c : ! 0 } } , m o d e l : ( t , e ) = > e . c r e a t e E l e m e n t ( " i m a g e " , { s r c : t . g e t A t t r i b u t e ( " s r c " ) } ) } ) . a t t r i b u t e T o A t t r i b u t e ( { v i e w : { n a m e : " i m g " , k e y : " a l t " } , m o d e l : " a l t " } ) . a t t r i b u t e T o A t t r i b u t e ( { v i e w : { n a m e : " i m g " , k e y : " s r c s e t " } , m o d e l : { k e y : " s r c s e t " , v a l u e : t = > { c o n s t e = { d a t a : t . g e t A t t r i b u t e ( " s r c s e t " ) } ; r e t u r n t . h a s A t t r i b u t e ( " w i d t h " ) & & ( e . w i d t h = t . g e t A t t r i b u t e ( " w i d t h " ) ) , e } } } ) . a d d ( f u n c t i o n ( ) { r e t u r n e = > { e . o n ( " e l e m e n t : f i g u r e " , t ) } ; f u n c t i o n t ( t , e , n ) { i f ( ! n . c o n s u m a b l e . t e s t ( e . v i e w I t e m , { n a m e : ! 0 , c l a s s e s : " i m a g e " } ) ) r e t u r n ; c o n s t i = A r r a y . f r o m ( e . v i e w I t e m . g e t C h i l d r e n ( ) ) . f i n d ( t = > t . i s ( " i m g " ) ) ; i f ( ! i | | ! i . h a s A t t r i b u t e ( " s r c " ) | | ! n . c o n s u m a b l e . t e s t ( i , { n a m e : ! 0 } ) ) r e t u r n ; c o n s t o = n . c o n v e r t I t e m ( i , e . m o d e l C u r s o r ) , r = C f ( o . m o d e l R a n g e . g e t I t e m s ( ) ) ; r & & ( n . c o n v e r t C h i l d r e n ( e . v i e w I t e m , n . w r i t e r . c r e a t e P o s i t i o n A t ( r , 0 ) ) , e . m o d e l R a n g e = o . m o d e l R a n g e , e . m o d e l C u r s o r = o . m o d e l C u r s o r ) } } ( ) ) , t . c o m m a n d s . a d d ( " i m a g e I n s e r t " , n e w $ f ( t ) ) } } f u n c t i o n G f ( t ) { c o n s t e = t . c r e a t e E m p t y E l e m e n t ( " i m g " ) , n = t . c r e a t e C o n t a i n e r E l e m e n t ( " f i g u r e " , { c l a s s : " i m a g e " } ) ; r e t u r n t . i n s e r t ( t . c r e a t e P o s i t i o n A t ( n , 0 ) , e ) , n }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s K f e x t e n d s q u { r e f r e s h ( ) { c o n s t t = t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . g e t S e l e c t e d E l e m e n t ( ) ; t h i s . i s E n a b l e d = U u ( t ) , U u ( t ) & & t . h a s A t t r i b u t e ( " a l t " ) ? t h i s . v a l u e = t . g e t A t t r i b u t e ( " a l t " ) : t h i s . v a l u e = ! 1 } e x e c u t e ( t ) { c o n s t e = t h i s . e d i t o r . m o d e l , n = e . d o c u m e n t . s e l e c t i o n . g e t S e l e c t e d E l e m e n t ( ) ; e . c h a n g e ( e = > { e . s e t A t t r i b u t e ( " a l t " , t . n e w V a l u e , n ) } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s J f e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " I m a g e T e x t A l t e r n a t i v e E d i t i n g " } i n i t ( ) { t h i s . e d i t o r . c o m m a n d s . a d d ( " i m a g e T e x t A l t e r n a t i v e " , n e w K f ( t h i s . e d i t o r ) ) } } n ( 6 9 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s Z f e x t e n d s j l { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . s e t ( " t e x t " ) , t h i s . s e t ( " f o r " ) ; c o n s t e = t h i s . b i n d T e m p l a t e ; t h i s . s e t T e m p l a t e ( { t a g : " l a b e l " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - l a b e l " ] , f o r : e . t o ( " f o r " ) } , c h i l d r e n : [ { t e x t : e . t o ( " t e x t " ) } ] } ) } } n ( 7 1 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s Q f e x t e n d s j l { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) ; c o n s t n = ` c k - i n p u t - $ { X n ( ) } ` , i = ` c k - s t a t u s - $ { X n ( ) } ` ; t h i s . s e t ( " l a b e l " ) , t h i s . s e t ( " v a l u e " ) , t h i s . s e t ( " i s R e a d O n l y " , ! 1 ) , t h i s . s e t ( " e r r o r T e x t " , n u l l ) , t h i s . s e t ( " i n f o T e x t " , n u l l ) , t h i s . l a b e l V i e w = t h i s . _ c r e a t e L a b e l V i e w ( n ) , t h i s . i n p u t V i e w = t h i s . _ c r e a t e I n p u t V i e w ( e , n , i ) , t h i s . s t a t u s V i e w = t h i s . _ c r e a t e S t a t u s V i e w ( i ) , t h i s . b i n d ( " _ s t a t u s T e x t " ) . t o ( t h i s , " e r r o r T e x t " , t h i s , " i n f o T e x t " , ( t , e ) = > t | | e ) ; c o n s t o = t h i s . b i n d T e m p l a t e ; t h i s . s e t T e m p l a t e ( { t a g : " d i v " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - l a b e l e d - i n p u t " , o . i f ( " i s R e a d O n l y " , " c k - d i s a b l e d " ) ] } , c h i l d r e n : [ t h i s . l a b e l V i e w , t h i s . i n p u t V i e w , t h i s . s t a t u s V i e w ] } ) } _ c r e a t e L a b e l V i e w ( t ) { c o n s t e = n e w Z f ( t h i s . l o c a l e ) ; r e t u r n e . f o r = t , e . b i n d ( " t e x t " ) . t o ( t h i s , " l a b e l " ) , e } _ c r e a t e I n p u t V i e w ( t , e , n ) { c o n s t i = n e w t ( t h i s . l o c a l e , n ) ; r e t u r n i . i d = e , i . a r i a D e s c r i b e d B y I d = n , i . b i n d ( " v a l u e " ) . t o ( t h i s ) , i . b i n d ( " i s R e a d O n l y " ) . t o ( t h i s ) , i . b i n d ( " h a s E r r o r " ) . t o ( t h i s , " e r r o r T e x t " , t = > ! ! t ) , i . o n ( " i n p u t " , ( ) = > { t h i s . e r r o r T e x t = n u l l } ) , i } _ c r e a t e S t a t u s V i e w ( t ) { c o n s t e = n e w j l ( t h i s . l o c a l e ) , n = t h i s . b i n d T e m p l a t e ; r e t u r n e . s e t T e m p l a t e ( { t a g : " d i v " , a t t r i b u t e s : { c l a s s : [ " c k " , " c k - l a b e l e d - i n p u t _ _ s t a t u s " , n . i f ( " e r r o r T e x t " , " c k - l a b e l e d - i n p u t _ _ s t a t u s _ e r r o r " ) , n . i f ( " _ s t a t u s T e x t " , " c k - h i d d e n " , t = > ! t ) ] , i d : t , r o l e : n . i f ( " e r r o r T e x t " , " a l e r t " ) } , c h i l d r e n : [ { t e x t : n . t o ( " _ s t a t u s T e x t " ) } ] } ) , e } s e l e c t ( ) { t h i s . i n p u t V i e w . s e l e c t ( ) } f o c u s ( ) { t h i s . i n p u t V i e w . f o c u s ( ) } } n ( 7 3 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s Y f e x t e n d s j l { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . s e t ( " v a l u e " ) , t h i s . s e t ( " i d " ) , t h i s . s e t ( " p l a c e h o l d e r " ) , t h i s . s e t ( " i s R e a d O n l y " , ! 1 ) , t h i s . s e t ( " h a s E r r o r " , ! 1 ) , t h i s . s e t ( " a r i a D e s c r i b e d B y I d " ) ; c o n s t e = t h i s . b i n d T e m p l a t e ; t h i s . s e t T e m p l a t e ( { t a g : " i n p u t " , a t t r i b u t e s : { t y p e : " t e x t " , c l a s s : [ " c k " , " c k - i n p u t " , " c k - i n p u t - t e x t " , e . i f ( " h a s E r r o r " , " c k - e r r o r " ) ] , i d : e . t o ( " i d " ) , p l a c e h o l d e r : e . t o ( " p l a c e h o l d e r " ) , r e a d o n l y : e . t o ( " i s R e a d O n l y " ) , " a r i a - i n v a l i d " : e . i f ( " h a s E r r o r " , ! 0 ) , " a r i a - d e s c r i b e d b y " : e . t o ( " a r i a D e s c r i b e d B y I d " ) } , o n : { i n p u t : e . t o ( " i n p u t " ) } } ) } r e n d e r ( ) { s u p e r . r e n d e r ( ) ; c o n s t t = t = > { t h i s . e l e m e n t . v a l u e = t | | 0 = = = t ? t : " " } ; t ( t h i s . v a l u e ) , t h i s . o n ( " c h a n g e : v a l u e " , ( e , n , i ) = > { t ( i ) } ) } s e l e c t ( ) { t h i s . e l e m e n t . s e l e c t ( ) } f o c u s ( ) { t h i s . e l e m e n t . f o c u s ( ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /function Xf({view:t}){t.listenTo(t.element,"submit",(e,n)=>{n.preventDefault(),t.fire("submit")},{useCapture:!0})}var tp='<svg viewBox="0 0 20 20" xmlns="http:/ / www . w3 . org / 2000 / svg "><path d=" M6 . 972 16.615 a . 997.997 0 0 1 - . 744 - . 292 l - 4.596 - 4.596 a1 1 0 1 1 1.414 - 1.414 l3 . 926 3.926 9.937 - 9.937 a1 1 0 0 1 1.414 1.415 L7 . 717 16.323 a . 997.997 0 0 1 - . 745.292 z "/></svg>',ep='<svg viewBox=" 0 0 20 20 " xmlns=" http : //www.w3.org/2000/svg"><path d="M11.591 10.177l4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z"/></svg>';n(75);
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class np extends jl { constructor ( t ) { super ( t ) ; const e = this . locale . t ; this . focusTracker = new fl , this . keystrokes = new rl , this . labeledInput = this . _createLabeledInputView ( ) , this . saveButtonView = this . _createButton ( e ( "av" ) , tp , "ck-button-save" ) , this . saveButtonView . type = "submit" , this . cancelButtonView = this . _createButton ( e ( "aw" ) , ep , "ck-button-cancel" , "cancel" ) , this . _focusables = new vl , this . _focusCycler = new Wl ( { focusables : this . _focusables , focusTracker : this . focusTracker , keystrokeHandler : this . keystrokes , actions : { focusPrevious : "shift + tab" , focusNext : "tab" } } ) , this . setTemplate ( { tag : "form" , attributes : { class : [ "ck" , "ck-text-alternative-form" ] , tabindex : "-1" } , children : [ this . labeledInput , this . saveButtonView , this . cancelButtonView ] } ) } render ( ) { super . render ( ) , this . keystrokes . listenTo ( this . element ) , Xf ( { view : this } ) , [ this . labeledInput , this . saveButtonView , this . cancelButtonView ] . forEach ( t => { this . _focusables . add ( t ) , this . focusTracker . add ( t . element ) } ) } _createButton ( t , e , n , i ) { const o = new od ( this . locale ) ; return o . set ( { label : t , icon : e , tooltip : ! 0 } ) , o . extendTemplate ( { attributes : { class : n } } ) , i && o . delegate ( "execute" ) . to ( this , i ) , o } _createLabeledInputView ( ) { const t = this . locale . t , e = new Qf ( this . locale , Yf ) ; return e . label = t ( "ax" ) , e . inputView . placeholder = t ( "ax" ) , e } } var ip = '<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.085 6.22L2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21l-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z"/></svg>' ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n o p ( t ) { c o n s t e = t . e d i t i n g . v i e w , n = Q d . d e f a u l t P o s i t i o n s ; r e t u r n { t a r g e t : e . d o m C o n v e r t e r . v i e w T o D o m ( e . d o c u m e n t . s e l e c t i o n . g e t S e l e c t e d E l e m e n t ( ) ) , p o s i t i o n s : [ n . n o r t h A r r o w S o u t h , n . n o r t h A r r o w S o u t h W e s t , n . n o r t h A r r o w S o u t h E a s t , n . s o u t h A r r o w N o r t h , n . s o u t h A r r o w N o r t h W e s t , n . s o u t h A r r o w N o r t h E a s t ] } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s r p e x t e n d s y d { s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ o u ] } s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " I m a g e T e x t A l t e r n a t i v e U I " } i n i t ( ) { t h i s . _ c r e a t e B u t t o n ( ) , t h i s . _ c r e a t e F o r m ( ) } d e s t r o y ( ) { s u p e r . d e s t r o y ( ) , t h i s . _ f o r m . d e s t r o y ( ) } _ c r e a t e B u t t o n ( ) { c o n s t t = t h i s . e d i t o r , e = t . t ; t . u i . c o m p o n e n t F a c t o r y . a d d ( " i m a g e T e x t A l t e r n a t i v e " , n = > { c o n s t i = t . c o m m a n d s . g e t ( " i m a g e T e x t A l t e r n a t i v e " ) , o = n e w o d ( n ) ; r e t u r n o . s e t ( { l a b e l : e ( " a u " ) , i c o n : i p , t o o l t i p : ! 0 } ) , o . b i n d ( " i s E n a b l e d " ) . t o ( i , " i s E n a b l e d " ) , t h i s . l i s t e n T o ( o , " e x e c u t e " , ( ) = > t h i s . _ s h o w F o r m ( ) ) , o } ) } _ c r e a t e F o r m ( ) { c o n s t t = t h i s . e d i t o r , e = t . e d i t i n g . v i e w . d o c u m e n t ; t h i s . _ b a l l o o n = t h i s . e d i t o r . p l u g i n s . g e t ( " C o n t e x t u a l B a l l o o n " ) , t h i s . _ f o r m = n e w n p ( t . l o c a l e ) , t h i s . _ f o r m . r e n d e r ( ) , t h i s . l i s t e n T o ( t h i s . _ f o r m , " s u b m i t " , ( ) = > { t . e x e c u t e ( " i m a g e T e x t A l t e r n a t i v e " , { n e w V a l u e : t h i s . _ f o r m . l a b e l e d I n p u t . i n p u t V i e w . e l e m e n t . v a l u e } ) , t h i s . _ h i d e F o r m ( ! 0 ) } ) , t h i s . l i s t e n T o ( t h i s . _ f o r m , " c a n c e l " , ( ) = > { t h i s . _ h i d e F o r m ( ! 0 ) } ) , t h i s . _ f o r m . k e y s t r o k e s . s e t ( " E s c " , ( t , e ) = > { t h i s . _ h i d e F o r m ( ! 0 ) , e ( ) } ) , t h i s . l i s t e n T o ( t . u i , " u p d a t e " , ( ) = > { H u ( e . s e l e c t i o n ) ? t h i s . _ i s V i s i b l e & & f u n c t i o n ( t ) { c o n s t e = t . p l u g i n s . g e t ( " C o n t e x t u a l B a l l o o n " ) ; i f ( H u ( t . e d i t i n g . v i e w . d o c u m e n t . s e l e c t i o n ) ) { c o n s t n = o p ( t ) ; e . u p d a t e P o s i t i o n ( n ) } } ( t ) : t h i s . _ h i d e F o r m ( ! 0 ) } ) , u d ( { e m i t t e r : t h i s . _ f o r m , a c t i v a t o r : ( ) = > t h i s . _ i s V i s i b l e , c o n t e x t E l e m e n t s : [ t h i s . _ b a l l o o n . v i e w . e l e m e n t ] , c a l l b a c k : ( ) = > t h i s . _ h i d e F o r m ( ) } ) } _ s h o w F o r m ( ) { i f ( t h i s . _ i s V i s i b l e ) r e t u r n ; c o n s t t = t h i s . e d i t o r , e = t . c o m m a n d s . g e t ( " i m a g e T e x t A l t e r n a t i v e " ) , n = t h i s . _ f o r m . l a b e l e d I n p u t ; t h i s . _ i s I n B a l l o o n | | t h i s . _ b a l l o o n . a d d ( { v i e w : t h i s . _ f o r m , p o s i t i o n : o p ( t ) } ) , n . v a l u e = n . i n p u t V i e w . e l e m e n t . v a l u e = e . v a l u e | | " " , t h i s . _ f o r m . l a b e l e d I n p u t . s e l e c t ( ) } _ h i d e F o r m ( t ) { t h i s . _ i s I n B a l l o o n & & ( t h i s . _ f o r m . f o c u s T r a c k e r . i s F o c u s e d & & t h i s . _ f o r m . s a v e B u t t o n V i e w . f o c u s ( ) , t h i s . _ b a l l o o n . r e m o v e ( t h i s . _ f o r m ) , t & & t h i s . e d i t o r . e d i t i n g . v i e w . f o c u s ( ) ) } g e t _ i s V i s i b l e ( ) { r e t u r n t h i s . _ b a l l o o n . v i s i b l e V i e w = = = t h i s . _ f o r m } g e t _ i s I n B a l l o o n ( ) { r e t u r n t h i s . _ b a l l o o n . h a s V i e w ( t h i s . _ f o r m ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s s p e x t e n d s y d { s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ J f , r p ] } s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " I m a g e T e x t A l t e r n a t i v e " } } n ( 7 7 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n a p ( t ) { f o r ( c o n s t e o f t . g e t C h i l d r e n ( ) ) i f ( e & & e . i s ( " c a p t i o n " ) ) r e t u r n e ; r e t u r n n u l l } f u n c t i o n c p ( t ) { c o n s t e = t . p a r e n t ; r e t u r n " f i g c a p t i o n " = = t . n a m e & & e & & " f i g u r e " = = e . n a m e & & e . h a s C l a s s ( " i m a g e " ) ? { n a m e : ! 0 } : n u l l }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s l p e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " I m a g e C a p t i o n E d i t i n g " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . e d i t i n g . v i e w , n = t . m o d e l . s c h e m a , i = t . d a t a , o = t . e d i t i n g , r = t . t ; n . r e g i s t e r ( " c a p t i o n " , { a l l o w I n : " i m a g e " , a l l o w C o n t e n t O f : " $ b l o c k " , i s L i m i t : ! 0 } ) , t . m o d e l . d o c u m e n t . r e g i s t e r P o s t F i x e r ( t = > t h i s . _ i n s e r t M i s s i n g M o d e l C a p t i o n E l e m e n t ( t ) ) , t . c o n v e r s i o n . f o r ( " u p c a s t " ) . e l e m e n t T o E l e m e n t ( { v i e w : c p , m o d e l : " c a p t i o n " } ) ; i . d o w n c a s t D i s p a t c h e r . o n ( " i n s e r t : c a p t i o n " , d p ( t = > t . c r e a t e C o n t a i n e r E l e m e n t ( " f i g c a p t i o n " ) , ! 1 ) ) ; c o n s t s =
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function ( t , e ) { return n => { const i = n . createEditableElement ( "figcaption" ) ; return n . setCustomProperty ( "imageCaption" , ! 0 , i ) , gl ( { view : t , element : i , text : e } ) , Dd ( i , n ) } } ( e , r ( "ap" ) ) ; o . downcastDispatcher . on ( "insert:caption" , dp ( s ) ) , o . downcastDispatcher . on ( "insert" , this . _fixCaptionVisibility ( t => t . item ) , { priority : "high" } ) , o . downcastDispatcher . on ( "remove" , this . _fixCaptionVisibility ( t => t . position . parent ) , { priority : "high" } ) , e . document . registerPostFixer ( t => this . _updateCaptionVisibility ( t ) ) } _updateCaptionVisibility ( t ) { const e = this . editor . editing . mapper , n = this . _lastSelectedCaption ; let i ; const o = this . editor . model . document . selection , r = o . getSelectedElement ( ) ; if ( r && r . is ( "image" ) ) { const t = ap ( r ) ; i = e . toViewElement ( t ) } const s = up ( o . getFirstPosition ( ) . parent ) ; if ( s && ( i = e . toViewElement ( s ) ) , i ) return n ? n === i ? fp ( i , t ) : ( hp ( n , t ) , this . _lastSelectedCaption = i , fp ( i , t ) ) : ( this . _lastSelectedCaption = i , fp ( i , t ) ) ; if ( n ) { const e = hp ( n , t ) ; return this . _lastSelectedCaption = null , e } return ! 1 } _fixCaptionVisibility ( t ) { return ( e , n , i ) => { const o = up ( t ( n ) ) , r = this . editor . editing . mapper , s = i . writer ; if ( o ) { const t = r . toViewElement ( o ) ; t && ( o . childCount ? s . removeClass ( "ck-hidden" , t ) : s . addClass ( "ck-hidden" , t ) ) } } } _insertMissingModelCaptionElement ( t ) { const e = this . editor . model , n = e . document . differ . getChanges ( ) , i = [ ] ; for ( const t of n ) if ( "insert" == t . type && "$text" != t . name ) { const n = t . position . nodeAfter ; if ( n . is ( "image" ) && ! ap ( n ) && i . push ( n ) , ! n . is ( "image" ) && n . childCount ) for ( const t of e . createRangeIn ( n ) . getItems ( ) ) t . is ( "image" ) && ! ap ( t ) && i . push ( t ) } for ( const e of i ) t . appendElement ( "caption" , e ) ; return ! ! i . length } } function dp ( t , e = ! 0 ) { return ( n , i , o ) => { const r = i . item ; if ( ( r . childCount || e ) && Uu ( r . parent ) ) { if ( ! o . consumable . consume ( i . item , "insert" ) ) return ; const e = o . mapper . toViewElement ( i . range . start . parent ) , n = t ( o . writer ) , s = o . writer ; r . childCount || s . addClass ( "ck-hidden" , n ) , function ( t , e , n , i ) { const o = i . writer . createPositionAt ( n , "end" ) ; i . writer . insert ( o , t ) , i . mapper . bindElements ( e , t ) } ( n , i . item , e , o ) } } } function up ( t ) { const e = t . getAncestors ( { includeSelf : ! 0 } ) . find ( t => "caption" == t . name ) ; return e && e . parent && "image" == e . parent . name ? e : null } function hp ( t , e ) { return ! t . childCount && ! t . hasClass ( "ck-hidden" ) && ( e . addClass ( "ck-hidden" , t ) , ! 0 ) } function fp ( t , e ) { return ! ! t . hasClass ( "ck-hidden" ) && ( e . removeClass ( "ck-hidden" , t ) , ! 0 ) } n ( 79 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class pp extends qu { constructor ( t , e ) { super ( t ) , this . defaultStyle = ! 1 , this . styles = e . reduce ( ( t , e ) => ( t [ e . name ] = e , e . isDefault && ( this . defaultStyle = e . name ) , t ) , { } ) } refresh ( ) { const t = this . editor . model . document . selection . getSelectedElement ( ) ; if ( this . isEnabled = Uu ( t ) , t ) if ( t . hasAttribute ( "imageStyle" ) ) { const e = t . getAttribute ( "imageStyle" ) ; this . value = ! ! this . styles [ e ] && e } else this . value = this . defaultStyle ; else this . value = ! 1 } execute ( t ) { const e = t . value , n = this . editor . model , i = n . document . selection . getSelectedElement ( ) ; n . change ( t => { this . styles [ e ] . isDefault ? t . removeAttribute ( "imageStyle" , i ) : t . setAttribute ( "imageStyle" , e , i ) } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /function mp(t,e){for(const n of e)if(n.name===t)return n}var gp='<svg viewBox="0 0 20 20" xmlns="http:/ / www . w3 . org / 2000 / svg "><path d=" M2 4.5 V3h16v1 . 5 zm2 . 5 3 V12h11V7 . 5 h - 11 zM4 . 061 6 H15 . 94 c . 586 0 1.061 . 407 1.061 . 91 v5 . 68 c0 . 503 - . 475.91 - 1.061 . 91 H4 . 06 c - . 585 0 - 1.06 - . 407 - 1.06 - . 91 V6 . 91 C3 6.406 3.475 6 4.061 6 zM2 16.5 V15h16v1 . 5 z "/></svg>',bp='<svg viewBox=" 0 0 20 20 " xmlns=" http : //www.w3.org/2000/svg" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M18 4.5V3H2v1.5h16zm0 3V6h-5.674v1.5H18zm0 3V9h-5.674v1.5H18zm0 3V12h-5.674v1.5H18zm-8.5-6V12h-6V7.5h6zm.818-1.5H2.682C2.305 6 2 6.407 2 6.91v5.68c0 .503.305.91.682.91h7.636c.377 0 .682-.407.682-.91V6.91c0-.503-.305-.91-.682-.91zM18 16.5V15H2v1.5h16z"/></svg>',wp='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 4.5V3h16v1.5zm4.5 3V12h7V7.5h-7zM5.758 6h8.484c.419 0 .758.407.758.91v5.681c0 .502-.34.909-.758.909H5.758c-.419 0-.758-.407-.758-.91V6.91c0-.503.34-.91.758-.91zM2 16.5V15h16v1.5z"/></svg>',kp='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 4.5V3h16v1.5zm0 3V6h5.674v1.5zm0 3V9h5.674v1.5zm0 3V12h5.674v1.5zm8.5-6V12h6V7.5h-6zM9.682 6h7.636c.377 0 .682.407.682.91v5.68c0 .503-.305.91-.682.91H9.682c-.377 0-.682-.407-.682-.91V6.91c0-.503.305-.91.682-.91zM2 16.5V15h16v1.5z"/></svg>';
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const _p = { full : { name : "full" , title : "Full size image" , icon : gp , isDefault : ! 0 } , side : { name : "side" , title : "Side image" , icon : kp , className : "image-style-side" } , alignLeft : { name : "alignLeft" , title : "Left aligned image" , icon : bp , className : "image-style-align-left" } , alignCenter : { name : "alignCenter" , title : "Centered image" , icon : wp , className : "image-style-align-center" } , alignRight : { name : "alignRight" , title : "Right aligned image" , icon : kp , className : "image-style-align-right" } } , vp = { full : gp , left : bp , right : kp , center : wp } ; function yp ( t = [ ] ) { return t . map ( xp ) } function xp ( t ) { if ( "string" == typeof t ) { const e = t ; _p [ e ] ? t = Object . assign ( { } , _p [ e ] ) : ( console . warn ( Object ( Zn . a ) ( "image-style-not-found: There is no such image style of given name." ) , { name : e } ) , t = { name : e } ) } else if ( _p [ t . name ] ) { const e = _p [ t . name ] , n = Object . assign ( { } , t ) ; for ( const i in e ) t . hasOwnProperty ( i ) || ( n [ i ] = e [ i ] ) ; t = n } return "string" == typeof t . icon && vp [ t . icon ] && ( t . icon = vp [ t . icon ] ) , t }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s C p e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " I m a g e S t y l e E d i t i n g " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . m o d e l . s c h e m a , n = t . d a t a , i = t . e d i t i n g ; t . c o n f i g . d e f i n e ( " i m a g e . s t y l e s " , [ " f u l l " , " s i d e " ] ) ; c o n s t o = y p ( t . c o n f i g . g e t ( " i m a g e . s t y l e s " ) ) ; e . e x t e n d ( " i m a g e " , { a l l o w A t t r i b u t e s : " i m a g e S t y l e " } ) ; c o n s t r = f u n c t i o n ( t ) { r e t u r n ( e , n , i ) = > { i f ( ! i . c o n s u m a b l e . c o n s u m e ( n . i t e m , e . n a m e ) ) r e t u r n ; c o n s t o = m p ( n . a t t r i b u t e N e w V a l u e , t ) , r = m p ( n . a t t r i b u t e O l d V a l u e , t ) , s = i . m a p p e r . t o V i e w E l e m e n t ( n . i t e m ) , a = i . w r i t e r ; r & & a . r e m o v e C l a s s ( r . c l a s s N a m e , s ) , o & & a . a d d C l a s s ( o . c l a s s N a m e , s ) } } ( o ) ; i . d o w n c a s t D i s p a t c h e r . o n ( " a t t r i b u t e : i m a g e S t y l e : i m a g e " , r ) , n . d o w n c a s t D i s p a t c h e r . o n ( " a t t r i b u t e : i m a g e S t y l e : i m a g e " , r ) , n . u p c a s t D i s p a t c h e r . o n ( " e l e m e n t : f i g u r e " , f u n c t i o n ( t ) { c o n s t e = t . f i l t e r ( t = > ! t . i s D e f a u l t ) ; r e t u r n ( t , n , i ) = > { i f ( ! n . m o d e l R a n g e ) r e t u r n ; c o n s t o = n . v i e w I t e m , r = C f ( n . m o d e l R a n g e . g e t I t e m s ( ) ) ; i f ( i . s c h e m a . c h e c k A t t r i b u t e ( r , " i m a g e S t y l e " ) ) f o r ( c o n s t t o f e ) i . c o n s u m a b l e . c o n s u m e ( o , { c l a s s e s : t . c l a s s N a m e } ) & & i . w r i t e r . s e t A t t r i b u t e ( " i m a g e S t y l e " , t . n a m e , r ) } } ( o ) , { p r i o r i t y : " l o w " } ) , t . c o m m a n d s . a d d ( " i m a g e S t y l e " , n e w p p ( t , o ) ) } } n ( 8 1 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s A p e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " I m a g e S t y l e U I " } g e t l o c a l i z e d D e f a u l t S t y l e s T i t l e s ( ) { c o n s t t = t h i s . e d i t o r . t ; r e t u r n { " F u l l s i z e i m a g e " : t ( " a g " ) , " S i d e i m a g e " : t ( " a h " ) , " L e f t a l i g n e d i m a g e " : t ( " a i " ) , " C e n t e r e d i m a g e " : t ( " a j " ) , " R i g h t a l i g n e d i m a g e " : t ( " a k " ) } } i n i t ( ) { c o n s t t = f u n c t i o n ( t , e ) { f o r ( c o n s t n o f t ) e [ n . t i t l e ] & & ( n . t i t l e = e [ n . t i t l e ] ) ; r e t u r n t }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( y p ( t h i s . e d i t o r . c o n f i g . g e t ( " i m a g e . s t y l e s " ) ) , t h i s . l o c a l i z e d D e f a u l t S t y l e s T i t l e s ) ; f o r ( c o n s t e o f t ) t h i s . _ c r e a t e B u t t o n ( e ) } _ c r e a t e B u t t o n ( t ) { c o n s t e = t h i s . e d i t o r , n = ` i m a g e S t y l e : $ { t . n a m e } ` ; e . u i . c o m p o n e n t F a c t o r y . a d d ( n , n = > { c o n s t i = e . c o m m a n d s . g e t ( " i m a g e S t y l e " ) , o = n e w o d ( n ) ; r e t u r n o . s e t ( { l a b e l : t . t i t l e , i c o n : t . i c o n , t o o l t i p : ! 0 , i s T o g g l e a b l e : ! 0 } ) , o . b i n d ( " i s E n a b l e d " ) . t o ( i , " i s E n a b l e d " ) , o . b i n d ( " i s O n " ) . t o ( i , " v a l u e " , e = > e = = = t . n a m e ) , t h i s . l i s t e n T o ( o , " e x e c u t e " , ( ) = > e . e x e c u t e ( " i m a g e S t y l e " , { v a l u e : t . n a m e } ) ) , o } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Pp extends yd { static get requires ( ) { return [ ou ] } static get pluginName ( ) { return "WidgetToolbarRepository" } init ( ) { const t = this . editor ; if ( t . plugins . has ( "BalloonToolbar" ) ) { const e = t . plugins . get ( "BalloonToolbar" ) ; this . listenTo ( e , "show" , e => { ( function ( t ) { const e = t . getSelectedElement ( ) ; return ! ( ! e || ! Rd ( e ) ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ) ( t . e d i t i n g . v i e w . d o c u m e n t . s e l e c t i o n ) & & e . s t o p ( ) } , { p r i o r i t y : " h i g h " } ) } t h i s . _ t o o l b a r D e f i n i t i o n s = n e w M a p , t h i s . _ b a l l o o n = t h i s . e d i t o r . p l u g i n s . g e t ( " C o n t e x t u a l B a l l o o n " ) , t h i s . l i s t e n T o ( t . u i , " u p d a t e " , ( ) = > { t h i s . _ u p d a t e T o o l b a r s V i s i b i l i t y ( ) } ) , t h i s . l i s t e n T o ( t . u i . f o c u s T r a c k e r , " c h a n g e : i s F o c u s e d " , ( ) = > { t h i s . _ u p d a t e T o o l b a r s V i s i b i l i t y ( ) } , { p r i o r i t y : " l o w " } ) } d e s t r o y ( ) { s u p e r . d e s t r o y ( ) ; f o r ( c o n s t t o f t h i s . _ t o o l b a r D e f i n i t i o n s . v a l u e s ( ) ) t . v i e w . d e s t r o y ( ) } r e g i s t e r ( t , { a r i a L a b e l : e , i t e m s : n , g e t R e l a t e d E l e m e n t : i , b a l l o o n C l a s s N a m e : o = " c k - t o o l b a r - c o n t a i n e r " } ) { c o n s t r = t h i s . e d i t o r , s = r . t , a = n e w g d ( r . l o c a l e ) ; i f ( a . a r i a L a b e l = e | | s ( " a d " ) , t h i s . _ t o o l b a r D e f i n i t i o n s . h a s ( t ) ) t h r o w n e w Z n . b ( " w i d g e t - t o o l b a r - d u p l i c a t e d : T o o l b a r w i t h t h e g i v e n i d w a s a l r e a d y a d d e d . " , t h i s , { t o o l b a r I d : t } ) ; a . f i l l F r o m C o n f i g ( n , r . u i . c o m p o n e n t F a c t o r y ) , t h i s . _ t o o l b a r D e f i n i t i o n s . s e t ( t , { v i e w : a , g e t R e l a t e d E l e m e n t : i , b a l l o o n C l a s s N a m e : o } ) } _ u p d a t e T o o l b a r s V i s i b i l i t y ( ) { l e t t = 0 , e = n u l l , n = n u l l ; f o r ( c o n s t i o f t h i s . _ t o o l b a r D e f i n i t i o n s . v a l u e s ( ) ) { c o n s t o = i . g e t R e l a t e d E l e m e n t ( t h i s . e d i t o r . e d i t i n g . v i e w . d o c u m e n t . s e l e c t i o n ) ; i f ( t h i s . e d i t o r . u i . f o c u s T r a c k e r . i s F o c u s e d ) i f ( o ) { c o n s t r = o . g e t A n c e s t o r s ( ) . l e n g t h ; r > t & & ( t = r , e = o , n = i ) } e l s e t h i s . _ i s T o o l b a r I n B a l l o o n ( i ) & & t h i s . _ h i d e T o o l b a r ( i ) ; e l s e t h i s . _ i s T o o l b a r V i s i b l e ( i ) & & t h i s . _ h i d e T o o l b a r ( i ) } n & & t h i s . _ s h o w T o o l b a r ( n , e ) } _ h i d e T o o l b a r ( t ) { t h i s . _ b a l l o o n . r e m o v e ( t . v i e w ) , t h i s . s t o p L i s t e n i n g ( t h i s . _ b a l l o o n , " c h a n g e : v i s i b l e V i e w " ) } _ s h o w T o o l b a r ( t , e ) { t h i s . _ i s T o o l b a r V i s i b l e ( t ) ? T p ( t h i s . e d i t o r , e ) : t h i s . _ i s T o o l b a r I n B a l l o o n ( t ) | | ( t h i s . _ b a l l o o n . a d d ( { v i e w : t . v i e w , p o s i t i o n : E p ( t h i s . e d i t o r , e ) , b a l l o o n C l a s s N a m e : t . b a l l o o n C l a s s N a m e } ) , t h i s . l i s t e n T o ( t h i s . _ b a l l o o n , " c h a n g e : v i s i b l e V i e w " , ( ) = > { f o r ( c o n s t t o f t h i s . _ t o o l b a r D e f i n i t i o n s . v a l u e s ( ) ) i f ( t h i s . _ i s T o o l b a r V i s i b l e ( t ) ) { c o n s t e = t . g e t R e l a t e d E l e m e n t ( t h i s . e d i t o r . e d i t i n g . v i e w . d o c u m e n t . s e l e c t i o n ) ; T p ( t h i s . e d i t o r , e ) } } ) ) } _ i s T o o l b a r V i s i b l e ( t ) { r e t u r n t h i s . _ b a l l o o n . v i s i b l e V i e w = = = t . v i e w } _ i s T o o l b a r I n B a l l o o n ( t ) { r e t u r n t h i s . _ b a l l o o n . h a s V i e w ( t . v i e w ) } } f u n c t i o n T p ( t , e ) { c o n s t n = t . p l u g i n s . g e t ( " C o n t e x t u a l B a l l o o n " ) , i = E p ( t , e ) ; n . u p d a t e P o s i t i o n ( i ) } f u n c t i o n E p ( t , e ) { c o n s t n = t . e d i t i n g . v i e w , i = Q d . d e f a u l t P o s i t i o n s ; r e t u r n { t a r g e t : n . d o m C o n v e r t e r . m a p V i e w T o D o m ( e ) , p o s i t i o n s : [ i . n o r t h A r r o w S o u t h , i . n o r t h A r r o w S o u t h W e s t , i . n o r t h A r r o w S o u t h E a s t , i . s o u t h A r r o w N o r t h , i . s o u t h A r r o w N o r t h W e s t , i . s o u t h A r r o w N o r t h E a s t ] } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function Sp ( t , e , n ) { return n . createRange ( Rp ( t , e , ! 0 , n ) , Rp ( t , e , ! 1 , n ) ) } function Rp ( t , e , n , i ) { let o = t . textNode || ( n ? t . nodeBefore : t . nodeAfter ) , r = null ; for ( ; o && o . getAttribute ( "linkHref" ) == e ; ) r = o , o = n ? o . previousSibling : o . nextSibling ; return r ? i . createPositionAt ( r , n ? "before" : "after" ) : t }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s I p e x t e n d s q u { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . m a n u a l D e c o r a t o r s = n e w s o } r e s t o r e M a n u a l D e c o r a t o r S t a t e s ( ) { f o r ( c o n s t t o f t h i s . m a n u a l D e c o r a t o r s ) t . v a l u e = t h i s . _ g e t D e c o r a t o r S t a t e F r o m M o d e l ( t . i d ) } r e f r e s h ( ) { c o n s t t = t h i s . e d i t o r . m o d e l , e = t . d o c u m e n t ; t h i s . v a l u e = e . s e l e c t i o n . g e t A t t r i b u t e ( " l i n k H r e f " ) ; f o r ( c o n s t t o f t h i s . m a n u a l D e c o r a t o r s ) t . v a l u e = t h i s . _ g e t D e c o r a t o r S t a t e F r o m M o d e l ( t . i d ) ; t h i s . i s E n a b l e d = t . s c h e m a . c h e c k A t t r i b u t e I n S e l e c t i o n ( e . s e l e c t i o n , " l i n k H r e f " ) } e x e c u t e ( t , e = { } ) { c o n s t n = t h i s . e d i t o r . m o d e l , i = n . d o c u m e n t . s e l e c t i o n , o = [ ] , r = [ ] ; f o r ( c o n s t t i n e ) e [ t ] ? o . p u s h ( t ) : r . p u s h ( t ) ; n . c h a n g e ( e = > { i f ( i . i s C o l l a p s e d ) { c o n s t s = i . g e t F i r s t P o s i t i o n ( ) ; i f ( i . h a s A t t r i b u t e ( " l i n k H r e f " ) ) { c o n s t a = S p ( s , i . g e t A t t r i b u t e ( " l i n k H r e f " ) , n ) ; e . s e t A t t r i b u t e ( " l i n k H r e f " , t , a ) , o . f o r E a c h ( t = > { e . s e t A t t r i b u t e ( t , ! 0 , a ) } ) , r . f o r E a c h ( t = > { e . r e m o v e A t t r i b u t e ( t , a ) } ) , e . s e t S e l e c t i o n ( a ) } e l s e i f ( " " ! = = t ) { c o n s t r = z s ( i . g e t A t t r i b u t e s ( ) ) ; r . s e t ( " l i n k H r e f " , t ) , o . f o r E a c h ( t = > { r . s e t ( t , ! 0 ) } ) ; c o n s t a = e . c r e a t e T e x t ( t , r ) ; n . i n s e r t C o n t e n t ( a , s ) , e . s e t S e l e c t i o n ( e . c r e a t e R a n g e O n ( a ) ) } } e l s e { c o n s t s = n . s c h e m a . g e t V a l i d R a n g e s ( i . g e t R a n g e s ( ) , " l i n k H r e f " ) ; f o r ( c o n s t n o f s ) e . s e t A t t r i b u t e ( " l i n k H r e f " , t , n ) , o . f o r E a c h ( t = > { e . s e t A t t r i b u t e ( t , ! 0 , n ) } ) , r . f o r E a c h ( t = > { e . r e m o v e A t t r i b u t e ( t , n ) } ) } } ) } _ g e t D e c o r a t o r S t a t e F r o m M o d e l ( t ) { r e t u r n t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . g e t A t t r i b u t e ( t ) | | ! 1 } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s O p e x t e n d s q u { r e f r e s h ( ) { t h i s . i s E n a b l e d = t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . h a s A t t r i b u t e ( " l i n k H r e f " ) } e x e c u t e ( ) { c o n s t t = t h i s . e d i t o r , e = t h i s . e d i t o r . m o d e l , n = e . d o c u m e n t . s e l e c t i o n , i = t . c o m m a n d s . g e t ( " l i n k " ) ; e . c h a n g e ( t = > { c o n s t o = n . i s C o l l a p s e d ? [ S p ( n . g e t F i r s t P o s i t i o n ( ) , n . g e t A t t r i b u t e ( " l i n k H r e f " ) , e ) ] : n . g e t R a n g e s ( ) ; f o r ( c o n s t e o f o ) i f ( t . r e m o v e A t t r i b u t e ( " l i n k H r e f " , e ) , i ) f o r ( c o n s t n o f i . m a n u a l D e c o r a t o r s ) t . r e m o v e A t t r i b u t e ( n . i d , e ) } ) } } v a r D p = f u n c t i o n ( t , e , n ) { v a r i = - 1 , o = t . l e n g t h ; e < 0 & & ( e = - e > o ? 0 : o + e ) , ( n = n > o ? o : n ) < 0 & & ( n + = o ) , o = e > n ? 0 : n - e > > > 0 , e > > > = 0 ; f o r ( v a r r = A r r a y ( o ) ; + + i < o ; ) r [ i ] = t [ i + e ] ; r e t u r n r } ; v a r M p = f u n c t i o n ( t , e , n ) { v a r i = t . l e n g t h ; r e t u r n n = v o i d 0 = = = n ? i : n , ! e & & n > = i ? t : D p ( t , e , n ) } , N p = R e g E x p ( " [ \ \ u 2 0 0 d \ \ u d 8 0 0 - \ \ u d f f f \ \ u 0 3 0 0 - \ \ u 0 3 6 f \ \ u f e 2 0 - \ \ u f e 2 f \ \ u 2 0 d 0 - \ \ u 2 0 f f \ \ u f e 0 e \ \ u f e 0 f ] " ) ; v a r V p = f u n c t i o n ( t ) { r e t u r n N p . t e s t ( t ) } ; v a r F p = f u n c t i o n ( t ) { r e t u r n t . s p l i t ( " " ) } , B p = " [ \ \ u d 8 0 0 - \ \ u d f f f ] " , L p = " [ \ \ u 0 3 0 0 - \ \ u 0 3 6 f \ \ u f e 2 0 - \ \ u f e 2 f \ \ u 2 0 d 0 - \ \ u 2 0 f f ] " , z p = " \ \ u d 8 3 c [ \ \ u d f f b - \ \ u d f f f ] " , q p = " [ ^ \ \ u d 8 0 0 - \ \ u d f f f ] " , j p = " ( ? : \ \ u d 8 3 c [ \ \ u d d e 6 - \ \ u d d f f ] ) { 2 } " , H p = " [ \ \ u d 8 0 0 - \ \ u d b f f ] [ \ \ u d c 0 0 - \ \ u d f f f ] " , U p = " ( ? : " + L p + " | " + z p + " ) " + " ? " , $ p = " [ \ \ u f e 0 e \ \ u f e 0 f ] ? " + U p + ( " ( ? : \ \ u 2 0 0 d ( ? : " + [ q p , j p , H p ] . j o i n ( " | " ) + " ) [ \ \ u f e 0 e \ \ u f e 0 f ] ? " + U p + " ) * " ) , W p = " ( ? : " + [ q p + L p + " ? " , L p , j p , H p , B p ] . j o i n ( " | " ) + " ) " , G p = R e g E x p ( z p + " ( ? = " + z p + " ) | " + W p + $ p , " g " ) ; v a r K p = f u n c t i o n ( t ) { r e t u r n t . m a t c h ( G p ) | | [ ] } ; v a r J p = f u n c t i o n ( t ) { r e t u r n V p ( t ) ? K p ( t ) : F p ( t ) } ; v a r Z p = f u n c t i o n ( t , e ) { f o r ( v a r n = - 1 , i = n u l l = = t ? 0 : t . l e n g t h , o = A r r a y ( i ) ; + + n < i ; ) o [ n ] = e ( t [ n ] , n , t ) ; r e t u r n o } , Q p = 1 / 0 , Y p = o ? o . p r o t o t y p e : v o i d 0 , X p = Y p ? Y p . t o S t r i n g : v o i d 0 ; v a r t m = f u n c t i o n t ( e ) { i f ( " s t r i n g " = = t y p e o f e ) r e t u r n e ; i f ( G t ( e ) ) r e t u r n Z p ( e , t ) + " " ; i f ( s s ( e ) ) r e t u r n X p ? X p . c a l l ( e ) : " " ; v a r n = e + " " ; r e t u r n " 0 " = = n & & 1 / e = = - Q p ? " - 0 " : n } ; v a r e m = f u n c t i o n ( t ) { r e t u r n n u l l = = t ? " " : t m ( t ) } ; v a r n m = f u n c t i o n ( t ) { r e t u r n f u n c t i o n ( e ) { e = e m ( e ) ; v a r n = V p ( e ) ? J p ( e ) : v o i d 0 , i = n ? n [ 0 ] : e . c h a r A t ( 0 ) , o = n ? M p ( n , 1 ) . j o i n ( " " ) : e . s l i c e ( 1 ) ; r e t u r n i [ t ] ( ) + o } } ( " t o U p p e r C a s e " ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const im = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g , om = /^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i ; function rm ( t , e ) { const n = e . createAttributeElement ( "a" , { href : t } , { priority : 5 } ) ; return e . setCustomProperty ( "link" , ! 0 , n ) , n } function sm ( t ) { return function ( t ) { return t . replace ( im , "" ) . match ( om ) } ( t = String ( t ) ) ? t : "#" }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md .
* /
class am { constructor ( ) { this . _definitions = new Set } get length ( ) { return this . _definitions . size } add ( t ) { Array . isArray ( t ) ? t . forEach ( t => this . _definitions . add ( t ) ) : this . _definitions . add ( t ) } getDispatcher ( ) { return t => { t . on ( "attribute:linkHref" , ( t , e , n ) => { if ( ! n . consumable . test ( e . item , "attribute:linkHref" ) ) return ; const i = n . writer , o = i . document . selection ; for ( const t of this . _definitions ) { const r = i . createAttributeElement ( "a" , t . attributes , { priority : 5 } ) ; i . setCustomProperty ( "link" , ! 0 , r ) , t . callback ( e . attributeNewValue ) ? e . item . is ( "selection" ) ? i . wrap ( o . getFirstRange ( ) , r ) : i . wrap ( n . mapper . toViewRange ( e . range ) , r ) : i . unwrap ( n . mapper . toViewRange ( e . range ) , r ) } } , { priority : "high" } ) } } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s c m { c o n s t r u c t o r ( { i d : t , l a b e l : e , a t t r i b u t e s : n } ) { t h i s . i d = t , t h i s . s e t ( " v a l u e " ) , t h i s . l a b e l = e , t h i s . a t t r i b u t e s = n } } d i ( c m , H i ) ; c l a s s l m { c o n s t r u c t o r ( t , e , n ) { t h i s . m o d e l = t , t h i s . a t t r i b u t e = n , t h i s . _ m o d e l S e l e c t i o n = t . d o c u m e n t . s e l e c t i o n , t h i s . _ o v e r r i d e U i d = n u l l , t h i s . _ i s N e x t G r a v i t y R e s t o r a t i o n S k i p p e d = ! 1 , e . l i s t e n T o ( t h i s . _ m o d e l S e l e c t i o n , " c h a n g e : r a n g e " , ( t , e ) = > { t h i s . _ i s N e x t G r a v i t y R e s t o r a t i o n S k i p p e d ? t h i s . _ i s N e x t G r a v i t y R e s t o r a t i o n S k i p p e d = ! 1 : t h i s . _ i s G r a v i t y O v e r r i d d e n & & ( ! e . d i r e c t C h a n g e & & d m ( t h i s . _ m o d e l S e l e c t i o n . g e t F i r s t P o s i t i o n ( ) , n ) | | t h i s . _ r e s t o r e G r a v i t y ( ) ) } ) } h a n d l e F o r w a r d M o v e m e n t ( t , e ) { c o n s t n = t h i s . a t t r i b u t e ; i f ( ! ( t h i s . _ i s G r a v i t y O v e r r i d d e n | | t . i s A t S t a r t & & t h i s . _ h a s S e l e c t i o n A t t r i b u t e ) ) r e t u r n f m ( t , n ) & & t h i s . _ h a s S e l e c t i o n A t t r i b u t e ? ( t h i s . _ p r e v e n t C a r e t M o v e m e n t ( e ) , t h i s . _ r e m o v e S e l e c t i o n A t t r i b u t e ( ) , ! 0 ) : u m ( t , n ) ? ( t h i s . _ p r e v e n t C a r e t M o v e m e n t ( e ) , t h i s . _ o v e r r i d e G r a v i t y ( ) , ! 0 ) : h m ( t , n ) & & t h i s . _ h a s S e l e c t i o n A t t r i b u t e ? ( t h i s . _ p r e v e n t C a r e t M o v e m e n t ( e ) , t h i s . _ o v e r r i d e G r a v i t y ( ) , ! 0 ) : v o i d 0 } h a n d l e B a c k w a r d M o v e m e n t ( t , e ) { c o n s t n = t h i s . a t t r i b u t e ; r e t u r n t h i s . _ i s G r a v i t y O v e r r i d d e n ? f m ( t , n ) & & t h i s . _ h a s S e l e c t i o n A t t r i b u t e ? ( t h i s . _ p r e v e n t C a r e t M o v e m e n t ( e ) , t h i s . _ r e s t o r e G r a v i t y ( ) , t h i s . _ r e m o v e S e l e c t i o n A t t r i b u t e ( ) , ! 0 ) : ( t h i s . _ p r e v e n t C a r e t M o v e m e n t ( e ) , t h i s . _ r e s t o r e G r a v i t y ( ) , t . i s A t S t a r t & & t h i s . _ r e m o v e S e l e c t i o n A t t r i b u t e ( ) , ! 0 ) : f m ( t , n ) & & ! t h i s . _ h a s S e l e c t i o n A t t r i b u t e ? ( t h i s . _ p r e v e n t C a r e t M o v e m e n t ( e ) , t h i s . _ s e t S e l e c t i o n A t t r i b u t e F r o m T h e N o d e B e f o r e ( t ) , ! 0 ) : t . i s A t E n d & & h m ( t , n ) ? t h i s . _ h a s S e l e c t i o n A t t r i b u t e ? v o i d ( p m ( t , n ) & & ( t h i s . _ s k i p N e x t A u t o m a t i c G r a v i t y R e s t o r a t i o n ( ) , t h i s . _ o v e r r i d e G r a v i t y ( ) ) ) : ( t h i s . _ p r e v e n t C a r e t M o v e m e n t ( e ) , t h i s . _ s e t S e l e c t i o n A t t r i b u t e F r o m T h e N o d e B e f o r e ( t ) , ! 0 ) : t . i s A t S t a r t ? t h i s . _ h a s S e l e c t i o n A t t r i b u t e ? ( t h i s . _ r e m o v e S e l e c t i o n A t t r i b u t e ( ) , t h i s . _ p r e v e n t C a r e t M o v e m e n t ( e ) , ! 0 ) : v o i d 0 : v o i d ( p m ( t , n ) & & ( t h i s . _ s k i p N e x t A u t o m a t i c G r a v i t y R e s t o r a t i o n ( ) , t h i s . _ o v e r r i d e G r a v i t y ( ) ) ) } g e t _ i s G r a v i t y O v e r r i d d e n ( ) { r e t u r n ! ! t h i s . _ o v e r r i d e U i d } g e t _ h a s S e l e c t i o n A t t r i b u t e ( ) { r e t u r n t h i s . _ m o d e l S e l e c t i o n . h a s A t t r i b u t e ( t h i s . a t t r i b u t e ) } _ o v e r r i d e G r a v i t y ( ) { t h i s . _ o v e r r i d e U i d = t h i s . m o d e l . c h a n g e ( t = > t . o v e r r i d e S e l e c t i o n G r a v i t y ( ) ) } _ r e s t o r e G r a v i t y ( ) { t h i s . m o d e l . c h a n g e ( t = > { t . r e s t o r e S e l e c t i o n G r a v i t y ( t h i s . _ o v e r r i d e U i d ) , t h i s . _ o v e r r i d e U i d = n u l l } ) } _ p r e v e n t C a r e t M o v e m e n t ( t ) { t . p r e v e n t D e f a u l t ( ) } _ r e m o v e S e l e c t i o n A t t r i b u t e ( ) { t h i s . m o d e l . c h a n g e ( t = > { t . r e m o v e S e l e c t i o n A t t r i b u t e ( t h i s . a t t r i b u t e ) } ) } _ s e t S e l e c t i o n A t t r i b u t e F r o m T h e N o d e B e f o r e ( t ) { c o n s t e = t h i s . a t t r i b u t e ; t h i s . m o d e l . c h a n g e ( n = > { n . s e t S e l e c t i o n A t t r i b u t e ( t h i s . a t t r i b u t e , t . n o d e B e f o r e . g e t A t t r i b u t e ( e ) ) } ) } _ s k i p N e x t A u t o m a t i c G r a v i t y R e s t o r a t i o n ( ) { t h i s . _ i s N e x t G r a v i t y R e s t o r a t i o n S k i p p e d = ! 0 } } f u n c t i o n d m ( t , e ) { r e t u r n u m ( t , e ) | | h m ( t , e ) } f u n c t i o n u m ( t , e ) { c o n s t { n o d e B e f o r e : n , n o d e A f t e r : i } = t , o = ! ! n & & n . h a s A t t r i b u t e ( e ) ; r e t u r n ! ! i & & i . h a s A t t r i b u t e ( e ) & & ( ! o | | n . g e t A t t r i b u t e ( e ) ! = = i . g e t A t t r i b u t e ( e ) ) } f u n c t i o n h m ( t , e ) { c o n s t { n o d e B e f o r e : n , n o d e A f t e r : i } = t , o = ! ! n & & n . h a s A t t r i b u t e ( e ) , r = ! ! i & & i . h a s A t t r i b u t e ( e ) ; r e t u r n o & & ( ! r | | n . g e t A t t r i b u t e ( e ) ! = = i . g e t A t t r i b u t e ( e ) ) } f u n c t i o n f m ( t , e ) { c o n s t { n o d e B e f o r e : n , n o d e A f t e r : i } = t , o = ! ! n & & n . h a s A t t r i b u t e ( e ) ; i f ( ! ! i & & i . h a s A t t r i b u t e ( e ) & & o ) r e t u r n i . g e t A t t r i b u t e ( e ) ! = = n . g e t A t t r i b u t e ( e ) } f u n c t i o n p m ( t , e ) { r e t u r n d m ( t . g e t S h i f t e d B y ( - 1 ) , e ) } n ( 8 3 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /const mm="ck-link_selected",gm="automatic",bm="manual",wm=/ ^ ( https ? : ) ? \ / \ //;class km extends yd{static get pluginName(){return"LinkEditing"}constructor(t){super(t),t.config.define("link",{addTargetToExternalLinks:!1})}init(){const t=this.editor,e=t.locale;t.model.schema.extend("$text",{allowAttributes:"linkHref"}),t.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:rm}),t.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(t,e)=>rm(sm(t),e)}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:t=>t.getAttribute("href")}}),t.commands.add("link",new Ip(t)),t.commands.add("unlink",new Op(t));const n=function(t,e){const n={"Open in a new tab":t("ay"),Downloadable:t("az")};return e.forEach(t=>(t.label&&n[t.label]&&(t.label=n[t.label]),t)),e}(t.t,function(t){const e=[];if(t)for(const[n,i]of Object.entries(t)){const t=Object.assign({},i,{id:`link${nm(n)}`});e.push(t)}return e}(t.config.get("link.decorators")));this._enableAutomaticDecorators(n.filter(t=>t.mode===gm)),this._enableManualDecorators(n.filter(t=>t.mode===bm)),
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function ( { view : t , model : e , emitter : n , attribute : i , locale : o } ) { const r = new lm ( e , n , i ) , s = e . document . selection ; n . listenTo ( t . document , "keydown" , ( t , e ) => { if ( ! s . isCollapsed ) return ; if ( e . shiftKey || e . altKey || e . ctrlKey ) return ; const n = e . keyCode == ko . arrowright , i = e . keyCode == ko . arrowleft ; if ( ! n && ! i ) return ; const a = s . getFirstPosition ( ) , c = o . contentLanguageDirection ; let l ; ( l = "ltr" === c && n || "rtl" === c && i ? r . handleForwardMovement ( a , e ) : r . handleBackwardMovement ( a , e ) ) && t . stop ( ) } , { priority : ti . get ( "high" ) + 1 } ) } ( { view : t . editing . view , model : t . model , emitter : this , attribute : "linkHref" , locale : e } ) , this . _setupLinkHighlight ( ) } _enableAutomaticDecorators ( t ) { const e = this . editor , n = new am ; e . config . get ( "link.addTargetToExternalLinks" ) && n . add ( { id : "linkIsExternal" , mode : gm , callback : t => wm . test ( t ) , attributes : { target : "_blank" , rel : "noopener noreferrer" } } ) , n . add ( t ) , n . length && e . conversion . for ( "downcast" ) . add ( n . getDispatcher ( ) ) } _enableManualDecorators ( t ) { if ( ! t . length ) return ; const e = this . editor , n = e . commands . get ( "link" ) . manualDecorators ; t . forEach ( t => { e . model . schema . extend ( "$text" , { allowAttributes : t . id } ) , n . add ( new cm ( t ) ) , e . conversion . for ( "downcast" ) . attributeToElement ( { model : t . id , view : ( e , i ) => { if ( e ) { const e = n . get ( t . id ) . attributes , o = i . createAttributeElement ( "a" , e , { priority : 5 } ) ; return i . setCustomProperty ( "link" , ! 0 , o ) , o } } } ) , e . conversion . for ( "upcast" ) . elementToAttribute ( { view : { name : "a" , attributes : n . get ( t . id ) . attributes } , model : { key : t . id } } ) } ) } _setupLinkHighlight ( ) { const t = this . editor , e = t . editing . view , n = new Set ; e . document . registerPostFixer ( e => { const i = t . model . document . selection ; let o = ! 1 ; if ( i . hasAttribute ( "linkHref" ) ) { const r = Sp ( i . getFirstPosition ( ) , i . getAttribute ( "linkHref" ) , t . model ) , s = t . editing . mapper . toViewRange ( r ) ; for ( const t of s . getItems ( ) ) t . is ( "a" ) && ! t . hasClass ( mm ) && ( e . addClass ( mm , t ) , n . add ( t ) , o = ! 0 ) } return o } ) , t . conversion . for ( "editingDowncast" ) . add ( t => { function i ( ) { e . change ( t => { for ( const e of n . values ( ) ) t . removeClass ( mm , e ) , n . delete ( e ) } ) } t . on ( "insert" , i , { priority : "highest" } ) , t . on ( "remove" , i , { priority : "highest" } ) , t . on ( "attribute" , i , { priority : "highest" } ) , t . on ( "selection" , i , { priority : "highest" } ) } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s _ m e x t e n d s n s { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . d o m E v e n t T y p e = " c l i c k " } o n D o m E v e n t ( t ) { t h i s . f i r e ( t . t y p e , t ) } } n ( 8 5 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /class vm extends jl{constructor(t,e=[]){super(t);const n=t.t;this.focusTracker=new fl,this.keystrokes=new rl,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("av"),tp,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("aw"),ep,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e),this.children=this._createFormChildren(e),this._focusables=new vl,this._focusCycler=new Wl({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const i=["ck","ck-link-form"];e.length&&i.push("ck-link-form_layout-vertical"),this.setTemplate({tag:"form",attributes:{class:i,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((t,e)=>(t[e.name]=e.isOn,t),{})}render(){super.render(),Xf({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const t=this.locale.t,e=new Qf(this.locale,Yf);return e.label=t("be"),e.inputView.placeholder="https:/ / example . com ",e}_createButton(t,e,n,i){const o=new od(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate(" execute ").to(this,i),o}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const n of t){const t=new dd(this.locale);t.set({name:n.id,label:n.label,withText:!0}),t.bind(" isOn ").to(n," value "),t.on(" execute ",()=>{n.set(" value ",!t.isOn)}),e.add(t)}return e}_createFormChildren(t){const e=this.createCollection();if(e.add(this.urlInputView),t.length){const t=new jl;t.setTemplate({tag:" ul ",children:this._manualDecoratorSwitches.map(t=>({tag:" li ",children:[t],attributes:{class:[" ck "," ck - list _ _item "]}})),attributes:{class:[" ck "," ck - reset "," ck - list "]}}),e.add(t)}return e.add(this.saveButtonView),e.add(this.cancelButtonView),e}}var ym='<svg viewBox=" 0 0 20 20 " xmlns=" http : //www.w3.org/2000/svg"><path d="M11.077 15l.991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zm4.919 10.562l-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z"/></svg>',xm='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7.3 17.37l-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506L13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5L9.375 17H19v1.5H8z"/></svg>';n(87);
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Cm extends jl { constructor ( t ) { super ( t ) ; const e = t . t ; this . focusTracker = new fl , this . keystrokes = new rl , this . previewButtonView = this . _createPreviewButton ( ) , this . unlinkButtonView = this . _createButton ( e ( "ba" ) , ym , "unlink" ) , this . editButtonView = this . _createButton ( e ( "bb" ) , xm , "edit" ) , this . set ( "href" ) , this . _focusables = new vl , this . _focusCycler = new Wl ( { focusables : this . _focusables , focusTracker : this . focusTracker , keystrokeHandler : this . keystrokes , actions : { focusPrevious : "shift + tab" , focusNext : "tab" } } ) , this . setTemplate ( { tag : "div" , attributes : { class : [ "ck" , "ck-link-actions" ] , tabindex : "-1" } , children : [ this . previewButtonView , this . editButtonView , this . unlinkButtonView ] } ) } render ( ) { super . render ( ) , [ this . previewButtonView , this . editButtonView , this . unlinkButtonView ] . forEach ( t => { this . _focusables . add ( t ) , this . focusTracker . add ( t . element ) } ) , this . keystrokes . listenTo ( this . element ) } focus ( ) { this . _focusCycler . focusFirst ( ) } _createButton ( t , e , n ) { const i = new od ( this . locale ) ; return i . set ( { label : t , icon : e , tooltip : ! 0 } ) , i . delegate ( "execute" ) . to ( this , n ) , i } _createPreviewButton ( ) { const t = new od ( this . locale ) , e = this . bindTemplate , n = this . t ; return t . set ( { withText : ! 0 , tooltip : n ( "bc" ) } ) , t . extendTemplate ( { attributes : { class : [ "ck" , "ck-link-actions__preview" ] , href : e . to ( "href" , t => t && sm ( t ) ) , target : "_blank" } } ) , t . bind ( "label" ) . to ( this , "href" , t => t || n ( "bd" ) ) , t . bind ( "isEnabled" ) . to ( this , "href" , t => ! ! t ) , t . template . tag = "a" , t . template . eventListeners = { } , t } } var Am = '<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.077 15l.991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z"/></svg>' ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t P m = " C t r l + K " ; c l a s s T m e x t e n d s y d { s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ o u ] } s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " L i n k U I " } i n i t ( ) { c o n s t t = t h i s . e d i t o r ; t . e d i t i n g . v i e w . a d d O b s e r v e r ( _ m ) , t h i s . a c t i o n s V i e w = t h i s . _ c r e a t e A c t i o n s V i e w ( ) , t h i s . f o r m V i e w = t h i s . _ c r e a t e F o r m V i e w ( ) , t h i s . _ b a l l o o n = t . p l u g i n s . g e t ( o u ) , t h i s . _ c r e a t e T o o l b a r L i n k B u t t o n ( ) , t h i s . _ e n a b l e U s e r B a l l o o n I n t e r a c t i o n s ( ) } d e s t r o y ( ) { s u p e r . d e s t r o y ( ) , t h i s . f o r m V i e w . d e s t r o y ( ) } _ c r e a t e A c t i o n s V i e w ( ) { c o n s t t = t h i s . e d i t o r , e = n e w C m ( t . l o c a l e ) , n = t . c o m m a n d s . g e t ( " l i n k " ) , i = t . c o m m a n d s . g e t ( " u n l i n k " ) ; r e t u r n e . b i n d ( " h r e f " ) . t o ( n , " v a l u e " ) , e . e d i t B u t t o n V i e w . b i n d ( " i s E n a b l e d " ) . t o ( n ) , e . u n l i n k B u t t o n V i e w . b i n d ( " i s E n a b l e d " ) . t o ( i ) , t h i s . l i s t e n T o ( e , " e d i t " , ( ) = > { t h i s . _ a d d F o r m V i e w ( ) } ) , t h i s . l i s t e n T o ( e , " u n l i n k " , ( ) = > { t . e x e c u t e ( " u n l i n k " ) , t h i s . _ h i d e U I ( ) } ) , e . k e y s t r o k e s . s e t ( " E s c " , ( t , e ) = > { t h i s . _ h i d e U I ( ) , e ( ) } ) , e . k e y s t r o k e s . s e t ( P m , ( t , e ) = > { t h i s . _ a d d F o r m V i e w ( ) , e ( ) } ) , e } _ c r e a t e F o r m V i e w ( ) { c o n s t t = t h i s . e d i t o r , e = t . c o m m a n d s . g e t ( " l i n k " ) , n = n e w v m ( t . l o c a l e , e . m a n u a l D e c o r a t o r s ) ; r e t u r n n . u r l I n p u t V i e w . b i n d ( " v a l u e " ) . t o ( e , " v a l u e " ) , n . u r l I n p u t V i e w . b i n d ( " i s R e a d O n l y " ) . t o ( e , " i s E n a b l e d " , t = > ! t ) , n . s a v e B u t t o n V i e w . b i n d ( " i s E n a b l e d " ) . t o ( e ) , t h i s . l i s t e n T o ( n , " s u b m i t " , ( ) = > { t . e x e c u t e ( " l i n k " , n . u r l I n p u t V i e w . i n p u t V i e w . e l e m e n t . v a l u e , n . g e t D e c o r a t o r S w i t c h e s S t a t e ( ) ) , t h i s . _ c l o s e F o r m V i e w ( ) } ) , t h i s . l i s t e n T o ( n , " c a n c e l " , ( ) = > { t h i s . _ c l o s e F o r m V i e w ( ) } ) , n . k e y s t r o k e s . s e t ( " E s c " , ( t , e ) = > { t h i s . _ c l o s e F o r m V i e w ( ) , e ( ) } ) , n } _ c r e a t e T o o l b a r L i n k B u t t o n ( ) { c o n s t t = t h i s . e d i t o r , e = t . c o m m a n d s . g e t ( " l i n k " ) , n = t . t ; t . k e y s t r o k e s . s e t ( P m , ( t , n ) = > { n ( ) , e . i s E n a b l e d & & t h i s . _ s h o w U I ( ! 0 ) } ) , t . u i . c o m p o n e n t F a c t o r y . a d d ( " l i n k " , t = > { c o n s t i = n e w o d ( t ) ; r e t u r n i . i s E n a b l e d = ! 0 , i . l a b e l = n ( " a o " ) , i . i c o n = A m , i . k e y s t r o k e = P m , i . t o o l t i p = ! 0 , i . i s T o g g l e a b l e = ! 0 , i . b i n d ( " i s E n a b l e d " ) . t o ( e , " i s E n a b l e d " ) , i . b i n d ( " i s O n " ) . t o ( e , " v a l u e " , t = > ! ! t ) , t h i s . l i s t e n T o ( i , " e x e c u t e " , ( ) = > t h i s . _ s h o w U I ( ! 0 ) ) , i } ) } _ e n a b l e U s e r B a l l o o n I n t e r a c t i o n s ( ) { c o n s t t = t h i s . e d i t o r . e d i t i n g . v i e w . d o c u m e n t ; t h i s . l i s t e n T o ( t , " c l i c k " , ( ) = > { t h i s . _ g e t S e l e c t e d L i n k E l e m e n t ( ) & & t h i s . _ s h o w U I ( ) } ) , t h i s . e d i t o r . k e y s t r o k e s . s e t ( " T a b " , ( t , e ) = > { t h i s . _ a r e A c t i o n s V i s i b l e & & ! t h i s . a c t i o n s V i e w . f o c u s T r a c k e r . i s F o c u s e d & & ( t h i s . a c t i o n s V i e w . f o c u s ( ) , e ( ) ) } , { p r i o r i t y : " h i g h " } ) , t h i s . e d i t o r . k e y s t r o k e s . s e t ( " E s c " , ( t , e ) = > { t h i s . _ i s U I V i s i b l e & & ( t h i s . _ h i d e U I ( ) , e ( ) ) } ) , u d ( { e m i t t e r : t h i s . f o r m V i e w , a c t i v a t o r : ( ) = > t h i s . _ i s U I I n P a n e l , c o n t e x t E l e m e n t s : [ t h i s . _ b a l l o o n . v i e w . e l e m e n t ] , c a l l b a c k : ( ) = > t h i s . _ h i d e U I ( ) } ) } _ a d d A c t i o n s V i e w ( ) { t h i s . _ a r e A c t i o n s I n P a n e l | | t h i s . _ b a l l o o n . a d d ( { v i e w : t h i s . a c t i o n s V i e w , p o s i t i o n : t h i s . _ g e t B a l l o o n P o s i t i o n D a t a ( ) } ) } _ a d d F o r m V i e w ( ) { i f ( t h i s . _ i s F o r m I n P a n e l ) r e t u r n ; c o n s t t = t h i s . e d i t o r . c o m m a n d s . g e t ( " l i n k " ) ; t h i s . _ b a l l o o n . a d d ( { v i e w : t h i s . f o r m V i e w , p o s i t i o n : t h i s . _ g e t B a l l o o n P o s i t i o n D a t a ( ) } ) , t h i s . _ b a l l o o n . v i s i b l e V i e w = = = t h i s . f o r m V i e w & & t h i s . f o r m V i e w . u r l I n p u t V i e w . s e l e c t ( ) , t h i s . f o r m V i e w . u r l I n p u t V i e w . i n p u t V i e w . e l e m e n t . v a l u e = t . v a l u e | | " " } _ c l o s e F o r m V i e w ( ) { c o n s t t = t h i s . e d i t o r . c o m m a n d s . g e t ( " l i n k " ) ; t . r e s t o r e M a n u a l D e c o r a t o r S t a t e s ( ) , v o i d 0 ! = = t . v a l u e ? t h i s . _ r e m o v e F o r m V i e w ( ) : t h i s . _ h i d e U I ( ) } _ r e m o v e F o r m V i e w ( ) { t h i s . _ i s F o r m I n P a n e l & & ( t h i s . f o r m V i e w . s a v e B u t t o n V i e w . f o c u s ( ) , t h i s . _ b a l l o o n . r e m o v e ( t h i s . f o r m V i e w ) , t h i s . e d i t o r . e d i t i n g . v i e w . f o c u s ( ) ) } _ s h o w U I ( t = ! 1 ) { t h i s . e d i t o r . c o m m a n d s . g e t ( " l i n k " ) . i s E n a b l e d & & ( t h i s . _ g e t S e l e c t e d L i n k E l e m e n t ( ) ? ( t h i s . _ a r e A c t i o n s V i s i b l e ? t h i s . _ a d d F o r m V i e w ( ) : t h i s . _ a d d A c t i o n s V i e w ( ) , t & & t h i s . _ b a l l o o n . s h o w S t a c k ( " m a i n " ) ) : ( t h i s . _ a d d A c t i o n s V i e w ( ) , t & & t h i s . _ b a l l o o n . s h o w S t a c k ( " m a i n " ) , t h i s . _ a d d F o r m V i e w ( ) ) , t h i s . _ s t a r t U p d a t i n g U I ( ) ) } _ h i d e U I ( ) { i f ( ! t h i s . _ i s U I I n P a n e l ) r e t u r n ; c o n s t t = t h i s . e d i t o r ; t h i s . s t o p L i s t e n i n g ( t . u i , " u p d a t e " ) , t h i s . s t o p L i s t e n i n g ( t h i s . _ b a l l o o n , " c h a n g e : v i s i b l e V i e w " ) , t . e d i t i n g . v i e w . f o c u s ( ) , t h i s . _ r e m o v e F o r m V i e w ( ) , t h i s . _ b a l l o o n . r e m o v e ( t h i s . a c t i o n s V i e w ) } _ s t a r t U p d a t i n g U I ( ) { c o n s t t = t h i s . e d i t o r , e = t . e d i t i n g . v i e w . d o c u m e n t ; l e t n = t h i s . _ g e t S e l e c t e d L i n k E l e m e n t ( ) , i = r ( ) ; c o n s t o = ( ) = > { c o n s t t = t h i s . _ g e t S e l e c t e d L i n k E l e m e n t ( ) , e = r ( ) ; n & & ! t | | ! n & & e ! = = i ? t h i s . _ h i d e U I ( ) : t h i s . _ i s U I V i s i b l e & & t h i s . _ b a l l o o n . u p d a t e P o s i t i o n ( t h i s . _ g e t B a l l o o n P o s i t i o n D a t a ( ) ) , n = t , i = e } ; f u n c t i o n r ( ) { r e t u r n e . s e l e c t i o n . f o c u s . g e t A n c e s t o r s ( ) . r e v e r s e ( ) . f i n d ( t = > t . i s ( " e l e m e n t " ) ) } t h i s . l i s t e n T o ( t . u i , " u p d a t e " , o ) , t h i s . l i s t e n T o ( t h i s . _ b a l l o o n , " c h a n g e : v i s i b l e V i e w " , o ) } g e t _ i s F o r m I n P a n e l ( ) { r e t u r n t h i s . _ b a l l o o n . h a s V i e w ( t h i s . f o r m V i e w ) } g e
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Sm extends qu { constructor ( t , e ) { super ( t ) , this . type = e } refresh ( ) { this . value = this . _getValue ( ) , this . isEnabled = this . _checkEnabled ( ) } execute ( ) { const t = this . editor . model , e = t . document , n = Array . from ( e . selection . getSelectedBlocks ( ) ) . filter ( e => Im ( e , t . schema ) ) , i = ! 0 === this . value ; t . change ( t => { if ( i ) { let e = n [ n . length - 1 ] . nextSibling , i = Number . POSITIVE _INFINITY , o = [ ] ; for ( ; e && "listItem" == e . name && 0 !== e . getAttribute ( "listIndent" ) ; ) { const t = e . getAttribute ( "listIndent" ) ; t < i && ( i = t ) ; const n = t - i ; o . push ( { element : e , listIndent : n } ) , e = e . nextSibling } o = o . reverse ( ) ; for ( const e of o ) t . setAttribute ( "listIndent" , e . listIndent , e . element ) } if ( ! i ) { let t = Number . POSITIVE _INFINITY ; for ( const e of n ) e . is ( "listItem" ) && e . getAttribute ( "listIndent" ) < t && ( t = e . getAttribute ( "listIndent" ) ) ; Rm ( n , ! 0 , t = 0 === t ? 1 : t ) , Rm ( n , ! 1 , t ) } for ( const e of n . reverse ( ) ) i && "listItem" == e . name ? t . rename ( e , "paragraph" ) : i || "listItem" == e . name ? i || "listItem" != e . name || e . getAttribute ( "listType" ) == this . type || t . setAttribute ( "listType" , this . type , e ) : ( t . setAttributes ( { listType : this . type , listIndent : 0 } , e ) , t . rename ( e , "listItem" ) ) } ) } _getValue ( ) { const t = Cf ( this . editor . model . document . selection . getSelectedBlocks ( ) ) ; return ! ! t && t . is ( "listItem" ) && t . getAttribute ( "listType" ) == this . type } _checkEnabled ( ) { if ( this . value ) return ! 0 ; const t = this . editor . model . document . selection , e = this . editor . model . schema , n = Cf ( t . getSelectedBlocks ( ) ) ; return ! ! n && Im ( n , e ) } } function Rm ( t , e , n ) { const i = e ? t [ 0 ] : t [ t . length - 1 ] ; if ( i . is ( "listItem" ) ) { let o = i [ e ? "previousSibling" : "nextSibling" ] , r = i . getAttribute ( "listIndent" ) ; for ( ; o && o . is ( "listItem" ) && o . getAttribute ( "listIndent" ) >= n ; ) r > o . getAttribute ( "listIndent" ) && ( r = o . getAttribute ( "listIndent" ) ) , o . getAttribute ( "listIndent" ) == r && t [ e ? "unshift" : "push" ] ( o ) , o = o [ e ? "previousSibling" : "nextSibling" ] } } function Im ( t , e ) { return e . checkChild ( t . parent , "listItem" ) && ! e . isObject ( t ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s O m e x t e n d s q u { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ i n d e n t B y = " f o r w a r d " = = e ? 1 : - 1 } r e f r e s h ( ) { t h i s . i s E n a b l e d = t h i s . _ c h e c k E n a b l e d ( ) } e x e c u t e ( ) { c o n s t t = t h i s . e d i t o r . m o d e l , e = t . d o c u m e n t ; l e t n = A r r a y . f r o m ( e . s e l e c t i o n . g e t S e l e c t e d B l o c k s ( ) ) ; t . c h a n g e ( t = > { c o n s t e = n [ n . l e n g t h - 1 ] ; l e t i = e . n e x t S i b l i n g ; f o r ( ; i & & " l i s t I t e m " = = i . n a m e & & i . g e t A t t r i b u t e ( " l i s t I n d e n t " ) > e . g e t A t t r i b u t e ( " l i s t I n d e n t " ) ; ) n . p u s h ( i ) , i = i . n e x t S i b l i n g ; t h i s . _ i n d e n t B y < 0 & & ( n = n . r e v e r s e ( ) ) ; f o r ( c o n s t e o f n ) { c o n s t n = e . g e t A t t r i b u t e ( " l i s t I n d e n t " ) + t h i s . _ i n d e n t B y ; n < 0 ? t . r e n a m e ( e , " p a r a g r a p h " ) : t . s e t A t t r i b u t e ( " l i s t I n d e n t " , n , e ) } } ) } _ c h e c k E n a b l e d ( ) { c o n s t t = C f ( t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . g e t S e l e c t e d B l o c k s ( ) ) ; i f ( ! t | | ! t . i s ( " l i s t I t e m " ) ) r e t u r n ! 1 ; i f ( t h i s . _ i n d e n t B y > 0 ) { c o n s t e = t . g e t A t t r i b u t e ( " l i s t I n d e n t " ) , n = t . g e t A t t r i b u t e ( " l i s t T y p e " ) ; l e t i = t . p r e v i o u s S i b l i n g ; f o r ( ; i & & i . i s ( " l i s t I t e m " ) & & i . g e t A t t r i b u t e ( " l i s t I n d e n t " ) > = e ; ) { i f ( i . g e t A t t r i b u t e ( " l i s t I n d e n t " ) = = e ) r e t u r n i . g e t A t t r i b u t e ( " l i s t T y p e " ) = = n ; i = i . p r e v i o u s S i b l i n g } r e t u r n ! 1 } r e t u r n ! 0 } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n D m ( t , e ) { c o n s t n = e . m a p p e r , i = e . w r i t e r , o = " n u m b e r e d " = = t . g e t A t t r i b u t e ( " l i s t T y p e " ) ? " o l " : " u l " , r = f u n c t i o n ( t ) { c o n s t e = t . c r e a t e C o n t a i n e r E l e m e n t ( " l i " ) ; r e t u r n e . g e t F i l l e r O f f s e t = L m , e } ( i ) , s = i . c r e a t e C o n t a i n e r E l e m e n t ( o , n u l l ) ; r e t u r n i . i n s e r t ( i . c r e a t e P o s i t i o n A t ( s , 0 ) , r ) , n . b i n d E l e m e n t s ( t , r ) , r } f u n c t i o n M m ( t , e , n , i ) { c o n s t o = e . p a r e n t , r = n . m a p p e r , s = n . w r i t e r ; l e t a = r . t o V i e w P o s i t i o n ( i . c r e a t e P o s i t i o n B e f o r e ( t ) ) ; c o n s t c = F m ( t . p r e v i o u s S i b l i n g , { s a m e I n d e n t : ! 0 , s m a l l e r I n d e n t : ! 0 , l i s t I n d e n t : t . g e t A t t r i b u t e ( " l i s t I n d e n t " ) } ) , l = t . p r e v i o u s S i b l i n g ; i f ( c & & c . g e t A t t r i b u t e ( " l i s t I n d e n t " ) = = t . g e t A t t r i b u t e ( " l i s t I n d e n t " ) ) { c o n s t t = r . t o V i e w E l e m e n t ( c ) ; a = s . b r e a k C o n t a i n e r ( s . c r e a t e P o s i t i o n A f t e r ( t ) ) } e l s e a = l & & " l i s t I t e m " = = l . n a m e ? r . t o V i e w P o s i t i o n ( i . c r e a t e P o s i t i o n A t ( l , " e n d " ) ) : r . t o V i e w P o s i t i o n ( i . c r e a t e P o s i t i o n B e f o r e ( t ) ) ; i f ( a = V m ( a ) , s . i n s e r t ( a , o ) , l & & " l i s t I t e m " = = l . n a m e ) { c o n s t t = r . t o V i e w E l e m e n t ( l ) , n = s . c r e a t e R a n g e ( s . c r e a t e P o s i t i o n A t ( t , 0 ) , a ) . g e t W a l k e r ( { i g n o r e E l e m e n t E n d : ! 0 } ) ; f o r ( c o n s t t o f n ) i f ( t . i t e m . i s ( " l i " ) ) { c o n s t i = s . b r e a k C o n t a i n e r ( s . c r e a t e P o s i t i o n B e f o r e ( t . i t e m ) ) , o = t . i t e m . p a r e n t , r = s . c r e a t e P o s i t i o n A t ( e , " e n d " ) ; N m ( s , r . n o d e B e f o r e , r . n o d e A f t e r ) , s . m o v e ( s . c r e a t e R a n g e O n ( o ) , r ) , n . p o s i t i o n = i } } e l s e { c o n s t n = o . n e x t S i b l i n g ; i f ( n & & ( n . i s ( " u l " ) | | n . i s ( " o l " ) ) ) { l e t i = n u l l ; f o r ( c o n s t e o f n . g e t C h i l d r e n ( ) ) { c o n s t n = r . t o M o d e l E l e m e n t ( e ) ; i f ( ! ( n & & n . g e t A t t r i b u t e ( " l i s t I n d e n t " ) > t . g e t A t t r i b u t e ( " l i s t I n d e n t " ) ) ) b r e a k ; i = e } i & & ( s . b r e a k C o n t a i n e r ( s . c r e a t e P o s i t i o n A f t e r ( i ) ) , s . m o v e ( s . c r e a t e R a n g e O n ( i . p a r e n t ) , s . c r e a t e P o s i t i o n A t ( e , " e n d " ) ) ) } } N m ( s , o , o . n e x t S i b l i n g ) , N m ( s , o . p r e v i o u s S i b l i n g , o ) } f u n c t i o n N m ( t , e , n ) { r e t u r n ! e | | ! n | | " u l " ! = e . n a m e & & " o l " ! = e . n a m e ? n u l l : e . n a m e ! = n . n a m e | | e . g e t A t t r i b u t e ( " c l a s s " ) ! = = n . g e t A t t r i b u t e ( " c l a s s " ) ? n u l l : t . m e r g e C o n t a i n e r s ( t . c r e a t e P o s i t i o n A f t e r ( e ) ) } f u n c t i o n V m ( t ) { r e t u r n t . g e t L a s t M a t c h i n g P o s i t i o n ( t = > t . i t e m . i s ( " u i E l e m e n t " ) ) } f u n c t i o n F m ( t , e ) { c o n s t n = ! ! e . s a m e I n d e n t , i = ! ! e . s m a l l e r I n d e n t , o = e . l i s t I n d e n t ; l e t r = t ; f o r ( ; r & & " l i s t I t e m " = = r . n a m e ; ) { c o n s t t = r . g e t A t t r i b u t e ( " l i s t I n d e n t " ) ; i f ( n & & o = = t | | i & & o > t ) r e t u r n r ; r = r . p r e v i o u s S i b l i n g } r e t u r n n u l l } f u n c t i o n B m ( t , e , n , i ) { t . u i . c o m p o n e n t F a c t o r y . a d d ( e , o = > { c o n s t r = t . c o m m a n d s . g e t ( e ) , s = n e w o d ( o ) ; r e t u r n s . s e t ( { l a b e l : n , i c o n : i , t o o l t i p : ! 0 , i s T o g g l e a b l e : ! 0 } ) , s . b i n d ( " i s O n " , " i s E n a b l e d " ) . t o ( r , " v a l u e " , " i s E n a b l e d " ) , s . o n ( " e x e c u t e " , ( ) = > t . e x e c u t e ( e ) ) , s } ) } f u n c t i o n L m ( ) { c o n s t t = ! t h i s . i s E m p t y & & ( " u l " = = t h i s . g e t C h i l d ( 0 ) . n a m e | | " o l " = = t h i s . g e t C h i l d ( 0 ) . n a m e ) ; r e t u r n t h i s . i s E m p t y | | t ? 0 : A i . c a l l ( t h i s ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n z m ( t ) { r e t u r n ( e , n , i ) = > { c o n s t o = i . c o n s u m a b l e ; i f ( ! o . t e s t ( n . i t e m , " i n s e r t " ) | | ! o . t e s t ( n . i t e m , " a t t r i b u t e : l i s t T y p e " ) | | ! o . t e s t ( n . i t e m , " a t t r i b u t e : l i s t I n d e n t " ) ) r e t u r n ; o . c o n s u m e ( n . i t e m , " i n s e r t " ) , o . c o n s u m e ( n . i t e m , " a t t r i b u t e : l i s t T y p e " ) , o . c o n s u m e ( n . i t e m , " a t t r i b u t e : l i s t I n d e n t " ) ; c o n s t r = n . i t e m ; M m ( r , D m ( r , i ) , i , t ) } } f u n c t i o n q m ( t , e , n ) { i f ( ! n . c o n s u m a b l e . c o n s u m e ( e . i t e m , " a t t r i b u t e : l i s t T y p e " ) ) r e t u r n ; c o n s t i = n . m a p p e r . t o V i e w E l e m e n t ( e . i t e m ) , o = n . w r i t e r ; o . b r e a k C o n t a i n e r ( o . c r e a t e P o s i t i o n B e f o r e ( i ) ) , o . b r e a k C o n t a i n e r ( o . c r e a t e P o s i t i o n A f t e r ( i ) ) ; c o n s t r = i . p a r e n t , s = " n u m b e r e d " = = e . a t t r i b u t e N e w V a l u e ? " o l " : " u l " ; o . r e n a m e ( s , r ) } f u n c t i o n j m ( t , e , n ) { c o n s t i = n . m a p p e r . t o V i e w E l e m e n t ( e . i t e m ) . p a r e n t , o = n . w r i t e r ; N m ( o , i , i . n e x t S i b l i n g ) , N m ( o , i . p r e v i o u s S i b l i n g , i ) ; f o r ( c o n s t t o f e . i t e m . g e t C h i l d r e n ( ) ) n . c o n s u m a b l e . c o n s u m e ( t , " i n s e r t " ) } f u n c t i o n H m ( t , e , n ) { i f ( " l i s t I t e m " ! = e . i t e m . n a m e ) { l e t t = n . m a p p e r . t o V i e w P o s i t i o n ( e . r a n g e . s t a r t ) ; c o n s t i = n . w r i t e r , o = [ ] ; f o r ( ; ( " u l " = = t . p a r e n t . n a m e | | " o l " = = t . p a r e n t . n a m e ) & & " l i " = = ( t = i . b r e a k C o n t a i n e r ( t ) ) . p a r e n t . n a m e ; ) { c o n s t e = t , n = i . c r e a t e P o s i t i o n A t ( t . p a r e n t , " e n d " ) ; i f ( ! e . i s E q u a l ( n ) ) { c o n s t t = i . r e m o v e ( i . c r e a t e R a n g e ( e , n ) ) ; o . p u s h ( t ) } t = i . c r e a t e P o s i t i o n A f t e r ( t . p a r e n t ) } i f ( o . l e n g t h > 0 ) { f o r ( l e t e = 0 ; e < o . l e n g t h ; e + + ) { c o n s t n = t . n o d e B e f o r e ; i f ( t = i . i n s e r t ( t , o [ e ] ) . e n d , e > 0 ) { c o n s t e = N m ( i , n , n . n e x t S i b l i n g ) ; e & & e . p a r e n t = = n & & t . o f f s e t - - } } N m ( i , t . n o d e B e f o r e , t . n o d e A f t e r ) } } } f u n c t i o n U m ( t , e , n ) { c o n s t i = n . m a p p e r . t o V i e w P o s i t i o n ( e . p o s i t i o n ) , o = i . n o d e B e f o r e , r = i . n o d e A f t e r ; N m ( n . w r i t e r , o , r ) } f u n c t i o n $ m ( t , e , n ) { i f ( n . c o n s u m a b l e . c o n s u m e ( e . v i e w I t e m , { n a m e : ! 0 } ) ) { c o n s t t = n . w r i t e r , i = t . c r e a t e E l e m e n t ( " l i s t I t e m " ) , o = f u n c t i o n ( t ) { l e t e = 0 , n = t . p a r e n t ; f o r ( ; n ; ) { i f ( n . i s ( " l i " ) ) e + + ; e l s e { c o n s t t = n . p r e v i o u s S i b l i n g ; t & & t . i s ( " l i " ) & & e + + } n = n . p a r e n t } r e t u r n e }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /(e.viewItem);t.setAttribute("listIndent",o,i);const r=e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted";t.setAttribute("listType",r,i);const s=n.splitToAllowedParent(i,e.modelCursor);if(!s)return;t.insert(i,s.position);const a=function(t,e,n){const{writer:i,schema:o}=n;let r=i.createPositionAfter(t);for(const s of e)if("ul"==s.name||"ol"==s.name)r=n.convertItem(s,r).modelCursor;else{const e=n.convertItem(s,i.createPositionAt(t,"end")),a=e.modelRange.start.nodeAfter;a&&a.is("element")&&!o.checkChild(t,a.name)&&(t=e.modelCursor.parent.is("listItem")?e.modelCursor.parent:Zm(e.modelCursor),r=i.createPositionAfter(t))}return r}(i,e.viewItem.getChildren(),n);e.modelRange=t.createRange(e.modelCursor,a),s.cursorParent?e.modelCursor=t.createPositionAt(s.cursorParent,0):e.modelCursor=e.modelRange.end}}function Wm(t,e,n){if(n.consumable.test(e.viewItem,{name:!0})){const t=Array.from(e.viewItem.getChildren());for(const e of t){!(e.is("li")||Ym(e))&&e._remove()}}}function Gm(t,e,n){if(n.consumable.test(e.viewItem,{name:!0})){if(0===e.viewItem.childCount)return;const t=[...e.viewItem.getChildren()];let n=!1,i=!0;for(const e of t)n&&!Ym(e)&&e._remove(),e.is("text")?(i&&(e._data=e.data.replace(/ ^ \ s + /,"")),e.nextSibling&&!Ym(e.nextSibling)||(e._data=e.data.replace(/ \ s + $ / , "" ) ) ) : Ym ( e ) && ( n = ! 0 ) , i = ! 1 } } function Km ( t ) { return ( e , n ) => { if ( n . isPhantom ) return ; const i = n . modelPosition . nodeBefore ; if ( i && i . is ( "listItem" ) ) { const e = n . mapper . toViewElement ( i ) , o = e . getAncestors ( ) . find ( Ym ) , r = t . createPositionAt ( e , 0 ) . getWalker ( ) ; for ( const t of r ) { if ( "elementStart" == t . type && t . item . is ( "li" ) ) { n . viewPosition = t . previousPosition ; break } if ( "elementEnd" == t . type && t . item == o ) { n . viewPosition = t . nextPosition ; break } } } } } function Jm ( t , [ e , n ] ) { let i , o = e . is ( "documentFragment" ) ? e . getChild ( 0 ) : e ; if ( i = n ? this . createSelection ( n ) : this . document . selection , o && o . is ( "listItem" ) ) { const t = i . getFirstPosition ( ) ; let e = null ; if ( t . parent . is ( "listItem" ) ? e = t . parent : t . nodeBefore && t . nodeBefore . is ( "listItem" ) && ( e = t . nodeBefore ) , e ) { const t = e . getAttribute ( "listIndent" ) ; if ( t > 0 ) for ( ; o && o . is ( "listItem" ) ; ) o . _setAttribute ( "listIndent" , o . getAttribute ( "listIndent" ) + t ) , o = o . nextSibling } } } function Zm ( t ) { const e = new Ws ( { startPosition : t } ) ; let n ; do { n = e . next ( ) } while ( ! n . value . item . is ( "listItem" ) ) ; return n . value . item } function Qm ( t , e , n , i , o , r ) { const s = Fm ( e . nodeBefore , { sameIndent : ! 0 , smallerIndent : ! 0 , listIndent : t , foo : "b" } ) , a = o . mapper , c = o . writer , l = s ? s . getAttribute ( "listIndent" ) : null ; let d ; if ( s ) if ( l == t ) { const t = a . toViewElement ( s ) . parent ; d = c . createPositionAfter ( t ) } else { const t = r . createPositionAt ( s , "end" ) ; d = a . toViewPosition ( t ) } else d = n ; d = Vm ( d ) ; for ( const t of [ ... i . getChildren ( ) ] ) Ym ( t ) && ( d = c . move ( c . createRangeOn ( t ) , d ) . end , Nm ( c , t , t . nextSibling ) , Nm ( c , t . previousSibling , t ) ) } function Ym ( t ) { return t . is ( "ol" ) || t . is ( "ul" ) } class Xm extends yd { static get pluginName ( ) { return "ListEditing" } static get requires ( ) { return [ Mf ] } init ( ) { const t = this . editor ; t . model . schema . register ( "listItem" , { inheritAllFrom : "$block" , allowAttributes : [ "listType" , "listIndent" ] } ) ; const e = t . data , n = t . editing ; var i ; t . model . document . registerPostFixer ( e => ( function ( t , e ) { const n = t . document . differ . getChanges ( ) , i = new Map ; let o = ! 1 ; for ( const i of n ) if ( "insert" == i . type && "listItem" == i . name ) r ( i . position ) ; else if ( "insert" == i . type && "listItem" != i . name ) { if ( "$text" != i . name ) { const n = i . position . nodeAfter ; n . hasAttribute ( "listIndent" ) && ( e . removeAttribute ( "listIndent" , n ) , o = ! 0 ) , n . hasAttribute ( "listType" ) && ( e . removeAttribute ( "listType" , n ) , o = ! 0 ) ; for ( const e of Array . from ( t . createRangeIn ( n ) ) . filter ( t => t . item . is ( "listItem" ) ) ) r ( e . previousPosition ) } r ( i . position . getShiftedBy ( i . length ) ) } else "remove" == i . type && "listItem" == i . name ? r ( i . position ) : "attribute" == i . type && "listIndent" == i . attributeKey ? r ( i . range . start ) : "attribute" == i . type && "listType" == i . attributeKey && r ( i . range . start ) ; for ( const t of i . values ( ) ) s ( t ) , a ( t ) ; return o ; function r ( t ) { const e = t . nodeBefore ; if ( e && e . is ( "listItem" ) ) { let n = e ; if ( i . has ( n ) ) return ; for ( ; n . previousSibling && n . previousSibling . is ( "listItem" ) ; ) if ( n = n . previousSibling , i . has ( n ) ) return ; i . set ( t . nodeBefore , n ) } else { const e = t . nodeAfter ; e && e . is ( "listItem" ) && i . set ( e , e ) } } function s ( t ) { l
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class ig extends yd { init ( ) { const t = this . editor . t ; Bm ( this . editor , "numberedList" , t ( "ae" ) , eg ) , Bm ( this . editor , "bulletedList" , t ( "af" ) , ng ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /var og='<svg xmlns="http:/ / www . w3 . org / 2000 / svg " viewBox=" 0 0 512 512 "><path d=" M415 . 462 96.978 c - 88.1 - 88.1 - 230.824 - 88.1 - 318.924 0 - 87.22 87.22 - 87.22 229.943 0 318.044 88.1 88.1 230.824 88.1 318.924 0 87.22 - 88.1 87.22 - 230.824 0 - 318.044 zM246 . 31 437.047 c - 24.668 0 - 44.05 - 20.263 - 44.05 - 44.05 0 - 24.669 19.382 - 44.05 44.05 - 44.05 24.668 0 44.05 19.381 44.05 44.05 0 23.787 - 20.263 44.05 - 44.05 44.05 zm30 . 835 - 154.176 v23 . 787 c0 12.334 - 4.405 16.74 - 15.858 16.74 h - 32.597 c - 11.453 0 - 15.858 - 4.406 - 15.858 - 16.74 v - 53.742 c0 - 14.096 14.096 - 18.5 26.43 - 22.025 2.643 - . 88 6.167 - 1.762 8.81 - 2.643 16.74 - 6.167 26.43 - 13.215 26.43 - 30.835 0 - 6.167 0 - 23.787 - 29.073 - 23.787 - 17.62 0 - 33.478 7.048 - 43.17 10.572 - 5.285 2.643 - 7.929 3.524 - 11.453 3.524 - 5.286 0 - 10.572 - 4.405 - 11.453 - 9.691 L167 . 9 148.958 c - . 88 - 2.643 - . 88 - 5.286 - . 88 - 7.048 0 - 21.145 66.075 - 33.479 88.1 - 33.479 55.503 0 93.387 36.122 93.387 88.982 0 58.146 - 44.05 75.767 - 71.362 85.458 z "/></svg>';var rg='<?xml version=" 1.0 " encoding=" UTF - 8 " standalone=" no "?>\n<svg\n xmlns:dc=" http : //purl.org/dc/elements/1.1/"\n xmlns:cc="http://creativecommons.org/ns#"\n xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n xmlns:svg="http://www.w3.org/2000/svg"\n xmlns="http://www.w3.org/2000/svg"\n xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"\n xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"\n class="ck ck-icon ck-button__icon"\n viewBox="0 0 20 20"\n version="1.1"\n id="svg10"\n sodipodi:docname="code-block.svg"\n inkscape:version="0.92.3 (2405546, 2018-03-11)">\n <defs\n id="defs14" />\n <sodipodi:namedview\n pagecolor="#ffffff"\n bordercolor="#666666"\n borderopacity="1"\n objecttolerance="10"\n gridtolerance="10"\n guidetolerance="10"\n inkscape:pageopacity="0"\n inkscape:pageshadow="2"\n inkscape:window-width="640"\n inkscape:window-height="480"\n id="namedview12"\n showgrid="false"\n inkscape:zoom="33.37544"\n inkscape:cx="10.656564"\n inkscape:cy="13.670445"\n inkscape:current-layer="svg10" />\n <g\n id="g8"\n style="fill:none;fill-rule:evenodd"\n transform="matrix(0.8751128,0,0,0.8751128,1.3360704,0.91121972)">\n <g\n id="g6"\n style="fill:#353535">\n <g\n transform="translate(2,5.6)"\n id="g4">\n <path\n d="M 10.5,0.1 15.7,4 v 1.3 l -5.6,4 C 10,9.5 9.8,9.5 9.6,9.5 9.3,9.4 9,8.8 9,8.5 L 9.3,8.1 14,4.6 9.5,1.4 9.3,1.2 C 9.2,0.9 9.2,0.6 9.3,0.4 9.5,0.2 9.8,0 10.1,0 a 0.8,0.8 0 0 1 0.4,0.1 z M 5.3,0.1 0,4 v 1.3 l 5.6,4 C 5.7,9.5 5.9,9.5 6.1,9.5 6.4,9.4 6.8,8.8 6.7,8.5 6.7,8.4 6.7,8.2 6.5,8.1 L 1.5,4.6 6.2,1.4 6.4,1.2 C 6.5,0.9 6.5,0.6 6.4,0.4 6.2,0.2 5.9,0 5.6,0 A 0.8,0.8 0 0 0 5.3,0.1 Z"\n id="path2"\n inkscape:connector-curvature="0" />\n </g>\n </g>\n </g>\n <path\n style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#353535;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.09228408;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"\n d="M 0.22004104,0.220
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function kg ( t , e ) { let n = e . parent ; for ( ; n ; ) { if ( n . name === t ) return n ; n = n . parent } } function _g ( t , e , n , i , o = 1 ) { e > o ? i . setAttribute ( t , e , n ) : i . removeAttribute ( t , n ) } function vg ( t , e , n = { } ) { const i = t . createElement ( "tableCell" , n ) ; t . insertElement ( "paragraph" , i ) , t . insert ( i , e ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n y g ( ) { r e t u r n t = > { t . o n ( " e l e m e n t : t a b l e " , ( t , e , n ) = > { c o n s t i = e . v i e w I t e m ; i f ( ! n . c o n s u m a b l e . t e s t ( i , { n a m e : ! 0 } ) ) r e t u r n ; c o n s t { r o w s : o , h e a d i n g R o w s : r , h e a d i n g C o l u m n s : s } = f u n c t i o n ( t ) { c o n s t e = { h e a d i n g R o w s : 0 , h e a d i n g C o l u m n s : 0 } , n = [ ] , i = [ ] ; l e t o ; f o r ( c o n s t r o f A r r a y . f r o m ( t . g e t C h i l d r e n ( ) ) ) i f ( " t b o d y " = = = r . n a m e | | " t h e a d " = = = r . n a m e | | " t f o o t " = = = r . n a m e ) { " t h e a d " ! = = r . n a m e | | o | | ( o = r ) ; c o n s t t = A r r a y . f r o m ( r . g e t C h i l d r e n ( ) ) . f i l t e r ( t = > t . i s ( " e l e m e n t " , " t r " ) ) ; f o r ( c o n s t r o f t ) i f ( " t h e a d " = = = r . p a r e n t . n a m e & & r . p a r e n t = = = o ) e . h e a d i n g R o w s + + , n . p u s h ( r ) ; e l s e { i . p u s h ( r ) ; c o n s t t = C g ( r ) ; t > e . h e a d i n g C o l u m n s & & ( e . h e a d i n g C o l u m n s = t ) } } r e t u r n e . r o w s = [ . . . n , . . . i ] , e } ( i ) , a = { } ; s & & ( a . h e a d i n g C o l u m n s = s ) , r & & ( a . h e a d i n g R o w s = r ) ; c o n s t c = n . w r i t e r . c r e a t e E l e m e n t ( " t a b l e " , a ) , l = n . s p l i t T o A l l o w e d P a r e n t ( c , e . m o d e l C u r s o r ) ; i f ( l ) { i f ( n . w r i t e r . i n s e r t ( c , l . p o s i t i o n ) , n . c o n s u m a b l e . c o n s u m e ( i , { n a m e : ! 0 } ) , o . l e n g t h ) o . f o r E a c h ( t = > n . c o n v e r t I t e m ( t , n . w r i t e r . c r e a t e P o s i t i o n A t ( c , " e n d " ) ) ) ; e l s e { c o n s t t = n . w r i t e r . c r e a t e E l e m e n t ( " t a b l e R o w " ) ; n . w r i t e r . i n s e r t ( t , n . w r i t e r . c r e a t e P o s i t i o n A t ( c , " e n d " ) ) , v g ( n . w r i t e r , n . w r i t e r . c r e a t e P o s i t i o n A t ( t , " e n d " ) ) } e . m o d e l R a n g e = n . w r i t e r . c r e a t e R a n g e ( n . w r i t e r . c r e a t e P o s i t i o n B e f o r e ( c ) , n . w r i t e r . c r e a t e P o s i t i o n A f t e r ( c ) ) , l . c u r s o r P a r e n t ? e . m o d e l C u r s o r = n . w r i t e r . c r e a t e P o s i t i o n A t ( l . c u r s o r P a r e n t , 0 ) : e . m o d e l C u r s o r = e . m o d e l R a n g e . e n d } } ) } } f u n c t i o n x g ( t ) { r e t u r n e = > { e . o n ( ` e l e m e n t : $ { t } ` , ( t , e , n ) = > { c o n s t i = e . v i e w I t e m ; i f ( ! n . c o n s u m a b l e . t e s t ( i , { n a m e : ! 0 } ) ) r e t u r n ; c o n s t o = n . w r i t e r . c r e a t e E l e m e n t ( " t a b l e C e l l " ) , r = n . s p l i t T o A l l o w e d P a r e n t ( o , e . m o d e l C u r s o r ) ; i f ( ! r ) r e t u r n ; n . w r i t e r . i n s e r t ( o , r . p o s i t i o n ) , n . c o n s u m a b l e . c o n s u m e ( i , { n a m e : ! 0 } ) ; c o n s t s = n . w r i t e r . c r e a t e P o s i t i o n A t ( o , 0 ) ; n . c o n v e r t C h i l d r e n ( i , s ) , o . c h i l d C o u n t | | n . w r i t e r . i n s e r t E l e m e n t ( " p a r a g r a p h " , s ) , e . m o d e l R a n g e = n . w r i t e r . c r e a t e R a n g e ( n . w r i t e r . c r e a t e P o s i t i o n B e f o r e ( o ) , n . w r i t e r . c r e a t e P o s i t i o n A f t e r ( o ) ) , e . m o d e l C u r s o r = e . m o d e l R a n g e . e n d } ) } } f u n c t i o n C g ( t ) { l e t e = 0 , n = 0 ; c o n s t i = A r r a y . f r o m ( t . g e t C h i l d r e n ( ) ) . f i l t e r ( t = > " t h " = = = t . n a m e | | " t d " = = = t . n a m e ) ; f o r ( ; n < i . l e n g t h & & " t h " = = = i [ n ] . n a m e ; ) { c o n s t t = i [ n ] ; e + = p a r s e I n t ( t . g e t A t t r i b u t e ( " c o l s p a n " ) | | 1 ) , n + + } r e t u r n e }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s A g { c o n s t r u c t o r ( t , e = { } ) { t h i s . t a b l e = t , t h i s . s t a r t R o w = e . s t a r t R o w | | 0 , t h i s . e n d R o w = " n u m b e r " = = t y p e o f e . e n d R o w ? e . e n d R o w : v o i d 0 , t h i s . i n c l u d e S p a n n e d = ! ! e . i n c l u d e S p a n n e d , t h i s . c o l u m n = " n u m b e r " = = t y p e o f e . c o l u m n ? e . c o l u m n : v o i d 0 , t h i s . _ s k i p R o w s = n e w S e t , t h i s . _ r o w = 0 , t h i s . _ c o l u m n = 0 , t h i s . _ c e l l I n d e x = 0 , t h i s . _ s p a n n e d C e l l s = n e w M a p , t h i s . _ n e x t C e l l A t C o l u m n = - 1 } [ S y m b o l . i t e r a t o r ] ( ) { r e t u r n t h i s } n e x t ( ) { c o n s t t = t h i s . t a b l e . g e t C h i l d ( t h i s . _ r o w ) ; i f ( ! t | | t h i s . _ i s O v e r E n d R o w ( ) ) r e t u r n { d o n e : ! 0 } ; l e t e , n , i ; i f ( t h i s . _ i s S p a n n e d ( t h i s . _ r o w , t h i s . _ c o l u m n ) ) e = t h i s . _ g e t S p a n n e d ( t h i s . _ r o w , t h i s . _ c o l u m n ) , n = ! t h i s . i n c l u d e S p a n n e d | | t h i s . _ s h o u l d S k i p R o w ( ) | | t h i s . _ s h o u l d S k i p C o l u m n ( ) , i = t h i s . _ f o r m a t O u t V a l u e ( e , t h i s . _ c o l u m n , ! 0 ) ; e l s e { i f ( ! ( e = t . g e t C h i l d ( t h i s . _ c e l l I n d e x ) ) ) r e t u r n t h i s . _ r o w + + , t h i s . _ c o l u m n = 0 , t h i s . _ c e l l I n d e x = 0 , t h i s . _ n e x t C e l l A t C o l u m n = - 1 , t h i s . n e x t ( ) ; c o n s t o = p a r s e I n t ( e . g e t A t t r i b u t e ( " c o l s p a n " ) | | 1 ) , r = p a r s e I n t ( e . g e t A t t r i b u t e ( " r o w s p a n " ) | | 1 ) ; ( o > 1 | | r > 1 ) & & t h i s . _ r e c o r d S p a n s ( t h i s . _ r o w , t h i s . _ c o l u m n , r , o , e ) , t h i s . _ n e x t C e l l A t C o l u m n = t h i s . _ c o l u m n + o , n = t h i s . _ s h o u l d S k i p R o w ( ) | | t h i s . _ s h o u l d S k i p C o l u m n ( ) , i = t h i s . _ f o r m a t O u t V a l u e ( e , t h i s . _ c o l u m n , ! 1 , r , o ) } r e t u r n t h i s . _ c o l u m n + + , t h i s . _ c o l u m n = = t h i s . _ n e x t C e l l A t C o l u m n & & t h i s . _ c e l l I n d e x + + , n ? t h i s . n e x t ( ) : i } s k i p R o w ( t ) { t h i s . _ s k i p R o w s . a d d ( t ) } _ i s O v e r E n d R o w ( ) { r e t u r n v o i d 0 ! = = t h i s . e n d R o w & & t h i s . _ r o w > t h i s . e n d R o w } _ f o r m a t O u t V a l u e ( t , e , n , i = 1 , o = 1 ) { r e t u r n { d o n e : ! 1 , v a l u e : { c e l l : t , r o w : t h i s . _ r o w , c o l u m n : e , i s S p a n n e d : n , r o w s p a n : i , c o l s p a n : o , c e l l I n d e x : t h i s . _ c e l l I n d e x } } } _ s h o u l d S k i p R o w ( ) { c o n s t t = t h i s . _ r o w < t h i s . s t a r t R o w , e = t h i s . _ s k i p R o w s . h a s ( t h i s . _ r o w ) ; r e t u r n t | | e } _ s h o u l d S k i p C o l u m n ( ) { r e t u r n v o i d 0 ! = = t h i s . c o l u m n & & t h i s . c o l u m n ! = t h i s . _ c o l u m n } _ i s S p a n n e d ( t , e ) { i f ( ! t h i s . _ s p a n n e d C e l l s . h a s ( t ) ) r e t u r n ! 1 ; r e t u r n t h i s . _ s p a n n e d C e l l s . g e t ( t ) . h a s ( e ) } _ g e t S p a n n e d ( t , e ) { r e t u r n t h i s . _ s p a n n e d C e l l s . g e t ( t ) . g e t ( e ) } _ r e c o r d S p a n s ( t , e , n , i , o ) { f o r ( l e t n = e + 1 ; n < = e + i - 1 ; n + + ) t h i s . _ m a r k S p a n n e d C e l l ( t , n , o ) ; f o r ( l e t r = t + 1 ; r < t + n ; r + + ) f o r ( l e t t = e ; t < = e + i - 1 ; t + + ) t h i s . _ m a r k S p a n n e d C e l l ( r , t , o ) } _ m a r k S p a n n e d C e l l ( t , e , n ) { t h i s . _ s p a n n e d C e l l s . h a s ( t ) | | t h i s . _ s p a n n e d C e l l s . s e t ( t , n e w M a p ) , t h i s . _ s p a n n e d C e l l s . g e t ( t ) . s e t ( e , n ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n P g ( t ) { r e t u r n ! ! t . g e t C u s t o m P r o p e r t y ( " t a b l e " ) & & R d ( t ) } f u n c t i o n T g ( t ) { c o n s t e = t . g e t S e l e c t e d E l e m e n t ( ) ; r e t u r n e & & P g ( e ) ? e : n u l l } f u n c t i o n E g ( t ) { c o n s t e = k g ( " t a b l e " , t . g e t F i r s t P o s i t i o n ( ) ) ; r e t u r n e & & P g ( e . p a r e n t ) ? e . p a r e n t : n u l l }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n S g ( t = { } ) { r e t u r n e = > e . o n ( " i n s e r t : t a b l e " , ( e , n , i ) = > { c o n s t o = n . i t e m ; i f ( ! i . c o n s u m a b l e . c o n s u m e ( o , " i n s e r t " ) ) r e t u r n ; i . c o n s u m a b l e . c o n s u m e ( o , " a t t r i b u t e : h e a d i n g R o w s : t a b l e " ) , i . c o n s u m a b l e . c o n s u m e ( o , " a t t r i b u t e : h e a d i n g C o l u m n s : t a b l e " ) ; c o n s t r = t & & t . a s W i d g e t , s = i . w r i t e r . c r e a t e C o n t a i n e r E l e m e n t ( " f i g u r e " , { c l a s s : " t a b l e " } ) , a = i . w r i t e r . c r e a t e C o n t a i n e r E l e m e n t ( " t a b l e " ) ; l e t c ; i . w r i t e r . i n s e r t ( i . w r i t e r . c r e a t e P o s i t i o n A t ( s , 0 ) , a ) , r & & ( c = f u n c t i o n ( t , e ) { r e t u r n e . s e t C u s t o m P r o p e r t y ( " t a b l e " , ! 0 , t ) , I d ( t , e , { h a s S e l e c t i o n H a n d l e : ! 0 } ) } ( s , i . w r i t e r ) ) ; c o n s t l = n e w A g ( o ) , d = { h e a d i n g R o w s : o . g e t A t t r i b u t e ( " h e a d i n g R o w s " ) | | 0 , h e a d i n g C o l u m n s : o . g e t A t t r i b u t e ( " h e a d i n g C o l u m n s " ) | | 0 } , u = n e w M a p ; f o r ( c o n s t e o f l ) { c o n s t { r o w : n , c e l l : r } = e , s = z g ( L g ( n , d ) , a , i ) , c = o . g e t C h i l d ( n ) , l = u . g e t ( n ) | | F g ( c , n , s , i ) ; u . s e t ( n , l ) , i . c o n s u m a b l e . c o n s u m e ( r , " i n s e r t " ) , V g ( e , d , i . w r i t e r . c r e a t e P o s i t i o n A t ( l , " e n d " ) , i , t ) } c o n s t h = i . m a p p e r . t o V i e w P o s i t i o n ( n . r a n g e . s t a r t ) ; i . m a p p e r . b i n d E l e m e n t s ( o , r ? c : s ) , i . w r i t e r . i n s e r t ( h , r ? c : s ) } ) } f u n c t i o n R g ( t = { } ) { r e t u r n e = > e . o n ( " i n s e r t : t a b l e R o w " , ( e , n , i ) = > { c o n s t o = n . i t e m ; i f ( ! i . c o n s u m a b l e . c o n s u m e ( o , " i n s e r t " ) ) r e t u r n ; c o n s t r = o . p a r e n t , s = U g ( i . m a p p e r . t o V i e w E l e m e n t ( r ) ) , a = r . g e t C h i l d I n d e x ( o ) , c = n e w A g ( r , { s t a r t R o w : a , e n d R o w : a } ) , l = { h e a d i n g R o w s : r . g e t A t t r i b u t e ( " h e a d i n g R o w s " ) | | 0 , h e a d i n g C o l u m n s : r . g e t A t t r i b u t e ( " h e a d i n g C o l u m n s " ) | | 0 } , d = n e w M a p ; f o r ( c o n s t e o f c ) { c o n s t n = z g ( L g ( a , l ) , s , i ) , r = d . g e t ( a ) | | F g ( o , a , n , i ) ; d . s e t ( a , r ) , i . c o n s u m a b l e . c o n s u m e ( e . c e l l , " i n s e r t " ) , V g ( e , l , i . w r i t e r . c r e a t e P o s i t i o n A t ( r , " e n d " ) , i , t ) } } ) } f u n c t i o n I g ( t = { } ) { r e t u r n e = > e . o n ( " i n s e r t : t a b l e C e l l " , ( e , n , i ) = > { c o n s t o = n . i t e m ; i f ( ! i . c o n s u m a b l e . c o n s u m e ( o , " i n s e r t " ) ) r e t u r n ; c o n s t r = o . p a r e n t , s = r . p a r e n t , a = s . g e t C h i l d I n d e x ( r ) , c = n e w A g ( s , { s t a r t R o w : a , e n d R o w : a } ) , l = { h e a d i n g R o w s : s . g e t A t t r i b u t e ( " h e a d i n g R o w s " ) | | 0 , h e a d i n g C o l u m n s : s . g e t A t t r i b u t e ( " h e a d i n g C o l u m n s " ) | | 0 } ; f o r ( c o n s t e o f c ) i f ( e . c e l l = = = o ) { c o n s t n = i . m a p p e r . t o V i e w E l e m e n t ( r ) ; r e t u r n v o i d V g ( e , l , i . w r i t e r . c r e a t e P o s i t i o n A t ( n , r . g e t C h i l d I n d e x ( o ) ) , i , t ) } } ) } f u n c t i o n O g ( t = { } ) { c o n s t e = ! ! t . a s W i d g e t ; r e t u r n t = > t . o n ( " a t t r i b u t e : h e a d i n g R o w s : t a b l e " , ( t , n , i ) = > { c o n s t o = n . i t e m ; i f ( ! i . c o n s u m a b l e . c o n s u m e ( n . i t e m , t . n a m e ) ) r e t u r n ; c o n s t r = U g ( i . m a p p e r . t o V i e w E l e m e n t ( o ) ) , s = n . a t t r i b u t e O l d V a l u e , a = n . a t t r i b u t e N e w V a l u e ; i f ( a > s ) { c o n s t t = A r r a y . f r o m ( o . g e t C h i l d r e n ( ) ) . f i l t e r ( ( { i n d e x : t } ) = > c ( t , s - 1 , a ) ) ; H g ( t , z g ( " t h e a d " , r , i ) , i , " e n d " ) ; f o r ( c o n s t n o f t ) f o r ( c o n s t t o f n . g e t C h i l d r e n ( ) ) M g ( t , " t h " , i , e ) ; j g ( " t b o d y " , r , i ) } e l s e { H g ( A r r a y . f r o m ( o . g e t C h i l d r e n ( ) ) . f i l t e r ( ( { i n d e x : t } ) = > c ( t , a - 1 , s ) ) . r e v e r s e ( ) , z g ( " t b o d y " , r , i ) , i , 0 ) ; c o n s t t = n e w A g ( o , { s t a r t R o w : a ? a - 1 : a , e n d R o w : s - 1 } ) , n = { h e a d i n g R o w s : o . g e t A t t r i b u t e ( " h e a d i n g R o w s " ) | | 0 , h e a d i n g C o l u m n s : o . g e t A t t r i b u t e ( " h e a d i n g C o l u m n s " ) | | 0 } ; f o r ( c o n s t o o f t ) N g ( o , n , i , e ) ; j g ( " t h e a d " , r , i ) } f u n c t i o n c ( t , e , n ) { r e t u r n t > e & & t < n } } ) } f u n c t i o n D g ( t = { } ) { c o n s t e = ! ! t . a s W i d g e t ; r e t u r n t = > t . o n ( " a t t r i b u t e : h e a d i n g C o l u m n s : t a b l e " , ( t , n , i ) = > { c o n s t o = n . i t e m ; i f ( ! i . c o n s u m a b l e . c o n s u m e ( n . i t e m , t . n a m e ) ) r e t u r n ; c o n s t r = { h e a d i n g R o w s : o . g e t A t t r i b u t e ( " h e a d i n g R o w s " ) | | 0 , h e a d i n g C o l u m n s : o . g e t A t t r i b u t e ( " h e a d i n g C o l u m n s " ) | | 0 } , s = n . a t t r i b u t e O l d V a l u e , a = n . a t t r i b u t e N e w V a l u e , c = ( s > a ? s : a ) - 1 ; f o r ( c o n s t t o f n e w A g ( o ) ) t . c o l u m n > c | | N g ( t , r , i , e ) } ) } f u n c t i o n M g ( t , e , n , i ) { c o n s t o = n . w r i t e r , r = n . m a p p e r . t o V i e w E l e m e n t ( t ) ; i f ( ! r ) r e t u r n ; l e t s ; i f ( i ) { s = D d ( o . c r e a t e E d i t a b l e E l e m e n t ( e , r . g e t A t t r i b u t e s ( ) ) , o ) , o . i n s e r t ( o . c r e a t e P o s i t i o n A f t e r ( r ) , s ) , o . m o v e ( o . c r e a t e R a n g e I n ( r ) , o . c r e a t e P o s i t i o n A t ( s , 0 ) ) , o . r e m o v e ( o . c r e a t e R a n g e O n ( r ) ) } e l s e s = o . r e n a m e ( e , r ) ; n . m a p p e r . u n b i n d V i e w E l e m e n t ( r ) , n . m a p p e r . b i n d E l e m e n t s ( t , s ) } f u n c t i o n N g ( t , e , n , i ) { c o n s t { c e l l : o } = t , r = B g ( t , e ) , s = n . m a p p e r . t o V i e w E l e m e n t ( o ) ; s & & s . n a m e ! = = r & & M g ( o , r , n , i ) } f u n c t i o n V g ( t , e , n , i , o ) { c o n s t r = o & & o . a s W i d g e t , s = B g ( t , e ) , a = r ? D d ( i . w r i t e r . c r e a t e E d i t a b l e E l e m e n t ( s ) , i . w r i t e r ) : i . w r i t e r . c r e a t e C o n t a i n e r E l e m e n t ( s ) , c = t . c e l l , l = c . g e t C h i l d ( 0 ) , d = 1 = = = c . c h i l d C o u n t & & " p a r a g r a p h " = = = l . n a m e ; i f ( i . w r i t e r . i n s e r t ( n , a ) , d & & ! [ . . . l . g e t A t t r i b u t e K e y s ( ) ] . l e n g t h ) { c o n s t t = c . g e t C h i l d ( 0 ) , e = i . w r i t e r . c r e a t e P o s i t i o n A t ( a , " e n d " ) ; i f ( i . c o n s u m a b l e . c o n s u m e ( t , " i n s e r t " ) , o . a s W i d g e t ) { c o n s t n = i . w r i t e r . c r e a t e C o n t a i n e r E l e m e n t ( " s p a n " ) ; i . m a p p e r . b i n d E l e m e n t s ( t , n ) , i . w r i t e r . i n s e r t ( e , n ) , i . m a p p e r . b i n d E l e m e n t s ( c , a ) } e l s e i . m a p p e r . b i n d E l e m e n t s ( c , a ) , i . m a p p e r . b i n d E l e m e n t s ( t , a ) } e l s e i . m a p p e r . b i n d E l e m e n t s ( c , a ) } f u n c t i o n F g ( t , e , n , i ) { i . c o n s u m a b l e . c o n s u m e ( t , " i n s e r t " )
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class $g extends qu { refresh ( ) { const t = this . editor . model , e = t . document . selection , n = t . schema , i = function ( t ) { const e = t . parent ; return e === e . root ? e : e . parent }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( e . g e t F i r s t P o s i t i o n ( ) ) ; t h i s . i s E n a b l e d = n . c h e c k C h i l d ( i , " t a b l e " ) } e x e c u t e ( t = { } ) { c o n s t e = t h i s . e d i t o r . m o d e l , n = e . d o c u m e n t . s e l e c t i o n , i = t h i s . e d i t o r . p l u g i n s . g e t ( " T a b l e U t i l s " ) , o = p a r s e I n t ( t . r o w s ) | | 2 , r = p a r s e I n t ( t . c o l u m n s ) | | 2 , s = M d ( n , e ) ; e . c h a n g e ( t = > { c o n s t n = i . c r e a t e T a b l e ( t , o , r ) ; e . i n s e r t C o n t e n t ( n , s ) , t . s e t S e l e c t i o n ( t . c r e a t e P o s i t i o n A t ( n . g e t N o d e B y P a t h ( [ 0 , 0 , 0 ] ) , 0 ) ) } ) } } c l a s s W g e x t e n d s q u { c o n s t r u c t o r ( t , e = { } ) { s u p e r ( t ) , t h i s . o r d e r = e . o r d e r | | " b e l o w " } r e f r e s h ( ) { c o n s t t = k g ( " t a b l e " , t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ) ; t h i s . i s E n a b l e d = ! ! t } e x e c u t e ( ) { c o n s t t = t h i s . e d i t o r , e = t . m o d e l . d o c u m e n t . s e l e c t i o n , n = t . p l u g i n s . g e t ( " T a b l e U t i l s " ) , i = k g ( " t a b l e C e l l " , e . g e t F i r s t P o s i t i o n ( ) ) . p a r e n t , o = i . p a r e n t , r = o . g e t C h i l d I n d e x ( i ) , s = " b e l o w " = = = t h i s . o r d e r ? r + 1 : r ; n . i n s e r t R o w s ( o , { r o w s : 1 , a t : s } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s G g e x t e n d s q u { c o n s t r u c t o r ( t , e = { } ) { s u p e r ( t ) , t h i s . o r d e r = e . o r d e r | | " r i g h t " } r e f r e s h ( ) { c o n s t t = k g ( " t a b l e " , t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ) ; t h i s . i s E n a b l e d = ! ! t } e x e c u t e ( ) { c o n s t t = t h i s . e d i t o r , e = t . m o d e l . d o c u m e n t . s e l e c t i o n , n = t . p l u g i n s . g e t ( " T a b l e U t i l s " ) , i = k g ( " t a b l e C e l l " , e . g e t F i r s t P o s i t i o n ( ) ) , o = i . p a r e n t . p a r e n t , { c o l u m n : r } = n . g e t C e l l L o c a t i o n ( i ) , s = " r i g h t " = = = t h i s . o r d e r ? r + 1 : r ; n . i n s e r t C o l u m n s ( o , { c o l u m n s : 1 , a t : s } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s K g e x t e n d s q u { c o n s t r u c t o r ( t , e = { } ) { s u p e r ( t ) , t h i s . d i r e c t i o n = e . d i r e c t i o n | | " h o r i z o n t a l l y " } r e f r e s h ( ) { c o n s t t = k g ( " t a b l e C e l l " , t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ) ; t h i s . i s E n a b l e d = ! ! t } e x e c u t e ( ) { c o n s t t = k g ( " t a b l e C e l l " , t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ) , e = " h o r i z o n t a l l y " = = = t h i s . d i r e c t i o n , n = t h i s . e d i t o r . p l u g i n s . g e t ( " T a b l e U t i l s " ) ; e ? n . s p l i t C e l l H o r i z o n t a l l y ( t , 2 ) : n . s p l i t C e l l V e r t i c a l l y ( t , 2 ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s J g e x t e n d s q u { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . d i r e c t i o n = e . d i r e c t i o n , t h i s . i s H o r i z o n t a l = " r i g h t " = = t h i s . d i r e c t i o n | | " l e f t " = = t h i s . d i r e c t i o n } r e f r e s h ( ) { c o n s t t = t h i s . _ g e t M e r g e a b l e C e l l ( ) ; t h i s . v a l u e = t , t h i s . i s E n a b l e d = ! ! t } e x e c u t e ( ) { c o n s t t = t h i s . e d i t o r . m o d e l , e = k g ( " t a b l e C e l l " , t . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ) , n = t h i s . v a l u e , i = t h i s . d i r e c t i o n ; t . c h a n g e ( t = > { c o n s t o = " r i g h t " = = i | | " d o w n " = = i , r = o ? e : n , s = o ? n : e , a = s . p a r e n t ; ! f u n c t i o n ( t , e , n ) { Z g ( t ) | | ( Z g ( e ) & & n . r e m o v e ( n . c r e a t e R a n g e I n ( e ) ) , n . m o v e ( n . c r e a t e R a n g e I n ( t ) , n . c r e a t e P o s i t i o n A t ( e , " e n d " ) ) ) ; n . r e m o v e ( t ) } ( s , r , t ) ; c o n s t c = t h i s . i s H o r i z o n t a l ? " c o l s p a n " : " r o w s p a n " , l = p a r s e I n t ( e . g e t A t t r i b u t e ( c ) | | 1 ) , d = p a r s e I n t ( n . g e t A t t r i b u t e ( c ) | | 1 ) ; t . s e t A t t r i b u t e ( c , l + d , r ) , t . s e t S e l e c t i o n ( t . c r e a t e R a n g e I n ( r ) ) , a . c h i l d C o u n t | | f u n c t i o n ( t , e ) { c o n s t n = t . p a r e n t , i = n . g e t C h i l d I n d e x ( t ) ; f o r ( c o n s t { c e l l : t , r o w : o , r o w s p a n : r } o f n e w A g ( n , { e n d R o w : i } ) ) { o + r - 1 > = i & & _ g ( " r o w s p a n " , r - 1 , t , e ) } e . r e m o v e ( t ) } ( a , t ) } ) } _ g e t M e r g e a b l e C e l l ( ) { c o n s t t = k g ( " t a b l e C e l l " , t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ) ; i f ( ! t ) r e t u r n ; c o n s t e = t h i s . e d i t o r . p l u g i n s . g e t ( " T a b l e U t i l s " ) , n = t h i s . i s H o r i z o n t a l ? f u n c t i o n ( t , e , n ) { c o n s t i = " r i g h t " = = e ? t . n e x t S i b l i n g : t . p r e v i o u s S i b l i n g ; i f ( ! i ) r e t u r n ; c o n s t o = " r i g h t " = = e ? t : i , r = " r i g h t " = = e ? i : t , { c o l u m n : s } = n . g e t C e l l L o c a t i o n ( o ) , { c o l u m n : a } = n . g e t C e l l L o c a t i o n ( r ) , c = p a r s e I n t ( o . g e t A t t r i b u t e ( " c o l s p a n " ) | | 1 ) ; r e t u r n s + c = = = a ? i : v o i d 0 } ( t , t h i s . d i r e c t i o n , e ) : f u n c t i o n ( t , e ) { c o n s t n = t . p a r e n t , i = n . p a r e n t , o = i . g e t C h i l d I n d e x ( n ) ; i f ( " d o w n " = = e & & o = = = i . c h i l d C o u n t - 1 | | " u p " = = e & & 0 = = = o ) r e t u r n ; c o n s t r = p a r s e I n t ( t . g e t A t t r i b u t e ( " r o w s p a n " ) | | 1 ) , s = i . g e t A t t r i b u t e ( " h e a d i n g R o w s " ) | | 0 , a = " d o w n " = = e & & o + r = = = s , c = " u p " = = e & & o = = = s ; i f ( s & & ( a | | c ) ) r e t u r n ; c o n s t l = p a r s e I n t ( t . g e t A t t r i b u t e ( " r o w s p a n " ) | | 1 ) , d = " d o w n " = = e ? o + l : o , u = [ . . . n e w A g ( i , { e n d R o w : d } ) ] , h = u . f i n d ( e = > e . c e l l = = = t ) . c o l u m n , f = u . f i n d ( ( { r o w : t , r o w s p a n : n , c o l u m n : i } ) = > i = = = h & & ( " d o w n " = = e ? t = = = d : d = = = t + n ) ) ; r e t u r n f & & f . c e l l } ( t , t h i s . d i r e c t i o n ) ; i f ( ! n ) r e t u r n ; c o n s t i = t h i s . i s H o r i z o n t a l ? " r o w s p a n " : " c o l s p a n " , o = p a r s e I n t ( t . g e t A t t r i b u t e ( i ) | | 1 ) ; r e t u r n p a r s e I n t ( n . g e t A t t r i b u t e ( i ) | | 1 ) = = = o ? n : v o i d 0 } } f u n c t i o n Z g ( t ) { r e t u r n 1 = = t . c h i l d C o u n t & & t . g e t C h i l d ( 0 ) . i s ( " p a r a g r a p h " ) & & t . g e t C h i l d ( 0 ) . i s E m p t y }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s Q g e x t e n d s q u { r e f r e s h ( ) { c o n s t t = k g ( " t a b l e C e l l " , t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ) ; t h i s . i s E n a b l e d = ! ! t & & t . p a r e n t . p a r e n t . c h i l d C o u n t > 1 } e x e c u t e ( ) { c o n s t t = t h i s . e d i t o r . m o d e l , e = k g ( " t a b l e C e l l " , t . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ) . p a r e n t , n = e . p a r e n t , i = n . g e t C h i l d I n d e x ( e ) , o = n . g e t A t t r i b u t e ( " h e a d i n g R o w s " ) | | 0 ; t . c h a n g e ( t = > { o & & i < = o & & _ g ( " h e a d i n g R o w s " , o - 1 , n , t , 0 ) ; c o n s t r = [ . . . n e w A g ( n , { e n d R o w : i } ) ] , s = n e w M a p ; r . f i l t e r ( ( { r o w : t , r o w s p a n : e } ) = > t = = = i & & e > 1 ) . f o r E a c h ( ( { c o l u m n : t , c e l l : e , r o w s p a n : n } ) = > s . s e t ( t , { c e l l : e , r o w s p a n T o S e t : n - 1 } ) ) , r . f i l t e r ( ( { r o w : t , r o w s p a n : e } ) = > t < = i - 1 & & t + e > i ) . f o r E a c h ( ( { c e l l : e , r o w s p a n : n } ) = > _ g ( " r o w s p a n " , n - 1 , e , t ) ) ; c o n s t a = i + 1 , c = n e w A g ( n , { i n c l u d e S p a n n e d : ! 0 , s t a r t R o w : a , e n d R o w : a } ) ; l e t l ; f o r ( c o n s t { r o w : e , c o l u m n : i , c e l l : o } o f [ . . . c ] ) i f ( s . h a s ( i ) ) { c o n s t { c e l l : o , r o w s p a n T o S e t : r } = s . g e t ( i ) , a = l ? t . c r e a t e P o s i t i o n A f t e r ( l ) : t . c r e a t e P o s i t i o n A t ( n . g e t C h i l d ( e ) , 0 ) ; t . m o v e ( t . c r e a t e R a n g e O n ( o ) , a ) , _ g ( " r o w s p a n " , r , o , t ) , l = o } e l s e l = o ; t . r e m o v e ( e ) } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s Y g e x t e n d s q u { r e f r e s h ( ) { c o n s t t = t h i s . e d i t o r , e = t . m o d e l . d o c u m e n t . s e l e c t i o n , n = t . p l u g i n s . g e t ( " T a b l e U t i l s " ) , i = k g ( " t a b l e C e l l " , e . g e t F i r s t P o s i t i o n ( ) ) ; t h i s . i s E n a b l e d = ! ! i & & n . g e t C o l u m n s ( i . p a r e n t . p a r e n t ) > 1 } e x e c u t e ( ) { c o n s t t = t h i s . e d i t o r . m o d e l , e = k g ( " t a b l e C e l l " , t . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ) , n = e . p a r e n t , i = n . p a r e n t , o = i . g e t A t t r i b u t e ( " h e a d i n g C o l u m n s " ) | | 0 , r = i . g e t C h i l d I n d e x ( n ) , s = [ . . . n e w A g ( i ) ] , a = s . f i n d ( t = > t . c e l l = = = e ) . c o l u m n ; t . c h a n g e ( t = > { o & & r < = o & & t . s e t A t t r i b u t e ( " h e a d i n g C o l u m n s " , o - 1 , i ) ; f o r ( c o n s t { c e l l : e , c o l u m n : n , c o l s p a n : i } o f s ) n < = a & & i > 1 & & n + i > a ? _ g ( " c o l s p a n " , i - 1 , e , t ) : n = = = a & & t . r e m o v e ( e ) } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s X g e x t e n d s q u { r e f r e s h ( ) { c o n s t t = k g ( " t a b l e C e l l " , t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ) , e = ! ! t ; t h i s . i s E n a b l e d = e , t h i s . v a l u e = e & & t h i s . _ i s I n H e a d i n g ( t , t . p a r e n t . p a r e n t ) } e x e c u t e ( t = { } ) { c o n s t e = t h i s . e d i t o r . m o d e l , n = k g ( " t a b l e C e l l " , e . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ) . p a r e n t , i = n . p a r e n t , o = i . g e t A t t r i b u t e ( " h e a d i n g R o w s " ) | | 0 , r = n . i n d e x ; i f ( t . f o r c e V a l u e = = = t h i s . v a l u e ) r e t u r n ; c o n s t s = t h i s . v a l u e ? r : r + 1 ; e . c h a n g e ( t = > { i f ( s ) { c o n s t e = f u n c t i o n ( t , e , n ) { c o n s t i = [ ] , o = n e w A g ( t , { s t a r t R o w : e > n ? n : 0 , e n d R o w : e - 1 } ) ; f o r ( c o n s t { r o w : t , r o w s p a n : n , c e l l : r } o f o ) n > 1 & & t + n > e & & i . p u s h ( r ) ; r e t u r n i } ( i , s , o ) ; f o r ( c o n s t n o f e ) t b ( n , s , t ) } _ g ( " h e a d i n g R o w s " , s , i , t , 0 ) } ) } _ i s I n H e a d i n g ( t , e ) { c o n s t n = p a r s e I n t ( e . g e t A t t r i b u t e ( " h e a d i n g R o w s " ) | | 0 ) ; r e t u r n ! ! n & & t . p a r e n t . i n d e x < n } } f u n c t i o n t b ( t , e , n ) { c o n s t i = t . p a r e n t , o = i . p a r e n t , r = e - i . i n d e x , s = { } , a = p a r s e I n t ( t . g e t A t t r i b u t e ( " r o w s p a n " ) ) - r ; a > 1 & & ( s . r o w s p a n = a ) ; c o n s t c = p a r s e I n t ( t . g e t A t t r i b u t e ( " c o l s p a n " ) | | 1 ) ; c > 1 & & ( s . c o l s p a n = c ) ; c o n s t l = o . g e t C h i l d I n d e x ( i ) , d = l + r , u = [ . . . n e w A g ( o , { s t a r t R o w : l , e n d R o w : d , i n c l u d e S p a n n e d : ! 0 } ) ] ; l e t h ; f o r ( c o n s t { r o w : e , c o l u m n : i , c e l l : r , c e l l I n d e x : a } o f u ) i f ( r = = = t & & v o i d 0 = = = h & & ( h = i ) , v o i d 0 ! = = h & & h = = = i & & e = = = d ) { c o n s t t = o . g e t C h i l d ( e ) , i = n . c r e a t e P o s i t i o n A t ( t , a ) ; v g ( n , i , s ) } _ g ( " r o w s p a n " , r , t , n ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s e b e x t e n d s q u { r e f r e s h ( ) { c o n s t t = k g ( " t a b l e C e l l " , t h i s . e d i t o r . m o d e l . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ) , e = ! ! t ; t h i s . i s E n a b l e d = e , t h i s . v a l u e = e & & t h i s . _ i s I n H e a d i n g ( t , t . p a r e n t . p a r e n t ) } e x e c u t e ( t = { } ) { c o n s t e = t h i s . e d i t o r . m o d e l , n = e . d o c u m e n t . s e l e c t i o n , i = t h i s . e d i t o r . p l u g i n s . g e t ( " T a b l e U t i l s " ) , o = k g ( " t a b l e C e l l " , n . g e t F i r s t P o s i t i o n ( ) ) , r = o . p a r e n t . p a r e n t , { c o l u m n : s } = i . g e t C e l l L o c a t i o n ( o ) ; i f ( t . f o r c e V a l u e = = = t h i s . v a l u e ) r e t u r n ; c o n s t a = t h i s . v a l u e ? s : s + 1 ; e . c h a n g e ( t = > { _ g ( " h e a d i n g C o l u m n s " , a , r , t , 0 ) } ) } _ i s I n H e a d i n g ( t , e ) { c o n s t n = p a r s e I n t ( e . g e t A t t r i b u t e ( " h e a d i n g C o l u m n s " ) | | 0 ) , i = t h i s . e d i t o r . p l u g i n s . g e t ( " T a b l e U t i l s " ) , { c o l u m n : o } = i . g e t C e l l L o c a t i o n ( t ) ; r e t u r n ! ! n & & o < n } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s n b e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " T a b l e U t i l s " } g e t C e l l L o c a t i o n ( t ) { c o n s t e = t . p a r e n t , n = e . p a r e n t , i = n . g e t C h i l d I n d e x ( e ) , o = n e w A g ( n , { s t a r t R o w : i , e n d R o w : i } ) ; f o r ( c o n s t { c e l l : e , r o w : n , c o l u m n : i } o f o ) i f ( e = = = t ) r e t u r n { r o w : n , c o l u m n : i } } c r e a t e T a b l e ( t , e , n ) { c o n s t i = t . c r e a t e E l e m e n t ( " t a b l e " ) ; r e t u r n i b ( t , i , 0 , e , n ) , i } i n s e r t R o w s ( t , e = { } ) { c o n s t n = t h i s . e d i t o r . m o d e l , i = e . a t | | 0 , o = e . r o w s | | 1 ; n . c h a n g e ( e = > { c o n s t n = t . g e t A t t r i b u t e ( " h e a d i n g R o w s " ) | | 0 ; i f ( n > i & & e . s e t A t t r i b u t e ( " h e a d i n g R o w s " , n + o , t ) , 0 = = = i | | i = = = t . c h i l d C o u n t ) r e t u r n v o i d i b ( e , t , i , o , t h i s . g e t C o l u m n s ( t ) ) ; c o n s t r = n e w A g ( t , { e n d R o w : i } ) ; l e t s = 0 ; f o r ( c o n s t { r o w : t , r o w s p a n : n , c o l s p a n : a , c e l l : c } o f r ) { c o n s t r = t + n > i ; t < i & & r & & e . s e t A t t r i b u t e ( " r o w s p a n " , n + o , c ) , t = = = i & & ( s + = a ) } i b ( e , t , i , o , s ) } ) } i n s e r t C o l u m n s ( t , e = { } ) { c o n s t n = t h i s . e d i t o r . m o d e l , i = e . a t | | 0 , o = e . c o l u m n s | | 1 ; n . c h a n g e ( e = > { c o n s t n = t . g e t A t t r i b u t e ( " h e a d i n g C o l u m n s " ) ; i < n & & e . s e t A t t r i b u t e ( " h e a d i n g C o l u m n s " , n + o , t ) ; c o n s t r = t h i s . g e t C o l u m n s ( t ) ; i f ( 0 = = = i | | r = = = i ) { f o r ( c o n s t n o f t . g e t C h i l d r e n ( ) ) o b ( o , e , e . c r e a t e P o s i t i o n A t ( n , i ? " e n d " : 0 ) ) ; r e t u r n } c o n s t s = n e w A g ( t , { c o l u m n : i , i n c l u d e S p a n n e d : ! 0 } ) ; f o r ( c o n s t { r o w : n , c e l l : r , c e l l I n d e x : a } o f s ) { c o n s t c = p a r s e I n t ( r . g e t A t t r i b u t e ( " r o w s p a n " ) | | 1 ) , l = p a r s e I n t ( r . g e t A t t r i b u t e ( " c o l s p a n " ) | | 1 ) ; i f ( r . i n d e x ! = = i & & l > 1 ) { i f ( e . s e t A t t r i b u t e ( " c o l s p a n " , l + o , r ) , s . s k i p R o w ( n ) , c > 1 ) f o r ( l e t t = n + 1 ; t < n + c ; t + + ) s . s k i p R o w ( t ) } e l s e { c o n s t i = e . c r e a t e P o s i t i o n A t ( t . g e t C h i l d ( n ) , a ) ; o b ( o , e , i ) } } } ) } s p l i t C e l l V e r t i c a l l y ( t , e = 2 ) { c o n s t n = t h i s . e d i t o r . m o d e l , i = t . p a r e n t . p a r e n t , o = p a r s e I n t ( t . g e t A t t r i b u t e ( " r o w s p a n " ) | | 1 ) , r = p a r s e I n t ( t . g e t A t t r i b u t e ( " c o l s p a n " ) | | 1 ) ; n . c h a n g e ( n = > { i f ( r > 1 ) { c o n s t { n e w C e l l s S p a n : i , u p d a t e d S p a n : s } = r b ( r , e ) ; _ g ( " c o l s p a n " , s , t , n ) ; c o n s t a = { } ; i > 1 & & ( a . c o l s p a n = i ) , o > 1 & & ( a . r o w s p a n = o ) , o b ( r > e ? e - 1 : r - 1 , n , n . c r e a t e P o s i t i o n A f t e r ( t ) , a ) } i f ( r < e ) { c o n s t s = e - r , a = [ . . . n e w A g ( i ) ] , { c o l u m n : c } = a . f i n d ( ( { c e l l : e } ) = > e = = = t ) , l = a . f i l t e r ( ( { c e l l : e , c o l s p a n : n , c o l u m n : i } ) = > { r e t u r n e ! = = t & & i = = = c | | i < c & & i + n > c } ) ; f o r ( c o n s t { c e l l : t , c o l s p a n : e } o f l ) n . s e t A t t r i b u t e ( " c o l s p a n " , e + s , t ) ; c o n s t d = { } ; o > 1 & & ( d . r o w s p a n = o ) , o b ( s , n , n . c r e a t e P o s i t i o n A f t e r ( t ) , d ) ; c o n s t u = i . g e t A t t r i b u t e ( " h e a d i n g C o l u m n s " ) | | 0 ; u > c & & _ g ( " h e a d i n g C o l u m n s " , u + s , i , n ) } } ) } s p l i t C e l l H o r i z o n t a l l y ( t , e = 2 ) { c o n s t n = t h i s . e d i t o r . m o d e l , i = t . p a r e n t , o = i . p a r e n t , r = o . g e t C h i l d I n d e x ( i ) , s = p a r s e I n t ( t . g e t A t t r i b u t e ( " r o w s p a n " ) | | 1 ) , a = p a r s e I n t ( t . g e t A t t r i b u t e ( " c o l s p a n " ) | | 1 ) ; n . c h a n g e ( n = > { i f ( s > 1 ) { c o n s t i = [ . . . n e w A g ( o , { s t a r t R o w : r , e n d R o w : r + s - 1 , i n c l u d e S p a n n e d : ! 0 } ) ] , { n e w C e l l s S p a n : c , u p d a t e d S p a n : l } = r b ( s , e ) ; _ g ( " r o w s p a n " , l , t , n ) ; c o n s t { c o l u m n : d } = i . f i n d ( ( { c e l l : e } ) = > e = = = t ) , u = { } ; c > 1 & & ( u . r o w s p a n = c ) , a > 1 & & ( u . c o l s p a n = a ) ; f o r ( c o n s t { c o l u m n : t , r o w : e , c e l l I n d e x : s } o f i ) { c o n s t i = t = = = d , a = ( e + r + l ) % c = = 0 ; i f ( e > = r + l & & i & & a ) { c o n s t t = n . c r e a t e P o s i t i o n A t ( o . g e t C h i l d ( e ) , s ) ; o b ( 1 , n , t , u ) } } } i f ( s < e ) { c o n s t i = e - s , c = [ . . . n e w A g ( o , { s t a r t R o w : 0 , e n d R o w : r } ) ] ; f o r ( c o n s t { c e l l : e , r o w s p a n : o , r o w : s } o f c ) i f ( e ! = = t & & s + o > r ) { c o n s t t = o + i ; n . s e t A t t r i b u t e ( " r o w s p a n " , t , e ) } c o n s t l = { } ; a > 1 & & ( l . c o l s p a n = a ) , i b ( n , o , r + 1 , i , 1 , l ) ; c o n s t d = o . g e t A t t r i b u t e ( " h e a d i n g R o w s " ) | | 0 ; d > r & & _ g ( " h e a d i n g R o w s " , d + i , o , n ) } } ) } g e t C o l u m n s ( t ) { r e t u r n [ . . . t . g e t C h i l d ( 0 ) . g e t C h i l d r e n ( ) ] . r e d u c e ( ( t , e ) = > { r e t u r n t + p a r s e I n t ( e . g e t A t t r i b u t e ( " c o l s p a n " ) | | 1 ) } , 0 ) } } f u n c t i o n i b ( t , e , n , i , o , r = { } ) { f o r ( l e t s = 0 ; s < i ; s + + ) { c o n s t i = t . c r e a t e E l e m e n t ( " t a b l e R o w " ) ; t . i n s e r t ( i , e , n ) , o b ( o , t , t . c r e a t e P o s i t i o n A t ( i , " e n d " ) , r ) } } f u n c t i o n o b ( t , e , n , i = { } ) { f o r ( l e t o = 0 ; o < t ; o + + ) v g ( e , n , i ) } f u n c t i o n r b ( t , e ) { i f ( t < e ) r e t u r n { n e w C e l l s S p a n : 1 , u p d a t e d S p a n : 1 } ; c o n s t n = M a t h . f l o o r ( t / e ) ; r e t u r n { n e w C e l l s S p a n : n , u p d a t e d S p a n : t - n * e + n } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n s b ( t ) { t . d o c u m e n t . r e g i s t e r P o s t F i x e r ( e = > ( f u n c t i o n ( t , e ) { c o n s t n = e . d o c u m e n t . d i f f e r . g e t C h a n g e s ( ) ; l e t i = ! 1 ; c o n s t o = n e w S e t ; f o r ( c o n s t e o f n ) { l e t n ; " t a b l e " = = e . n a m e & & " i n s e r t " = = e . t y p e & & ( n = e . p o s i t i o n . n o d e A f t e r ) , " t a b l e R o w " ! = e . n a m e & & " t a b l e C e l l " ! = e . n a m e | | ( n = k g ( " t a b l e " , e . p o s i t i o n ) ) , l b ( e ) & & ( n = k g ( " t a b l e " , e . r a n g e . s t a r t ) ) , n & & ! o . h a s ( n ) & & ( i = a b ( n , t ) | | i , i = c b ( n , t ) | | i , o . a d d ( n ) ) } r e t u r n i } ) ( e , t ) ) } f u n c t i o n a b ( t , e ) { l e t n = ! 1 ; c o n s t i = f u n c t i o n ( t ) { c o n s t e = p a r s e I n t ( t . g e t A t t r i b u t e ( " h e a d i n g R o w s " ) | | 0 ) , n = t . c h i l d C o u n t , i = [ ] ; f o r ( c o n s t { r o w : o , r o w s p a n : r , c e l l : s } o f n e w A g ( t ) ) { i f ( r < 2 ) c o n t i n u e ; c o n s t t = o < e ? e : n ; i f ( o + r > t ) { c o n s t e = t - o ; i . p u s h ( { c e l l : s , r o w s p a n : e } ) } } r e t u r n i } ( t ) ; i f ( i . l e n g t h ) { n = ! 0 ; f o r ( c o n s t t o f i ) _ g ( " r o w s p a n " , t . r o w s p a n , t . c e l l , e , 1 ) } r e t u r n n } f u n c t i o n c b ( t , e ) { l e t n = ! 1 ; c o n s t i = f u n c t i o n ( t ) { c o n s t e = { } ; f o r ( c o n s t { r o w : n } o f n e w A g ( t , { i n c l u d e S p a n n e d : ! 0 } ) ) e [ n ] | | ( e [ n ] = 0 ) , e [ n ] + = 1 ; r e t u r n e } ( t ) , o = i [ 0 ] ; i f ( ! O b j e c t . v a l u e s ( i ) . e v e r y ( t = > t = = = o ) ) { c o n s t o = O b j e c t . v a l u e s ( i ) . r e d u c e ( ( t , e ) = > e > t ? e : t , 0 ) ; f o r ( c o n s t [ r , s ] o f O b j e c t . e n t r i e s ( i ) ) { c o n s t i = o - s ; i f ( i ) { f o r ( l e t n = 0 ; n < i ; n + + ) v g ( e , e . c r e a t e P o s i t i o n A t ( t . g e t C h i l d ( r ) , " e n d " ) ) ; n = ! 0 } } } r e t u r n n } f u n c t i o n l b ( t ) { c o n s t e = " a t t r i b u t e " = = = t . t y p e , n = t . a t t r i b u t e K e y ; r e t u r n e & & ( " h e a d i n g R o w s " = = = n | | " c o l s p a n " = = = n | | " r o w s p a n " = = = n ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n d b ( t ) { t . d o c u m e n t . r e g i s t e r P o s t F i x e r ( e = > ( f u n c t i o n ( t , e ) { c o n s t n = e . d o c u m e n t . d i f f e r . g e t C h a n g e s ( ) ; l e t i = ! 1 ; f o r ( c o n s t e o f n ) " i n s e r t " = = e . t y p e & & " t a b l e " = = e . n a m e & & ( i = u b ( e . p o s i t i o n . n o d e A f t e r , t ) | | i ) , " i n s e r t " = = e . t y p e & & " t a b l e R o w " = = e . n a m e & & ( i = h b ( e . p o s i t i o n . n o d e A f t e r , t ) | | i ) , " i n s e r t " = = e . t y p e & & " t a b l e C e l l " = = e . n a m e & & ( i = f b ( e . p o s i t i o n . n o d e A f t e r , t ) | | i ) , p b ( e ) & & ( i = f b ( e . p o s i t i o n . p a r e n t , t ) | | i ) ; r e t u r n i } ) ( e , t ) ) } f u n c t i o n u b ( t , e ) { l e t n = ! 1 ; f o r ( c o n s t i o f t . g e t C h i l d r e n ( ) ) n = h b ( i , e ) | | n ; r e t u r n n } f u n c t i o n h b ( t , e ) { l e t n = ! 1 ; f o r ( c o n s t i o f t . g e t C h i l d r e n ( ) ) n = f b ( i , e ) | | n ; r e t u r n n } f u n c t i o n f b ( t , e ) { i f ( 0 = = t . c h i l d C o u n t ) r e t u r n e . i n s e r t E l e m e n t ( " p a r a g r a p h " , t ) , ! 0 ; c o n s t n = A r r a y . f r o m ( t . g e t C h i l d r e n ( ) ) . f i l t e r ( t = > t . i s ( " t e x t " ) ) ; f o r ( c o n s t t o f n ) e . w r a p ( e . c r e a t e R a n g e O n ( t ) , " p a r a g r a p h " ) ; r e t u r n ! ! n . l e n g t h } f u n c t i o n p b ( t ) { r e t u r n ! ( ! t . p o s i t i o n | | ! t . p o s i t i o n . p a r e n t . i s ( " t a b l e C e l l " ) ) & & ( " i n s e r t " = = t . t y p e & & " $ t e x t " = = t . n a m e | | " r e m o v e " = = t . t y p e ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n m b ( t ) { t . d o c u m e n t . r e g i s t e r P o s t F i x e r ( ( ) = > ( f u n c t i o n ( t ) { c o n s t e = t . d o c u m e n t . d i f f e r , n = n e w S e t ; f o r ( c o n s t t o f e . g e t C h a n g e s ( ) ) { c o n s t e = " i n s e r t " = = t . t y p e | | " r e m o v e " = = t . t y p e ? t . p o s i t i o n . p a r e n t : t . r a n g e . s t a r t . p a r e n t ; e . i s ( " t a b l e C e l l " ) & & g b ( e , t . t y p e ) & & n . a d d ( e ) } i f ( n . s i z e ) { f o r ( c o n s t t o f n . v a l u e s ( ) ) e . r e f r e s h I t e m ( t ) ; r e t u r n ! 0 } r e t u r n ! 1 } ) ( t ) ) } f u n c t i o n g b ( t , e ) { i f ( ! A r r a y . f r o m ( t . g e t C h i l d r e n ( ) ) . s o m e ( t = > t . i s ( " p a r a g r a p h " ) ) ) r e t u r n ! 1 ; i f ( " a t t r i b u t e " = = e ) { c o n s t e = A r r a y . f r o m ( t . g e t C h i l d ( 0 ) . g e t A t t r i b u t e K e y s ( ) ) . l e n g t h ; r e t u r n 1 = = = t . c h i l d C o u n t & & e < 2 } r e t u r n t . c h i l d C o u n t < = ( " i n s e r t " = = e ? 2 : 1 ) } n ( 8 9 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s b b e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " T a b l e E d i t i n g " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . m o d e l , n = e . s c h e m a , i = t . c o n v e r s i o n ; n . r e g i s t e r ( " t a b l e " , { a l l o w W h e r e : " $ b l o c k " , a l l o w A t t r i b u t e s : [ " h e a d i n g R o w s " , " h e a d i n g C o l u m n s " ] , i s L i m i t : ! 0 , i s O b j e c t : ! 0 , i s B l o c k : ! 0 } ) , n . r e g i s t e r ( " t a b l e R o w " , { a l l o w I n : " t a b l e " , i s L i m i t : ! 0 } ) , n . r e g i s t e r ( " t a b l e C e l l " , { a l l o w I n : " t a b l e R o w " , a l l o w A t t r i b u t e s : [ " c o l s p a n " , " r o w s p a n " ] , i s L i m i t : ! 0 } ) , n . e x t e n d ( " $ b l o c k " , { a l l o w I n : " t a b l e C e l l " } ) , n . a d d C h i l d C h e c k ( ( t , e ) = > { i f ( " t a b l e " = = e . n a m e & & A r r a y . f r o m ( t . g e t N a m e s ( ) ) . i n c l u d e s ( " t a b l e " ) ) r e t u r n ! 1 } ) , i . f o r ( " u p c a s t " ) . a d d ( y g ( ) ) , i . f o r ( " e d i t i n g D o w n c a s t " ) . a d d ( S g ( { a s W i d g e t : ! 0 } ) ) , i . f o r ( " d a t a D o w n c a s t " ) . a d d ( S g ( ) ) , i . f o r ( " u p c a s t " ) . e l e m e n t T o E l e m e n t ( { m o d e l : " t a b l e R o w " , v i e w : " t r " } ) , i . f o r ( " e d i t i n g D o w n c a s t " ) . a d d ( R g ( { a s W i d g e t : ! 0 } ) ) , i . f o r ( " d a t a D o w n c a s t " ) . a d d ( R g ( ) ) , i . f o r ( " d o w n c a s t " ) . a d d ( t = > t . o n ( " r e m o v e : t a b l e R o w " , ( t , e , n ) = > { t . s t o p ( ) ; c o n s t i = n . w r i t e r , o = n . m a p p e r , r = o . t o V i e w P o s i t i o n ( e . p o s i t i o n ) . g e t L a s t M a t c h i n g P o s i t i o n ( t = > ! t . i t e m . i s ( " t r " ) ) . n o d e A f t e r , s = r . p a r e n t , a = i . c r e a t e R a n g e O n ( r ) , c = i . r e m o v e ( a ) ; f o r ( c o n s t t o f i . c r e a t e R a n g e I n ( c ) . g e t I t e m s ( ) ) o . u n b i n d V i e w E l e m e n t ( t ) ; s . c h i l d C o u n t | | i . r e m o v e ( i . c r e a t e R a n g e O n ( s ) ) } , { p r i o r i t y : " h i g h e r " } ) ) , i . f o r ( " u p c a s t " ) . a d d ( x g ( " t d " ) ) , i . f o r ( " u p c a s t " ) . a d d ( x g ( " t h " ) ) , i . f o r ( " e d i t i n g D o w n c a s t " ) . a d d ( I g ( { a s W i d g e t : ! 0 } ) ) , i . f o r ( " d a t a D o w n c a s t " ) . a d d ( I g ( ) ) , i . a t t r i b u t e T o A t t r i b u t e ( { m o d e l : " c o l s p a n " , v i e w : " c o l s p a n " } ) , i . a t t r i b u t e T o A t t r i b u t e ( { m o d e l : " r o w s p a n " , v i e w : " r o w s p a n " } ) , i . f o r ( " e d i t i n g D o w n c a s t " ) . a d d ( D g ( { a s W i d g e t : ! 0 } ) ) , i . f o r ( " d a t a D o w n c a s t " ) . a d d ( D g ( ) ) , i . f o r ( " e d i t i n g D o w n c a s t " ) . a d d ( O g ( { a s W i d g e t : ! 0 } ) ) , i . f o r ( " d a t a D o w n c a s t " ) . a d d ( O g ( ) ) , t . c o m m a n d s . a d d ( " i n s e r t T a b l e " , n e w $ g ( t ) ) , t . c o m m a n d s . a d d ( " i n s e r t T a b l e R o w A b o v e " , n e w W g ( t , { o r d e r : " a b o v e " } ) ) , t . c o m m a n d s . a d d ( " i n s e r t T a b l e R o w B e l o w " , n e w W g ( t , { o r d e r : " b e l o w " } ) ) , t . c o m m a n d s . a d d ( " i n s e r t T a b l e C o l u m n L e f t " , n e w G g ( t , { o r d e r : " l e f t " } ) ) , t . c o m m a n d s . a d d ( " i n s e r t T a b l e C o l u m n R i g h t " , n e w G g ( t , { o r d e r : " r i g h t " } ) ) , t . c o m m a n d s . a d d ( " r e m o v e T a b l e R o w " , n e w Q g ( t ) ) , t . c o m m a n d s . a d d ( " r e m o v e T a b l e C o l u m n " , n e w Y g ( t ) ) , t . c o m m a n d s . a d d ( " s p l i t T a b l e C e l l V e r t i c a l l y " , n e w K g ( t , { d i r e c t i o n : " v e r t i c a l l y " } ) ) , t . c o m m a n d s . a d d ( " s p l i t T a b l e C e l l H o r i z o n t a l l y " , n e w K g ( t , { d i r e c t i o n : " h o r i z o n t a l l y " } ) ) , t . c o m m a n d s . a d d ( " m e r g e T a b l e C e l l R i g h t " , n e w J g ( t , { d i r e c t i o n : " r i g h t " } ) ) , t . c o m m a n d s . a d d ( " m e r g e T a b l e C e l l L e f t " , n e w J g ( t , { d i r e c t i o n : " l e f t " } ) ) , t . c o m m a n d s . a d d ( " m e r g e T a b l e C e l l D o w n " , n e w J g ( t , { d i r e c t i o n : " d o w n " } ) ) , t . c o m m a n d s . a d d ( " m e r g e T a b l e C e l l U p " , n e w J g ( t , { d i r e c t i o n : " u p " } ) ) , t . c o m m a n d s . a d d ( " s e t T a b l e C o l u m n H e a d e r " , n e w e b ( t ) ) , t . c o m m a n d s . a d d ( " s e t T a b l e R o w H e a d e r " , n e w X g ( t ) ) , s b ( e ) , m b ( e ) , d b ( e ) , t h i s . e d i t o r . k e y s t r o k e s . s e t ( " T a b " , ( . . . t ) = > t h i s . _ h a n d l e T a b O n S e l e c t e d T a b l e ( . . . t ) , { p r i o r i t y : " l o w " } ) , t h i s . e d i t o r . k e y s t r o k e s . s e t ( " T a b " , t h i s . _ g e t T a b H a n d l e r ( ! 0 ) , { p r i o r i t y : " l o w " } ) , t h i s . e d i t o r . k e y s t r o k e s . s e t ( " S h i f t + T a b " , t h i s . _ g e t T a b H a n d l e r ( ! 1 ) , { p r i o r i t y : " l o w " } ) } s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ n b ] } _ h a n d l e T a b O n S e l e c t e d T a b l e ( t , e ) { c o n s t n = t h i s . e d i t o r , i = n . m o d e l . d o c u m e n t . s e l e c t i o n ; i f ( ! i . i s C o l l a p s e d & & 1 = = = i . r a n g e C o u n t & & i . g e t F i r s t R a n g e ( ) . i s F l a t ) { c o n s t t = i . g e t S e l e c t e d E l e m e n t ( ) ; i f ( ! t | | ! t . i s ( " t a b l e " ) ) r e t u r n ; e ( ) , n . m o d e l . c h a n g e ( e = > { e . s e t S e l e c t i o n ( e . c r e a t e R a n g e I n ( t . g e t C h i l d ( 0 ) . g e t C h i l d ( 0 ) ) ) } ) } } _ g e t T a b H a n d l e r ( t ) { c o n s t e = t h i s . e d i t o r ; r e t u r n ( n , i ) = > { c o n s t o = k g ( " t a b l e C e l l " , e . m o d e l . d o c u m e n t . s e l e c t i o n . g e t F i r s t P o s i t i o n ( ) ) ; i f ( ! o ) r e t u r n ; i ( ) ; c o n s t r = o . p a r e n t , s = r . p a r e n t , a = s . g e t C h i l d I n d e x ( r ) , c = r . g e t C h i l d I n d e x ( o ) , l = 0 = = = c ; i f ( ! t & & l & & 0 = = = a ) r e t u r n ; c o n s t d = c = = = r . c h i l d C o u n t - 1 , u = a = = = s . c h i l d C o u n t - 1 ; i f ( t & & u & & d & & ( e . e x e c u t e ( " i n s e r t T a b l e R o w B e l o w " ) , a = = = s . c h i l d C o u n t - 1 ) ) r e t u r n ; l e t h ; i f ( t & & d ) { c o n s t t = s . g e t C h i l d ( a + 1 ) ; h = t . g e t C h i l d ( 0 ) } e l s e i f ( ! t & & l ) { c o n s t t = s . g e t C h i l d ( a - 1 ) ; h = t . g e t C h i l d ( t . c h i l d C o u n t - 1 ) } e l s e h = r . g e t C h i l d ( c + ( t ? 1 : - 1 ) ) ; e . m o d e l . c h a n g e ( t = > { t . s e t S e l e c t i o n ( t . c r e a t e R a n g e I n ( h ) ) } ) } } } n ( 9 1 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s w b e x t e n d s j l { c o n s t r u c t o r ( t ) { s u p e r ( t ) ; c o n s t e = t h i s . b i n d T e m p l a t e ; t h i s . i t e m s = t h i s . c r e a t e C o l l e c t i o n ( ) , t h i s . s e t ( " r o w s " , 0 ) , t h i s . s e t ( " c o l u m n s " , 0 ) , t h i s . b i n d ( " l a b e l " ) . t o ( t h i s , " c o l u m n s " , t h i s , " r o w s " , ( t , e ) = > ` $ { e } × $ { t } ` ) , t h i s . s e t T e m p l a t e ( { t a g : " d i v " , a t t r i b u t e s : { c l a s s : [ " c k " ] } , c h i l d r e n : [ { t a g : " d i v " , a t t r i b u t e s : { c l a s s : [ " c k - i n s e r t - t a b l e - d r o p d o w n _ _ g r i d " ] } , c h i l d r e n : t h i s . i t e m s } , { t a g : " d i v " , a t t r i b u t e s : { c l a s s : [ " c k - i n s e r t - t a b l e - d r o p d o w n _ _ l a b e l " ] } , c h i l d r e n : [ { t e x t : e . t o ( " l a b e l " ) } ] } ] , o n : { m o u s e d o w n : e . t o ( t = > { t . p r e v e n t D e f a u l t ( ) } ) , c l i c k : e . t o ( ( ) = > { t h i s . f i r e ( " e x e c u t e " ) } ) } } ) ; f o r ( l e t t = 0 ; t < 1 0 0 ; t + + ) { c o n s t e = n e w k b ; e . o n ( " o v e r " , ( ) = > { c o n s t e = M a t h . f l o o r ( t / 1 0 ) , n = t % 1 0 ; t h i s . s e t ( " r o w s " , e + 1 ) , t h i s . s e t ( " c o l u m n s " , n + 1 ) } ) , t h i s . i t e m s . a d d ( e ) } t h i s . o n ( " c h a n g e : c o l u m n s " , ( ) = > { t h i s . _ h i g h l i g h t G r i d B o x e s ( ) } ) , t h i s . o n ( " c h a n g e : r o w s " , ( ) = > { t h i s . _ h i g h l i g h t G r i d B o x e s ( ) } ) } f o c u s ( ) { } f o c u s L a s t ( ) { } _ h i g h l i g h t G r i d B o x e s ( ) { c o n s t t = t h i s . r o w s , e = t h i s . c o l u m n s ; t h i s . i t e m s . m a p ( ( n , i ) = > { c o n s t o = M a t h . f l o o r ( i / 1 0 ) < t & & i % 1 0 < e ; n . s e t ( " i s O n " , o ) } ) } } c l a s s k b e x t e n d s j l { c o n s t r u c t o r ( t ) { s u p e r ( t ) ; c o n s t e = t h i s . b i n d T e m p l a t e ; t h i s . s e t ( " i s O n " , ! 1 ) , t h i s . s e t T e m p l a t e ( { t a g : " d i v " , a t t r i b u t e s : { c l a s s : [ " c k - i n s e r t - t a b l e - d r o p d o w n - g r i d - b o x " , e . i f ( " i s O n " , " c k - o n " ) ] } , o n : { m o u s e o v e r : e . t o ( " o v e r " ) } } ) } } v a r _ b = ' < s v g v i e w B o x = " 0 0 2 0 2 0 " x m l n s = " h t t p : / / w w w . w 3 . o r g / 2 0 0 0 / s v g " > < p a t h d = " M 3 6 v 3 h 4 V 6 H 3 z m 0 4 v 3 h 4 v - 3 H 3 z m 0 4 v 3 h 4 v - 3 H 3 z m 5 3 h 4 v - 3 H 8 v 3 z m 5 0 h 4 v - 3 h - 4 v 3 z m 4 - 4 v - 3 h - 4 v 3 h 4 z m 0 - 4 V 6 h - 4 v 3 h 4 z m 1 . 5 8 a 1 . 5 1 . 5 0 0 1 - 1 . 5 1 . 5 H 3 A 1 . 5 1 . 5 0 0 1 1 . 5 1 7 V 4 c . 2 2 2 - . 8 6 3 1 . 0 6 8 - 1 . 5 2 - 1 . 5 h 1 3 c . 9 3 2 0 1 . 7 7 8 . 6 3 7 2 1 . 5 v 1 3 z M 1 2 1 3 v - 3 H 8 v 3 h 4 z m 0 - 4 V 6 H 8 v 3 h 4 z " / > < / s v g > ' , v b = ' < s v g v i e w B o x = " 0 0 2 0 2 0 " x m l n s = " h t t p : / / w w w . w 3 . o r g / 2 0 0 0 / s v g " > < p a t h d = " M 2 . 5 1 h 1 5 A 1 . 5 1 . 5 0 0 1 1 9 2 . 5 v 1 5 a 1 . 5 1 . 5 0 0 1 - 1 . 5 1 . 5 h - 1 5 A 1 . 5 1 . 5 0 0 1 1 1 7 . 5 v - 1 5 A 1 . 5 1 . 5 0 0 1 2 . 5 1 z M 2 2 v 1 6 h 1 6 V 2 H 2 z " o p a c i t y = " . 6 " / > < p a t h d = " M 1 8 7 v 1 H 2 V 7 h 1 6 z m 0 5 v 1 H 2 v - 1 h 1 6 z " o p a c i t y = " . 6 " / > < p a t h d = " M 1 4 1 v 1 8 a 1 1 0 0 1 - 1 1 H 7 a 1 1 0 0 1 - 1 - 1 V 1 a 1 1 0 0 1 1 - 1 h 6 a 1 1 0 0 1 1 1 z m - 2 1 H 8 v 4 h 4 V 2 z m 0 6 H 8 v 4 h 4 V 8 z m 0 6 H 8 v 4 h 4 v - 4 z " / > < / s v g > ' , y b = ' < s v g v i e w B o x = " 0 0 2 0 2 0 " x m l n s = " h t t p : / / w w w . w 3 . o r g / 2 0 0 0 / s v g " > < p a t h d = " M 2 . 5 1 h 1 5 A 1 . 5 1 . 5 0 0 1 1 9 2 . 5 v 1 5 a 1 . 5 1 . 5 0 0 1 - 1 . 5 1 . 5 h - 1 5 A 1 . 5 1 . 5 0 0 1 1 1 7 . 5 v - 1 5 A 1 . 5 1 . 5 0 0 1 2 . 5 1 z M 2 2 v 1 6 h 1 6 V 2 H 2 z " o p a c i t y = " . 6 " / > < p a t h d = " M 7 2 h 1 v 1 6 H 7 V 2 z m 5 0 h 1 v 1 6 h - 1 V 2 z " o p a c i t y = " . 6 " / > < p a t h d = " M 1 6 h 1 8 a 1 1 0 0 1 1 1 v 6 a 1 1 0 0 1 - 1 1 H 1 a 1 1 0 0 1 - 1 - 1 V 7 a 1 1 0 0 1 1 - 1 z m 1 2 v 4 h 4 V 8 H 2 z m 6 0 v 4 h 4 V 8 H 8 z m 6 0 v 4 h 4 V 8 h - 4 z " / > < / s v g > ' , x b = ' < s v g v i e w B o x = " 0 0 2 0 2 0 " x m l n s = " h t t p : / / w w w . w 3 . o r g / 2 0 0 0 / s v g " > < p a t h d = " M 2 . 5 1 h 1 5 A 1 . 5 1 . 5 0 0 1 1 9 2 . 5 v 1 5 a 1 . 5 1 . 5 0 0 1 - 1 . 5 1 . 5 h - 1 5 A 1 . 5 1 . 5 0 0 1 1 1 7 . 5 v - 1 5 A 1 . 5 1 . 5 0 0 1 2 . 5 1 z M 2 2 v 1 6 h 1 6 V 2 H 2 z " o p a c i t y = " . 6 " / > < p a t h d = " M 7 2 h 1 v 1 6 H 7 V 2 z m 5 0 h 1 v 7 h - 1 V 2 z m 6 5 v 1 H 2 V 7 h 1 6 z M 8 1 2 v 1 H 2 v - 1 h 6 z " o p a c i t y = " . 6 " / > < p a t h d = " M 7 7 h 1 2 a 1 1 0 0 1 1 1 v 1 1 a 1 1 0 0 1 - 1 1 H 7 a 1 1 0 0 1 - 1 - 1 V 8 a 1 1 0 0 1 1 - 1 z m 1 2 v 9 h 1 0 V 9 H 8 z " / > < / s v g > ' ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Cb extends yd { init ( ) { const t = this . editor , e = this . editor . t , n = "ltr" === t . locale . contentLanguageDirection ; t . ui . componentFactory . add ( "insertTable" , n => { const i = t . commands . get ( "insertTable" ) , o = hd ( n ) ; o . bind ( "isEnabled" ) . to ( i ) , o . buttonView . set ( { icon : _b , label : e ( "k" ) , tooltip : ! 0 } ) ; const r = new wb ( n ) ; return o . panelView . children . add ( r ) , r . delegate ( "execute" ) . to ( o ) , o . buttonView . on ( "open" , ( ) => { r . rows = 0 , r . columns = 0 } ) , o . on ( "execute" , ( ) => { t . execute ( "insertTable" , { rows : r . rows , columns : r . columns } ) , t . editing . view . focus ( ) } ) , o } ) , t . ui . componentFactory . add ( "tableColumn" , t => { const i = [ { type : "switchbutton" , model : { commandName : "setTableColumnHeader" , label : e ( "l" ) , bindIsOn : ! 0 } } , { type : "separator" } , { type : "button" , model : { commandName : n ? "insertTableColumnLeft" : "insertTableColumnRight" , label : e ( "m" ) } } , { type : "button" , model : { commandName : n ? "insertTableColumnRight" : "insertTableColumnLeft" , label : e ( "n" ) } } , { type : "button" , model : { commandName : "removeTableColumn" , label : e ( "o" ) } } ] ; return this . _prepareDropdown ( e ( "p" ) , vb , i , t ) } ) , t . ui . componentFactory . add ( "tableRow" , t => { const n = [ { type : "switchbutton" , model : { commandName : "setTableRowHeader" , label : e ( "q" ) , bindIsOn : ! 0 } } , { type : "separator" } , { type : "button" , model : { commandName : "insertTableRowBelow" , label : e ( "r" ) } } , { type : "button" , model : { commandName : "insertTableRowAbove" , label : e ( "s" ) } } , { type : "button" , model : { commandName : "removeTableRow" , label : e ( "t" ) } } ] ; return this . _prepareDropdown ( e ( "u" ) , yb , n , t ) } ) , t . ui . componentFactory . add ( "mergeTableCells" , t => { const i = [ { type : "button" , model : { commandName : "mergeTableCellUp" , label : e ( "v" ) } } , { type : "button" , model : { commandName : n ? "mergeTableCellRight" : "mergeTableCellLeft" , label : e ( "w" ) } } , { type : "button" , model : { commandName : "mergeTableCellDown" , label : e ( "x" ) } } , { type : "button" , model : { commandName : n ? "mergeTableCellLeft" : "mergeTableCellRight" , label : e ( "y" ) } } , { type : "separator" } , { type : "button" , model : { commandName : "splitTableCellVertically" , label : e ( "z" ) } } , { type : "button" , model : { commandName : "splitTableCellHorizontally" , label : e ( "aa" ) } } ] ; return this . _prepareDropdown ( e ( "ab" ) , xb , i , t ) } ) } _prepareDropdown ( t , e , n , i ) { const o = this . editor , r = hd ( i ) , s = [ ] , a = new so ; for ( const t of n ) Ab ( t , o , s , a ) ; return pd ( r , a ) , r . buttonView . set ( { label : t , icon : e , tooltip : ! 0 } ) , r . bind ( "isEnabled" ) . toMany ( s , "isEnabled" , ( ... t ) => t . some ( t => t ) ) , this . listenTo ( r , "execute" , t => { o . execute ( t . source . commandName ) , o . editing . view . focus ( ) } ) , r } } function Ab ( t , e , n , i ) { const o = t . model = new qf ( t . model ) , { commandName : r , bindIsOn : s } = t . model ; if ( "separator" !== t . type ) { const t = e . commands . get ( r ) ; n . push ( t ) , o . set ( { commandName : r } ) , o . bind ( "isEnabled" ) . to ( t ) , s && o . bind ( "isOn" ) . to ( t , "value" ) } o . set ( { withText : ! 0 } ) , i . add ( t ) } n ( 93 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function Pb ( t , e ) { if ( ! t . childCount ) return ; const n = new zu , i = function ( t , e ) { const n = e . createRangeIn ( t ) , i = new ki ( { name : /^p|h\d+$/ , styles : { "mso-list" : /.*/ } } ) , o = [ ] ; for ( const t of n ) if ( "elementStart" === t . type && i . match ( t . item ) ) { const e = Tb ( t . item ) ; o . push ( { element : t . item , id : e . id , order : e . order , indent : e . indent } ) } return o } ( t , n ) ; if ( ! i . length ) return ; let o = null ; i . forEach ( ( t , r ) => { if ( ! o || function ( t , e ) { if ( t . id !== e . id ) return ! 0 ; const n = e . element . previousSibling ; if ( ! n ) return ! 0 ; return i = n , ! ( i . is ( "ol" ) || i . is ( "ul" ) ) ; var i ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / } ( i [ r - 1 ] , t ) ) { c o n s t i = f u n c t i o n ( t , e ) { c o n s t n = n e w R e g E x p ( ` @ l i s t l $ { t . i d } : l e v e l $ { t . i n d e n t } \ \ s * ( { [ ^ } ] * ) ` , " g i " ) , i = / m s o - l e v e l - n u m b e r - f o r m a t : ( [ ^ ; ] * ) ; / g i , o = n . e x e c ( e ) ; l e t r = " d e c i m a l " ; i f ( o & & o [ 1 ] ) { c o n s t t = i . e x e c ( o [ 1 ] ) ; t & & t [ 1 ] & & ( r = t [ 1 ] . t r i m ( ) ) } r e t u r n { t y p e : " b u l l e t " ! = = r & & " i m a g e " ! = = r ? " o l " : " u l " , s t y l e : r } } ( t , e ) ; o = f u n c t i o n ( t , e , n ) { c o n s t i = n e w v i ( t . t y p e ) , o = e . p a r e n t . g e t C h i l d I n d e x ( e ) ; r e t u r n n . i n s e r t C h i l d ( o , i , e . p a r e n t ) , i } ( i , t . e l e m e n t , n ) } c o n s t s = f u n c t i o n ( t , e ) { r e t u r n f u n c t i o n ( t , e ) { c o n s t n = n e w k i ( { n a m e : " s p a n " , s t y l e s : { " m s o - l i s t " : " I g n o r e " } } ) , i = e . c r e a t e R a n g e I n ( t ) ; f o r ( c o n s t t o f i ) " e l e m e n t S t a r t " = = = t . t y p e & & n . m a t c h ( t . i t e m ) & & e . r e m o v e ( t . i t e m ) } ( t , e ) , e . r e n a m e ( " l i " , t ) } ( t . e l e m e n t , n ) ; n . a p p e n d C h i l d ( s , o ) } ) } f u n c t i o n T b ( t ) { c o n s t e = { } , n = t . g e t S t y l e ( " m s o - l i s t " ) ; r e t u r n n & & ( e . i d = p a r s e I n t ( n . m a t c h ( / ( ^ | \ s + ) l ( \ d + ) / i ) [ 2 ] ) , e . o r d e r = p a r s e I n t ( n . m a t c h ( / \ s * l f o ( \ d + ) / i ) [ 1 ] ) , e . i n d e n t = p a r s e I n t ( n . m a t c h ( / \ s * l e v e l ( \ d + ) / i ) [ 1 ] ) ) , e } c o n s t E b = / i d = ( " | ' ) d o c s - i n t e r n a l - g u i d - [ - 0 - 9 a - f ] + ( " | ' ) / i ; c l a s s S b { i s A c t i v e ( t ) { r e t u r n E b . t e s t ( t ) } e x e c u t e ( t ) { c o n s t e = n e w z u ; !
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
function ( t , e ) { for ( const n of t . getChildren ( ) ) if ( n . is ( "b" ) && "normal" === n . getStyle ( "font-weight" ) ) { const i = t . getChildIndex ( n ) ; e . remove ( n ) , e . insertChild ( i , n . getChildren ( ) , t ) } } ( t . content , e ) , function ( t , e ) { for ( const n of e . createRangeIn ( t ) ) { const t = n . item ; if ( t . is ( "li" ) ) { const n = t . getChild ( 0 ) ; n . is ( "p" ) && e . unwrapElement ( n ) } } } ( t . content , e ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /function Rb(t){return t.replace(/ < span ( ? : class = "Apple-converted-space" | ) > ( \ s + ) < \ / span > / g , ( t , e ) = > 1 = = = e . l e n g t h ? " " : A r r a y ( e . l e n g t h + 1 ) . j o i n ( " " ) . s u b s t r ( 0 , e . l e n g t h ) ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /function Ib(t){const e=new DOMParser,n=function(t){return Rb(Rb(t)).replace(/ ( < span style = [ '"]mso-spacerun:yes[' "]>[\s]*?)[\r\n]+(\s*<\/span>)/g," $1$2 ").replace(/<span style=['" ] mso - spacerun : yes [ ' "]><\/span>/g," ").replace(/ <\//g," < /").replace(/ < o : p > < \ / o : p > / g , " < o : p > < / o : p > " ) . r e p l a c e ( / < o : p > ( & n b s p ; | \ u 0 0 A 0 ) < \ / o : p > / g , " " ) . r e p l a c e ( / > ( \ s * [ \ r \ n ] \ s * ) < / g , " > < " ) } ( f u n c t i o n ( t ) { c o n s t e = t . m a t c h ( / < \ / b o d y > ( . * ? ) ( < \ / h t m l > | $ ) / ) ; e & & e [ 1 ] & & ( t = t . s l i c e ( 0 , e . i n d e x ) + t . s l i c e ( e . i n d e x ) . r e p l a c e ( e [ 1 ] , " " ) ) ; r e t u r n t }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /(t=t.replace(/ <!-- \ [ if gte vml 1 ] > / g , " " ) ) ) , i = e . p a r s e F r o m S t r i n g ( n , " t e x t / h t m l " ) ; ! f u n c t i o n ( t ) { t . q u e r y S e l e c t o r A l l ( " s p a n [ s t y l e * = s p a c e r u n ] " ) . f o r E a c h ( t = > { c o n s t e = t . c h i l d N o d e s [ 0 ] . d a t a . l e n g t h ; t . i n n e r H T M L = A r r a y ( e + 1 ) . j o i n ( " " ) . s u b s t r ( 0 , e ) } ) } ( i ) ; c o n s t o = i . b o d y . i n n e r H T M L , r = f u n c t i o n ( t ) { c o n s t e = n e w a r ( { b l o c k F i l l e r M o d e : " n b s p " } ) , n = t . c r e a t e D o c u m e n t F r a g m e n t ( ) , i = t . b o d y . c h i l d N o d e s ; f o r ( ; i . l e n g t h > 0 ; ) n . a p p e n d C h i l d ( i [ 0 ] ) ; r e t u r n e . d o m T o V i e w ( n ) } ( i ) , s = f u n c t i o n ( t ) { c o n s t e = [ ] , n = [ ] , i = A r r a y . f r o m ( t . g e t E l e m e n t s B y T a g N a m e ( " s t y l e " ) ) ; f o r ( c o n s t t o f i ) t . s h e e t & & t . s h e e t . c s s R u l e s & & t . s h e e t . c s s R u l e s . l e n g t h & & ( e . p u s h ( t . s h e e t ) , n . p u s h ( t . i n n e r H T M L ) ) ; r e t u r n { s t y l e s : e , s t y l e s S t r i n g : n . j o i n ( " " ) } } ( i ) ; r e t u r n { b o d y : r , b o d y S t r i n g : o , s t y l e s : s . s t y l e s , s t y l e s S t r i n g : s . s t y l e s S t r i n g } } f u n c t i o n O b ( t , e ) { i f ( ! t . c h i l d C o u n t ) r e t u r n ; c o n s t n = n e w z u ; ! f u n c t i o n ( t , e , n ) { c o n s t i = n . c r e a t e R a n g e I n ( e ) , o = n e w k i ( { n a m e : " i m g " } ) , r = [ ] ; f o r ( c o n s t e o f i ) i f ( o . m a t c h ( e . i t e m ) ) { c o n s t n = e . i t e m , i = n . g e t A t t r i b u t e ( " v : s h a p e s " ) ? n . g e t A t t r i b u t e ( " v : s h a p e s " ) . s p l i t ( " " ) : [ ] ; i . l e n g t h & & i . e v e r y ( e = > t . i n d e x O f ( e ) > - 1 ) ? r . p u s h ( n ) : n . g e t A t t r i b u t e ( " s r c " ) | | r . p u s h ( n ) } f o r ( c o n s t t o f r ) n . r e m o v e ( t ) } ( f u n c t i o n ( t , e ) { c o n s t n = e . c r e a t e R a n g e I n ( t ) , i = n e w k i ( { n a m e : / v : ( . + ) / } ) , o = [ ] ; f o r ( c o n s t t o f n ) { c o n s t e = t . i t e m , n = e . p r e v i o u s S i b l i n g & & e . p r e v i o u s S i b l i n g . n a m e | | n u l l ; i . m a t c h ( e ) & & e . g e t A t t r i b u t e ( " o : g f x d a t a " ) & & " v : s h a p e t y p e " ! = = n & & o . p u s h ( t . i t e m . g e t A t t r i b u t e ( " i d " ) ) } r e t u r n o } ( t , n ) , t , n ) , f u n c t i o n ( t , e ) { c o n s t n = e . c r e a t e R a n g e I n ( t ) , i = n e w k i ( { n a m e : / v : ( . + ) / } ) , o = [ ] ; f o r ( c o n s t t o f n ) i . m a t c h ( t . i t e m ) & & o . p u s h ( t . i t e m ) ; f o r ( c o n s t t o f o ) e . r e m o v e ( t ) } ( t , n ) ; c o n s t i = f u n c t i o n ( t , e ) { c o n s t n = e . c r e a t e R a n g e I n ( t ) , i = n e w k i ( { n a m e : " i m g " } ) , o = [ ] ; f o r ( c o n s t t o f n ) i . m a t c h ( t . i t e m ) & & t . i t e m . g e t A t t r i b u t e ( " s r c " ) . s t a r t s W i t h ( " f i l e : / / " ) & & o . p u s h ( t . i t e m ) ; r e t u r n o } ( t , n ) ; i . l e n g t h & & f u n c t i o n ( t , e , n ) { i f ( t . l e n g t h = = = e . l e n g t h ) f o r ( l e t o = 0 ; o < t . l e n g t h ; o + + ) { c o n s t r = ` d a t a : $ { e [ o ] . t y p e } ; b a s e 6 4 , $ { i = e [ o ] . h e x , b t o a ( i . m a t c h ( / \ w { 2 } / g ) . m a p ( t = > S t r i n g . f r o m C h a r C o d e ( p a r s e I n t ( t , 1 6 ) ) ) . j o i n ( " " ) ) } ` ; n . s e t A t t r i b u t e ( " s r c " , r , t [ o ] ) } v a r i }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /(i,function(t){if(!t)return[];const e=/ { \ \ pict [ \ s \ S ] + ? \ \ bliptag - ? \ d + ( \ \ blipupi - ? \ d + ) ? ( { \ \ \ * \ \ blipuid \ s ? [ \ da - fA - F ] + ) ? [ \ s } ] * ? / , n = n e w R e g E x p ( " ( ? : ( " + e . s o u r c e + " ) ) ( [ \ \ d a - f A - F \ \ s ] + ) \ \ } " , " g " ) , i = t . m a t c h ( n ) , o = [ ] ; i f ( i ) f o r ( c o n s t t o f i ) { l e t n = ! 1 ; t . i n c l u d e s ( " \ \ p n g b l i p " ) ? n = " i m a g e / p n g " : t . i n c l u d e s ( " \ \ j p e g b l i p " ) & & ( n = " i m a g e / j p e g " ) , n & & o . p u s h ( { h e x : t . r e p l a c e ( e , " " ) . r e p l a c e ( / [ ^ \ d a - f A - F ] / g , " " ) , t y p e : n } ) } r e t u r n o } ( e ) , n ) } c o n s t D b = / < m e t a \ s * n a m e = " ? g e n e r a t o r " ? \ s * c o n t e n t = " ? m i c r o s o f t \ s * w o r d \ s * \ d + " ? \ / ? > / i , M b = / x m l n s : o = " u r n : s c h e m a s - m i c r o s o f t - c o m / i ; c l a s s N b { i s A c t i v e ( t ) { r e t u r n D b . t e s t ( t ) | | M b . t e s t ( t ) } e x e c u t e ( t ) { c o n s t { b o d y : e , s t y l e s S t r i n g : n } = I b ( t . d a t a T r a n s f e r . g e t D a t a ( " t e x t / h t m l " ) ) ; P b ( e , n ) , O b ( e , t . d a t a T r a n s f e r . g e t D a t a ( " t e x t / r t f " ) ) , t . c o n t e n t = e } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
const Vb = "todoListChecked" ; class Fb extends qu { constructor ( t ) { super ( t ) , this . _selectedElements = [ ] , this . on ( "execute" , ( ) => { this . refresh ( ) } , { priority : "highest" } ) } refresh ( ) { this . _selectedElements = this . _getSelectedItems ( ) , this . value = this . _selectedElements . every ( t => ! ! t . getAttribute ( "todoListChecked" ) ) , this . isEnabled = ! ! this . _selectedElements . length } _getSelectedItems ( ) { const t = this . editor . model , e = t . schema , n = t . document . selection . getFirstRange ( ) , i = n . start . parent , o = [ ] ; e . checkAttribute ( i , Vb ) && o . push ( i ) ; for ( const t of n . getItems ( ) ) e . checkAttribute ( t , Vb ) && ! o . includes ( t ) && o . push ( t ) ; return o } execute ( t = { } ) { this . editor . model . change ( e => { for ( const n of this . _selectedElements ) { ( void 0 === t . forceValue ? ! this . value : t . forceValue ) ? e . setAttribute ( Vb , ! 0 , n ) : e . removeAttribute ( Vb , n ) } } ) } } var Bb = "[object String]" ; var Lb = function ( t ) { return "string" == typeof t || ! Gt ( t ) && w ( t ) && m ( t ) == Bb } ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / f u n c t i o n z b ( t , e , n ) { c o n s t i = e . r a n g e . s t a r t . p a r e n t ; i f ( " l i s t I t e m " ! = i . n a m e | | " t o d o " ! = i . g e t A t t r i b u t e ( " l i s t T y p e " ) ) r e t u r n ; i f ( ! n . c o n s u m a b l e . c o n s u m e ( e . i t e m , " i n s e r t " ) ) r e t u r n ; c o n s t o = n . w r i t e r , r = n . m a p p e r . t o V i e w P o s i t i o n ( e . r a n g e . s t a r t ) , s = o . c r e a t e T e x t ( e . i t e m . d a t a ) , a = o . c r e a t e A t t r i b u t e E l e m e n t ( " s p a n " , { c l a s s : " t o d o - l i s t _ _ l a b e l _ _ d e s c r i p t i o n " } ) , c = r . p a r e n t . g e t C h i l d ( 0 ) ; o . i n s e r t ( o . c r e a t e P o s i t i o n A t ( r . p a r e n t , " e n d " ) , s ) , o . w r a p ( o . c r e a t e R a n g e O n ( s ) , a ) , o . w r a p ( o . c r e a t e R a n g e O n ( s . p a r e n t ) , c ) } f u n c t i o n q b ( t , e , n ) { c o n s t i = e . m o d e l C u r s o r , o = i . p a r e n t , r = e . v i e w I t e m ; i f ( " c h e c k b o x " ! = r . g e t A t t r i b u t e ( " t y p e " ) | | " l i s t I t e m " ! = o . n a m e | | ! i . i s A t S t a r t ) r e t u r n ; i f ( ! n . c o n s u m a b l e . c o n s u m e ( r , { n a m e : ! 0 } ) ) r e t u r n ; c o n s t s = n . w r i t e r ; s . s e t A t t r i b u t e ( " l i s t T y p e " , " t o d o " , o ) , e . v i e w I t e m . h a s A t t r i b u t e ( " c h e c k e d " ) & & s . s e t A t t r i b u t e ( " t o d o L i s t C h e c k e d " , ! 0 , o ) , e . m o d e l R a n g e = s . c r e a t e R a n g e ( i ) } f u n c t i o n j b ( t , e , n , i ) { r e t u r n e . c r e a t e U I E l e m e n t ( " l a b e l " , { c l a s s : " t o d o - l i s t _ _ l a b e l " , c o n t e n t e d i t a b l e : ! 1 } , ( f u n c t i o n ( e ) { c o n s t o = f u n c t i o n ( t , e , n = { } , i = [ ] ) { c o n s t o = n & & n . x m l n s , r = o ? t . c r e a t e E l e m e n t N S ( o , e ) : t . c r e a t e E l e m e n t ( e ) ; f o r ( c o n s t t i n n ) r . s e t A t t r i b u t e ( t , n [ t ] ) ; ! L b ( i ) & & w i ( i ) | | ( i = [ i ] ) ; f o r ( l e t e o f i ) L b ( e ) & & ( e = t . c r e a t e T e x t N o d e ( e ) ) , r . a p p e n d C h i l d ( e ) ; r e t u r n r }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / ( d o c u m e n t , " i n p u t " , { t y p e : " c h e c k b o x " } ) ; n & & o . s e t A t t r i b u t e ( " c h e c k e d " , " c h e c k e d " ) , o . a d d E v e n t L i s t e n e r ( " c h a n g e " , ( ) = > i ( t ) ) ; c o n s t r = t h i s . t o D o m E l e m e n t ( e ) ; r e t u r n r . a p p e n d C h i l d ( o ) , r } ) ) } f u n c t i o n H b ( t , e ) { c o n s t n = e . c r e a t e R a n g e I n ( t ) ; f o r ( c o n s t t o f n ) i f ( t . i t e m . i s ( " u i E l e m e n t " , " l a b e l " ) ) r e t u r n t . i t e m }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s U b e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " T o d o L i s t E d i t i n g " } s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ X m ] } i n i t ( ) { c o n s t t = t h i s . e d i t o r , { e d i t i n g : e , d a t a : n , m o d e l : i } = t ; v a r o , r ; i . s c h e m a . e x t e n d ( " l i s t I t e m " , { a l l o w A t t r i b u t e s : [ " t o d o L i s t C h e c k e d " ] } ) , i . s c h e m a . a d d A t t r i b u t e C h e c k ( ( t , e ) = > { c o n s t n = t . l a s t ; i f ( " t o d o L i s t C h e c k e d " = = e & & " l i s t I t e m " = = n . n a m e & & " t o d o " ! = n . g e t A t t r i b u t e ( " l i s t T y p e " ) ) r e t u r n ! 1 } ) , t . c o m m a n d s . a d d ( " t o d o L i s t " , n e w S m ( t , " t o d o " ) ) , t . c o m m a n d s . a d d ( " t o d o L i s t C h e c k " , n e w F b ( t ) ) , e . d o w n c a s t D i s p a t c h e r . o n ( " i n s e r t : l i s t I t e m " , f u n c t i o n ( t , e ) { r e t u r n ( n , i , o ) = > { c o n s t r = o . c o n s u m a b l e ; i f ( ! r . t e s t ( i . i t e m , " i n s e r t " ) | | ! r . t e s t ( i . i t e m , " a t t r i b u t e : l i s t T y p e " ) | | ! r . t e s t ( i . i t e m , " a t t r i b u t e : l i s t I n d e n t " ) ) r e t u r n ; i f ( " t o d o " ! = i . i t e m . g e t A t t r i b u t e ( " l i s t T y p e " ) ) r e t u r n ; c o n s t s = i . i t e m ; r . c o n s u m e ( s , " i n s e r t " ) , r . c o n s u m e ( s , " a t t r i b u t e : l i s t T y p e " ) , r . c o n s u m e ( s , " a t t r i b u t e : l i s t I n d e n t " ) , r . c o n s u m e ( s , " a t t r i b u t e : t o d o L i s t C h e c k e d " ) ; c o n s t a = o . w r i t e r , c = D m ( s , o ) , l = ! ! s . g e t A t t r i b u t e ( " t o d o L i s t C h e c k e d " ) , d = j b ( s , a , l , e ) ; a . a d d C l a s s ( " t o d o - l i s t " , c . p a r e n t ) , a . i n s e r t ( a . c r e a t e P o s i t i o n A t ( c , 0 ) , d ) , M m ( s , c , o , t ) } } ( i , t = > t h i s . _ h a n d l e C h e c k m a r k C h a n g e ( t ) ) , { p r i o r i t y : " h i g h " } ) , n . d o w n c a s t D i s p a t c h e r . o n ( " i n s e r t : l i s t I t e m " , f u n c t i o n ( t ) { r e t u r n ( e , n , i ) = > { c o n s t o = i . c o n s u m a b l e ; i f ( ! o . t e s t ( n . i t e m , " i n s e r t " ) | | ! o . t e s t ( n . i t e m , " a t t r i b u t e : l i s t T y p e " ) | | ! o . t e s t ( n . i t e m , " a t t r i b u t e : l i s t I n d e n t " ) ) r e t u r n ; i f ( " t o d o " ! = n . i t e m . g e t A t t r i b u t e ( " l i s t T y p e " ) ) r e t u r n ; o . c o n s u m e ( n . i t e m , " i n s e r t " ) , o . c o n s u m e ( n . i t e m , " a t t r i b u t e : l i s t T y p e " ) , o . c o n s u m e ( n . i t e m , " a t t r i b u t e : l i s t I n d e n t " ) ; c o n s t r = i . w r i t e r , s = n . i t e m , a = D m ( s , i ) ; r . a d d C l a s s ( " t o d o - l i s t " , a . p a r e n t ) ; c o n s t c = r . c r e a t e A t t r i b u t e E l e m e n t ( " l a b e l " , { c l a s s : " t o d o - l i s t _ _ l a b e l " } ) , l = r . c r e a t e E m p t y E l e m e n t ( " i n p u t " , { t y p e : " c h e c k b o x " , d i s a b l e d : " d i s a b l e d " } ) ; n . i t e m . g e t A t t r i b u t e ( " t o d o L i s t C h e c k e d " ) & & ( r . s e t A t t r i b u t e ( " c h e c k e d " , " c h e c k e d " , l ) , r . a d d C l a s s ( " t o d o - l i s t _ _ l a b e l " , c ) ) , r . i n s e r t ( r . c r e a t e P o s i t i o n A t ( a , 0 ) , l ) , r . w r a p ( r . c r e a t e R a n g e O n ( l ) , c ) , M m ( s , a , i , t ) } } ( i ) , { p r i o r i t y : " h i g h " } ) , n . d o w n c a s t D i s p a t c h e r . o n ( " i n s e r t : $ t e x t " , z b , { p r i o r i t y : " h i g h " } ) , e . d o w n c a s t D i s p a t c h e r . o n ( " a t t r i b u t e : l i s t T y p e : l i s t I t e m " , ( o = t = > t h i s . _ h a n d l e C h e c k m a r k C h a n g e ( t ) , r = e . v i e w , ( t , e , n ) = > { c o n s t i = n . m a p p e r . t o V i e w E l e m e n t ( e . i t e m ) , s = n . w r i t e r ; i f ( " t o d o " = = e . a t t r i b u t e N e w V a l u e ) { c o n s t t = ! ! e . i t e m . g e t A t t r i b u t e ( " t o d o L i s t C h e c k e d " ) , n = j b ( e . i t e m , s , t , o ) ; s . a d d C l a s s ( " t o d o - l i s t " , i . p a r e n t ) , s . i n s e r t ( s . c r e a t e P o s i t i o n A t ( i , 0 ) , n ) } e l s e " t o d o " = = e . a t t r i b u t e O l d V a l u e & & ( s . r e m o v e C l a s s ( " t o d o - l i s t " , i . p a r e n t ) , s . r e m o v e ( H b ( i , r ) ) ) } ) ) , e . d o w n c a s t D i s p a t c h e r . o n ( " a t t r i b u t e : t o d o L i s t C h e c k e d : l i s t I t e m " , f u n c t i o n ( t ) { r e t u r n ( e , n , i ) = > { i f ( " t o d o " ! = n . i t e m . g e t A t t r i b u t e ( " l i s t T y p e " ) ) r e t u r n ; i f ( ! i . c o n s u m a b l e . c o n s u m e ( n . i t e m , " a t t r i b u t e : t o d o L i s t C h e c k e d " ) ) r e t u r n ; c o n s t { m a p p e r : o , w r i t e r : r } = i , s = ! ! n . i t e m . g e t A t t r i b u t e ( " t o d o L i s t C h e c k e d " ) , a = o . t o V i e w E l e m e n t ( n . i t e m ) . g e t C h i l d ( 0 ) , c = j b ( n . i t e m , r , s , t ) ; r . i n s e r t ( r . c r e a t e P o s i t i o n A f t e r ( a ) , c ) , r . r e m o v e ( a ) } } ( t = > t h i s . _ h a n d l e C h e c k m a r k C h a n g e ( t ) ) ) , e . m a p p e r . o n ( " m o d e l T o V i e w P o s i t i o n " , f u n c t i o n ( t , e ) { r e t u r n ( n , i ) = > { c o n s t o = i . m o d e l P o s i t i o n , r = o . p a r e n t ; i f ( ! r . i s ( " l i s t I t e m " ) | | " t o d o " ! = r . g e t A t t r i b u t e ( " l i s t T y p e " ) | | 0 ! = = o . o f f s e t ) r e t u r n ; c o n s t s = H b ( e . t o V i e w E l e m e n t ( r ) , t ) ; s & & ( s . n e x t S i b l i n g & & ! s . n e x t S i b l i n g . i s ( " u i E l e m e n t " ) ? i . v i e w P o s i t i o n = t . c r e a t e P o s i t i o n A t ( s . n e x t S i b l i n g , 0 ) : i . v i e w P o s i t i o n = t . c r e a t e P o s i t i o n A f t e r ( s ) ) } } ( e . v i e w , e . m a p p e r ) ) , n . u p c a s t D i s p a t c h e r . o n ( " e l e m e n t : i n p u t " , q b , { p r i o r i t y : " h i g h " } ) ; c o n s t s = " l t r " = = = t . l o c a l e . c o n t e n t L a n g u a g e D i r e c t i o n ? " a r r o w l e f t " : " a r r o w r i g h t " ; t . k e y s t r o k e s . s e t ( s , ( t , e ) = > ( f u n c t i o n ( t , e ) { c o n s t n = e . s c h e m a , i = e . d o c u m e n t . s e l e c t i o n ; i f ( ! i . i s C o l l a p s e d ) r e t u r n ; c o n s t o = i . g e t F i r s t P o s i t i o n ( ) , r = o . p a r e n t ; i f ( " l i s t I t e m " = = = r . n a m e & & " t o d o " = = r . g e t A t t r i b u t e ( " l i s t T y p e " ) & & o . i s A t S t a r t ) { c o n s t i = n . g e t N e a r e s t S e l e c t i o n R a n g e ( e . c r e a t e P o s i t i o n B e f o r e ( r ) , " b a c k w a r d " ) ; i & & ( t ( ) , e . c h a n g e ( t = > t . s e t S e l e c t i o n ( i ) ) ) } } ) ( e , i ) ) , t . k e y s t r o k e s . s e t ( " C t r l + s p a c e " , ( ) = > t . e x e c u t e ( " t o d o L i s t C h e c k " ) ) ; c o n s t a = n e w S e t ; t h i s . l i s t e n T o ( i , " a p p l y O p e r a t i o n " , ( t , e ) = > { c o n s t n = e [ 0 ] ; i f ( " r e n a m e " = = n . t y p e & & " l i s t I t e m " = = n . o l d N a m e ) { c o n s t t = n . p o s i t i o n . n o d e A f t e r ; t . h a s A t t r i b u t e ( " t o d o L i s t C h e c k e d " ) & & a . a d d ( t ) } e l s e i f ( " c h a n g e A t t r i b u t e " = = n . t y p e & & " l i s t T y p e " = = n . k e y & & " t o d o " = = = n . o l d V a l u e ) f o r ( c o n s t t o f n . r a n g e . g e t I t e m s ( ) ) t . h a s A t t r i b u t e ( " t o d o L i s t C h e c k e d " ) & & " t o d o " ! = = t . g e t A t t r i b u t e ( " l i s t T y p e " ) & & a . a d d ( t ) } ) , i . d o c u m e n t . r e g i s t e r P o s t F i x e r ( t = > { l e t e = !
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s W b e x t e n d s y d { i n i t ( ) { c o n s t t = t h i s . e d i t o r . t ; B m ( t h i s . e d i t o r , " t o d o L i s t " , t ( " a c " ) , $ b ) } } n ( 9 5 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / v a r G b = / h i g h l i g h t - ( ? : t e x t | s o u r c e ) - ( [ a - z 0 - 9 ] + ) / ; f u n c t i o n K b ( t ) { t . a d d R u l e ( " h i g h l i g h t e d C o d e B l o c k " , { f i l t e r : f u n c t i o n ( t ) { v a r e = t . f i r s t C h i l d ; r e t u r n " D I V " = = = t . n o d e N a m e & & G b . t e s t ( t . c l a s s N a m e ) & & e & & " P R E " = = = e . n o d e N a m e } , r e p l a c e m e n t : f u n c t i o n ( t , e , n ) { v a r i = ( ( e . c l a s s N a m e | | " " ) . m a t c h ( G b ) | | [ n u l l , " " ] ) [ 1 ] ; r e t u r n " \ n \ n " + n . f e n c e + i + " \ n " + e . f i r s t C h i l d . t e x t C o n t e n t + " \ n " + n . f e n c e + " \ n \ n " } } ) } v a r J b = A r r a y . p r o t o t y p e . i n d e x O f , Z b = A r r a y . p r o t o t y p e . e v e r y , Q b = { } ; f u n c t i o n Y b ( t ) { v a r e , n , i = t . p a r e n t N o d e ; r e t u r n " T H E A D " = = = i . n o d e N a m e | | i . f i r s t C h i l d = = = t & & ( " T A B L E " = = = i . n o d e N a m e | | ( n = ( e = i ) . p r e v i o u s S i b l i n g , " T B O D Y " = = = e . n o d e N a m e & & ( ! n | | " T H E A D " = = = n . n o d e N a m e & & / ^ \ s * $ / i . t e s t ( n . t e x t C o n t e n t ) ) ) ) & & Z b . c a l l ( t . c h i l d N o d e s , ( f u n c t i o n ( t ) { r e t u r n " T H " = = = t . n o d e N a m e } ) ) } f u n c t i o n X b ( t , e ) { v a r n = " " ; r e t u r n 0 = = = J b . c a l l ( e . p a r e n t N o d e . c h i l d N o d e s , e ) & & ( n = " | " ) , n + t + " | " } f u n c t i o n t w ( t , e ) { r e t u r n A r r a y ( e + 1 ) . j o i n ( t ) } Q b . t a b l e C e l l = { f i l t e r : [ " t h " , " t d " ] , r e p l a c e m e n t : f u n c t i o n ( t , e ) { r e t u r n X b ( t , e ) } } , Q b . t a b l e R o w = { f i l t e r : " t r " , r e p l a c e m e n t : f u n c t i o n ( t , e ) { v a r n = " " , i = { l e f t : " : - - " , r i g h t : " - - : " , c e n t e r : " : - : " } ; i f ( Y b ( e ) ) f o r ( v a r o = 0 ; o < e . c h i l d N o d e s . l e n g t h ; o + + ) { v a r r = " - - - " , s = ( e . c h i l d N o d e s [ o ] . g e t A t t r i b u t e ( " a l i g n " ) | | " " ) . t o L o w e r C a s e ( ) ; s & & ( r = i [ s ] | | r ) , n + = X b ( r , e . c h i l d N o d e s [ o ] ) } r e t u r n " \ n " + t + ( n ? " \ n " + n : " " ) } } , Q b . t a b l e = { f i l t e r : f u n c t i o n ( t ) { r e t u r n " T A B L E " = = = t . n o d e N a m e & & Y b ( t . r o w s [ 0 ] ) } , r e p l a c e m e n t : f u n c t i o n ( t ) { r e t u r n " \ n \ n " + ( t = t . r e p l a c e ( " \ n \ n " , " \ n " ) ) + " \ n \ n " } } , Q b . t a b l e S e c t i o n = { f i l t e r : [ " t h e a d " , " t b o d y " , " t f o o t " ] , r e p l a c e m e n t : f u n c t i o n ( t ) { r e t u r n t } } ; v a r e w = [ " a d d r e s s " , " a r t i c l e " , " a s i d e " , " a u d i o " , " b l o c k q u o t e " , " b o d y " , " c a n v a s " , " c e n t e r " , " d d " , " d i r " , " d i v " , " d l " , " d t " , " f i e l d s e t " , " f i g c a p t i o n " , " f i g u r e " , " f o o t e r " , " f o r m " , " f r a m e s e t " , " h 1 " , " h 2 " , " h 3 " , " h 4 " , " h 5 " , " h 6 " , " h e a d e r " , " h g r o u p " , " h r " , " h t m l " , " i s i n d e x " , " l i " , " m a i n " , " m e n u " , " n a v " , " n o f r a m e s " , " n o s c r i p t " , " o l " , " o u t p u t " , " p " , " p r e " , " s e c t i o n " , " t a b l e " , " t b o d y " , " t d " , " t f o o t " , " t h " , " t h e a d " , " t r " , " u l " ] ; f u n c t i o n n w ( t ) { r e t u r n - 1 ! = = e w . i n d e x O f ( t . n o d e N a m e . t o L o w e r C a s e ( ) ) } v a r i w = [ " a r e a " , " b a s e " , " b r " , " c o l " , " c o m m a n d " , " e m b e d " , " h r " , " i m g " , " i n p u t " , " k e y g e n " , " l i n k " , " m e t a " , " p a r a m " , " s o u r c e " , " t r a c k " , " w b r " ] ; f u n c t i o n o w ( t ) { r e t u r n - 1 ! = = i w . i n d e x O f ( t . n o d e N a m e . t o L o w e r C a s e ( ) ) } v a r r w = i w . j o i n ( ) ; v a r s w = { } ; f u n c t i o n a w ( t ) { f o r ( v a r e i n t h i s . o p t i o n s = t , t h i s . _ k e e p = [ ] , t h i s . _ r e m o v e = [ ] , t h i s . b l a n k R u l e = { r e p l a c e m e n t : t . b l a n k R e p l a c e m e n t } , t h i s . k e e p R e p l a c e m e n t = t . k e e p R e p l a c e m e n t , t h i s . d e f a u l t R u l e = { r e p l a c e m e n t : t . d e f a u l t R e p l a c e m e n t } , t h i s . a r r a y = [ ] , t . r u l e s ) t h i s . a r r a y . p u s h ( t . r u l e s [ e ] ) } f u n c t i o n c w ( t , e , n ) { f o r ( v a r i = 0 ; i < t . l e n g t h ; i + + ) { v a r o = t [ i ] ; i f ( l w ( o , e , n ) ) r e t u r n o } } f u n c t i o n l w ( t , e , n ) { v a r i = t . f i l t e r ; i f ( " s t r i n g " = = t y p e o f i ) { i f ( i = = = e . n o d e N a m e . t o L o w e r C a s e ( ) ) r e t u r n ! 0 } e l s e i f ( A r r a y . i s A r r a y ( i ) ) { i f ( i . i n d e x O f ( e . n o d e N a m e . t o L o w e r C a s e ( ) ) > - 1 ) r e t u r n ! 0 } e l s e { i f ( " f u n c t i o n " ! = t y p e o f i ) t h r o w n e w T y p e E r r o r ( " ` f i l t e r ` n e e d s t o b e a s t r i n g , a r r a y , o r f u n c t i o n " ) ; i f ( i . c a l l ( t , e , n ) ) r e t u r n ! 0 } } f u n c t i o n d w ( t ) { v a r e = t . n e x t S i b l i n g | | t . p a r e n t N o d e ; r e t u r n t . p a r e n t N o d e . r e m o v e C h i l d ( t ) , e } f u n c t i o n u w ( t , e , n ) { r e t u r n t & & t . p a r e n t N o d e = = = e | | n ( e ) ? e . n e x t S i b l i n g | | e . p a r e n t N o d e : e . f i r s t C h i l d | | e . n e x t S i b l i n g | | e . p a r e n t N o d e } s w . p a r a g r a p h = { f i l t e r : " p " , r e p l a c e m e n t : f u n c t i o n ( t ) { r e t u r n " \ n \ n " + t + " \ n \ n " } } , s w . l i n e B r e a k = { f i l t e r : " b r " , r e p l a c e m e n t : f u n c t i o n ( t , e , n ) { r e t u r n n . b r + " \ n " } } , s w . h e a d i n g = { f i l t e r : [ " h 1 " , " h 2 " , " h 3 " , " h 4 " , " h 5 " , " h 6 " ] , r e p l a c e m e n t : f u n c t i o n ( t , e , n ) { v a r i = N u m b e r ( e . n o d e N a m e . c h a r A t ( 1 ) ) ; r e t u r n " s e t e x t " = = = n . h e a d i n g S t y l e & & i < 3 ? " \ n \ n " + t + " \ n " + t w ( 1 = = = i ? " = " : " - " , t . l e n g t h ) + " \ n \ n " : " \ n \ n " + t w ( " # " , i ) + " " + t + " \ n \ n " } } , s w . b l o c k q u o t e = { f i l t e r : " b l o c k q u o t e " , r e p l a c e m e n t : f u n c t i o n ( t ) { r e t u r n " \ n \ n " + ( t = ( t = t . r e p l a c e ( / ^ \ n + | \ n + $ / g , " " ) ) . r e p l a c e ( / ^ / g m , " > " ) ) + " \ n \ n " } } , s w . l i s t = { f i l t e r : [ " u l " , " o l " ] , r e p l a c e m e n t : f u n c t i o n ( t , e ) { v a r n = e . p a r e n t N o d e ; r e t u r n " L I " = = = n . n o d e N a m e & & n . l a s t E l e m e n t C h i l d = = = e ? " \ n " + t : " \ n \ n " + t + " \ n \ n " } } , s w . l i s t I t e m = { f i l t e r : " l i " , r e p l a c e m e n t : f u n c t i o n ( t , e , n ) { t = t . r e p l a c e ( / ^ \ n + / , " " ) . r e p l a c e ( / \ n + $ / , " \ n " ) . r e p l a c e ( / \ n / g m , " \ n " ) ; v a r i = n . b u l l e t L i s t M a r k e r + " " , o = e . p a r e n t N o d e ; i f ( " O L " = = = o . n o d e N a m e ) { v a r r = o . g e t A t t r i b u t e ( " s t a r t " ) , s = A r r a y . p r o t o t y p e . i n d e x O f . c a l l ( o . c h i l d r e n , e ) ; i = ( r ? N u m b e r ( r ) + s : s + 1 ) + " . " } r e t u r n i + t + ( e . n e x t S i b l i n g & & ! / \ n $ / . t e s t ( t ) ? " \ n " : " " ) } } , s w . i n d e n t e d C o d e B l o c k = { f i l t e r : f u n c t i o n ( t , e ) { r e t u r n " i n d e n t e d " = = = e . c o d e B l o c k S t y l e & & " P R E " = = = t . n o d e N a m e & & t . f i r s t C h i l d & & " C O D E " = = = t . f i r s t C h i l d . n o d e N a m e } , r e p l a c e m e
/ * *
* @ license Copyright ( c ) 2003 - 2017 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md .
* /
const Iw = "data-original-src" ; class Ow { constructor ( ) { this . _htmlDP = new dl , this . _domConverter = new ar } toView ( t ) { const e = n ( 98 ) ( { html : ! 0 , langPrefix : "language-" } ) ; let i = n ( 154 ) ; const o = e . use ( i , { label : ! 0 } ) . render ( t ) , r = this . _htmlDP . _toDom ( o ) ; return function ( t ) { let e , n = document . createNodeIterator ( t , NodeFilter . SHOW _ELEMENT , { acceptNode : function ( t ) { if ( "P" === t . tagName && t . parentElement && "LI" === t . parentElement . tagName ) return NodeFilter . FILTER _ACCEPT } } , ! 1 ) ; for ( ; e = n . nextNode ( ) ; ) e . outerHTML = e . innerHTML } ( r ) , function ( t ) { let e , n = document . createNodeIterator ( t , NodeFilter . SHOW _ELEMENT , { acceptNode : function ( t ) { if ( "CODE" === t . tagName && t . parentElement && "PRE" === t . parentElement . tagName ) return NodeFilter . FILTER _ACCEPT } } , ! 1 ) ; for ( ; e = n . nextNode ( ) ; ) 0 !== e . children . length || e . textContent || ( e . textContent = "\n" ) } ( r ) , this . _domConverter . domToView ( r ) } toData ( t ) { const e = this . _domConverter . viewToDom ( t , document ) ; ! function ( t , e , n ) { e = e . map ( t => t . toUpperCase ( ) ) , n = n . map ( t => t . toUpperCase ( ) ) ; let i , o = document . createNodeIterator ( t , NodeFilter . SHOW _TEXT ) ; for ( ; i = o . nextNode ( ) ; ) i . parentElement && e . indexOf ( i . parentElement . nodeName ) >= 0 && ( i . nodeValue = i . nodeValue . replace ( /^[\u00a0]+/g , " " ) . replace ( /[\u00a0]+$/g , " " ) ) , Rw ( i , n ) || ( i . nodeValue = _ . escape ( i . nodeValue ) ) } ( e , [ "strong" , "em" ] , [ "pre" , "code" , "table" ] ) , function ( t , e , n ) { let i , o = document . createNodeIterator ( t , NodeFilter . SHOW _ELEMENT , ( function ( t ) { return "a" === t . nodeName . toLowerCase ( ) ? NodeFilter . FILTER _ACCEPT : NodeFilter . FILTER _REJECT } ) ) ; for ( ; i = o . nextNode ( ) ; ) i . setAttribute ( "href" , i . href ) } ( e ) ; const n = new Sw ( { headingStyle : "atx" , codeBlockStyle : "fenced" } ) ; return n . use ( [ Kb ] ) , n . addRule ( "todolist" , { filter : function ( t ) { return "LI" === t . nodeName && t . closest ( "ul.todo-list" ) } , replacement : function ( t , e , n ) { t = t . replace ( /^\n+/ , "" ) . replace ( /\n+$/ , "\n" ) . replace ( /\n/gm , "\n " ) ; var i = n . bulletListMarker + " " , o = e . querySelector ( "input[type=checkbox]" ) ; return i + ( o && o . checked ? "[x] " : "[ ] " ) + t + ( e . nextSibling && ! /\n$/ . test ( t ) ? "\n" : "" ) } } ) , n . addRule ( "img" , { filter : "img" , replacement : function ( t , e ) { var n = e . alt || "" , i = e . getAttribute ( Iw ) || e . getAttribute ( "src" ) || "" , o = e . title || "" ; return i ? "![" + n + "](" + i + ( o ? ' "' + o + '"' : "" ) + ")" : "" } } ) , n . addRule ( "htmlTables" , { filter : [ "table" ] , replacement : function ( t , e ) { return e . querySelectorAll ( "td br[data-cke-filler]" ) . forEach ( t => t . remove ( ) ) , e . outerHTML } } ) , n . addRule ( "strikethrough" , { filter : [ "del" , "s" , "strike" ] , replacement : function ( t ) { return "~~" + t + "~~" } } ) , n . addRule ( "openProjectMacros" , { filter : [ "macro" ] , replacement : ( t , e ) => { return e . innerHTML = "" , e . outerHTML . replace ( "</macro>" , "\n</macro>" ) } } ) , n . turndown ( e ) } } var Dw = ' < ? xml version = "1.0" encoding = "UTF-8" standalone = "no" ? > \ n < svg \ n xmlns : dc = "http://purl.org/dc/elements/1.1/" \ n xmlns : cc = "http://creativecommons.org/ns#" \ n xmlns : rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" \ n xmlns : svg = "http://www.w3.org/2000/svg" \ n xmlns = "http://www.w3.org/2000/svg" \ n xmlns : sodipodi = "http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" \ n xmlns : inkscape = "http://www.inkscape.org/namespaces/inkscape" \ n class = "ck ck-icon ck-button__icon" \ n viewBox = "0 0 20 20" \ n version = "1.1" \ n id = "svg10" \ n sodipodi : docname = "source.svg" \ n inkscape : version = "0.92.3 (2405546, 2018-03-11)" > \ n < defs \ n id = "defs14" / > \ n < sodipodi : namedview \ n pagecolor = "#ffffff" \ n bordercolor = "#666666" \ n borderopacity = "1" \ n objecttolerance = "10" \ n gridtolerance = "10" \ n guidetolerance = "10" \ n inkscape : pageopacity = "0" \ n inkscape : pageshadow = "2" \ n inkscape : window - width = "640" \ n inkscape : window - height = "480" \ n id = "namedview12" \ n showgrid = "false" \ n inkscape : zoom = "33.37544" \ n inkscape : cx = "10.656564" \ n inkscape : cy = "13.670445" \ n inkscape : current - layer = "svg10" / > \ n < g \ n id = "g8" \ n style = "fill:#000000;fill-rule:evenodd" \ n transform = "matrix(0.8751128,0,0,0.8751128,4.2423992,5.525391)" > \ n < g \ n id = "g6" \ n style = "fill:#000000" > \ n < g \ n transform = "translate(2,5.6)" \ n id = "g4" \ n style = "fill:#000000" > \ n < path \ n d = " M 10.5 , 0.1 15.7 , 4 v 1.3 l - 5.6 , 4 C 10 , 9.5 9.8 , 9.5 9.6 , 9.5 9.3 , 9.4 9 , 8.8 9 , 8.5 L 9.3 , 8.1 14 , 4.6 9.5 , 1.4 9.3 , 1.2 C 9.2 , 0.9 9.2 ,
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
class Nw extends qu { refresh ( ) { const t = this . editor . model , e = t . document ; this . isEnabled = t . schema . checkAttributeInSelection ( e . selection , "mention" ) } execute ( t ) { const e = this . editor . model , n = e . document . selection , i = "string" == typeof t . mention ? { id : t . mention } : t . mention , o = i . id , r = t . range || n . getFirstRange ( ) , s = t . text || o , a = Fw ( { _text : s , id : o } , i ) ; if ( 1 != t . marker . length ) throw new Zn . b ( "mentioncommand-incorrect-marker: The marker must be a single character." , this ) ; if ( o . charAt ( 0 ) != t . marker ) throw new Zn . b ( "mentioncommand-incorrect-id: The item id must start with the marker character." , this ) ; e . change ( t => { const i = zs ( n . getAttributes ( ) ) , o = new Map ( i . entries ( ) ) ; o . set ( "mention" , a ) , e . insertContent ( t . createText ( s , o ) , r ) , e . insertContent ( t . createText ( " " , i ) , r . start . getShiftedBy ( s . length ) ) } ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s V w e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " M e n t i o n E d i t i n g " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . m o d e l , n = e . d o c u m e n t ; e . s c h e m a . e x t e n d ( " $ t e x t " , { a l l o w A t t r i b u t e s : " m e n t i o n " } ) , t . c o n v e r s i o n . f o r ( " u p c a s t " ) . e l e m e n t T o A t t r i b u t e ( { v i e w : { n a m e : " s p a n " , k e y : " d a t a - m e n t i o n " , c l a s s e s : " m e n t i o n " } , m o d e l : { k e y : " m e n t i o n " , v a l u e : B w } } ) , t . c o n v e r s i o n . f o r ( " d o w n c a s t " ) . a t t r i b u t e T o E l e m e n t ( { m o d e l : " m e n t i o n " , v i e w : z w } ) , t . c o n v e r s i o n . f o r ( " d o w n c a s t " ) . a d d ( L w ) , n . r e g i s t e r P o s t F i x e r ( t = > ( f u n c t i o n ( t , e , n ) { c o n s t i = e . d i f f e r . g e t C h a n g e s ( ) ; l e t o = ! 1 ; f o r ( c o n s t e o f i ) { c o n s t i = e . p o s i t i o n ; i f ( " $ t e x t " = = e . n a m e ) { c o n s t e = i . t e x t N o d e & & i . t e x t N o d e . n e x t S i b l i n g ; o = j w ( i . t e x t N o d e , t ) | | o , o = j w ( e , t ) | | o , o = j w ( i . n o d e B e f o r e , t ) | | o , o = j w ( i . n o d e A f t e r , t ) | | o } i f ( " $ t e x t " ! = e . n a m e & & " i n s e r t " = = e . t y p e ) { c o n s t e = i . n o d e A f t e r ; f o r ( c o n s t n o f t . c r e a t e R a n g e I n ( e ) . g e t I t e m s ( ) ) o = j w ( n , t ) | | o } i f ( " i n s e r t " = = e . t y p e & & n . i s I n l i n e ( e . n a m e ) ) { c o n s t e = i . n o d e A f t e r & & i . n o d e A f t e r . n e x t S i b l i n g ; o = j w ( i . n o d e B e f o r e , t ) | | o , o = j w ( e , t ) | | o } } r e t u r n o } ) ( t , n , e . s c h e m a ) ) , n . r e g i s t e r P o s t F i x e r ( t = > ( f u n c t i o n ( t , e ) { c o n s t n = e . d i f f e r . g e t C h a n g e s ( ) ; l e t i = ! 1 ; f o r ( c o n s t e o f n ) i f ( " a t t r i b u t e " = = = e . t y p e & & " m e n t i o n " ! = e . a t t r i b u t e K e y ) { c o n s t n = e . r a n g e . s t a r t . n o d e B e f o r e , o = e . r a n g e . e n d . n o d e A f t e r ; f o r ( c o n s t r o f [ n , o ] ) q w ( r ) & & r . g e t A t t r i b u t e ( e . a t t r i b u t e K e y ) ! = e . a t t r i b u t e N e w V a l u e & & ( t . s e t A t t r i b u t e ( e . a t t r i b u t e K e y , e . a t t r i b u t e N e w V a l u e , r ) , i = ! 0 ) } r e t u r n i } ) ( t , n ) ) , n . r e g i s t e r P o s t F i x e r ( t = > ( f u n c t i o n ( t , e ) { c o n s t n = e . s e l e c t i o n , i = n . f o c u s ; i f ( n . i s C o l l a p s e d & & n . h a s A t t r i b u t e ( " m e n t i o n " ) & & f u n c t i o n ( t ) { c o n s t e = t . i s A t S t a r t ; r e t u r n t . n o d e B e f o r e & & t . n o d e B e f o r e . i s ( " t e x t " ) | | e } ( i ) ) r e t u r n t . r e m o v e S e l e c t i o n A t t r i b u t e ( " m e n t i o n " ) , ! 0 } ) ( t , n ) ) , t . c o m m a n d s . a d d ( " m e n t i o n " , n e w N w ( t ) ) } } f u n c t i o n F w ( t , e ) { r e t u r n O b j e c t . a s s i g n ( { _ u i d : X n ( ) } , t , e | | { } ) } f u n c t i o n B w ( t , e ) { c o n s t n = t . g e t A t t r i b u t e ( " d a t a - m e n t i o n " ) , i = t . g e t C h i l d ( 0 ) ; i f ( i ) r e t u r n F w ( { i d : n , _ t e x t : i . d a t a } , e ) } f u n c t i o n L w ( t ) { t . o n ( " a t t r i b u t e : m e n t i o n " , ( t , e , n ) = > { c o n s t i = e . a t t r i b u t e N e w V a l u e ; i f ( ! e . i t e m . i s ( " t e x t P r o x y " ) | | ! i ) r e t u r n ; c o n s t o = e . r a n g e . s t a r t ; ( o . t e x t N o d e | | o . n o d e A f t e r ) . d a t a ! = i . _ t e x t & & n . c o n s u m a b l e . c o n s u m e ( e . i t e m , t . n a m e ) } , { p r i o r i t y : " h i g h e s t " } ) } f u n c t i o n z w ( t , e ) { i f ( ! t ) r e t u r n ; c o n s t n = { c l a s s : " m e n t i o n " , " d a t a - m e n t i o n " : t . i d } , i = { i d : t . _ u i d , p r i o r i t y : 2 0 } ; r e t u r n e . c r e a t e A t t r i b u t e E l e m e n t ( " s p a n " , n , i ) } f u n c t i o n q w ( t ) { i f ( ! t | | ! t . i s ( " t e x t " ) & & ! t . i s ( " t e x t P r o x y " ) | | ! t . h a s A t t r i b u t e ( " m e n t i o n " ) ) r e t u r n ! 1 ; r e t u r n t . d a t a ! = t . g e t A t t r i b u t e ( " m e n t i o n " ) . _ t e x t } f u n c t i o n j w ( t , e ) { r e t u r n ! ! q w ( t ) & & ( e . r e m o v e A t t r i b u t e ( " m e n t i o n " , t ) , ! 0 ) }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s H w { c o n s t r u c t o r ( t , e ) { t h i s . m o d e l = t , t h i s . t e s t C a l l b a c k = e , t h i s . h a s M a t c h = ! 1 , t h i s . _ s t a r t L i s t e n i n g ( ) } _ s t a r t L i s t e n i n g ( ) { c o n s t t = t h i s . m o d e l . d o c u m e n t ; t . s e l e c t i o n . o n ( " c h a n g e : r a n g e " , ( e , { d i r e c t C h a n g e : n } ) = > { n & & ( t . s e l e c t i o n . i s C o l l a p s e d ? t h i s . _ e v a l u a t e T e x t B e f o r e S e l e c t i o n ( " s e l e c t i o n " ) : t h i s . h a s M a t c h & & ( t h i s . f i r e ( " u n m a t c h e d " ) , t h i s . h a s M a t c h = ! 1 ) ) } ) , t . o n ( " c h a n g e : d a t a " , ( t , e ) = > { " t r a n s p a r e n t " ! = e . t y p e & & t h i s . _ e v a l u a t e T e x t B e f o r e S e l e c t i o n ( " d a t a " , { b a t c h : e } ) } ) } _ e v a l u a t e T e x t B e f o r e S e l e c t i o n ( t , e = { } ) { c o n s t n = t h i s . m o d e l , i = n . d o c u m e n t . s e l e c t i o n , o = n . c r e a t e R a n g e ( n . c r e a t e P o s i t i o n A t ( i . f o c u s . p a r e n t , 0 ) , i . f o c u s ) , { t e x t : r , r a n g e : s } = Y h ( o , n ) , a = t h i s . t e s t C a l l b a c k ( r ) ; i f ( ! a & & t h i s . h a s M a t c h & & t h i s . f i r e ( " u n m a t c h e d " ) , t h i s . h a s M a t c h = a , a ) { c o n s t n = O b j e c t . a s s i g n ( e , { t e x t : r , r a n g e : s } ) ; t h i s . f i r e ( ` m a t c h e d : $ { t } ` , n ) } } } d i ( H w , i i ) ; n ( 1 5 5 ) ;
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s U w e x t e n d s a d { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . e x t e n d T e m p l a t e ( { a t t r i b u t e s : { c l a s s : [ " c k - m e n t i o n s " ] , t a b i n d e x : " - 1 " } } ) } s e l e c t F i r s t ( ) { t h i s . s e l e c t ( 0 ) } s e l e c t N e x t ( ) { c o n s t t = t h i s . s e l e c t e d , e = t h i s . i t e m s . g e t I n d e x ( t ) ; t h i s . s e l e c t ( e + 1 ) } s e l e c t P r e v i o u s ( ) { c o n s t t = t h i s . s e l e c t e d , e = t h i s . i t e m s . g e t I n d e x ( t ) ; t h i s . s e l e c t ( e - 1 ) } s e l e c t ( t ) { l e t e = 0 ; t > 0 & & t < t h i s . i t e m s . l e n g t h ? e = t : t < 0 & & ( e = t h i s . i t e m s . l e n g t h - 1 ) ; c o n s t n = t h i s . i t e m s . g e t ( e ) ; t h i s . s e l e c t e d ! = = n & & ( t h i s . s e l e c t e d & & t h i s . s e l e c t e d . r e m o v e H i g h l i g h t ( ) , n . h i g h l i g h t ( ) , t h i s . s e l e c t e d = n , t h i s . _ i s I t e m V i s i b l e I n S c r o l l e d A r e a ( n ) | | ( t h i s . e l e m e n t . s c r o l l T o p = n . e l e m e n t . o f f s e t T o p ) ) } e x e c u t e S e l e c t e d ( ) { t h i s . s e l e c t e d . f i r e ( " e x e c u t e " ) } _ i s I t e m V i s i b l e I n S c r o l l e d A r e a ( t ) { r e t u r n n e w P s ( t h i s . e l e m e n t ) . c o n t a i n s ( n e w P s ( t . e l e m e n t ) ) } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s $ w e x t e n d s j l { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . t e m p l a t e = ! 1 , t h i s . d o m E l e m e n t = e , t h i s . d o m E l e m e n t . c l a s s L i s t . a d d ( " c k - b u t t o n " ) , t h i s . s e t ( " i s O n " , ! 1 ) , t h i s . o n ( " c h a n g e : i s O n " , ( t , e , n ) = > { n ? ( t h i s . d o m E l e m e n t . c l a s s L i s t . a d d ( " c k - o n " ) , t h i s . d o m E l e m e n t . c l a s s L i s t . r e m o v e ( " c k - o f f " ) ) : ( t h i s . d o m E l e m e n t . c l a s s L i s t . a d d ( " c k - o f f " ) , t h i s . d o m E l e m e n t . c l a s s L i s t . r e m o v e ( " c k - o n " ) ) } ) , t h i s . l i s t e n T o ( t h i s . d o m E l e m e n t , " c l i c k " , ( ) = > { t h i s . f i r e ( " e x e c u t e " ) } ) } r e n d e r ( ) { s u p e r . r e n d e r ( ) , t h i s . e l e m e n t = t h i s . d o m E l e m e n t } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c l a s s W w e x t e n d s c d { h i g h l i g h t ( ) { t h i s . c h i l d r e n . f i r s t . i s O n = ! 0 } r e m o v e H i g h l i g h t ( ) { t h i s . c h i l d r e n . f i r s t . i s O n = ! 1 } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / c o n s t G w = 3 ; c l a s s K w e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " M e n t i o n U I " } c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . _ m e n t i o n s V i e w = t h i s . _ c r e a t e M e n t i o n V i e w ( ) , t h i s . _ m e n t i o n s C o n f i g u r a t i o n s = n e w M a p , t . c o n f i g . d e f i n e ( " m e n t i o n " , { f e e d s : [ ] } ) } i n i t ( ) { c o n s t t = t h i s . e d i t o r ; t h i s . _ b a l l o o n = t . p l u g i n s . g e t ( o u ) , t . e d i t i n g . v i e w . d o c u m e n t . o n ( " k e y d o w n " , ( t , e ) = > { ( f u n c t i o n ( t ) { r e t u r n [ k o . a r r o w u p , k o . a r r o w d o w n , k o . e n t e r , k o . t a b , k o . s p a c e , k o . e s c ] . i n c l u d e s ( t ) } ) ( e . k e y C o d e ) & & t h i s . _ i s U I V i s i b l e & & ( e . p r e v e n t D e f a u l t ( ) , t . s t o p ( ) , e . k e y C o d e = = k o . a r r o w d o w n & & t h i s . _ m e n t i o n s V i e w . s e l e c t N e x t ( ) , e . k e y C o d e = = k o . a r r o w u p & & t h i s . _ m e n t i o n s V i e w . s e l e c t P r e v i o u s ( ) , e . k e y C o d e ! = k o . e n t e r & & e . k e y C o d e ! = k o . t a b & & e . k e y C o d e ! = k o . s p a c e | | t h i s . _ m e n t i o n s V i e w . e x e c u t e S e l e c t e d ( ) , e . k e y C o d e = = k o . e s c & & t h i s . _ h i d e U I A n d R e m o v e M a r k e r ( ) ) } , { p r i o r i t y : " h i g h e s t " } ) , u d ( { e m i t t e r : t h i s . _ m e n t i o n s V i e w , a c t i v a t o r : ( ) = > t h i s . _ i s U I V i s i b l e , c o n t e x t E l e m e n t s : [ t h i s . _ b a l l o o n . v i e w . e l e m e n t ] , c a l l b a c k : ( ) = > t h i s . _ h i d e U I A n d R e m o v e M a r k e r ( ) } ) ; c o n s t e = t . c o n f i g . g e t ( " m e n t i o n . f e e d s " ) ; f o r ( c o n s t t o f e ) { c o n s t e = t . f e e d , n = t . m a r k e r ; i f ( ! n | | 1 ! = n . l e n g t h ) t h r o w n e w Z n . b ( " m e n t i o n c o n f i g - i n c o r r e c t - m a r k e r : T h e m a r k e r m u s t b e p r o v i d e d a n d i t m u s t b e a s i n g l e c h a r a c t e r . " , n u l l ) ; c o n s t i = t . m i n i m u m C h a r a c t e r s | | 0 , o = " f u n c t i o n " = = t y p e o f e ? e . b i n d ( t h i s . e d i t o r ) : Q w ( e ) , r = { w a t c h e r : t h i s . _ s e t u p T e x t W a t c h e r F o r F e e d ( n , i ) , m a r k e r : n , f e e d C a l l b a c k : o , i t e m R e n d e r e r : t . i t e m R e n d e r e r } ; t h i s . _ m e n t i o n s C o n f i g u r a t i o n s . s e t ( n , r ) } } d e s t r o y ( ) { s u p e r . d e s t r o y ( ) , t h i s . _ m e n t i o n s V i e w . d e s t r o y ( ) } s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ o u ] } g e t _ i s U I V i s i b l e ( ) { r e t u r n t h i s . _ b a l l o o n . v i s i b l e V i e w = = = t h i s . _ m e n t i o n s V i e w } _ c r e a t e M e n t i o n V i e w ( ) { c o n s t t = t h i s . e d i t o r . l o c a l e , e = n e w U w ( t ) ; r e t u r n t h i s . _ i t e m s = n e w s o , e . i t e m s . b i n d T o ( t h i s . _ i t e m s ) . u s i n g ( n = > { c o n s t { i t e m : i , m a r k e r : o } = n , r = n e w W w ( t ) , s = t h i s . _ r e n d e r I t e m ( i , o ) ; r e t u r n s . d e l e g a t e ( " e x e c u t e " ) . t o ( r ) , r . c h i l d r e n . a d d ( s ) , r . i t e m = i , r . m a r k e r = o , r . o n ( " e x e c u t e " , ( ) = > { e . f i r e ( " e x e c u t e " , { i t e m : i , m a r k e r : o } ) } ) , r } ) , e . o n ( " e x e c u t e " , ( t , e ) = > { c o n s t n = t h i s . e d i t o r , i = n . m o d e l , o = e . i t e m , r = e . m a r k e r , s = n . m o d e l . m a r k e r s . g e t ( " m e n t i o n " ) , a = i . c r e a t e P o s i t i o n A t ( i . d o c u m e n t . s e l e c t i o n . f o c u s ) , c = i . c r e a t e P o s i t i o n A t ( s . g e t S t a r t ( ) ) , l = i . c r e a t e R a n g e ( c , a ) ; t h i s . _ h i d e U I A n d R e m o v e M a r k e r ( ) , n . e x e c u t e ( " m e n t i o n " , { m e n t i o n : o , t e x t : o . t e x t , m a r k e r : r , r a n g e : l } ) , n . e d i t i n g . v i e w . f o c u s ( ) } ) , e } _ g e t I t e m R e n d e r e r ( t ) { c o n s t { i t e m R e n d e r e r : e } = t h i s . _ m e n t i o n s C o n f i g u r a t i o n s . g e t ( t ) ; r e t u r n e } _ g e t F e e d ( t , e ) { c o n s t { f e e d C a l l b a c k : n } = t h i s . _ m e n t i o n s C o n f i g u r a t i o n s . g e t ( t ) ; r e t u r n P r o m i s e . r e s o l v e ( ) . t h e n ( ( ) = > n ( e ) ) } _ s e t u p T e x t W a t c h e r F o r F e e d ( t , e ) { c o n s t n = t h i s . e d i t o r , i = n e w H w ( n . m o d e l , f u n c t i o n ( t , e ) { c o n s t n = Z w ( t , e ) ; r e t u r n t = > n . t e s t ( t ) } ( t , e ) ) ; r e t u r n i . o n ( " m a t c h e d " , ( e , i ) = > { c o n s t o = n . m o d e l . d o c u m e n t . s e l e c t i o n . f o c u s , r = o . t e x t N o d e & & o . t e x t N o d e . h a s A t t r i b u t e ( " m e n t i o n " ) , s = o . n o d e B e f o r e ; i f ( r | | s & & s . i s ( " t e x t " ) & & s . h a s A t t r i b u t e ( " m e n t i o n " ) ) r e t u r n v o i d t h i s . _ h i d e U I A n d R e m o v e M a r k e r ( ) ; c o n s t a = f u n c t i o n ( t , e ) { c o n s t n = Z w ( t , 0 ) ; r e t u r n e . m a t c h ( n ) [ 2 ] } ( t , i . t e x t ) , c = t . l e n g t h + a . l e n g t h , l = o . g e t S h i f t e d B y ( - c ) , d = o . g e t S h i f t e d B y ( - a . l e n g t h ) , u = n . m o d e l . c r e a t e R a n g e ( l , d ) ; l e t h ; h = n . m o d e l . m a r k e r s . h a s ( " m e n t i o n " ) ? n . m o d e l . m a r k e r s . g e t ( " m e n t i o n " ) : n . m o d e l . c h a n g e ( t = > t . a d d M a r k e r ( " m e n t i o n " , { r a n g e : u , u s i n g O p e r a t i o n : ! 1 , a f f e c t s D a t a : ! 1 } ) ) , t h i s . _ g e t F e e d ( t , a ) . t h e n ( e = > { t h i s . _ i t e m s . c l e a r ( ) ; f o r ( c o n s t n o f e ) { c o n s t e = " o b j e c t " ! = t y p e o f n ? { i d : n , t e x t : n } : n ; t h i s . _ i t e m s . a d d ( { i t e m : e , m a r k e r : t } ) } t h i s . _ i t e m s . l e n g t h ? t h i s . _ s h o w U I ( h ) : t h i s . _ h i d e U I A n d R e m o v e M a r k e r ( ) } ) } ) , i . o n ( " u n m a t c h e d " , ( ) = > { t h i s . _ h i d e U I A n d R e m o v e M a r k e r ( ) } ) , i } _ s h o w U I ( t ) { t h i s . _ i s U I V i s i b l e ? t h i s . _ b a l l o o n . u p d a t e P o s i t i o n ( t h i s . _ g e t B a l l o o n P a n e l P o s i t i o n D a t a ( t , t h i s . _ m e n t i o n s V i e w . p o s i t i o n ) ) : t h i s . _ b a l l o o n . a d d ( { v i e w : t h i s . _ m e n t i o n s V i e w , p o s i t i o n : t h i s . _ g e t B a l l o o n P a n e l P o s i t i o n D a t a ( t , t h i s . _ m e n t i o n s V i e w . p o s i t i o n ) , w i t h A r r o w : ! 1 , s i n g l e V i e w M o d e : ! 0 } ) , t h i s . _ m e n t i o n s V i e w . p o s i t i o n = t h i s . _ b a l l o o n . v i e w . p o s i t i o n , t h i s . _ m e n t i o n s V i e w . s e l e c t F i r s t ( ) } _ h i d e U I A n d R e m o v e M a r k e r ( ) { t h i s . _ b a l l o o n . h a s V i e w ( t h i s . _ m e n t i o n s V i e w ) & & t h i s . _ b a l l o o n . r e m o v e ( t h i s . _ m e n t i o n s V i e w ) , t h i s . e d i t o r . m o d e l . m a r k e r s . h a s ( " m e n t i o n " ) & & t h i s . e d i t o r . m o d e l . c h a n g e ( t = > t . r e m o v e M a r k e r ( " m e n t i o n " ) ) , t h i s . _ m e n t i o n s V i e w . p o s i t i o n = v o i d 0 } _ r e n d e r I t e m ( t , e ) { c o n s t n = t h i s . e d i t o r ; l e t i , o = t . i d ; c o n s t r = t h i s . _ g e t I t e m R e n d e r e r ( e ) ; i f ( r ) { c o n s t e = r ( t ) ; " s t r i n g " ! = t y p e o f e ? i = n e w $ w ( n . l o c a l e , e ) : o = e } i f ( ! i ) { c o n s t t = n e w o d ( n . l o c a l e ) ; t . l a b e l = o , t
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /const Yw=[Vd,class extends yd{static get requires(){return[Hd,Wd,hu]}static get pluginName(){return"OPMacroEmbeddedTable"}static get buttonName(){return Hd.buttonName}},class extends yd{static get requires(){return[mu,Wd,gu]}static get pluginName(){return"OPMacroWpButton"}static get buttonName(){return mu.buttonName}},class extends yd{static get requires(){return[th,Wd,eh]}static get pluginName(){return"OPChildPages"}static get buttonName(){return th.buttonName}}],Xw=[class extends yd{static get requires(){return[ku,Qu]}static get pluginName(){return"OpUploadPlugin"}init(){this.editor.plugins.get("FileRepository").createUploadAdapter=t=>{const e=qd(this.editor);return new vu(t,e,this.editor)}}},class extends yd{static get pluginName(){return"OPAttachmentListener"}init(){this.editor.model.on("op:attachment-removed",(t,e)=>{this.removeDeletedImage(e)})}removeDeletedImage(t){let e=this.editor.model.document.getRoot();for(const n of Array.from(e.getChildren()))if("image"===n.name&&t.indexOf(n.getAttribute("src"))>-1){const t=new na(n,"on");this.editor.model.deleteContent(t)}}}],tk=[class extends yd{static get requires(){return[Lu,sh,dh,Ch,$h]}static get pluginName(){return"Essentials"}},class extends yd{static get requires(){return[ku]}static get pluginName(){return"CKFinderUploadAdapter"}init(){const t=this.editor.config.get("ckfinder.uploadUrl");t&&(this.editor.plugins.get(ku).createUploadAdapter=e=>new Zh(e,t,this.editor.t))}},class extends yd{static get pluginName(){return"Autoformat"}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats()}_addListAutoformats(){const t=this.editor.commands;t.get("bulletedList")&&new Qh(this.editor,/ ^ [ * - ] \ s$ / , "bulletedList" ) , t . get ( "numberedList" ) && new Qh ( this . editor , /^1[.|)]\s$/ , "numberedList" ) } _addBasicStylesAutoformats ( ) { const t = this . editor . commands ; if ( t . get ( "bold" ) ) { const t = ef ( this . editor , "bold" ) ; new Xh ( this . editor , /(\*\*)([^*]+)(\*\*)$/g , t ) , new Xh ( this . editor , /(__)([^_]+)(__)$/g , t ) } if ( t . get ( "italic" ) ) { const t = ef ( this . editor , "italic" ) ; new Xh ( this . editor , /(?:^|[^*])(\*)([^*_]+)(\*)$/g , t ) , new Xh ( this . editor , /(?:^|[^_])(_)([^_]+)(_)$/g , t ) } if ( t . get ( "code" ) ) { const t = ef ( this . editor , "code" ) ; new Xh ( this . editor , /(`)([^`]+)(`)$/g , t ) } } _addHeadingAutoformats ( ) { const t = this . editor . commands . get ( "heading" ) ; t && t . modelElements . filter ( t => t . match ( /^heading[1-6]$/ ) ) . forEach ( e => { const n = e [ 7 ] , i = new RegExp ( ` ^(#{ ${ n } }) \\ s $ ` ) ; new Qh ( this . editor , i , ( ) => { if ( ! t . isEnabled ) return ! 1 ; this . editor . execute ( "heading" , { value : e } ) } ) } ) } _addBlockQuoteAutoformats ( ) { this . editor . commands . get ( "blockQuote" ) && new Qh ( this . editor , /^>\s$/ , "blockQuote" ) } } , class extends yd { static get requires ( ) { return [ rf , cf ] } static get pluginName ( ) { return "Bold" } } , class extends yd { static get requires ( ) { return [ df , ff ] } static get pluginName ( ) { return "Code" } } , class extends yd { static get requires ( ) { return [ _f , xf ] } static get pluginName ( ) { return "Italic" } } , class extends yd { static get requires ( ) { return [ mf , wf ] } static get pluginName ( ) { return "Strikethrough" } } , class extends yd { static get requires ( ) { return [ Sf , If ] } static get pluginName ( ) { return "BlockQuote" } } , class extends yd { static get requires ( ) { return [ zf , jf ] } static get pluginName ( ) { return "Heading" } } , class extends yd { static get requires ( ) { return [ Wf , Wd , sp ] } static get pluginName ( ) { return "Image" } } , class extends yd { static get requires ( ) { return [ lp ] } static get pluginName ( ) { return "ImageCaption" } } , class extends yd { static get requires ( ) { return [ Cp , Ap ] } static get pluginName ( ) { return "ImageStyle" } } , class extends yd { static get requires ( ) { return [ Pp ] } static get pluginName ( ) { return "ImageToolbar" } afterInit ( ) { const t = this . editor , e = t . t ; t . plugins . get ( Pp ) . register ( "image" , { ariaLabel : e ( "b" ) , items : t . config . get ( "image.toolbar" ) || [ ] , getRelatedElement : Hu } ) } } , class extends yd { static get pluginName ( ) { return "OpImageAttachmentLookup" } init ( ) { const t = this . editor , e = t . conversion , n = qd ( t ) ; e . for ( "editingDowncast" ) . add ( function ( t ) { return t => { t . on ( "attribute:src:image" , e , { priority : "highest" } ) } ; function e ( e , n , i ) { let o = n . attributeNewValue ; if ( ! o || ! t . lookupDownloadLocationByName ) re
/ * *
* @ license Copyright ( c ) 2003 - 2017 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md .
* / , c l a s s e x t e n d s y d { s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ k m , T m ] } s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " L i n k " } } , c l a s s e x t e n d s y d { s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ X m , i g ] } s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " L i s t " } } , c l a s s e x t e n d s y d { s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ U b , W b ] } s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " T o d o L i s t " } } , M f , C h , c l a s s e x t e n d s y d { t o M e n t i o n A t t r i b u t e ( t , e ) { r e t u r n B w ( t , e ) } s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " M e n t i o n " } s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ V w , K w ] } } , f u n c t i o n ( t ) { t . c o n v e r s i o n . f o r ( " u p c a s t " ) . e l e m e n t T o A t t r i b u t e ( { v i e w : { n a m e : " a " , k e y : " d a t a - m e n t i o n " , c l a s s e s : " m e n t i o n " , a t t r i b u t e s : { h r e f : ! 0 , " d a t a - u s e r - i d " : ! 0 } } , m o d e l : { k e y : " m e n t i o n " , v a l u e : e = > { r e t u r n t . p l u g i n s . g e t ( " M e n t i o n " ) . t o M e n t i o n A t t r i b u t e ( e , { l i n k : e . g e t A t t r i b u t e ( " h r e f " ) , u s e r I d : e . g e t A t t r i b u t e ( " d a t a - u s e r - i d " ) } ) } } , c o n v e r t e r P r i o r i t y : " h i g h " } ) , t . c o n v e r s i o n . f o r ( " d o w n c a s t " ) . a t t r i b u t e T o E l e m e n t ( { m o d e l : " m e n t i o n " , c o n v e r t e r P r i o r i t y : " h i g h " , v i e w : ( t , e ) = > { i f ( ! t ) r e t u r n ; r e t u r n e . c r e a t e A t t r i b u t e E l e m e n t ( " s p a n " , { c l a s s : " m e n t i o n " , " d a t a - t y p e " : t . t y p e | | " " } ) } } ) } , c l a s s e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " P a s t e F r o m O f f i c e " } s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ L u ] } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = [ ] ; e . p u s h ( n e w N b ) , e . p u s h ( n e w S b ) , t . p l u g i n s . g e t ( " C l i p b o a r d " ) . o n ( " i n p u t T r a n s f o r m a t i o n " , ( t , n ) = > { i f ( n . i s T r a n s f o r m e d W i t h P a s t e F r o m O f f i c e ) r e t u r n ; c o n s t i = n . d a t a T r a n s f e r . g e t D a t a ( " t e x t / h t m l " ) , o = e . f i n d ( t = > t . i s A c t i v e ( i ) ) ; o & & ( o . e x e c u t e ( n ) , n . i s T r a n s f o r m e d W i t h P a s t e F r o m O f f i c e = ! 0 ) } , { p r i o r i t y : " h i g h " } ) } } , c l a s s e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " O P H e l p L i n k P l u g i n " } i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = ( t . m o d e l , t . c o n f i g . g e t ( " o p e n P r o j e c t . h e l p U R L " ) ) ; t . u i . c o m p o n e n t F a c t o r y . a d d ( " o p e n P r o j e c t S h o w F o r m a t t i n g H e l p " , t = > { c o n s t n = n e w o d ( t ) ; r e t u r n n . s e t ( { l a b e l : w i n d o w . I 1 8 n . t ( " j s . i n p l a c e . l i n k _ f o r m a t t i n g _ h e l p " ) , i c o n : o g , t o o l t i p : ! 0 } ) , n . o n ( " e x e c u t e " , ( ) = > { w i n d o w . o p e n ( e , " _ b l a n k " ) } ) , n } ) } } , c l a s s e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " C o d e B l o c k " } s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ f g , p g ] } } , c l a s s e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " O P P r e v i e w " } i n i t ( ) { c o n s t t = t h i s . e d i t o r ; l e t e = ! 1 , n = n u l l ; t . u i . c o m p o n e n t F a c t o r y . a d d ( " p r e v i e w " , i = > { c o n s t o = n e w o d ( i ) ; o . s e t ( { l a b e l : t h i s . l a b e l , i c o n : m g , t o o l t i p : ! 0 } ) ; l e t r = f u n c t i o n ( e ) { l e t i , r = j Q u e r y ( t . u i . g e t E d i t a b l e E l e m e n t ( ) ) . p a r e n t ( ) ; i = r . l e n g t h ? r : $ e d i t a b l e ; l e t s = j Q u e r y ( ' < d i v c l a s s = " c k - e d i t o r _ _ p r e v i e w " > < / d i v > ' ) ; i . s i b l i n g s ( " . c k - e d i t o r _ _ p r e v i e w " ) . r e m o v e ( ) ; c o n s t a = L d ( t , " c k E d i t o r P r e v i e w " ) ; n = a . r e n d e r ( s [ 0 ] , e ) , i . h i d e ( ) , i . a f t e r ( s ) , b g ( t , o ) } , s = f u n c t i o n ( ) { l e t e = f u n c t i o n ( t ) { r e t u r n _ . g e t ( t . c o n f i g , " _ c o n f i g . o p e n P r o j e c t . c o n t e x t . p r e v i e w C o n t e x t " ) } ( t ) , n = j d ( t ) . a p i . v 3 . p r e v i e w M a r k u p ( e ) ; j Q u e r y . a j a x ( { d a t a : t . g e t D a t a ( ) , u r l : n , r e s p o n s e _ t y p e : " t e x t " , c o n t e n t T y p e : " t e x t / p l a i n ; c h a r s e t = U T F - 8 " , m e t h o d : " P O S T " } ) . d o n e ( r ) } ; r e t u r n o . o n ( " e x e c u t e " , ( ) = > { e ? ( e = ! 1 , f u n c t i o n ( ) { l e t e = j Q u e r y ( t . u i . g e t E d i t a b l e E l e m e n t ( ) ) . p a r e n t ( ) ; n ( ) , e . s i b l i n g s ( " . c k - e d i t o r _ _ p r e v i e w " ) . r e m o v e ( ) , e . s h o w ( ) , w g ( t ) } ( ) ) : ( e = ! 0 , s ( ) ) } ) , o } ) } g e t l a b e l ( ) { r e t u r n w i n d o w . I 1 8 n . t ( " j s . e d i t o r . p r e v i e w " ) } } , c l a s s e x t e n d s y d { s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " O P S o u r c e C o d e " } i n i t ( ) { c o n s t t = t h i s . e d i t o r ; l e t e = ! 1 , n = { s o u r c e : w i n d o w . I 1 8 n . t ( " j s . e d i t o r . m o d e . m a n u a l " ) , w y s i w y g : w i n d o w . I 1 8 n . t ( " j s . e d i t o r . m o d e . w y s i w y g " ) } ; t . u i . c o m p o n e n t F a c t o r y . a d d ( " o p S h o w S o u r c e " , i = > { c o n s t o = n e w o d ( i ) ; o . s e t ( { l a b e l : n . s o u r c e , c l a s s : " " , i c o n : D w , t o o l t i p : ! 0 } ) ; r e t u r n o . o n ( " e x e c u t e " , ( ) = > { e ? ( e = ! 1 , f u n c t i o n ( ) { l e t e = j Q u e r y ( t . u i . g e t E d i t a b l e E l e m e n t ( ) ) . p a r e n t ( ) ; t . f i r e ( " o p : s o u r c e - c o d e - d i s a b l e d " ) , e . s i b l i n g s ( " . c k - e d i t o r _ _ s o u r c e " ) . r e m o v e ( ) , e . s h o w ( ) , w g ( t ) , o . s e t ( { l a b e l : n . s o u r c e , c l a s s : " " , i c o n : D w , t o o l t i p : ! 0 } ) } ( ) ) : ( e = ! 0 , f u n c t i o n ( e ) { l e t i , r = j Q u e r y ( t . u i . g e t E d i t a b l e E l e m e n t ( ) ) . p a r e n t ( ) ; i = r . l e n g t h ? r : $ e d i t a b l e ; l e t s = j Q u e r y ( ' < d i v c l a s s = " c k - e d i t o r _ _ s o u r c e " > < / d i v > ' ) ; i . s i b l i n g s ( " . c k - e d i t o r _ _ s o u r c e " ) . r e m o v e ( ) , i . h i d e ( ) , i . a f t e r ( s ) , b g ( t , o ) , t . f i r e ( " o p : s o u r c e - c o d e - e n a b l e d " ) , o . s e t ( { l a b e l : n . w y s i w y g , c l a s s : " - s o u r c e - e n a b l e d " , i c o n : M w , t o o l t i p : ! 0 } ) } ( ) ) } ) , o } ) } } , f u n c t i o n ( t ) { t . d a t a . p r o c e s s o r = n e w O w } , c l a s s e x t e n d s y d { s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ b b , C b , W d ] } s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " T a b l e " } }
/ * *
* @ license Copyright ( c ) 2003 - 2019 , CKSource - Frederico Knabben . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* / , c l a s s e x t e n d s y d { s t a t i c g e t r e q u i r e s ( ) { r e t u r n [ P p ] } s t a t i c g e t p l u g i n N a m e ( ) { r e t u r n " T a b l e T o o l b a r " } a f t e r I n i t ( ) { c o n s t t = t h i s . e d i t o r , e = t . t , n = t . p l u g i n s . g e t ( P p ) , i = t . c o n f i g . g e t ( " t a b l e . c o n t e n t T o o l b a r " ) , o = t . c o n f i g . g e t ( " t a b l e . t a b l e T o o l b a r " ) ; i & & n . r e g i s t e r ( " t a b l e C o n t e n t " , { a r i a L a b e l : e ( " c " ) , i t e m s : i , g e t R e l a t e d E l e m e n t : E g } ) , o & & n . r e g i s t e r ( " t a b l e " , { a r i a L a b e l : e ( " c " ) , i t e m s : o , g e t R e l a t e d E l e m e n t : T g } ) } } , c l a s s e x t e n d s y d { i n i t ( ) { c o n s t t = t h i s . e d i t o r , e = ( t . c o n f i g . g e t ( " r e m o v e P l u g i n s " ) | | [ ] ) . m a p ( t = > t . p l u g i n N a m e ) , n = w i n d o w . I 1 8 n . t ( " j s . e d i t o r . m a c r o . d r o p d o w n . c h o s e _ m a c r o " ) ; ! 0 ! = = t . c o n f i g . g e t ( " o p e n P r o j e c t . d i s a b l e A l l M a c r o s " ) & & t . u i . c o m p o n e n t F a c t o r y . a d d ( " m a c r o L i s t " , i = > { c o n s t o = [ ] ; f o r ( c o n s t n o f Y w ) { i f ( - 1 ! = = e . i n d e x O f ( n . p l u g i n N a m e ) ) c o n t i n u e ; c o n s t i = t . u i . c o m p o n e n t F a c t o r y . c r e a t e ( n . b u t t o n N a m e ) ; o . p u s h ( i ) } c o n s t r = h d ( i ) ; r e t u r n f d ( r , o ) , r . b u t t o n V i e w . s e t ( { i s O n : ! 1 , w i t h T e x t : ! 0 , t o o l t i p : n , l a b e l : w i n d o w . I 1 8 n . t ( " j s . e d i t o r . m a c r o . d r o p d o w n . m a c r o s " ) } ) , r . t o o l b a r V i e w . i s V e r t i c a l = ! 0 , r . t o o l b a r V i e w . c l a s s N a m e = " o p - m a c r o - l i s t - b u t t o n " , r } ) } } ] . c o n c a t ( Y w , X w ) ; f u n c t i o n e k ( t ) { c o n s t e = d o c u m e n t . c r e a t e E l e m e n t ( " s p a n " ) ; r e t u r n e . c l a s s L i s t . a d d ( " m e n t i o n - l i s t - i t e m " ) , e . t e x t C o n t e n t = t . n a m e , e } c o n s t n k = { h e a d i n g : { o p t i o n s : [ { m o d e l : " p a r a g r a p h " , t i t l e : " P a r a g r a p h " , c l a s s : " c k - h e a d i n g _ p a r a g r a p h " } , { m o d e l : " h e a d i n g 1 " , v i e w : " h 1 " , t i t l e : " H e a d i n g 1 " , c l a s s : " c k - h e a d i n g _ h e a d i n g 1 " } , { m o d e l : " h e a d i n g 2 " , v i e w : " h 2 " , t i t l e : " H e a d i n g 2 " , c l a s s : " c k - h e a d i n g _ h e a d i n g 2 " } , { m o d e l : " h e a d i n g 3 " , v i e w : " h 3 " , t i t l e : " H e a d i n g 3 " , c l a s s : " c k - h e a d i n g _ h e a d i n g 3 " } , { m o d e l : " h e a d i n g 4 " , v i e w : " h 4 " , t i t l e : " H e a d i n g 4 " , c l a s s : " c k - h e a d i n g _ h e a d i n g 4 " } , { m o d e l : " h e a d i n g 5 " , v i e w : " h 5 " , t i t l e : " H e a d i n g 5 " , c l a s s : " c k - h e a d i n g _ h e a d i n g 5 " } ] } , t o o l b a r : { } , O P M a c r o E m b e d d e d T a b l e : { t o o l b a r : [ " o p E d i t E m b e d d e d T a b l e Q u e r y " ] } , O P M a c r o W p B u t t o n : { t o o l b a r : [ " o p E d i t W p M a c r o B u t t o n " ] } , O P W i k i I n c l u d e P a g e : { t o o l b a r : [ " o p E d i t W i k i I n c l u d e M a c r o B u t t o n " ] } , O P C o d e B l o c k : { t o o l b a r : [ " o p E d i t C o d e B l o c k " ] } , O P C h i l d P a g e s : { t o o l b a r : [ " o p E d i t C h i l d P a g e s M a c r o B u t t o n " ] } , i m a g e : { t o o l b a r : [ " i m a g e S t y l e : f u l l " , " | " , " i m a g e T e x t A l t e r n a t i v e " ] } , t a b l e : { c o n t e n t T o o l b a r : [ " t a b l e C o l u m n " , " t a b l e R o w " , " m e r g e T a b l e C e l l s " ] } , m e n t i o n : { f e e d s : [ { m a r k e r : " @ " , f e e d : f u n c t i o n ( t ) { l e t e = q d ( t h i s ) ; i f ( ! e | | " W o r k P a c k a g e " ! = = e . _ t y p e ) r e t u r n [ ] ; c o n s t n = e . p r o j e c t . i d F r o m L i n k , i = j d ( t h i s ) . a p i . v 3 . p r i n c i p a l s ( n , t ) ; l e t o = w i n d o w . O p e n P r o j e c t . u r l R o o t + " / u s e r s / " ; r e t u r n n e w P r o m i s e ( ( t , e ) = > { j Q u e r y . g e t J S O N ( i , e = > { t ( e . _ e m b e d d e d . e l e m e n t s . m a p ( t = > { c o n s t e = ` $ { t . _ t y p e . t o L o w e r C a s e ( ) } # $ { t . i d } ` ; r e t u r n { t y p e : " u s e r " , i d : ` @ $ { t . i d } ` , t e x t : e , n a m e : t . n a m e , l i n k : o + t . i d } } ) ) } ) } ) } , i t e m R e n d e r e r : e k , m i n i m u m C h a r a c t e r s : 0 } , { m a r k e r : " # " , f e e d : f u n c t i o n ( t ) { c o n s t e = w i n d o w . O p e n P r o j e c t . u r l R o o t + " / w o r k _ p a c k a g e s / a u t o _ c o m p l e t e . j s o n " ; l e t n = w i n d o w . O p e n P r o j e c t . u r l R o o t + " / w o r k _ p a c k a g e s / " ; r e t u r n n e w P r o m i s e ( ( i , o ) = > { j Q u e r y . g e t J S O N ( e , { q : t , s c o p e : " a l l " } , t = > { i ( t . m a p ( t = > { c o n s t e = ` # $ { t . i d } ` ; r e t u r n { t y p e : " w o r k _ p a c k a g e " , i d : e , t e x t : e , n a m e : t . t o _ s , l i n k : n + t . i d } } ) ) } ) } ) } , i t e m R e n d e r e r : e k , m i n i m u m C h a r a c t e r s : 1 } ] } , l a n g u a g e : " e n " } ; f u n c t i o n i k ( t ) { r e t u r n ( e , n ) = > { c o n s t i = n . o p e n P r o j e c t . c o n t e x t ; n . r e m o v e P l u g i n s = n . r e m o v e P l u g i n s | | [ ] ; c o n s t o = i . r e s o u r c e ; i f ( o & & o . c a n A d d A t t a c h m e n t s | | n . r e m o v e P l u g i n s . p u s h ( . . . X w . m a p ( t = > t . p l u g i n N a m e ) ) , ! 1 = = = i . m a c r o s & & ( n . o p e n P r o j e c t . d i s a b l e A l l M a c r o s = ! 0 , n . r e m o v e P l u g i n s . p u s h ( . . . Y w . m a p ( t = > t . p l u g i n N a m e ) ) ) , A r r a y . i s A r r a y ( i . m a c r o s ) ) { c o n s t t = Y w . f i l t e r ( t = > - 1 = = = i . m a c r o s . i n d e x O f ( t . p l u g i n N a m e ) ) ; n . r e m o v e P l u g i n s . p u s h ( . . . t ) } r e t u r n t . c r e a t e ( e , n ) } } n . d ( e , " C o n s t r a i n e d E d i t o r " , ( f u n c t i o n ( ) { r e t u r n o k } ) ) , n . d ( e , " F u l l E d i t o r " , ( f u n c t i o n ( ) { r e t u r n r k } ) ) ; c l a s s o k e x t e n d s v d { } c l a s s r k e x t e n d s v d { } w i n d o w . O P C o n s t r a i n e d E d i t o r = o k , w i n d o w . O P C l a s s i c E d i t o r = r k , r k . c r e a t e C u s t o m i z e d = i k ( r k ) , r k . b u i l t i n P l u g i n s = t k , r k . d e f a u l t C o n f i g = O b j e c t . a s s i g n ( { } , n k ) , r k . d e f a u l t C o n f i g . t o o l b a r = { i t e m s : [ " h e a d i n g " , " | " , " b o l d " , " i t a l i c " , " s t r i k e t h r o u g h " , " c o d e " , " i n s e r t C o d e B l o c k " , " l i n k " , " b u l l e t e d L i s t " , " n u m b e r e d L i s t " , " t o d o L i s t " , " i m a g e U p l o a d " , " b l o c k Q u o t e " , " | " , " i n s e r t T a b l e " , " m a c r o L i s t " , " | " , " u n d o " , " r e d o " , " o p e n P r o j e c t S h o w F o r m a t t i n g H e l p " , " | " , " p r e v i e w " , " o p S h o w S o u r c e " ] } , o k . c r e a t e C u s t o m i z e d = i k ( o k ) , o k . b u i l t i n P l u g i n s = t k , o k . d e f a u l t C o n f i g = O b j e c t . a s s i g n ( { } , n k ) , o k . d e f a u l t C o n f i g . t o o l b a r = { i t e m s : [ " b o l d " , " i t a l i c " , " s t r i k e t h r o u g h " , " c o d e " , " i n s e r t C o d e B l o c k " , " l i n k " , " b u l l e t e d L i s t " , " n u m b e r e d L i s t " , " t o d o L i s t " , " i m a g e U p l o a d " , " b l o c k Q u o t e " , " | " , " o p e n P r o j e c t S h o w F o r m a t t i n g H e l p " , " p r e
//# sourceMappingURL=ckeditor.js.map