2018-01-25 11:06:58 +01:00
/*
2020-01-05 20:32:34 +01:00
* Copyright (C) Ascensio System SIA 2012-2020. All rights reserved
2018-01-25 11:06:58 +01:00
*
2020-01-05 20:32:34 +01:00
* https://www.onlyoffice.com/
2018-01-25 11:06:58 +01:00
*
* Version: 0.0.0 (build:0)
*/
2020-01-05 20:32:34 +01:00
function onDropDownKeyDown ( t ){ var e = $ ( this ), i = e . parent (), n = jQuery . Event ( "keydown.before.bs.dropdown" ,{ keyCode : t . keyCode }), o = jQuery . Event ( "keydown.after.bs.dropdown" ,{ keyCode : t . keyCode }); i . trigger ( n ), i . hasClass ( "no-stop-propagate" ) ? ( arguments . length > 1 && arguments [ 1 ] instanceof KeyboardEvent && ( t = arguments [ 1 ]), ! /^(38|40|27|13|9|37|39)$/ . test ( t . keyCode ) || t . ctrlKey || t . altKey || ( patchDropDownKeyDownAdditional . call ( this , t ), /(37|39)/ . test ( t . keyCode ) || ( t . preventDefault (), t . stopPropagation ()))) : ( patchDropDownKeyDown . call ( this , t ), t . preventDefault (), t . stopPropagation ()), i . trigger ( o )} function patchDropDownKeyDown ( t ){ if ( /(38|40|27|37|39)/ . test ( t . keyCode )){ var e = $ ( this ); if ( t . preventDefault (), t . stopPropagation (), ! e . is ( ".disabled, :disabled" )){ var i = getParent ( e ), n = i . hasClass ( "open" ) || i . hasClass ( "over" ); if ( ! n || n && 27 == t . keyCode ){ if ( 27 == t . which ){ if ( o = $ ( "[role=menu] li.dropdown-submenu.over:visible" , i ), o . length ) return o . eq ( o . length - 1 ). removeClass ( "over" ), ! 1 ; i . hasClass ( "dropdown-submenu" ) && i . hasClass ( "over" ) ? ( i . removeClass ( "over" ), i . find ( "> a" ). focus ()) : i . find ( "[data-toggle=dropdown]" ). focus ()} return n ? e . click () : void 0 } var o = $ ( "> [role=menu] > li:not(.divider):not(.disabled):visible" , i ). find ( "> a" ); if ( o . length ){ var s = o . index ( o . filter ( ":focus" )); if ( 39 == t . keyCode ){ if ( s < 0 ) return ; var a = o . eq ( s ). parent (); a . hasClass ( "dropdown-submenu" ) &&! a . hasClass ( "over" ) && ( a . mouseenter (), a . addClass ( "focused-submenu" ), _ . delay ( function (){ var t = $ ( "> [role=menu]" , a ), e = t . find ( "> li:not(.divider):not(.disabled):visible > a" ), i = t . find ( "> li:not(.divider):not(.disabled):visible .dataview" ), n = t . find ( "> li:not(.divider):not(.disabled):visible ul.internal-menu" ); e . length > 0 && i . length < 1 && n . length < 1 && e . index ( e . filter ( ":focus" )) < 0 && e . eq ( 0 ). focus ()}, 250 ))} else 37 == t . keyCode ? i . hasClass ( "dropdown-submenu" ) && i . hasClass ( "over" ) && ( i . removeClass ( "over" ), i . find ( "> a" ). focus ()) : ( 38 == t . keyCode ? s > 0 ? s --: s = e . hasClass ( "no-cyclic" ) ? 0 : o . length - 1 : 40 == t . keyCode && ( s < o . length - 1 ? s ++: s = e . hasClass ( "no-cyclic" ) ? o . length - 1 : 0 ), ~ s || ( s = 0 ), i . hasClass ( "dropdown-submenu" ) && i . hasClass ( "over" ) && i . addClass ( "focused-submenu" ), o . eq ( s ). focus ())}}}} function patchDropDownKeyDownAdditional ( t ){ if ( /(38|40|27|37|39)/ . test ( t . keyCode )){ var e = $ ( this ); if ( /(37|39)/ . test ( t . keyCode ) || ( t . preventDefault (), t . stopPropagation ()), ! e . is ( ".disabled, :disabled" )){ var i = getParent ( e ), n = i . hasClass ( "open" ) || i . hasClass ( "over" ); if ( ! n || n && ( 27 == t . keyCode || 37 == t . keyCode || 39 == t . keyCode )) return n ? e . click () : void 0 ; var o = $ ( "> [role=menu] > li:not(.divider):not(.disabled):visible" , i ). find ( "> a" ); if ( o . length ){ var s = o . index ( o . filter ( ".focus" )), a = s ; if ( 38 == t . keyCode ? s > 0 ? s --: s = e . hasClass ( "no-cyclic" ) ? 0 : o . length - 1 : 40 == t . keyCode && ( s < o . length - 1 ? s ++: s = e . hasClass ( "no-cyclic" ) ? o . length - 1 : 0 ), ~ s || ( s = 0 ), o . removeClass ( "focus" ), o . eq ( s ). addClass ( "focus" ), a !== s ){ var r = o . eq ( a ). parent (). data ( "bs.tooltip" ); r && r . hide (), r = o . eq ( s ). parent (). data ( "bs.tooltip" ), r && r . show ()}}}}} function getParent ( t ){ var e = t . attr ( "data-target" ); e || ( e = t . attr ( "href" ), e = e && /#/ . test ( e ) && e . replace ( /.*(?=#[^\s]*$)/ , "" )); var i = e && $ ( e ); return i && i . length ? i : t . parent ()} function clearMenus ( t ){ $ ( ".dropdown-toggle" ). each ( function ( e ){ var i = $ ( this ). parent (); if ( i . hasClass ( "open" )){ if ( "prevent-canvas-click" == i . attr ( "data-value" )) return void i . attr ( "data-value" , "" ); i . trigger ( e = $ . Event ( "hide.bs.dropdown" )), e . isDefaultPrevented () || i . removeClass ( "open" ). trigger ( "hidden.bs.dropdown" , t )}})} function toggle (){ $ ( ".dropdown-backdrop" ). remove ()} if ( function (){ var t = "object" == typeof self && self . self === self && self || "object" == typeof global && global . global === global && global || this || {}, e = t . _ , i = Array . prototype , n = Object . prototype , o = "undefined" != typeof Symbol ? Symbol . prototype : null , s = i . push , a = i . slice , r = n . toString , l = n . hasOwnProperty , c = Array . isArray , d = Object . keys , h = Object . create , p = function (){}, m = function ( t ){ return t instanceof m ? t : this instanceof m ? void ( this . _wrapped = t ) : new m ( t )}; "undefined" == typeof exports || exports . nodeType ? t . _ = m : ( "undefined" != typeof module &&! module . nodeType && module . exports && ( exports = module . exports = m ), exports . _ = m ), m . VERSION = "1.8.3" ; var u , g = function ( t , e , i ){ if ( void 0 === e ) return t ; switch ( i ){ case 1 : return function ( i ){ return t . c
i || ke . test ( t ) ? n ( t , o ) : Y ( t + "[" + ( "object" == typeof o && null != o ? e : "" ) + "]" , o , i , n )}); else if ( i || "object" !== ut . type ( e )) n ( t , e ); else for ( o in e ) Y ( t + "[" + o + "]" , e [ o ], i , n )} function X ( t ){ return function ( e , i ){ "string" != typeof e && ( i = e , e = "*" ); var n , o = 0 , s = e . toLowerCase (). match ( Pt ) || []; if ( ut . isFunction ( i )) for (; n = s [ o ++ ];) "+" === n [ 0 ] ? ( n = n . slice ( 1 ) || "*" ,( t [ n ] = t [ n ] || []). unshift ( i )) : ( t [ n ] = t [ n ] || []). push ( i )}} function J ( t , e , i , n ){ function o ( r ){ var l ; return s [ r ] =! 0 , ut . each ( t [ r ] || [], function ( t , r ){ var c = r ( e , i , n ); return "string" != typeof c || a || s [ c ] ? a ?! ( l = c ) : void 0 : ( e . dataTypes . unshift ( c ), o ( c ), ! 1 )}), l } var s = {}, a = t === Le ; return o ( e . dataTypes [ 0 ]) ||! s [ "*" ] && o ( "*" )} function Z ( t , e ){ var i , n , o = ut . ajaxSettings . flatOptions || {}; for ( i in e ) void 0 !== e [ i ] && (( o [ i ] ? t : n || ( n = {}))[ i ] = e [ i ]); return n && ut . extend ( ! 0 , t , n ), t } function Q ( t , e , i ){ for ( var n , o , s , a , r = t . contents , l = t . dataTypes ; "*" === l [ 0 ];) l . shift (), void 0 === n && ( n = t . mimeType || e . getResponseHeader ( "Content-Type" )); if ( n ) for ( o in r ) if ( r [ o ] && r [ o ]. test ( n )){ l . unshift ( o ); break } if ( l [ 0 ] in i ) s = l [ 0 ]; else { for ( o in i ){ if ( ! l [ 0 ] || t . converters [ o + " " + l [ 0 ]]){ s = o ; break } a || ( a = o )} s = s || a } if ( s ) return s !== l [ 0 ] && l . unshift ( s ), i [ s ]} function tt ( t , e , i , n ){ var o , s , a , r , l , c = {}, d = t . dataTypes . slice (); if ( d [ 1 ]) for ( a in t . converters ) c [ a . toLowerCase ()] = t . converters [ a ]; for ( s = d . shift (); s ;) if ( t . responseFields [ s ] && ( i [ t . responseFields [ s ]] = e ), ! l && n && t . dataFilter && ( e = t . dataFilter ( e , t . dataType )), l = s , s = d . shift ()) if ( "*" === s ) s = l ; else if ( "*" !== l && l !== s ){ if ( ! ( a = c [ l + " " + s ] || c [ "* " + s ])) for ( o in c ) if ( r = o . split ( " " ), r [ 1 ] === s && ( a = c [ l + " " + r [ 0 ]] || c [ "* " + r [ 0 ]])){ ! 0 === a ? a = c [ o ] :! 0 !== c [ o ] && ( s = r [ 0 ], d . unshift ( r [ 1 ])); break } if ( ! 0 !== a ) if ( a && t . throws ) e = a ( e ); else try { e = a ( e )} catch ( t ){ return { state : "parsererror" , error : a ? t : "No conversion from " + l + " to " + s }}} return { state : "success" , data : e }} var et = [], it = t . document , nt = Object . getPrototypeOf , ot = et . slice , st = et . concat , at = et . push , rt = et . indexOf , lt = {}, ct = lt . toString , dt = lt . hasOwnProperty , ht = dt . toString , pt = ht . call ( Object ), mt = {}, ut = function ( t , e ){ return new ut . fn . init ( t , e )}, gt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g , bt = /^-ms-/ , ft = /-([a-z])/g , Ct = function ( t , e ){ return e . toUpperCase ()}; ut . fn = ut . prototype = { jquery : "3.2.1" , constructor : ut , length : 0 , toArray : function (){ return ot . call ( this )}, get : function ( t ){ return null == t ? ot . call ( this ) : t < 0 ? this [ t + this . length ] : this [ t ]}, pushStack : function ( t ){ var e = ut . merge ( this . constructor (), t ); return e . prevObject = this , e }, each : function ( t ){ return ut . each ( this , t )}, map : function ( t ){ return this . pushStack ( ut . map ( this , function ( e , i ){ return t . call ( e , i , e )}))}, slice : function (){ return this . pushStack ( ot . apply ( this , arguments ))}, first : function (){ return this . eq ( 0 )}, last : function (){ return this . eq ( - 1 )}, eq : function ( t ){ var e = this . length , i =+ t + ( t < 0 ? e : 0 ); return this . pushStack ( i >= 0 && i < e ? [ this [ i ]] : [])}, end : function (){ return this . prevObject || this . constructor ()}, push : at , sort : et . sort , splice : et . splice }, ut . extend = ut . fn . extend = function (){ var t , e , i , n , o , s , a = arguments [ 0 ] || {}, r = 1 , l = arguments . length , c =! 1 ; for ( "boolean" == typeof a && ( c = a , a = arguments [ r ] || {}, r ++ ), "object" == typeof a || ut . isFunction ( a ) || ( a = {}), r === l && ( a = this , r -- ); r < l ; r ++ ) if ( null != ( t = arguments [ r ])) for ( e in t ) i = a [ e ], n = t [ e ], a !== n && ( c && n && ( ut . isPlainObject ( n ) || ( o = Array . isArray ( n ))) ? ( o ? ( o =! 1 , s = i && Array . isArray ( i ) ? i : []) : s = i && ut . isPlainObject ( i ) ? i : {}, a [ e ] = ut . extend ( c , s , n )) : void 0 !== n && ( a [ e ] = n )); return a }, ut . extend ({ expando : "jQuery" + ( "3.2.1" + Math . random ()). replace ( /\D/g , "" ), isReady :! 0 , error : function ( t ){ throw new Error ( t )}, noop : function (){}, isFunction : function ( t ){ return "function" === ut . type ( t )}, isWindow : function ( t ){ return null != t && t === t . window }, isNumeric : function ( t ){ var e = ut . type ( t ); return ( "number" === e || "string" === e ) &&! isNaN ( t - parseFloat ( t ))}, isPlainObject : function ( t ){ var e , i ; return ! ( ! t || "[object Object]" !== ct . call ( t )) && ( ! ( e = nt ( t )) || "function" == typeof ( i = dt . call ( e , "constructor" ) && e . constructor ) && ht . call ( i ) === pt )}, isEmptyObject : function ( t ){ var e ; for ( e in t ) return ! 1 ; return ! 0 }, type : function ( t ){ return null == t ? t + "" : "object" == typeof t || "function" == typeof t ? lt [ ct . call ( t )] || "object" : typeof t }, globalEval : function ( t ){ i ( t )}, camelCase : function ( t ){ return t . replace ( bt , "ms-" ). replace ( ft , Ct )}, each : function ( t , e ){ var i , o = 0 ; if ( n ( t )) for ( i = t . length ; o < i &&
t . console && t . console . warn && e && Mt . test ( e . name ) && t . console . warn ( "jQuery.Deferred exception: " + e . message , e . stack , i )}, ut . readyException = function ( e ){ t . setTimeout ( function (){ throw e })}; var Bt = ut . Deferred (); ut . fn . ready = function ( t ){ return Bt . then ( t ). catch ( function ( t ){ ut . readyException ( t )}), this }, ut . extend ({ isReady :! 1 , readyWait : 1 , ready : function ( t ){( ! 0 === t ?-- ut . readyWait : ut . isReady ) || ( ut . isReady =! 0 , ! 0 !== t &&-- ut . readyWait > 0 || Bt . resolveWith ( it ,[ ut ]))}}), ut . ready . then = Bt . then , "complete" === it . readyState || "loading" !== it . readyState &&! it . documentElement . doScroll ? t . setTimeout ( ut . ready ) : ( it . addEventListener ( "DOMContentLoaded" , h ), t . addEventListener ( "load" , h )); var Ut = function ( t , e , i , n , o , s , a ){ var r = 0 , l = t . length , c = null == i ; if ( "object" === ut . type ( i )){ o =! 0 ; for ( r in i ) Ut ( t , e , r , i [ r ], ! 0 , s , a )} else if ( void 0 !== n && ( o =! 0 , ut . isFunction ( n ) || ( a =! 0 ), c && ( a ? ( e . call ( t , n ), e = null ) : ( c = e , e = function ( t , e , i ){ return c . call ( ut ( t ), i )})), e )) for (; r < l ; r ++ ) e ( t [ r ], i , a ? n : n . call ( t [ r ], r , e ( t [ r ], i ))); return o ? t : c ? e . call ( t ) : l ? e ( t [ 0 ], i ) : s }, Vt = function ( t ){ return 1 === t . nodeType || 9 === t . nodeType ||!+ t . nodeType }; p . uid = 1 , p . prototype = { cache : function ( t ){ var e = t [ this . expando ]; return e || ( e = {}, Vt ( t ) && ( t . nodeType ? t [ this . expando ] = e : Object . defineProperty ( t , this . expando ,{ value : e , configurable :! 0 }))), e }, set : function ( t , e , i ){ var n , o = this . cache ( t ); if ( "string" == typeof e ) o [ ut . camelCase ( e )] = i ; else for ( n in e ) o [ ut . camelCase ( n )] = e [ n ]; return o }, get : function ( t , e ){ return void 0 === e ? this . cache ( t ) : t [ this . expando ] && t [ this . expando ][ ut . camelCase ( e )]}, access : function ( t , e , i ){ return void 0 === e || e && "string" == typeof e && void 0 === i ? this . get ( t , e ) : ( this . set ( t , e , i ), void 0 !== i ? i : e )}, remove : function ( t , e ){ var i , n = t [ this . expando ]; if ( void 0 !== n ){ if ( void 0 !== e ){ Array . isArray ( e ) ? e = e . map ( ut . camelCase ) : ( e = ut . camelCase ( e ), e = e in n ? [ e ] : e . match ( Pt ) || []), i = e . length ; for (; i -- ;) delete n [ e [ i ]]}( void 0 === e || ut . isEmptyObject ( n )) && ( t . nodeType ? t [ this . expando ] = void 0 : delete t [ this . expando ])}}, hasData : function ( t ){ var e = t [ this . expando ]; return void 0 !== e &&! ut . isEmptyObject ( e )}}; var Et = new p , Dt = new p , Rt = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/ , Ft = /[A-Z]/g ; ut . extend ({ hasData : function ( t ){ return Dt . hasData ( t ) || Et . hasData ( t )}, data : function ( t , e , i ){ return Dt . access ( t , e , i )}, removeData : function ( t , e ){ Dt . remove ( t , e )}, _data : function ( t , e , i ){ return Et . access ( t , e , i )}, _removeData : function ( t , e ){ Et . remove ( t , e )}}), ut . fn . extend ({ data : function ( t , e ){ var i , n , o , s = this [ 0 ], a = s && s . attributes ; if ( void 0 === t ){ if ( this . length && ( o = Dt . get ( s ), 1 === s . nodeType &&! Et . get ( s , "hasDataAttrs" ))){ for ( i = a . length ; i -- ;) a [ i ] && ( n = a [ i ]. name , 0 === n . indexOf ( "data-" ) && ( n = ut . camelCase ( n . slice ( 5 )), u ( s , n , o [ n ]))); Et . set ( s , "hasDataAttrs" , ! 0 )} return o } return "object" == typeof t ? this . each ( function (){ Dt . set ( this , t )}) : Ut ( this , function ( e ){ var i ; if ( s && void 0 === e ){ if ( void 0 !== ( i = Dt . get ( s , t ))) return i ; if ( void 0 !== ( i = u ( s , t ))) return i } else this . each ( function (){ Dt . set ( this , t , e )})}, null , e , arguments . length > 1 , null , ! 0 )}, removeData : function ( t ){ return this . each ( function (){ Dt . remove ( this , t )})}}), ut . extend ({ queue : function ( t , e , i ){ var n ; if ( t ) return e = ( e || "fx" ) + "queue" , n = Et . get ( t , e ), i && ( ! n || Array . isArray ( i ) ? n = Et . access ( t , e , ut . makeArray ( i )) : n . push ( i )), n || []}, dequeue : function ( t , e ){ e = e || "fx" ; var i = ut . queue ( t , e ), n = i . length , o = i . shift (), s = ut . _queueHooks ( t , e ), a = function (){ ut . dequeue ( t , e )}; "inprogress" === o && ( o = i . shift (), n -- ), o && ( "fx" === e && i . unshift ( "inprogress" ), delete s . stop , o . call ( t , a , s )), ! n && s && s . empty . fire ()}, _queueHooks : function ( t , e ){ var i = e + "queueHooks" ; return Et . get ( t , i ) || Et . access ( t , i ,{ empty : ut . Callbacks ( "once memory" ). add ( function (){ Et . remove ( t ,[ e + "queue" , i ])})})}}), ut . fn . extend ({ queue : function ( t , e ){ var i = 2 ; return "string" != typeof t && ( e = t , t = "fx" , i -- ), arguments . length < i ? ut . queue ( this [ 0 ], t ) : void 0 === e ? this : this . each ( function (){ var i = ut . queue ( this , t , e ); ut . _queueHooks ( this , t ), "fx" === t && "inprogress" !== i [ 0 ] && ut . dequeue ( this , t )})}, dequeue : function ( t ){ return this . each ( function (){ ut . dequeue ( this , t )})}, clearQueue : function ( t ){ return this . queue ( t || "fx" ,[])}, promise : function ( t , e ){ var i , n = 1 , o = ut . Deferred (), s = this , a = this . length , r = function (){ -- n || o . resolveWith ( s ,[ s ])}; for ( "string" != typeof t && ( e = t , t = void 0 ), t = t || "fx" ; a -- ;)( i = Et . get ( s [ a ], t + "queueHooks" )) && i . em
url : xe . href , type : "GET" , isLocal : Ee . test ( xe . protocol ), global :! 0 , processData :! 0 , async :! 0 , contentType : "application/x-www-form-urlencoded; charset=UTF-8" , accepts : { "*" : He , text : "text/plain" , html : "text/html" , xml : "application/xml, text/xml" , json : "application/json, text/javascript" }, contents : { xml : /\bxml\b/ , html : /\bhtml/ , json : /\bjson\b/ }, responseFields : { xml : "responseXML" , text : "responseText" , json : "responseJSON" }, converters : { "* text" : String , "text html" :! 0 , "text json" : JSON . parse , "text xml" : ut . parseXML }, flatOptions : { url :! 0 , context :! 0 }}, ajaxSetup : function ( t , e ){ return e ? Z ( Z ( t , ut . ajaxSettings ), e ) : Z ( ut . ajaxSettings , t )}, ajaxPrefilter : X ( Fe ), ajaxTransport : X ( Le ), ajax : function ( e , i ){ function n ( e , i , n , r ){ var c , p , m , _ , y , w = i ; d || ( d =! 0 , l && t . clearTimeout ( l ), o = void 0 , a = r || "" , x . readyState = e > 0 ? 4 : 0 , c = e >= 200 && e < 300 || 304 === e , n && ( _ = Q ( u , x , n )), _ = tt ( u , _ , x , c ), c ? ( u . ifModified && ( y = x . getResponseHeader ( "Last-Modified" ), y && ( ut . lastModified [ s ] = y ),( y = x . getResponseHeader ( "etag" )) && ( ut . etag [ s ] = y )), 204 === e || "HEAD" === u . type ? w = "nocontent" : 304 === e ? w = "notmodified" : ( w = _ . state , p = _ . data , m = _ . error , c =! m )) : ( m = w , ! e && w || ( w = "error" , e < 0 && ( e = 0 ))), x . status = e , x . statusText = ( i || w ) + "" , c ? f . resolveWith ( g ,[ p , w , x ]) : f . rejectWith ( g ,[ x , w , m ]), x . statusCode ( v ), v = void 0 , h && b . trigger ( c ? "ajaxSuccess" : "ajaxError" ,[ x , u , c ? p : m ]), C . fireWith ( g ,[ x , w ]), h && ( b . trigger ( "ajaxComplete" ,[ x , u ]), -- ut . active || ut . event . trigger ( "ajaxStop" )))} "object" == typeof e && ( i = e , e = void 0 ), i = i || {}; var o , s , a , r , l , c , d , h , p , m , u = ut . ajaxSetup ({}, i ), g = u . context || u , b = u . context && ( g . nodeType || g . jquery ) ? ut ( g ) : ut . event , f = ut . Deferred (), C = ut . Callbacks ( "once memory" ), v = u . statusCode || {}, _ = {}, y = {}, w = "canceled" , x = { readyState : 0 , getResponseHeader : function ( t ){ var e ; if ( d ){ if ( ! r ) for ( r = {}; e = Ve . exec ( a );) r [ e [ 1 ]. toLowerCase ()] = e [ 2 ]; e = r [ t . toLowerCase ()]} return null == e ? null : e }, getAllResponseHeaders : function (){ return d ? a : null }, setRequestHeader : function ( t , e ){ return null == d && ( t = y [ t . toLowerCase ()] = y [ t . toLowerCase ()] || t , _ [ t ] = e ), this }, overrideMimeType : function ( t ){ return null == d && ( u . mimeType = t ), this }, statusCode : function ( t ){ var e ; if ( t ) if ( d ) x . always ( t [ x . status ]); else for ( e in t ) v [ e ] = [ v [ e ], t [ e ]]; return this }, abort : function ( t ){ var e = t || w ; return o && o . abort ( e ), n ( 0 , e ), this }}; if ( f . promise ( x ), u . url = (( e || u . url || xe . href ) + "" ). replace ( Re , xe . protocol + "//" ), u . type = i . method || i . type || u . method || u . type , u . dataTypes = ( u . dataType || "*" ). toLowerCase (). match ( Pt ) || [ "" ], null == u . crossDomain ){ c = it . createElement ( "a" ); try { c . href = u . url , c . href = c . href , u . crossDomain = Ne . protocol + "//" + Ne . host != c . protocol + "//" + c . host } catch ( t ){ u . crossDomain =! 0 }} if ( u . data && u . processData && "string" != typeof u . data && ( u . data = ut . param ( u . data , u . traditional )), J ( Fe , u , i , x ), d ) return x ; h = ut . event && u . global , h && 0 == ut . active ++&& ut . event . trigger ( "ajaxStart" ), u . type = u . type . toUpperCase (), u . hasContent =! De . test ( u . type ), s = u . url . replace ( Be , "" ), u . hasContent ? u . data && u . processData && 0 === ( u . contentType || "" ). indexOf ( "application/x-www-form-urlencoded" ) && ( u . data = u . data . replace ( Me , "+" )) : ( m = u . url . slice ( s . length ), u . data && ( s += ( Ae . test ( s ) ? "&" : "?" ) + u . data , delete u . data ), ! 1 === u . cache && ( s = s . replace ( Ue , "$1" ), m = ( Ae . test ( s ) ? "&" : "?" ) + "_=" + Se +++ m ), u . url = s + m ), u . ifModified && ( ut . lastModified [ s ] && x . setRequestHeader ( "If-Modified-Since" , ut . lastModified [ s ]), ut . etag [ s ] && x . setRequestHeader ( "If-None-Match" , ut . etag [ s ])),( u . data && u . hasContent &&! 1 !== u . contentType || i . contentType ) && x . setRequestHeader ( "Content-Type" , u . contentType ), x . setRequestHeader ( "Accept" , u . dataTypes [ 0 ] && u . accepts [ u . dataTypes [ 0 ]] ? u . accepts [ u . dataTypes [ 0 ]] + ( "*" !== u . dataTypes [ 0 ] ? ", " + He + "; q=0.01" : "" ) : u . accepts [ "*" ]); for ( p in u . headers ) x . setRequestHeader ( p , u . headers [ p ]); if ( u . beforeSend && ( ! 1 === u . beforeSend . call ( g , x , u ) || d )) return x . abort (); if ( w = "abort" , C . add ( u . complete ), x . done ( u . success ), x . fail ( u . error ), o = J ( Le , u , i , x )){ if ( x . readyState = 1 , h && b . trigger ( "ajaxSend" ,[ x , u ]), d ) return x ; u . async && u . timeout > 0 && ( l = t . setTimeout ( function (){ x . abort ( "timeout" )}, u . timeout )); try { d =! 1 , o . send ( _ , n )} catch ( t ){ if ( d ) throw t ; n ( - 1 , t )}} else n ( - 1 , "No Transport" ); return x }, getJSON : function ( t , e , i ){ return ut . get ( t , e , i , "json" )}, getScript : function ( t , e ){ return ut . get ( t , void 0 , e , "script" )}}), ut . each ([ "get" , "post" ], function ( t , e ){ ut [ e ] = function ( t , i , n , o ){ return
delegateType : t . support . transition . end , handle : function ( e ){ if ( t ( e . target ). is ( this )) return e . handleObj . handler . apply ( this , arguments )}})})}( jQuery ), function ( t ){ "use strict" ; function e ( e ){ return this . each ( function (){ var i = t ( this ), o = i . data ( "bs.alert" ); o || i . data ( "bs.alert" , o = new n ( this )), "string" == typeof e && o [ e ]. call ( i )})} var i = '[data-dismiss="alert"]' , n = function ( e ){ t ( e ). on ( "click" , i , this . close )}; n . VERSION = "3.3.7" , n . TRANSITION_DURATION = 150 , n . prototype . close = function ( e ){ function i (){ a . detach (). trigger ( "closed.bs.alert" ). remove ()} var o = t ( this ), s = o . attr ( "data-target" ); s || ( s = o . attr ( "href" ), s = s && s . replace ( /.*(?=#[^\s]*$)/ , "" )); var a = t ( "#" === s ? [] : s ); e && e . preventDefault (), a . length || ( a = o . closest ( ".alert" )), a . trigger ( e = t . Event ( "close.bs.alert" )), e . isDefaultPrevented () || ( a . removeClass ( "in" ), t . support . transition && a . hasClass ( "fade" ) ? a . one ( "bsTransitionEnd" , i ). emulateTransitionEnd ( n . TRANSITION_DURATION ) : i ())}; var o = t . fn . alert ; t . fn . alert = e , t . fn . alert . Constructor = n , t . fn . alert . noConflict = function (){ return t . fn . alert = o , this }, t ( document ). on ( "click.bs.alert.data-api" , i , n . prototype . close )}( jQuery ), function ( t ){ "use strict" ; function e ( e ){ return this . each ( function (){ var n = t ( this ), o = n . data ( "bs.button" ), s = "object" == typeof e && e ; o || n . data ( "bs.button" , o = new i ( this , s )), "toggle" == e ? o . toggle () : e && o . setState ( e )})} var i = function ( e , n ){ this . $element = t ( e ), this . options = t . extend ({}, i . DEFAULTS , n ), this . isLoading =! 1 }; i . VERSION = "3.3.7" , i . DEFAULTS = { loadingText : "loading..." }, i . prototype . setState = function ( e ){ var i = "disabled" , n = this . $element , o = n . is ( "input" ) ? "val" : "html" , s = n . data (); e += "Text" , null == s . resetText && n . data ( "resetText" , n [ o ]()), setTimeout ( t . proxy ( function (){ n [ o ]( null == s [ e ] ? this . options [ e ] : s [ e ]), "loadingText" == e ? ( this . isLoading =! 0 , n . addClass ( i ). attr ( i , i ). prop ( i , ! 0 )) : this . isLoading && ( this . isLoading =! 1 , n . removeClass ( i ). removeAttr ( i ). prop ( i , ! 1 ))}, this ), 0 )}, i . prototype . toggle = function (){ var t =! 0 , e = this . $element . closest ( '[data-toggle="buttons"]' ); if ( e . length ){ var i = this . $element . find ( "input" ); "radio" == i . prop ( "type" ) ? ( i . prop ( "checked" ) && ( t =! 1 ), e . find ( ".active" ). removeClass ( "active" ), this . $element . addClass ( "active" )) : "checkbox" == i . prop ( "type" ) && ( i . prop ( "checked" ) !== this . $element . hasClass ( "active" ) && ( t =! 1 ), this . $element . toggleClass ( "active" )), i . prop ( "checked" , this . $element . hasClass ( "active" )), t && i . trigger ( "change" )} else this . $element . attr ( "aria-pressed" , ! this . $element . hasClass ( "active" )), this . $element . toggleClass ( "active" )}; var n = t . fn . button ; t . fn . button = e , t . fn . button . Constructor = i , t . fn . button . noConflict = function (){ return t . fn . button = n , this }, t ( document ). on ( "click.bs.button.data-api" , '[data-toggle^="button"]' , function ( i ){ var n = t ( i . target ). closest ( ".btn" ); e . call ( n , "toggle" ), t ( i . target ). is ( 'input[type="radio"], input[type="checkbox"]' ) || ( i . preventDefault (), n . is ( "input,button" ) ? n . trigger ( "focus" ) : n . find ( "input:visible,button:visible" ). first (). trigger ( "focus" ))}). on ( "focus.bs.button.data-api blur.bs.button.data-api" , '[data-toggle^="button"]' , function ( e ){ t ( e . target ). closest ( ".btn" ). toggleClass ( "focus" , /^focus(in)?$/ . test ( e . type ))})}( jQuery ), function ( t ){ "use strict" ; function e ( e ){ return this . each ( function (){ var n = t ( this ), o = n . data ( "bs.carousel" ), s = t . extend ({}, i . DEFAULTS , n . data (), "object" == typeof e && e ), a = "string" == typeof e ? e : s . slide ; o || n . data ( "bs.carousel" , o = new i ( this , s )), "number" == typeof e ? o . to ( e ) : a ? o [ a ]() : s . interval && o . pause (). cycle ()})} var i = function ( e , i ){ this . $element = t ( e ), this . $indicators = this . $element . find ( ".carousel-indicators" ), this . options = i , this . paused = null , this . sliding = null , this . interval = null , this . $active = null , this . $items = null , this . options . keyboard && this . $element . on ( "keydown.bs.carousel" , t . proxy ( this . keydown , this )), "hover" == this . options . pause &&! ( "ontouchstart" in document . documentElement ) && this . $element . on ( "mouseenter.bs.carousel" , t . proxy ( this . pause , this )). on ( "mouseleave.bs.carousel" , t . proxy ( this . cycle , this ))}; i . VERSION = "3.3.7" , i . TRANSITION_DURATION = 600 , i . DEFAULTS = { interval : 5e3 , pause : "hover" , wrap :! 0 , keyboard :! 0 }, i . prototype . keydown = function ( t ){ if ( ! /input|textarea/i . test ( t . target . tagName )){ switch ( t . which ){ case 37 : this . prev (); break ; case 39 : this . next (); break ; default : return } t
var e = this . element , i = e . closest ( "ul:not(.dropdown-menu)" ), n = e . data ( "target" ); if ( n || ( n = e . attr ( "href" ), n = n && n . replace ( /.*(?=#[^\s]*$)/ , "" )), ! e . parent ( "li" ). hasClass ( "active" )){ var o = i . find ( ".active:last a" ), s = t . Event ( "hide.bs.tab" ,{ relatedTarget : e [ 0 ]}), a = t . Event ( "show.bs.tab" ,{ relatedTarget : o [ 0 ]}); if ( o . trigger ( s ), e . trigger ( a ), ! a . isDefaultPrevented () &&! s . isDefaultPrevented ()){ var r = t ( n ); this . activate ( e . closest ( "li" ), i ), this . activate ( r , r . parent (), function (){ o . trigger ({ type : "hidden.bs.tab" , relatedTarget : e [ 0 ]}), e . trigger ({ type : "shown.bs.tab" , relatedTarget : o [ 0 ]})})}}}, i . prototype . activate = function ( e , n , o ){ function s (){ a . removeClass ( "active" ). find ( "> .dropdown-menu > .active" ). removeClass ( "active" ). end (). find ( '[data-toggle="tab"]' ). attr ( "aria-expanded" , ! 1 ), e . addClass ( "active" ). find ( '[data-toggle="tab"]' ). attr ( "aria-expanded" , ! 0 ), r ? ( e [ 0 ]. offsetWidth , e . addClass ( "in" )) : e . removeClass ( "fade" ), e . parent ( ".dropdown-menu" ). length && e . closest ( "li.dropdown" ). addClass ( "active" ). end (). find ( '[data-toggle="tab"]' ). attr ( "aria-expanded" , ! 0 ), o && o ()} var a = n . find ( "> .active" ), r = o && t . support . transition && ( a . length && a . hasClass ( "fade" ) ||!! n . find ( "> .fade" ). length ); a . length && r ? a . one ( "bsTransitionEnd" , s ). emulateTransitionEnd ( i . TRANSITION_DURATION ) : s (), a . removeClass ( "in" )}; var n = t . fn . tab ; t . fn . tab = e , t . fn . tab . Constructor = i , t . fn . tab . noConflict = function (){ return t . fn . tab = n , this }; var o = function ( i ){ i . preventDefault (), e . call ( t ( this ), "show" )}; t ( document ). on ( "click.bs.tab.data-api" , '[data-toggle="tab"]' , o ). on ( "click.bs.tab.data-api" , '[data-toggle="pill"]' , o )}( jQuery ), function ( t ){ "use strict" ; function e ( e ){ return this . each ( function (){ var n = t ( this ), o = n . data ( "bs.affix" ), s = "object" == typeof e && e ; o || n . data ( "bs.affix" , o = new i ( this , s )), "string" == typeof e && o [ e ]()})} var i = function ( e , n ){ this . options = t . extend ({}, i . DEFAULTS , n ), this . $target = t ( this . options . target ). on ( "scroll.bs.affix.data-api" , t . proxy ( this . checkPosition , this )). on ( "click.bs.affix.data-api" , t . proxy ( this . checkPositionWithEventLoop , this )), this . $element = t ( e ), this . affixed = null , this . unpin = null , this . pinnedOffset = null , this . checkPosition ()}; i . VERSION = "3.3.7" , i . RESET = "affix affix-top affix-bottom" , i . DEFAULTS = { offset : 0 , target : window }, i . prototype . getState = function ( t , e , i , n ){ var o = this . $target . scrollTop (), s = this . $element . offset (), a = this . $target . height (); if ( null != i && "top" == this . affixed ) return o < i && "top" ; if ( "bottom" == this . affixed ) return null != i ?! ( o + this . unpin <= s . top ) && "bottom" :! ( o + a <= t - n ) && "bottom" ; var r = null == this . affixed , l = r ? o : s . top , c = r ? a : e ; return null != i && o <= i ? "top" : null != n && l + c >= t - n && "bottom" }, i . prototype . getPinnedOffset = function (){ if ( this . pinnedOffset ) return this . pinnedOffset ; this . $element . removeClass ( i . RESET ). addClass ( "affix" ); var t = this . $target . scrollTop (), e = this . $element . offset (); return this . pinnedOffset = e . top - t }, i . prototype . checkPositionWithEventLoop = function (){ setTimeout ( t . proxy ( this . checkPosition , this ), 1 )}, i . prototype . checkPosition = function (){ if ( this . $element . is ( ":visible" )){ var e = this . $element . height (), n = this . options . offset , o = n . top , s = n . bottom , a = Math . max ( t ( document ). height (), t ( document . body ). height ()); "object" != typeof n && ( s = o = n ), "function" == typeof o && ( o = n . top ( this . $element )), "function" == typeof s && ( s = n . bottom ( this . $element )); var r = this . getState ( a , e , o , s ); if ( this . affixed != r ){ null != this . unpin && this . $element . css ( "top" , "" ); var l = "affix" + ( r ? "-" + r : "" ), c = t . Event ( l + ".bs.affix" ); if ( this . $element . trigger ( c ), c . isDefaultPrevented ()) return ; this . affixed = r , this . unpin = "bottom" == r ? this . getPinnedOffset () : null , this . $element . removeClass ( i . RESET ). addClass ( l ). trigger ( l . replace ( "affix" , "affixed" ) + ".bs.affix" )} "bottom" == r && this . $element . offset ({ top : a - e - s })}}; var n = t . fn . affix ; t . fn . affix = e , t . fn . affix . Constructor = i , t . fn . affix . noConflict = function (){ return t . fn . affix = n , this }, t ( window ). on ( "load" , function (){ t ( '[data-spy="affix"]' ). each ( function (){ var i = t ( this ), n = i . data (); n . offset = n . offset || {}, null != n . offsetBottom && ( n . offset . bottom = n . offsetBottom ), null != n . offsetTop && ( n . offset . top = n . offsetTop ), e . call ( i , n )})})}( jQuery ), define ( "bootstrap" ,[ "jquery" ], function (){}), void 0 === Common ) var Common = {}; if ( define ( "notification" ,[ "backbone" ], function ( t ){ "use strict" ; v
; var o = void 0 == window . innerHeight ? document . documentElement . offsetWidth : Common . Utils . innerWidth (), s = void 0 == window . innerHeight ? document . documentElement . offsetHeight : Common . Utils . innerHeight (), a = this . initConfig . maxwidth ? this . initConfig . maxwidth : o , r = this . initConfig . maxheight ? this . initConfig . maxheight : s ; this . resizing . type [ 0 ] > 0 ? ( this . resizing . maxx = Math . min ( o , i + a ), this . resizing . minx = i + this . initConfig . minwidth ) : this . resizing . type [ 0 ] < 0 && ( this . resizing . maxx = i + this . resizing . initw - this . initConfig . minwidth , this . resizing . minx = Math . max ( 0 , i + this . resizing . initw - a )), this . resizing . type [ 1 ] > 0 ? ( this . resizing . maxy = Math . min ( s , n + r ), this . resizing . miny = n + this . initConfig . minheight ) : this . resizing . type [ 1 ] < 0 && ( this . resizing . maxy = n + this . resizing . inith - this . initConfig . minheight , this . resizing . miny = Math . max ( 0 , n + this . resizing . inith - r )), $ ( document . body ). css ( "cursor" , e . css ( "cursor" )), this . $window . find ( ".resize-border" ). addClass ( "resizing" ), this . $window . find ( ".header" ). addClass ( "resizing" ), $ ( document ). on ( "mousemove" , this . binding . resize ), $ ( document ). on ( "mouseup" , this . binding . resizeStop ), this . fireEvent ( "resize" ,[ this , "start" ])} function d ( t ){ if ( this . resizing . enabled ){ var e =! 1 , i = t instanceof jQuery . Event ? Common . Utils . zoom () : 1 , n = t . pageX * i , o = t . pageY * i ; this . resizing . type [ 0 ] && n < this . resizing . maxx && n > this . resizing . minx && ( this . resizing . type [ 0 ] < 0 && this . $window . css ({ left : n - this . resizing . initx }), this . setWidth ( this . resizing . initw + ( n - this . resizing . initpage_x ) * this . resizing . type [ 0 ]), e =! 0 ), this . resizing . type [ 1 ] && o < this . resizing . maxy && o > this . resizing . miny && ( this . resizing . type [ 1 ] < 0 && this . $window . css ({ top : o - this . resizing . inity }), this . setHeight ( this . resizing . inith + ( o - this . resizing . initpage_y ) * this . resizing . type [ 1 ]), e =! 0 ), e && this . fireEvent ( "resizing" )}} function h (){ $ ( document ). off ( "mousemove" , this . binding . resize ), $ ( document ). off ( "mouseup" , this . binding . resizeStop ), $ ( document . body ). css ( "cursor" , "auto" ), this . $window . find ( ".resize-border" ). removeClass ( "resizing" ), this . $window . find ( ".header" ). removeClass ( "resizing" ), this . resizing . enabled =! 1 , this . fireEvent ( "resize" ,[ this , "end" ])} var p = { closable :! 0 , header :! 0 , modal :! 0 , width : "auto" , height : "auto" , title : "Title" , alias : "Window" , cls : "" , toolclose : "close" , maxwidth : void 0 , maxheight : void 0 , minwidth : 0 , minheight : 0 , enableKeyEvents :! 0 }; return Common . UI . alert = function ( t ){ function e ( e ){ var i = e . getChild ( ".info-box" ), n = e . getChild ( ".info-box span" ), o = e . getChild ( ".footer" ), s = e . getChild ( ".header" ), a = e . getChild ( ".body" ), r = e . getChild ( ".icon" ), l = r . length > 0 ? r . height () : 0 , c = e . getChild ( ".info-box .dont-show-checkbox" ); t . dontshow || a . css ( "padding-bottom" , "10px" ), t . maxwidth && "auto" == t . width && n . position (). left + n . width () + parseInt ( i . css ( "padding-right" )) > t . maxwidth && ( t . width = t . maxwidth ), "auto" == t . width ? ( i . height ( Math . max ( n . height () + ( c . length > 0 ? c . height () + parseInt ( c . css ( "margin-top" )) : 0 ), l )), a . height ( parseInt ( i . css ( "height" )) + parseInt ( o . css ( "height" ))), e . setSize ( n . position (). left + n . width () + parseInt ( i . css ( "padding-right" )), parseInt ( a . css ( "height" )) + parseInt ( s . css ( "height" )))) : ( n . css ( "white-space" , "normal" ), e . setWidth ( t . width ), i . height ( Math . max ( n . height () + ( c . length > 0 ? c . height () + parseInt ( c . css ( "margin-top" )) : 0 ), l )), a . height ( parseInt ( i . css ( "height" )) + parseInt ( o . css ( "height" ))), e . setHeight ( parseInt ( a . css ( "height" )) + parseInt ( s . css ( "height" )))), n . height () < l - 10 && n . css ({ "vertical-align" : "baseline" , "line-height" : l + "px" })} function i ( e ){ t . callback && t . callback . call ( r , e . currentTarget . attributes . result . value , !! l && "checked" == l . getValue ()), r . close ( ! 0 )} function n ( t ){ return i ({ currentTarget : r . getChild ( ".footer .dlg-btn" )[ 0 ]}), ! 1 } var o = this . Window . prototype , s = { ok : o . okButtonText , cancel : o . cancelButtonText , yes : o . yesButtonText , no : o . noButtonText , close : o . closeButtonText }; if ( t . buttons ){ if ( _ . isArray ( t . buttons )){ void 0 == t . primary && ( t . primary = "ok" ); var a = {}; _ . each ( t . buttons , function ( e ){ "object" == typeof e ? void 0 !== e . value && ( a [ e . value ] = { text : e . caption , cls : "custom" + ( e . primary || t . primary == e . value ? " primary" : "" )}) : ( a [ e ] = { text : "custom" == e ? t . customButtonText : s [ e ], cls : t . primary == e ? "primary" : "" }, "custom" == e && ( a [ e ]. cls += " custom" ))}), t . buttons = a }} else t . buttons = {}, t . buttons . ok = { text : s . ok , cls : "primary" }; t . donts
this . panels . push ( n )), this . splitters . push ({ resizer : n }), i . resize . hidden && n . el . hide (), Common . Gateway . on ( "processmouse" , this . resize . eventStop ))}, this ), this . freezePanels ( this . freeze )}, getElementHeight : function ( t ){ return parseInt ( t . css ( "height" ))}, getElementWidth : function ( t ){ return parseInt ( t . css ( "width" ))}, getItem : function ( t ){ for ( var e in this . panels ){ var i = this . panels [ e ]; if ( i . alias == t ) return i }}, onSelectStart : function ( t ){ return t . preventDefault && t . preventDefault (), ! 1 }, addHandler : function ( t , e , i ){ t . addEventListener ? t . addEventListener ( e , i ) : t . attachEvent ? t . attachEvent ( "on" + e , i ) : t [ "on" + e ] = i }, removeHandler : function ( t , e , i ){ t . removeEventListener ? t . removeEventListener ( e , i ) : t . detachEvent ? t . detachEvent ( "on" + e , i ) : t [ "on" + e ] = null }, clearSelection : function (){ if ( window . getSelection ){ var t = window . getSelection (); t . empty ? t . empty () : t . removeAllRanges && t . removeAllRanges ()} else document . selection && document . selection . empty ()}, resizeStart : function ( t ){ if ( ! this . freeze ){ this . clearSelection (), this . addHandler ( window . document , "selectstart" , this . onSelectStart ), $ ( document ). on ({ mousemove : this . resize . eventMove , mouseup : this . resize . eventStop }), Common . NotificationCenter . on ({ "frame:mousemove" : this . resize . eventMove , "frame:mouseup" : this . resize . eventStop }); var e = t . data . panel ; this . resize . type = t . data . type , this . resize . $el = e . el , this . resize . min = e . minpos , this . resize . fmin = e . fmin , this . resize . fmax = e . fmax , this . resize . behaviour = e . behaviour , this . resize . $el . addClass ( "move" ), "vertical" == t . data . type ? ( this . resize . height = parseInt ( this . resize . $el . css ( "height" )), this . resize . max = ( e . maxpos > 0 ? e . maxpos : this . resize . $el . parent (). height () + e . maxpos ) - this . resize . height , this . resize . inity = t . pageY * Common . Utils . zoom () - parseInt ( t . currentTarget . style . top )) : "horizontal" == t . data . type && ( this . resize . width = parseInt ( this . resize . $el . css ( "width" )), this . resize . max = ( e . maxpos > 0 ? e . maxpos : this . resize . $el . parent (). height () + e . maxpos ) - this . resize . width , this . resize . initx = t . pageX * Common . Utils . zoom () - parseInt ( t . currentTarget . style . left )), Common . NotificationCenter . trigger ( "layout:resizestart" )}}, resizeMove : function ( t ){ var e = t instanceof jQuery . Event ? Common . Utils . zoom () : 1 ; if ( "vertical" == this . resize . type ) var i = "top" , n = t . pageY * e - this . resize . inity ; else "horizontal" == this . resize . type && ( i = "left" , n = t . pageX * e - this . resize . initx ); this . resize . fmin && this . resize . fmax ? n < this . resize . fmin () || n > this . resize . fmax () || ( this . resize . $el [ 0 ]. style [ i ] = n + "px" ) : n < this . resize . min || n > this . resize . max || ( this . resize . $el [ 0 ]. style [ i ] = n + "px" )}, resizeStop : function ( t ){ if ( this . removeHandler ( window . document , "selectstart" , this . onSelectStart ), $ ( document ). off ({ mousemove : this . resize . eventMove , mouseup : this . resize . eventStop }), Common . NotificationCenter . off ({ "frame:mousemove" : this . resize . eventMove , "frame:mouseup" : this . resize . eventStop }), this . resize . $el ){ var e = t instanceof jQuery . Event ? Common . Utils . zoom () : 1 ; if ( t instanceof jQuery . Event || void 0 !== t . pageY && void 0 !== t . pageX || ( t . pageY = t . y , t . pageX = t . x ), "vertical" == this . resize . type ) var i = "height" , n = t . pageY * e - this . resize . inity ; else "horizontal" == this . resize . type && ( i = "width" , n = t . pageX * e - this . resize . initx ); this . resize . fmin && this . resize . fmax ? ( n < this . resize . fmin () && ( n = this . resize . fmin ()), n > this . resize . fmax () && ( n = this . resize . fmax ())) : ( n < this . resize . min && ( n = this . resize . min ), n > this . resize . max && ( n = this . resize . max )); var o = null , s = null , a = 0 ; this . resize . $el . hasClass ( "after" ) ? ( o = this . resize . $el . prev (), s = this . resize . $el . next (), a = parseInt ( o . css ( i ))) : ( o = this . resize . $el . next (), s = this . resize . $el . next (), a = parseInt ( o . css ( i )), n = o . parent ()[ i ]() - ( n + this . resize [ i ])), "vertical" == this . resize . type && ( n -= o . position (). top ), "horizontal" == this . resize . type && ( n -= o . position (). left ), o . css ( i , n + "px" ), this . resize . behaviour && s . css ( i , parseInt ( s . css ( i )) - ( n - a )), this . resize . $el . removeClass ( "move" ), delete this . resize . $el , this . resize . value != n && ( this . doLayout (), this . trigger ( "layout:resizedrag" , this )), Common . NotificationCenter . trigger ( "layout:resizestop" )}}, freezePanels : function ( t ){ this . panels . forEach ( function ( e ){ ! e . stretch && e . resize && $ ( e . resize . el ). css ( "cursor" , t ? "default" : "" )}), this . freeze = t }, setResizeValue : function ( t , e ){ if ( t >= this . splitters . length ) return this . doLayout (),
function (){ P = function (){ y . css ({ left : u + a . scrollLeft (), bottom : x , width : m }), w . css ({ top : f + a . scrollTop (), right : S , height : b }), y . hide (). show (), w . hide (). show ()}}())}, O = "ontouchstart" in window || window . DocumentTouch && document instanceof window . DocumentTouch ; return function (){ var t = navigator . userAgent . toLowerCase (). match ( /(msie) ([\w.]+)/ ); t && "msie" === t [ 1 ] && N ( parseInt ( t [ 2 ], 10 )), M (), L (), B (), U (), R (), O && F (), a . mousewheel && E (), s . useKeyboard && D (), a . data ( "perfect-scrollbar" , a ), a . data ( "perfect-scrollbar-update" , M ), a . data ( "perfect-scrollbar-destroy" , H )}(), a })}}), void 0 === Common ) var Common = {}; if ( define ( "common/main/lib/component/Scroller" ,[ "jmousewheel" , "perfectscrollbar" , "common/main/lib/component/BaseView" ], function (){ "use strict" ; Common . UI . Scroller = function (){ var t ; return _ . extend ( Common . UI . BaseView . extend ({ options : { wheelSpeed : 20 , wheelPropagation :! 1 , minScrollbarLength : null , useBothWheelAxes :! 1 , useKeyboard :! 0 , suppressScrollX :! 1 , suppressScrollY :! 1 , scrollXMarginOffset : 5 , scrollYMarginOffset : 5 , includePadding :! 0 , includeMargin :! 0 , alwaysVisibleX :! 1 , alwaysVisibleY :! 1 }, initialize : function ( t ){ Common . UI . BaseView . prototype . initialize . call ( this , t ), this . options . el && this . render ()}, render : function (){ var t = this ; return t . cmpEl = $ ( this . el ), t . rendered || ( t . cmpEl . perfectScrollbar ( _ . extend ({}, t . options )), t . rendered =! 0 , this . setAlwaysVisibleX ( t . options . alwaysVisibleX ), this . setAlwaysVisibleY ( t . options . alwaysVisibleY )), this }, remove : function (){ this . destroy (), Backbone . View . prototype . remove . call ( this )}, update : function ( e ){ var i = this . options ; e ? ( this . destroy (), i = _ . extend ( this . options , e ), this . cmpEl . perfectScrollbar ( i )) : this . cmpEl . perfectScrollbar ( "update" ), this . setAlwaysVisibleX ( i . alwaysVisibleX ), this . setAlwaysVisibleY ( i . alwaysVisibleY ); var n = function ( e ){ t =! 0 ; var i = function ( e ){ $ ( document ). unbind ( "mouseup" , i ), _ . delay ( function (){ t =! 1 }, 10 )}; $ ( document ). mouseup ( i )}; $ ( ".ps-scrollbar-x-rail, .ps-scrollbar-y-rail, .ps-scrollbar-x, .ps-scrollbar-y" , this . cmpEl ). off ( "mousedown" , n ). on ( "mousedown" , n )}, destroy : function (){ this . cmpEl . perfectScrollbar ( "destroy" )}, scrollLeft : function ( t ){ this . cmpEl . scrollLeft ( t ), this . update ()}, scrollTop : function ( t ){ this . cmpEl . scrollTop ( t ), this . update ()}, getScrollTop : function (){ return this . cmpEl . scrollTop ()}, getScrollLeft : function (){ return this . cmpEl . scrollLeft ()}, setAlwaysVisibleX : function ( t ){ t ? ( $ ( this . el ). find ( ".ps-scrollbar-x-rail" ). addClass ( "always-visible-x" ), $ ( this . el ). find ( ".ps-scrollbar-x" ). addClass ( "always-visible-x" )) : ( $ ( this . el ). find ( ".ps-scrollbar-x-rail" ). removeClass ( "always-visible-x" ), $ ( this . el ). find ( ".ps-scrollbar-x" ). addClass ( "always-visible-x" ))}, setAlwaysVisibleY : function ( t ){ t ? ( $ ( this . el ). find ( ".ps-scrollbar-y-rail" ). addClass ( "always-visible-y" ), $ ( this . el ). find ( ".ps-scrollbar-y" ). addClass ( "always-visible-y" )) : ( $ ( this . el ). find ( ".ps-scrollbar-y-rail" ). removeClass ( "always-visible-y" ), $ ( this . el ). find ( ".ps-scrollbar-y" ). addClass ( "always-visible-y" ))}, isVisible : function (){ return $ ( this . el ). find ( ".ps-scrollbar-y-rail" ). is ( ":visible" )}}),{ isMouseCapture : function (){ return t }})}()}), define ( "common/main/lib/view/About" ,[ "common/main/lib/component/BaseView" , "common/main/lib/component/Scroller" ], function (){ "use strict" ; Common . Views . About = Common . UI . BaseView . extend ( _ . extend ({ menu : void 0 , options : { alias : "Common.Views.About" }, initialize : function ( t ){ Common . UI . BaseView . prototype . initialize . call ( this , arguments ), this . txtVersionNum = "0.0.0" , this . template = _ . template ([ '<table id="id-about-licensor-logo" cols="1" style="width: 100%; margin-top: 20px;">' , "<tr>" , '<td align="center"><div class="asc-about-office"></div></td>' , "</tr>" , "<tr>" , '<td align="center"><label class="asc-about-version">' + t . appName . toUpperCase () + "</label></td>" , "</tr>" , "<tr>" , '<td align="center"><label class="asc-about-version" id="id-about-licensor-version-name">' + this . txtVersion + this . txtVersionNum + "</label></td>" , "</tr>" , "</table>" , '<table id="id-about-licensor-info" cols="3" style="width: 100%;" class="margin-bottom">' , "<tr>" , '<td colspan="3" align="center" style="padding: 20px 0 10px 0;"><label class="asc-about-companyname"><%= publishername %></label></td>' , "</tr>" , "<tr>" , '<td colspan="3" align=
items:i,scope:e})),this.itemsTemplate&&this.cmpEl.find("ul").html($(this.itemsTemplate({items:i,scope:e}))),t?(this.setElement(t,!1),t.html(this.cmpEl)):$(this.el).html(this.cmpEl)}if(!e.rendered){var n=this.cmpEl;if(this._input=n.find("input"),this._button=n.find(".btn"),n.on("click","a",_.bind(this.itemClicked,this)),n.on("mousedown","a",_.bind(this.itemMouseDown,this)),this.editable?(n.on("change","input",_.bind(this.onInputChanged,this)),n.on("keydown","input",_.bind(this.onInputKeyDown,this)),n.on("focusin","input",_.bind(this.onInputFocusIn,this)),n.on("click",".form-control",_.bind(this.onEditableInputClick,this))):(n.on("click",".form-control",_.bind(this.onInputClick,this)),this._input.attr("readonly","readonly"),this._input.attr("data-can-copy",!1)),e.options.hint){n.attr("data-toggle","tooltip"),n.tooltip({title:e.options.hint,placement:e.options.hintAnchor||"cursor"});var o=n.closest(".asc-window");o.length>0&&n.data("bs.tooltip").tip().css("z-index",parseInt(o.css("z-index"))+10),n.find(".dropdown-menu").on("mouseenter",function(){var t=n.data("bs.tooltip");t&&(void 0===t.dontShow&&(t.dontShow=!0),t.hide())})}n.on("show.bs.dropdown",_.bind(e.onBeforeShowMenu,e)),n.on("shown.bs.dropdown",_.bind(e.onAfterShowMenu,e)),n.on("hide.bs.dropdown",_.bind(e.onBeforeHideMenu,e)),n.on("hidden.bs.dropdown",_.bind(e.onAfterHideMenu,e)),n.on("keydown.after.bs.dropdown",_.bind(e.onAfterKeydownMenu,e)),Common.NotificationCenter.on("menumanager:hideall",_.bind(e.closeMenu,e)),this.setDefaultSelection(),this.listenTo(this.store,"reset",this.onResetItems)}return e.rendered=!0,e.disabled&&e.setDisabled(e.disabled),this},setData:function(t){this.store.reset([]),this.store.add(t),this.setRawValue(""),this.onResetItems()},openMenu:function(t){var e=this;this.scroller||(this.scroller=new Common.UI.Scroller(_.extend({el:$(".dropdown-menu",this.cmpEl),minScrollbarLength:40,scrollYMarginOffset:30,includePadding:!0,wheelSpeed:10,alwaysVisibleY:this.scrollAlwaysVisible},this.options.scroller))),_.delay(function(){e.cmpEl.addClass("open")},t||0)},closeMenu:function(){this.cmpEl.removeClass("open")},isMenuOpen:function(){return this.cmpEl.hasClass("open")},onBeforeShowMenu:function(t){if(this.scroller||(this.scroller=new Common.UI.Scroller(_.extend({el:$(".dropdown-menu",this.cmpEl),minScrollbarLength:40,scrollYMarginOffset:30,includePadding:!0,wheelSpeed:10,alwaysVisibleY:this.scrollAlwaysVisible},this.options.scroller))),Common.NotificationCenter.trigger("menu:show"),this.trigger("show:before",this,t),this.options.hint){var e=this.cmpEl.data("bs.tooltip");e&&(void 0===e.dontShow&&(e.dontShow=!0),e.hide())}},onAfterShowMenu:function(t){var e=$(this.el).find("ul"),i=e.find("> li.selected");if(i.length){var n=i.position().top,o=i.height(),s=e.height();(n<0||n+o>s)&&e.scrollTop(e.scrollTop()+n+o-s/2),setTimeout(function(){i.find("a").focus()},1)}this.scroller&&this.scroller.update({alwaysVisibleY:this.scrollAlwaysVisible}),this.trigger("show:after",this,t),this._search={}},onBeforeHideMenu:function(t){this.trigger("hide:before",this,t),Common.UI.Scroller.isMouseCapture()&&t.preventDefault()},onAfterHideMenu:function(t,e){this.cmpEl.find(".dropdown-toggle").blur(),this.trigger("hide:after",this,t,e),Common.NotificationCenter.trigger("menu:hide",this,e)},onAfterKeydownMenu:function(t){if(t.keyCode==Common.UI.Keys.RETURN){$(t.target).click();var e=this;return this.rendered&&(Common.Utils.isIE?this._input.trigger("change",{onkeydown:!0}):this._input.blur()),!1}if(t.keyCode==Common.UI.Keys.ESC&&this.isMenuOpen())return this.closeMenu(),this.onAfterHideMenu(t),!1;if(this.search&&t.keyCode>64&&t.keyCode<91&&t.key){var e=this;if(clearTimeout(this._search.timer),this._search.timer=setTimeout(function(){e._search={}},1e3),!this._search.text&&(this._search.text=""),!this._search.char&&(this._search.char=t.key),this._search.char!==t.key&&(this._search.full=!0),this._search.text+=t.key,void 0===this._search.index){var i=this.cmpEl.find("ul > li").find("> a");this._search.index=i.index(i.filter(":focus"))}this.selectCandidate()}},selectCandidate:function
if(!t.ctrlKey&&!t.metaKey||t.altKey||t.keyCode!=Common.UI.Keys.RETURN){if(t.keyCode===Common.UI.Keys.TAB){var e,i,n;n=this.selectionStart,i=this.selectionEnd,e=$(this),e.val(e.val().substring(0,n)+"\t"+e.val().substring(i)),this.selectionStart=this.selectionEnd=n+1,t.stopImmediatePropagation(),t.preventDefault()}}else{var o=$("#id-comments-change");o&&o.length&&o.click(),t.stopImmediatePropagation()}})},setupLayout:function(){var t=this,e=$(t.el),i=$(".new-comment-ct",t.el),n=($(".add-link-ct",t.el),$("#comments-box",t.el)),o=n.find(" > .layout-item");t.layout=new Common.UI.VBoxLayout({box:n,freeze:!0,items:[{el:o[0],rely:!0,resize:{hidden:!1,autohide:!1,fmin:function(){var e=n.height();return"none"!==i.css("display")&&.5*e<t.newCommentHeight?e-t.newCommentHeight:.5*e},fmax:function(){return"none"!==i.css("display")?n.height()-t.newCommentHeight:n.height()-t.addCommentHeight}}},{el:o[1],stretch:!0},{el:o[2],stretch:!0}]}),t.layout.on("layout:resizedrag",function(){t.updateScrolls(),t.textBoxAutoSizeLocked=!0},this),$(window).on("resize",function(){if("none"!==e.css("display")){var i=$("#comments-box",t.el).height(),n=$(".new-comment-ct",t.el),o=$(".add-link-ct",t.el);"none"!==n.css("display")?t.layout.setResizeValue(0,Math.max(-t.newCommentHeight,Math.min(i-(n.height()+4),i-t.newCommentHeight))):t.layout.setResizeValue(0,Math.max(-t.addCommentHeight,Math.min(i-o.height(),i-t.addCommentHeight))),t.updateScrolls()}}),this.autoHeightTextBox()},changeLayout:function(t){var e=this,i=$(".new-comment-ct",this.el),n=$(".add-link-ct",this.el),o=$(".messages-ct",this.el);if(o.toggleClass("stretch",!t.canComments),t.canComments){var s=$("#comments-box",this.el),a=s.find(" > .layout-item");n.show(),this.layout.changeLayout([{el:a[0],rely:!0,resize:{hidden:!1,autohide:!1,fmin:function(){var t=s.height();return"none"!==i.css("display")&&.5*t<e.newCommentHeight?t-e.newCommentHeight:.5*t},fmax:function(){return"none"!==i.css("display")?s.height()-e.newCommentHeight:s.height()-e.addCommentHeight}}},{el:a[1],stretch:!0},{el:a[2],stretch:!0}])}else i.hide(),n.hide(),this.layout.changeLayout([{el:o[0],rely:!1,stretch:!0}])},updateLayout:function(){var t=$("#comments-box",this.el);"none"!==$(".new-comment-ct",this.el).css("display")?this.layout.setResizeValue(0,t.height()-this.newCommentHeight):this.layout.setResizeValue(0,t.height()-this.addCommentHeight)},autoHeightTextBox:function(){function t(){var t,o,s;if(t=$("#comment-msg-new",e.el),s=$("#comments-box",e.el).height(),0==t.val().length)return e.layout.setResizeValue(0,Math.max(-e.newCommentHeight,s-e.newCommentHeight)),void(e.textBoxAutoSizeLocked=void 0);_.isUndefined(e.textBoxAutoSizeLocked)&&(t.height(),o=t.get(0).scrollHeight,t.css({height:n+"px"}),t.height(),o=Math.max(t.get(0).scrollHeight+i,48),t.css({height:"100%"}),s=$("#comments-box",e.el).height(),e.layout.setResizeValue(0,Math.max(-e.newCommentHeight,Math.min(s-o-48,s-e.newCommentHeight))))}var e=this,i=0,n=44,o=$("#comment-msg-new",this.el);o.length<1||(i=.25*parseInt(o.css("lineHeight"),10),t(),o.bind("input propertychange",t),this.textBox=o)},getFixedQuote:function(t){return Common.Utils.String.ellipsis(Common.Utils.String.htmlEncode(t),120,!0)},getUserName:function(t){return Common.Utils.String.htmlEncode(t)},pickLink:function(t){var e,i,n=[];t=Common.Utils.String.htmlEncode(t),t.replace(Common.Utils.ipStrongRe,function(t){return e=arguments[arguments.length-2],n.push({start:e,end:t.length+e,str:' < a href = "'+t+'" target = "_blank" data - can - copy = "true" > '+t+"</a>"}),""}),(t.length<1e3||t.search(/\S{255,}/)<0)&&t.replace(Common.Utils.hostnameStrongRe,function(t){var o=/(((^https?)|(^ftp)):\/\/)/i.test(t)?t:"http://"+t;return e=arguments[arguments.length-2],i=t.length,_.find(n,function(t){return e>=t.start&&e<t.end||e<=t.start&&e+i>t.start})||n.push({start:e,end:i+e,str:' < a href = "'+o+'" target = "_blank" data - can - copy = "true" > '+t+"</a>"}),""}),t.replace(Common.Utils.emailStrongRe,function(t){var o=/((^mailto:)\/\/)/i.test(t)?t:"mailto:"+t;return e=arguments[arguments.length-2],i=t.length,_.find(n,function(t){return e>=t.start&&e
this.menuLookin&&this.menuLookin.menu.items[1].setDisabled(!1),this.setHeight(170)):(this.txtSearch.removeClass("clear"),this.setTitle(this.textTitle),"search"===t?(e.eq(2).show(),this.lblReplace.text(this.txtBtnReplace),e.eq(1).hide(),this.$window.find(".btn[result=replace]").hide(),this.$window.find(".btn[result=replaceall]").hide(),this.menuLookin&&this.menuLookin.menu.items[1].setDisabled(!1),this.setHeight(200)):(e.eq(2).show(),this.lblReplace.text(this.txtBtnHideReplace),e.eq(1).show(),this.$window.find(".btn[result=replace]").show(),this.$window.find(".btn[result=replaceall]").show(),this.menuLookin&&(this.menuLookin.menu.items[0].setChecked(!0),this.menuLookin.menu.items[1].setDisabled(!0)),this.setHeight(230)))},setSearchText:function(t){this.txtSearch&&this.txtSearch.val(t)},onShowReplace:function(t){this.setMode("replace"==this.mode?"search":"replace");var e=this;_.defer(function(){"replace"==e.mode?e.txtReplace.focus():e.txtSearch.focus()},300)},onHighlight:function(t,e){this.fireEvent("search:highlight",[this,e])},getSettings:function(){return{textsearch:this.txtSearch.val(),matchcase:this.miMatchCase.checked,matchword:this.miMatchWord.checked}},textTitle:"Search & Replace",textTitle2:"Search",txtBtnReplace:"Replace",txtBtnReplaceAll:"Replace All",textMatchCase:"Case sensitive",textWholeWords:"Whole words only",textHighlight:"Highlight results",textReplaceDef:"Enter the replacement text",textSearchStart:"Enter text for search",txtBtnHideReplace:"Hide Replace"},Common.UI.SearchDialog||{}))}),define("text!documenteditor/main/app/template/FileMenu.template",[],function(){return' < div class = "panel-menu" > \ r \ n < li class = "fm-first-item" /> \ r \ n < li id = "fm-btn-return" class = "fm-btn" /> \ r \ n < li class = "devider" /> \ r \ n < li id = "fm-btn-save" class = "fm-btn" /> \ r \ n < li id = "fm-btn-edit" class = "fm-btn" /> \ r \ n < li id = "fm-btn-download" class = "fm-btn" /> \ r \ n < li id = "fm-btn-save-copy" class = "fm-btn" /> \ r \ n < li id = "fm-btn-save-desktop" class = "fm-btn" /> \ r \ n < li id = "fm-btn-print" class = "fm-btn" /> \ r \ n < li id = "fm-btn-rename" class = "fm-btn" /> \ r \ n < li id = "fm-btn-protect" class = "fm-btn" /> \ r \ n < li class = "devider" /> \ r \ n < li id = "fm-btn-recent" class = "fm-btn" /> \ r \ n < li id = "fm-btn-create" class = "fm-btn" /> \ r \ n < li class = "devider" /> \ r \ n < li id = "fm-btn-info" class = "fm-btn" /> \ r \ n < li id = "fm-btn-rights" class = "fm-btn" /> \ r \ n < li id = "fm-btn-history" class = "fm-btn" /> \ r \ n < li class = "devider" class = "fm-btn" /> \ r \ n < li id = "fm-btn-settings" class = "fm-btn" /> \ r \ n < li class = "devider" /> \ r \ n < li id = "fm-btn-help" class = "fm-btn" /> \ r \ n < li class = "devider" /> \ r \ n < li id = "fm-btn-back" class = "fm-btn" /> \ r \ n < /div>\r\n<div class="panel-context">\r\n <div id="panel-saveas" class="content-box" / > \ r \ n < div id = "panel-savecopy" class = "content-box" /> \ r \ n < div id = "panel-recentfiles" class = "content-box" /> \ r \ n < div id = "panel-createnew" class = "content-box" /> \ r \ n < div id = "panel-info" class = "content-box" /> \ r \ n < div id = "panel-rights" class = "content-box" /> \ r \ n < div id = "panel-settings" class = "content-box" /> \ r \ n < div id = "panel-help" class = "content-box" /> \ r \ n < div id = "panel-protect" class = "content-box" /> \ r \ n < /div>'}),define("documenteditor/main/app/view/FileMenu",["text!documenteditor/main/app/template/FileMenu.template","underscore","common/main/lib/component/BaseView"],function(t,e){"use strict";DE.Views.FileMenu=Common.UI.BaseView.extend(e.extend({el:"#file-menu-panel",options:{alias:"FileMenu"},template:e.template(t),events:function(){return{"click .fm-btn":e.bind(function(t){var i=$(t.currentTarget);i.hasClass("active")||($(".fm-btn",this.el).removeClass("active"),i.addClass("active"));var n=e.findWhere(this.items,{el:t.currentTarget});if(n){var o=this.panels[n.options.action];this.fireEvent("item:click",[this,n.options.action,!!o]),o&&(this.$el.find(".content-box:visible").hide(),this.active=n.options.action,o.show())}},this)}},initialize:function(){},render:function(){this.$el=$(this.el),this.$el.html(this.template()),this.miSave=new Common.UI.MenuItem({el:$(
template : _ . template ([ '<div id="hdr-menu-zoom" class="menu-zoom" style="height: 25px;" ' , "<% if(!_.isUndefined(options.stopPropagation)) { %>" , 'data-stopPropagation="true"' , "<% } %>" , ">" , '<label class="title">' + e . header . textZoom + "</label>" , '<button id="hdr-menu-zoom-in" type="button" style="float:right; margin: 2px 5px 0 0;" class="btn small btn-toolbar"><i class="icon btn-zoomup"> </i></button>' , '<label class="zoom"><%= options.value %>%</label>' , '<button id="hdr-menu-zoom-out" type="button" style="float:right; margin-top: 2px;" class="btn small btn-toolbar"><i class="icon btn-zoomdown"> </i></button>' , "</div>" ]. join ( "" )), stopPropagation :! 0 , value : e . header . mnuZoom . options . value }), e . header . btnOptions . setMenu ( new Common . UI . Menu ({ cls : "pull-right" , style : "min-width: 180px;" , items : [ e . header . mnuitemCompactToolbar , n , o ,{ caption : "--" }, e . header . mnuitemFitPage , e . header . mnuitemFitWidth , e . header . mnuZoom ,{ caption : "--" }, new Common . UI . MenuItem ({ caption : e . header . textAdvSettings , value : "advanced" })]})); var s = function ( t ){ "up" == t ? e . api . zoomIn () : e . api . zoomOut (), Common . NotificationCenter . trigger ( "edit:complete" , e . header )}; new Common . UI . Button ({ el : $ ( "#hdr-menu-zoom-out" , e . header . mnuZoom . $el ), cls : "btn-toolbar" }). on ( "click" , s . bind ( e , "down" )), new Common . UI . Button ({ el : $ ( "#hdr-menu-zoom-in" , e . header . mnuZoom . $el ), cls : "btn-toolbar" }). on ( "click" , s . bind ( e , "up" )), e . header . btnOptions . menu . on ( "item:click" , e . onOptionsItemClick . bind ( this ))}}, onLayoutChanged : function ( t ){ switch ( t ){ default : this . viewport . vlayout . doLayout (); case "rightmenu" : this . viewport . hlayout . doLayout (); break ; case "history" : var e = this . viewport . hlayout . items [ 1 ]; e . resize . el && ( this . boxSdk . css ( "border-left" , "" ), e . resize . el . show ()), this . viewport . hlayout . doLayout (); break ; case "leftmenu" : var e = this . viewport . hlayout . items [ 0 ]; e . resize . el && ( e . el . width () > 40 ? ( this . boxSdk . css ( "border-left" , "" ), e . resize . el . show ()) : ( e . resize . el . hide (), this . boxSdk . css ( "border-left" , "0 none" ))), this . viewport . hlayout . doLayout (); break ; case "header" : case "toolbar" : case "status" : this . viewport . vlayout . doLayout ()} this . api . Resize ()}, onWindowResize : function ( t ){ this . onLayoutChanged ( "window" ), Common . NotificationCenter . trigger ( "window:resize" )}, onFileMenu : function ( t ){ var e = this , i = "show" == t ; e . header . lockHeaderBtns ( "undo" , i ), e . header . lockHeaderBtns ( "redo" , i ), e . header . lockHeaderBtns ( "opts" , i ), e . header . lockHeaderBtns ( "users" , i )}, onApiZoomChange : function ( t , e ){ this . header . mnuitemFitPage . setChecked ( 2 == e , ! 0 ), this . header . mnuitemFitWidth . setChecked ( 1 == e , ! 0 ), this . header . mnuZoom . options . value = t , this . header . mnuZoom . $el && $ ( ".menu-zoom label.zoom" , this . header . mnuZoom . $el ). html ( t + "%" )}, onOptionsItemClick : function ( t , e , i ){ var n = this ; switch ( e . value ){ case "toolbar" : n . header . fireEvent ( "toolbar:setcompact" ,[ t , e . isChecked ()]); break ; case "statusbar" : n . header . fireEvent ( "statusbar:hide" ,[ e , e . isChecked ()]); break ; case "rulers" : n . api . asc_SetViewRulers ( ! e . isChecked ()), Common . localStorage . setBool ( "de-hidden-rulers" , e . isChecked ()), Common . NotificationCenter . trigger ( "layout:changed" , "rulers" ), Common . NotificationCenter . trigger ( "edit:complete" , n . header ); break ; case "zoom:page" : e . isChecked () ? n . api . zoomFitToPage () : n . api . zoomCustomMode (), Common . NotificationCenter . trigger ( "edit:complete" , n . header ); break ; case "zoom:width" : e . isChecked () ? n . api . zoomFitToWidth () : n . api . zoomCustomMode (), Common . NotificationCenter . trigger ( "edit:complete" , n . header ); break ; case "advanced" : n . header . fireEvent ( "file:settings" , n . header )}}, onApiCoAuthoringDisconnect : function ( t ){ this . header && ( this . header . btnDownload &&! t && this . header . btnDownload . hide (), this . header . btnPrint &&! t && this . header . btnPrint . hide (), this . header . btnEdit && this . header . btnEdit . hide ())}, textFitPage : "Fit to Page" , textFitWidth : "Fit to Width" }, DE . Controllers . Viewport ))}), $ ( document ). off ( "keydown.bs.dropdown.data-api" ). on ( "keydown.bs.dropdown.data-api" , "[data-toggle=dropdown], [role=menu]" , onDropDownKeyDown ), "ontouchstart" in document . documentElement && $ ( document ). on ( "click.bs.dropdown.data-api" , "[data-toggle=dropdown]" , toggle ), function (){ function t ( t ){ 1 != t . which && void 0 != t . which || clearMenus ( /form-control/ . test ( t . target . className ))} var e , i = $ . _data ( $ ( docu
return '<div id="id-adv-dropcap-frame" class="settings-panel">\n <div class="inner-content">\n <table cols="3" style="width: 100%">\n <tr>\n <td colspan="3">\n <label class="header padding-small"><%= scope.textPosition %></label>\n </td>\n </tr>\n <tr>\n <td colspan="3" class="settins-cell padding-large">\n <span id="frame-advanced-button-none" style="margin-right:5px;"></span>\n <span id="frame-advanced-button-inline" style="margin-right:5px;"></span>\n <span id="frame-advanced-button-flow"></span>\n </td>\n </tr>\n <tr>\n <td class="padding-small" colspan="3">\n <div class="separator horizontal"></div>\n </td>\n </tr>\n <tr>\n <td class="settins-cell padding-small" width="80">\n <label class="input-label"><%= scope.textWidth %></label>\n </td>\n <td class="settins-cell padding-small" width="130" style="padding-right: 10px;">\n <div id="frame-advanced-input-widthtype"></div>\n </td>\n <td class="settins-cell padding-small" width="95">\n <div id="frame-advanced-input-width"></div>\n </td>\n </tr>\n <tr>\n <td class="settins-cell padding-small" width="80">\n <label class="input-label"><%= scope.textHeight %></label>\n </td>\n <td class="settins-cell padding-small" width="130" style="padding-right: 10px;">\n <div id="frame-advanced-input-heighttype"></div>\n </td>\n <td class="settins-cell padding-small" width="95">\n <div id="frame-advanced-input-height"></div>\n </td>\n </tr>\n <tr>\n <td class="padding-small" colspan="3">\n <div class="separator horizontal"></div>\n </td>\n </tr>\n <tr>\n <td colspan="3">\n <label class="header"><%= scope.textHorizontal %></label>\n </td>\n </tr>\n <tr>\n <td colspan="2"></td>\n <td class="settins-cell">\n <label class="input-label"><%= scope.textRelative %></label>\n </td>\n </tr>\n <tr>\n <td class="settins-cell padding-small" width="80">\n <label class="input-label"><%= scope.textPosition %></label>\n </td>\n <td class="settins-cell padding-small" width="130" style="padding-right: 10px;">\n <div id="frame-advanced-input-hposition"></div>\n </td>\n <td class="settins-cell padding-small" width="95">\n <div id="frame-advanced-input-hrelative"></div>\n </td>\n </tr>\n <tr>\n <td class="settins-cell padding-small" colspan="2" style="padding-right: 10px;">\n <label class="input-label" style="float: right;"><%= scope.textDistance %></label>\n </td>\n <td class="settins-cell padding-small">\n <div id="frame-advanced-input-hdist"></div>\n </td>\n </tr>\n <tr>\n <td class="padding-small" colspan="3">\n <div class="separator horizontal"></div>\n </td>\n </tr>\n <tr>\n <td colspan="3">\n <label class="header"><%= scope.textVertical %></label>\n </td>\n </tr>\n <tr>\n <td colspan="2"></td>\n <td class="settins-cell">\n <label class="input-label"><%= scope.textRelative %></label>\n </td>\n
Common.UI.CustomSpinner=Common.UI.MetricSpinner.extend(_.extend({initialize:function(t){this.options.toCustomFormat=t.toCustomFormat?t.toCustomFormat:function(t){return t},this.options.fromCustomFormat=t.fromCustomFormat?t.fromCustomFormat:function(t){return t},Common.UI.MetricSpinner.prototype.initialize.call(this,t)},setRawValue:function(t){this.$input&&this.$input.val(this.options.toCustomFormat(t))},getRawValue:function(){return this.options.fromCustomFormat(this.$input.val())}},Common.UI.CustomSpinner||{}))}),void 0===Common)var Common={};if(define("common/main/lib/component/TableStyler",["common/main/lib/component/BaseView"],function(){"use strict";Common.UI.CellStyler=Common.UI.BaseView.extend({options:{clickOffset:10,overwriteStyle:!0,maxBorderSize:6,halfBorderSize:!1,defaultBorderSize:1,defaultBorderColor:"#ccc"},template:_.template([' < div id = "<%=id%>" class = "tablestyler-cell" style = "" > ',' < div class = "cell-content" style = "" > ',' < div class = "content-text" >< /div>',"</div>","</div>"].join("")),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,t);var e,i,n=this,o=void 0,s={},a={},r={};n.id=n.options.id||Common.UI.getId(),n.clickOffset=n.options.clickOffset,n.overwriteStyle=n.options.overwriteStyle,n.maxBorderSize=n.options.maxBorderSize,n.halfBorderSize=n.options.halfBorderSize,n.defaultBorderSize=n.options.defaultBorderSize,n.defaultBorderColor=n.options.defaultBorderColor,n.col=n.options.col,n.row=n.options.row,e=n.defaultBorderSize,i=new Common.Utils.RGBColor(n.defaultBorderColor),s={top:e,right:e,bottom:e,left:e},a={top:i,right:i,bottom:i,left:i},r={top:1,right:1,bottom:1,left:1},n.rendered=!1;var l=function(){if(!_.isUndefined(o)){var t=s.left>.1&&s.left<1?1:s.left,e=Math.abs(n.halfBorderSize?.5*(t%2?t-1:t):t);t=s.right>.1&&s.right<1?1:s.right;var i=Math.abs(n.halfBorderSize?.5*(t%2?t+1:t):t);t=s.top>.1&&s.top<1?1:s.top;var l=Math.abs(n.halfBorderSize?.5*(t%2?t-1:t):t);t=s.bottom>.1&&s.bottom<1?1:s.bottom;var c=Math.abs(n.halfBorderSize?.5*(t%2?t+1:t):t),d="inset "+(e>.1&&e<1?1:e)+"px 0 0 "+a.left.toRGBA(r.left)+", inset "+-1*(i>.1&&i<1?1:i)+"px 0 0 "+a.right.toRGBA(r.right)+", inset 0 "+(l>.1&&l<1?1:l)+"px 0 "+a.top.toRGBA(r.top)+", inset 0 "+-1*(c>.1&&c<1?1:c)+"px 0 "+a.bottom.toRGBA(r.bottom);o.css("box-shadow",d)}};n.on("render:after",function(t){this.cmpEl&&(o=this.cmpEl.find(".cell-content"),l()),this.cmpEl.on("click",function(t){var o={x:t.pageX*Common.Utils.zoom()-n.cmpEl.offset().left,y:t.pageY*Common.Utils.zoom()-n.cmpEl.offset().top},c=function(t,e,i,n,o){var s,a,r=0;for(s=0,a=t-1;s<t;a=s++)(i[s]<=o&&o<i[a]||i[a]<=o&&o<i[s])&&n<(e[a]-e[s])*(o-i[s])/(i[a]-i[s])+e[s]&&(r=!r);return r},d=n.cmpEl.outerWidth(),h=n.cmpEl.outerHeight();c(4,[0,d,d-n.clickOffset,n.clickOffset],[0,0,n.clickOffset,n.clickOffset],o.x,o.y)?(n.overwriteStyle?s.top==e&&a.top.isEqual(i)?s.top=0:(s.top=e,a.top=i,r.top=e<1?.3:1):(s.top=s.top>0?0:e,a.top=i),n.fireEvent("borderclick",n,"t",s.top,a.top.toHex())):c(4,[d,d,d-n.clickOffset,d-n.clickOffset],[0,h,h-n.clickOffset,n.clickOffset],o.x,o.y)?(n.overwriteStyle?s.right==e&&a.right.isEqual(i)?s.right=0:(s.right=e,a.right=i,r.right=e<1?.3:1):(s.right=s.right>0?0:e,a.right=i),n.fireEvent("borderclick",n,"r",s.right,a.right.toHex())):c(4,[0,n.clickOffset,d-n.clickOffset,d],[h,h-n.clickOffset,h-n.clickOffset,h],o.x,o.y)?(n.overwriteStyle?s.bottom==e&&a.bottom.isEqual(i)?s.bottom=0:(s.bottom=e,a.bottom=i,r.bottom=e<1?.3:1):(s.bottom=s.bottom>0?0:e,a.bottom=i),n.fireEvent("borderclick",n,"b",s.bottom,a.bottom.toHex())):c(4,[0,n.clickOffset,n.clickOffset,0],[0,n.clickOffset,h-n.clickOffset,h],o.x,o.y)&&(n.overwriteStyle?s.left==e&&a.left.isEqual(i)?s.left=0:(s.left=e,a.left=i,r.left=e<1?.3:1):(s.left=s.left>0?0:e,a.left=i),n.fireEvent("borderclick",n,"l",s.left,a.left.toHex())),l()})}),n.setBordersSize=function(t,e){e=e>this.maxBorderSize?this.maxBorderSize:e,t.indexOf("t")>-1&&(s.top=e,r.top=e<1?.3:1),t.indexOf("r")>-1&&(s.right=e,r.right=e<1?.3:1),t.indexOf("b")>-1&&(s.bottom=e,r.bottom=e<1?.3:1),t.indexOf("l")>-1&&(s.left=e,r.left=e<1?.3:1),l()},n.setBordersColor=func
i . trigger ( "select" , i , "transparent" ); else if ( n [ 0 ]. className . search ( "color-dynamic" ) < 0 ) if (( ! /^[a-fA-F0-9]{6}$/ . test ( i . value ) || _ . indexOf ( i . colors , i . value ) < 0 ) && ( i . value =! 1 ), $ ( i . el ). find ( "a." + i . selectedCls ). removeClass ( i . selectedCls ), n . addClass ( i . selectedCls ), e = n [ 0 ]. className . match ( i . colorRe )[ 1 ], n . hasClass ( "palette-color-effect" )){ var o = parseInt ( n . attr ( "effectid" )); e && ( i . value = e . toUpperCase (), i . trigger ( "select" , i ,{ color : e , effectId : o }))} else /#?[a-fA-F0-9]{6}/ . test ( e ) && ( e = /#?([a-fA-F0-9]{6})/ . exec ( e )[ 1 ]. toUpperCase (), i . value = e , i . trigger ( "select" , i , e )); else /dynamic-empty-color/ . test ( n [ 0 ]. className ) ? setTimeout ( function (){ i . addNewColor ()}, 10 ) : ( $ ( i . el ). find ( "a." + i . selectedCls ). removeClass ( i . selectedCls ), n . addClass ( i . selectedCls ), e = n . attr ( "color" ), e && i . trigger ( "select" , i , e ), i . value = e . toUpperCase ())}, setCustomColor : function ( t ){ var e = $ ( this . el ); if ( t = /#?([a-fA-F0-9]{6})/ . exec ( t )){ this . saveCustomColor ( t [ 1 ]), e . find ( "a." + this . selectedCls ). removeClass ( this . selectedCls ); var i = e . find ( ".dynamic-empty-color" ); 0 == i . length && ( this . updateCustomColors (), i = e . find ( ".color-dynamic-" + ( this . options . dynamiccolors - 1 ))), i . first (). removeClass ( "dynamic-empty-color" ). addClass ( this . selectedCls ). attr ( "color" , t [ 1 ]), i . first (). find ( "span" ). css ({ "background-color" : "#" + t [ 1 ]}), this . select ( t [ 1 ], ! 0 )}}, saveCustomColor : function ( t ){ var e = "asc." + Common . localStorage . getId () + ".colors.custom" , i = Common . localStorage . getItem ( e ); i = i ? i . split ( "," ) : [], i . push ( t ) > this . options . dynamiccolors && i . shift (), Common . localStorage . setItem ( e , i . join (). toUpperCase ())}, addNewColor : function ( t ){ var e = this , i = new Common . UI . ExtendedColorDialog ({}); i . on ( "onmodalresult" , function ( t ){ e . _isdlgopen =! 1 , 1 == t && ( e . setCustomColor ( i . getColor ()), e . fireEvent ( "select" , e , i . getColor ()))}), e . _isdlgopen =! 0 , i . setColor ( void 0 !== e . value &&! 1 !== e . value ? e . value : void 0 !== t ? t : "000000" ), i . show ()}, isDialogOpen : function (){ return 1 == this . _isdlgopen }, select : function ( t , e ){ var i = $ ( this . el ); if ( i . find ( "a." + this . selectedCls ). removeClass ( this . selectedCls ), "object" == typeof t ){ var n ; void 0 !== t . effectId ? ( n = i . find ( 'a[effectid="' + t . effectId + '"]' ). first (), n . length > 0 ? ( n . addClass ( this . selectedCls ), this . value = n [ 0 ]. className . match ( this . colorRe )[ 1 ]. toUpperCase ()) : this . value =! 1 ) : void 0 !== t . effectValue && ( n = i . find ( 'a[effectvalue="' + t . effectValue + '"].color-' + t . color . toUpperCase ()). first (), n . length > 0 ? ( n . addClass ( this . selectedCls ), this . value = n [ 0 ]. className . match ( this . colorRe )[ 1 ]. toUpperCase ()) : this . value =! 1 )} else if ( /#?[a-fA-F0-9]{6}/ . test ( t ) && ( t = /#?([a-fA-F0-9]{6})/ . exec ( t )[ 1 ]. toUpperCase (), this . value = t ), /^[a-fA-F0-9]{6}|transparent$/ . test ( t ) && _ . indexOf ( this . colors , t ) >= 0 ) _ . indexOf ( this . colors , this . value ) < 0 && ( this . value =! 1 ),( t != this . value || this . options . allowReselect ) && ( "transparent" == t ? i . find ( "a.color-transparent" ). addClass ( this . selectedCls ) : i . find ( "a.palette-color.color-" + t ). first (). addClass ( this . selectedCls ), this . value = t , ! 0 !== e && this . fireEvent ( "select" , this , t )); else { var o = i . find ( "#" + t ). first (); 0 == o . length && ( o = i . find ( 'a[color="' + t + '"]' ). first ()), o . length > 0 && ( o . addClass ( this . selectedCls ), this . value = t . toUpperCase ())}}, selectByRGB : function ( t , e ){ var i = $ ( this . el ); i . find ( "a." + this . selectedCls ). removeClass ( this . selectedCls ); var n = "object" == typeof t ? t . color : t ; if ( /#?[a-fA-F0-9]{6}/ . test ( n ) && ( n = /#?([a-fA-F0-9]{6})/ . exec ( n )[ 1 ]. toUpperCase ()), /^[a-fA-F0-9]{6}|transparent$/ . test ( n ) && ( n != this . value || this . options . allowReselect )){ var o = "transparent" == n ? i . find ( "a.color-transparent" ) : i . find ( "a.color-" + n ). first (); 0 == o . length && ( o = i . find ( "#" + n ). first ()), 0 == o . length && ( o = i . find ( 'a[color="' + n + '"]' ). first ()), o . length > 0 && ( o . addClass ( this . selectedCls ), this . value = n ), ! 0 !== e && this . fireEvent ( "select" , this , n )}}, updateColors : function ( t , e , i ){ if ( void 0 !== t && void 0 !== e ){ var n = this , o = $ ( this . el ); void 0 === n . aColorElements && ( n . aColorElements = o . find ( "a.palette-color" )), void 0 === n . aEffectElements && ( n . aEffectElements = o . find ( "a.palette-color-effect" )); for ( var s , a = 0 , r = 0 , l = 0 ; l < n . colors . length ; l ++ ) if ( "string" == typeof n . colors [ l ] && /[0-9A-F]{6}/ . test ( n . colors [ l ])){ if ( a >= e . length ) continue ; s = $ ( n . aColorElements [ a ]), s . removeClass ( "color-" + n . colors [ l ]), n . colors [ l ] = e [ a ]. toUpperCase (), s . addClass ( "color-" + n . colo
var s = this . Borders . get_Left (), a = null !== s && void 0 !== s && null !== s . get_Space () && void 0 !== s . get_Space () ? Common . Utils . Metric . fnRecalcFromMM ( s . get_Space ()) : "" ; this . spnMarginLeft . setValue ( a ), s = this . Borders . get_Top (), a = null !== s && void 0 !== s && null !== s . get_Space () && void 0 !== s . get_Space () ? Common . Utils . Metric . fnRecalcFromMM ( s . get_Space ()) : "" , this . spnMarginTop . setValue ( a ), s = this . Borders . get_Right (), a = null !== s && void 0 !== s && null !== s . get_Space () && void 0 !== s . get_Space () ? Common . Utils . Metric . fnRecalcFromMM ( s . get_Space ()) : "" , this . spnMarginRight . setValue ( a ), s = this . Borders . get_Bottom (), a = null !== s && void 0 !== s && null !== s . get_Space () && void 0 !== s . get_Space () ? Common . Utils . Metric . fnRecalcFromMM ( s . get_Space ()) : "" , this . spnMarginBottom . setValue ( a )} var r = e . get_Shade (); if ( null !== r && void 0 !== r && r . get_Value () === Asc . c_oAscShdClear ){ var l = r . get_Color (); l ? l . get_type () == Asc . c_oAscColor . COLOR_TYPE_SCHEME ? this . paragraphShade = { color : Common . Utils . ThemeColor . getHexColor ( l . get_r (), l . get_g (), l . get_b ()), effectValue : l . get_value ()} : this . paragraphShade = Common . Utils . ThemeColor . getHexColor ( l . get_r (), l . get_g (), l . get_b ()) : this . paragraphShade = "transparent" } else this . paragraphShade = "transparent" ; if ( this . btnBackColor . setColor ( this . paragraphShade ), _ . isObject ( this . paragraphShade )){ for ( var c =! 1 , n = 0 ; n < 10 ; n ++ ) if ( Common . Utils . ThemeColor . ThemeValues [ n ] == this . paragraphShade . effectValue ){ this . colorsBack . select ( this . paragraphShade , ! 0 ), c =! 0 ; break } c || this . colorsBack . clearSelection ()} else this . colorsBack . select ( this . paragraphShade , ! 0 ); this . _UpdateBorders ()} this . _noApply =! 1 , this . _changedProps = new Asc . asc_CParagraphFrame , this . isFrame && e && void 0 !== e . get_W () && this . _changedProps . put_W ( e . get_W ()), this . ChangedBorders = void 0 }}, _DisableElem : function ( t ){ var e = t === Asc . c_oAscDropCap . None || t === c_oAscFrameWrap . None ; _ . each ( this . btnsCategory , function ( t ){ "id-adv-dropcap-borders" != t . options . contentTarget && "id-adv-dropcap-margins" != t . options . contentTarget || t . setDisabled ( e )}), this . isFrame ? ( e = t == c_oAscFrameWrap . None , this . cmbHAlign . setDisabled ( e ), this . cmbHRelative . setDisabled ( e ), this . spnX . setDisabled ( e ), this . cmbVAlign . setDisabled ( e ), this . cmbVRelative . setDisabled ( e ), this . spnY . setDisabled ( e ), this . chMove . setDisabled ( e ), this . cmbWidth . setDisabled ( e ), this . cmbHeight . setDisabled ( e ), this . spnWidth . setDisabled ( e ), this . spnHeight . setDisabled ( e )) : ( e = t == Asc . c_oAscDropCap . None , this . spnRowHeight . setDisabled ( e ), this . numDistance . setDisabled ( e ), this . cmbFonts . setDisabled ( e ))}, _UpdateBorders : function (){ var t = this . BorderSize , e = this . btnBorderColor . color ; if ( this . _UpdateBorder ( this . Borders . get_Left (), "l" ), this . _UpdateBorder ( this . Borders . get_Top (), "t" ), this . _UpdateBorder ( this . Borders . get_Right (), "r" ), this . _UpdateBorder ( this . Borders . get_Bottom (), "b" ), null !== this . Borders . get_Between ()) for ( var i = 0 ; i < this . tableStyler . columns ; i ++ ) this . _UpdateCellBorder ( this . Borders . get_Between (), "b" , this . tableStyler . getCell ( i , 0 )), this . _UpdateCellBorder ( this . Borders . get_Between (), "t" , this . tableStyler . getCell ( i , 1 )); this . tableStyler . setVirtualBorderSize ( t . pxValue ), this . tableStyler . setVirtualBorderColor ( "object" == typeof e ? e . color : e )}, _UpdateCellBorder : function ( t , e , i ){ null !== t && void 0 !== t && null !== t . get_Value () && null !== t . get_Size () && null !== t . get_Color () && 1 == t . get_Value () ? ( i . setBordersSize ( e , this . _BorderPt2Px ( 72 * t . get_Size () / 25.4 )), i . setBordersColor ( e , "rgb(" + t . get_Color (). get_r () + "," + t . get_Color (). get_g () + "," + t . get_Color (). get_b () + ")" )) : i . setBordersSize ( e , 0 )}, _UpdateBorder : function ( t , e ){ null !== t && void 0 !== t && null !== t . get_Value () && null !== t . get_Size () && null !== t . get_Color () && 1 == t . get_Value () ? ( this . tableStyler . setBordersSize ( e , this . _BorderPt2Px ( 72 * t . get_Size () / 25.4 )), this . tableStyler . setBordersColor ( e , "rgb(" + t . get_Color (). get_r () + "," + t . get_Color (). get_g () + "," + t . get_Color (). get_b () + ")" )) : this . tableStyler . setBordersSize ( e , 0 )}, _BorderPt2Px : function ( t ){ return 0 == t ? 0 : t < . 6 ? . 5 : t <= 1 ? 1 : t <= 1.5 ? 2 : t <= 2.25 ? 3 : t <= 3 ? 4 : t <= 4.5 ? 5 : 6 }, _ApplyBorderPreset : function ( t ){ this . ChangedBorders = null , this . Borders . put_Left ( this . _UpdateBorderStyle ( this . Borders . get_Left (), t . indexOf ( "l" ) >- 1 )), this . Borders . put_Top ( this . _UpdateBorderStyle ( this . Borders . get_Top (), t . indexOf ( "t" ) >- 1 )), this . Borders . put_Right ( this .
return '<div id="id-adv-paragraph-indents" class="settings-panel active">\r\n <div class="inner-content">\r\n <div>\r\n <div class="padding-large" style="display: inline-block;">\r\n <label class="input-label"><%= scope.textAlign %></label>\r\n <div id="paragraphadv-spin-text-alignment"></div>\r\n </div>\r\n <div class="padding-large text-only" style="float: right;">\r\n <label class="input-label"><%= scope.strIndentsOutlinelevel %></label>\r\n <div id="paragraphadv-spin-outline-level"></div>\r\n </div>\r\n </div>\r\n <div><label class="header" style="padding-bottom: 4px;"><%= scope.strIndent %></label></div>\r\n <div>\r\n <div class="padding-large" style="display: inline-block;">\r\n <label class="input-label"><%= scope.strIndentsLeftText %></label>\r\n <div id="paragraphadv-spin-indent-left"></div>\r\n </div>\r\n <div class="padding-large" style="display: inline-block;">\r\n <label class="input-label"><%= scope.strIndentsRightText %></label>\r\n <div id="paragraphadv-spin-indent-right"></div>\r\n </div>\r\n <div class="padding-large" style="display: inline-block;">\r\n <div>\r\n <label class="input-label"><%= scope.strIndentsSpecial %></label>\r\n </div>\r\n <div>\r\n <div id="paragraphadv-spin-special" style="display: inline-block;"></div>\r\n <div id="paragraphadv-spin-special-by" style="display: inline-block;"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div><label class="header" style="padding-bottom: 4px;"><%= scope.strSpacing %></label></div>\r\n <div>\r\n <div style="display: inline-block;">\r\n <label class="input-label"><%= scope.strIndentsSpacingBefore %></label>\r\n <div id="paragraphadv-spin-spacing-before"></div>\r\n </div>\r\n <div style="display: inline-block;">\r\n <label class="input-label"><%= scope.strIndentsSpacingAfter %></label>\r\n <div id="paragraphadv-spin-spacing-after"></div>\r\n </div>\r\n <div style="display: inline-block;">\r\n <div>\r\n <label class="input-label"><%= scope.strIndentsLineSpacing %></label>\r\n </div>\r\n <div>\r\n <div id="paragraphadv-spin-line-rule" style="display: inline-block;"></div>\r\n <div id="paragraphadv-spin-line-height" style="display: inline-block;"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="text-only" style="padding-top: 8px;">\r\n <div id="paragraphadv-checkbox-add-interval"></div>\r\n </div>\r\n <div class="padding-large" style="padding-top: 16px; display: none;">\r\n <div style="border: 1px solid #cbcbcb; width: 350px;">\r\n <div id="paragraphadv-indent-preview" style="height: 58px; position: relative;"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<div id="id-adv-paragraph-line" class="settings-panel">\r\n <div class="inner-content text-only" style="padding-right: 0px;" >\r\n <table cols="2" style="width: 100%;">\r\n <tr>\r\n <td class="padding-small">\r\n <div id="paragraphadv-checkbox-break-before"></div>\r\n </td>\r\n <td class="padding-small">\r\n <div id="paragraphadv-checkbox-keep-lines"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td clas
this.spinners.push(this.spnMarginLeft),this.spnMarginRight=new Common.UI.MetricSpinner({el:$("#paraadv-number-margin-right"),step:.1,width:100,defaultUnit:"cm",value:"0.19 cm",maxValue:9.34,minValue:0}),this.spnMarginRight.on("change",_.bind(function(t,e,i,n){this._noApply||(void 0===this.Margins&&(this.Margins={}),this.Margins.Right=Common.Utils.Metric.fnRecalcToMM(t.getNumberValue()))},this)),this.spinners.push(this.spnMarginRight),this.TextOnlySettings=$(".text-only"),this.afterRender()},getSettings:function(){if(null===this.ChangedBorders?this._changedProps.put_Borders(this.Borders):void 0!==this.ChangedBorders&&this._changedProps.put_Borders(this.ChangedBorders),this.Margins){var t=this._changedProps.get_Borders();void 0!==t&&null!==t||(this._changedProps.put_Borders(new Asc.asc_CParagraphBorders),t=this._changedProps.get_Borders()),void 0!==this.Margins.Left&&(void 0!==t.get_Left()&&null!==t.get_Left()||t.put_Left(new Asc.asc_CTextBorder(this.Borders.get_Left())),t.get_Left().put_Space(this.Margins.Left)),void 0!==this.Margins.Top&&(void 0!==t.get_Top()&&null!==t.get_Top()||t.put_Top(new Asc.asc_CTextBorder(this.Borders.get_Top())),t.get_Top().put_Space(this.Margins.Top)),void 0!==this.Margins.Right&&(void 0!==t.get_Right()&&null!==t.get_Right()||t.put_Right(new Asc.asc_CTextBorder(this.Borders.get_Right())),t.get_Right().put_Space(this.Margins.Right)),void 0!==this.Margins.Bottom&&(void 0!==t.get_Bottom()&&null!==t.get_Bottom()||t.put_Bottom(new Asc.asc_CTextBorder(this.Borders.get_Bottom())),t.get_Bottom().put_Space(this.Margins.Bottom),void 0!==t.get_Between()&&null!==t.get_Between()||t.put_Between(new Asc.asc_CTextBorder(this.Borders.get_Between())),t.get_Between().put_Space(this.Margins.Bottom))}if(this._tabListChanged&&(null!==this._changedProps.get_Tabs()&&void 0!==this._changedProps.get_Tabs()||this._changedProps.put_Tabs(new Asc.asc_CParagraphTabs),this.tabList.store.each(function(t,e){var i=new Asc.asc_CParagraphTab(Common.Utils.Metric.fnRecalcToMM(t.get("tabPos")),t.get("tabAlign"),t.get("tabLeader"));this._changedProps.get_Tabs().add_Tab(i)},this)),null!==this._changedProps.get_Ind()&&void 0!==this._changedProps.get_Ind()){var e=this._changedProps.get_Ind().get_Left(),i=this._changedProps.get_Ind().get_FirstLine();(i<0||this.FirstLine<0)&&(i<0||void 0===i||null===i?(void 0!==i&&null!==i||(i=this.FirstLine),void 0!==e&&null!==e||(e=this.LeftIndent),void 0!==e&&null!==e&&this._changedProps.get_Ind().put_Left(e-i)):(void 0!==e&&null!==e||(e=this.LeftIndent),void 0!==e&&null!==e&&this._changedProps.get_Ind().put_Left(e)))}null!==this.Spacing&&this._changedProps.asc_putSpacing(this.Spacing);var n=this.chAddInterval.getValue();this._changedProps.asc_putContextualSpacing("checked"==n);var o=this.cmbTextAlignment.getValue();return this._changedProps.asc_putJc(void 0!==o&&null!==o?o:c_paragraphTextAlignment.LEFT),{paragraphProps:this._changedProps,borderProps:{borderSize:this.BorderSize,borderColor:this.btnBorderColor.color}}},_setDefaults:function(t){if(t){this._originalProps=new Asc.asc_CParagraphProperty(t),this.hideTextOnlySettings(this.isChart),this.FirstLine=null!==t.get_Ind()?t.get_Ind().get_FirstLine():null,this.LeftIndent=null!==t.get_Ind()?t.get_Ind().get_Left():null,this.FirstLine<0&&null!==this.LeftIndent&&(this.LeftIndent=this.LeftIndent+this.FirstLine),this.numIndentsLeft.setValue(null!==this.LeftIndent?Common.Utils.Metric.fnRecalcFromMM(this.LeftIndent):"",!0),this.numIndentsRight.setValue(null!==t.get_Ind()&&null!==t.get_Ind().get_Right()?Common.Utils.Metric.fnRecalcFromMM(t.get_Ind().get_Right()):"",!0),this.numSpacingBefore.setValue(null!==t.get_Spacing()&&null!==t.get_Spacing().get_Before()?Common.Utils.Metric.fnRecalcFromMM(t.get_Spacing().get_Before()):"",!0),this.numSpacingAfter.setValue(null!==t.get_Spacing()&&null!==t.get_Spacing().get_After()?Common.Utils.Metric.fnRecalcFromMM(t.get_Spacing().get_After()):"",!0);var e=t.get_Spacing().get_LineRule();if(this.cmbLineRule.setValue(null!==e?e:"",!0),null!==t.get_Spacing()&&null!==t.get_Spacing().get_Line()?this.numLineHeight.setValue(e==c_pa
return' < div id = "id-adv-table-width" class = "settings-panel active" > \ r \ n < div class = "inner-content" > \ r \ n < table cols = "3" > \ r \ n < tr > \ r \ n < td colspan = "3" class = "padding-small" > \ r \ n < label class = "header" ><%= scope . textTableSize %>< /label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style="vertical-align: bottom; padding-bottom: 11px;">\r\n <div id="tableadv-checkbox-width"></div>\r\n </td>\r\n <td class="padding-small">\r\n <label class="input-label"><%= scope.textWidth %></label>\r\n <div id="tableadv-number-width" style="margin-right: 10px;"></div>\r\n </td>\r\n <td class="padding-small">\r\n <label class="input-label"><%= scope.textMeasure %></label>\r\n <div id="tableadv-cmb-unit" style="width: 115px;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan="3" class="padding-large">\r\n <div id="tableadv-checkbox-autofit"></div>\r\n </td>\r\n </tr>\r\n </table>\r\n <div class="padding-small"></div>\r\n <table cols="2" style="width: 100%;">\r\n <tr>\r\n <td colspan=2 class="padding-small">\r\n <label class="header"><%= scope.textDefaultMargins %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small" width="125px">\r\n <label class="input-label"><%= scope.textTop %></label>\r\n <div id="tableadv-number-margin-table-top"></div>\r\n </td>\r\n <td class="padding-small">\r\n <label class="input-label"><%= scope.textLeft %></label>\r\n <div id="tableadv-number-margin-table-left"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-large">\r\n <label class="input-label"><%= scope.textBottom %></label>\r\n <div id="tableadv-number-margin-table-bottom"></div>\r\n </td>\r\n <td class="padding-large">\r\n <label class="input-label"><%= scope.textRight %></label>\r\n <div id="tableadv-number-margin-table-right"></div>\r\n </td>\r\n </tr>\r\n </table>\r\n <div class="padding-small"></div>\r\n <table cols="2">\r\n <tr>\r\n <td colspan="2" class="padding-small">\r\n <label class="header"><%= scope.textOptions %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style="vertical-align: bottom; padding-bottom: 19px;">\r\n <div id="tableadv-checkbox-spacing"></div>\r\n </td>\r\n <td class="padding-large">\r\n <label class="input-label"><%= scope.textAllowSpacing %></label>\r\n <div id="tableadv-number-spacing"></div>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class="inner-content">\r\n </div>\r\n</div>\r\n<div id="id-adv-table-cell-props" class="settings-panel">\r\n <div class="inner-content">\r\n <table cols="3">\r\n <tr>\r\n <td colspan="3" class="padding-small">\r\n <label class="header"><%= scope.textCellSize %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style="vertical-align: bottom; padding-bottom: 19px;">\r\n <div id="tableadv-checkbox-prefwidth"></div>\r\n </td>\r\n <td class="padding-large">\r\n <label class="input-label"><%= scope.textPrefWidth %></label>\r\n <div id="tableadv-number-prefwidth" style="margin-right: 10px;"></div>\r\
cls : "input-group-nr" , data : [{ value : 0 , displayValue : e == Common . Utils . Metric . c_MetricUnits . pt ? this . txtPt : e == Common . Utils . Metric . c_MetricUnits . inch ? this . txtInch : this . txtCm },{ value : 1 , displayValue : this . txtPercent }]}), this . cmbPrefWidthUnit . on ( "selected" , _ . bind ( function ( t , e ){ if ( this . _changedProps ){ var i = e . value ? "%" : Common . Utils . Metric . getCurrentMetricName (); if ( this . nfPrefWidth . getUnitValue () !== i ){ var n = Common . Utils . Metric . fnRecalcFromMM ( 558 ); this . nfPrefWidth . setDefaultUnit ( i ), this . nfPrefWidth . setMaxValue ( e . value ? parseFloat (( 100 * n / this . pageWidth ). toFixed ( 2 )) : n ), this . nfPrefWidth . setStep ( e . value || Common . Utils . Metric . getCurrentMetric () == Common . Utils . Metric . c_MetricUnits . pt ? 1 : . 1 ), this . nfPrefWidth . setValue ( e . value ? 100 * this . nfPrefWidth . getNumberValue () / this . pageWidth : this . pageWidth * this . nfPrefWidth . getNumberValue () / 100 ), this . _changedProps . put_CellsWidth ( e . value ?- this . nfPrefWidth . getNumberValue () : Common . Utils . Metric . fnRecalcToMM ( this . nfPrefWidth . getNumberValue ()))}}}, this )), this . chWrapText = new Common . UI . CheckBox ({ el : $ ( "#tableadv-checkbox-wrap" ), value :! 1 , labelText : this . textWrapText }), this . chWrapText . on ( "change" , _ . bind ( function ( t , e , i , n ){ this . _changedProps && this . _changedProps . put_CellsNoWrap ( "checked" != t . getValue ())}, this )), this . btnWrapNone = new Common . UI . Button ({ cls : "btn-options huge" , iconCls : "icon-right-panel btn-wrap-none" , posId : c_tableWrap . TABLE_WRAP_NONE , hint : this . textWrapNoneTooltip , enableToggle :! 0 , allowDepress :! 1 , toggleGroup : "advtablewrapGroup" }), this . btnWrapNone . render ( $ ( "#tableadv-button-wrap-none" )), this . btnWrapNone . on ( "click" , _ . bind ( this . onBtnInlineWrapClick , this )), this . btnWrapParallel = new Common . UI . Button ({ cls : "btn-options huge" , iconCls : "icon-right-panel btn-wrap-parallel" , posId : c_tableWrap . TABLE_WRAP_PARALLEL , hint : this . textWrapParallelTooltip , enableToggle :! 0 , allowDepress :! 1 , toggleGroup : "advtablewrapGroup" }), this . btnWrapParallel . render ( $ ( "#tableadv-button-wrap-parallel" )), this . btnWrapParallel . on ( "click" , _ . bind ( this . onBtnFlowWrapClick , this )), this . btnAlignLeft = new Common . UI . Button ({ cls : "btn-options huge" , iconCls : "icon-right-panel btn-table-align-left" , posId : c_tableAlign . TABLE_ALIGN_LEFT , hint : this . textLeftTooltip , enableToggle :! 0 , allowDepress :! 1 , toggleGroup : "advtablealignGroup" }), this . btnAlignLeft . render ( $ ( "#tableadv-button-align-left" )), this . btnAlignLeft . on ( "click" , _ . bind ( function ( t ){ this . _changedProps && t . pressed && ( this . _changedProps . put_TableAlignment ( t . options . posId ), this . _changedProps . put_TableIndent ( Common . Utils . Metric . fnRecalcToMM ( this . spnIndentLeft . getNumberValue ())), this . spnIndentLeft . setDisabled ( ! t . pressed ), this . _state . alignChanged =! 0 )}, this )), this . btnAlignCenter = new Common . UI . Button ({ cls : "btn-options huge" , iconCls : "icon-right-panel btn-table-align-center" , posId : c_tableAlign . TABLE_ALIGN_CENTER , hint : this . textCenterTooltip , enableToggle :! 0 , allowDepress :! 1 , toggleGroup : "advtablealignGroup" }), this . btnAlignCenter . render ( $ ( "#tableadv-button-align-center" )), this . btnAlignCenter . on ( "click" , _ . bind ( function ( t ){ this . _changedProps && t . pressed && ( this . _changedProps . put_TableAlignment ( t . options . posId ), this . _changedProps . put_TableIndent ( 0 ), this . spnIndentLeft . setDisabled ( t . pressed ), this . _state . alignChanged =! 0 )}, this )), this . btnAlignRight = new Common . UI . Button ({ cls : "btn-options huge" , iconCls : "icon-right-panel btn-table-align-right" , posId : c_tableAlign . TABLE_ALIGN_RIGHT , hint : this . textRightTooltip , enableToggle :! 0 , allowDepress :! 1 , toggleGroup : "advtablealignGroup" }), this . btnAlignRight . render ( $ ( "#tableadv-button-align-right" )), this . btnAlignRight . on ( "click" , _ . bind ( function ( t ){ this . _changedProps && t . pressed && ( this . _changedProps . put_TableAlignment ( t . options . posId ), this . _changedProps . put_TableIndent ( 0 ), this . spnIndentLeft . setDisabled ( t . pressed ), this . _state . alignChanged =! 0 )}, this )), this . spnIndentLeft = new Common . UI . MetricSpinner ({ el : $ ( "#tableadv-number-indent" ), step : . 1 , width : 85 , defaultUnit : "cm" , defaultValue : 0 , value : "0 cm" , maxValue : 38.09 , minValue :- 38.09 }), this . spnIndentLeft . on ( "change" , _ . bind ( function ( t , e , i , n ){ this . _changedProps && this . _changedProps . put_TableIndent ( Common . Utils . Metric . fnRecalcToMM ( t . getNumberValue ()))}, this )), this . spinners . push ( this . spnIndentLeft ),
null !== this . _changedProps . get_PositionH () && void 0 !== this . _changedProps . get_PositionH () || this . _changedProps . put_PositionH ( new Asc . CTablePositionH ), this . _changedProps . get_PositionH (). put_UseAlign ( ! 0 ), this . _changedProps . get_PositionH (). put_Align ( this . _state . HAlignType ), this . _changedProps . get_PositionH (). put_RelativeFrom ( this . _state . HAlignFrom ), this . _state . alignChanged =! 1 , this . _state . horizontalPropChanged =! 0 ) : this . _state . fromWrapInline &&! this . _state . horizontalPropChanged && this . radioHPosition . setValue ( ! 0 ))}, onHAlignSelect : function ( t , e ){ this . _changedProps && ( null !== this . _changedProps . get_PositionH () && void 0 !== this . _changedProps . get_PositionH () || this . _changedProps . put_PositionH ( new Asc . CTablePositionH ), this . _state . HAlignType = e . value , this . _changedProps . get_PositionH (). put_UseAlign ( ! 0 ), this . _changedProps . get_PositionH (). put_RelativeFrom ( this . _state . HAlignFrom ), this . _changedProps . get_PositionH (). put_Align ( this . _state . HAlignType ), this . _state . alignChanged =! 0 )}, onHRelativeSelect : function ( t , e ){ this . _changedProps && ( null !== this . _changedProps . get_PositionH () && void 0 !== this . _changedProps . get_PositionH () || this . _changedProps . put_PositionH ( new Asc . CTablePositionH ), this . _state . HAlignFrom = e . value , this . _changedProps . get_PositionH (). put_UseAlign ( ! 0 ), this . _changedProps . get_PositionH (). put_RelativeFrom ( this . _state . HAlignFrom ), this . _changedProps . get_PositionH (). put_Align ( this . _state . HAlignType ))}, onHPositionSelect : function ( t , e ){ if ( this . _changedProps ){ if ( null !== this . _changedProps . get_PositionH () && void 0 !== this . _changedProps . get_PositionH () || this . _changedProps . put_PositionH ( new Asc . CTablePositionH ), this . _state . HPositionFrom = e . value , this . _changedProps . get_PositionH (). put_UseAlign ( ! 1 ), this . _changedProps . get_PositionH (). put_RelativeFrom ( this . _state . HPositionFrom ), ! this . _state . spnXChanged ){ var i = this . _originalProps . get_Value_X ( this . _state . HPositionFrom ); this . spnX . setValue ( Common . Utils . Metric . fnRecalcFromMM ( i ), ! 0 )} this . _changedProps . get_PositionH (). put_Value ( Common . Utils . Metric . fnRecalcToMM ( this . spnX . getNumberValue ()))}}, onVAlignSelect : function ( t , e ){ this . _changedProps && ( null !== this . _changedProps . get_PositionV () && void 0 !== this . _changedProps . get_PositionV () || this . _changedProps . put_PositionV ( new Asc . CTablePositionV ), this . _state . VAlignType = e . value , this . _changedProps . get_PositionV (). put_UseAlign ( ! 0 ), this . _changedProps . get_PositionV (). put_RelativeFrom ( this . _state . VAlignFrom ), this . _changedProps . get_PositionV (). put_Align ( this . _state . VAlignType ))}, onVRelativeSelect : function ( t , e ){ this . _changedProps && ( null !== this . _changedProps . get_PositionV () && void 0 !== this . _changedProps . get_PositionV () || this . _changedProps . put_PositionV ( new Asc . CTablePositionV ), this . _state . VAlignFrom = e . value , this . _changedProps . get_PositionV (). put_UseAlign ( ! 0 ), this . _changedProps . get_PositionV (). put_RelativeFrom ( this . _state . VAlignFrom ), this . _changedProps . get_PositionV (). put_Align ( this . _state . VAlignType ), this . chMove . setValue ( this . _state . VAlignFrom == Asc . c_oAscVAnchor . Text , ! 0 ))}, onVPositionSelect : function ( t , e ){ if ( this . _changedProps ){ if ( null !== this . _changedProps . get_PositionV () && void 0 !== this . _changedProps . get_PositionV () || this . _changedProps . put_PositionV ( new Asc . CTablePositionV ), this . _state . VPositionFrom = e . value , this . _changedProps . get_PositionV (). put_UseAlign ( ! 1 ), this . _changedProps . get_PositionV (). put_RelativeFrom ( this . _state . VPositionFrom ), ! this . _state . spnYChanged ){ var i = this . _originalProps . get_Value_Y ( this . _state . VPositionFrom ); this . spnY . setValue ( Common . Utils . Metric . fnRecalcFromMM ( i ), ! 0 )} this . _changedProps . get_PositionV (). put_Value ( Common . Utils . Metric . fnRecalcToMM ( this . spnY . getNumberValue ())), this . chMove . setValue ( this . _state . VPositionFrom == Asc . c_oAscVAnchor . Text , ! 0 )}}, onRadioHAlignChange : function ( t , e , i ){ this . _changedProps && ( null !== this . _changedProps . get_PositionH () && void 0 !== this . _changedProps . get_PositionH () || this . _changedProps . put_PositionH ( new Asc . CTablePositionH ), this . _changedProps . get_PositionH (). put_UseAlign ( e ), e && ( this . _changedProps . get_PositionH (). put_Align ( this . _state . HAlignType ), this . _changedProps . get_PositionH (). put_RelativeFrom ( this . _state . HAlignFrom ))), e && ( this . cmbHAlign . setDisabled ( ! 1 ), th
this . spnStart . options . fromCustomFormat = function ( t ){ return t }} this . spnStart . setMask ( e ), this . spnStart . setValue ( this . spnStart . getValue ())}, _10toS : function ( t ){ t = parseInt ( t ); for ( var e = Math . ceil ( t / 26 ), i = String . fromCharCode (( t - 1 ) % 26 + "A" . charCodeAt ( 0 )), n = "" , o = 0 ; o < e ; o ++ ) n += i ; return n }, _Sto10 : function ( t ){ if ( t . length < 1 || new RegExp ( "[^" + t . charAt ( 0 ) + "]" ). test ( t ) ||! /[A-Z]/ . test ( t )) return 1 ; var e = t . length - 1 , i = t . charCodeAt ( 0 ) - "A" . charCodeAt ( 0 ) + 1 ; return i += 26 * e }, _10toRome : function ( t ){ t = parseInt ( t ); for ( var e = "" , i = [[ "M" , 1e3 ],[ "CM" , 900 ],[ "D" , 500 ],[ "CD" , 400 ],[ "C" , 100 ],[ "XC" , 90 ],[ "L" , 50 ],[ "XL" , 40 ],[ "X" , 10 ],[ "IX" , 9 ],[ "V" , 5 ],[ "IV" , 4 ],[ "I" , 1 ]], n = i [ 0 ][ 1 ], o = Math . floor ( t / n ), s = 0 , a = 0 ; a < o ; a ++ ) e += i [ s ][ 0 ]; for ( t -= o * n , s ++ ; t > 0 ;) n = i [ s ][ 1 ], o = t - n , o >= 0 ? ( e += i [ s ][ 0 ], t = o ) : s ++ ; return e }, _Rometo10 : function ( t ){ if ( ! /[IVXLCDM]/ . test ( t ) || t . length < 1 ) return 1 ; for ( var e = { I : 1 , V : 5 , X : 10 , L : 50 , C : 100 , D : 500 , M : 1e3 }, i = t . length - 1 , n = e [ t . charAt ( i )], o = n , s = i - 1 ; s >= 0 ; s -- ){ var a = e [ t . charAt ( s )]; if ( a < o ){ if ( o / a > 10 ) return 1 ; a *=- 1 } n += a } return n }, cancelButtonText : "Cancel" , okButtonText : "Ok" }, DE . Views . NumberingValueDialog || {}))}), define ( "documenteditor/main/app/view/DocumentHolder" ,[ "jquery" , "underscore" , "backbone" , "gateway" , "common/main/lib/util/utils" , "common/main/lib/component/Menu" , "common/main/lib/view/InsertTableDialog" , "common/main/lib/view/CopyWarningDialog" , "documenteditor/main/app/view/DropcapSettingsAdvanced" , "documenteditor/main/app/view/HyperlinkSettingsDialog" , "documenteditor/main/app/view/ParagraphSettingsAdvanced" , "documenteditor/main/app/view/TableSettingsAdvanced" , "documenteditor/main/app/view/ControlSettingsDialog" , "documenteditor/main/app/view/NumberingValueDialog" ], function ( t , e , i , n ){ "use strict" ; DE . Views . DocumentHolder = i . View . extend ( e . extend ({ el : "#editor_sdk" , template : null , events : {}, initialize : function (){ var i = this , n = DE . getCollection ( "Common.Collections.Users" ); i . _TtHeight = 20 , i . _currentSpellObj = void 0 , i . _currLang = {}, i . usertips = [], i . fastcoauthtips = [], i . _currentMathObj = void 0 , i . _currentParaObjDisabled =! 1 , i . _isDisabled =! 1 ; var o = function ( n , o , s , a , r ){ if ( ! e . isUndefined ( n ) && null !== n ){ Common . UI . Menu . Manager . hideAll (); var l = [ s . get_X (), s . get_Y ()], c = t ( i . el ). find ( Common . Utils . String . format ( "#menu-container-{0}" , n . id )); n . rendered || ( c . length < 1 && ( c = t ( Common . Utils . String . format ( '<div id="menu-container-{0}" style="position: absolute; z-index: 10000;"><div class="dropdown-toggle" data-toggle="dropdown"></div></div>' , n . id )), t ( i . el ). append ( c )), n . render ( c ), n . cmpEl . attr ({ tabindex : "-1" })), c . css ({ left : l [ 0 ], top : l [ 1 ]}), n . show (), e . isFunction ( n . options . initMenu ) && ( n . options . initMenu ( o ), n . alignPosition ()), e . delay ( function (){ n . cmpEl . focus ()}, 10 ), i . currentMenu = n }}, s = function ( t ){ if ( t && e . isArray ( t )){ for ( var n = {}, o = i . textMenu , s =! 0 , a = 0 ; a < t . length ; a ++ ){ var r = t [ a ]. get_ObjectType (), l = t [ a ]. get_ObjectValue (); if ( Asc . c_oAscTypeSelectElement . Image == r ){ o = i . pictureMenu , void 0 === n . imgProps && ( n . imgProps = {}); var c = l . get_ShapeProperties (), d = l . get_ChartProperties (); if ( c ? c . get_FromChart () ? n . imgProps . isChart =! 0 : c . get_FromImage () ? n . imgProps . isOnlyImg =! 0 : n . imgProps . isShape =! 0 : d ? n . imgProps . isChart =! 0 : n . imgProps . isImg =! 0 , n . imgProps . value = l , n . imgProps . locked =!! l && l . get_Locked (), s =! 1 , ! ( void 0 !== c && null !== c || void 0 !== d && null !== d )) break } else Asc . c_oAscTypeSelectElement . Table == r ? ( o = i . tableMenu , n . tableProps = {}, n . tableProps . value = l , n . tableProps . locked =!! l && l . get_Locked (), s =! 1 ) : Asc . c_oAscTypeSelectElement . Paragraph == r ? ( n . paraProps = {}, n . paraProps . value = l , n . paraProps . locked =!! l && l . get_Locked (), n . imgProps && ( n . imgProps . isChart || n . imgProps . isShape ) && void 0 === n . tableProps && ( o = i . textMenu ), s =! 1 ) : Asc . c_oAscTypeSelectElement . Hyperlink == r ? ( n . hyperProps ? n . hyperProps . isSeveralLinks =! 0 : n . hyperProps = {}, n . hyperProps . value = l ) : Asc . c_oAscTypeSelectElement . Header == r ? ( n . headerProps = {}, n . headerProps . locked =!! l && l . get_Locked ()) : Asc . c_oAscTypeSelectElement . SpellCheck == r ? ( n . spellProps = {}, n . spellProps . value = l , i . _currentSpellObj = l ) : Asc . c_oAscTypeSelectElement . Math == r && ( n . mathProps = {}, n . mathProps . value = l , i . _currentMathObj = l )} return s ? null : { menu_to_show : o , menu_props : n }}}, a = function ( t ){ if ( t && e . isArray ( t )){ i . viewModeMenu || i . createDelayedElementsViewer (); for ( var n = {}, o
this . api && ( this . api . asc_registerCallback ( "asc_onContextMenu" , e . bind ( l , this )), this . api . asc_registerCallback ( "asc_onMouseMoveStart" , e . bind ( y , this )), this . api . asc_registerCallback ( "asc_onMouseMoveEnd" , e . bind ( S , this )), this . api . asc_registerCallback ( "asc_onHyperlinkClick" , e . bind ( _ , this )), this . api . asc_registerCallback ( "asc_onMouseMove" , e . bind ( A , this )), ! 0 === this . mode . isEdit && ( this . api . asc_registerCallback ( "asc_onImgWrapStyleChanged" , e . bind ( this . onImgWrapStyleChanged , this )), this . api . asc_registerCallback ( "asc_onDialogAddHyperlink" , M ), this . api . asc_registerCallback ( "asc_doubleClickOnChart" , B ), this . api . asc_registerCallback ( "asc_onSpellCheckVariantsFound" , e . bind ( E , this )), this . api . asc_registerCallback ( "asc_onRulerDblClick" , e . bind ( this . onRulerDblClick , this )), this . api . asc_registerCallback ( "asc_ChangeCropState" , e . bind ( this . onChangeCropState , this ))), this . api . asc_registerCallback ( "asc_onCoAuthoringDisconnect" , e . bind ( U , this )), Common . NotificationCenter . on ( "api:disconnect" , e . bind ( U , this )), this . api . asc_registerCallback ( "asc_onTextLanguage" , e . bind ( V , this )), this . api . asc_registerCallback ( "asc_onParaStyleName" , e . bind ( this . onApiParagraphStyleChange , this )), this . api . asc_registerCallback ( "asc_onShowForeignCursorLabel" , e . bind ( k , this )), this . api . asc_registerCallback ( "asc_onHideForeignCursorLabel" , e . bind ( T , this )), this . api . asc_registerCallback ( "asc_onFocusObject" , e . bind ( c , this )), this . api . asc_registerCallback ( "asc_onShowSpecialPasteOptions" , e . bind ( I , this )), this . api . asc_registerCallback ( "asc_onHideSpecialPasteOptions" , e . bind ( P , this ))), this }, this . mode = {}, this . setMode = function ( t ){ this . mode = t , this . mode . canCoAuthoring && this . mode . canComments ? Common . util . Shortcuts . resumeEvents ( "alt+h" ) : Common . util . Shortcuts . suspendEvents ( "alt+h" ), this . editorConfig = { user : t . user }}, i . on ( "render:after" , m , i )}, render : function (){ return this . fireEvent ( "render:before" , this ), this . cmpEl = t ( this . el ), this . fireEvent ( "render:after" , this ), this }, onImgWrapStyleChanged : function ( t ){ switch ( t ){ case Asc . c_oAscWrapStyle2 . Inline : this . menuImageWrap . menu . items [ 0 ]. setChecked ( ! 0 ); break ; case Asc . c_oAscWrapStyle2 . Square : this . menuImageWrap . menu . items [ 1 ]. setChecked ( ! 0 ); break ; case Asc . c_oAscWrapStyle2 . Tight : this . menuImageWrap . menu . items [ 2 ]. setChecked ( ! 0 ); break ; case Asc . c_oAscWrapStyle2 . Through : this . menuImageWrap . menu . items [ 3 ]. setChecked ( ! 0 ); break ; case Asc . c_oAscWrapStyle2 . TopAndBottom : this . menuImageWrap . menu . items [ 4 ]. setChecked ( ! 0 ); break ; case Asc . c_oAscWrapStyle2 . Behind : this . menuImageWrap . menu . items [ 6 ]. setChecked ( ! 0 ); break ; case Asc . c_oAscWrapStyle2 . InFront : this . menuImageWrap . menu . items [ 5 ]. setChecked ( ! 0 )}}, onChangeCropState : function ( t ){ this . menuImgCrop . menu . items [ 0 ]. setChecked ( t , ! 0 )}, onApiParagraphStyleChange : function ( t ){ window . currentStyleName = t }, advancedParagraphClick : function ( t , i , n ){ var o , s = this ; if ( s . api ){ var a = s . api . getSelectedElements (); if ( a && e . isArray ( a )) for ( var r = a . length - 1 ; r >= 0 ; r -- ){ var l , c ; if ( l = a [ r ]. get_ObjectType (), c = a [ r ]. get_ObjectValue (), Asc . c_oAscTypeSelectElement . Paragraph == l ){ o = new DE . Views . ParagraphSettingsAdvanced ({ tableStylerRows : 2 , tableStylerColumns : 1 , paragraphProps : c , borderProps : s . borderAdvancedProps , isChart :! 0 === t . isChart , api : s . api , handler : function ( t , e ){ "ok" == t && s . api && ( s . borderAdvancedProps = e . borderProps , s . api . paraApply ( e . paragraphProps )), s . fireEvent ( "editcomplete" , s )}}); break }}} if ( o ) return o . show (), o }, advancedFrameClick : function ( t , i , n ){ var o , s = this ; if ( s . api ){ var a = s . api . getSelectedElements (); if ( a && e . isArray ( a )) for ( var r = a . length - 1 ; r >= 0 ; r -- ){ var l , c ; if ( l = a [ r ]. get_ObjectType (), c = a [ r ]. get_ObjectValue (), Asc . c_oAscTypeSelectElement . Paragraph == l ){ o = new DE . Views . DropcapSettingsAdvanced ({ tableStylerRows : 2 , tableStylerColumns : 1 , paragraphProps : c , borderProps : s . borderAdvancedProps , api : s . api , isFrame :! 0 , handler : function ( t , e ){ "ok" == t && ( s . borderAdvancedProps = e . borderProps , e . paragraphProps && e . paragraphProps . get_Wrap () === c_oAscFrameWrap . None ? s . api . removeDropcap ( ! 1 ) : s . api . put_FramePr ( e . paragraphProps )), s . fireEvent ( "editcomplete" , s )}}); break }}} o && o . show ()}, advancedTableClick : function ( t , i , n ){ var o , s = this ; if ( s . api ){ var a = s . api . getSelectedElements (); if ( a && e . isArray ( a )) for ( var r = a . length - 1 ; r >= 0 ; r -- ){ var l , c ; if ( l = a [ r ]. g
i . langTableMenu . setDisabled ( r ), void 0 !== t . spellProps &&! 1 === t . spellProps . value . get_Checked () && null !== t . spellProps . value . get_Variants () && void 0 !== t . spellProps . value . get_Variants () ? i . addWordVariants ( ! 1 ) : ( i . menuSpellTable . setCaption ( i . loadSpellText , ! 0 ), i . clearWordVariants ( ! 1 ), i . menuSpellMoreTable . setVisible ( ! 1 )), i . menuSpellCheckTable . isVisible () && i . _currLang . id !== i . _currLang . tableid && ( i . changeLanguageMenu ( i . langTableMenu . menu ), i . _currLang . tableid = i . _currLang . id ); var f = 0 ; n ? f = i . addEquationMenu ( ! 1 , 7 ) : i . clearEquationMenu ( ! 1 , 7 ), G . setVisible ( n && f > 0 ); var C = i . api . asc_GetTableOfContentsPr ( ! 0 ), y =! C && i . api . asc_IsContentControl (); if ( B . setVisible ( y ), y ){ var R = i . api . asc_GetContentControlProperties (), F = R ? R . get_Lock () : Asc . c_oAscSdtLockType . Unlocked ; P . setDisabled ( F == Asc . c_oAscSdtLockType . SdtContentLocked || F == Asc . c_oAscSdtLockType . SdtLocked ), M . setVisible ( i . mode . canEditContentControl )} U . setVisible ( C ); var H = i . api . asc_GetCurrentComplexField (); tt . setVisible ( !! H ), tt . setDisabled ( r ), et . setVisible ( !! H ), H && ( tt . options . fieldProps = H )}}, items : [ i . menuSpellCheckTable , N , $ , O , z , W ,{ caption : "--" }, G , tt , et ,{ caption : i . selectText , menu : new Common . UI . Menu ({ menuAlign : "tl-tr" , style : "width: 100px" , items : [ new Common . UI . MenuItem ({ caption : i . rowText }). on ( "click" , function ( t ){ i . api && i . api . selectRow ()}), new Common . UI . MenuItem ({ caption : i . columnText }). on ( "click" , function ( t ){ i . api && i . api . selectColumn ()}), new Common . UI . MenuItem ({ caption : i . cellText }). on ( "click" , function ( t ){ i . api && i . api . selectCell ()}), new Common . UI . MenuItem ({ caption : i . tableText }). on ( "click" , function ( t ){ i . api && i . api . selectTable ()})]})},{ caption : i . insertText , menu : new Common . UI . Menu ({ menuAlign : "tl-tr" , style : "width: 100px" , items : [ new Common . UI . MenuItem ({ caption : i . insertColumnLeftText }). on ( "click" , function ( t ){ i . api && i . api . addColumnLeft ()}), new Common . UI . MenuItem ({ caption : i . insertColumnRightText }). on ( "click" , function ( t ){ i . api && i . api . addColumnRight ()}), new Common . UI . MenuItem ({ caption : i . insertRowAboveText }). on ( "click" , function ( t ){ i . api && i . api . addRowAbove ()}), new Common . UI . MenuItem ({ caption : i . insertRowBelowText }). on ( "click" , function ( t ){ i . api && i . api . addRowBelow ()})]})},{ caption : i . deleteText , menu : new Common . UI . Menu ({ menuAlign : "tl-tr" , style : "width: 100px" , items : [ new Common . UI . MenuItem ({ caption : i . rowText }). on ( "click" , function ( t ){ i . api && i . api . remRow ()}), new Common . UI . MenuItem ({ caption : i . columnText }). on ( "click" , function ( t ){ i . api && i . api . remColumn ()}), new Common . UI . MenuItem ({ caption : i . tableText }). on ( "click" , function ( t ){ i . api && i . api . remTable ()})]})},{ caption : "--" }, v , _ ,{ caption : "--" }, j , q ,{ caption : "--" }, w , Y ,{ caption : "--" }, x ,{ caption : "--" }, V , Q , E , I , D , A , B , U , S ]}). on ( "hide:after" , function ( t , e , n ){ if ( i . suppressEditComplete ) return void ( i . suppressEditComplete =! 1 ); n || i . fireEvent ( "editcomplete" , i ), i . currentMenu = null }); var it = new Common . UI . MenuItem ({ caption : i . breakBeforeText , checkable :! 0 }). on ( "click" , function ( t , e ){ i . api . put_PageBreak ( t . checked )}), nt = new Common . UI . MenuItem ({ caption : i . keepLinesText , checkable :! 0 }). on ( "click" , function ( t , e ){ i . api . put_KeepLines ( t . checked )}), ot = function ( t , e ){ if ( i . api ){ var n = new Asc . asc_CImgProperty ; n . put_VerticalTextAlign ( t . options . valign ), i . api . ImgApply ( n )}}, st = new Common . UI . MenuItem ({ caption : i . vertAlignText , menu : new Common . UI . Menu ({ menuAlign : "tl-tr" , items : [ i . menuParagraphTop = new Common . UI . MenuItem ({ caption : i . textShapeAlignTop , checkable :! 0 , checked :! 1 , toggleGroup : "popupparagraphvalign" , valign : Asc . c_oAscVAlign . Top }). on ( "click" , e . bind ( ot , i )), i . menuParagraphCenter = new Common . UI . MenuItem ({ caption : i . textShapeAlignMiddle , checkable :! 0 , checked :! 1 , toggleGroup : "popupparagraphvalign" , valign : Asc . c_oAscVAlign . Center }). on ( "click" , e . bind ( ot , i )), i . menuParagraphBottom = new Common . UI . MenuItem ({ caption : i . textShapeAlignBottom , checkable :! 0 , checked :! 1 , toggleGroup : "popupparagraphvalign" , valign : Asc . c_oAscVAlign . Bottom }). on ( "click" , e . bind ( ot , i ))]})}), at = function ( t , e ){ if ( i . api ){ var n = new Asc . asc_CImgProperty ; n . put_Vert ( t . options . direction ), i . api . ImgApply ( n )}}, rt = new Common . UI . MenuItem ({ caption : i . directionText , menu : new Common . UI . Menu ({ cls : "ppm-toolbar" , menuAlign : "tl-tr" , items : [ i . menuParagraphDirectH = new Common . UI . MenuItem ({ caption : i . directHText , ico
Common . define . c_oAscMathMainType = { Symbol : 0 , Fraction : 1 , Script : 2 , Radical : 3 , Integral : 4 , LargeOperator : 5 , Bracket : 6 , Function : 7 , Accent : 8 , LimitLog : 9 , Operator : 10 , Matrix : 11 }, Common . define . c_oAscMathType = { Symbol_pm : 0 , Symbol_infinity : 1 , Symbol_equals : 2 , Symbol_neq : 3 , Symbol_about : 4 , Symbol_times : 5 , Symbol_div : 6 , Symbol_factorial : 7 , Symbol_propto : 8 , Symbol_less : 9 , Symbol_ll : 10 , Symbol_greater : 11 , Symbol_gg : 12 , Symbol_leq : 13 , Symbol_geq : 14 , Symbol_mp : 15 , Symbol_cong : 16 , Symbol_approx : 17 , Symbol_equiv : 18 , Symbol_forall : 19 , Symbol_additional : 20 , Symbol_partial : 21 , Symbol_sqrt : 22 , Symbol_cbrt : 23 , Symbol_qdrt : 24 , Symbol_cup : 25 , Symbol_cap : 26 , Symbol_emptyset : 27 , Symbol_percent : 28 , Symbol_degree : 29 , Symbol_fahrenheit : 30 , Symbol_celsius : 31 , Symbol_inc : 32 , Symbol_nabla : 33 , Symbol_exists : 34 , Symbol_notexists : 35 , Symbol_in : 36 , Symbol_ni : 37 , Symbol_leftarrow : 38 , Symbol_uparrow : 39 , Symbol_rightarrow : 40 , Symbol_downarrow : 41 , Symbol_leftrightarrow : 42 , Symbol_therefore : 43 , Symbol_plus : 44 , Symbol_minus : 45 , Symbol_not : 46 , Symbol_ast : 47 , Symbol_bullet : 48 , Symbol_vdots : 49 , Symbol_cdots : 50 , Symbol_rddots : 51 , Symbol_ddots : 52 , Symbol_aleph : 53 , Symbol_beth : 54 , Symbol_QED : 55 , Symbol_alpha : 65536 , Symbol_beta : 65537 , Symbol_gamma : 65538 , Symbol_delta : 65539 , Symbol_varepsilon : 65540 , Symbol_epsilon : 65541 , Symbol_zeta : 65542 , Symbol_eta : 65543 , Symbol_theta : 65544 , Symbol_vartheta : 65545 , Symbol_iota : 65546 , Symbol_kappa : 65547 , Symbol_lambda : 65548 , Symbol_mu : 65549 , Symbol_nu : 65550 , Symbol_xsi : 65551 , Symbol_o : 65552 , Symbol_pi : 65553 , Symbol_varpi : 65554 , Symbol_rho : 65555 , Symbol_varrho : 65556 , Symbol_sigma : 65557 , Symbol_varsigma : 65558 , Symbol_tau : 65559 , Symbol_upsilon : 65560 , Symbol_varphi : 65561 , Symbol_phi : 65562 , Symbol_chi : 65563 , Symbol_psi : 65564 , Symbol_omega : 65565 , Symbol_Alpha : 131072 , Symbol_Beta : 131073 , Symbol_Gamma : 131074 , Symbol_Delta : 131075 , Symbol_Epsilon : 131076 , Symbol_Zeta : 131077 , Symbol_Eta : 131078 , Symbol_Theta : 131079 , Symbol_Iota : 131080 , Symbol_Kappa : 131081 , Symbol_Lambda : 131082 , Symbol_Mu : 131083 , Symbol_Nu : 131084 , Symbol_Xsi : 131085 , Symbol_O : 131086 , Symbol_Pi : 131087 , Symbol_Rho : 131088 , Symbol_Sigma : 131089 , Symbol_Tau : 131090 , Symbol_Upsilon : 131091 , Symbol_Phi : 131092 , Symbol_Chi : 131093 , Symbol_Psi : 131094 , Symbol_Omega : 131095 , FractionVertical : 16777216 , FractionDiagonal : 16777217 , FractionHorizontal : 16777218 , FractionSmall : 16777219 , FractionDifferential_1 : 16842752 , FractionDifferential_2 : 16842753 , FractionDifferential_3 : 16842754 , FractionDifferential_4 : 16842755 , FractionPi_2 : 16842756 , ScriptSup : 33554432 , ScriptSub : 33554433 , ScriptSubSup : 33554434 , ScriptSubSupLeft : 33554435 , ScriptCustom_1 : 33619968 , ScriptCustom_2 : 33619969 , ScriptCustom_3 : 33619970 , ScriptCustom_4 : 33619971 , RadicalSqrt : 50331648 , RadicalRoot_n : 50331649 , RadicalRoot_2 : 50331650 , RadicalRoot_3 : 50331651 , RadicalCustom_1 : 50397184 , RadicalCustom_2 : 50397185 , Integral : 67108864 , IntegralSubSup : 67108865 , IntegralCenterSubSup : 67108866 , IntegralDouble : 67108867 , IntegralDoubleSubSup : 67108868 , IntegralDoubleCenterSubSup : 67108869 , IntegralTriple : 67108870 , IntegralTripleSubSup : 67108871 , IntegralTripleCenterSubSup : 67108872 , IntegralOriented : 67174400 , IntegralOrientedSubSup : 67174401 , IntegralOrientedCenterSubSup : 67174402 , IntegralOrientedDouble : 67174403 , IntegralOrientedDoubleSubSup : 67174404 , IntegralOrientedDoubleCenterSubSup : 67174405 , IntegralOrientedTriple : 67174406 , IntegralOrientedTripleSubSup : 67174407 , IntegralOrientedTripleCenterSubSup : 67174408 , Integral_dx : 67239936 , Integral_dy : 67239937 , Integral_dtheta : 67239938 , LargeOperator_Sum : 83886080 , LargeOperator_Sum_CenterSubSup : 83886081 , LargeOperator_Sum_SubSup : 83886082 , LargeOperator_Sum_CenterSub : 83886083 , LargeOperator_Sum_Sub : 83886084 , LargeOperator_Prod : 83951616 , LargeOperator_Prod_CenterSubSup : 83951617 , LargeOperator_Prod_SubSup : 83951618 , LargeOperator_Prod_CenterSub : 83951619 , LargeOperator_Prod_Sub : 83951620 , LargeOperator_CoProd : 83951621 , LargeOperator_CoProd_CenterSubSup : 83951622 , LargeOperator_CoProd_SubSup : 83951623 , LargeOperator_CoProd_CenterSub : 83951624 , LargeOperator_CoProd_Sub : 83951625 , LargeOperator_Union : 84017152 , LargeOperator_Union_CenterSubSup : 84017153 , LargeOperator_Union_SubSup : 84017154 , LargeOperator_Union_CenterSub : 84017155 , LargeOperator_Union_Sub : 84017156 , LargeOperator_Intersection : 84017157 , LargeOperator_Inter
template : _ . template ([ '<div class="synch-tip-root <% if (!!scope.options.extCls) {print(scope.options.extCls + " ");} %><%= scope.placement %>">' , '<div class="asc-synchronizetip">' , '<div class="tip-arrow <%= scope.placement %>"></div>' , "<div>" , '<div class="tip-text" style="width: 260px;"><%= scope.text %></div>' , '<div class="close img-commonctrl"></div>' , "</div>" , "<% if ( scope.showLink ) { %>" , '<div class="show-link"><label><%= scope.textLink %></label></div>' , "<% } %>" , "</div>" , "</div>" ]. join ( "" )), initialize : function ( t ){ this . textSynchronize += Common . Utils . String . platformKey ( "Ctrl+S" ), Common . UI . BaseView . prototype . initialize . call ( this , t ), this . target = this . options . target , this . text = _ . isEmpty ( this . options . text ) ? this . textSynchronize : this . options . text , this . textLink = _ . isEmpty ( this . options . textLink ) ? this . textDontShow : this . options . textLink , this . placement = this . options . placement , this . showLink = this . options . showLink }, render : function (){ return this . cmpEl || ( this . cmpEl = $ ( this . template ({ scope : this })), $ ( document . body ). append ( this . cmpEl ), this . cmpEl . find ( ".close" ). on ( "click" , _ . bind ( function (){ this . trigger ( "closeclick" )}, this )), this . cmpEl . find ( ".show-link label" ). on ( "click" , _ . bind ( function (){ this . trigger ( "dontshowclick" )}, this ))), this . applyPlacement (), this }, show : function (){ this . cmpEl ? ( this . applyPlacement (), this . cmpEl . show ()) : this . render ()}, hide : function (){ this . cmpEl && this . cmpEl . hide ()}, close : function (){ this . cmpEl && this . cmpEl . remove ()}, applyPlacement : function (){ var t = this . target . offset (), e = Common . Utils . innerHeight (); if ( "top" == this . placement ) this . cmpEl . css ({ bottom : e - t . top + "px" , right : Common . Utils . innerWidth () - t . left - this . target . width () / 2 + "px" }); else { var i = t . top + this . target . height () / 2 , n = this . cmpEl . height (); i + n > e && ( i = e - n ), "left" == this . placement ? this . cmpEl . css ({ top : i + "px" , right : Common . Utils . innerWidth () - t . left - 5 + "px" }) : this . cmpEl . css ({ top : i + "px" , left : t . left + this . target . width () + "px" })}}, isVisible : function (){ return this . cmpEl && this . cmpEl . is ( ":visible" )}, textDontShow : "Don't show this message again" , textSynchronize : "The document has been changed by another user.<br/>Please click to save your changes and reload the updates." }}(), Common . UI . SynchronizeTip || {}))}), define ( "common/main/lib/component/Mixtbar" ,[ "backbone" , "common/main/lib/component/BaseView" ], function ( t ){ "use strict" ; Common . UI . Mixtbar = Common . UI . BaseView . extend ( function (){ function t ( t ){ this . fireEvent ( "change:compact" ,[ $ ( t . target ). data ( "tab" )])} function e ( t ){ this . isFolded && ( $ ( t . target ). parents ( ".toolbar, #file-menu-panel" ). length || this . collapse ())} var i , n , o = { timeout : 2e3 }, s = {}, a = function ( t , e ){ var n = i . scrollLeft ();( n || "right" == t ) && i . animate ({ scrollLeft : "left" == t ? n - 100 : n + 100 }, 200 )}; return { $tabs : void 0 , $panels : void 0 , isFolded :! 1 , initialize : function ( t ){ Common . UI . BaseView . prototype . initialize . call ( this , t ); this . $layout = $ ( t . template ({ tabsmarkup : _ . template ( '<section class="tabs"><a class="scroll left"></a><ul><% for(var i in items) { %><li class="ribtab<% if (items[i].haspanel===false) print(" x-lone") %><% if (items[i].extcls) print(\' \' + items[i].extcls) %>"><a data-tab="<%= items[i].action %>" data-title="<%= items[i].caption %>"><%= items[i].caption %></a></li><% } %></ul><a class="scroll right"></a></section>' )({ items : t . tabs })})), s . tabs = t . tabs , $ ( document . body ). on ( "click" , e . bind ( this )), Common . NotificationCenter . on ( "tab:visible" , _ . bind ( function ( t , e ){ this . setVisible ( t , e )}, this ))}, afterRender : function (){ var e = this ; i = e . $ ( ".tabs > ul" ), e . $tabs = i . find ( "> li" ), e . $panels = e . $ ( ".box-panels > .panel" ), o . $bar = e . $ ( ".toolbar" ); var s = e . $ ( ".tabs .scroll.right" ); n = e . $ ( ".tabs .scroll.left" ), n . on ( "click" , a . bind ( this , "left" )), s . on ( "click" , a . bind ( this , "right" )), i . on ( "dblclick" , "> .ribtab" , t . bind ( this )), i . on ( "click" , "> .ribtab" , e . onTabClick . bind ( this ))}, isTabActive : function ( t ){ var e = this . $tabs . filter ( ".active" ). find ( "> a" ); return e . length && e . data ( "tab" ) == t }, setFolded : function ( t ){ this . isFolded = t ; var e = this ; if ( this . isFolded ) o . $box || ( o . $box = e . $el . find ( ".box-controls" )), o . $bar . addClass ( "folded z-clear" ). toggleClass ( "expanded" , ! 1 ), o . $bar . find ( ".tabs .ribtab" ). removeClass ( "active" ), o . $bar . on ( $ . support . transition . end , function ( t
var o = t ( i . cmpEl . find ( ".dataview.inner .style" ). get ( 0 )). parent (), s = o . is ( ":visible" ) ? parseInt ( o . css ( "width" )) : i . itemWidth + parseInt ( o . css ( "padding-left" )) + parseInt ( o . css ( "padding-right" )) + parseInt ( o . css ( "border-left-width" )) + parseInt ( o . css ( "border-right-width" )), a = i . menuPicker . store . length >= 6 ? 6 : i . menuPicker . store . length , r = Math . min ( i . menuPicker . store . length , Math . round ( t ( ".dataview" , t ( i . fieldPicker . el )). width () / ( - 1 + s ) + . 5 )); r = r < a ? a : r , n . menuAlignEl = i . cmpEl , n . menuAlign = "tl-tl" ; var l = i . cmpEl . width () - i . openButton . $el . width () - r * ( - 1 + s ) - 1 ; n . setOffset ( Math . min ( l , 0 )), n . cmpEl . css ({ width : r * ( s +- 1 ), "min-height" : i . cmpEl . height ()})} i . menuPicker . scroller && i . menuPicker . scroller . update ({ includePadding :! 0 , suppressScrollX :! 0 }), i . removeTips ()}}), this . listStyles . fieldPicker . itemTemplate = e . template ([ '<div class="style" id="<%= id %>">' , '<div style="background-image: url(<%= imageUrl %>); width: ' + this . listStyles . itemWidth + "px; height: " + this . listStyles . itemHeight + 'px;"/>' , "</div>" ]. join ( "" )), this . listStyles . menuPicker . itemTemplate = e . template ([ '<div class="style" id="<%= id %>">' , '<div style="background-image: url(<%= imageUrl %>); width: ' + this . listStyles . itemWidth + "px; height: " + this . listStyles . itemHeight + 'px;"/>' , "</div>" ]. join ( "" )), this . paragraphControls . push ( this . listStyles ), this . textOnlyControls . push ( this . listStyles ), e . each ( this . toolbarControls . concat ( this . paragraphControls ), function ( t ){ e . isFunction ( t . setDisabled ) && t . setDisabled ( ! 0 )}), this . btnMailRecepients . setDisabled ( ! 0 ); var c = new Common . UI . MenuItem ({ caption : s . textStyleMenuUpdate }). on ( "click" , e . bind ( s . onStyleMenuUpdate , s )), d = new Common . UI . MenuItem ({ caption : s . textStyleMenuDelete }). on ( "click" , e . bind ( s . onStyleMenuDelete , s )), h = new Common . UI . MenuItem ({ caption : s . textStyleMenuRestore }). on ( "click" , e . bind ( s . onStyleMenuDelete , s )), p = new Common . UI . MenuItem ({ caption : s . textStyleMenuRestoreAll }). on ( "click" , e . bind ( s . onStyleMenuRestoreAll , s )), m = new Common . UI . MenuItem ({ caption : s . textStyleMenuDeleteAll }). on ( "click" , e . bind ( s . onStyleMenuDeleteAll , s )); null == this . styleMenu && ( this . styleMenu = new Common . UI . Menu ({ items : [ c , d , h , p , m ]})), this . on ( "render:after" , e . bind ( this . onToolbarAfterRender , this ))} else Common . UI . Mixtbar . prototype . initialize . call ( this ,{ template : e . template ( o ), tabs : [{ caption : s . textTabFile , action : "file" , haspanel :! 1 }]}); return this }, render : function ( e ){ var i = this ; if ( this . fireEvent ( "render:before" ,[ this ]), i . isCompactView = e . isCompactView , e . isEdit ? i . $el . html ( i . rendererComponents ( i . $layout )) : ( i . $layout . find ( ".canedit" ). hide (), i . $layout . addClass ( "folded" ), i . $el . html ( i . $layout )), this . fireEvent ( "render:after" ,[ this ]), Common . UI . Mixtbar . prototype . afterRender . call ( this ), Common . NotificationCenter . on ({ "window:resize" : function (){ Common . UI . Mixtbar . prototype . onResize . apply ( i , arguments )}}), e . isEdit ){ this . showSynchTip =! Common . localStorage . getBool ( "de-hide-synch" ), this . needShowSynchTip =! 1 , i . setTab ( "home" ); var n = Common . localStorage . getItem ( "de-pgmargins-top" ), o = Common . localStorage . getItem ( "de-pgmargins-left" ), s = Common . localStorage . getItem ( "de-pgmargins-bottom" ), a = Common . localStorage . getItem ( "de-pgmargins-right" ); if ( null !== n && null !== o && null !== s && null !== a ){ var r = this . btnPageMargins . menu . items [ 0 ]; r . options . value = r . value = [ parseFloat ( n ), parseFloat ( o ), parseFloat ( s ), parseFloat ( a )], r . setVisible ( ! 0 ), t ( r . el ). html ( r . template ({ id : Common . UI . getId (), caption : r . caption , options : r . options }))} else this . btnPageMargins . menu . items [ 0 ]. setVisible ( ! 1 )} return i . isCompactView && i . setFolded ( ! 0 ), this }, onTabClick : function ( e ){ var i = this , n = t ( e . currentTarget ). find ( "> a[data-tab]" ). data ( "tab" ), o = i . isTabActive ( "file" ); Common . UI . Mixtbar . prototype . onTabClick . apply ( i , arguments ), o ? i . fireEvent ( "file:close" ) : "file" == n && ( i . fireEvent ( "file:open" ), i . setTab ( n )), i . isTabActive ( "home" ) && i . fireEvent ( "home:open" )}, rendererComponents : function ( e ){ var i = t ( e ), n = function ( t , e ){ Common . Utils . injectComponent ( i . find ( t ), e )}; return n ( "#slot-field-fontname" , this . cmbFontName ), n ( "#slot-field-fontsize" , this . cmbFontSize ), n ( "#slot-btn-print" , this . btnPrint ), n ( "#slot-btn-save" , this . btnSave ), n ( "#slot-btn-undo" , this . btnUndo ), n ( "#slot-btn-redo" , this . btnRedo ), n ( "#slot-btn-copy" , this . btnCopy ), n ( "#slot-
textStyleMenuDelete:" Delete style ",textStyleMenuRestoreAll:" Restore all to default styles ",textStyleMenuDeleteAll:" Delete all custom styles ",textStyleMenuNew:" New style from selection ",tipColumns:" Insert columns ",textColumnsOne:" One ",textColumnsTwo:" Two ",textColumnsThree:" Three ",textColumnsLeft:" Left ",textColumnsRight:" Right ",tipPageMargins:" Page Margins ",textMarginsLast:" Last Custom ",textMarginsNormal:" Normal ",textMarginsUsNormal:" US Normal ",textMarginsNarrow:" Narrow ",textMarginsModerate:" Moderate ",textMarginsWide:" Wide ",textPageMarginsCustom:" Custom margins ",textTop:" Top : ",textLeft:" Left : ",textBottom:" Bottom : ",textRight:" Right : ",textPageSizeCustom:" Custom Page Size ",textPortrait:" Portrait ",textLandscape:" Landscape ",textInsertPageCount:" Insert number of pages ",textCharts:" Charts ",tipChangeChart:" Change Chart Type ",capBtnInsPagebreak:" Page Break ",capBtnInsImage:" Image ",capBtnInsTable:" Table ",capBtnInsChart:" Chart ",textTabFile:" File ",textTabHome:" Home ",textTabInsert:" Insert ",textTabLayout:" Layout ",textTabReview:" Review ",capBtnInsShape:" Shape ",capBtnInsTextbox:" Text Box ",capBtnInsTextart:" Text Art ",capBtnInsDropcap:" Drop Cap ",capBtnInsEquation:" Equation ",capBtnInsHeader:" Header / Footer ",capBtnColumns:" Columns ",capBtnPageOrient:" Orientation ",capBtnMargins:" Margins ",capBtnPageSize:" Size ",tipImgAlign:" Align objects ",tipImgGroup:" Group objects ",tipImgWrapping:" Wrap text ",tipSendForward:" Bring forward ",tipSendBackward:" Send backward ",capImgAlign:" Align ",capImgGroup:" Group ",capImgForward:" Bring Forward ",capImgBackward:" Send Backward ",capImgWrapping:" Wrapping ",capBtnComment:" Comment ",textColumnsCustom:" Custom Columns ",textSurface:" Surface ",textTabCollaboration:" Collaboration ",textTabProtect:" Protection ",textTabLinks:" References ",capBtnInsControls:" Content Control ",textRichControl:" Rich text ",textPlainControl:" Plain text ",textRemoveControl:" Remove ",mniEditControls:" Settings ",tipControls:" Insert content control ",mniHighlightControls:" Highlight settings ",textNoHighlight:" No highlighting ",mniImageFromStorage:" Image from Storage ",capBtnBlankPage:" Blank Page ",tipBlankPage:" Insert blank page ",txtDistribHor:" Distribute Horizontally ",txtDistribVert:" Distribute Vertically ",txtPageAlign:" Align to Page ",txtMarginAlign:" Align to Margin ",txtObjectsAlign:" Align Selected Objects ",capBtnWatermark:" Watermark ",textEditWatermark:" Custom Watermark ",textRemWatermark:" Remove Watermark ",tipWatermark:" Edit watermark "}}(),DE.Views.Toolbar||{}))}),void 0===Common)var Common={};if(define(" documenteditor / main / app / view / StyleTitleDialog ",[" common / main / lib / util / utils "," common / main / lib / component / InputField "," common / main / lib / component / Window "],function(){" use strict ";DE.Views.StyleTitleDialog=Common.UI.Window.extend(_.extend({options:{width:350,height:200,style:" min - width : 230 px ; ",cls:" modal - dlg "},initialize:function(t){_.extend(this.options,{title:this.textHeader},t||{}),this.template=['<div class=" box ">','<label class=" input - row " style=" margin - bottom : - 5 px ; ">'+this.textTitle+" < /label>",'<div id="id-dlg-style-title" class="input-row" style="margin-bottom: 5px;"></div>','<label class="input-row" style="margin-bottom: -5px; margin-top: 5px;">'+this.textNextStyle+"</label>",'<div id="id-dlg-style-next-par" class="input-group-nr" style="margin-bottom: 5px;" ></div>',"</div>",'<div class="footer right">','<button class="btn normal dlg-btn primary" result="ok" style="margin-right: 10px;">'+this.okButtonText+"</button>",'<button class="btn normal dlg-btn" result="cancel">'+this.cancelButtonText+"</button>","</div>"].join(""),this.options.tpl=_.template(this.template)(this.options),this.options.formats=this.options.formats||[],Common.UI.Window.prototype.initialize.call(this,this.options)},render:function(){Common.UI.Window.prototype.render.call(this);var t=this,e=this.getChild();t.inputTitle=new Common.UI.InputField({el:$("#id-dlg-style-title"),allowBlank:!1,blankError:t.txtEmpty,style:"width: 100%;",validateOnBlur:!1,validation:function(e){return!(""==e)||t.txtNotEmpty}}),e.find(".dlg-btn").on("click",_.bind(this.onBtnClick,this)),this.options.formats.unshift({val
this . imageControls . push ( this . cmbScale ), this . cmbLang = new Common . UI . ComboBox ({ el : $ ( "#watermark-combo-lang" ), cls : "input-group-nr" , editable :! 1 , menuStyle : "min-width: 100%;max-height: 210px;" , scrollAlwaysVisible :! 0 , data : []}). on ( "selected" , _ . bind ( this . onSelectLang , this )), this . cmbLang . setValue ( Common . util . LanguageInfo . getLocalLanguageName ( 9 )[ 1 ]), this . textControls . push ( this . cmbLang ), this . cmbText = new Common . UI . ComboBox ({ el : $ ( "#watermark-combo-text" ), cls : "input-group-nr" , menuStyle : "min-width: 100%;max-height: 210px;" , scrollAlwaysVisible :! 0 , displayField : "value" , data : [{ value : "ASAP" },{ value : "CONFIDENTIAL" },{ value : "COPY" },{ value : "DO NOT COPY" },{ value : "DRAFT" },{ value : "ORIGINAL" },{ value : "PERSONAL" },{ value : "SAMPLE" },{ value : "TOP SECRET" },{ value : "URGENT" }]}). on ( "selected" , _ . bind ( function ( t , e ){}, this )), this . cmbText . setValue ( this . cmbText . options . data [ 0 ]. value ), this . textControls . push ( this . cmbText ), this . cmbFonts = new Common . UI . ComboBoxFonts ({ el : $ ( "#watermark-fonts" ), cls : "input-group-nr" , style : "width: 142px;" , menuCls : "scrollable-menu" , menuStyle : "min-width: 100%;max-height: 270px;" , store : new Common . Collections . Fonts , recent : 0 , hint : this . tipFontName }). on ( "selected" , _ . bind ( function ( t , e ){ this . fontName = e . name }, this )), this . textControls . push ( this . cmbFonts ); var e = [{ value :- 1 , displayValue : this . textAuto },{ value : 36 , displayValue : "36" },{ value : 40 , displayValue : "40" },{ value : 44 , displayValue : "44" },{ value : 48 , displayValue : "48" },{ value : 54 , displayValue : "54" },{ value : 60 , displayValue : "60" },{ value : 66 , displayValue : "66" },{ value : 72 , displayValue : "72" },{ value : 80 , displayValue : "80" },{ value : 90 , displayValue : "90" },{ value : 96 , displayValue : "96" },{ value : 105 , displayValue : "105" },{ value : 120 , displayValue : "120" },{ value : 144 , displayValue : "144" }]; this . cmbFontSize = new Common . UI . ComboBox ({ el : $ ( "#watermark-font-size" ), cls : "input-group-nr" , style : "width: 55px;" , menuCls : "scrollable-menu" , menuStyle : "min-width: 55px;max-height: 270px;" , hint : this . tipFontSize , data : e }), this . cmbFontSize . setValue ( - 1 ), this . textControls . push ( this . cmbFontSize ), this . btnBold = new Common . UI . Button ({ cls : "btn-toolbar" , iconCls : "btn-bold" , enableToggle :! 0 , hint : this . textBold }), this . btnBold . render ( $ ( "#watermark-bold" )), this . textControls . push ( this . btnBold ), this . btnItalic = new Common . UI . Button ({ cls : "btn-toolbar" , iconCls : "btn-italic" , enableToggle :! 0 , hint : this . textItalic }), this . btnItalic . render ( $ ( "#watermark-italic" )), this . textControls . push ( this . btnItalic ), this . btnUnderline = new Common . UI . Button ({ cls : "btn-toolbar" , iconCls : "btn-underline" , enableToggle :! 0 , hint : this . textUnderline }), this . btnUnderline . render ( $ ( "#watermark-underline" )), this . textControls . push ( this . btnUnderline ), this . btnStrikeout = new Common . UI . Button ({ cls : "btn-toolbar" , iconCls : "btn-strikeout" , enableToggle :! 0 , hint : this . textStrikeout }), this . btnStrikeout . render ( $ ( "#watermark-strikeout" )), this . textControls . push ( this . btnStrikeout ); this . btnTextColor = new Common . UI . Button ({ cls : "btn-toolbar" , iconCls : "btn-fontcolor" , hint : this . textColor , menu : new Common . UI . Menu ({ items : [{ id : "watermark-auto-color" , caption : this . textAuto , template : _ . template ( '<a tabindex="-1" type="menuitem"><span class="menu-item-icon" style="background-image: none; width: 12px; height: 12px; margin: 1px 7px 0 -7px; background-color: #000;"></span><%= caption %></a>' )},{ caption : "--" },{ template : _ . template ( '<div id="watermark-menu-textcolor" style="width: 169px; height: 220px; margin: 10px;"></div>' )},{ template : _ . template ( '<a id="watermark-menu-textcolor-new" style="padding-left:12px;">' + this . textNewColor + "</a>" )}]})}), this . btnTextColor . render ( $ ( "#watermark-textcolor" )), this . mnuTextColorPicker = function ( e , i ){ if ( e && e . cmpEl ){ e . currentColor = "#c0c0c0" ; var n = $ ( '<div class="btn-color-value-line"></div>' ); $ ( "button:first-child" , e . cmpEl ). append ( n ), n . css ( "background-color" , e . currentColor ); var o = new Common . UI . ThemeColorPalette ({ el : $ ( i )})} return e . menu . cmpEl . on ( "click" , i + "-new" , _ . bind ( function (){ o . addNewColor ( "object" == typeof e . color ? e . color . color : e . color )}, t )), o . on ( "select" , _ . bind ( t . onColorSelect , t )), o }( this . btnTextColor , "#watermark-menu-textcolor" ), $ ( "#watermark-auto-color" ). on ( "click" , _ . bind ( this . onAutoColor , this )), this . textControls . push ( this . bt
n !== Asc . c_oAscTypeSelectElement . Table && n !== Asc . c_oAscTypeSelectElement . Header && n !== Asc . c_oAscTypeSelectElement . Image || ( d =! 1 ), ! 1 !== d && n == Asc . c_oAscTypeSelectElement . Paragraph && ( d =! 0 ); i && this . onParagraphColor ( i ); var y = s || a ; this . _state . prcontrolsdisable != y && ( this . _state . activated && ( this . _state . prcontrolsdisable = y ), _ . each ( m . paragraphControls , function ( t ){ t . setDisabled ( y )}, this )), v = this . api . asc_IsContentControl (); var w = v ? this . api . asc_GetContentControlProperties () : null , x = v && w ? w . get_Lock () : Asc . c_oAscSdtLockType . Unlocked , S =! ( ! v ||! w ) && w . get_ContentControlType () == Asc . c_oAscSdtLevelType . Inline ; void 0 === x && ( x = Asc . c_oAscSdtLockType . Unlocked ), s || a || ( m . btnContentControls . menu . items [ 0 ]. setDisabled ( S || x == Asc . c_oAscSdtLockType . SdtContentLocked || x == Asc . c_oAscSdtLockType . ContentLocked ), m . btnContentControls . menu . items [ 1 ]. setDisabled ( S || x == Asc . c_oAscSdtLockType . SdtContentLocked || x == Asc . c_oAscSdtLockType . ContentLocked ), m . btnContentControls . menu . items [ 3 ]. setDisabled ( ! v || x == Asc . c_oAscSdtLockType . SdtContentLocked || x == Asc . c_oAscSdtLockType . SdtLocked ), m . btnContentControls . menu . items [ 5 ]. setDisabled ( ! v )); var A = s || a || g ; if ( this . _state . textonlycontrolsdisable != A && ( this . _state . activated && ( this . _state . textonlycontrolsdisable = A ), y || _ . each ( m . textOnlyControls , function ( t ){ t . setDisabled ( A )}, this ), m . btnCopyStyle . setDisabled ( A ), m . btnClearStyle . setDisabled ( A )), d && p ){ var k = p . get_FramePr (), T = Asc . c_oAscDropCap . None ; void 0 !== k ? ( T = k . get_DropCap (), d = T === Asc . c_oAscDropCap . Drop || T === Asc . c_oAscDropCap . Margin , h =! 1 ) : d = p . get_CanAddDropCap (), d && this . onDropCap ( T )} y = y ||! d || b || S , m . btnDropCap . setDisabled ( y ), m . btnDropCap . isDisabled () || m . mnuDropCapAdvanced . setDisabled ( h ), y =! l || a || b || S , m . btnInsertTable . setDisabled ( y ), y = m . mnuPageNumCurrentPos . isDisabled () && m . mnuPageNumberPosPicker . isDisabled () || S , m . mnuInsertPageNum . setDisabled ( y ); var I = this . api . asc_IsCursorInFootnote (); y = s || a || u || C || b &&! f || I || v , m . btnsPageBreak . setDisabled ( y ), m . btnBlankPage . setDisabled ( y ), y = s || a || b || S , m . btnInsertShape . setDisabled ( y ), m . btnInsertText . setDisabled ( y ), y = s || a ||! c || b || S , m . btnInsertImage . setDisabled ( y ), m . btnInsertTextArt . setDisabled ( y || C || I ), g !== this . _state . in_chart && ( m . btnInsertChart . updateHint ( g ? m . tipChangeChart : m . tipInsertChart ), this . _state . in_chart = g ), y = g && r ||! g && y || S , m . btnInsertChart . setDisabled ( y ), y = s || a || g ||! c &&! b || S , m . btnInsertEquation . setDisabled ( y ), y = s || a || b , m . btnSuperscript . setDisabled ( y ), m . btnSubscript . setDisabled ( y ), m . btnEditHeader . setDisabled ( b ), y = s || a || C || S , y != m . btnColumns . isDisabled () && m . btnColumns . setDisabled ( y ), m . listStylesAdditionalMenuItem && void 0 === p !== m . listStylesAdditionalMenuItem . isDisabled () && m . listStylesAdditionalMenuItem . setDisabled ( void 0 === p ), y =! this . api . can_AddQuotedComment () || s || a || r , this . btnsComment && this . btnsComment . length > 0 && this . btnsComment . setDisabled ( y ), m . btnWatermark . setDisabled ( a ), this . _state . in_equation = b }}, onApiStyleChange : function ( t ){ this . toolbar . btnCopyStyle . toggle ( t , ! 0 ), this . modeAlwaysSetStyle =! 1 }, onApiParagraphStyleChange : function ( t ){ if ( this . _state . prstyle != t ){ var e = this . toolbar . listStyles ; if ( e . rendered ){ e . suspendEvents (); var i = e . menuPicker . store . findWhere ({ title : t }); this . _state . prstyle = e . menuPicker . store . length > 0 || window . styles_loaded ? t : void 0 , e . menuPicker . selectRecord ( i ), e . resumeEvents ()}}}, onApiPageOrient : function ( t ){ this . _state . pgorient !== t && ( this . toolbar . btnPageOrient . menu . items [ t ? 0 : 1 ]. setChecked ( ! 0 ), this . _state . pgorient = t )}, onApiLockDocumentProps : function (){ ! 0 !== this . _state . lock_doc && ( this . toolbar . btnPageOrient . setDisabled ( ! 0 ), this . toolbar . btnPageSize . setDisabled ( ! 0 ), this . _state . activated && ( this . _state . lock_doc =! 0 ))}, onApiUnLockDocumentProps : function (){ ! 1 !== this . _state . lock_doc && ( this . toolbar . btnPageOrient . setDisabled ( ! 1 ), this . toolbar . btnPageSize . setDisabled ( ! 1 ), this . _state . activated && ( this . _state . lock_doc =! 1 ))}, onApiLockDocumentSchema : function (){ this . toolbar . btnColorSchemas . setDisabled ( ! 0 )}, onApiUnLockDocumentSchema : function (){ this . toolbar . btnColorSchemas . setDisabled ( ! 1 )}, onApiLockHeaderFooters : function (){ this . toolbar . mnuPageNumberPosPicker . setDisabled ( ! 0 ), this . toolbar . mnuInsertPageNum . setDisabled ( this . toolbar . mnuPageNumCurrentPos . isDisabled ())}, onApiUnLockH
t . pressed ? ( this . _setMarkerColor ( t . currentColor ), Common . component . Analytics . trackEvent ( "ToolBar" , "Highlight Color" )) : this . api . SetMarkerFormat ( ! 1 )}, onBtnFontColor : function (){ this . toolbar . mnuFontColorPicker . trigger ( "select" , this . toolbar . mnuFontColorPicker , this . toolbar . mnuFontColorPicker . currentColor )}, onBtnParagraphColor : function (){ this . toolbar . mnuParagraphColorPicker . trigger ( "select" , this . toolbar . mnuParagraphColorPicker , this . toolbar . mnuParagraphColorPicker . currentColor )}, onHighlightTransparentClick : function ( t , e ){ this . _setMarkerColor ( "transparent" , "menu" ), t . setChecked ( ! 0 , ! 0 ), this . toolbar . btnHighlightColor . currentColor = "transparent" , $ ( ".btn-color-value-line" , this . toolbar . btnHighlightColor . cmpEl ). css ( "background-color" , "transparent" )}, onParagraphColor : function ( t ){ var e , i = this . toolbar . mnuParagraphColorPicker ; if ( null !== t && void 0 !== t && t . get_Value () === Asc . c_oAscShdClear ){ var n = t . get_Color (); e = n ? n . get_type () == Asc . c_oAscColor . COLOR_TYPE_SCHEME ? { color : Common . Utils . ThemeColor . getHexColor ( n . get_r (), n . get_g (), n . get_b ()), effectValue : n . get_value ()} : Common . Utils . ThemeColor . getHexColor ( n . get_r (), n . get_g (), n . get_b ()) : "transparent" } else e = "transparent" ; var o = typeof e ; if ( o !== typeof this . _state . clrback || "object" == o && ( e . effectValue !== this . _state . clrback . effectValue || this . _state . clrback . color . indexOf ( e . color ) < 0 ) || "object" != o && this . _state . clrback . indexOf ( e ) < 0 ){ if ( "object" == typeof e ){ for ( var s =! 1 , a = 0 ; a < 10 ; a ++ ) if ( Common . Utils . ThemeColor . ThemeValues [ a ] == e . effectValue ){ i . select ( e , ! 0 ), s =! 0 ; break } s || i . clearSelection ()} else i . select ( e , ! 0 ); this . _state . clrback = e } this . _state . clrshd_asccolor = t }, onApiTextColor : function ( t ){ if ( t . get_auto ()){ if ( "auto" !== this . _state . clrtext ){ this . toolbar . mnuFontColorPicker . clearSelection (); var e = this . toolbar . btnFontColor . menu . $el . find ( "#id-toolbar-menu-auto-fontcolor > a" ); ! e . hasClass ( "selected" ) && e . addClass ( "selected" ), this . _state . clrtext = "auto" }} else { var i , n = this . toolbar . mnuFontColorPicker ; t && ( i = t . get_type () == Asc . c_oAscColor . COLOR_TYPE_SCHEME ? { color : Common . Utils . ThemeColor . getHexColor ( t . get_r (), t . get_g (), t . get_b ()), effectValue : t . get_value ()} : Common . Utils . ThemeColor . getHexColor ( t . get_r (), t . get_g (), t . get_b ())); var o = typeof i , s = typeof this . _state . clrtext ; if ( "auto" == this . _state . clrtext || o !== s || "object" == o && ( i . effectValue !== this . _state . clrtext . effectValue || this . _state . clrtext . color . indexOf ( i . color ) < 0 ) || "object" != o && this . _state . clrtext . indexOf ( i ) < 0 ){ var e = this . toolbar . btnFontColor . menu . $el . find ( "#id-toolbar-menu-auto-fontcolor > a" ); if ( e . hasClass ( "selected" ) && e . removeClass ( "selected" ), "object" == typeof i ){ for ( var a =! 1 , r = 0 ; r < 10 ; r ++ ) if ( Common . Utils . ThemeColor . ThemeValues [ r ] == i . effectValue ){ n . select ( i , ! 0 ), a =! 0 ; break } a || n . clearSelection ()} else n . select ( i , ! 0 ); this . _state . clrtext = i }} this . _state . clrtext_asccolor = t }, fillAutoShapes : function (){ for ( var t = this , e = this . getApplication (). getCollection ( "ShapeGroups" ), i = 0 ; i < e . length ; i ++ ){ var n = e . at ( i ), o = new Common . UI . MenuItem ({ caption : n . get ( "groupName" ), menu : new Common . UI . Menu ({ menuAlign : "tl-tr" , items : [{ template : _ . template ( '<div id="id-toolbar-menu-shapegroup' + i + '" class="menu-shape" style="width: ' + ( n . get ( "groupWidth" ) - 8 ) + 'px; margin-left: 5px;"></div>' )}]})}); t . toolbar . btnInsertShape . menu . addItem ( o ); new Common . UI . DataView ({ el : $ ( "#id-toolbar-menu-shapegroup" + i ), store : n . get ( "groupStore" ), parentMenu : o . menu , showLast :! 1 , itemTemplate : _ . template ( '<div class="item-shape" id="<%= id %>"><svg width="20" height="20" class="icon"><use xlink:href="#svg-icon-<%= data.shapeType %>"></use></svg></div>' )}). on ( "item:click" , function ( e , i , n , o ){ t . api && ( n && ( t . _addAutoshape ( ! 0 , n . get ( "data" ). shapeType ), t . _isAddingShape =! 0 ), t . toolbar . btnInsertText . pressed && t . toolbar . btnInsertText . toggle ( ! 1 , ! 0 ), "click" !== o . type && t . toolbar . btnInsertShape . menu . hide (), Common . NotificationCenter . trigger ( "edit:complete" , t . toolbar , t . toolbar . btnInsertShape ), Common . component . Analytics . trackEvent ( "ToolBar" , "Add Shape" ))})}}, fillEquations : function (){ if ( this . toolbar . btnInsertEquation . rendered &&! ( this . toolbar . btnInsertEquation . menu . items . length > 0 )){ var t = this , e = this . getApplication (). getCollection ( "EquationGroups" ); t . equationPickers = [], t . toolbar . btnInsert
return '\r\n<div class="statusbar" style="display:table;">\r\n <div class="status-group dropup">\r\n <label id="label-pages" class="status-label dropdown-toggle" style="margin-left: 40px;" data-toggle="dropdown"><%= textPageNumber %></label>\r\n <div id="status-goto-box" class="dropdown-menu">\r\n <label style="float:left;line-height:22px;"><%= textGotoPage %></label>\r\n <div id="status-goto-page" style="display:inline-block;"></div>\r\n </div>\r\n </div>\r\n <div class="status-group" style="width:100%; text-align:center;">\r\n <label id="label-action" class="status-label"></label>\r\n </div>\r\n <div class="status-group" style="">\r\n <div class="separator short el-edit"></div>\r\n <div class="cnt-lang el-edit">\r\n <div class="dropdown-toggle" data-toggle="dropdown" style="margin-right: 6px;">\r\n <label id="status-label-lang" class="status-label">English (United States)</label>\r\n <div class="caret up img-commonctrl" />\r\n </div>\r\n </div>\r\n <span id="btn-doc-lang" class="el-edit"></span>\r\n <span id="btn-doc-spell" class="el-edit"></span>\r\n <div class="separator short el-edit"></div>\r\n <div id="btn-doc-review" class="el-edit el-review" style="display: inline-block;"></div>\r\n <div class="separator short el-edit el-review"></div>\r\n <button id="btn-zoom-topage" type="button" class="btn small btn-toolbar"><span class="icon btn-ic-zoomtopage"> </span></button>\r\n <button id="btn-zoom-towidth" type="button" class="btn small btn-toolbar"><span class="icon btn-ic-zoomtowidth"> </span></button>\r\n <button id="btn-zoom-down" type="button" class="btn small btn-toolbar"><span class="icon btn-zoomdown"> </span></button>\r\n <div class="cnt-zoom">\r\n <div class="dropdown-toggle" data-toggle="dropdown">\r\n <label id="label-zoom" class="status-label">Zoom 100%</label>\r\n </div>\r\n </div>\r\n <button id="btn-zoom-up" type="button" class="btn small btn-toolbar" style="margin-right:40px;"><span class="icon btn-zoomup"> </span></button>\r\n </div>\r\n</div>\r\n' }), define ( "documenteditor/main/app/model/Pages" ,[ "underscore" , "backbone" ], function ( t , e ){ "use strict" ; DE . Models = DE . Models || {}, DE . Models . Pages = e . Model . extend ({ defaults : { current : 0 , count : 0 }})}), define ( "documenteditor/main/app/view/Statusbar" ,[ "text!documenteditor/main/app/template/StatusBar.template" , "jquery" , "underscore" , "backbone" , "tip" , "common/main/lib/component/Menu" , "common/main/lib/component/Window" , "documenteditor/main/app/model/Pages" ], function ( t , e , i , n ){ "use strict" ; function o ( t ){ this . pages . set ( "count" , t )} function s ( t ){ this . pages . set ( "current" , t + 1 )} function a ( t , i , n ){ e ( ".statusbar #label-pages" , this . $el ). text ( Common . Utils . String . format ( this . pageIndexText , t . get ( "current" ), t . get ( "count" )))} function r ( t , e , i ){ t . $el . parent (). find ( "#status-label-lang" ). text ( e . caption ), this . langMenu . prevTip = e . value . value , this . fireEvent ( "langchanged" ,[ this , e . value . code , e . caption ])} function l ( t ){ var e = this ; e . btnZoomToPage . updateHint ( e . tipFitPage ), e . btnZoomToWidth . updateHint ( e . tipFitWidth ), e . btnZoomDown . updateHint ( e . tipZoomOut + Common . Utils . String . platformKey ( "Ctrl+-" )), e . btnZoomUp . updateHint ( e . tipZoomIn + Common . Utils . String . platformKey ( "Ctrl++" )), e . btnLanguage && e . btnLanguage . cmpEl && ( e . btnLanguage . updateHint ( e . tipSetLang ), e . btnLanguage . cmpEl . on ({ "show.bs.dropdown" : function (){ i . defer ( function (){ e . btnLanguage . cmpEl . find ( "ul" ). focus ()}, 100 )}, "hide.bs.dropdown" : function (){ i . defer ( function (){ e . api . asc_enableKeyEvents ( ! 0 )}, 100 )}, click : function ( t ){ if ( e . btnLanguage . isDisabled ()) return ! 1 }}), e . langMenu . on ( "item:click" , i . bind ( r , this ))), e . cntZoom . updateHint ( e . tipZoomFactor ), e . cntZoom . cmpEl . on ({ "show.bs.dropdown" : function (){ i . defer ( function (){ e . cntZoom . cmpEl . find ( "ul" ). focus ()}, 100 )}, "hide.bs.dropdown" : function (){ i . defer ( function (){ e . api . asc_enableKeyEvents ( ! 0 )}, 100 )}}), e . txtGoToPage . on ({ "keypress:after" : function ( t , i ){ if ( i . keyC
Common . NotificationCenter . trigger ( "edit:complete" , this . statusbar )}, zoomDocument : function ( t , e ){ switch ( t ){ case "up" : this . api . zoomIn (); break ; case "down" : this . api . zoomOut ()} Common . NotificationCenter . trigger ( "edit:complete" , this . statusbar )}, _onZoomChange : function ( t , e ){ this . statusbar . btnZoomToPage . toggle ( 2 == e , ! 0 ), this . statusbar . btnZoomToWidth . toggle ( 1 == e , ! 0 ), $ ( ".statusbar #label-zoom" ). text ( Common . Utils . String . format ( this . zoomText , t ))}, _onTextLanguage : function ( t ){ var e = Common . util . LanguageInfo . getLocalLanguageName ( t ); this . statusbar . setLanguage ({ value : e [ 0 ], displayValue : e [ 1 ], code : t })}, setLanguages : function ( t ){ this . langs = t , this . statusbar . reloadLanguages ( t )}, setStatusCaption : function ( t , e , i ){ this . timerCaption && ( new Date < this . timerCaption || 0 == t . length ) &&! e || ( this . timerCaption = void 0 , t . length ? ( this . statusbar . showStatusMessage ( t ), i > 0 && ( this . timerCaption = ( new Date ). getTime () + i )) : this . statusbar . clearStatusMessage ())}, createDelayedElements : function (){ this . statusbar . $el . css ( "z-index" , "" )}, onLangMenu : function ( t , e , i ){ this . api . put_TextPrLang ( e )}, synchronizeChanges : function (){ this . setStatusCaption ( "" )}, createChangesTip : function ( t , e , i ){ var n = this , o = new Common . UI . SynchronizeTip ({ target : n . btnTurnReview . $el , text : t , placement : "top" }); return o . on ({ dontshowclick : function (){ Common . localStorage . setItem ( e , 1 ), o . hide (), n . btnTurnReview . updateHint ( n . tipReview )}, closeclick : function (){ o . hide (), n . btnTurnReview . updateHint ( n . tipReview )}}), o }, zoomText : "Zoom {0}%" , textHasChanges : "New changes have been tracked" , textTrackChanges : "The document is opened with the Track Changes mode enabled" , tipReview : "Review" }, DE . Controllers . Statusbar || {}))}), define ( "documenteditor/main/app/view/Links" ,[ "common/main/lib/util/utils" , "common/main/lib/component/BaseView" , "common/main/lib/component/Layout" ], function (){ "use strict" ; DE . Views . Links = Common . UI . BaseView . extend ( _ . extend ( function (){ function t (){ var t = this ; this . btnsContents . forEach ( function ( e ){ e . menu . on ( "item:click" , function ( e , i , n ){ t . fireEvent ( "links:contents" ,[ i . value ])}), e . on ( "click" , function ( e , i ){ t . fireEvent ( "links:contents" ,[ 0 ])})}), this . contentsMenu . on ( "item:click" , function ( e , i , n ){ setTimeout ( function (){ t . fireEvent ( "links:contents" ,[ i . value , ! 0 ])}, 10 )}), this . btnContentsUpdate . menu . on ( "item:click" , function ( e , i , n ){ t . fireEvent ( "links:update" ,[ i . value ])}), this . btnContentsUpdate . on ( "click" , function ( e , i ){ t . fireEvent ( "links:update" ,[ "all" ])}), this . contentsUpdateMenu . on ( "item:click" , function ( e , i , n ){ setTimeout ( function (){ t . fireEvent ( "links:update" ,[ i . value , ! 0 ])}, 10 )}), this . btnsNotes . forEach ( function ( e ){ e . menu . on ( "item:click" , function ( e , i , n ){ t . fireEvent ( "links:notes" ,[ i . value ])}), e . on ( "click" , function ( e , i ){ t . fireEvent ( "links:notes" ,[ "ins_footnote" ])})}), this . btnsPrevNote . forEach ( function ( e ){ e . on ( "click" , function ( e , i ){ t . fireEvent ( "links:notes" ,[ "prev" ])})}), this . btnsNextNote . forEach ( function ( e ){ e . on ( "click" , function ( e , i ){ t . fireEvent ( "links:notes" ,[ "next" ])})}), this . btnsHyperlink . forEach ( function ( e ){ e . on ( "click" , function ( e , i ){ t . fireEvent ( "links:hyperlink" )})}), this . btnBookmarks . on ( "click" , function ( e , i ){ t . fireEvent ( "links:bookmarks" )})} return { options : {}, initialize : function ( t ){ Common . UI . BaseView . prototype . initialize . call ( this ), this . toolbar = t . toolbar , this . btnsPrevNote = [], this . btnsNextNote = [], this . paragraphControls = []; var e = this , i = e . toolbar . $el ; this . btnsContents = Common . Utils . injectButtons ( i . find ( ".btn-slot.btn-contents" ), "" , "btn-contents" , e . capBtnInsContents , void 0 , ! 0 , ! 0 ), this . btnsNotes = Common . Utils . injectButtons ( i . find ( ".btn-slot.slot-notes" ), "" , "btn-notes" , e . capBtnInsFootnote , void 0 , ! 0 , ! 0 ), this . btnsHyperlink = Common . Utils . injectButtons ( i . find ( ".btn-slot.slot-inshyperlink" ), "" , "btn-inserthyperlink" , e . capBtnInsLink ), Array . prototype . push . apply ( this . paragraphControls , this . btnsContents . concat ( this . btnsNotes , this . btnsHyperlink )), this . btnContentsUpdate = new Common . UI . Button ({ cls : "btn-toolbar x-huge icon-top" , iconCls : "btn-contents-update" , caption : this . capBtnContentsUpdate , split :! 0 , menu :! 0 , disabled :! 0 }), Common . Utils . injectComponent ( i . find ( "#slot-btn-contents-update" ), this . btnContentsUpdate ), this . paragraphControls . push ( this . btnContentsUpdate ), this . btnBoo
template : [ '<div class="box" style="height:' + ( e . options . height - 85 ) + 'px;">' , '<div class="content-panel" style="padding: 0 5px;"><div class="inner-content">' , '<div class="settings-panel active">' , '<table cols="1" style="width: 100%;">' , "<tr>" , '<td class="padding-extra-small">' , '<label class="input-label">' , e . textBookmarkName , "</label>" , "</td>" , "</tr>" , "<tr>" , '<td class="padding-large">' , '<div id="bookmarks-txt-name" style="display:inline-block;vertical-align: top;margin-right: 10px;"></div>' , '<button type="button" result="add" class="btn btn-text-default" id="bookmarks-btn-add" style="vertical-align: top;">' , e . textAdd , "</button>" , "</td>" , "</tr>" , "<tr>" , '<td class="padding-extra-small">' , '<label class="header" style="margin-right: 10px;">' , e . textSort , "</label>" , '<div id="bookmarks-radio-name" style="display: inline-block; margin-right: 10px;"></div>' , '<div id="bookmarks-radio-location" style="display: inline-block;"></div>' , "</td>" , "</tr>" , "<tr>" , '<td class="padding-small">' , '<div id="bookmarks-list" style="width:290px; height: 130px;"></div>' , "</td>" , "</tr>" , "<tr>" , '<td class="padding-large">' , '<button type="button" class="btn btn-text-default" id="bookmarks-btn-goto" style="margin-right: 5px;">' , e . textGoto , "</button>" , '<div style="display: inline-block; position: relative;">' , '<button type="button" class="btn btn-text-default auto dropdown-toggle" id="bookmarks-btn-link" style="min-width: 75px;" data-toggle="dropdown">' , e . textGetLink , "</button>" , '<div id="id-clip-copy-box" class="dropdown-menu" style="width: 291px; left: -80px; padding: 10px;">' , '<div id="id-dlg-clip-copy"></div>' , '<button id="id-dlg-copy-btn" class="btn btn-text-default" style="margin-left: 5px; width: 86px;">' + e . textCopy + "</button>" , "</div>" , "</div>" , '<button type="button" class="btn btn-text-default" id="bookmarks-btn-delete" style="float: right;">' , e . textDelete , "</button>" , "</td>" , "</tr>" , "<tr>" , "<td>" , '<div id="bookmarks-checkbox-hidden"></div>' , "</td>" , "</tr>" , "</table>" , "</div></div>" , "</div>" , "</div>" , '<div class="footer right">' , '<button class="btn normal dlg-btn" result="cancel" style="width: 86px;">' + e . textClose + "</button>" , "</div>" ]. join ( "" )}, t ), this . api = t . api , this . handler = t . handler , this . props = t . props , this . appOptions = t . appOptions , Common . Views . AdvancedSettingsWindow . prototype . initialize . call ( this , this . options )}, render : function (){ Common . Views . AdvancedSettingsWindow . prototype . render . call ( this ); var t = this ; if ( this . txtName = new Common . UI . InputField ({ el : $ ( "#bookmarks-txt-name" ), allowBlank :! 0 , validateOnChange :! 0 , validateOnBlur :! 0 , style : "width: 205px;" , value : "" , maxLength : 40 , validation : function ( e ){ var i = t . props . asc_CheckNewBookmarkName ( e ); return t . btnAdd . setDisabled ( ! i ), ! ( ! i &&! _ . isEmpty ( e )) || t . txtInvalidName }}). on ( "changing" , function ( e , i ){ var n = t . props . asc_HaveBookmark ( i ); if ( n ){ var o = t . bookmarksList . store . findWhere ({ value : i }); t . bookmarksList . selectRecord ( o ), t . bookmarksList . scrollToRecord ( o )} else t . bookmarksList . deselectAll (); t . btnGoto . setDisabled ( ! n ), t . btnDelete . setDisabled ( ! n ), t . btnGetLink . setDisabled ( ! n )}), this . radioName = new Common . UI . RadioBox ({ el : $ ( "#bookmarks-radio-name" ), labelText : this . textName , name : "asc-radio-bookmark-sort" }), this . radioName . on ( "change" , _ . bind ( this . onRadioSort , this )), this . radioLocation = new Common . UI . RadioBox ({ el : $ ( "#bookmarks-radio-location" ), labelText : this . textLocation , name : "asc-radio-bookmark-sort" }), this . radioLocation . on ( "change" , _ . bind ( this . onRadioSort , this )), Common . Utils . InternalSettings . get ( "de-bookmarks-sort-location" ) ? this . radioLocation . setValue ( ! 0 , ! 0 ) : this . radioName . setValue ( ! 0 , ! 0 ), this . bookmarksList = new Common . UI . ListView ({ el : $ ( "#bookmarks-list" , this . $window ), store : new Common . UI . DataViewStore , itemTemplate : _ . template ( '<div id="<%= id %>" class="list-item" style="pointer-events:none;overflow: hidden; text-overflow: ellipsis;"><%= value %></div>' )}), this . bookmarksList . store . comparator = function ( e ){ return t . radioName . getValue () ? e . get ( "value" ) : e . get ( "location" )}, this . bookmarksList . on ( "item:dblclick" , _ . bind ( this . onDblClickBookmark , this )), this . bookmarksList . on ( "entervalue" , _ . bind ( this . onPrimary , this )), this . bookmarksList . on ( "item:s
this.numLineHeight.setMinValue(this._arrLineRule[null!==e.LineRule?e.LineRule:1].minValue),this.numLineHeight.setDefaultUnit(this._arrLineRule[null!==e.LineRule?e.LineRule:1].defaultUnit),this.numLineHeight.setStep(this._arrLineRule[null!==e.LineRule?e.LineRule:1].step),this._state.LineRuleIdx=e.LineRule),Math.abs(this._state.LineHeight-e.Line)>.001||(null===this._state.LineHeight||null===e.Line)&&this._state.LineHeight!==e.Line){var n="";e.LineRule==c_paragraphLinerule.LINERULE_AUTO?n=e.Line:null!==e.LineRule&&null!==e.Line&&(n=Common.Utils.Metric.fnRecalcFromMM(e.Line)),this.numLineHeight.setValue(null!==n?n:"",!0),this._state.LineHeight=e.Line}(Math.abs(this._state.LineSpacingBefore-e.Before)>.001||(null===this._state.LineSpacingBefore||null===e.Before)&&this._state.LineSpacingBefore!==e.Before)&&(this.numSpacingBefore.setValue(null!==e.Before?e.Before<0?e.Before:Common.Utils.Metric.fnRecalcFromMM(e.Before):"",!0),this._state.LineSpacingBefore=e.Before),(Math.abs(this._state.LineSpacingAfter-e.After)>.001||(null===this._state.LineSpacingAfter||null===e.After)&&this._state.LineSpacingAfter!==e.After)&&(this.numSpacingAfter.setValue(null!==e.After?e.After<0?e.After:Common.Utils.Metric.fnRecalcFromMM(e.After):"",!0),this._state.LineSpacingAfter=e.After),this._state.AddInterval!==i.ContextualSpacing&&(this.chAddInterval.setValue(null!==i.ContextualSpacing&&void 0!==i.ContextualSpacing?i.ContextualSpacing:" indeterminate ",!0),this._state.AddInterval=i.ContextualSpacing);var o=t.get_Shade();if(null!==o&&void 0!==o&&o.get_Value()===Asc.c_oAscShdClear){var s=o.get_Color();s?s.get_type()==Asc.c_oAscColor.COLOR_TYPE_SCHEME?this.BackColor={color:Common.Utils.ThemeColor.getHexColor(s.get_r(),s.get_g(),s.get_b()),effectValue:s.get_value()}:this.BackColor=Common.Utils.ThemeColor.getHexColor(s.get_r(),s.get_g(),s.get_b()):this.BackColor=" transparent "}else this.BackColor=" transparent ";var a=typeof this.BackColor;if(a!==typeof this._state.BackColor||" object "==a&&(this.BackColor.effectValue!==this._state.BackColor.effectValue||this._state.BackColor.color.indexOf(this.BackColor.color)<0)||" object "!=a&&this._state.BackColor.indexOf(this.BackColor)<0){if(this.btnColor.setColor(this.BackColor)," object "==typeof this.BackColor){for(var r=!1,l=0;l<10;l++)if(Common.Utils.ThemeColor.ThemeValues[l]==this.BackColor.effectValue){this.mnuColorPicker.select(this.BackColor,!0),r=!0;break}r||this.mnuColorPicker.clearSelection()}else this.mnuColorPicker.select(this.BackColor,!0);this._state.BackColor=this.BackColor}}},updateMetricUnit:function(){if(this.spinners)for(var t=0;t<this.spinners.length;t++){var e=this.spinners[t];e.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()),e.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt?1:.01)}this._arrLineRule[2].defaultUnit=this._arrLineRule[0].defaultUnit=Common.Utils.Metric.getCurrentMetricName(),this._arrLineRule[2].minValue=this._arrLineRule[0].minValue=parseFloat(Common.Utils.Metric.fnRecalcFromMM(.3).toFixed(2)),this._arrLineRule[2].step=this._arrLineRule[0].step=Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt?1:.01,null!==this._state.LineRuleIdx&&(this.numLineHeight.setDefaultUnit(this._arrLineRule[this._state.LineRuleIdx].defaultUnit),this.numLineHeight.setStep(this._arrLineRule[this._state.LineRuleIdx].step))},createDelayedElements:function(){this.UpdateThemeColors(),this.updateMetricUnit(),this._initSettings=!1},openAdvancedSettings:function(t){if(!this.linkAdvanced.hasClass(" disabled ")){var e=this;if(e.api&&!this._locked){var i=e.api.getSelectedElements();if(i&&i.length>0)for(var n,o,s=i.length-1;s>=0;s--)if(n=i[s].get_ObjectType(),o=i[s].get_ObjectValue(),Asc.c_oAscTypeSelectElement.Paragraph==n){new DE.Views.ParagraphSettingsAdvanced({tableStylerRows:2,tableStylerColumns:1,paragraphProps:o,borderProps:e.borderAdvancedProps,isChart:e.isChart,api:e.api,handler:function(t,i){" ok "==t&&e.api&&(e.borderAdvancedProps=i.borderProps,e.api.paraApply(i.paragraphProps)),e.fireEvent(" editcomplete ",e)}}).show();break}}}},addNewColor:functio
return'<div id=" id - adv - image - width " class=" settings - panel active ">\r\n <div class=" inner - content ">\r\n <table cols=" 4 " width=" 100 % ">\r\n <tr>\r\n <td width=" 88 px ">\r\n <label class=" input - label "><%= scope.textWidth %></label>\r\n <div id=" image - advanced - spin - width "></div>\r\n </td>\r\n <td width=" 28 px " style=" vertical - align : bottom ; ">\r\n <div id=" image - advanced - button - ratio "></div>\r\n </td>\r\n <td width=" 88 px ">\r\n <label class=" input - label "><%= scope.textHeight %></label>\r\n <div id=" image - advanced - spin - height "></div>\r\n </td>\r\n <td style=" vertical - align : bottom ; ">\r\n <button type=" button " class=" btn btn - text - default " id=" image - advanced - button - original - size " style=" width : 100 px ; "><%= scope.textOriginalSize %></button>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n</div>\r\n<div id=" id - adv - shape - size " class=" settings - panel active ">\r\n <div class=" inner - content ">\r\n <table cols=" 3 ">\r\n <tr>\r\n <td colspan=" 3 ">\r\n <label class=" header "><%= scope.textWidth %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style=" vertical - align : bottom ; padding - bottom : 12 px ; ">\r\n <div id=" shape - radio - hsize "></div>\r\n </td>\r\n <td class=" padding - small ">\r\n <label class=" input - label "><%= scope.textAbsoluteWH %></label>\r\n <div id=" shape - advanced - spin - width "></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style=" vertical - align : bottom ; padding - bottom : 19 px ; ">\r\n <div id=" shape - radio - hsizepc "></div>\r\n </td>\r\n <td class=" padding - large " style=" padding - right : 15 px ; ">\r\n <label class=" input - label "><%= scope.textRelativeWH %></label>\r\n <div id=" shape - advanced - spin - width - rel "></div>\r\n </td>\r\n <td class=" padding - large ">\r\n <label class=" input - label "><%= scope.textRelative %></label>\r\n <div id=" shape - combo - width - rel " style=" width : 115 px ; "></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan=" 3 ">\r\n <label class=" header "><%= scope.textHeight %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style=" vertical - align : bottom ; padding - bottom : 12 px ; ">\r\n <div id=" shape - radio - vsize "></div>\r\n </td>\r\n <td class=" padding - small ">\r\n <label class=" input - label "><%= scope.textAbsoluteWH %></label>\r\n <div id=" shape - advanced - spin - height "></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style=" vertical - align : bottom ; padding - bottom : 19 px ; ">\r\n <div id=" shape - radio - vsizepc "></div>\r\n </td>\r\n <td class=" padding - large " style=" padding - right : 15 px ; ">\r\n <label class=" input - label "><%= scope.textRelativeWH %></label>\r\n <div id=" shape - advanced - spin - height - rel "></div>\r\n </td>\r\n <td class=" padding - large ">\r\n <label class=" input - label "><%= scope.textRelative %></label>\r\n <div id=" shape - combo - height - rel " style=" width : 115 px ; "></div>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class=" separator horizontal padding - large "></div>\r\n <div class=" inner - content ">\r\n <table cols=" 1 " style=" width : 100 % ; ">\r\n <tr>\r\n <td>\r\n <div id=" shape - checkbox - ratio "></div>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n</div>\r\n<div id=" id - adv - image - rotate " class=" settings - panel active ">\r\n <div class=" inner - content padding - large ">\r\n <div style=" width : 100 % ; ">\r\n <label class=" input - label "><%= scope.textAngle %><
this.spnX=new Common.UI.MetricSpinner({el:$(" # image - spin - x "),step:.1,width:115,disabled:!0,defaultUnit:" cm ",defaultValue:0,value:" 0 cm ",maxValue:55.87,minValue:-55.87}),this.spnX.on(" change ",_.bind(function(t,e,i,n){this._changedProps&&(null!==this._changedProps.get_PositionH()&&void 0!==this._changedProps.get_PositionH()||this._changedProps.put_PositionH(new Asc.CImagePositionH),this._changedProps.get_PositionH().put_UseAlign(!1),this._changedProps.get_PositionH().put_Percent(!1),this._changedProps.get_PositionH().put_RelativeFrom(this._state.HPositionFrom),this._changedProps.get_PositionH().put_Value(Common.Utils.Metric.fnRecalcToMM(t.getNumberValue())),this._state.spnXChanged=!0)},this)),this.spinners.push(this.spnX),this.spnY=new Common.UI.MetricSpinner({el:$(" # image - spin - y "),step:.1,width:115,disabled:!0,defaultUnit:" cm ",defaultValue:0,value:" 0 cm ",maxValue:55.87,minValue:-55.87}),this.spnY.on(" change ",_.bind(function(t,e,i,n){this._changedProps&&(null!==this._changedProps.get_PositionV()&&void 0!==this._changedProps.get_PositionV()||this._changedProps.put_PositionV(new Asc.CImagePositionV),this._changedProps.get_PositionV().put_UseAlign(!1),this._changedProps.get_PositionV().put_Percent(!1),this._changedProps.get_PositionV().put_RelativeFrom(this._state.VPositionFrom),this._changedProps.get_PositionV().put_Value(Common.Utils.Metric.fnRecalcToMM(t.getNumberValue())),this._state.spnYChanged=!0)},this)),this.spinners.push(this.spnY),this._arrHAlign=[{displayValue:this.textLeft,value:Asc.c_oAscAlignH.Left},{displayValue:this.textCenter,value:Asc.c_oAscAlignH.Center},{displayValue:this.textRight,value:Asc.c_oAscAlignH.Right}],this.cmbHAlign=new Common.UI.ComboBox({el:$(" # image - combo - halign "),cls:" input - group - nr ",menuStyle:" min - width : 115 px ; ",editable:!1,data:this._arrHAlign}),this.cmbHAlign.setValue(this._state.HAlignType),this.cmbHAlign.on(" selected ",_.bind(this.onHAlignSelect,this)),this._arrHRelative=[{displayValue:this.textCharacter,value:Asc.c_oAscRelativeFromH.Character},{displayValue:this.textColumn,value:Asc.c_oAscRelativeFromH.Column},{displayValue:this.textLeftMargin,value:Asc.c_oAscRelativeFromH.LeftMargin},{displayValue:this.textMargin,value:Asc.c_oAscRelativeFromH.Margin},{displayValue:this.textPage,value:Asc.c_oAscRelativeFromH.Page},{displayValue:this.textRightMargin,value:Asc.c_oAscRelativeFromH.RightMargin}],this.cmbHRelative=new Common.UI.ComboBox({el:$(" # image - combo - hrelative "),cls:" input - group - nr ",menuStyle:" min - width : 115 px ; ",editable:!1,data:this._arrHRelative}),this.cmbHRelative.setValue(this._state.HAlignFrom),this.cmbHRelative.on(" selected ",_.bind(this.onHRelativeSelect,this)),this.cmbHPosition=new Common.UI.ComboBox({el:$(" # image - combo - hposition "),cls:" input - group - nr ",menuStyle:" min - width : 115 px ; ",editable:!1,data:this._arrHRelative}),this.cmbHPosition.setDisabled(!0),this.cmbHPosition.setValue(this._state.HPositionFrom),this.cmbHPosition.on(" selected ",_.bind(this.onHPositionSelect,this)),this.spnXPc=new Common.UI.MetricSpinner({el:$(" # image - spin - xpc "),step:1,width:115,disabled:!0,defaultUnit:" % ",defaultValue:0,value:" 0 % ",maxValue:1e3,minValue:-1e3}),this.spnXPc.on(" change ",_.bind(function(t,e,i,n){this._changedProps&&(null!==this._changedProps.get_PositionH()&&void 0!==this._changedProps.get_PositionH()||this._changedProps.put_PositionH(new Asc.CImagePositionH),this._changedProps.get_PositionH().put_UseAlign(!1),this._changedProps.get_PositionH().put_Percent(!0),this._changedProps.get_PositionH().put_RelativeFrom(this._state.HPositionPcFrom),this._changedProps.get_PositionH().put_Value(t.getNumberValue()),this._state.spnXPcChanged=!0)},this)),this.cmbHPositionPc=new Common.UI.ComboBox({el:$(" # image - combo - hpositionpc "),cls:" input - group - nr ",menuStyle:" min - width : 115 px ; ",editable:!1,data:this._arrHRelativePc}),this.cmbHPositionPc.setDisabled(!0),this.cmbHPositionPc.setValue(this._state.HPositionPcFrom),this.cmbHPositionPc.on(" selected ",_.bind(this.onHPositionPcSelect,this)),this._arrVAlign=[{displayValue:this.textTop,value:Asc.c_oAscAlignV.Top},{displayValue:this.textCenter,value:Asc.c_oAscAlig
this._changedProps.get_PositionV().put_Align(this._state.VAlignType))},onVRelativeSelect:function(t,e){this._changedProps&&(null!==this._changedProps.get_PositionV()&&void 0!==this._changedProps.get_PositionV()||this._changedProps.put_PositionV(new Asc.CImagePositionV),this._state.VAlignFrom=e.value,this._changedProps.get_PositionV().put_UseAlign(!0),this._changedProps.get_PositionV().put_Percent(!1),this._changedProps.get_PositionV().put_RelativeFrom(this._state.VAlignFrom),this._changedProps.get_PositionV().put_Align(this._state.VAlignType),this.chMove.setValue(this._state.VAlignFrom==Asc.c_oAscRelativeFromV.Line||this._state.VAlignFrom==Asc.c_oAscRelativeFromV.Paragraph,!0))},onVPositionSelect:function(t,e){if(this._changedProps){if(null!==this._changedProps.get_PositionV()&&void 0!==this._changedProps.get_PositionV()||this._changedProps.put_PositionV(new Asc.CImagePositionV),this._state.VPositionFrom=e.value,this._changedProps.get_PositionV().put_UseAlign(!1),this._changedProps.get_PositionV().put_Percent(!1),this._changedProps.get_PositionV().put_RelativeFrom(this._state.VPositionFrom),!this._state.spnYChanged){var i=this._originalProps.get_Value_Y(this._state.VPositionFrom);this.spnY.setValue(Common.Utils.Metric.fnRecalcFromMM(i),!0)}this._changedProps.get_PositionV().put_Value(Common.Utils.Metric.fnRecalcToMM(this.spnY.getNumberValue())),this.chMove.setValue(this._state.VPositionFrom==Asc.c_oAscRelativeFromV.Line||this._state.VPositionFrom==Asc.c_oAscRelativeFromV.Paragraph,!0)}},onVPositionPcSelect:function(t,e){if(this._changedProps){if(null!==this._changedProps.get_PositionV()&&void 0!==this._changedProps.get_PositionV()||this._changedProps.put_PositionV(new Asc.CImagePositionV),this._state.VPositionPcFrom=e.value,this._changedProps.get_PositionV().put_UseAlign(!1),this._changedProps.get_PositionV().put_Percent(!0),this._changedProps.get_PositionV().put_RelativeFrom(this._state.VPositionPcFrom),!this._state.spnYPcChanged){var i=this._originalProps.get_Value_Y(this._state.VPositionPcFrom);this.spnYPc.setValue(parseFloat((100*i/this.pageHeight).toFixed(2)),!0)}this._changedProps.get_PositionV().put_Value(this.spnYPc.getNumberValue())}},onRadioHAlignChange:function(t,e,i){this._changedProps&&(null!==this._changedProps.get_PositionH()&&void 0!==this._changedProps.get_PositionH()||this._changedProps.put_PositionH(new Asc.CImagePositionH),this._changedProps.get_PositionH().put_UseAlign(e),e&&(this._changedProps.get_PositionH().put_Percent(!1),this._changedProps.get_PositionH().put_Align(this._state.HAlignType),this._changedProps.get_PositionH().put_RelativeFrom(this._state.HAlignFrom))),e&&(this.cmbHAlign.setDisabled(!1),this.cmbHRelative.setDisabled(!1),this.spnX.setDisabled(!0),this.cmbHPosition.setDisabled(!0),this.spnXPc.setDisabled(!0),this.cmbHPositionPc.setDisabled(!0))},onRadioHPositionChange:function(t,e,i){this._changedProps&&(null!==this._changedProps.get_PositionH()&&void 0!==this._changedProps.get_PositionH()||this._changedProps.put_PositionH(new Asc.CImagePositionH),e&&(this._changedProps.get_PositionH().put_UseAlign(!1),this._changedProps.get_PositionH().put_Percent(!1),this._changedProps.get_PositionH().put_Value(Common.Utils.Metric.fnRecalcToMM(this.spnX.getNumberValue())),this._changedProps.get_PositionH().put_RelativeFrom(this._state.HPositionFrom))),e&&(this.cmbHAlign.setDisabled(!0),this.cmbHRelative.setDisabled(!0),this.spnX.setDisabled(!1),this.cmbHPosition.setDisabled(!1),this.spnXPc.setDisabled(!0),this.cmbHPositionPc.setDisabled(!0))},onRadioHPositionPcChange:function(t,e,i){this._changedProps&&(null!==this._changedProps.get_PositionH()&&void 0!==this._changedProps.get_PositionH()||this._changedProps.put_PositionH(new Asc.CImagePositionH),this._changedProps.get_PositionH().put_Percent(e),e&&(this._changedProps.get_PositionH().put_UseAlign(!1),this._changedProps.get_PositionH().put_Value(this.spnXPc.getNumberValue()),this._changedProps.get_PositionH().put_RelativeFrom(this._state.HPositionPcFrom))),e&&(this.cmbHAlign.setDisabled(!0),this.cmbHRelative.setDisabled(!0),this.spnX.setDisabled(!0)
if(this.chartProps=t.get_ChartProperties(),e=t.get_SeveralCharts()||this._locked,this._state.SeveralCharts!==e&&(this.btnEditData.setDisabled(e),this._state.SeveralCharts=e),e=t.get_SeveralChartTypes(),this._state.SeveralCharts&&e)this.btnChartType.setIconCls(""),this._state.ChartType=null;else{var n=this.chartProps.getType();if(this._state.ChartType!==n){var o=this.mnuChartTypePicker.store.findWhere({type:n});this.mnuChartTypePicker.selectRecord(o,!0),o?this.btnChartType.setIconCls(" item - chartlist "+o.get(" iconCls ")):this.btnChartType.setIconCls(""),this.updateChartStyles(this.api.asc_getChartPreviews(n)),this._state.ChartType=n}}if(e=t.get_SeveralChartStyles(),this._state.SeveralCharts&&e)this.cmbChartStyle.fieldPicker.deselectAll(),this.cmbChartStyle.menuPicker.deselectAll(),this._state.ChartStyle=null;else if(e=this.chartProps.getStyle(),this._state.ChartStyle!==e||this._isChartStylesChanged){this.cmbChartStyle.suspendEvents();var i=this.cmbChartStyle.menuPicker.store.findWhere({data:e});this.cmbChartStyle.menuPicker.selectRecord(i),this.cmbChartStyle.resumeEvents(),this._isChartStylesChanged&&(i?this.cmbChartStyle.fillComboView(this.cmbChartStyle.menuPicker.getSelectedRec(),!0):this.cmbChartStyle.fillComboView(this.cmbChartStyle.menuPicker.store.at(0),!0)),this._state.ChartStyle=e}this._isChartStylesChanged=!1,this._noApply=!1,e=t.get_CanBeFlow()&&!this._locked;var s=t.get_FromGroup()||this._locked;this._state.CanBeFlow===e&&this._state.FromGroup===s||(this.cmbWrapType.setDisabled(!e||s),this._state.CanBeFlow=e,this._state.FromGroup=s),e=t.get_Width(),Math.abs(this._state.Width-e)>.001&&(this.labelWidth[0].innerHTML=this.textWidth+" : "+Common.Utils.Metric.fnRecalcFromMM(e).toFixed(1)+" "+Common.Utils.Metric.getCurrentMetricName(),this._state.Width=e),e=t.get_Height(),Math.abs(this._state.Height-e)>.001&&(this.labelHeight[0].innerHTML=this.textHeight+" : "+Common.Utils.Metric.fnRecalcFromMM(e).toFixed(1)+" "+Common.Utils.Metric.getCurrentMetricName(),this._state.Height=e)}},updateMetricUnit:function(){var t=Common.Utils.Metric.fnRecalcFromMM(this._state.Width);this.labelWidth[0].innerHTML=this.textWidth+" : "+t.toFixed(1)+" "+Common.Utils.Metric.getCurrentMetricName(),t=Common.Utils.Metric.fnRecalcFromMM(this._state.Height),this.labelHeight[0].innerHTML=this.textHeight+" : "+t.toFixed(1)+" "+Common.Utils.Metric.getCurrentMetricName()},createDelayedControls:function(){var t=this,n=[{offsetx:0,data:Asc.c_oAscWrapStyle2.Inline,tip:this.txtInline,selected:!0},{offsetx:50,data:Asc.c_oAscWrapStyle2.Square,tip:this.txtSquare},{offsetx:100,data:Asc.c_oAscWrapStyle2.Tight,tip:this.txtTight},{offsetx:150,data:Asc.c_oAscWrapStyle2.Through,tip:this.txtThrough},{offsetx:200,data:Asc.c_oAscWrapStyle2.TopAndBottom,tip:this.txtTopAndBottom},{offsetx:250,data:Asc.c_oAscWrapStyle2.InFront,tip:this.txtInFront},{offsetx:300,data:Asc.c_oAscWrapStyle2.Behind,tip:this.txtBehind}];this.cmbWrapType=new Common.UI.ComboDataView({itemWidth:50,itemHeight:50,menuMaxHeight:300,enableKeyEvents:!0,store:new Common.UI.DataViewStore(n),cls:" combo - chart - style "}),this.cmbWrapType.menuPicker.itemTemplate=this.cmbWrapType.fieldPicker.itemTemplate=i.template(['<div class=" style " id=" <%= id %> ">','<img src=" data : image / gif ; base64 , R0lGODlhAQABAID / AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw == " class=" combo - wrap - item " ','width=" '+this.cmbWrapType.itemWidth+' " height=" '+this.cmbWrapType.itemHeight+' " ','style=" background - position : -<%= offsetx %> px 0 ; "/>'," < /div>"].join("")),this.cmbWrapType.render(e("#chart-combo-wrap")),this.cmbWrapType.openButton.menu.cmpEl.css({"min-width":178,"max-width":178}),this.cmbWrapType.on("click",i.bind(this.onSelectWrap,this)),this.cmbWrapType.openButton.menu.on("show:after",function(){t.cmbWrapType.menuPicker.scroller.update({alwaysVisibleY:!0})}),this.lockedControls.push(this.cmbWrapType),this.btnChartType=new Common.UI.Button({cls:"btn-large-dataview",iconCls:"item-chartlist bar-normal",menu:new Common.UI.Menu({style:"width: 435px; padding-top: 12px;",items:[{template:i.template('<div id="id-chart-menu-type" class="menu-insertchart
CheckHeader :! 1 , CheckTotal :! 1 , CheckBanded :! 1 , CheckFirst :! 1 , CheckLast :! 1 , CheckColBanded :! 1 , BackColor : "#000000" , RepeatRow :! 1 , DisabledControls :! 1 , Width : null , Height : null }, this . spinners = [], this . lockedControls = [], this . _locked =! 1 , this . _originalLook = new Asc . CTablePropLook , this . _originalProps = null , this . CellBorders = {}, this . CellColor = { Value : 1 , Color : "transparent" }, this . BorderSize = 1 , this . _noApply =! 1 , this . render ()}, onCheckTemplateChange : function ( t , e , i , n , o ){ if ( this . api ){ var s = new Asc . CTableProp , a = this . _originalLook ? this . _originalLook : new Asc . CTablePropLook ; switch ( t ){ case 0 : a . put_FirstRow ( "checked" == e . getValue ()); break ; case 1 : a . put_LastRow ( "checked" == e . getValue ()); break ; case 2 : a . put_BandHor ( "checked" == e . getValue ()); break ; case 3 : a . put_FirstCol ( "checked" == e . getValue ()); break ; case 4 : a . put_LastCol ( "checked" == e . getValue ()); break ; case 5 : a . put_BandVer ( "checked" == e . getValue ())} s . put_TableLook ( a ), this . api . tblApply ( s )} this . fireEvent ( "editcomplete" , this )}, onTableTemplateSelect : function ( t , e ){ if ( this . api &&! this . _noApply ){ var i = new Asc . CTableProp ; i . put_TableStyle ( e . get ( "templateId" )), this . api . tblApply ( i )} this . fireEvent ( "editcomplete" , this )}, onCheckRepeatRowChange : function ( t , e , i , n ){ if ( this . api ){ var o = new Asc . CTableProp ; o . put_RowsInHeader ( "checked" == t . getValue ()), this . api . tblApply ( o )} this . fireEvent ( "editcomplete" , this )}, onColorsBackSelect : function ( t , e ){ if ( this . btnBackColor . setColor ( e ), this . CellColor = { Value : 1 , Color : e }, this . api ){ var i = new Asc . CTableProp , n = new Asc . CBackground ; i . put_CellsBackground ( n ), "transparent" == this . CellColor . Color ? n . put_Value ( 1 ) : ( n . put_Value ( 0 ), n . put_Color ( Common . Utils . ThemeColor . getRgbColor ( this . CellColor . Color ))), i . put_CellSelect ( ! 0 ), this . api . tblApply ( i )} this . fireEvent ( "editcomplete" , this )}, addNewColor : function ( t , e ){ t . addNewColor ( "object" == typeof e . color ? e . color . color : e . color )}, onColorsBorderSelect : function ( t , e ){ this . btnBorderColor . setColor ( e )}, onBtnBordersClick : function ( t , e ){ if ( this . _UpdateBordersStyle ( t . options . strId , ! 0 ), this . api ){ var i = new Asc . CTableProp ; i . put_CellBorders ( this . CellBorders ), i . put_CellSelect ( ! 0 ), this . api . tblApply ( i )} this . fireEvent ( "editcomplete" , this )}, onBorderSizeSelect : function ( t , e ){ this . BorderSize = e . value }, onEditClick : function ( t , e , i ){ if ( this . api ) switch ( e . value ){ case 0 : this . api . selectRow (); break ; case 1 : this . api . selectColumn (); break ; case 2 : this . api . selectCell (); break ; case 3 : this . api . selectTable (); break ; case 4 : this . api . addRowAbove (); break ; case 5 : this . api . addRowBelow (); break ; case 6 : this . api . addColumnLeft (); break ; case 7 : this . api . addColumnRight (); break ; case 8 : this . api . remRow (); break ; case 9 : this . api . remColumn (); break ; case 10 : this . api . remTable (); break ; case 11 : this . api . MergeCells (); break ; case 12 : this . splitCells ( t , e , i )} this . fireEvent ( "editcomplete" , this )}, splitCells : function ( t , e , i ){ var n = this ; new Common . Views . InsertTableDialog ({ split :! 0 , handler : function ( t , e ){ "ok" == t && n . api && n . api . SplitCell ( e . columns , e . rows ), n . fireEvent ( "editcomplete" , n )}}). show ()}, render : function (){ e ( this . el ). html ( this . template ({ scope : this }))}, setApi : function ( t ){ return this . api = t , t && this . api . asc_registerCallback ( "asc_onInitTableTemplates" , i . bind ( this . _onInitTemplates , this )), this }, createDelayedControls : function (){ this . chHeader = new Common . UI . CheckBox ({ el : e ( "#table-checkbox-header" ), labelText : this . textHeader }), this . lockedControls . push ( this . chHeader ), this . chTotal = new Common . UI . CheckBox ({ el : e ( "#table-checkbox-total" ), labelText : this . textTotal }), this . lockedControls . push ( this . chTotal ), this . chBanded = new Common . UI . CheckBox ({ el : e ( "#table-checkbox-banded" ), labelText : this . textBanded }), this . lockedControls . push ( this . chBanded ), this . chFirst = new Common . UI . CheckBox ({ el : e ( "#table-checkbox-first" ), labelText : this . textFirst }), this . lockedControls . push ( this . chFirst ), this . chLast = new Common . UI . CheckBox ({ el : e ( "#table-checkbox-last" ), labelText : this . textLast }), this . lockedControls . push ( this . chLast ), this . chColBanded = new Common . UI . CheckBox ({ el : e ( "#table-checkbox-col-banded" ), labelText : this . textBanded }), this . lockedControls . push ( this . chColBanded ), this . chHeader . on ( "change" , i . bind ( this . onCheckTemplateChange , this , 0 )), this . chTotal . on ( "change" , i . bind ( this . onCheckTemplateChange , this , 1 )), this . ch
i . trigger ( "change" , i , i . value , i . lastValue )}, c = function ( t ){ i . disabled || t . keyCode != Common . UI . Keys . UP && t . keyCode != Common . UI . Keys . DOWN && t . keyCode != Common . UI . Keys . LEFT && t . keyCode != Common . UI . Keys . RIGHT || ( t . preventDefault (), t . stopPropagation (), h . off ( "keydown" , "input" , c ), n = setInterval ( e . bind ( l , i , t . keyCode == Common . UI . Keys . UP || t . keyCode == Common . UI . Keys . RIGHT ), 100 ))}, d = function ( t ){ i . disabled || ( t . keyCode == Common . UI . Keys . UP || t . keyCode == Common . UI . Keys . DOWN || Common . UI . Keys . LEFT || Common . UI . Keys . RIGHT ) && ( t . stopPropagation (), t . preventDefault (), clearInterval ( n ), l ( t . keyCode == Common . UI . Keys . UP || t . keyCode == Common . UI . Keys . RIGHT ), h . on ( "keydown" , "input" , c ), i . trigger ( "changecomplete" , i , i . value , i . lastValue ))}; if ( ! i . rendered ){ var h = i . cmpEl ; h . on ( "mousedown" , ".thumb" , a ), h . on ( "mousedown" , ".track" , r ), this . options . enableKeyEvents && ( h . on ( "keydown" , "input" , c ), h . on ( "keyup" , "input" , d ))} return i . rendered =! 0 , this }, setThumbPosition : function ( t ){ this . thumb . css ({ left : t + "%" })}, setValue : function ( t ){ this . lastValue = this . value , this . value = Math . max ( this . minValue , Math . min ( this . maxValue , t )), this . setThumbPosition ( Math . round (( t - this . minValue ) * this . delta ))}, getValue : function (){ return this . value }, setDisabled : function ( t ){ t !== this . disabled && this . cmpEl . toggleClass ( "disabled" , t ), this . disabled = t }}), Common . UI . MultiSlider = Common . UI . BaseView . extend ({ options : { width : 100 , minValue : 0 , maxValue : 100 , values : [ 0 , 100 ], thumbTemplate : '<div class="thumb" style=""></div>' }, disabled :! 1 , template : e . template ([ '<div class="slider multi-slider">' , '<div class="track">' , '<div class="track-left"></div>' , '<div class="track-center""></div>' , '<div class="track-right" style=""></div>' , "</div>" , "<% _.each(items, function(item) { %>" , "<%= thumbTemplate %>" , "<% }); %>" , "</div>" ]. join ( "" )), initialize : function ( t ){ Common . UI . BaseView . prototype . initialize . call ( this , t ); var e = this ; $ ( this . el ); e . width = e . options . width , e . minValue = e . options . minValue , e . maxValue = e . options . maxValue , e . delta = 100 / ( e . maxValue - e . minValue ), e . thumbs = [], e . options . el && e . render ()}, render : function ( t ){ var i = this ; i . rendered ? this . cmpEl = $ ( this . el ) : ( this . cmpEl = $ ( this . template ({ items : this . options . values , thumbTemplate : this . options . thumbTemplate })), t ? ( this . setElement ( t , ! 1 ), t . html ( this . cmpEl )) : $ ( this . el ). html ( this . cmpEl )); var n = this . cmpEl ; n . find ( ".track-center" ). width ( i . options . width - 14 ), n . width ( i . options . width ); var o = function ( t ){ t . preventDefault (), t . stopPropagation (); var e = t . data . index , n = i . thumbs [ e ]. value , o = e - 1 < 0 ? 0 : i . thumbs [ e - 1 ]. position , s = e + 1 < i . thumbs . length ? i . thumbs [ e + 1 ]. position : 100 , a = Math . round (( t . pageX * Common . Utils . zoom () - i . cmpEl . offset (). left - i . _dragstart ) / i . width * 100 ), r = a < o || a > s , l = Math . max ( 0 , Math . min ( 100 , a )), c = l / i . delta + i . minValue ; i . setThumbPosition ( e , l ), i . thumbs [ e ]. value = c , r && i . sortThumbs (), $ ( document ). off ( "mouseup" , i . binding . onMouseUp ), $ ( document ). off ( "mousemove" , i . binding . onMouseMove ), i . _dragstart = void 0 , i . trigger ( "changecomplete" , i , c , n )}, s = function ( t ){ if ( ! i . disabled && void 0 !== i . _dragstart ){ t . preventDefault (), t . stopPropagation (); var e = t . data . index , n = i . thumbs [ e ]. value , o = e - 1 < 0 ? 0 : i . thumbs [ e - 1 ]. position , s = e + 1 < i . thumbs . length ? i . thumbs [ e + 1 ]. position : 100 , a = Math . round (( t . pageX * Common . Utils . zoom () - i . cmpEl . offset (). left - i . _dragstart ) / i . width * 100 ), r = a < o || a > s , l = Math . max ( 0 , Math . min ( 100 , a )), c = l / i . delta + i . minValue ; i . setThumbPosition ( e , l ), i . thumbs [ e ]. value = c , r && i . sortThumbs (), Math . abs ( c - n ) > . 001 && i . trigger ( "change" , i , c , n )}}, a = function ( t ){ if ( ! i . disabled ){ var n = t . data . index , o = i . thumbs [ n ]. thumb ; i . _dragstart = t . pageX * Common . Utils . zoom () - o . offset (). left - o . width () / 2 , i . setActiveThumb ( n ), e . each ( i . thumbs , function ( t , e ){ n == e ? t . thumb . css ( "z-index" , 500 ) : t . thumb . css ( "z-index" , "" )}), $ ( document ). on ( "mouseup" , null , t . data , i . binding . onMouseUp ), $ ( document ). on ( "mousemove" , null , t . data , i . binding . onMouseMove )}}, r = function ( t ){ if ( ! i . disabled ){ var e = Math . max ( 0 , Math . min ( 100 , Math . round (( t . pageX * Common . Utils . zoom () - i . cmpEl . offset (). left ) / i . width * 100 ))), n = l ( e ), o = i . thumbs [ n ]. value , s = e / i . delta + i . minValue ; i . setThumbPosition ( n , e ), i . thumbs [ n ]. value = s , i . trigger ( "change" , i , s , o ), i . trigger ( "changecomplete" , i , s , o )}}, l = function ( t ){ for ( var e , n = 100 , o = 0 , s = i . thumbs . length , a = 0 ; a < s ; a ++ ) if ( e = Math . abs ( i . thumbs [ a ]. position
this . _state . BlipFillType !== this . BlipFillType && ( this . BlipFillType == Asc . c_oAscFillBlipType . STRETCH || this . BlipFillType == Asc . c_oAscFillBlipType . TILE ? this . cmbFillType . setValue ( this . BlipFillType ) : this . cmbFillType . setValue ( "" ), this . _state . BlipFillType = this . BlipFillType ), this . OriginalFillType = Asc . c_oAscFill . FILL_TYPE_BLIP ; else if ( d == Asc . c_oAscFill . FILL_TYPE_PATT ){ if ( c = c . get_fill (), this . PatternFillType = c . get_pattern_type (), this . _state . PatternFillType !== this . PatternFillType ){ this . cmbPattern . suspendEvents (); var r = this . cmbPattern . menuPicker . store . findWhere ({ type : this . PatternFillType }); this . cmbPattern . menuPicker . selectRecord ( r ), this . cmbPattern . resumeEvents (), this . _state . PatternFillType = this . PatternFillType } h = c . get_color_fg (), h ? h . get_type () == Asc . c_oAscColor . COLOR_TYPE_SCHEME ? this . FGColor = { Value : 1 , Color : { color : Common . Utils . ThemeColor . getHexColor ( h . get_r (), h . get_g (), h . get_b ()), effectValue : h . get_value ()}} : this . FGColor = { Value : 1 , Color : Common . Utils . ThemeColor . getHexColor ( h . get_r (), h . get_g (), h . get_b ())} : this . FGColor = { Value : 1 , Color : "000000" }, h = c . get_color_bg (), h ? h . get_type () == Asc . c_oAscColor . COLOR_TYPE_SCHEME ? this . BGColor = { Value : 1 , Color : { color : Common . Utils . ThemeColor . getHexColor ( h . get_r (), h . get_g (), h . get_b ()), effectValue : h . get_value ()}} : this . BGColor = { Value : 1 , Color : Common . Utils . ThemeColor . getHexColor ( h . get_r (), h . get_g (), h . get_b ())} : this . BGColor = { Value : 1 , Color : "ffffff" }, this . OriginalFillType = Asc . c_oAscFill . FILL_TYPE_PATT , this . ShapeColor = { Value : 1 , Color : Common . Utils . ThemeColor . colorValue2EffectId ( this . FGColor . Color )}, this . GradColor . colors [ 0 ] = Common . Utils . ThemeColor . colorValue2EffectId ( this . FGColor . Color ), this . GradColor . colors [ this . GradColor . colors . length - 1 ] = "ffffff" } else if ( d == Asc . c_oAscFill . FILL_TYPE_GRAD ){ c = c . get_fill (); var m = c . get_grad_type (); if ( this . _state . GradFillType === m && this . GradFillType === m || ( this . GradFillType = m , r = void 0 , this . GradFillType == Asc . c_oAscFillGradType . GRAD_LINEAR || this . GradFillType == Asc . c_oAscFillGradType . GRAD_PATH ? ( this . cmbGradType . setValue ( this . GradFillType ), r = this . cmbGradType . store . findWhere ({ value : this . GradFillType }), this . onGradTypeSelect ( this . cmbGradType , r . attributes )) : ( this . cmbGradType . setValue ( "" ), this . btnDirection . setIconCls ( "" )), this . _state . GradFillType = this . GradFillType ), this . GradFillType == Asc . c_oAscFillGradType . GRAD_LINEAR ){ var a = Math . floor ( c . get_linear_angle () / 6e4 ); if ( Math . abs ( this . GradLinearDirectionType - a ) > . 001 ){ this . GradLinearDirectionType = a ; var u = this . mnuDirectionPicker . store . findWhere ({ type : a }); this . mnuDirectionPicker . selectRecord ( u , ! 0 ), u ? this . btnDirection . setIconCls ( "item-gradient " + u . get ( "iconcls" )) : this . btnDirection . setIconCls ( "" )}} var g = this , b = c . get_colors (), f = c . get_positions (), C = b . length ; this . sldrGradient . setThumbs ( C ), this . GradColor . colors . length > C && ( this . GradColor . colors . splice ( C , this . GradColor . colors . length - C ), this . GradColor . values . splice ( C , this . GradColor . colors . length - C ), this . GradColor . currentIdx = 0 ), b && b . forEach ( function ( t , e ){ t ? t . get_type () == Asc . c_oAscColor . COLOR_TYPE_SCHEME ? ( g . GradColor . colors [ e ] = { color : Common . Utils . ThemeColor . getHexColor ( t . get_r (), t . get_g (), t . get_b ()), effectValue : t . get_value ()}, Common . Utils . ThemeColor . colorValue2EffectId ( g . GradColor . colors [ e ])) : g . GradColor . colors [ e ] = Common . Utils . ThemeColor . getHexColor ( t . get_r (), t . get_g (), t . get_b ()) : g . GradColor . colors [ e ] = "000000" ; var i = f [ e ]; null !== i && ( i /= 1e3 , g . GradColor . values [ e ] = i )}); for ( var v = 0 ; v < C ; v ++ ) g . sldrGradient . setColorValue ( Common . Utils . String . format ( "#{0}" , "object" == typeof g . GradColor . colors [ v ] ? g . GradColor . colors [ v ]. color : g . GradColor . colors [ v ]), v ), g . sldrGradient . setValue ( v , g . GradColor . values [ v ]); this . OriginalFillType = Asc . c_oAscFill . FILL_TYPE_GRAD , this . FGColor = { Value : 1 , Color : this . GradColor . colors [ 0 ]}, this . BGColor = { Value : 1 , Color : "ffffff" }, this . ShapeColor = { Value : 1 , Color : this . GradColor . colors [ 0 ]}} this . _state . FillType !== this . OriginalFillType && ( this . cmbFillSrc . setValue ( null === this . OriginalFillType ? "" : this . OriginalFillType ), this . _state . FillType = this . OriginalFillType , this . ShowHideElem ( this . OriginalFillType )), e ( this . btnTexture . el ). find ( ".form-control" ). prop ( "innerHTML" , this . textSelectTexture ); var _ = typeof this . ShapeColor . Color , y = typeof this . _state . S
return '<table cols="1">\r\n <tr>\r\n <td class="padding-small">\r\n <button type="button" class="btn btn-text-default" id="mmerge-button-edit-data" style="width:100%;"><%= scope.textEditData %></button>\r\n <label id="mmerge-lbl-add-recipients" style="margin-top: 4px;"><%= scope.textAddRecipients %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div class="separator horizontal"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <label class="header"><%= scope.textMergeFields %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style="padding-bottom: 13px;">\r\n <div id="mmerge-btn-ins-field" style="width:100%;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style="padding-bottom: 13px;">\r\n <div id="mmerge-switcher-highlight" style="display: inline-block; vertical-align: top;"></div>\r\n <label style="margin-left: 5px;"><%= scope.textHighlight %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div id="mmerge-switcher-preview" style="display: inline-block; vertical-align: top;"></div>\r\n <label style="margin-left: 5px;"><%= scope.textPreview %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div id="mmerge-button-first" style="display: inline-block;margin-right: 4px;"></div>\r\n <div id="mmerge-button-prev" style="display: inline-block;margin-right: 4px;"></div>\r\n <div id="mmerge-field-num" style="display:inline-block;vertical-align: middle;"></div>\r\n <div id="mmerge-button-next" style="display: inline-block;margin-left: 4px;"></div>\r\n <div id="mmerge-button-last" style="display: inline-block;margin-left: 4px;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div class="separator horizontal"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <label class="header"><%= scope.textMergeTo %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="">\r\n <div id="mmerge-combo-merge-to" style="width: 100%;padding-bottom: 2px;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-medium">\r\n <label style=""><%= scope.textMaxRecepients %></label>\r\n <label class="link-solid" id="mmerge-readmore-link"><%= scope.textReadMore %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-large">\r\n <div id="mmerge-radio-all" style="margin-bottom: 5px;"></div>\r\n <div id="mmerge-radio-current" style="margin-bottom: 5px;"></div>\r\n <div id="mmerge-radio-from-to" style="display: inline-block;vertical-align: middle; margin-right: 2px;"></div>\r\n <div id="mmerge-field-from" style="display: inline-block;vertical-align: middle;"></div>\r\n <label style="width: 30px; text-align: right; vertical-align: middle; margin-right: 2px;"><%= scope.textTo %></label>\r\n <div id="mmerge-field-to" style="display: inline-block;vertical-align: middle;"></div>\r\n </td>\r\n </tr>\r\n</table>\r\n<table cols="2">\r\n <tr>\r\n <td width="50%">\r\n <button type="button" class="btn btn-text-default" id="mmerge-button-download" style="width:90px;"><%= scope.textDownload %></button>\r\n <button type="button" class="btn btn-text-default hidden" id="mmerge-button-merge" style="width:90px;"><%= scope.textMerge %></button>\r\n </td>\r\n <td width="50%" style="text-align: right;">\r\n <button type="button" class="btn btn-text-default" id="mmerge-button-portal" style="width:90px;"><%= scope.textPortal %></button>\r\n </td>\r\n </tr>\r\n <tr class="finish-cell"></tr>\r\n</table>' }), void 0 === Common ) var Common = {}; define ( "common/main/lib/component/Switcher" ,[ "common/main/lib/component/BaseView"
var i = parseInt ( this . txtFieldNum . getValue ()); switch ( i = isNaN ( i ) ? 0 : i - 1 , t . options . value ){ case 0 : i = 0 ; break ; case 1 : i -- ; break ; case 2 : i ++ ; break ; case 3 : i = this . _state . recipientsCount - 1 } i < 0 && ( i = 0 ), i > this . _state . recipientsCount - 1 && ( i = this . _state . recipientsCount - 1 ), this . api . asc_PreviewMailMergeResult ( i ), this . fireEvent ( "editcomplete" , this )}, disableFieldBtns : function ( t ){ var e = this . _state . recipientsCount < 1 ||! this . chPreview . getValue (), i = e || t < 1 ; this . btnFirst . isDisabled () !== i && this . btnFirst . setDisabled ( i ), this . btnPrev . isDisabled () !== i && this . btnPrev . setDisabled ( i ), i = e || t > this . _state . recipientsCount - 2 , this . btnLast . isDisabled () !== i && this . btnLast . setDisabled ( i ), this . btnNext . isDisabled () !== i && this . btnNext . setDisabled ( i ), i = e || t < 0 , this . txtFieldNum . isDisabled () !== i && this . txtFieldNum . setDisabled ( i ), t >= 0 && this . txtFieldNum . setValue ( t + 1 )}, onPreviewMailMergeResult : function ( t ){ this . chPreview . getValue () || this . chPreview . setValue ( ! 0 ), this . disableFieldBtns ( t ), this . disableEditing ( ! 0 )}, onEndPreviewMailMergeResult : function (){ this . chPreview . getValue () && this . chPreview . setValue ( ! 1 ), this . disableFieldBtns ( - 1 ), this . disableEditing ( ! 1 )}, onStartMailMerge : function (){ this . btnInsField . menu . removeAll (), this . txtFieldNum . setValue ( 1 ), this . ChangeSettings ({ recipientsCount : this . api . asc_GetReceptionsCount (), fieldsList : this . api . asc_GetMailMergeFieldsNameList ()})}, onCmbMergeToSelect : function ( t , e ){ var i = e . value == Asc . c_oAscFileType . HTML ; this . btnMerge . setVisible ( i ), this . btnPortal . setVisible ( ! i && ( this . mode . canRequestSaveAs || this . mode . mergeFolderUrl )), this . btnDownload . setVisible ( ! i )}, setLocked : function ( t ){ this . _locked = t }, disableControls : function ( t ){ this . _initSettings || this . lockControls ( DE . enumLockMM . lostConnect , t ,{ array : i . union ([ this . btnEditData , this . btnInsField , this . chHighlight ], this . mode . canRequestSaveAs || this . mode . mergeFolderUrl ? [ this . btnPortal ] : []), merge :! 0 })}, disableInsertControls : function ( t ){ this . lockControls ( DE . enumLockMM . coAuth , t ,{ array : [ this . btnInsField ]})}, setMode : function ( t ){ this . mode = t }, disableEditing : function ( t ){ DE . getController ( "Toolbar" ). DisableToolbar ( t , t ), DE . getController ( "RightMenu" ). SetDisabled ( t , ! 0 ), DE . getController ( "Statusbar" ). getView ( "Statusbar" ). SetDisabled ( t ), DE . getController ( "Common.Controllers.ReviewChanges" ). SetDisabled ( t ), DE . getController ( "DocumentHolder" ). getView (). SetDisabled ( t ), DE . getController ( "Navigation" ) && DE . getController ( "Navigation" ). SetDisabled ( t ); var e = DE . getController ( "Common.Controllers.Comments" ); e && e . setPreviewMode ( t ), DE . getController ( "LeftMenu" ). setPreviewMode ( t ), this . lockControls ( DE . enumLockMM . preview , t ,{ array : [ this . btnInsField , this . btnEditData ]})}, setDocumentName : function ( t ){ this . defFileName = t || this . txtUntitled ; var e = this . defFileName . lastIndexOf ( "." ); e > 0 && ( this . defFileName = this . defFileName . substring ( 0 , e ))}, openHelp : function ( t ){ DE . getController ( "LeftMenu" ). getView ( "LeftMenu" ). showMenu ( "file:help" , "UsageInstructions/UseMailMerge.htm" )}, disablePreviewMode : function (){ this . api && this . chPreview && this . chPreview . getValue () && this . api . asc_EndPreviewMailMergeResult ()}, lockControls : function ( t , e , i ){ Common . Utils . lockControls ( t , e , i , this . emptyDBControls )}, textDataSource : "Data Source" , textEditData : "Edit recipients list" , textInsertField : "Insert Merge Field" , textHighlight : "Highlight merge fields" , textPreview : "Preview results" , textPdf : "PDF" , textDocx : "Docx" , textEmail : "E-mail" , txtFirst : "To first field" , txtPrev : "To previous field" , txtNext : "To next field" , txtLast : "To last field" , textMergeTo : "Merge to" , textAll : "All records" , textCurrent : "Current record" , textFrom : "From" , textTo : "To" , textDownload : "Download" , textPortal : "Save" , errorMailMergeSaveFile : "Merge failed." , downloadMergeTitle : "Merging" , requestMailsTitle : "Requesting e-mails" , textMerge : "Merge" , sendTitle : "Send e-mail" , textSendMsg : "All mail messages are ready and will be sent out within some time.<br>The speed of mailing depends on your mail service.<br>You can continue working with document or close it. After the operation is over the notification will be sent to your registration email address." , notcriticalErrorTitle : "Warning" , warnProcessMailMerge : "Starting merge failed" , txtUntitled : "Untitled" , textMaxRecepients : "Ma
type:0,subtype:6,iconcls:" gradient - left ",cls:" item - gradient - separator ",selected:!0},{offsetx:100,offsety:50,type:180,subtype:1,iconcls:" gradient - right "},{offsetx:0,offsety:100,type:315,subtype:2,iconcls:" gradient - left - bottom "},{offsetx:50,offsety:100,type:270,subtype:3,iconcls:" gradient - bottom "},{offsetx:100,offsety:100,type:225,subtype:7,iconcls:" gradient - right - bottom "}],this._viewDataRadial=[{offsetx:100,offsety:150,type:2,subtype:5,iconcls:" gradient - radial - center "}],this.btnDirection=new Common.UI.Button({cls:" btn - large - dataview ",iconCls:" item - gradient gradient - left ",menu:new Common.UI.Menu({style:" min - width : 60 px ; ",menuAlign:" tr - br ",items:[{template:i.template('<div id=" id - textart - menu - direction " style=" width : 175 px ; margin : 0 5 px ; "></div>')}]})}),this.btnDirection.on(" render : after ",function(n){t.mnuDirectionPicker=new Common.UI.DataView({el:e(" # id - textart - menu - direction "),parentMenu:n.menu,restoreHeight:174,store:new Common.UI.DataViewStore(t._viewDataLinear),itemTemplate:i.template('<div id=" <%= id %> " class=" item - gradient " style=" background - position : -<%= offsetx %> px -<%= offsety %> px ; "></div>')})}),this.btnDirection.render(e(" # textart - button - direction ")),this.mnuDirectionPicker.on(" item : click ",i.bind(this.onSelectGradient,this,this.btnDirection)),this.lockedControls.push(this.btnDirection),this.sldrGradient=new Common.UI.MultiSliderGradient({el:e(" # textart - slider - gradient "),width:125,minValue:0,maxValue:100,values:[0,100]}),this.sldrGradient.on(" change ",i.bind(this.onGradientChange,this)),this.sldrGradient.on(" changecomplete ",i.bind(this.onGradientChangeComplete,this)),this.sldrGradient.on(" thumbclick ",function(e,i){t.GradColor.currentIdx=i;var n=t.GradColor.colors[t.GradColor.currentIdx];t.btnGradColor.setColor(n),t.colorsGrad.select(n,!1)}),this.sldrGradient.on(" thumbdblclick ",function(e){t.btnGradColor.cmpEl.find(" button ").dropdown(" toggle ")}),this.sldrGradient.on(" sortthumbs ",function(e,n){var o,s=[];i.each(n,function(e,i){s.push(t.GradColor.colors[e]),t.GradColor.currentIdx==e&&(o=i)}),t.OriginalFillType=null,t.GradColor.colors=s,t.GradColor.currentIdx=o}),this.lockedControls.push(this.sldrGradient),this.cmbBorderSize=new Common.UI.ComboBorderSizeEditable({el:e(" # textart - combo - border - size "),style:" width : 93 px ; ",txtNoBorders:this.txtNoBorders}).on(" selected ",i.bind(this.onBorderSizeSelect,this)).on(" changed : before ",i.bind(this.onBorderSizeChanged,this,!0)).on(" changed : after ",i.bind(this.onBorderSizeChanged,this,!1)).on(" combo : blur ",i.bind(this.onComboBlur,this,!1)),this.BorderSize=this.cmbBorderSize.store.at(2).get(" value "),this.cmbBorderSize.setValue(this.BorderSize),this.lockedControls.push(this.cmbBorderSize),this.cmbBorderType=new Common.UI.ComboBorderType({el:e(" # textart - combo - border - type "),style:" width : 93 px ; ",menuStyle:" min - width : 93 px ; "}).on(" selected ",i.bind(this.onBorderTypeSelect,this)).on(" combo : blur ",i.bind(this.onComboBlur,this,!1)),this.BorderType=Asc.c_oDashType.solid,this.cmbBorderType.setValue(this.BorderType),this.lockedControls.push(this.cmbBorderType),this.cmbTransform=new Common.UI.ComboDataView({itemWidth:50,itemHeight:50,menuMaxHeight:300,enableKeyEvents:!0,cls:" combo - textart "}),this.cmbTransform.render(e(" # textart - combo - transform ")),this.cmbTransform.openButton.menu.cmpEl.css({" min - width ":178," max - width ":178}),this.cmbTransform.on(" click ",i.bind(this.onTransformSelect,this)),this.cmbTransform.openButton.menu.on(" show : after ",function(){t.cmbTransform.menuPicker.scroller.update({alwaysVisibleY:!0})}),this.lockedControls.push(this.cmbTransform)},createDelayedElements:function(){this.createDelayedControls(),this.UpdateThemeColors(),this.fillTransform(this.api.asc_getPropertyEditorTextArts()),this._initSettings=!1},fillTextArt:function(){var t=this;this.cmbTextArt||(this.cmbTextArt=new Common.UI.ComboDataView({itemWidth:50,itemHeight:50,menuMaxHeight:300,enableKeyEvents:!0,showLast:!1,cls:" combo - textart "}),this.cmbTextArt.render(e(" # textart - combo - template ")),this.cmbTextArt.openButton.menu.cmpEl.css({" min - width ":178," max - width ":178}),this.cmbTextArt.on(" click ",i.bind(this.onTextArtSelect
;r==Common.Utils.documentSettingsType.Image?null!==l.get_ChartProperties()?(s=!0,r=Common.Utils.documentSettingsType.Chart):null!==l.get_ShapeProperties()&&(s=l.get_ShapeProperties().get_FromChart(),r=Common.Utils.documentSettingsType.Shape,l.get_ShapeProperties().asc_getTextArtProperties()&&(this._settings[Common.Utils.documentSettingsType.TextArt].props=l,this._settings[Common.Utils.documentSettingsType.TextArt].hidden=0,this._settings[Common.Utils.documentSettingsType.TextArt].locked=l.get_Locked())):r==Common.Utils.documentSettingsType.Paragraph&&(this._settings[r].panel.isChart=s,i=l.get_CanAddTable()),this._settings[r].props=l,this._settings[r].hidden=0,this._settings[r].locked=l.get_Locked(),this._settings[Common.Utils.documentSettingsType.MailMerge].locked||(this._settings[Common.Utils.documentSettingsType.MailMerge].locked=l.get_Locked()),this._settings[Common.Utils.documentSettingsType.Signature].locked||(this._settings[Common.Utils.documentSettingsType.Signature].locked=l.get_Locked())}}if(this._settings[Common.Utils.documentSettingsType.Header].locked)for(o=0;o<this._settings.length;o++)this._settings[o]&&(this._settings[o].locked=!0);this._settings[Common.Utils.documentSettingsType.MailMerge].locked||(this._settings[Common.Utils.documentSettingsType.MailMerge].locked=!i||n);var c,d=-1,h=-1,p=this.rightmenu.GetActivePane();for(o=0;o<this._settings.length;o++){var m=this._settings[o];void 0!==m&&void 0!==m.btn&&void 0!==m.panel&&(m.hidden?(m.btn.isDisabled()||m.btn.setDisabled(!0),p==m.panelId&&(c=-1)):(m.btn.isDisabled()&&m.btn.setDisabled(!1),o!=Common.Utils.documentSettingsType.MailMerge&&o!=Common.Utils.documentSettingsType.Signature&&(d=o),m.needShow?(m.needShow=!1,h=o):p==m.panelId&&(c=o),m.panel.setLocked(m.locked)))}if(this._settings[Common.Utils.documentSettingsType.MailMerge].hidden||this._settings[Common.Utils.documentSettingsType.MailMerge].panel.setLocked(this._settings[Common.Utils.documentSettingsType.MailMerge].locked),!this.rightmenu.minimizedMode||e){var u;h>-1?u=h:d>=0&&c<0?u=d:c>=0?u=c:this._settings[Common.Utils.documentSettingsType.MailMerge].hidden||(u=Common.Utils.documentSettingsType.MailMerge),void 0==u&&e&&d>=0&&(u=d),void 0!==u&&(this.rightmenu.SetActivePane(u,e),u!=Common.Utils.documentSettingsType.MailMerge&&u!=Common.Utils.documentSettingsType.Signature?this._settings[u].panel.ChangeSettings.call(this._settings[u].panel,this._settings[u].props):this._settings[u].panel.ChangeSettings.call(this._settings[u].panel))}this._settings[Common.Utils.documentSettingsType.Image].needShow=!1,this._settings[Common.Utils.documentSettingsType.Chart].needShow=!1}},onCoAuthoringDisconnect:function(){this.SetDisabled(!0,!1)},onInsertTable:function(){this._settings[Common.Utils.documentSettingsType.Table].needShow=!0},onInsertImage:function(){this._settings[Common.Utils.documentSettingsType.Image].needShow=!0},onInsertChart:function(){this._settings[Common.Utils.documentSettingsType.Chart].needShow=!0},onInsertShape:function(){this._settings[Common.Utils.documentSettingsType.Shape].needShow=!0},onInsertTextArt:function(){this._settings[Common.Utils.documentSettingsType.TextArt].needShow=!0},UpdateThemeColors:function(){this.rightmenu.paragraphSettings.UpdateThemeColors(),this.rightmenu.tableSettings.UpdateThemeColors(),this.rightmenu.shapeSettings.UpdateThemeColors(),this.rightmenu.textartSettings.UpdateThemeColors()},fillTextArt:function(){this.rightmenu.textartSettings.fillTextArt()},updateMetricUnit:function(){this.rightmenu.headerSettings.updateMetricUnit(),this.rightmenu.paragraphSettings.updateMetricUnit(),this.rightmenu.chartSettings.updateMetricUnit(),this.rightmenu.imageSettings.updateMetricUnit(),this.rightmenu.tableSettings.updateMetricUnit()},createDelayedElements:function(){if(this.api&&(this.api.asc_registerCallback(" asc_onFocusObject ",_.bind(this.onFocusObject,this)),this.api.asc_registerCallback(" asc_doubleClickOnObject ",_.bind(this.onDoubleClickOnObject,this)),this.rightmenu.mergeSettings&&(this.rightmenu.mergeSettings.setDocumentName(this.getApplication().getController(" Viewport "
this.getApplication().getController(" Common . Controllers . Comments ").onAfterShow()),!1}},onPluginOpen:function(t,e,i){" onboard "==e&&(" open "==i?(this.leftMenu.close(),this.leftMenu.panelPlugins.show(),this.leftMenu.onBtnMenuClick({pressed:!0,options:{action:" plugins "}}),this.leftMenu._state.pluginIsRunning=!0):(this.leftMenu._state.pluginIsRunning=!1,this.leftMenu.close()))},showHistory:function(){var t=DE.getController(" Main ");t.loadMask||(t.loadMask=new Common.UI.LoadMask({owner:$(" # viewport ")})),t.loadMask.setTitle(this.textLoadHistory),t.loadMask.show(),Common.Gateway.requestHistory()},onShowHideChat:function(t){this.mode.canCoAuthoring&&this.mode.canChat&&!this.mode.isLightVersion&&(t?(Common.UI.Menu.Manager.hideAll(),this.leftMenu.showMenu(" chat ")):(this.leftMenu.btnChat.toggle(!1,!0),this.leftMenu.onBtnMenuClick(this.leftMenu.btnChat)))},textNoTextFound:" Text not found ",newDocumentTitle:" Unnamed document ",requestEditRightsText:" Requesting editing rights ... ",textReplaceSuccess:" Search has been done . { 0 } occurrences have been replaced ",textReplaceSkipped:" The replacement has been made . { 0 } occurrences were skipped . ",textLoadHistory:" Loading version history ... ",notcriticalErrorTitle:" Warning ",leavePageText:" All unsaved changes in this document will be lost . < br > Click 'Cancel' then 'Save' to save them . Click 'OK' to discard all the unsaved changes . ",warnDownloadAs:" If you continue saving in this format all features except the text will be lost . < br > Are you sure you want to continue ? ",warnDownloadAsRTF:" If you continue saving in this format some of the formatting might be lost . < br > Are you sure you want to continue ? ",txtUntitled:" Untitled ",txtCompatible:" The document will be saved to the new format . It will allow to use all the editor features , but might affect the document layout . < br > Use the 'Compatibility' option of the advanced settings if you want to make the files compatible with older MS Word versions . "},DE.Controllers.LeftMenu||{}))}),void 0===Common)var Common={};if(Common.IrregularStack=function(t){var e=[],i=function(t,e){return" object "==typeof t&&" object "==typeof e&&window.JSON?window.JSON.stringify(t)===window.JSON.stringify(e):t===e};t=t||{};var n=t.strongCompare||i,o=t.weakCompare||i,s=function(t,i){for(var n=e.length-1;n>=0;n--)if(i(e[n],t))return n;return-1};return{push:function(t){e.push(t)},pop:function(t){var i=s(t,n);if(-1!=i)return e.splice(i,1)[0]},get:function(t){var i=s(t,o);if(-1!=i)return e[i]},exist:function(t){return!(s(t,n)<0)}}},define(" irregularstack ",function(){}),void 0===Common)var Common={};if(Common.Controllers=Common.Controllers||{},define(" common / main / lib / controller / Fonts ",[" core "," common / main / lib / collection / Fonts "],function(){" use strict ";Common.Controllers.Fonts=Backbone.Controller.extend(function(){function t(t,e){for(var i,n=e.get(" type ")==o,s=-1,a=t.length,r=e.get(" name ");!n&&++s<a&&(i=t.at(s),i.get(" type ")==o);)n=i.get(" name ")==r;return n}function e(e,i){e.showlastused&&t(e.store,i)}function i(t){Common.NotificationCenter.trigger(" fonts : change ",t)}function n(t,e){var i=[];_.each(t,function(t){var e=t.asc_getFontId();i.push({id:_.isEmpty(e)?Common.UI.getId():e,name:t.asc_getFontName(),imgidx:t.asc_getFontThumbnail(),type:t.asc_getFontType()})});var n=this.getCollection(" Common . Collections . Fonts ");n&&(n.add(i),n.sort()),Common.NotificationCenter.trigger(" fonts : load ",n,e)}var o=4;return{models:[" Common . Models . Fonts "],collections:[" Common . Collections . Fonts "],views:[],initialize:function(){Common.NotificationCenter.on(" fonts : select ",_.bind(e,this))},onLaunch:function(){},setApi:function(t){this.api=t,this.api.asc_registerCallback(" asc_onInitEditorFonts ",_.bind(n,this)),this.api.asc_registerCallback(" asc_onFontFamily ",_.bind(i,this))}}}())}),void 0===Common)var Common={};if(Common.Collections=Common.Collections||{},define(" common / main / lib / collection / TextArt ",[" backbone "],function(t){" use strict ";Common.Collections.TextArt=t.Collection.extend({model:t.Model.extend({defaults:function(){return{id:Common.UI.getId(),imageUrl:null,data:null}}})})}),define(" common / main / lib / view / OpenDialog ",["
a . push ( new Common . Models . HistoryVersion ({ version : s . versionGroup , revision : s . version , userid : s . user . id , username : s . user . name , usercolor : p . get ( "color" ), created : s . created , docId : s . key , markedAsVersion : r !== s . versionGroup , selected : t . data . currentVersion == s . version , canRestore : this . appOptions . canHistoryRestore && o < i . length - 1 , isExpanded :! 0 , serverVersion : s . serverVersion })), t . data . currentVersion == s . version && ( n = a [ a . length - 1 ]), r = s . versionGroup , l !== s . version ){ for ( l = s . version , c . reverse (), g = 0 ; g < c . length ; g ++ ) a [ a . length - g - 2 ]. set ( "arrColors" , c ); c = []} c . push ( p . get ( "colorval" )); var u , g , b = s . changes ; if ( b && b . length > 0 ){ if ( a [ a . length - 1 ]. set ( "docIdPrev" , d ), ! _ . isEmpty ( s . serverVersion ) && s . serverVersion == this . appOptions . buildVersion ) for ( a [ a . length - 1 ]. set ( "changeid" , b . length - 1 ), a [ a . length - 1 ]. set ( "hasChanges" , b . length > 1 ), g = b . length - 2 ; g >= 0 ; g -- ) u = b [ g ], p = h . findUser ( u . user . id ), p || ( p = new Common . Models . User ({ id : u . user . id , username : u . user . name , colorval : Asc . c_oAscArrUserColors [ m ], color : this . generateUserColor ( Asc . c_oAscArrUserColors [ m ++ ])}), h . add ( p )), a . push ( new Common . Models . HistoryVersion ({ version : s . versionGroup , revision : s . version , changeid : g , userid : u . user . id , username : u . user . name , usercolor : p . get ( "color" ), created : u . created , docId : s . key , docIdPrev : d , selected :! 1 , canRestore : this . appOptions . canHistoryRestore , isRevision :! 1 , isVisible :! 0 , serverVersion : s . serverVersion })), c . push ( p . get ( "colorval" ))} else 0 == o && 1 == i . length && a [ a . length - 1 ]. set ( "docId" , s . key + "1" )} if ( c . length > 0 ){ for ( c . reverse (), g = 0 ; g < c . length ; g ++ ) a [ a . length - g - 1 ]. set ( "arrColors" , c ); c = []} e . reset ( a ), null === n && e . size () > 0 && ( n = e . at ( 0 ), n . set ( "selected" , ! 0 )), n && this . getApplication (). getController ( "Common.Controllers.History" ). onSelectRevision ( null , null , n )}}}, generateUserColor : function ( t ){ return "#" + ( "000000" + t . toString ( 16 )). substr ( - 6 )}, disableEditing : function ( t ){ var e = this . getApplication (); this . appOptions . canEdit && "view" !== this . editorConfig . mode && ( e . getController ( "RightMenu" ). getView ( "RightMenu" ). clearSelection (), e . getController ( "RightMenu" ). SetDisabled ( t , ! 1 ), e . getController ( "Statusbar" ). getView ( "Statusbar" ). SetDisabled ( t )), e . getController ( "LeftMenu" ). SetDisabled ( t , ! 0 ), e . getController ( "Toolbar" ). DisableToolbar ( t , t ), e . getController ( "Common.Controllers.ReviewChanges" ). SetDisabled ( t )}, goBack : function ( t ){ if ( ! Common . Controllers . Desktop . process ( "goback" )){ var e = this . appOptions . customization . goback . url ; t ||! 1 === this . appOptions . customization . goback . blank ? parent . location . href = e : window . open ( e , "_blank" )}}, onEditComplete : function ( t ){ var e = this . getApplication (), i = e . getController ( "Toolbar" ), n = i . getView (); if ( ! this . appOptions . isEdit ||! n ||! n . btnInsertShape . pressed &&! n . btnInsertText . pressed || _ . isObject ( arguments [ 1 ]) && "tlbtn-insertshape" === arguments [ 1 ]. id || ( this . api && this . api . StartAddShape ( "" , ! 1 ), n . btnInsertShape . toggle ( ! 1 , ! 1 ), n . btnInsertText . toggle ( ! 1 , ! 1 )), this . appOptions . isEdit && n && n . btnHighlightColor . pressed && ( ! _ . isObject ( arguments [ 1 ]) || "id-toolbar-btn-highlight" !== arguments [ 1 ]. id ) && ( this . api . SetMarkerFormat ( ! 1 ), n . btnHighlightColor . toggle ( ! 1 , ! 1 )), e . getController ( "DocumentHolder" ). getView (). focus (), this . api && this . appOptions . isEdit &&! n . _state . previewmode ){ var o = this . api . asc_isDocumentCanSave (), s = this . appOptions . forcesave , a =!! n . btnCollabChanges . rendered && n . btnCollabChanges . $icon . hasClass ( "btn-synch" ), r =! o &&! a &&! s || this . _state . isDisconnected || this . _state . fastCoauth && this . _state . usersCount > 1 &&! s ; n . btnSave . setDisabled ( r )}}, onLongActionBegin : function ( t , e ){ var i = { id : e , type : t }; this . stackLongActions . push ( i ), this . setLongActionView ( i )}, onLongActionEnd : function ( t , e ){ var i = { id : e , type : t }; if ( this . stackLongActions . pop ( i ), appHeader && appHeader . setDocumentCaption ( this . api . asc_getDocumentName ()), this . updateWindowTitle ( ! 0 ), i = this . stackLongActions . get ({ type : Asc . c_oAscAsyncActionType . Information })) this . setLongActionView ( i ); else { var n = this ; e != Asc . c_oAscAsyncAction . Save && e != Asc . c_oAscAsyncAction . ForceSaveButton || this . appOptions . isOffline ? this . getApplication (). getController ( "Statusbar" ). setStatusCaption ( "" ) : this . _state . fastCoauth && this . _state . usersCount > 1 ? n . _state . timerSave = setTimeout ( function (){ n . getApplication (). getController ( "Statusbar" ). setStatusCaption ( n . textChangesSa
; if ( e && e . btnCollabChanges &&! e . _state . previewmode ){ var i = e . btnCollabChanges . $icon . hasClass ( "btn-synch" ), n = this . appOptions . forcesave , o =! t &&! i &&! n || this . _state . isDisconnected || this . _state . fastCoauth && this . _state . usersCount > 1 &&! n ; e . btnSave . setDisabled ( o )} ! this . contComments . isDummyComment || this . dontCloseDummyComment || this . beforeShowDummyComment || this . contComments . clearDummyComment ()}, onDocumentCanSaveChanged : function ( t ){ var e = this . getApplication (). getController ( "Toolbar" ). getView (); if ( e && this . api &&! e . _state . previewmode ){ var i = e . btnCollabChanges . $icon . hasClass ( "btn-synch" ), n = this . appOptions . forcesave , o =! t &&! i &&! n || this . _state . isDisconnected || this . _state . fastCoauth && this . _state . usersCount > 1 &&! n ; e . btnSave . setDisabled ( o )}}, onContextMenu : function ( t ){ var e = t . target . getAttribute ( "data-can-copy" ), i = t . target instanceof HTMLInputElement || t . target instanceof HTMLTextAreaElement ; if ( i && "false" === e ||! i && "true" !== e ) return t . stopPropagation (), t . preventDefault (), ! 1 }, onBeforeUnload : function (){ if ( Common . localStorage . save (), this . api . isDocumentModified ()){ var t = this ; return this . api . asc_stopSaving (), this . continueSavingTimer = window . setTimeout ( function (){ t . api . asc_continueSaving ()}, 500 ), this . leavePageText }}, onUnload : function (){ this . continueSavingTimer && clearTimeout ( this . continueSavingTimer )}, hidePreloader : function (){ var t ; this . _state . customizationDone || ( this . _state . customizationDone =! 0 , this . appOptions . customization && ( this . appOptions . isDesktopApp ? this . appOptions . customization . about =! 1 : this . appOptions . canBrandingExt || ( this . appOptions . customization . about =! 0 )), Common . Utils . applyCustomization ( this . appOptions . customization , mapCustomizationElements ), this . appOptions . canBrandingExt && ( Common . Utils . applyCustomization ( this . appOptions . customization , mapCustomizationExtElements ), t = this . getApplication (). getController ( "Common.Controllers.Plugins" ). applyUICustomization ())), Common . NotificationCenter . trigger ( "layout:changed" , "main" ),( t || new Promise ( function ( t , e ){ t ()})). then ( function (){ $ ( "#loading-mask" ). hide (). remove (), Common . Controllers . Desktop . process ( "preloader:hide" )})}, onDownloadUrl : function ( t ){ this . _state . isFromGatewayDownloadAs && Common . Gateway . downloadAs ( t ), this . _state . isFromGatewayDownloadAs =! 1 }, onUpdateVersion : function ( t ){ var e = this ; e . needToUpdateVersion =! 0 , e . onLongActionEnd ( Asc . c_oAscAsyncActionType . BlockInteraction , LoadingDocument ), Common . UI . warning ({ title : e . titleUpdateVersion , msg : this . errorUpdateVersion , callback : function (){ _ . defer ( function (){ Common . Gateway . updateVersion (), t && t . call ( e ), e . onLongActionBegin ( Asc . c_oAscAsyncActionType . BlockInteraction , LoadingDocument )})}})}, onServerVersion : function ( t ){ return ! 1 }, onCollaborativeChanges : function (){ this . _state . hasCollaborativeChanges || ( this . _state . hasCollaborativeChanges =! 0 , this . appOptions . isEdit && this . getApplication (). getController ( "Statusbar" ). setStatusCaption ( this . txtNeedSynchronize , ! 0 ))}, synchronizeChanges : function (){ this . getApplication (). getController ( "Statusbar" ). synchronizeChanges (), this . getApplication (). getController ( "Common.Controllers.ReviewChanges" ). synchronizeChanges (), this . getApplication (). getController ( "DocumentHolder" ). getView (). hideTips (), this . getApplication (). getController ( "Toolbar" ). getView (). synchronizeChanges (), this . _state . hasCollaborativeChanges =! 1 }, initNames : function (){ this . shapeGroupNames = [ this . txtBasicShapes , this . txtFiguredArrows , this . txtMath , this . txtCharts , this . txtStarsRibbons , this . txtCallouts , this . txtButtons , this . txtRectangles , this . txtLines ]}, fillAutoShapes : function ( t , e ){ if ( ! _ . isEmpty ( e ) &&! _ . isEmpty ( t ) && e . length == t . length ){ var i = this , n = [], o = this . getCollection ( "ShapeGroups" ); o . reset (); t . length ; _ . each ( t , function ( t , o ){ var s = new Backbone . Collection ([],{ model : DE . Models . ShapeModel }), a = e [ o ]. length > 18 ? 7 : 6 , r = 35 * Math . ceil ( e [ o ]. length / a ) + 3 , l = 30 * a ; _ . each ( e [ o ], function ( t , e ){ s . add ({ data : { shapeType : t . Type }, tip : i [ "txtShape_" + t . Type ] || i . textShape + " " + ( e + 1 ), allowSelected :! 0 , selected :! 1 })}), n . push ({ groupName : i . shapeGroupNames [ o ], groupStore : s , groupWidth : l , groupHeight : r })}), o . add ( n ), setTimeout ( function (){ i . getApplication (). getController ( "Toolbar" ). fillAutoShapes ()}, 50 )}}, fillTextArt : function ( t ){ if ( ! _ . isEmpty ( t
template : _ . template ([ "<table><tbody>" , "<% _.each(rows, function(row) { %>" , "<tr>" , "<% _.each(row, function(item) { %>" , '<td><div><svg class="btn-doc-format" format="<%= item.type %>", format-ext="<%= item.ext %>">' , '<use xlink:href="#svg-format-<%= item.imgCls %>"></use>' , "</svg></div></td>" , "<% }) %>" , "</tr>" , "<% }) %>" , "</tbody></table>" ]. join ( "" )), initialize : function ( t ){ Common . UI . BaseView . prototype . initialize . call ( this , arguments ), this . menu = t . menu }, render : function (){ return $ ( this . el ). html ( this . template ({ rows : this . formats })), $ ( ".btn-doc-format" , this . el ). on ( "click" , _ . bind ( this . onFormatClick , this )), _ . isUndefined ( this . scroller ) && ( this . scroller = new Common . UI . Scroller ({ el : $ ( this . el ), suppressScrollX :! 0 })), this }, onFormatClick : function ( t ){ var e = t . currentTarget . attributes . format , i = t . currentTarget . attributes [ "format-ext" ]; _ . isUndefined ( e ) || _ . isUndefined ( i ) ||! this . menu || this . menu . fireEvent ( "savecopy:format" ,[ this . menu , parseInt ( e . value ), i . value ])}}), DE . Views . FileMenuPanels . Settings = Common . UI . BaseView . extend ( _ . extend ({ el : "#panel-settings" , menu : void 0 , template : _ . template ([ "<table><tbody>" , '<tr class="comments">' , '<td class="left"><label><%= scope.txtLiveComment %></label></td>' , '<td class="right"><div id="fms-chb-live-comment"/></td>' , "</tr>" , '<tr class="divider comments"></tr>' , '<tr class="comments">' , '<td class="left"></td>' , '<td class="right"><div id="fms-chb-resolved-comment"/></td>' , "</tr>" , '<tr class="divider comments"></tr>' , '<tr class="edit">' , '<td class="left"><label><%= scope.txtSpellCheck %></label></td>' , '<td class="right"><div id="fms-chb-spell-check"/></td>' , "</tr>" , '<tr class="divider edit"></tr>' , '<tr class="edit">' , '<td class="left"><label><%= scope.txtInput %></label></td>' , '<td class="right"><div id="fms-chb-input-mode"/></td>' , "</tr>" , '<tr class="divider edit"></tr>' , '<tr class="edit">' , '<td class="left"><label><%= scope.textAlignGuides %></label></td>' , '<td class="right"><span id="fms-chb-align-guides" /></td>' , "</tr>" , '<tr class="divider edit"></tr>' , '<tr class="edit">' , '<td class="left"><label><%= scope.textCompatible %></label></td>' , '<td class="right"><span id="fms-chb-compatible" /></td>' , "</tr>" , '<tr class="divider edit"></tr>' , '<tr class="autosave">' , '<td class="left"><label id="fms-lbl-autosave"><%= scope.textAutoSave %></label></td>' , '<td class="right"><span id="fms-chb-autosave" /></td>' , "</tr>" , '<tr class="divider autosave"></tr>' , '<tr class="forcesave">' , '<td class="left"><label id="fms-lbl-forcesave"><%= scope.textForceSave %></label></td>' , '<td class="right"><span id="fms-chb-forcesave" /></td>' , "</tr>" , '<tr class="divider forcesave"></tr>' , '<tr class="coauth changes">' , '<td class="left"><label><%= scope.strCoAuthMode %></label></td>' , '<td class="right">' , '<div><div id="fms-cmb-coauth-mode" style="display: inline-block; margin-right: 15px;vertical-align: middle;"/>' , '<label id="fms-lbl-coauth-mode" style="vertical-align: middle;"><%= scope.strCoAuthModeDescFast %></label></div></td>' , "</tr>" , '<tr class="divider coauth changes"></tr>' , '<tr class="coauth changes">' , '<td class="left"><label><%= scope.strShowChanges %></label></td>' , '<td class="right"><span id="fms-cmb-show-changes" /></td>' , "</tr>" , '<tr class="divider coauth changes"></tr>' , "<tr>" , '<td class="left"><label><%= scope.strZoom %></label></td>' , '<td class="right"><div id="fms-cmb-zoom" class="input-group-nr" /></td>' , "</tr>" , '<tr class="divider"></tr>' , "<tr>" , '<td class="left"><label><%= scope.strFontRender %></label></td>' , '<td class="right"><span id="fms-cmb-font-render" /></td>' , "</tr>" , '<tr class="divider"></tr>' , '<tr class="edit">' , '<td class="left"><label><%= scope.strUnit %></label></td>' , '<td class="right"><span id="fms-cmb-unit" /></td>' , "</tr>" , '<tr class="divider edit"></tr>' , "<tr>" , '<td class="left"></td>' , '<td class="right"><button id="fms-btn-apply" class="btn normal dlg-btn primary"><%= scope.okButtonText %></button></td>' , "</tr>" , "</tbody></table>" ]. join ( "" )), initialize : function ( t ){ Common . UI . BaseView . prototype . initialize . call ( this , arguments ), this . menu = t . menu }, render : function (){ return $ ( this . el ). html ( this . template ({ scope : thi
template : _ . template ([ '<div style="width:100%; height:100%; position: relative;">' , '<div id="id-help-contents" style="position: absolute; width:220px; top: 0; bottom: 0;" class="no-padding"></div>' , '<div id="id-help-frame" style="position: absolute; left: 220px; top: 0; right: 0; bottom: 0;" class="no-padding"></div>' , "</div>" ]. join ( "" )), initialize : function ( t ){ Common . UI . BaseView . prototype . initialize . call ( this , arguments ), this . menu = t . menu , this . urlPref = "resources/help/en/" , this . en_data = [{ src : "ProgramInterface/ProgramInterface.htm" , name : "Introducing Document Editor user interface" , headername : "Program Interface" },{ src : "ProgramInterface/FileTab.htm" , name : "File tab" },{ src : "ProgramInterface/HomeTab.htm" , name : "Home Tab" },{ src : "ProgramInterface/InsertTab.htm" , name : "Insert tab" },{ src : "ProgramInterface/LayoutTab.htm" , name : "Layout tab" },{ src : "ProgramInterface/ReviewTab.htm" , name : "Review tab" },{ src : "ProgramInterface/PluginsTab.htm" , name : "Plugins tab" },{ src : "UsageInstructions/ChangeColorScheme.htm" , name : "Change color scheme" , headername : "Basic operations" },{ src : "UsageInstructions/CopyPasteUndoRedo.htm" , name : "Copy/paste text passages, undo/redo your actions" },{ src : "UsageInstructions/OpenCreateNew.htm" , name : "Create a new document or open an existing one" },{ src : "UsageInstructions/SetPageParameters.htm" , name : "Set page parameters" , headername : "Page formatting" },{ src : "UsageInstructions/NonprintingCharacters.htm" , name : "Show/hide nonprinting characters" },{ src : "UsageInstructions/SectionBreaks.htm" , name : "Insert section breaks" },{ src : "UsageInstructions/InsertHeadersFooters.htm" , name : "Insert headers and footers" },{ src : "UsageInstructions/InsertPageNumbers.htm" , name : "Insert page numbers" },{ src : "UsageInstructions/InsertFootnotes.htm" , name : "Insert footnotes" },{ src : "UsageInstructions/AlignText.htm" , name : "Align your text in a paragraph" , headername : "Paragraph formatting" },{ src : "UsageInstructions/BackgroundColor.htm" , name : "Select background color for a paragraph" },{ src : "UsageInstructions/ParagraphIndents.htm" , name : "Change paragraph indents" },{ src : "UsageInstructions/LineSpacing.htm" , name : "Set paragraph line spacing" },{ src : "UsageInstructions/PageBreaks.htm" , name : "Insert page breaks" },{ src : "UsageInstructions/AddBorders.htm" , name : "Add borders" },{ src : "UsageInstructions/SetTabStops.htm" , name : "Set tab stops" },{ src : "UsageInstructions/CreateLists.htm" , name : "Create lists" },{ src : "UsageInstructions/FormattingPresets.htm" , name : "Apply formatting styles" , headername : "Text formatting" },{ src : "UsageInstructions/FontTypeSizeColor.htm" , name : "Set font type, size, and color" },{ src : "UsageInstructions/DecorationStyles.htm" , name : "Apply font decoration styles" },{ src : "UsageInstructions/CopyClearFormatting.htm" , name : "Copy/clear text formatting" },{ src : "UsageInstructions/AddHyperlinks.htm" , name : "Add hyperlinks" },{ src : "UsageInstructions/InsertDropCap.htm" , name : "Insert a drop cap" },{ src : "UsageInstructions/InsertTables.htm" , name : "Insert tables" , headername : "Operations on objects" },{ src : "UsageInstructions/InsertImages.htm" , name : "Insert images" },{ src : "UsageInstructions/InsertAutoshapes.htm" , name : "Insert autoshapes" },{ src : "UsageInstructions/InsertCharts.htm" , name : "Insert charts" },{ src : "UsageInstructions/InsertTextObjects.htm" , name : "Insert text objects" },{ src : "UsageInstructions/AlignArrangeObjects.htm" , name : "Align and arrange objects on a page" },{ src : "UsageInstructions/ChangeWrappingStyle.htm" , name : "Change wrapping style" },{ src : "UsageInstructions/UseMailMerge.htm" , name : "Use mail merge" , headername : "Mail Merge" },{ src : "UsageInstructions/InsertEquation.htm" , name : "Insert equations" , headername : "Math equations" },{ src : "HelpfulHints/CollaborativeEditing.htm" , name : "Collaborative document editing" , headername : "Document co-editing" },{ src : "HelpfulHints/Review.htm" , name : "Document Review" },{ src : "UsageInstructions/ViewDocInfo.htm" , name : "View document information" , headername : "Tools and settings" },{ src : "UsageInstructions/SavePrintDownload.htm" , name : "Save/download/print your document" },{ src : "HelpfulHints/AdvancedSettings.htm" , name : "Advanced settings of Document Editor" },{ src : "HelpfulHints/Navigation.htm" , name : "View
}else if(a.hasClass(" btn - inner - close ",!1)){if(i.get(" dummy "))return s.clearDummyText(),void s.hide();h&&this.getActiveTextBoxVal().length>0?(s.saveText(),i.set(" hideAddReply ",!1),this.getTextBox().val(s.textVal),this.autoHeightTextBox()):(this.clearTextBoxBind(),s.fireEvent(" comment : closeEditing ",[c])),this.replyId=void 0,s.calculateSizeOfContent(),s.setLeftTop(s.arrowPosX,s.arrowPosY,s.leftX),s.calculateSizeOfContent(),o()}else if(a.hasClass(" btn - resolve ",!1)){var u=a.data(" bs . tooltip ");u&&(u.dontShow=!0),s.fireEvent(" comment : resolve ",[c]),o()}else if(a.hasClass(" btn - resolve - check ",!1)){var u=a.data(" bs . tooltip ");u&&(u.dontShow=!0),s.fireEvent(" comment : resolve ",[c]),o()}}}),this.emailMenu=new Common.UI.Menu({maxHeight:190,cyclic:!1,items:[]}).on(" render : after ",function(t){this.scroller=new Common.UI.Scroller({el:$(this.el).find(" . dropdown - menu "),useKeyboard:this.enableKeyEvents&&!this.handleSelect,minScrollbarLength:40,alwaysVisibleY:!0})}).on(" show : after ",function(){this.scroller.update({alwaysVisibleY:!0}),s.$window.css({zIndex:" 1001 "})}).on(" hide : after ",function(){s.$window.css({zIndex:" 990 "})}),s.on({show:function(){s.commentsView.autoHeightTextBox(),s.$window.find(" textarea ").keydown(function(t){t.keyCode==Common.UI.Keys.ESC&&s.hide(!0)})}," animate : before ":function(){var t=s.$window.find(" textarea ");t&&t.length&&t.focus()}})}var p=Common.UI.DataView.extend(function(){return{options:{handleSelect:!1,scrollable:!0,template:_.template('<div class=" dataview - ct inner " style=" overflow - y : visible ; "></div>')}}}());if(p)if(this.reviewChangesView)this.reviewChangesView.render($(" # id - review - popover ")),this.reviewChangesView.onResetItems();else{this.reviewChangesView=new p({el:$(" # id - review - popover "),store:s.reviewStore,itemTemplate:_.template(e)});var c=function(t,e,i){e.tipsArray&&e.tipsArray.forEach(function(t){t.remove()});var n=[],o=$(e.el).find(" . btn - goto ");o.tooltip({title:s.textFollowMove,placement:" cursor "}),o.each(function(t,e){n.push($(e).data(" bs . tooltip ").tip())}),e.tipsArray=n};this.reviewChangesView.on(" item : add ",c),this.reviewChangesView.on(" item : remove ",c),this.reviewChangesView.on(" item : change ",c),this.reviewChangesView.on(" item : click ",function(t,e,i,n){var o=$(n.target);if(o)if(o.hasClass(" btn - accept "))s.fireEvent(" reviewchange : accept ",[i.get(" changedata ")]);else if(o.hasClass(" btn - reject "))s.fireEvent(" reviewchange : reject ",[i.get(" changedata ")]);else if(o.hasClass(" btn - delete "))s.fireEvent(" reviewchange : delete ",[i.get(" changedata ")]);else if(o.hasClass(" btn - goto ")){var a=o.data(" bs . tooltip ");a&&(a.dontShow=!0),s.fireEvent(" reviewchange : goto ",[i.get(" changedata ")])}})}_.isUndefined(this.scroller)&&(this.scroller=new Common.UI.Scroller({el:a.find(" # id - popover "),minScrollbarLength:40,wheelSpeed:10,alwaysVisibleY:!0}))},showComments:function(t,e,i,n){this.options.animate=t;var o=this.commentsView.getTextBox();e&&this.textVal&&o&&o.val(this.textVal),n&&n.length&&o&&o.val(n),this.show(t),this.hookTextBox(),this._state.commentsVisible=!0},showReview:function(t,e,i){this.show(t),this._state.reviewVisible=!0},show:function(t,e,i,n){this.options.animate=t,Common.UI.Window.prototype.show.call(this),this.scroller&&this.scroller.update({minScrollbarLength:40,alwaysVisibleY:!0})},hideComments:function(){this.handlerHide&&this.handlerHide(),this.hideTips(),this._state.commentsVisible=!1,this._state.reviewVisible?this.calculateSizeOfContent():this.hide()},hideReview:function(){this.handlerHide&&this.handlerHide(),this.hideTips(),this._state.reviewVisible=!1,this._state.commentsVisible?this.calculateSizeOfContent():this.hide()},hide:function(){this.handlerHide&&this.handlerHide.apply(this,arguments),this.hideTips(),Common.UI.Window.prototype.hide.call(this),_.isUndefined(this.e)||this.e.keyCode!=Common.UI.Keys.ESC||(this.e.preventDefault(),this.e.stopImmediatePropagation(),this.e=void 0)},update:function(t){this.commentsView&&t&&this.commentsView.onResetItems(),this.scroller&&this.scroller.update({minScrollbarLength:40,alwaysVisibleY:!0})},isVisible:function(){return this.$window&&this.$window.is(" : visible ")},setLeftTop:f
;t&&this.getPopover().setLeftTop(t.asc_getX()+t.asc_getWidth(),t.asc_getY(),this.hintmode?t.asc_getX():void 0)}},updateComments:function(t,e,i){var n=this;n.updateCommentsTime=new Date,void 0===n.timerUpdateComments&&(n.timerUpdateComments=setInterval(function(){new Date-n.updateCommentsTime>100&&(clearInterval(n.timerUpdateComments),n.timerUpdateComments=void 0,n.updateCommentsView(t,e,i))},25))},updateCommentsView:function(t,e,i){if(t&&!this.view.isVisible())return this.view.needRender=t,void this.onUpdateFilter(this.filter,!0);var n,o=!0;if(_.isUndefined(e)&&this.collection.sort(),t){for(this.onUpdateFilter(this.filter,!0),n=this.collection.length-1;n>=0;--n)o?this.collection.at(n).set(" last ",!0,{silent:!0}):this.collection.at(n).get(" last ")&&this.collection.at(n).set(" last ",!1,{silent:!0}),o=!1;this.view.render(),this.view.needRender=!1}this.view.update(),i&&this.view.loadText()},findComment:function(t){return this.collection.findWhere({uid:t})},findPopupComment:function(t){return this.popoverComments.findWhere({id:t})},findCommentInGroup:function(t){for(var e in this.groupCollection){var i=this.groupCollection[e],n=i.findWhere({uid:t});if(n)return n}},closeEditing:function(t){if(!_.isUndefined(t)){var e=this.findPopupComment(t);e&&(e.set(" editTextInPopover ",!1),e.set(" showReplyInPopover ",!1)),this.subEditStrings[t]&&delete this.subEditStrings[t],this.subEditStrings[t+" - R "]&&delete this.subEditStrings[t+" - R "]}this.collection.clearEditing(),this.collection.each(function(t){var e=_.clone(t.get(" replys "));t.get(" replys ").length=0,e.forEach(function(t){t.get(" editText ")&&t.set(" editText ",!1),t.get(" editTextInPopover ")&&t.set(" editTextInPopover ",!1)}),t.set(" replys ",e)}),this.view.showEditContainer(!1),this.view.update()},disableHint:function(t){t&&this.mode.canComments&&(t.set(" hint ",!1),this.api.asc_showComment(t.get(" uid "),!1),this.isSelectedComment=!0)},blockPopover:function(t){this.isSelectedComment=t,t&&this.getPopover().isVisible()&&this.getPopover().hide()},getPopover:function(){return _.isUndefined(this.popover)&&(this.popover=Common.Views.ReviewPopover.prototype.getPopover({commentsStore:this.popoverComments,renderTo:this.sdkViewName,canRequestUsers:this.mode?this.mode.canRequestUsers:void 0,canRequestSendNotify:this.mode?this.mode.canRequestSendNotify:void 0}),this.popover.setCommentsStore(this.popoverComments)),this.popover},onUpdateUsers:function(){var t=this.userCollection,e=!1;for(var i in this.groupCollection)e=!0,this.groupCollection[i].each(function(e){var i=t.findOriginalUser(e.get(" userid ")),n=i?i.get(" color "):null,o=!1;n!==e.get(" usercolor ")&&(o=!0,e.set(" usercolor ",n,{silent:!0})),e.get(" replys ").forEach(function(e){i=t.findOriginalUser(e.get(" userid ")),(n=i?i.get(" color "):null)!==e.get(" usercolor ")&&(o=!0,e.set(" usercolor ",n,{silent:!0}))}),o&&e.trigger(" change ")});!e&&this.collection.each(function(e){var i=t.findOriginalUser(e.get(" userid ")),n=i?i.get(" color "):null,o=!1;n!==e.get(" usercolor ")&&(o=!0,e.set(" usercolor ",n,{silent:!0})),e.get(" replys ").forEach(function(e){i=t.findOriginalUser(e.get(" userid ")),(n=i?i.get(" color "):null)!==e.get(" usercolor ")&&(o=!0,e.set(" usercolor ",n,{silent:!0}))}),o&&e.trigger(" change ")})},readSDKComment:function(t,e){var i=e.asc_getOnlyOfficeTime()?new Date(this.stringOOToLocalDate(e.asc_getOnlyOfficeTime())):""==e.asc_getTime()?new Date:new Date(this.stringUtcToLocalDate(e.asc_getTime())),n=this.userCollection.findOriginalUser(e.asc_getUserId()),o=t.substr(0,t.lastIndexOf(" _ ")+1).match(/^(doc|sheet[0-9_]+)_/),s=new Common.Models.Comment({uid:t,guid:e.asc_getGuid(),userid:e.asc_getUserId(),username:e.asc_getUserName(),usercolor:n?n.get(" color "):null,date:this.dateToLocaleTimeString(i),quote:e.asc_getQuoteText(),comment:e.asc_getText(),resolved:e.asc_getSolved(),unattached:!_.isUndefined(e.asc_getDocumentFlag)&&e.asc_getDocumentFlag(),id:Common.UI.getId(),time:i.getTime(),showReply:!1,editText:!1,last:void 0,editTextInPopover:!!this.editPopover,showReplyInPopover:!1,hideAddReply:_.isUndefined(this.hidereply)?!!this.showPopover:this.hidereply,scope:this.view,editable:t
var t=" en ",e=void 0,i="",n=null,o=!0,s=function(){n=new DocsAPI.DocEditor(" id - diagram - editor - placeholder ",{width:" 100 % ",height:" 100 % ",documentType:" spreadsheet ",document:{url:" _chart_ ",permissions:{edit:!0,download:!1}},editorConfig:{mode:" editdiagram ",targetApp:i,lang:t,canCoAuthoring:!1,canBackToFolder:!1,canCreateNew:!1,customization:e,user:{id:" uid - "+Date.now()}},events:{onAppReady:function(){},onDocumentStateChange:function(){},onError:function(){},onInternalMessage:_.bind(this.onInternalMessage,this)}}),Common.Gateway.on(" processmouse ",_.bind(this.onProcessMouse,this))};return{views:[" Common . Views . ExternalDiagramEditor "],initialize:function(){this.addListeners({" Common . Views . ExternalDiagramEditor ":{setchartdata:_.bind(this.setChartData,this),drag:_.bind(function(t,e){n&&n.serviceCommand(" window : drag "," start "==e)},this),show:_.bind(function(t){var e=this.diagramEditorView.getHeight(),i=Common.Utils.innerHeight();(i>e&&e<700||i<e)&&(e=Math.min(i,700),this.diagramEditorView.setHeight(e)),n?(n.serviceCommand(" setAppDisabled ",!1),o&&this.diagramEditorView._isExternalDocReady&&(o=!1,this.diagramEditorView._chartData&&this.setChartData()),this.needDisableEditing&&this.diagramEditorView._isExternalDocReady&&this.onDiagrammEditingDisabled(),n.attachMouseEvents()):s.apply(this),this.isExternalEditorVisible=!0,this.isHandlerCalled=!1},this),hide:_.bind(function(t){n&&(n.detachMouseEvents(),this.isExternalEditorVisible=!1)},this)}})},onLaunch:function(){this.diagramEditorView=this.createView(" Common . Views . ExternalDiagramEditor ",{handler:_.bind(this.handler,this)})},setApi:function(t){return this.api=t,this.api.asc_registerCallback(" asc_onCloseChartEditor ",_.bind(this.onDiagrammEditingDisabled,this)),this},handler:function(t,e){this.isHandlerCalled||(this.isHandlerCalled=!0,this.diagramEditorView._isExternalDocReady?n&&n.serviceCommand(" queryClose ",{mr:t}):(this.diagramEditorView.hide(),this.isHandlerCalled=!1))},setChartData:function(){o||(n&&n.serviceCommand(" setChartData ",this.diagramEditorView._chartData),this.diagramEditorView._chartData=null)},loadConfig:function(n){n&&n.config&&(n.config.lang&&(t=n.config.lang),n.config.customization&&(e=n.config.customization),n.config.targetApp&&(i=n.config.targetApp))},onDiagrammEditingDisabled:function(){if(!this.diagramEditorView.isVisible()||!this.diagramEditorView._isExternalDocReady)return void(this.needDisableEditing=!0);this.diagramEditorView.setControlsDisabled(!0),Common.UI.alert({title:this.warningTitle,msg:this.warningText,iconCls:" warn ",buttons:[" ok "],callback:_.bind(function(t){this.setControlsDisabled(!1),this.diagramEditorView.hide()},this)}),this.needDisableEditing=!1},onInternalMessage:function(t){var e=t.data;if(this.diagramEditorView)if(" documentReady "==e.type)this.diagramEditorView._isExternalDocReady=!0,this.isExternalEditorVisible&&(o=!1),this.diagramEditorView._chartData&&this.setChartData(),this.needDisableEditing&&this.onDiagrammEditingDisabled();else if(" chartDataReady "==e.type)void 0===this.needDisableEditing&&this.diagramEditorView.setControlsDisabled(!1);else if(" shortcut "==e.type)" escape "==e.data.key&&this.diagramEditorView.hide();else if(" canClose "==e.type)!0===e.data.answer&&(n&&(n.serviceCommand(" setAppDisabled ",!0),n.serviceCommand(" ok "==e.data.mr?" getChartData ":" clearChartData ")),this.diagramEditorView.hide()),this.isHandlerCalled=!1;else if(" processMouse "==e.type){if(" mouse : up "==e.data.event)this.diagramEditorView.binding.dragStop();else if(" mouse : move "==e.data.event){var i=parseInt(this.diagramEditorView.$window.css(" left "))+e.data.pagex,s=parseInt(this.diagramEditorView.$window.css(" top "))+e.data.pagey+34;this.diagramEditorView.binding.drag({pageX:i,pageY:s})}}else this.diagramEditorView.fireEvent(" internalmessage ",this.diagramEditorView,e)},onProcessMouse:function(t){" mouseup "==t.type&&this.isExternalEditorVisible&&n&&n.serviceCommand(" processmouse ",t)},warningTitle:" Warning ",warningText:" The object is disabled because of editing by another user . ",textClose:" Close ",textAnonymous:" Anonymous "}}(),Common.Controllers.ExternalDiagramEditor||{}))}),de
this.collection=this.getApplication().getCollection(" Common . Collections . ReviewChanges "),this.userCollection=this.getApplication().getCollection(" Common . Collections . Users "),this._state={posx:-1e3,posy:-1e3,popoverVisible:!1,previewMode:!1},Common.NotificationCenter.on(" reviewchanges : turn ",this.onTurnPreview.bind(this)),Common.NotificationCenter.on(" spelling : turn ",this.onTurnSpelling.bind(this)),Common.NotificationCenter.on(" app : ready ",this.onAppReady.bind(this)),Common.NotificationCenter.on(" api : disconnect ",_.bind(this.onCoAuthoringDisconnect,this)),this.userCollection.on(" reset ",_.bind(this.onUpdateUsers,this)),this.userCollection.on(" add ",_.bind(this.onUpdateUsers,this))},setConfig:function(t,e){this.setApi(e),t&&(this.currentUserId=t.config.user.id,this.sdkViewName=t.sdkviewname||this.sdkViewName)},setApi:function(t){t&&(this.api=t,(this.appConfig.canReview||this.appConfig.canViewReview)&&(this.api.asc_registerCallback(" asc_onShowRevisionsChange ",_.bind(this.onApiShowChange,this)),this.api.asc_registerCallback(" asc_onUpdateRevisionsChangesPosition ",_.bind(this.onApiUpdateChangePosition,this))),this.api.asc_registerCallback(" asc_onCoAuthoringDisconnect ",_.bind(this.onCoAuthoringDisconnect,this)))},setMode:function(t){return this.appConfig=t,this.popoverChanges=new Common.Collections.ReviewChanges,this.view=this.createView(" Common . Views . ReviewChanges ",{mode:t}),this},SetDisabled:function(t){this.dlgChanges&&this.dlgChanges.close(),this.view&&this.view.SetDisabled(t,this.langs),this.setPreviewMode(t)},setPreviewMode:function(t){if(this.viewmode!==t){this.viewmode=t,t&&(this.prevcanReview=this.appConfig.canReview),this.appConfig.canReview=!t&&this.prevcanReview;var e=this;this.popoverChanges&&this.popoverChanges.each(function(t){t.set(" hint ",!e.appConfig.canReview)})}},onApiShowChange:function(t){if(this.getPopover())if(t&&t.length>0){var e=this.readSDKChange(t),i=t[0].get_X(),n=t[0].get_Y(),o=Math.abs(this._state.posx-i)>.001||Math.abs(this._state.posy-n)>.001||t.length!==this._state.changes_length,s=null!==t[0].get_LockUserId(),a=this.getUserName(t[0].get_LockUserId());this.getPopover().hideTips(),this.popoverChanges.reset(e),o&&(this.getPopover().isVisible()&&this.getPopover().hide(),this.getPopover().setLeftTop(i,n)),this.getPopover().showReview(o,s,a),this.appConfig.canReview&&!this.appConfig.isReviewOnly&&this._state.lock!==s&&(this.view.btnAccept.setDisabled(1==s),this.view.btnReject.setDisabled(1==s),this.dlgChanges&&(this.dlgChanges.btnAccept.setDisabled(1==s),this.dlgChanges.btnReject.setDisabled(1==s)),this._state.lock=s),this._state.posx=i,this._state.posy=n,this._state.changes_length=t.length,this._state.popoverVisible=!0}else this._state.popoverVisible&&(this._state.posx=this._state.posy=-1e3,this._state.changes_length=0,this._state.popoverVisible=!1,this.getPopover().hideTips(),this.popoverChanges.reset(),this.getPopover().hideReview())},onApiUpdateChangePosition:function(t,e){this.getPopover()&&(e<0||this.getPopover().sdkBounds.height<e?this.getPopover().hide():this.popoverChanges.length>0&&(this.getPopover().isVisible()||this.getPopover().show(!1),this.getPopover().setLeftTop(t,e)))},findChange:function(t,e){return _.isUndefined(t)?this.collection.findWhere({id:e}):this.collection.findWhere({uid:t})},getPopover:function(){return(this.appConfig.canReview||this.appConfig.canViewReview)&&_.isUndefined(this.popover)&&(this.popover=Common.Views.ReviewPopover.prototype.getPopover({reviewStore:this.popoverChanges,renderTo:this.sdkViewName}),this.popover.setReviewStore(this.popoverChanges)),this.popover},readSDKChange:function(t){var e=this,i=[];return _.each(t,function(t){var n="",o="",s=t.get_Value(),a=t.get_MoveType();switch(t.get_Type()){case Asc.c_oAscRevisionsChangeType.TextAdd:n=a==Asc.c_oAscRevisionsMove.NoMove?e.textInserted:e.textParaMoveTo," object "==typeof s?_.each(s,function(t){if(" string "==typeof t)n+=" "+Common.Utils.String.htmlEncode(t);else switch(t){case 0:n+=" & lt ; "+e.textImage+" & gt ; ";break;case 1:n+=" & lt ; "+e.textShape+" & gt ; ";break;case 2:n+=" & lt ; "+e.textChart+" & gt ; ";break;case 3:n+=" & lt ; "+e.
t.signObject&&t.signObject.setText(t.inputName.getValue(),t.font.name,t.font.size,t.font.italic,e.pressed),t.font.bold=e.pressed}),t.btnItalic=new Common.UI.Button({cls:" btn - toolbar ",iconCls:" btn - italic ",enableToggle:!0,hint:t.textItalic}),t.btnItalic.render($(" # id - dlg - sign - italic ")),t.btnItalic.on(" click ",function(e,i){t.signObject&&t.signObject.setText(t.inputName.getValue(),t.font.name,t.font.size,e.pressed,t.font.bold),t.font.italic=e.pressed}),t.btnSelectImage=new Common.UI.Button({el:" # id - dlg - sign - image "}),t.btnSelectImage.on(" click ",_.bind(t.onSelectImage,t)),t.btnChangeCertificate=new Common.UI.Button({el:" # id - dlg - sign - change "}),t.btnChangeCertificate.on(" click ",_.bind(t.onChangeCertificate,t)),t.btnOk=new Common.UI.Button({el:e.find(" . primary "),disabled:!0}),t.cntCertificate=$(" # id - dlg - sign - certificate "),t.cntVisibleSign=$(" # id - dlg - sign - visible "),t.cntInvisibleSign=$(" # id - dlg - sign - invisible ")," visible "==t.signType?t.cntInvisibleSign.addClass(" hidden "):t.cntVisibleSign.addClass(" hidden "),e.find(" . dlg - btn ").on(" click ",_.bind(t.onBtnClick,t)),t.afterRender()},show:function(){Common.UI.Window.prototype.show.apply(this,arguments);var t=this;_.delay(function(){(" visible "==t.signType?t.inputName:t.inputPurpose).cmpEl.find(" input ").focus()},500)},close:function(){this.api.asc_unregisterCallback(" on_signature_defaultcertificate_ret ",this.binding.certificateChanged),this.api.asc_unregisterCallback(" on_signature_selectsertificate_ret ",this.binding.certificateChanged),Common.UI.Window.prototype.close.apply(this,arguments),this.signObject&&this.signObject.destroy()},afterRender:function(){this.api&&(this.binding||(this.binding={}),this.binding.certificateChanged=_.bind(this.onCertificateChanged,this),this.api.asc_registerCallback(" on_signature_defaultcertificate_ret ",this.binding.certificateChanged),this.api.asc_registerCallback(" on_signature_selectsertificate_ret ",this.binding.certificateChanged),this.api.asc_GetDefaultCertificate())," visible "==this.signType&&(this.cmbFonts.fillFonts(this.fontStore),this.cmbFonts.selectRecord(this.fontStore.findWhere({name:this.font.name})||this.fontStore.at(0)),this.signObject=new AscCommon.CSignatureDrawer(" signature - preview - img ",this.api,this.signSize.width,this.signSize.height))},getSettings:function(){var t={};return t.certificateId=this.certificateId," invisible "==this.signType?t.purpose=this.inputPurpose.getValue():t.images=this.signObject?this.signObject.getImages():[null,null],t},onBtnClick:function(t){this._handleInput(t.currentTarget.attributes.result.value)},onPrimary:function(t){return this._handleInput(" ok "),!1},_handleInput:function(t){if(this.options.handler){if(" ok "==t&&(this.btnOk.isDisabled()||this.signObject&&!this.signObject.isValid()))return;this.options.handler.call(this,this,t)}this.close()},onChangeCertificate:function(){this.api.asc_SelectCertificate()},onCertificateChanged:function(t){this.certificateId=t.id;var e=t.date,i=" string "==typeof e?e.split(" - "):["",""];this.cntCertificate.html(this.templateCertificate({name:t.name,valid:this.textValid.replace(" % 1 ",i[0]).replace(" % 2 ",i[1])})),this.cntCertificate.toggleClass(" hidden ",_.isEmpty(this.certificateId)||this.certificateId<0),this.btnChangeCertificate.setCaption(_.isEmpty(this.certificateId)||this.certificateId<0?this.textSelect:this.textChange),this.btnOk.setDisabled(_.isEmpty(this.certificateId)||this.certificateId<0)},onSelectImage:function(){this.signObject&&(this.signObject.selectImage(),this.inputName.setValue(""))},onChangeName:function(t,e){this.signObject&&this.signObject.setText(e,this.font.name,this.font.size,this.font.italic,this.font.bold)},textTitle:" Sign Document ",textPurpose:" Purpose for signing this document ",textCertificate:" Certificate ",textValid:" Valid from % 1 to % 2 ",textChange:" Change ",cancelButtonText:" Cancel ",okButtonText:" Ok ",textInputName:" Input signer name ",textUseImage:" or click 'Select Image' to use a picture as signature ",textSelectImage:" Select Image ",textSignature:" Signature looks as ",tipFontName:" Font Name ",tipFontSize:" Font Size ",textBold:" Bold ",textItalic:" Italic ",textSelect:" S