@ -1,4 +1,4 @@
( self [ "webpackChunk" ] = self [ "webpackChunk" ] || [ ] ) . push ( [ [ 39138 ] , {
( self [ "webpackChunk" ] = self [ "webpackChunk" ] || [ ] ) . push ( [ [ 2471 ] , {
/***/ 48712 :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
@ -2987,9 +2987,9 @@ if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
/***/ } ) ,
/***/ 6351 8:
/***/ 88939 :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / _mind - elixir @ 4.3 . 1 @ mind - elixir / dist / MindElixir . js * * * !
! * * * . / node _modules / _mind - elixir @ 4.3 . 3 @ mind - elixir / dist / MindElixir . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _ _ _webpack _module _ _ , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
@ -3013,8 +3013,8 @@ if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
i || ( i = ! 0 , o ( ) ) ;
}
t = function ( ) {
var d , a , p , g ;
( g = document . createElement ( "div" ) ) . innerHTML = c , c = null , ( p = g . getElementsByTagName ( "svg" ) [ 0 ] ) && ( p . setAttribute ( "aria-hidden" , "true" ) , p . style . position = "absolute" , p. style . width = 0 , p . style . height = 0 , p . style . overflow = "hidden" , d = p , ( a = document . body ) . firstChild ? ( g = d , ( p = a . firstChild ) . parentNode . insertBefore ( g , p ) ) : a . appendChild ( d ) ) ;
var d , a , f , g ;
( g = document . createElement ( "div" ) ) . innerHTML = c , c = null , ( f = g . getElementsByTagName ( "svg" ) [ 0 ] ) && ( f . setAttribute ( "aria-hidden" , "true" ) , f . style . position = "absolute" , f. style . width = 0 , f . style . height = 0 , f . style . overflow = "hidden" , d = f , ( a = document . body ) . firstChild ? ( g = d , ( f = a . firstChild ) . parentNode . insertBefore ( g , f ) ) : a . appendChild ( d ) ) ;
} , document . addEventListener ? ~ [ "complete" , "loaded" , "interactive" ] . indexOf ( document . readyState ) ? setTimeout ( t , 0 ) : ( n = function ( ) {
document . removeEventListener ( "DOMContentLoaded" , n , ! 1 ) , t ( ) ;
} , document . addEventListener ( "DOMContentLoaded" , n , ! 1 ) ) : document . attachEvent && ( o = t , s = e . document , i = ! 1 , ( r = function ( ) {
@ -3028,7 +3028,7 @@ if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
s . readyState == "complete" && ( s . onreadystatechange = null , u ( ) ) ;
} ) ;
} ) ( window ) ;
const T = 0 , z = 1 , re = 2 , $e = {
const k = 0 , D = 1 , re = 2 , $e = {
name : "Latte" ,
type : "light" ,
palette : [ "#dd7878" , "#ea76cb" , "#8839ef" , "#e64553" , "#fe640b" , "#df8e1d" , "#40a02b" , "#209fb5" , "#1e66f5" , "#7287fd" ] ,
@ -3071,10 +3071,10 @@ const oe = function(e, t) {
return null ;
} else
return null ;
} , D = ( e , t ) => {
} , $ = ( e , t ) => {
if ( e . parent = t , e . children )
for ( let n = 0 ; n < e . children . length ; n ++ )
D ( e . children [ n ] , e ) ;
$ ( e . children [ n ] , e ) ;
} ;
function he ( e ) {
if ( e . id = X ( ) , e . children )
@ -3117,7 +3117,7 @@ function ue(e) {
} )
) ;
}
const $ = ( e , t ) => {
const O = ( e , t ) => {
let n = 0 , o = 0 ;
for ( ; t && t !== e ; )
n += t . offsetLeft , o += t . offsetTop , t = t . offsetParent ;
@ -3133,7 +3133,7 @@ const $ = (e, t) => {
return ! 1 ;
}
return ! 0 ;
} ) , k = {
} ) , T = {
moved : ! 1 ,
// diffrentiate click and move
mousedown : ! 1 ,
@ -3161,8 +3161,8 @@ function ot(e) {
e . helper2 . clear ( ) ;
return ;
}
if ( k . moved ) {
k . clear ( ) ;
if ( T . moved ) {
T . clear ( ) ;
return ;
}
e . clearSelection ( ) ;
@ -3181,16 +3181,16 @@ function ot(e) {
const n = t . target ;
le ( n ) ? e . beginEdit ( n ) : n . tagName === "text" && ( n . dataset . type === "custom-link" ? e . editArrowLabel ( n . parentElement ) : e . editSummary ( n . parentElement ) ) ;
} ) , e . map . addEventListener ( "mousemove" , ( t ) => {
t . target . contentEditable !== "true" && k . onMove ( t , e . container ) ;
t . target . contentEditable !== "true" && T . onMove ( t , e . container ) ;
} ) , e . map . addEventListener ( "mousedown" , ( t ) => {
const n = e . mouseSelectionButton === 0 ? 2 : 0 ;
t . button === n && t . target . contentEditable !== "true" && ( k. moved = ! 1 , k . mousedown = ! 0 ) ;
t . button === n && t . target . contentEditable !== "true" && ( T. moved = ! 1 , T . mousedown = ! 0 ) ;
} ) , e . map . addEventListener ( "mouseleave" , ( t ) => {
const n = e . mouseSelectionButton === 0 ? 2 : 0 ;
t . button === n && k . clear ( ) ;
t . button === n && T . clear ( ) ;
} ) , e . map . addEventListener ( "mouseup" , ( t ) => {
const n = e . mouseSelectionButton === 0 ? 2 : 0 ;
t . button === n && k . clear ( ) ;
t . button === n && T . clear ( ) ;
} ) ;
}
const st = {
@ -3231,7 +3231,7 @@ const st = {
if ( this . direction === re ) {
let o = 0 , s = 0 ;
n . map ( ( i ) => {
i . direction === T ? o += 1 : i . direction === z ? s += 1 : o <= s ? ( i . direction = T , o += 1 ) : ( i . direction = z , s += 1 ) ;
i . direction === k ? o += 1 : i . direction === D ? s += 1 : o <= s ? ( i . direction = k , o += 1 ) : ( i . direction = D , s += 1 ) ;
} ) ;
}
rt ( this , n , t ) ;
@ -3242,7 +3242,7 @@ const st = {
s . className = "rhs" ;
for ( let i = 0 ; i < t . length ; i ++ ) {
const r = t [ i ] , { grp : c } = e . createWrapper ( r ) ;
e . direction === re ? r . direction === T ? o . appendChild ( c ) : s . appendChild ( c ) : e . direction === T ? o . appendChild ( c ) : s . appendChild ( c ) ;
e . direction === re ? r . direction === k ? o . appendChild ( c ) : s . appendChild ( c ) : e . direction === k ? o . appendChild ( c ) : s . appendChild ( c ) ;
}
e . nodes . appendChild ( o ) , e . nodes . appendChild ( n ) , e . nodes . appendChild ( s ) , e . nodes . appendChild ( e . lines ) ;
} , ct = function ( e , t ) {
@ -3327,7 +3327,7 @@ const ut = function(e) {
margin : $ { o . margin } ;
font : $ { o . font } ;
background - color : $ { o . backgroundColor !== "rgba(0, 0, 0, 0)" && o . backgroundColor } ;
border - radius : $ { o . borderRadius } ; ` , this.direction === T && (t.style.right = "0"), t.focus(), Be(t), this.bus.fire("operation", {
border - radius : $ { o . borderRadius } ; ` , this.direction === k && (t.style.right = "0"), t.focus(), Be(t), this.bus.fire("operation", {
name : "beginEdit" ,
obj : e . nodeObj
} ) , t . addEventListener ( "keydown" , ( s ) => {
@ -3408,13 +3408,13 @@ const ut = function(e) {
const r = this . map . querySelectorAll ( "me-main > me-wrapper" ) ;
this . lines . innerHTML = "" ;
for ( let c = 0 ; c < r . length ; c ++ ) {
const l = r [ c ] , u = l . querySelector ( "me-tpc" ) , { offsetLeft : d , offsetTop : a } = $( this . nodes , u ) , p = u . offsetWidth , g = u . offsetHeight , f = l . parentNode . className , m = this . generateMainBranch ( { pT : n , pL : o , pW : s , pH : i , cT : a , cL : d , cW : p, cH : g , direction : f , containerHeight : this . nodes . offsetHeight } ) , h = this . theme . palette , v = u . nodeObj . branchColor || h [ c % h . length ] ;
const l = r [ c ] , u = l . querySelector ( "me-tpc" ) , { offsetLeft : d , offsetTop : a } = O( this . nodes , u ) , f = u . offsetWidth , g = u . offsetHeight , p = l . parentNode . className , m = this . generateMainBranch ( { pT : n , pL : o , pW : s , pH : i , cT : a , cL : d , cW : f, cH : g , direction : p , containerHeight : this . nodes . offsetHeight } ) , h = this . theme . palette , v = u . nodeObj . branchColor || h [ c % h . length ] ;
u . style . borderColor = v , this . lines . appendChild ( He ( m , v , "3" ) ) ;
const y = l . children [ 0 ] . children [ 1 ] ;
if ( y && ( y . style . top = ( y . parentNode . offsetHeight - y . offsetHeight ) / 2 + "px" , f === "lhs" ? y . style . left = "-10px" : y . style . right = "-10px" ) , e && e !== l )
if ( y && ( y . style . top = ( y . parentNode . offsetHeight - y . offsetHeight ) / 2 + "px" , p === "lhs" ? y . style . left = "-10px" : y . style . right = "-10px" ) , e && e !== l )
continue ;
const b = Y ( "subLines" ) , x = l . lastChild ;
x . tagName === "svg" && x . remove ( ) , l . appendChild ( b ) , Re ( this , b , v , l , f , ! 0 ) ;
x . tagName === "svg" && x . remove ( ) , l . appendChild ( b ) , Re ( this , b , v , l , p , ! 0 ) ;
}
this . renderArrow ( ) , this . renderSummary ( ) , this . bus . fire ( "linkDiv" ) ;
} , Re = function ( e , t , n , o , s , i ) {
@ -3422,10 +3422,10 @@ const ut = function(e) {
if ( c . length === 0 )
return ;
const l = r . offsetTop , u = r . offsetLeft , d = r . offsetWidth , a = r . offsetHeight ;
for ( let p = 0 ; p < c . length ; p ++ ) {
const g = c [ p] , f = g . firstChild , m = f . offsetTop , h = f . offsetLeft , v = f . offsetWidth , y = f . offsetHeight , b = f . firstChild . nodeObj . branchColor || n , x = e . generateSubBranch ( { pT : l , pL : u , pW : d , pH : a , cT : m , cL : h , cW : v , cH : y , direction : s , isFirst : i } ) ;
for ( let f = 0 ; f < c . length ; f ++ ) {
const g = c [ f] , p = g . firstChild , m = p . offsetTop , h = p . offsetLeft , v = p . offsetWidth , y = p . offsetHeight , b = p . firstChild . nodeObj . branchColor || n , x = e . generateSubBranch ( { pT : l , pL : u , pW : d , pH : a , cT : m , cL : h , cW : v , cH : y , direction : s , isFirst : i } ) ;
t . appendChild ( He ( x , b , "2" ) ) ;
const w = f . children [ 1 ] ;
const w = p . children [ 1 ] ;
if ( w ) {
if ( w . style . bottom = - ( w . offsetHeight / 2 ) + "px" , s === "lhs" ? w . style . left = "10px" : s === "rhs" && ( w . style . right = "10px" ) , ! w . expanded )
continue ;
@ -3573,8 +3573,8 @@ function mt(e, t) {
} , o = ( b , x , w ) => {
const S = document . createElement ( "li" ) ;
return S . id = b , S . innerHTML = ` <span> ${ ne ( x ) } </span><span ${ w ? 'class="key"' : "" } > ${ ne ( w ) } </span> ` , S ;
} , s = xe [ e . locale ] ? e . locale : "en" , i = xe [ s ] , r = o ( "cm-add_child" , i . addChild , "Tab" ) , c = o ( "cm-add_parent" , i . addParent , "Ctrl + Enter" ) , l = o ( "cm-add_sibling" , i . addSibling , "Enter" ) , u = o ( "cm-remove_child" , i . removeNode , "Delete" ) , d = o ( "cm-fucus" , i . focus , "" ) , a = o ( "cm-unfucus" , i . cancelFocus , "" ) , p = o ( "cm-up" , i . moveUp , "PgUp" ) , g = o ( "cm-down" , i . moveDown , "Pgdn" ) , f = o ( "cm-link" , i . link , "" ) , m = o ( "cm-summary" , i . summary , "" ) , h = document . createElement ( "ul" ) ;
if ( h . className = "menu-list" , h . appendChild ( r ) , h . appendChild ( c ) , h . appendChild ( l ) , h . appendChild ( u ) , ( ! t || t . focus ) && ( h . appendChild ( d ) , h . appendChild ( a ) ) , h . appendChild ( p ) , h . appendChild ( g ) , h . appendChild ( m ) , ( ! t || t . link ) && h . appendChild ( f ) , t && t . extend )
} , s = xe [ e . locale ] ? e . locale : "en" , i = xe [ s ] , r = o ( "cm-add_child" , i . addChild , "Tab" ) , c = o ( "cm-add_parent" , i . addParent , "Ctrl + Enter" ) , l = o ( "cm-add_sibling" , i . addSibling , "Enter" ) , u = o ( "cm-remove_child" , i . removeNode , "Delete" ) , d = o ( "cm-fucus" , i . focus , "" ) , a = o ( "cm-unfucus" , i . cancelFocus , "" ) , f = o ( "cm-up" , i . moveUp , "PgUp" ) , g = o ( "cm-down" , i . moveDown , "Pgdn" ) , p = o ( "cm-link" , i . link , "" ) , m = o ( "cm-summary" , i . summary , "" ) , h = document . createElement ( "ul" ) ;
if ( h . className = "menu-list" , h . appendChild ( r ) , h . appendChild ( c ) , h . appendChild ( l ) , h . appendChild ( u ) , ( ! t || t . focus ) && ( h . appendChild ( d ) , h . appendChild ( a ) ) , h . appendChild ( f ) , h . appendChild ( g ) , h . appendChild ( m ) , ( ! t || t . link ) && h . appendChild ( p ) , t && t . extend )
for ( let b = 0 ; b < t . extend . length ; b ++ ) {
const x = t . extend [ b ] , w = o ( x . name , x . name , x . key || "" ) ;
h . appendChild ( w ) , w . onclick = ( S ) => {
@ -3589,9 +3589,9 @@ function mt(e, t) {
return ;
const x = b . target ;
if ( le ( x ) ) {
x . parentElement . tagName === "ME-ROOT" ? y = ! 0 : y = ! 1 , y ? ( d . className = "disabled" , p . className = "disabled" , g . className = "disabled" , c . className = "disabled" , l . className = "disabled" , u . className = "disabled" ) : ( d . className = "" , p . className = "" , g . className = "" , c . className = "" , l . className = "" , u . className = "" ) , e . currentNodes || e . selectNode ( x ) , v . hidden = ! 1 , k. mousedown && ( k . mousedown = ! 1 ) , h . style . top = "" , h . style . bottom = "" , h . style . left = "" , h . style . right = "" ;
const w = h . getBoundingClientRect ( ) , S = h . offsetHeight , O = h . offsetWidth , W = b . clientY - w . top , P = b . clientX - w . left ;
S + W > window . innerHeight ? ( h . style . top = "" , h . style . bottom = "0px" ) : ( h . style . bottom = "" , h . style . top = W + 15 + "px" ) , O + P > window . innerWidth ? ( h . style . left = "" , h . style . right = "0px" ) : ( h . style . right = "" , h . style . left = P + 10 + "px" ) ;
x . parentElement . tagName === "ME-ROOT" ? y = ! 0 : y = ! 1 , y ? ( d . className = "disabled" , f . className = "disabled" , g . className = "disabled" , c . className = "disabled" , l . className = "disabled" , u . className = "disabled" ) : ( d . className = "" , f . className = "" , g . className = "" , c . className = "" , l . className = "" , u . className = "" ) , e . currentNodes || e . selectNode ( x ) , v . hidden = ! 1 , T. mousedown && ( T . mousedown = ! 1 ) , h . style . top = "" , h . style . bottom = "" , h . style . left = "" , h . style . right = "" ;
const w = h . getBoundingClientRect ( ) , S = h . offsetHeight , P = h . offsetWidth , W = b . clientY - w . top , B = b . clientX - w . left ;
S + W > window . innerHeight ? ( h . style . top = "" , h . style . bottom = "0px" ) : ( h . style . bottom = "" , h . style . top = W + 15 + "px" ) , P + B > window . innerWidth ? ( h . style . left = "" , h . style . right = "0px" ) : ( h . style . right = "" , h . style . left = B + 10 + "px" ) ;
}
} , v . onclick = ( b ) => {
b . target === v && ( v . hidden = ! 0 ) ;
@ -3607,11 +3607,11 @@ function mt(e, t) {
y || ( e . focusNode ( e . currentNode ) , v . hidden = ! 0 ) ;
} , a . onclick = ( ) => {
e . cancelFocus ( ) , v . hidden = ! 0 ;
} , p . onclick = ( ) => {
} , f . onclick = ( ) => {
y || ( e . moveUpNode ( ) , v . hidden = ! 0 ) ;
} , g . onclick = ( ) => {
y || ( e . moveDownNode ( ) , v . hidden = ! 0 ) ;
} , f . onclick = ( ) => {
} , p . onclick = ( ) => {
v . hidden = ! 0 ;
const b = e . currentNode , x = n ( i . clickTips ) ;
e . container . appendChild ( x ) , e . map . addEventListener (
@ -3628,7 +3628,7 @@ function mt(e, t) {
} , m . onclick = ( ) => {
v . hidden = ! 0 , e . createSummary ( ) , e . unselectNodes ( ) ;
} , ( ) => {
r . onclick = null , c . onclick = null , l . onclick = null , u . onclick = null , d . onclick = null , a . onclick = null , p . onclick = null , g . onclick = null , f . onclick = null , m . onclick = null , v . onclick = null , e . container . oncontextmenu = null ;
r . onclick = null , c . onclick = null , l . onclick = null , u . onclick = null , d . onclick = null , a . onclick = null , f . onclick = null , g . onclick = null , p . onclick = null , m . onclick = null , v . onclick = null , e . container . oncontextmenu = null ;
} ;
}
const gt = ( e ) => {
@ -3790,7 +3790,7 @@ function Ct(e) {
( l = e . currentNodes ) != null && l . includes ( c ) || ( e . unselectNodes ( ) , e . selectNode ( c ) ) , e . currentNodes ? ( t = e . currentNodes , s . innerHTML = e . currentNodes . length + " nodes" ) : ( t = [ c ] , s . innerHTML = c . innerHTML ) ;
for ( const d of t )
d . parentElement . parentElement . style . opacity = "0.5" ;
( u = r . dataTransfer ) == null || u . setDragImage ( s , 0 , 0 ) , k . clear ( ) ;
( u = r . dataTransfer ) == null || u . setDragImage ( s , 0 , 0 ) , T . clear ( ) ;
} ) , e . map . addEventListener ( "dragend" , async ( r ) => {
if ( ! t )
return ;
@ -3936,7 +3936,7 @@ const Fe = (e) => (t, n, o, s = {}) => {
for ( const r of n )
i [ e ] ( r , o , { capture : ! 1 , ... s } ) ;
return [ t , n , o , s ] ;
} , B = Fe ( "addEventListener" ) , L = Fe ( "removeEventListener" ) , Q = ( e ) => {
} , H = Fe ( "addEventListener" ) , L = Fe ( "removeEventListener" ) , Q = ( e ) => {
var t ;
const { clientX : n , clientY : o , target : s } = ( ( t = e . touches ) == null ? void 0 : t [ 0 ] ) ? ? e ;
return { x : n , y : o , target : s } ;
@ -3995,7 +3995,7 @@ function Pt(e, t) {
}
return ! 1 ;
}
const { abs : H , max : _e , min : Me , ceil : ke } = Math , Te = ( e = [ ] ) => ( {
const { abs : z , max : _e , min : Me , ceil : ke } = Math , Te = ( e = [ ] ) => ( {
stored : e ,
selected : [ ] ,
touched : [ ] ,
@ -4062,23 +4062,23 @@ class qe extends jt {
} ) , this . enable ( ) ;
}
_toggleStartEvents ( t = ! 0 ) {
const { document : n , features : o } = this . _options , s = t ? B : L ;
const { document : n , features : o } = this . _options , s = t ? H : L ;
s ( n , "mousedown" , this . _onTapStart ) , o . touch && s ( n , "touchstart" , this . _onTapStart , { passive : ! 1 } ) ;
}
_onTapStart ( t , n = ! 1 ) {
const { x : o , y : s , target : i } = Q ( t ) , { document : r , startAreas : c , boundaries : l , features : u , behaviour : d } = this . _options , a = i . getBoundingClientRect ( ) ;
if ( t instanceof MouseEvent && ! Pt ( t , d . triggers ) )
return ;
const p = F ( c , r ) , g = F ( l , r ) ;
const f = F ( c , r ) , g = F ( l , r ) ;
this . _targetElement = g . find (
( v ) => Se ( v . getBoundingClientRect ( ) , a )
) ;
const f = t . composedPath ( ) , m = p. find ( ( v ) => f . includes ( v ) ) ;
if ( this . _targetBoundary = g . find ( ( v ) => f . includes ( v ) ) , ! this . _targetElement || ! m || ! this . _targetBoundary || ! n && this . _emitEvent ( "beforestart" , t ) === ! 1 )
const p = t . composedPath ( ) , m = f. find ( ( v ) => p . includes ( v ) ) ;
if ( this . _targetBoundary = g . find ( ( v ) => p . includes ( v ) ) , ! this . _targetElement || ! m || ! this . _targetBoundary || ! n && this . _emitEvent ( "beforestart" , t ) === ! 1 )
return ;
this . _areaLocation = { x1 : o , y1 : s , x2 : 0 , y2 : 0 } ;
const h = r . scrollingElement ? ? r . body ;
this . _scrollDelta = { x : h . scrollLeft , y : h . scrollTop } , this . _singleClick = ! 0 , this . clearSelection ( ! 1 , ! 0 ) , B ( r , [ "touchmove" , "mousemove" ] , this . _delayedTapMove , { passive : ! 1 } ) , B ( r , [ "mouseup" , "touchcancel" , "touchend" ] , this . _onTapStop ) , B ( r , "scroll" , this . _onScroll ) , u . deselectOnBlur && ( this . _targetBoundaryScrolled = ! 1 , B ( this . _targetBoundary , "scroll" , this . _onStartAreaScroll ) ) ;
this . _scrollDelta = { x : h . scrollLeft , y : h . scrollTop } , this . _singleClick = ! 0 , this . clearSelection ( ! 1 , ! 0 ) , H ( r , [ "touchmove" , "mousemove" ] , this . _delayedTapMove , { passive : ! 1 } ) , H ( r , [ "mouseup" , "touchcancel" , "touchend" ] , this . _onTapStop ) , H ( r , "scroll" , this . _onScroll ) , u . deselectOnBlur && ( this . _targetBoundaryScrolled = ! 1 , H ( this . _targetBoundary , "scroll" , this . _onStartAreaScroll ) ) ;
}
_onSingleTap ( t ) {
const { singleTap : { intersect : n } , range : o } = this . _options . features , s = Q ( t ) ;
@ -4089,8 +4089,8 @@ class qe extends jt {
this . resolveSelectables ( ) ;
const { x : c , y : l } = s ;
i = this . _selectables . find ( ( u ) => {
const { right : d , left : a , top : p , bottom : g } = u . getBoundingClientRect ( ) ;
return c < d && c > a && l < g && l > p ;
const { right : d , left : a , top : f , bottom : g } = u . getBoundingClientRect ( ) ;
return c < d && c > a && l < g && l > f ;
} ) ;
}
if ( ! i )
@ -4115,14 +4115,14 @@ class qe extends jt {
const { container : n , document : o , behaviour : { startThreshold : s } } = this . _options , { x1 : i , y1 : r } = this . _areaLocation , { x : c , y : l } = Q ( t ) ;
if (
// Single number for both coordinates
typeof s == "number" && H ( c + l - ( i + r ) ) >= s || // Different x and y threshold
typeof s == "object" && H ( c - i ) >= s . x || H ( l - r ) >= s . y
typeof s == "number" && z ( c + l - ( i + r ) ) >= s || // Different x and y threshold
typeof s == "object" && z ( c - i ) >= s . x || z ( l - r ) >= s . y
) {
if ( L ( o , [ "mousemove" , "touchmove" ] , this . _delayedTapMove , { passive : ! 1 } ) , this . _emitEvent ( "beforedrag" , t ) === ! 1 ) {
L ( o , [ "mouseup" , "touchcancel" , "touchend" ] , this . _onTapStop ) ;
return ;
}
B ( o , [ "mousemove" , "touchmove" ] , this . _onTapMove , { passive : ! 1 } ) , j ( this . _area , "display" , "block" ) , F ( n , o ) [ 0 ] . appendChild ( this . _clippingElement ) , this . resolveSelectables ( ) , this . _singleClick = ! 1 , this . _targetRect = this . _targetElement . getBoundingClientRect ( ) , this . _scrollAvailable = this . _targetElement . scrollHeight !== this . _targetElement . clientHeight || this . _targetElement . scrollWidth !== this . _targetElement . clientWidth , this . _scrollAvailable && ( B ( this . _targetElement , "wheel" , this . _manualScroll , { passive : ! 1 } ) , this . _selectables = this . _selectables . filter ( ( u ) => this . _targetElement . contains ( u ) ) ) , this . _setupSelectionArea ( ) , this . _emitEvent ( "start" , t ) , this . _onTapMove ( t ) ;
H ( o , [ "mousemove" , "touchmove" ] , this . _onTapMove , { passive : ! 1 } ) , j ( this . _area , "display" , "block" ) , F ( n , o ) [ 0 ] . appendChild ( this . _clippingElement ) , this . resolveSelectables ( ) , this . _singleClick = ! 1 , this . _targetRect = this . _targetElement . getBoundingClientRect ( ) , this . _scrollAvailable = this . _targetElement . scrollHeight !== this . _targetElement . clientHeight || this . _targetElement . scrollWidth !== this . _targetElement . clientWidth , this . _scrollAvailable && ( H ( this . _targetElement , "wheel" , this . _manualScroll , { passive : ! 1 } ) , this . _selectables = this . _selectables . filter ( ( u ) => this . _targetElement . contains ( u ) ) ) , this . _setupSelectionArea ( ) , this . _emitEvent ( "start" , t ) , this . _onTapMove ( t ) ;
}
this . _handleMoveEvent ( t ) ;
}
@ -4155,8 +4155,8 @@ class qe extends jt {
this . _scrollingActive = ! 1 ;
return ;
}
const { scrollTop : a , scrollLeft : p } = c ;
n . y && ( c . scrollTop += ke ( n . y / r ) , o . y1 -= c . scrollTop - a ) , n . x && ( c . scrollLeft += ke ( n . x / r ) , o . x1 -= c . scrollLeft - p ) , i . next ( t ) , requestAnimationFrame ( d ) ;
const { scrollTop : a , scrollLeft : f } = c ;
n . y && ( c . scrollTop += ke ( n . y / r ) , o . y1 -= c . scrollTop - a ) , n . x && ( c . scrollLeft += ke ( n . x / r ) , o . x1 -= c . scrollLeft - f ) , i . next ( t ) , requestAnimationFrame ( d ) ;
} ;
requestAnimationFrame ( d ) ;
} else
@ -4179,11 +4179,11 @@ class qe extends jt {
this . _scrollSpeed . y += o * n , this . _scrollSpeed . x += s * n , this . _onTapMove ( t ) , t . preventDefault ( ) ;
}
_recalculateSelectionAreaRect ( ) {
const { _scrollSpeed : t , _areaLocation : n , _targetElement : o , _options : s } = this , { scrollTop : i , scrollHeight : r , clientHeight : c , scrollLeft : l , scrollWidth : u , clientWidth : d } = o , a = this . _targetRect , { x1 : p , y1 : g } = n ;
let { x2 : f , y2 : m } = n ;
const { _scrollSpeed : t , _areaLocation : n , _targetElement : o , _options : s } = this , { scrollTop : i , scrollHeight : r , clientHeight : c , scrollLeft : l , scrollWidth : u , clientWidth : d } = o , a = this . _targetRect , { x1 : f , y1 : g } = n ;
let { x2 : p , y2 : m } = n ;
const { behaviour : { scrolling : { startScrollMargins : h } } } = s ;
f < a . left + h . x ? ( t . x = l ? - H( a . left - f + h . x ) : 0 , f = f < a . left ? a . left : f) : f > a . right - h . x ? ( t . x = u - l - d ? H ( a . left + a . width - f - h . x ) : 0 , f = f > a . right ? a . right : f ) : t . x = 0 , m < a . top + h . y ? ( t . y = i ? - H ( a . top - m + h . y ) : 0 , m = m < a . top ? a . top : m ) : m > a . bottom - h . y ? ( t . y = r - i - c ? H ( a . top + a . height - m - h . y ) : 0 , m = m > a . bottom ? a . bottom : m ) : t . y = 0 ;
const v = Me ( p, f ) , y = Me ( g , m ) , b = _e ( p, f ) , x = _e ( g , m ) ;
p < a . left + h . x ? ( t . x = l ? - z( a . left - p + h . x ) : 0 , p = p < a . left ? a . left : p) : p > a . right - h . x ? ( t . x = u - l - d ? z ( a . left + a . width - p - h . x ) : 0 , p = p > a . right ? a . right : p ) : t . x = 0 , m < a . top + h . y ? ( t . y = i ? - z ( a . top - m + h . y ) : 0 , m = m < a . top ? a . top : m ) : m > a . bottom - h . y ? ( t . y = r - i - c ? z ( a . top + a . height - m - h . y ) : 0 , m = m > a . bottom ? a . bottom : m ) : t . y = 0 ;
const v = Me ( f, p ) , y = Me ( g , m ) , b = _e ( f, p ) , x = _e ( g , m ) ;
this . _areaRect = new DOMRect ( v , y , b - v , x - y ) ;
}
_redrawSelectionArea ( ) {
@ -4196,7 +4196,7 @@ class qe extends jt {
L ( this . _targetElement , "scroll" , this . _onStartAreaScroll ) , L ( s , [ "mousemove" , "touchmove" ] , this . _delayedTapMove ) , L ( s , [ "touchmove" , "mousemove" ] , this . _onTapMove ) , L ( s , [ "mouseup" , "touchcancel" , "touchend" ] , this . _onTapStop ) , L ( s , "scroll" , this . _onScroll ) , this . _keepSelection ( ) , t && r && i . singleTap . allow ? this . _onSingleTap ( t ) : ! r && ! n && ( this . _updateElementSelection ( ) , this . _emitEvent ( "stop" , t ) ) , this . _scrollSpeed . x = 0 , this . _scrollSpeed . y = 0 , L ( this . _targetElement , "wheel" , this . _manualScroll , { passive : ! 0 } ) , this . _clippingElement . remove ( ) , ( o = this . _frame ) == null || o . cancel ( ) , j ( this . _area , "display" , "none" ) ;
}
_updateElementSelection ( ) {
const { _selectables : t , _options : n , _selection : o , _areaRect : s } = this , { stored : i , selected : r , touched : c } = o , { intersect : l , overlap : u } = n . behaviour , d = u === "invert" , a = [ ] , p = [ ] , g = [ ] ;
const { _selectables : t , _options : n , _selection : o , _areaRect : s } = this , { stored : i , selected : r , touched : c } = o , { intersect : l , overlap : u } = n . behaviour , d = u === "invert" , a = [ ] , f = [ ] , g = [ ] ;
for ( let m = 0 ; m < t . length ; m ++ ) {
const h = t [ m ] ;
if ( Se ( s , h . getBoundingClientRect ( ) , l ) ) {
@ -4206,19 +4206,19 @@ class qe extends jt {
g . push ( h ) ;
continue ;
} else
p . push ( h ) ;
f . push ( h ) ;
a . push ( h ) ;
}
}
d && p . push ( ... i . filter ( ( m ) => ! r . includes ( m ) ) ) ;
const f = u === "keep" ;
d && f . push ( ... i . filter ( ( m ) => ! r . includes ( m ) ) ) ;
const p = u === "keep" ;
for ( let m = 0 ; m < r . length ; m ++ ) {
const h = r [ m ] ;
! a . includes ( h ) && ! // Check if the user wants to keep previously selected elements, e.g.,
// not make them part of the current selection as soon as they're touched.
( f && i . includes ( h ) ) && g . push ( h ) ;
( p && i . includes ( h ) ) && g . push ( h ) ;
}
o . selected = a , o . changed = { added : p , removed : g } , this . _latestElement = void 0 ;
o . selected = a , o . changed = { added : f , removed : g } , this . _latestElement = void 0 ;
}
_emitEvent ( t , n ) {
return this . emit ( t , {
@ -4368,7 +4368,7 @@ function Bt(e) {
changed : { added : o , removed : s }
}
} ) => {
k . moved = ! 0 ;
T . moved = ! 0 ;
for ( const i of o )
i . classList . add ( "selected" ) ;
for ( const i of s )
@ -4432,13 +4432,13 @@ function Ie(e, t, n) {
}
const It = function ( e , t ) {
var n , o ;
if ( e === T )
return T ;
if ( e === z )
return z ;
if ( e === k )
return k ;
if ( e === D )
return D ;
if ( e === re ) {
const s = ( ( n = document . querySelector ( ".lhs" ) ) == null ? void 0 : n . childElementCount ) || 0 , i = ( ( o = document . querySelector ( ".rhs" ) ) == null ? void 0 : o . childElementCount ) || 0 ;
return s <= i ? ( t . direction = T, T ) : ( t . direction = z , z ) ;
return s <= i ? ( t . direction = k, k ) : ( t . direction = D , D ) ;
}
} , Ke = function ( e , t , n ) {
var i , r ;
@ -4452,7 +4452,7 @@ const It = function(e, t) {
}
e . linkDiv ( n . offsetParent ) ;
} else
s . tagName === "ME-ROOT" && ( It ( e . direction , o . nodeObj ) === T ? ( i = e . container . querySelector ( ".lhs" ) ) == null || i . appendChild ( n ) : ( r = e . container . querySelector ( ".rhs" ) ) == null || r . appendChild ( n ) , e . linkDiv ( ) ) ;
s . tagName === "ME-ROOT" && ( It ( e . direction , o . nodeObj ) === k ? ( i = e . container . querySelector ( ".lhs" ) ) == null || i . appendChild ( n ) : ( r = e . container . querySelector ( ".rhs" ) ) == null || r . appendChild ( n ) , e . linkDiv ( ) ) ;
} , Ve = function ( e , t ) {
const n = e . parentNode ;
if ( t === 0 ) {
@ -4481,11 +4481,11 @@ const It = function(e, t) {
const o = t . nodeObj ;
o . expanded === ! 1 && ( e . expandNode ( t , ! 0 ) , t = C ( o . id ) ) ;
const s = n || e . generateNewObj ( ) ;
o . children ? o . children . push ( s ) : o . children = [ s ] , D ( e . nodeData ) ;
o . children ? o . children . push ( s ) : o . children = [ s ] , $ ( e . nodeData ) ;
const { grp : i , top : r } = e . createWrapper ( s ) ;
return Ke ( e , t , i ) , { newTop : r , newNodeObj : s } ;
} , Vt = function ( e , t , n ) {
var u , d , a ;
var u , d , a , f ;
const o = t || this . currentNode ;
if ( ! o )
return ;
@ -4500,7 +4500,11 @@ const It = function(e, t) {
return ;
}
const i = n || this . generateNewObj ( ) ;
Ft ( i , e , s ) , D ( this . nodeData ) ;
if ( ! ( ( f = s . parent ) != null && f . parent ) ) {
const g = o . offsetParent . offsetParent . parentElement . className === "lhs" ? k : D ;
i . direction = g ;
}
Ft ( i , e , s ) , $ ( this . nodeData ) ;
const r = o . parentElement , { grp : c , top : l } = this . createWrapper ( i ) ;
r . parentElement . insertAdjacentElement ( We [ e ] , c ) , this . linkDiv ( c . offsetParent ) , n || this . editTopic ( l . firstChild ) , this . selectNode ( l . firstChild , ! 0 ) , this . bus . fire ( "operation" , {
name : "insertSibling" ,
@ -4516,7 +4520,7 @@ const It = function(e, t) {
if ( ! o . parent )
return ;
const s = t || this . generateNewObj ( ) ;
qt ( o , s ) , D ( this . nodeData ) ;
qt ( o , s ) , $ ( this . nodeData ) ;
const i = n . parentElement . parentElement , { grp : r , top : c } = this . createWrapper ( s , ! 0 ) ;
c . appendChild ( pe ( ! 0 ) ) , i . insertAdjacentElement ( "afterend" , r ) ;
const l = this . createChildren ( [ i ] ) ;
@ -4624,7 +4628,7 @@ const It = function(e, t) {
n . expanded === ! 1 && ( this . expandNode ( t , ! 0 ) , t = C ( n . id ) ) ;
for ( const o of e ) {
const s = o . nodeObj ;
Ie ( "in" , s , n ) , D ( this . nodeData ) ;
Ie ( "in" , s , n ) , $ ( this . nodeData ) ;
const i = o . parentElement ;
Ke ( this , t , i . parentElement ) ;
}
@ -4638,7 +4642,7 @@ const It = function(e, t) {
const s = n . nodeObj ;
for ( const i of e ) {
const r = i . nodeObj ;
Ie ( t , r , s ) , D ( o . nodeData ) , G ( i ) ;
Ie ( t , r , s ) , $ ( o . nodeData ) , G ( i ) ;
const c = i . parentElement . parentNode ;
n . parentElement . parentNode . insertAdjacentElement ( We [ t ] , c ) ;
}
@ -4765,7 +4769,7 @@ const rn = function(e, t, n) {
o . parentNode . children [ 1 ] . remove ( ) ;
this . linkDiv ( ) , this . bus . fire ( "expandNode" , n ) ;
} , _n = function ( e ) {
e && ( e = JSON . parse ( JSON . stringify ( e ) ) , this . nodeData = e . nodeData , this . arrows = e . arrows || [ ] , this . summaries = e . summaries || [ ] ) , D ( this . nodeData ) , this . layout ( ) , this . linkDiv ( ) ;
e && ( e = JSON . parse ( JSON . stringify ( e ) ) , this . nodeData = e . nodeData , this . arrows = e . arrows || [ ] , this . summaries = e . summaries || [ ] ) , $ ( this . nodeData ) , this . layout ( ) , this . linkDiv ( ) ;
} , Mn = /* @__PURE__ */ Object . freeze ( /* @__PURE__ */ Object . defineProperty ( {
_ _proto _ _ : null ,
cancelFocus : xn ,
@ -4819,7 +4823,7 @@ const rn = function(e, t, n) {
create : kn
} ;
function ie ( e , t , n ) {
const { offsetLeft : o , offsetTop : s } = $ ( e . nodes , t ) , i = t . offsetWidth , r = t . offsetHeight , c = o + i / 2 , l = s + r / 2 , u = c + n . x , d = l + n . y ;
const { offsetLeft : o , offsetTop : s } = O ( e . nodes , t ) , i = t . offsetWidth , r = t . offsetHeight , c = o + i / 2 , l = s + r / 2 , u = c + n . x , d = l + n . y ;
return {
w : i ,
h : r ,
@ -4849,10 +4853,10 @@ const Tn = function(e, t, n, o) {
if ( ! t || ! n )
return ;
performance . now ( ) ;
const i = ie ( e , t , o . delta1 ) , r = ie ( e , n , o . delta2 ) , { x : c , y : l } = q ( i ) , { ctrlX : u , ctrlY : d } = i , { ctrlX : a , ctrlY : p } = r , { x : g , y : f } = q ( r ) , m = Pe ( a , p, g , f ) , h = ft (
` M ${ c } ${ l } C ${ u } ${ d } ${ a } ${ p} ${ g } ${ f } ` ,
` M ${ m . x1 } ${ m . y1 } L ${ g } ${ f } L ${ m . x2 } ${ m . y2 } `
) , v = c / 8 + u * 3 / 8 + a * 3 / 8 + g / 8 , y = l / 8 + d * 3 / 8 + p * 3 / 8 + f / 8 , b = Tn ( o . label , v , y , e . theme . cssVar [ "--color" ] ) ;
const i = ie ( e , t , o . delta1 ) , r = ie ( e , n , o . delta2 ) , { x : c , y : l } = q ( i ) , { ctrlX : u , ctrlY : d } = i , { ctrlX : a , ctrlY : f } = r , { x : g , y : p } = q ( r ) , m = Pe ( a , f, g , p ) , h = ft (
` M ${ c } ${ l } C ${ u } ${ d } ${ a } ${ f} ${ g } ${ p } ` ,
` M ${ m . x1 } ${ m . y1 } L ${ g } ${ p } L ${ m . x2 } ${ m . y2 } `
) , v = c / 8 + u * 3 / 8 + a * 3 / 8 + g / 8 , y = l / 8 + d * 3 / 8 + f * 3 / 8 + p / 8 , b = Tn ( o . label , v , y , e . theme . cssVar [ "--color" ] ) ;
h . appendChild ( b ) , h . arrowObj = o , h . dataset . linkid = o . id , e . linkSvgGroup . appendChild ( h ) , s || ( e . arrows . push ( o ) , e . currentArrow = h , Ze ( e , o , i , r ) ) , performance . now ( ) ;
} , Ln = function ( e , t ) {
const n = {
@ -4894,7 +4898,7 @@ const Tn = function(e, t, n, o) {
} , Je = function ( e ) {
e . linkController . style . display = "none" , e . P2 . style . display = "none" , e . P3 . style . display = "none" ;
} , Ze = function ( e , t , n , o ) {
var p ;
var f ;
e . linkController . style . display = "initial" , e . P2 . style . display = "initial" , e . P3 . style . display = "initial" , e . nodes . appendChild ( e . linkController ) , e . nodes . appendChild ( e . P2 ) , e . nodes . appendChild ( e . P3 ) ;
let { x : s , y : i } = q ( n ) , { ctrlX : r , ctrlY : c } = n , { ctrlX : l , ctrlY : u } = o , { x : d , y : a } = q ( o ) ;
e . P2 . style . cssText = ` top: ${ c } px;left: ${ r } px; ` , e . P3 . style . cssText = ` top: ${ u } px;left: ${ l } px; ` , N ( e . line1 , {
@ -4907,9 +4911,9 @@ const Tn = function(e, t, n, o) {
y1 : u + "" ,
x2 : d + "" ,
y2 : a + ""
} ) , e . helper1 && ( e . helper1 . destory ( e . map ) , ( p = e . helper2 ) == null || p . destory ( e . map ) ) , e . helper1 = Le . create ( e . P2 ) , e . helper2 = Le . create ( e . P3 ) , e . helper1 . init ( e . map , ( g , f ) => {
} ) , e . helper1 && ( e . helper1 . destory ( e . map ) , ( f = e . helper2 ) == null || f . destory ( e . map ) ) , e . helper1 = Le . create ( e . P2 ) , e . helper2 = Le . create ( e . P3 ) , e . helper1 . init ( e . map , ( g , p ) => {
var y ;
r = r + g / e . scaleVal , c = c + f / e . scaleVal ;
r = r + g / e . scaleVal , c = c + p / e . scaleVal ;
const m = q ( { ... n , ctrlX : r , ctrlY : c } ) ;
s = m . x , i = m . y ;
const h = s / 8 + r * 3 / 8 + l * 3 / 8 + d / 8 , v = i / 8 + c * 3 / 8 + u * 3 / 8 + a / 8 ;
@ -4922,9 +4926,9 @@ const Tn = function(e, t, n, o) {
x2 : r + "" ,
y2 : c + ""
} ) , t . delta1 . x = r - n . cx , t . delta1 . y = c - n . cy ;
} ) , e . helper2 . init ( e . map , ( g , f ) => {
} ) , e . helper2 . init ( e . map , ( g , p ) => {
var b , x ;
l = l + g / e . scaleVal , u = u + f / e . scaleVal ;
l = l + g / e . scaleVal , u = u + p / e . scaleVal ;
const m = q ( { ... o , ctrlX : l , ctrlY : u } ) ;
d = m . x , a = m . y ;
const h = s / 8 + r * 3 / 8 + l * 3 / 8 + d / 8 , v = i / 8 + c * 3 / 8 + u * 3 / 8 + a / 8 , y = Pe ( l , u , d , a ) ;
@ -4983,22 +4987,22 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
const d = e [ 0 ] . nodeObj , a = e [ 0 ] . nodeObj . parent ;
if ( ! a )
throw new Error ( "Can not select root node." ) ;
const p = a . children . findIndex ( ( g ) => d === g ) ;
const f = a . children . findIndex ( ( g ) => d === g ) ;
return {
parent : a . id ,
start : p ,
end : p
start : f ,
end : f
} ;
}
let t = 0 ;
const n = e . map ( ( d ) => {
let a = d . nodeObj ;
const p = [ ] ;
const f = [ ] ;
for ( ; a . parent ; ) {
const g = a . parent , f = g . children , m = f == null ? void 0 : f . indexOf ( a ) ;
a = g , p . unshift ( { node : a , index : m } ) ;
const g = a . parent , p = g . children , m = p == null ? void 0 : p . indexOf ( a ) ;
a = g , f . unshift ( { node : a , index : m } ) ;
}
return p . length > t && ( t = p. length ) , p ;
return f . length > t && ( t = f. length ) , f ;
} ) ;
let o = 0 ;
e :
@ -5046,17 +5050,17 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
} , Qe = function ( e , t ) {
var S ;
const { id : n , text : o , parent : s , start : i , end : r } = t , c = e . nodes , u = C ( s ) . nodeObj , d = Fn ( t ) ;
let a = 1 / 0 , p = 0 , g = 0 , f = 0 ;
for ( let O = i ; O <= r ; O ++ ) {
const W = ( S = u . children ) == null ? void 0 : S [ O ] ;
let a = 1 / 0 , f = 0 , g = 0 , p = 0 ;
for ( let P = i ; P <= r ; P ++ ) {
const W = ( S = u . children ) == null ? void 0 : S [ P ] ;
if ( ! W )
return e . removeSummary ( n ) , null ;
const P = Rn ( W . id ) , { offsetLeft : J , offsetTop : ve } = $( c , P ) ;
O === i && ( g = ve + 20 ) , O === r && ( f = ve + P . offsetHeight - 20 ) , J < a && ( a = J ) , P. offsetWidth + J > p && ( p = P . offsetWidth + J ) ;
const B = Rn ( W . id ) , { offsetLeft : J , offsetTop : ve } = O( c , B ) ;
P === i && ( g = ve + 20 ) , P === r && ( p = ve + B . offsetHeight - 20 ) , J < a && ( a = J ) , B. offsetWidth + J > f && ( f = B . offsetWidth + J ) ;
}
let m , h ;
const v = g + 10 , y = f + 10 , b = ( v + y ) / 2 , x = e . theme . cssVar [ "--color" ] ;
d === "lhs" ? ( m = Ae ( ` M ${ a + 10 } ${ v } c -5 0 -10 5 -10 10 L ${ a } ${ y - 10 } c 0 5 5 10 10 10 M ${ a } ${ b } h -10 ` , x ) , h = je ( o , a - 20 , b + 6 , "end" , x ) ) : ( m = Ae ( ` M ${ p - 10 } ${ v } c 5 0 10 5 10 10 L ${ p } ${ y - 10 } c 0 5 -5 10 -10 10 M ${ p } ${ b } h 10 ` , x ) , h = je ( o , p + 20 , b + 6 , "start" , x ) ) ;
const v = g + 10 , y = p + 10 , b = ( v + y ) / 2 , x = e . theme . cssVar [ "--color" ] ;
d === "lhs" ? ( m = Ae ( ` M ${ a + 10 } ${ v } c -5 0 -10 5 -10 10 L ${ a } ${ y - 10 } c 0 5 5 10 10 10 M ${ a } ${ b } h -10 ` , x ) , h = je ( o , a - 20 , b + 6 , "end" , x ) ) : ( m = Ae ( ` M ${ f - 10 } ${ v } c 5 0 10 5 10 10 L ${ f } ${ y - 10 } c 0 5 -5 10 -10 10 M ${ f } ${ b } h 10 ` , x ) , h = je ( o , f + 20 , b + 6 , "start" , x ) ) ;
const w = zn ( "s-" + n ) ;
return w . appendChild ( m ) , w . appendChild ( h ) , w . summaryObj = t , e . summarySvg . appendChild ( w ) , w ;
} , qn = function ( ) {
@ -5164,7 +5168,7 @@ function Zn(e, t, n, o) {
} ) , r . innerHTML = s , i . appendChild ( r ) , i ;
}
function Qn ( e , t ) {
const n = getComputedStyle ( t ) , { offsetLeft : o , offsetTop : s } = $ ( e . nodes , t ) , i = document . createElementNS ( M , "rect" ) ;
const n = getComputedStyle ( t ) , { offsetLeft : o , offsetTop : s } = O ( e . nodes , t ) , i = document . createElementNS ( M , "rect" ) ;
return N ( i , {
x : o + "" ,
y : s + "" ,
@ -5178,7 +5182,7 @@ function Qn(e, t) {
} ) , i ;
}
function ee ( e , t , n = ! 1 ) {
const o = getComputedStyle ( t ) , { offsetLeft : s , offsetTop : i } = $ ( e . nodes , t ) , r = document . createElementNS ( M , "rect" ) ;
const o = getComputedStyle ( t ) , { offsetLeft : s , offsetTop : i } = O ( e . nodes , t ) , r = document . createElementNS ( M , "rect" ) ;
N ( r , {
x : s + "" ,
y : i + "" ,
@ -5196,7 +5200,7 @@ function ee(e, t, n = !1) {
return n ? l = Zn ( t , o , s , i ) : l = Jn ( t , o , s , i ) , c . appendChild ( l ) , c ;
}
function eo ( e , t ) {
const n = getComputedStyle ( t ) , { offsetLeft : o , offsetTop : s } = $ ( e . nodes , t ) , i = document . createElementNS ( M , "a" ) , r = document . createElementNS ( M , "text" ) ;
const n = getComputedStyle ( t ) , { offsetLeft : o , offsetTop : s } = O ( e . nodes , t ) , i = document . createElementNS ( M , "a" ) , r = document . createElementNS ( M , "text" ) ;
return N ( r , {
x : o + "" ,
y : s + parseInt ( n . fontSize ) + "" ,
@ -5208,7 +5212,7 @@ function eo(e, t) {
} ) , r . innerHTML = t . textContent , i . appendChild ( r ) , i . setAttribute ( "href" , t . href ) , i ;
}
function to ( e , t ) {
const n = getComputedStyle ( t ) , { offsetLeft : o , offsetTop : s } = $ ( e . nodes , t ) , i = document . createElementNS ( M , "image" ) ;
const n = getComputedStyle ( t ) , { offsetLeft : o , offsetTop : s } = O ( e . nodes , t ) , i = document . createElementNS ( M , "image" ) ;
return N ( i , {
x : o + "" ,
y : s + "" ,
@ -5218,7 +5222,7 @@ function to(e, t) {
} ) , i ;
}
const te = 100 , no = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' , oo = ( e , t = ! 1 ) => {
var a , p , g ;
var a , f , g ;
const n = e . nodes , o = n . offsetHeight + te * 2 , s = n . offsetWidth + te * 2 , i = Xn ( o + "px" , s + "px" ) , r = document . createElementNS ( M , "svg" ) , c = document . createElementNS ( M , "rect" ) ;
N ( c , {
x : "0" ,
@ -5226,25 +5230,25 @@ const te = 100, no = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC
width : ` ${ s } ` ,
height : ` ${ o } ` ,
fill : e . theme . cssVar [ "--bgcolor" ]
} ) , i . appendChild ( c ) , n . querySelectorAll ( ".subLines" ) . forEach ( ( f ) => {
const m = f . cloneNode ( ! 0 ) , { offsetLeft : h , offsetTop : v } = $( n , f . parentElement ) ;
} ) , i . appendChild ( c ) , n . querySelectorAll ( ".subLines" ) . forEach ( ( p ) => {
const m = p . cloneNode ( ! 0 ) , { offsetLeft : h , offsetTop : v } = O( n , p . parentElement ) ;
m . setAttribute ( "x" , ` ${ h } ` ) , m . setAttribute ( "y" , ` ${ v } ` ) , r . appendChild ( m ) ;
} ) ;
const l = ( a = n . querySelector ( ".lines" ) ) == null ? void 0 : a . cloneNode ( ! 0 ) ;
l && r . appendChild ( l ) ;
const u = ( p = n . querySelector ( ".topiclinks" ) ) == null ? void 0 : p . cloneNode ( ! 0 ) ;
const u = ( f = n . querySelector ( ".topiclinks" ) ) == null ? void 0 : f . cloneNode ( ! 0 ) ;
u && r . appendChild ( u ) ;
const d = ( g = n . querySelector ( ".summary" ) ) == null ? void 0 : g . cloneNode ( ! 0 ) ;
return d && r . appendChild ( d ) , n . querySelectorAll ( "me-tpc" ) . forEach ( ( f ) => {
f . nodeObj . dangerouslySetInnerHTML ? r . appendChild ( ee ( e , f , ! t ) ) : ( r . appendChild ( Qn ( e , f ) ) , r . appendChild ( ee ( e , f . text , ! t ) ) ) ;
} ) , n . querySelectorAll ( ".tags > span" ) . forEach ( ( f ) => {
r . appendChild ( ee ( e , f ) ) ;
} ) , n . querySelectorAll ( ".icons > span" ) . forEach ( ( f ) => {
r . appendChild ( ee ( e , f ) ) ;
} ) , n . querySelectorAll ( ".hyper-link" ) . forEach ( ( f ) => {
r . appendChild ( eo ( e , f ) ) ;
} ) , n . querySelectorAll ( "img" ) . forEach ( ( f ) => {
r . appendChild ( to ( e , f ) ) ;
return d && r . appendChild ( d ) , n . querySelectorAll ( "me-tpc" ) . forEach ( ( p ) => {
p . nodeObj . dangerouslySetInnerHTML ? r . appendChild ( ee ( e , p , ! t ) ) : ( r . appendChild ( Qn ( e , p ) ) , r . appendChild ( ee ( e , p . text , ! t ) ) ) ;
} ) , n . querySelectorAll ( ".tags > span" ) . forEach ( ( p ) => {
r . appendChild ( ee ( e , p ) ) ;
} ) , n . querySelectorAll ( ".icons > span" ) . forEach ( ( p ) => {
r . appendChild ( ee ( e , p ) ) ;
} ) , n . querySelectorAll ( ".hyper-link" ) . forEach ( ( p ) => {
r . appendChild ( eo ( e , p ) ) ;
} ) , n . querySelectorAll ( "img" ) . forEach ( ( p ) => {
r . appendChild ( to ( e , p ) ) ;
} ) , N ( r , {
x : te + "" ,
y : te + "" ,
@ -5309,31 +5313,31 @@ const ho = {
init ( e ) {
if ( ! e || ! e . nodeData )
return new Error ( "MindElixir: `data` is required" ) ;
e . direction !== void 0 && ( this . direction = e . direction ) , this . changeTheme ( e . theme || this . theme , ! 1 ) , this . nodeData = e . nodeData , D ( this . nodeData ) , this . arrows = e . arrows || [ ] , this . summaries = e . summaries || [ ] , this . tidyArrow ( ) , this . toolBar && Tt ( this ) , this . keypress && wt ( this ) , this . editable && Bt ( this ) , this . contextMenu && this . disposable . push ( mt ( this , this . contextMenuOption ) ) , this . draggable && Ct ( this ) , this . allowUndo && _t ( this ) , this . toCenter ( ) , this . layout ( ) , this . linkDiv ( ) ;
e . direction !== void 0 && ( this . direction = e . direction ) , this . changeTheme ( e . theme || this . theme , ! 1 ) , this . nodeData = e . nodeData , $ ( this . nodeData ) , this . arrows = e . arrows || [ ] , this . summaries = e . summaries || [ ] , this . tidyArrow ( ) , this . toolBar && Tt ( this ) , this . keypress && wt ( this ) , this . editable && Bt ( this ) , this . contextMenu && this . disposable . push ( mt ( this , this . contextMenuOption ) ) , this . draggable && Ct ( this ) , this . allowUndo && _t ( this ) , this . toCenter ( ) , this . layout ( ) , this . linkDiv ( ) ;
} ,
destroy ( ) {
var e , t ;
this . disposable . forEach ( ( n) => n ( ) ) , ( e = this . mindElixirBox ) == null || e . remove ( ) , this . mindElixirBox = void 0 , this . nodeData = void 0 , this . arrows = void 0 , this . summaries = void 0 , this . currentArrow = void 0 , this . currentNode = void 0 , this . currentNodes = void 0 , this . currentSummary = void 0 , this . waitCopy = void 0 , this . theme = void 0 , this . direction = void 0 , this . bus = void 0 , this . container = void 0 , this . map = void 0 , this . lines = void 0 , this . linkController = void 0 , this . linkSvgGroup = void 0 , this . P2 = void 0 , this . P3 = void 0 , this . line1 = void 0 , this . line2 = void 0 , this . nodes = void 0 , ( t = this . selection ) == null || t . destroy ( ) , this . selection = void 0 ;
var e ;
this . disposable . forEach ( ( t) => t ( ) ) , this . mindElixirBox && ( this . mindElixirBox . innerHTML = "" ) , this . mindElixirBox = void 0 , this . nodeData = void 0 , this . arrows = void 0 , this . summaries = void 0 , this . currentArrow = void 0 , this . currentNode = void 0 , this . currentNodes = void 0 , this . currentSummary = void 0 , this . waitCopy = void 0 , this . theme = void 0 , this . direction = void 0 , this . bus = void 0 , this . container = void 0 , this . map = void 0 , this . lines = void 0 , this . linkController = void 0 , this . linkSvgGroup = void 0 , this . P2 = void 0 , this . P3 = void 0 , this . line1 = void 0 , this . line2 = void 0 , this . nodes = void 0 , ( e = this . selection ) == null || e . destroy ( ) , this . selection = void 0 ;
}
} ;
function uo ( { pT : e , pL : t , pW : n , pH : o , cT : s , cL : i , cW : r , cH : c , direction : l , containerHeight : u } ) {
let d = t + n / 2 ;
const a = e + o / 2 ;
let p ;
l === "lhs" ? p = i + r : p = i ;
let f ;
l === "lhs" ? f = i + r : f = i ;
const g = s + c / 2 , m = ( 1 - Math . abs ( g - a ) / u ) * 0.25 * ( n / 2 ) ;
return l === "lhs" ? d = d - n / 10 - m : d = d + n / 10 + m , ` M ${ d } ${ a } Q ${ d } ${ g } ${ p } ${ g } ` ;
return l === "lhs" ? d = d - n / 10 - m : d = d + n / 10 + m , ` M ${ d } ${ a } Q ${ d } ${ g } ${ f } ${ g } ` ;
}
function fo ( { pT : e , pL : t , pW : n , pH : o , cT : s , cL : i , cW : r , cH : c , direction : l , isFirst : u } ) {
const d = parseInt ( this . mindElixirBox . style . getPropertyValue ( "--gap" ) ) ;
let a = 0 , p = 0 ;
let a = 0 , f = 0 ;
u ? a = e + o / 2 : a = e + o ;
const g = s + c ;
let f = 0 , m = 0 , h = 0 ;
let p = 0 , m = 0 , h = 0 ;
const v = Math . abs ( a - g ) / 300 * d ;
return l === "lhs" ? ( h = t , f = h + d , m = h - d , p = i + d , ` M ${ f } ${ a } C ${ h } ${ a } ${ h + v } ${ g } ${ m } ${ g } H ${ p } ` ) : ( h = t + n , f = h - d , m = h + d , p = i + r - d , ` M ${ f } ${ a } C ${ h } ${ a } ${ h - v } ${ g } ${ m } ${ g } H ${ p } ` ) ;
return l === "lhs" ? ( h = t , p = h + d , m = h - d , f = i + d , ` M ${ p } ${ a } C ${ h } ${ a } ${ h + v } ${ g } ${ m } ${ g } H ${ f } ` ) : ( h = t + n , p = h - d , m = h + d , f = i + r - d , ` M ${ p } ${ a } C ${ h } ${ a } ${ h - v } ${ g } ${ m } ${ g } H ${ f } ` ) ;
}
const po = "4.3. 1 ", U = document ;
const po = "4.3. 3 ", U = document ;
function A ( {
el : e ,
direction : t ,
@ -5347,9 +5351,9 @@ function A({
mouseSelectionButton : u ,
selectionContainer : d ,
before : a ,
newTopicName : p ,
newTopicName : f ,
allowUndo : g ,
generateMainBranch : f ,
generateMainBranch : p ,
generateSubBranch : m ,
overflowHidden : h ,
theme : v
@ -5358,15 +5362,15 @@ function A({
const b = Object . prototype . toString . call ( e ) ;
if ( b === "[object HTMLDivElement]" ? y = e : b === "[object String]" && ( y = document . querySelector ( e ) ) , ! y )
throw new Error ( "MindElixir: el is not a valid element" ) ;
y . className += " mind-elixir" , y . innerHTML = "" , this . mindElixirBox = y , this . disposable = [ ] , this . before = a || { } , this . locale = n || "en" , this . contextMenuOption = r , this . contextMenu = i === void 0 ? ! 0 : i , this . toolBar = c === void 0 ? ! 0 : c , this . keypress = l === void 0 ? ! 0 : l , this . mouseSelectionButton = u || 0 , this . direction = typeof t == "number" ? t : 1 , this . draggable = o === void 0 ? ! 0 : o , this . newTopicName = p || "new node" , this . editable = s === void 0 ? ! 0 : s , this . allowUndo = g === void 0 ? ! 1 : g , this . currentNode = null , this . currentArrow = null , this . scaleVal = 1 , this . tempDirection = null , this . generateMainBranch = f || uo , this . generateSubBranch = m || fo , this . overflowHidden = h || ! 1 , this . bus = st . create ( ) , this . container = U . createElement ( "div" ) , this . selectionContainer = d || this . container , this . container . className = "map-container" ;
y . className += " mind-elixir" , y . innerHTML = "" , this . mindElixirBox = y , this . disposable = [ ] , this . before = a || { } , this . locale = n || "en" , this . contextMenuOption = r , this . contextMenu = i === void 0 ? ! 0 : i , this . toolBar = c === void 0 ? ! 0 : c , this . keypress = l === void 0 ? ! 0 : l , this . mouseSelectionButton = u || 0 , this . direction = typeof t == "number" ? t : 1 , this . draggable = o === void 0 ? ! 0 : o , this . newTopicName = f || "new node" , this . editable = s === void 0 ? ! 0 : s , this . allowUndo = g === void 0 ? ! 1 : g , this . currentNode = null , this . currentArrow = null , this . scaleVal = 1 , this . tempDirection = null , this . generateMainBranch = p || uo , this . generateSubBranch = m || fo , this . overflowHidden = h || ! 1 , this . bus = st . create ( ) , this . container = U . createElement ( "div" ) , this . selectionContainer = d || this . container , this . container . className = "map-container" ;
const x = window . matchMedia ( "(prefers-color-scheme: dark)" ) ;
this . theme = v || ( x . matches ? Oe : $e ) ;
const w = U . createElement ( "div" ) ;
w . className = "map-canvas" , this . map = w , this . map . setAttribute ( "tabindex" , "0" ) , this . container . appendChild ( this . map ) , this . mindElixirBox . appendChild ( this . container ) , this . nodes = U . createElement ( "me-nodes" ) , this . nodes . className = "main-node-container" , this . lines = Y ( "lines" ) , this . summarySvg = Y ( "summary" ) , this . linkController = Y ( "linkcontroller" ) , this . P2 = U . createElement ( "div" ) , this . P3 = U . createElement ( "div" ) , this . P2 . className = this . P3 . className = "circle" , this . P2 . style . display = this . P3 . style . display = "none" , this . line1 = ye ( ) , this . line2 = ye ( ) , this . linkController . appendChild ( this . line1 ) , this . linkController . appendChild ( this . line2 ) , this . linkSvgGroup = Y ( "topiclinks" ) , this . map . appendChild ( this . nodes ) , this . overflowHidden ? this . container . style . overflow = "hidden" : ot ( this ) ;
}
A . prototype = ho ;
A . LEFT = T ;
A . RIGHT = z ;
A . LEFT = k ;
A . RIGHT = D ;
A . SIDE = re ;
A . THEME = $e ;
A . DARK _THEME = Oe ;