2018-01-25 11:06:58 +01:00
/*
2019-01-07 12:02:38 +01:00
* Copyright (c) Ascensio System SIA 2019. All rights reserved
2018-01-25 11:06:58 +01:00
*
* http://www.onlyoffice.com
*
* Version: 0.0.0 (build:0)
*/
2019-01-15 14:28:49 +01:00
function onDropDownKeyDown ( t ) { var e = $ ( this ) , i = e . parent ( ) , n = jQuery . Event ( "keydown.before.bs.dropdown" ) , o = jQuery . Event ( "keydown.after.bs.dropdown" ) ; 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 = 0 ; if ( t . find ( "> .menu-scroll" ) . length > 0 ) for ( var o = t . scrollTop ( ) , s = 0 ; s < e . length ; s ++ ) if ( e [ s ] . offsetTop > o ) { n = s ; break } e . length > 0 && i . length < 1 && e . eq ( n ) . 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" ) ) ; 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" ) } } } } 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 ) } } ) } 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 , h = Object . keys , d = Object . create , p = function ( ) { } , u = function ( t ) { return t instanceof u ? t : this instanceof u ? void ( this . _wrapped = t ) : new u ( t ) } ; "undefined" == typeof exports || exports . nodeType ? t . _ = u : ( "undefined" != typeof module && ! module . nodeType && module . exports && ( exports = module . exports = u ) , exports . _ = u ) , u . VERSION = "1.8.3" ; var m , g = function ( t , e , i ) { if ( void 0 === e ) return t ; switch ( i ) { case 1 : return function ( i ) { return t . call ( e , i ) } ; case null : case 3 : return function ( i , n , o ) { return t . call ( e , i , n , o ) } ; case 4 : return function ( i , n , o , s ) { return t . call ( e , i , n , o , s ) } } return function ( ) { return t . apply ( e , arguments ) } } , f = function ( t , e , i ) { return u . it
; var n , o = 0 , s = e . toLowerCase ( ) . match ( Et ) || [ ] ; if ( mt . 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 Z ( t , e , i , n ) { function o ( r ) { var l ; return s [ r ] = ! 0 , mt . 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 === Re ; return o ( e . dataTypes [ 0 ] ) || ! s [ "*" ] && o ( "*" ) } function J ( t , e ) { var i , n , o = mt . ajaxSettings . flatOptions || { } ; for ( i in e ) void 0 !== e [ i ] && ( ( o [ i ] ? t : n || ( n = { } ) ) [ i ] = e [ i ] ) ; return n && mt . 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 = { } , h = t . dataTypes . slice ( ) ; if ( h [ 1 ] ) for ( a in t . converters ) c [ a . toLowerCase ( ) ] = t . converters [ a ] ; for ( s = h . shift ( ) ; s ; ) if ( t . responseFields [ s ] && ( i [ t . responseFields [ s ] ] = e ) , ! l && n && t . dataFilter && ( e = t . dataFilter ( e , t . dataType ) ) , l = s , s = h . 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 ] , h . 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 , ht = lt . hasOwnProperty , dt = ht . toString , pt = dt . call ( Object ) , ut = { } , mt = function ( t , e ) { return new mt . fn . init ( t , e ) } , gt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g , ft = /^-ms-/ , bt = /-([a-z])/g , Ct = function ( t , e ) { return e . toUpperCase ( ) } ; mt . fn = mt . prototype = { jquery : "3.2.1" , constructor : mt , 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 = mt . merge ( this . constructor ( ) , t ) ; return e . prevObject = this , e } , each : function ( t ) { return mt . each ( this , t ) } , map : function ( t ) { return this . pushStack ( mt . 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 } , mt . extend = mt . 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 || mt . 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 && ( mt . isPlainObject ( n ) || ( o = Array . isArray ( n ) ) ) ? ( o ? ( o = ! 1 , s = i && Array . isArray ( i ) ? i : [ ] ) : s = i && mt . isPlainObject ( i ) ? i : { } , a [ e ] = mt . extend ( c , s , n ) ) : void 0 !== n && ( a [ e ] = n ) ) ; return a } , mt . 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" === mt . type ( t ) } , isWindow : function ( t ) { return null != t && t === t . window } , isNumeric : function ( t ) { var e = mt . 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 = ht . call ( e , "constructor" ) && e . constructor ) && dt . 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 ( ft , "ms-" ) . replace ( bt , Ct ) } , each : function ( t , e ) { var i , o = 0 ; if ( n ( t ) ) for ( i = t . length ; o < i && ! 1 !== e . call ( t [ o ] , o , t [ o ] ) ; o ++ ) ; else for ( o in t ) if ( ! 1 === e . call ( t [ o ] , o , t [ o ] ) ) break ; return t } , trim : function ( t ) { return null == t ? "" : ( t + "" ) . replace ( gt , "" ) } , makeArray : function ( t , e ) { var i = e || [ ] ; return null != t && ( n ( Object ( t ) ) ? mt . merge (
mt . readyException ( t ) } ) , this } , mt . extend ( { isReady : ! 1 , readyWait : 1 , ready : function ( t ) { ( ! 0 === t ? -- mt . readyWait : mt . isReady ) || ( mt . isReady = ! 0 , ! 0 !== t && -- mt . readyWait > 0 || Mt . resolveWith ( it , [ mt ] ) ) } } ) , mt . ready . then = Mt . then , "complete" === it . readyState || "loading" !== it . readyState && ! it . documentElement . doScroll ? t . setTimeout ( mt . ready ) : ( it . addEventListener ( "DOMContentLoaded" , d ) , t . addEventListener ( "load" , d ) ) ; var Ut = function ( t , e , i , n , o , s , a ) { var r = 0 , l = t . length , c = null == i ; if ( "object" === mt . type ( i ) ) { o = ! 0 ; for ( r in i ) Ut ( t , e , r , i [ r ] , ! 0 , s , a ) } else if ( void 0 !== n && ( o = ! 0 , mt . isFunction ( n ) || ( a = ! 0 ) , c && ( a ? ( e . call ( t , n ) , e = null ) : ( c = e , e = function ( t , e , i ) { return c . call ( mt ( 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 } , Dt = 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 = { } , Dt ( 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 [ mt . camelCase ( e ) ] = i ; else for ( n in e ) o [ mt . camelCase ( n ) ] = e [ n ] ; return o } , get : function ( t , e ) { return void 0 === e ? this . cache ( t ) : t [ this . expando ] && t [ this . expando ] [ mt . 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 ( mt . camelCase ) : ( e = mt . camelCase ( e ) , e = e in n ? [ e ] : e . match ( Et ) || [ ] ) , i = e . length ; for ( ; i -- ; ) delete n [ e [ i ] ] } ( void 0 === e || mt . 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 && ! mt . isEmptyObject ( e ) } } ; var Bt = new p , Lt = new p , Ft = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/ , Vt = /[A-Z]/g ; mt . extend ( { hasData : function ( t ) { return Lt . hasData ( t ) || Bt . hasData ( t ) } , data : function ( t , e , i ) { return Lt . access ( t , e , i ) } , removeData : function ( t , e ) { Lt . remove ( t , e ) } , _data : function ( t , e , i ) { return Bt . access ( t , e , i ) } , _removeData : function ( t , e ) { Bt . remove ( t , e ) } } ) , mt . 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 = Lt . get ( s ) , 1 === s . nodeType && ! Bt . get ( s , "hasDataAttrs" ) ) ) { for ( i = a . length ; i -- ; ) a [ i ] && ( n = a [ i ] . name , 0 === n . indexOf ( "data-" ) && ( n = mt . camelCase ( n . slice ( 5 ) ) , m ( s , n , o [ n ] ) ) ) ; Bt . set ( s , "hasDataAttrs" , ! 0 ) } return o } return "object" == typeof t ? this . each ( function ( ) { Lt . set ( this , t ) } ) : Ut ( this , function ( e ) { var i ; if ( s && void 0 === e ) { if ( void 0 !== ( i = Lt . get ( s , t ) ) ) return i ; if ( void 0 !== ( i = m ( s , t ) ) ) return i } else this . each ( function ( ) { Lt . set ( this , t , e ) } ) } , null , e , arguments . length > 1 , null , ! 0 ) } , removeData : function ( t ) { return this . each ( function ( ) { Lt . remove ( this , t ) } ) } } ) , mt . extend ( { queue : function ( t , e , i ) { var n ; if ( t ) return e = ( e || "fx" ) + "queue" , n = Bt . get ( t , e ) , i && ( ! n || Array . isArray ( i ) ? n = Bt . access ( t , e , mt . makeArray ( i ) ) : n . push ( i ) ) , n || [ ] } , dequeue : function ( t , e ) { e = e || "fx" ; var i = mt . queue ( t , e ) , n = i . length , o = i . shift ( ) , s = mt . _queueHooks ( t , e ) , a = function ( ) { mt . 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 Bt . get ( t , i ) || Bt . access ( t , i , { empty : mt . Callbacks ( "once memory" ) . add ( function ( ) { Bt . remove ( t , [ e + "queue" , i ] ) } ) } ) } } ) , mt . fn . extend ( { queue : function ( t , e ) { var i = 2 ; return "string" != typeof t && ( e = t , t = "fx" , i -- ) , arguments . length < i ? mt . queue ( this [ 0 ] , t ) : void 0 === e ? this : this . each ( function ( ) { var i = mt . queue ( this , t , e ) ; mt . _queueHooks ( this , t ) , "fx" === t && "inprogress" !== i [ 0 ] && mt . dequeue ( this , t ) } ) } , dequeue : function ( t ) { return this . each ( function ( ) { mt . dequeue ( this , t ) } ) } , clearQueue : function ( t ) { return this . queue ( t || "fx" , [ ] ) } , promise : function ( t , e ) { var i , n = 1 , o = mt . 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 = Bt . get ( s [ a ] , t + "queueHooks" ) ) && i . empty && ( n ++ , i . empty . add ( r ) ) ; return r ( ) , o . promise ( e ) } } ) ; var Rt = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ . source , Ot = new RegExp ( "^(?:([+-])=|)(" + Rt + ")([a-z%]*)$" , "i" ) , Nt = [ "Top" , "Right" , "Bottom" , "Left" ] , zt = function ( t , e ) { return t = e || t , "none" === t . style . display || "" === t . sty
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" : mt . parseXML } , flatOptions : { url : ! 0 , context : ! 0 } } , ajaxSetup : function ( t , e ) { return e ? J ( J ( t , mt . ajaxSettings ) , e ) : J ( mt . ajaxSettings , t ) } , ajaxPrefilter : X ( Ve ) , ajaxTransport : X ( Re ) , ajax : function ( e , i ) { function n ( e , i , n , r ) { var c , p , u , y , _ , x = i ; h || ( h = ! 0 , l && t . clearTimeout ( l ) , o = void 0 , a = r || "" , w . readyState = e > 0 ? 4 : 0 , c = e >= 200 && e < 300 || 304 === e , n && ( y = Q ( m , w , n ) ) , y = tt ( m , y , w , c ) , c ? ( m . ifModified && ( _ = w . getResponseHeader ( "Last-Modified" ) , _ && ( mt . lastModified [ s ] = _ ) , ( _ = w . getResponseHeader ( "etag" ) ) && ( mt . etag [ s ] = _ ) ) , 204 === e || "HEAD" === m . type ? x = "nocontent" : 304 === e ? x = "notmodified" : ( x = y . state , p = y . data , u = y . error , c = ! u ) ) : ( u = x , ! e && x || ( x = "error" , e < 0 && ( e = 0 ) ) ) , w . status = e , w . statusText = ( i || x ) + "" , c ? b . resolveWith ( g , [ p , x , w ] ) : b . rejectWith ( g , [ w , x , u ] ) , w . statusCode ( v ) , v = void 0 , d && f . trigger ( c ? "ajaxSuccess" : "ajaxError" , [ w , m , c ? p : u ] ) , C . fireWith ( g , [ w , x ] ) , d && ( f . trigger ( "ajaxComplete" , [ w , m ] ) , -- mt . active || mt . event . trigger ( "ajaxStop" ) ) ) } "object" == typeof e && ( i = e , e = void 0 ) , i = i || { } ; var o , s , a , r , l , c , h , d , p , u , m = mt . ajaxSetup ( { } , i ) , g = m . context || m , f = m . context && ( g . nodeType || g . jquery ) ? mt ( g ) : mt . event , b = mt . Deferred ( ) , C = mt . Callbacks ( "once memory" ) , v = m . statusCode || { } , y = { } , _ = { } , x = "canceled" , w = { readyState : 0 , getResponseHeader : function ( t ) { var e ; if ( h ) { if ( ! r ) for ( r = { } ; e = De . exec ( a ) ; ) r [ e [ 1 ] . toLowerCase ( ) ] = e [ 2 ] ; e = r [ t . toLowerCase ( ) ] } return null == e ? null : e } , getAllResponseHeaders : function ( ) { return h ? a : null } , setRequestHeader : function ( t , e ) { return null == h && ( t = _ [ t . toLowerCase ( ) ] = _ [ t . toLowerCase ( ) ] || t , y [ t ] = e ) , this } , overrideMimeType : function ( t ) { return null == h && ( m . mimeType = t ) , this } , statusCode : function ( t ) { var e ; if ( t ) if ( h ) w . always ( t [ w . status ] ) ; else for ( e in t ) v [ e ] = [ v [ e ] , t [ e ] ] ; return this } , abort : function ( t ) { var e = t || x ; return o && o . abort ( e ) , n ( 0 , e ) , this } } ; if ( b . promise ( w ) , m . url = ( ( e || m . url || we . href ) + "" ) . replace ( Fe , we . protocol + "//" ) , m . type = i . method || i . type || m . method || m . type , m . dataTypes = ( m . dataType || "*" ) . toLowerCase ( ) . match ( Et ) || [ "" ] , null == m . crossDomain ) { c = it . createElement ( "a" ) ; try { c . href = m . url , c . href = c . href , m . crossDomain = Ne . protocol + "//" + Ne . host != c . protocol + "//" + c . host } catch ( t ) { m . crossDomain = ! 0 } } if ( m . data && m . processData && "string" != typeof m . data && ( m . data = mt . param ( m . data , m . traditional ) ) , Z ( Ve , m , i , w ) , h ) return w ; d = mt . event && m . global , d && 0 == mt . active ++ && mt . event . trigger ( "ajaxStart" ) , m . type = m . type . toUpperCase ( ) , m . hasContent = ! Le . test ( m . type ) , s = m . url . replace ( Me , "" ) , m . hasContent ? m . data && m . processData && 0 === ( m . contentType || "" ) . indexOf ( "application/x-www-form-urlencoded" ) && ( m . data = m . data . replace ( Pe , "+" ) ) : ( u = m . url . slice ( s . length ) , m . data && ( s += ( Te . test ( s ) ? "&" : "?" ) + m . data , delete m . data ) , ! 1 === m . cache && ( s = s . replace ( Ue , "$1" ) , u = ( Te . test ( s ) ? "&" : "?" ) + "_=" + Se ++ + u ) , m . url = s + u ) , m . ifModified && ( mt . lastModified [ s ] && w . setRequestHeader ( "If-Modified-Since" , mt . lastModified [ s ] ) , mt . etag [ s ] && w . setRequestHeader ( "If-None-Match" , mt . etag [ s ] ) ) , ( m . data && m . hasContent && ! 1 !== m . contentType || i . contentType ) && w . setRequestHeader ( "Content-Type" , m . contentType ) , w . setRequestHeader ( "Accept" , m . dataTypes [ 0 ] && m . accepts [ m . dataTypes [ 0 ] ] ? m . accepts [ m . dataTypes [ 0 ] ] + ( "*" !== m . dataTypes [ 0 ] ? ", " + Oe + "; q=0.01" : "" ) : m . accepts [ "*" ] ) ; for ( p in m . headers ) w . setRequestHeader ( p , m . headers [ p ] ) ; if ( m . beforeSend && ( ! 1 === m . beforeSend . call ( g , w , m ) || h ) ) return w . abort ( ) ; if ( x = "abort" , C . add ( m . complete ) , w . done ( m . success ) , w . fail ( m . error ) , o = Z ( Re , m , i , w ) ) { if ( w . readyState = 1 , d && f . trigger ( "ajaxSend" , [ w , m ] ) , h ) return w ; m . async && m . timeout > 0 && ( l = t . setTimeout ( function ( ) { w . abort ( "timeout" ) } , m . timeout ) ) ; try { h = ! 1 , o . send ( y , n ) } catch ( t ) { if ( h ) throw t ; n ( - 1 , t ) } } else n ( - 1 , "No Transport" ) ; return w } , getJSON : function ( t , e , i ) { return mt . get ( t , e , i , "json" ) } , getScript : function ( t , e ) { return mt . get ( t , void 0 , e , "script" ) } } ) , mt . each ( [ "get" , "post" ] , function ( t , e ) { mt [ e ] = function ( t , i , n , o ) { return mt . isFunction ( i ) && ( o = o || n , n = i , i = void 0 ) , mt . ajax ( mt . extend ( { url : t , type : e , dataType : o , data : i , success : n } , mt . isPlainObject ( t ) && t ) ) } } ) , mt . _evalUrl = function ( t ) { return mt . ajax ( { url : t , type : "GET" , dataType : "script" , cache : ! 0 , async : ! 1 , global : ! 1
; 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 . preventDefault ( ) } } , i . prototype . cycle = function ( e ) { return e || ( this . paused = ! 1 ) , this . interval && clearInterval ( this . interval ) , this . options . interval && ! this . paused && ( this . interval = setInterval ( t . proxy ( this . next , this ) , this . options . interval ) ) , this } , i . prot
} ) , 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" ; var e = function ( ) { } ; if ( _ . extend ( e . prototype , t . Events ) , void 0 !== Common . NotificationCenter ) throw "Native Common.NotificationCenter instance already defined." ; e . extend = t . Model . extend , Common . NotificationCenter = new e } ) , function ( ) { var t = function ( t , e ) { for ( v
setTimeout ( function ( ) { r . $window . css ( { "-webkit-transition" : "0.2s opacity, 0.2s -webkit-transform" , "-webkit-transform" : "scale(1)" , "-moz-transition" : "0.2s opacity, 0.2s -moz-transform" , "-moz-transform" : "scale(1)" , "-ms-transition" : "0.2s opacity, 0.2s -ms-transform" , "-ms-transform" : "scale(1)" , "-o-transition" : "0.2s opacity, 0.2s -o-transform" , "-o-transform" : "scale(1)" , opacity : "1" } ) } , 1 ) , setTimeout ( function ( ) { r . $window . addClass ( "notransform" ) , r . fireEvent ( "show" , r ) } , this . initConfig . modal ? 1e3 : 350 ) ) : ( this . $window . css ( { opacity : 1 } ) , this . $window . addClass ( "notransform" ) , this . fireEvent ( "show" , this ) ) , Common . NotificationCenter . trigger ( "window:show" ) } , close : function ( e ) { if ( $ ( document ) . off ( "keydown." + this . cid ) , this . initConfig . header && this . $window . find ( ".header" ) . off ( "mousedown" , this . binding . dragStart ) , this . initConfig . modal ) { var i = t ( ) , o = ! 0 ; if ( i . attr ( "counter" , parseInt ( i . attr ( "counter" ) ) - 1 ) , this . $lastmodal . length > 0 && ( this . $lastmodal . removeClass ( "dethrone" ) , o = ! ( this . $lastmodal . hasClass ( "modal" ) && this . $lastmodal . is ( ":visible" ) ) ) , o ) if ( ! 1 !== this . options . animate ) { var s = i . css ( "opacity" ) ; i . css ( n ( 0 ) ) , setTimeout ( function ( ) { i . css ( "opacity" , s ) , parseInt ( i . attr ( "counter" ) ) < 1 && ( i . hide ( ) , i . attr ( "counter" , 0 ) ) } , 300 ) } else parseInt ( i . attr ( "counter" ) ) < 1 && ( i . hide ( ) , i . attr ( "counter" , 0 ) ) ; Common . NotificationCenter . trigger ( "modal:close" , this ) } this . $window . remove ( ) , ! 0 !== e && this . fireEvent ( "close" , this ) } , hide : function ( ) { if ( $ ( document ) . off ( "keydown." + this . cid ) , this . $window ) { if ( this . initConfig . modal ) { var e = t ( ) , i = ! 0 ; if ( e . attr ( "counter" , parseInt ( e . attr ( "counter" ) ) - 1 ) , this . $lastmodal . length > 0 && ( this . $lastmodal . removeClass ( "dethrone" ) , i = ! ( this . $lastmodal . hasClass ( "modal" ) && this . $lastmodal . is ( ":visible" ) ) ) , i ) if ( ! 1 !== this . options . animate ) { var o = e . css ( "opacity" ) ; e . css ( n ( 0 ) ) , setTimeout ( function ( ) { e . css ( "opacity" , o ) , parseInt ( e . attr ( "counter" ) ) < 1 && ( e . hide ( ) , e . attr ( "counter" , 0 ) ) } , 300 ) } else parseInt ( e . attr ( "counter" ) ) < 1 && ( e . hide ( ) , e . attr ( "counter" , 0 ) ) ; Common . NotificationCenter . trigger ( "modal:hide" , this ) } this . $window . hide ( ) , this . $window . removeClass ( "notransform" ) , this . fireEvent ( "hide" , this ) } } , isLocked : function ( ) { return this . $window . hasClass ( "dethrone" ) || ! this . options . modal && this . $window . parent ( ) . find ( ".asc-window.modal:visible" ) . length } , getChild : function ( t ) { return t ? this . $window . find ( t ) : this . $window } , setWidth : function ( t ) { if ( t >= 0 ) { var e = parseInt ( this . $window . css ( "min-width" ) ) ; t < e && ( t = e ) , t -= parseInt ( this . $window . css ( "border-left-width" ) ) + parseInt ( this . $window . css ( "border-right-width" ) ) , this . $window . width ( t ) } } , getWidth : function ( ) { return parseInt ( this . $window . css ( "width" ) ) } , setHeight : function ( t ) { if ( t >= 0 ) { var e = parseInt ( this . $window . css ( "min-height" ) ) ; t < e && ( t = e ) , t -= parseInt ( this . $window . css ( "border-bottom-width" ) ) + parseInt ( this . $window . css ( "border-top-width" ) ) , this . $window . height ( t ) , this . initConfig . header && ( t -= parseInt ( this . $window . find ( "> .header" ) . css ( "height" ) ) ) , this . $window . find ( "> .body" ) . css ( "height" , t ) } } , getHeight : function ( ) { return parseInt ( this . $window . css ( "height" ) ) } , setSize : function ( t , e ) { this . setWidth ( t ) , this . setHeight ( e ) } , getSize : function ( ) { return [ this . getWidth ( ) , this . getHeight ( ) ] } , setTitle : function ( t ) { this . $window . find ( "> .header > .title" ) . text ( t ) } , getTitle : function ( ) { return this . $window . find ( "> .header > .title" ) . text ( ) } , getLeft : function ( ) { return parseInt ( this . $window . css ( "left" ) ) } , getTop : function ( ) { return parseInt ( this . $window . css ( "top" ) ) } , isVisible : function ( ) { return this . $window && this . $window . is ( ":visible" ) } , setResizable : function ( t , e , i ) { if ( t !== this . resizable ) { if ( t ) { var n = '<div class="resize-border left" style="top:' + ( this . initConfig . header ? "33" : "5" ) + 'px; bottom: 5px; height: auto; border-right-style: solid; cursor: e-resize;"></div><div class="resize-border left bottom" style="border-bottom-left-radius: 5px; cursor: sw-resize;"></div><div class="resize-border bottom" style="left: 4px; right: 4px; width: auto; z-index: 2; border-top-style: solid; cursor: s-resize;"></div><div class="resize-border right bottom" style="border-bottom-right-radius: 5px; cursor: se-resize;"></div><div class="resize-border right" style="top:' + ( this . initConfig . header ? "33" : "5" ) + 'px; bottom: 5px; hei
e(/opera/)),a=s&&e(/version\/10\.5/),r=!s&&(e(/msie/)||e(/trident/)||e(/edge/)),l=r&&(e(/msie 7/)&&8!=o&&9!=o&&10!=o||7==o),c=r&&(e(/msie 8/)&&7!=o&&9!=o&&10!=o||8==o),h=r&&(e(/msie 9/)&&7!=o&&8!=o&&10!=o||9==o),d=r&&(e(/msie 10/)&&7!=o&&8!=o&&9!=o||10==o),p=r&&(e(/trident\/7\.0/)&&7!=o&&8!=o&&9!=o&&10!=o||11==o),u=r&&e(/msie 6/),m=!r&&e(/\bchrome\b/),g=!r&&e(/webkit/),f=!r&&!m&&e(/safari/),b=f&&e(/applewebkit\/4/),C=f&&e(/version\/3/),v=f&&e(/version\/4/),y=f&&e(/version\/5\.0/),_=f&&e(/version\/5/),x=!g&&!r&&e(/gecko/),w=x&&e(/rv:1\.9/),S=x&&e(/rv:2\.0/),T=x&&e(/rv:5\./),A=x&&e(/rv:10\./),k=w&&e(/rv:1\.9\.0/),I=w&&e(/rv:1\.9\.1/),E=w&&e(/rv:1\.9\.2/),P=e(/windows|win32/),M=e(/macintosh|mac os x/),U=e(/linux/),D=n(!0,/\bchrome\/(\d+\.\d+)/),B=n(!0,/\bfirefox\/(\d+\.\d+)/),L=n(r,/msie (\d+\.\d+)/),F=n(s,/version\/(\d+\.\d+)/),V=n(f,/version\/(\d+\.\d+)/),R=n(g,/webkit\/(\d+\.\d+)/),O=/^https/i.test(window.location.protocol),N=/^(mailto:)?([a-z0-9' \ . _ - ] + @ [ a - z0 - 9 \ . - ] + \ . [ a - z0 - 9 ] { 2 , 4 } ) ( [ a - яё0 - 9 \ . _ % + -= \ ? : & ] * ) / i , z = /^(((https?)|(ftps?)):\/\/)?([\-\wа -яё]*:?[\-\wа -яё]*@)?(((1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9][0-9]|[0-9])\.){3}(1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9][0-9]|[0-9]))(:\d+)?(\/[%\-\wа -яё]*(\.[\wа -яё]{2,})?(([\wа -яё\-\.\?\\\/+@&#;:`~=%!,\(\)]*)(\.[\wа -яё]{2,})?)*)*\/?/i , H = /^(((https?)|(ftps?)):\/\/)?([\-\wа -яё]*:?[\-\wа -яё]*@)?(([\-\wа -яё]+\.)+[\wа -яё\-]{2,}(:\d+)?(\/[%\-\wа -яё]*(\.[\wа -яё]{2,})?(([\wа -яё\-\.\?\\\/+@&#;:`'~=%!,\(\)]*)(\.[\wа -яё]{2,})?)*)*\/?)/i , G = /^(((https?)|(ftps?)):\/\/)([\-\wа -яё]*:?[\-\wа -яё]*@)?(([\-\wа -яё]+)(:\d+)?(\/[%\-\wа -яё]*(\.[\wа -яё]{2,})?(([\wа -яё\-\.\?\\\/+@&#;:`'~=%!,\(\)]*)(\.[\wа -яё]{2,})?)*)*\/?)/i , j = /(mailto:)?([a-z0-9'\._-]+@[a-z0-9\.-]+\.[a-z0-9]{2,4})([a-яё0-9\._%+-=\?:&]*)/gi , W = /(((https?)|(ftps?)):\/\/([\-\wа -яё]*:?[\-\wа -яё]*@)?)(((1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9][0-9]|[0-9])\.){3}(1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9][0-9]|[0-9]))(:\d+)?(\/[%\-\wа -яё]*(\.[\wа -яё]{2,})?(([\wа -яё\-\.\?\\\/+@&#;:`~=%!,\(\)]*)(\.[\wа -яё]{2,})?)*)*\/?/gi , q = /((((https?)|(ftps?)):\/\/([\-\wа -яё]*:?[\-\wа -яё]*@)?)|(([\-\wа -яё]*:?[\-\wа -яё]*@)?www\.))((([\-\wа -яё]+\.)+[\wа -яё\-]{2,}|([\-\wа -яё]+))(:\d+)?(\/[%\-\wа -яё]*(\.[\wа -яё]{2,})?(([\wа -яё\-\.\?\\\/+@&#;:`~=%!,\(\)]*)(\.[\wа -яё]{2,})?)*)*\/?)/gi , K = { Paragraph : 0 , Table : 1 , Image : 2 , Header : 3 , TextArt : 4 , Shape : 5 , Slide : 6 , Chart : 7 , MailMerge : 8 } , Y = /android|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i . test ( navigator . userAgent || navigator . vendor || window . opera ) , X = this , Z = function ( ) { if ( X . zoom = 1 , m && ! s && ! Y && document && document . firstElementChild && document . body ) if ( window . devicePixelRatio > . 1 ) { if ( window . devicePixelRatio < 1.99 ) { var t = 1 ; X . zoom = window . devicePixelRatio / t } else { var t = 2 ; X . zoom = window . devicePixelRatio / t } document . firstElementChild . style . zoom = 1 / X . zoom } else document . firstElementChild . style . zoom = "normal" ; X . innerWidth = window . innerWidth * X . zoom , X . innerHeight = window . innerHeight * X . zoom } ; return X . zoom = 1 , X . innerWidth = window . innerWidth , X . innerHeight = window . innerHeight , Z ( ) , $ ( window ) . on ( "resize" , Z ) , { userAgent : t , isStrict : i , isIEQuirks : r && ! i && ( u || l || c || h ) , isOpera : s , isOpera10 _5 : a , isWebKit : g , isChrome : m , isSafari : f , isSafari3 : C , isSafari4 : v , isSafari5 : _ , isSafari5 _0 : y , isSafari2 : b , isIE : r , isIE6 : u , isIE7 : l , isIE7m : u || l , isIE7p : r && ! u , isIE8 : c , isIE8m : u || l || c , isIE8p : r && ! ( u || l ) , isIE9 : h , isIE9m : u || l || c || h , isIE9p : r && ! ( u || l || c ) , isIE10 : d , isIE10m : u || l || c || h || d , isIE10p : r && ! ( u || l || c || h ) , isIE11 : p , isIE11m : u || l || c || h || d || p , isIE11p : r && ! ( u || l || c || h || d ) , isGecko : x , isGecko3 : w , isGecko4 : S , isGecko5 : T , isGecko10 : A , isFF3 _0 : k , isFF3 _5 : I , isFF3 _6 : E , isFF4 : 4 <= B && B < 5 , isFF5 : 5 <= B && B < 6 , isFF10 : 10 <= B && B < 11 , isLinux : U , isWindows : P , isMac : M , chromeVersion : D , firefoxVersion : B , ieVersion : L , operaVersion : F , safariVersion : V , webKitVersion : R , isSecure : O , emailRe : N , ipRe : z , hostnameRe : H , localRe : G , emailStrongRe : j , ipStrongRe : W , hostnameStron
$ ( this . el ) . append ( this . cmpEl ) ) ; var i = this . cmpEl . parent ( ) , n = "menu" === i . attr ( "role" ) ? i : i . find ( "[role=menu]" ) ; return n && ( e . rendered || _ . each ( e . items || [ ] , function ( t ) { n . append ( t . render ( ) . el ) , t . on ( "click" , _ . bind ( e . onItemClick , e ) ) , t . on ( "toggle" , _ . bind ( e . onItemToggle , e ) ) } ) , n . css ( { "max-height" : e . options . maxHeight || "none" , position : "fixed" , right : "auto" , left : - 1e3 , top : - 1e3 } ) , this . parentEl = n . parent ( ) , this . parentEl . on ( "show.bs.dropdown" , _ . bind ( e . onBeforeShowMenu , e ) ) , this . parentEl . on ( "shown.bs.dropdown" , _ . bind ( e . onAfterShowMenu , e ) ) , this . parentEl . on ( "hide.bs.dropdown" , _ . bind ( e . onBeforeHideMenu , e ) ) , this . parentEl . on ( "hidden.bs.dropdown" , _ . bind ( e . onAfterHideMenu , e ) ) , this . parentEl . on ( "keydown.after.bs.dropdown" , _ . bind ( e . onAfterKeydownMenu , e ) ) , n . on ( "scroll" , _ . bind ( e . onScroll , e ) ) , n . hover ( function ( t ) { e . isOver = ! 0 } , function ( t ) { e . isOver = ! 1 } ) ) , this . rendered = ! 0 , this . trigger ( "render:after" , this ) , this } , isVisible : function ( ) { return this . rendered && this . cmpEl . is ( ":visible" ) } , show : function ( ) { this . rendered && this . parentEl && ! this . parentEl . hasClass ( "open" ) && this . cmpEl . dropdown ( "toggle" ) } , hide : function ( ) { this . rendered && this . parentEl && ( this . parentEl . hasClass ( "open" ) ? this . cmpEl . dropdown ( "toggle" ) : this . parentEl . hasClass ( "over" ) && this . parentEl . removeClass ( "over" ) ) } , insertItem : function ( t , e ) { var i = this , n = this . cmpEl ; if ( e instanceof Common . UI . MenuItem || ( e = new Common . UI . MenuItem ( _ . extend ( { tagName : "li" , template : i . itemTemplate } , e ) ) ) , t < 0 || t >= i . items . length ? i . items . push ( e ) : i . items . splice ( t , 0 , e ) , this . rendered ) { var o = "menu" === n . attr ( "role" ) ? n : n . find ( "[role=menu]" ) ; o && ( t < 0 ? o . append ( e . render ( ) . el ) : 0 === t ? o . prepend ( e . render ( ) . el ) : $ ( "li:nth-child(" + ( t + 1 ) + ")" , o ) . before ( e . render ( ) . el ) , e . on ( "click" , _ . bind ( i . onItemClick , i ) ) , e . on ( "toggle" , _ . bind ( i . onItemToggle , i ) ) ) } } , doLayout : function ( ) { if ( this . options . maxHeight > 0 ) { if ( ! this . rendered ) return void ( this . mustLayout = ! 0 ) ; var t = this . cmpEl , e = "menu" === t . attr ( "role" ) ? t : t . find ( "[role=menu]" ) ; if ( ! e . is ( ":visible" ) ) { var i = [ e . css ( "left" ) , e . css ( "top" ) ] ; e . css ( { left : "-1000px" , top : "-1000px" , display : "block" } ) } var n = e . find ( "li" ) ; if ( n . height ( ) * n . length > this . options . maxHeight ) { var o = '<div class="menu-scroll top"></div>' ; e . prepend ( o ) , o = '<div class="menu-scroll bottom"></div>' , e . append ( o ) , e . css ( { "box-shadow" : "none" , "overflow-y" : "hidden" , "padding-top" : "18px" } ) , e . find ( "> li:last-of-type" ) . css ( "margin-bottom" , 18 ) ; var s = /Firefox/i . test ( navigator . userAgent ) ? "DOMMouseScroll" : "mousewheel" ; ! function ( t , e , i ) { t . addEventListener ? t . addEventListener ( e , i , ! 1 ) : t . attachEvent ( "on" + e , i ) } ( e [ 0 ] , s , _ . bind ( this . onMouseWheel , this ) ) , e . find ( ".menu-scroll" ) . on ( "click" , _ . bind ( this . onScrollClick , this ) ) } i && e . css ( { display : "" , left : i [ 0 ] , top : i [ 1 ] } ) } } , addItem : function ( t ) { this . insertItem ( - 1 , t ) } , removeItem : function ( t ) { var e = this , i = e . items . indexOf ( t ) ; i > - 1 && ( e . items . splice ( i , 1 ) , t . off ( "click" ) . off ( "toggle" ) , t . remove ( ) ) } , removeItems : function ( t , e ) { if ( ! ( t > this . items . length - 1 ) ) { t + e > this . items . length && ( e = this . items . length - t ) ; for ( var i = t ; i < t + e ; i ++ ) this . items [ i ] . off ( "click" ) . off ( "toggle" ) , this . items [ i ] . remove ( ) ; this . items . splice ( t , e ) } } , removeAll : function ( ) { var t = this ; _ . each ( t . items , function ( t ) { t . off ( "click" ) . off ( "toggle" ) , t . remove ( ) } ) , this . rendered && this . cmpEl . find ( ".menu-scroll" ) . off ( "click" ) . remove ( ) , t . items = [ ] } , onBeforeShowMenu : function ( t ) { Common . NotificationCenter . trigger ( "menu:show" ) , this . mustLayout && ( delete this . mustLayout , this . doLayout . call ( this ) ) , this . trigger ( "show:before" , this , t ) , this . alignPosition ( ) } , onAfterShowMenu : function ( t ) { if ( this . trigger ( "show:after" , this , t ) , this . $el . find ( "> ul > .menu-scroll" ) . length ) { var e = this . $el . find ( "li .checked" ) [ 0 ] ; if ( e ) { var i = e . offsetTop - this . options . maxHeight / 2 ; this . scrollMenu ( i < 0 ? 0 : i ) } } } , onBeforeHideMenu : function ( t ) { this . trigger ( "hide:before" , this , t ) , Common . UI . Scroller . isMouseCapture ( ) && t . preventDefault ( ) } , onAfterHideMenu : function ( t , e ) { this . trigger ( "hide:after" , this , t , e ) , Common . NotificationCenter . trigger ( "menu:hide" , this , e ) } , onAfterKeydownMenu : function ( t ) { if ( t . keyCode == Common . UI . Keys . RETURN ) { var e = $ ( t . target ) . closest ( "li" ) ; if ( e . length <= 0 && ( e = $ ( t . target ) . parent ( ) . find ( "li .dataview" ) ) , e . length > 0 && e . click ( ) , e . hasClass ( "dropdown-submenu" ) || Common . UI . Menu . Manager . hideAl
this . template = [ '<div class="box" style="height: 270px;">' , '<div class="input-row">' , '<label style="font-weight: bold;">' + this . textLinkType + "</label>" , "</div>" , '<div id="id-dlg-hyperlink-type" class="input-row" style="margin-bottom: 5px;"></div>' , '<div id="id-external-link">' , '<div class="input-row">' , '<label style="font-weight: bold;">' + this . strLinkTo + " *</label>" , "</div>" , '<div id="id-dlg-hyperlink-url" class="input-row" style="margin-bottom: 5px;"></div>' , "</div>" , '<div id="id-internal-link" class="hidden" style="margin-top: 15px;">' , '<div id="id-dlg-hyperlink-radio-next" style="display: block;margin-bottom: 5px;"></div>' , '<div id="id-dlg-hyperlink-radio-prev" style="display: block;margin-bottom: 5px;"></div>' , '<div id="id-dlg-hyperlink-radio-first" style="display: block;margin-bottom: 5px;"></div>' , '<div id="id-dlg-hyperlink-radio-last" style="display: block;margin-bottom: 5px;"></div>' , '<div id="id-dlg-hyperlink-radio-slide" style="display: inline-block;margin-bottom: 5px;margin-right: 10px;"></div>' , '<div id="id-dlg-hyperlink-slide" style="display: inline-block;margin-bottom: 10px;"></div>' , "</div>" , '<div class="input-row">' , '<label style="font-weight: bold;">' + this . strDisplay + "</label>" , "</div>" , '<div id="id-dlg-hyperlink-display" class="input-row" style="margin-bottom: 5px;"></div>' , '<div class="input-row">' , '<label style="font-weight: bold;">' + this . textTipText + "</label>" , "</div>" , '<div id="id-dlg-hyperlink-tip" class="input-row" 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 . slides = this . options . slides , this . api = this . options . api , 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 . _arrTypeSrc = [ { displayValue : t . textInternalLink , value : c _oHyperlinkType . InternalLink } , { displayValue : t . textExternalLink , value : c _oHyperlinkType . WebLink } ] , t . cmbLinkType = new Common . UI . ComboBox ( { el : $ ( "#id-dlg-hyperlink-type" ) , cls : "input-group-nr" , style : "width: 100%;" , menuStyle : "min-width: 318px;" , editable : ! 1 , data : this . _arrTypeSrc } ) , t . cmbLinkType . setValue ( t . _arrTypeSrc [ 1 ] . value ) , t . cmbLinkType . on ( "selected" , _ . bind ( function ( t , e ) { this . ShowHideElem ( e . value ) } , t ) ) , t . inputUrl = new Common . UI . InputField ( { el : $ ( "#id-dlg-hyperlink-url" ) , allowBlank : ! 1 , blankError : t . txtEmpty , validateOnBlur : ! 1 , style : "width: 100%;" , validation : function ( e ) { var i = t . api . asc _getUrlType ( $ . trim ( e ) ) ; return t . isEmail = 2 == i , i > 0 || t . txtNotUrl } } ) , t . inputDisplay = new Common . UI . InputField ( { el : $ ( "#id-dlg-hyperlink-display" ) , allowBlank : ! 0 , validateOnBlur : ! 1 , style : "width: 100%;" } ) . on ( "changed:after" , function ( ) { t . isTextChanged = ! 0 } ) , t . inputTip = new Common . UI . InputField ( { el : $ ( "#id-dlg-hyperlink-tip" ) , style : "width: 100%;" , maxLength : Asc . c _oAscMaxTooltipLength } ) , t . radioNext = new Common . UI . RadioBox ( { el : $ ( "#id-dlg-hyperlink-radio-next" ) , labelText : this . txtNext , name : "asc-radio-slide" , checked : ! 0 } ) , t . radioPrev = new Common . UI . RadioBox ( { el : $ ( "#id-dlg-hyperlink-radio-prev" ) , labelText : this . txtPrev , name : "asc-radio-slide" } ) , t . radioFirst = new Common . UI . RadioBox ( { el : $ ( "#id-dlg-hyperlink-radio-first" ) , labelText : this . txtFirst , name : "asc-radio-slide" } ) , t . radioLast = new Common . UI . RadioBox ( { el : $ ( "#id-dlg-hyperlink-radio-last" ) , labelText : this . txtLast , name : "asc-radio-slide" } ) , t . radioSlide = new Common . UI . RadioBox ( { el : $ ( "#id-dlg-hyperlink-radio-slide" ) , labelText : this . txtSlide , name : "asc-radio-slide" } ) , t . cmbSlides = new Common . UI . ComboBox ( { el : $ ( "#id-dlg-hyperlink-slide" ) , cls : "input-group-nr" , style : "width: 50px;" , menuStyle : "min-width: 50px; max-height: 200px;" , editable : ! 1 , data : this . slides } ) , t . cmbSlides . setValue ( 0 ) , t . cmbSlides . on ( "selected" , _ . bind ( function ( e , i ) { t . radioSlide . setValue ( ! 0 ) } , t ) ) , e . find ( ".dlg-btn" ) . on ( "click" , _ . bind ( this . onBtnClick , this ) ) , e . find ( "input" ) . on ( "keypress" , _ . bind ( this . onKeyPress , this ) ) , t . externalPanel = e . find ( "
this.enableKeyEvents&&this.parentMenu&&this.handleSelect&&(e.showLast||this.parentMenu.on(" show : before ",function(t){e.deselectAll()}),this.parentMenu.on(" show : after ",function(t){e.showLast&&e.showLastSelected(),Common.NotificationCenter.trigger(" dataview : focus "),_.delay(function(){t.cmpEl.find(" . dataview ").focus()},10)}).on(" hide : after ",function(){Common.NotificationCenter.trigger(" dataview : blur ")}))),_.isUndefined(this.scroller)&&this.allowScrollbar&&(this.scroller=new Common.UI.Scroller({el:$(this.el).find(" . inner ").addBack().filter(" . inner "),useKeyboard:this.enableKeyEvents&&!this.handleSelect,minScrollbarLength:40,wheelSpeed:10}));var i=this.cmpEl.closest(" . asc - window ");return i.length>0&&(this.tipZIndex=parseInt(i.css(" z - index "))+10),this.rendered=!0,this.cmpEl.on(" click ",function(t){if(/dataview/.test(t.target.className))return!1}),this.trigger(" render : after ",this),this},setStore:function(t){t&&(this.stopListening(this.store),this.store=t,this.listenStoreEvents&&(this.listenTo(this.store," add ",this.onAddItem),this.listenTo(this.store," reset ",this.onResetItems)))},selectRecord:function(t,e){this.handleSelect&&(e&&this.suspendEvents(),this.multiSelect?t&&t.set({selected:!t.get(" selected ")}):(_.each(this.store.where({selected:!0}),function(t){t.set({selected:!1})}),t&&t.set({selected:!0})),e&&this.resumeEvents())},selectByIndex:function(t,e){this.store.length>0&&t>-1&&t<this.store.length&&this.selectRecord(this.store.at(t),e)},deselectAll:function(t){t&&this.suspendEvents(),_.each(this.store.where({selected:!0}),function(t){t.set({selected:!1})}),t&&this.resumeEvents()},getSelectedRec:function(){if(this.multiSelect){var t=[];return _.each(this.store.where({selected:!0}),function(e){t.push(e)}),t}return this.store.where({selected:!0})},onAddItem:function(t,e,i){var n=new Common.UI.DataViewItem({template:this.itemTemplate,model:t});if(n){var o=$(this.el).find(" . inner ").addBack().filter(" . inner ");if(this.groups&&this.groups.length>0){var s=this.groups.findWhere({id:t.get(" group ")});s&&(o=o.find(" # "+s.id+" . group - items - container "))}if(o){if(i&&0==i.at?o.prepend(n.render().el):o.append(n.render().el),o.find(" . empty - text ").remove(),this.dataViewItems.push(n),t.get(" tip ")){var a=$(n.el);a.attr(" data - toggle "," tooltip "),a.tooltip({title:t.get(" tip "),placement:" cursor ",zIndex:this.tipZIndex})}this.listenTo(n," change ",this.onChangeItem),this.listenTo(n," remove ",this.onRemoveItem),this.listenTo(n," click ",this.onClickItem),this.listenTo(n," dblclick ",this.onDblClickItem),this.listenTo(n," select ",this.onSelectItem),this.listenTo(n," contextmenu ",this.onContextMenuItem),this.isSuspendEvents||this.trigger(" item : add ",this,n,t)}}},onResetItems:function(){_.each(this.dataViewItems,function(t){var e=t.$el.data(" bs . tooltip ");e&&e.tip().remove()},this),$(this.el).html(this.template({groups:this.groups?this.groups.toJSON():null,style:this.style})),_.isUndefined(this.scroller)||(this.scroller.destroy(),delete this.scroller),this.store.length<1&&this.emptyText.length>0&&$(this.el).find(" . inner ").addBack().filter(" . inner ").append('<table cellpadding=" 10 " class=" empty - text "><tr><td>'+this.emptyText+" < / t d > < / t r > < / t a b l e > " ) , _ . e a c h ( t h i s . d a t a V i e w I t e m s , f u n c t i o n ( t ) { t h i s . s t o p L i s t e n i n g ( t ) , t . s t o p L i s t e n i n g ( t . m o d e l ) } , t h i s ) , t h i s . d a t a V i e w I t e m s = [ ] , t h i s . s t o r e . e a c h ( t h i s . o n A d d I t e m , t h i s ) , t h i s . a l l o w S c r o l l b a r & & ( t h i s . s c r o l l e r = n e w C o m m o n . U I . S c r o l l e r ( { e l : $ ( t h i s . e l ) . f i n d ( " . i n n e r " ) . a d d B a c k ( ) . f i l t e r ( " . i n n e r " ) , u s e K e y b o a r d : t h i s . e n a b l e K e y E v e n t s & & ! t h i s . h a n d l e S e l e c t , m i n S c r o l l b a r L e n g t h : 4 0 , w h e e l S p e e d : 1 0 } ) ) , t h i s . a t t a c h K e y E v e n t s ( ) , t h i s . l a s t S e l e c t e d R e c = n u l l , t h i s . _ l a y o u t P a r a m s = v o i d 0 } , o n C h a n g e I t e m : f u n c t i o n ( t , e ) { t h i s . i s S u s p e n d E v e n t s | | t h i s . t r i g g e r ( " i t e m : c h a n g e " , t h i s , t , e ) } , o n R e m o v e I t e m : f u n c t i o n ( t , e ) { i f ( t h i s . s t o p L i s t e n i n g ( t ) , t . s t o p L i s t e n i n g ( ) , t h i s . s t o r e . l e n g t h < 1 & & t h i s . e m p t y T e x t . l e n g t h > 0 ) { v a r i = $ ( t h i s . e l ) . f i n d ( " . i n n e r " ) . a d d B a c k ( ) . f i l t e r ( " . i n n e r " ) ; i . f i n d ( " . e m p t y - t e x t " ) . l e n g t h < = 0 & & i . a p p e n d ( ' < t a b l e c e l l p a d d i n g = " 1 0 " c l a s s = " e m p t y - t e x t " > < t r > < t d > ' + t h i s . e m p t y T e x t + " < / t d > < / t r > < / t a b l e > " ) } f o r ( v a r n = 0 ; n < t h i s . d a t a V i e w I t e m s . l e n g t h ; n + + ) i f ( _ . i s E q u a l ( t , t h i s . d a t a V i e w I t e m s [ n ] ) ) { t h i s . d a t a V i e w I t e m s . s p l i c e ( n , 1 )
return '<div id="id-adv-shape-width" class="settings-panel active">\r\n <div class="inner-content">\r\n <table cols="3">\r\n <tr>\r\n <td width="108px">\r\n <label class="input-label"><%= scope.textWidth %></label>\r\n <div id="shape-advanced-spin-width"></div>\r\n </td>\r\n <td width="28px" style="vertical-align: bottom;">\r\n <div id="shape-advanced-button-ratio"></div>\r\n </td>\r\n <td width="108px">\r\n <label class="input-label"><%= scope.textHeight %></label>\r\n <div id="shape-advanced-spin-height"></div>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n</div>\r\n<div id="id-adv-shape-shape" class="settings-panel">\r\n <div class="inner-content">\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.textLineStyle %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-large" width="125px">\r\n <label class="input-label"><%= scope.textCapType %></label>\r\n <div id="shape-advanced-cap-type" style="width: 100px;"></div>\r\n </td>\r\n <td class="padding-large">\r\n <label class="input-label"><%= scope.textJoinType %></label>\r\n <div id="shape-advanced-join-type" style="width: 100px;"></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="2" style="width: 100%;">\r\n <tr>\r\n <td colspan=2 class="padding-small">\r\n <label class="header"><%= scope.textArrows %></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.textBeginStyle %></label>\r\n <div id="shape-advanced-begin-style" style="width: 100px;"></div>\r\n </td>\r\n <td class="padding-small">\r\n <label class="input-label"><%= scope.textEndStyle %></label>\r\n <div id="shape-advanced-end-style" style="width: 100px;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <label class="input-label"><%= scope.textBeginSize %></label>\r\n <div id="shape-advanced-begin-size" style="width: 100px;"></div>\r\n </td>\r\n <td class="padding-small">\r\n <label class="input-label"><%= scope.textEndSize %></label>\r\n <div id="shape-advanced-end-size" style="width: 100px;"></div>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n</div>\r\n<div id="id-adv-shape-margins" class="settings-panel">\r\n <div class="inner-content">\r\n <table cols="2" style="width: 100%;">\r\n <tr>\r\n <td class="padding-small" width="125px">\r\n <label class="input-label"><%= scope.textTop %></label>\r\n <div id="shape-margin-top"></div>\r\n </td>\r\n <td class="padding-small">\r\n <label class="input-label"><%= scope.textLeft %></label>\r\n <div id="shape-margin-left"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <label class="input-label"><%= scope.textBottom %></label>\r\n <div id="shape-margin-bottom"></div>\r\n </td>\r\n <td class="padding-small">\r\n <label clas
this._changedProps.get_DefaultMargins().put_Bottom(null!==this.TableMargins.Bottom?Common.Utils.Metric.fnRecalcToMM(this.TableMargins.Bottom):null),this.TableMargins.isChanged=!0)},this)),this.spinners.push(this.spnTableMarginBottom),this.spnTableMarginLeft=new Common.UI.MetricSpinner({el:$("#tableadv-number-margin-table-left"),step:.1,width:85,defaultUnit:"cm",value:"0.19 cm",maxValue:9.34,minValue:0}),this.spnTableMarginLeft.on("change",_.bind(function(t,e,i,n){this._marginsChange(t,e,i,n,"table","Left"),this._changedProps&&(void 0===this._changedProps.get_DefaultMargins()&&this._changedProps.put_DefaultMargins(new Asc.asc_CPaddings),this._changedProps.get_DefaultMargins().put_Left(null!==this.TableMargins.Left?Common.Utils.Metric.fnRecalcToMM(this.TableMargins.Left):null),this.TableMargins.isChanged=!0)},this)),this.spinners.push(this.spnTableMarginLeft),this.spnTableMarginRight=new Common.UI.MetricSpinner({el:$("#tableadv-number-margin-table-right"),step:.1,width:85,defaultUnit:"cm",value:"0.19 cm",maxValue:9.34,minValue:0}),this.spnTableMarginRight.on("change",_.bind(function(t,e,i,n){this._marginsChange(t,e,i,n,"table","Right"),this._changedProps&&(void 0===this._changedProps.get_DefaultMargins()&&this._changedProps.put_DefaultMargins(new Asc.asc_CPaddings),this._changedProps.get_DefaultMargins().put_Right(null!==this.TableMargins.Right?Common.Utils.Metric.fnRecalcToMM(this.TableMargins.Right):null),this.TableMargins.isChanged=!0)},this)),this.spinners.push(this.spnTableMarginRight);var e=function(){"indeterminate"==t.CellMargins.Flag?t._changedProps.get_CellMargins().put_Flag(1):"checked"==t.CellMargins.Flag?t._changedProps.get_CellMargins().put_Flag(0):t._changedProps.get_CellMargins().put_Flag(2)};this.chCellMargins=new Common.UI.CheckBox({el:$("#tableadv-checkbox-margins"),value:!0,labelText:this.textCheckMargins}),this.chCellMargins.on("change",_.bind(function(t,i,n,o){"checked"==n&&this._originalProps&&1==this._originalProps.get_CellMargins().get_Flag()&&t.setValue("indeterminate",!0),this.fillMargins.call(this,t.getValue()),this.CellMargins.Flag=t.getValue(),this._changedProps&&(void 0===this._changedProps.get_CellMargins()&&this._changedProps.put_CellMargins(new Asc.CMargins),this._changedProps.get_CellMargins().put_Left(null!==this.CellMargins.Left?Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Left):null),this._changedProps.get_CellMargins().put_Top(null!==this.CellMargins.Top?Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top):null),this._changedProps.get_CellMargins().put_Bottom(null!==this.CellMargins.Bottom?Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom):null),this._changedProps.get_CellMargins().put_Right(null!==this.CellMargins.Right?Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Right):null),e())},this)),this.spnMarginTop=new Common.UI.MetricSpinner({el:$("#tableadv-number-margin-top"),step:.1,width:85,defaultUnit:"cm",value:"0 cm",maxValue:55.87,minValue:0}),this.spnMarginTop.on("change",_.bind(function(t,i,n,o){this._marginsChange(t,i,n,o,"cell","Top"),this._changedProps&&(void 0===this._changedProps.get_CellMargins()&&this._changedProps.put_CellMargins(new Asc.CMargins),this._changedProps.get_CellMargins().put_Top(null!==this.CellMargins.Top?Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top):null),e())},this)),this.spinners.push(this.spnMarginTop),this.spnMarginBottom=new Common.UI.MetricSpinner({el:$("#tableadv-number-margin-bottom"),step:.1,width:85,defaultUnit:"cm",value:"0 cm",maxValue:55.87,minValue:0}),this.spnMarginBottom.on("change",_.bind(function(t,i,n,o){this._marginsChange(t,i,n,o,"cell","Bottom"),this._changedProps&&(void 0===this._changedProps.get_CellMargins()&&this._changedProps.put_CellMargins(new Asc.CMargins),this._changedProps.get_CellMargins().put_Bottom(null!==this.CellMargins.Bottom?Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom):null),e())},this)),this.spinners.push(this.spnMarginBottom),this.spnMarginLeft=new Common.UI.MetricSpinner({el:$("#tableadv-number-margin-left"),step:.1,width:85,defaultUnit:"cm",value:"0.19 cm",maxValue:9.34,minV
checked:n.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Bottom,equationProps:{type:e,callback:"put_Align",value:Asc.c_oAscMathInterfaceEqArrayAlign.Bottom}}]})}),o.push(t);break;case Asc.c_oAscMathInterfaceType.LargeOperator:t=new Common.UI.MenuItem({caption:i.txtLimitChange,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_LimitLocation",value:n.get_LimitLocation()==Asc.c_oAscMathInterfaceNaryLimitLocation.UndOvr?Asc.c_oAscMathInterfaceNaryLimitLocation.SubSup:Asc.c_oAscMathInterfaceNaryLimitLocation.UndOvr}}),o.push(t),void 0!==n.get_HideUpper()&&(t=new Common.UI.MenuItem({caption:n.get_HideUpper()?i.txtShowTopLimit:i.txtHideTopLimit,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_HideUpper",value:!n.get_HideUpper()}}),o.push(t)),void 0!==n.get_HideLower()&&(t=new Common.UI.MenuItem({caption:n.get_HideLower()?i.txtShowBottomLimit:i.txtHideBottomLimit,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_HideLower",value:!n.get_HideLower()}}),o.push(t));break;case Asc.c_oAscMathInterfaceType.Delimiter:t=new Common.UI.MenuItem({caption:i.txtInsertArgBefore,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"insert_DelimiterArgument",value:!0}}),o.push(t),t=new Common.UI.MenuItem({caption:i.txtInsertArgAfter,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"insert_DelimiterArgument",value:!1}}),o.push(t),n.can_DeleteArgument()&&(t=new Common.UI.MenuItem({caption:i.txtDeleteArg,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"delete_DelimiterArgument"}}),o.push(t)),t=new Common.UI.MenuItem({caption:n.has_Separators()?i.txtDeleteCharsAndSeparators:i.txtDeleteChars,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"remove_DelimiterCharacters"}}),o.push(t),t=new Common.UI.MenuItem({caption:n.get_HideOpeningBracket()?i.txtShowOpenBracket:i.txtHideOpenBracket,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_HideOpeningBracket",value:!n.get_HideOpeningBracket()}}),o.push(t),t=new Common.UI.MenuItem({caption:n.get_HideClosingBracket()?i.txtShowCloseBracket:i.txtHideCloseBracket,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_HideClosingBracket",value:!n.get_HideClosingBracket()}}),o.push(t),t=new Common.UI.MenuItem({caption:i.txtStretchBrackets,equation:!0,disabled:i._currentParaObjDisabled,checkable:!0,checked:n.get_StretchBrackets(),equationProps:{type:e,callback:"put_StretchBrackets",value:!n.get_StretchBrackets()}}),o.push(t),t=new Common.UI.MenuItem({caption:i.txtMatchBrackets,equation:!0,disabled:!n.get_StretchBrackets()||i._currentParaObjDisabled,checkable:!0,checked:n.get_StretchBrackets()&&n.get_MatchBrackets(),equationProps:{type:e,callback:"put_MatchBrackets",value:!n.get_MatchBrackets()}}),o.push(t);break;case Asc.c_oAscMathInterfaceType.GroupChar:n.can_ChangePos()&&(t=new Common.UI.MenuItem({caption:n.get_Pos()==Asc.c_oAscMathInterfaceGroupCharPos.Top?i.txtGroupCharUnder:i.txtGroupCharOver,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_Pos",value:n.get_Pos()==Asc.c_oAscMathInterfaceGroupCharPos.Top?Asc.c_oAscMathInterfaceGroupCharPos.Bottom:Asc.c_oAscMathInterfaceGroupCharPos.Top}}),o.push(t),t=new Common.UI.MenuItem({caption:i.txtDeleteGroupChar,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_Pos",value:Asc.c_oAscMathInterfaceGroupCharPos.None}}),o.push(t));break;case Asc.c_oAscMathInterfaceType.Radical:void 0!==n.get_HideDegree()&&(t=new Common.UI.MenuItem({caption:n.get_HideDegree()?i.txtShowDegree:i.txtHideDegree,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_HideDegree",value:!n.get_HideDegree()}}),o.push(t)),t=new Common.UI.MenuItem({caption:i.txtDeleteRadical,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"remove_Radical"}}),o.push(t)}return n.can_IncreaseArgumentSize()&&(t=new Common.UI.MenuItem
i.menuSpellPara.setVisible(void 0!==t.spellProps&&!1===t.spellProps.value.get_Checked()),v.setVisible(void 0!==t.spellProps&&!1===t.spellProps.value.get_Checked()),f.setVisible(void 0!==t.spellProps&&!1===t.spellProps.value.get_Checked()),b.setVisible(void 0!==t.spellProps&&!1===t.spellProps.value.get_Checked()),i.langParaMenu.setVisible(void 0!==t.spellProps&&!1===t.spellProps.value.get_Checked()),i.langParaMenu.setDisabled(s),C.setVisible(void 0!==t.spellProps&&!1===t.spellProps.value.get_Checked()),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(!0):(i.menuSpellPara.setCaption(i.loadSpellText,!0),i.clearWordVariants(!0),i.menuSpellMorePara.setVisible(!1)),i.langParaMenu.isVisible()&&i._currLang.id!==i._currLang.paraid&&(i.changeLanguageMenu(i.langParaMenu.menu),i._currLang.paraid=i._currLang.id);var h=0;a?h=i.addEquationMenu(!0,11):i.clearEquationMenu(!0,11),nt.setVisible(a&&h>0)},items:[i.menuSpellPara,i.menuSpellMorePara,v,f,b,i.langParaMenu,C,X,K,Y,nt,{caption:"--"},O,z,w,S,$,T,I]}).on("hide:after",function(t,e,n){if(i.suppressEditComplete)return void(i.suppressEditComplete=!1);n||i.fireEvent("editcomplete",i),i.currentMenu=null}),i.tableMenu=new Common.UI.Menu({initMenu:function(t){if(!e.isUndefined(t.tableProps)){for(var n=t.mathProps&&t.mathProps.value,o=6;o<16;o++)i.tableMenu.items[o].setVisible(!n);var s=void 0!==t.slideProps&&t.slideProps.locked;i.menuTableCellTop.setChecked(t.tableProps.value.get_CellsVAlign()==Asc.c_oAscVertAlignJc.Top),i.menuTableCellCenter.setChecked(t.tableProps.value.get_CellsVAlign()==Asc.c_oAscVertAlignJc.Center),i.menuTableCellBottom.setChecked(t.tableProps.value.get_CellsVAlign()==Asc.c_oAscVertAlignJc.Bottom),i.api&&(c.setDisabled(t.tableProps.locked||s||!i.api.CheckBeforeMergeCells()),h.setDisabled(t.tableProps.locked||s||!i.api.CheckBeforeSplitCells())),i.tableMenu.items[7].setDisabled(t.tableProps.locked||s),i.tableMenu.items[8].setDisabled(t.tableProps.locked||s),d.setDisabled(t.tableProps.locked||s),y.setDisabled(t.tableProps.locked||s),it.setDisabled(t.tableProps.locked||s),et.setDisabled(t.tableProps.locked||s);var a=null;i.api&&(a=i.api.can_AddHyperlink()),E.setVisible(!e.isUndefined(t.paraProps)&&e.isUndefined(t.hyperProps)&&!1!==a),U.setVisible(!e.isUndefined(t.paraProps)&&!e.isUndefined(t.hyperProps)),P.hyperProps=t.hyperProps,!1!==a&&(E.hyperProps={},E.hyperProps.value=new Asc.CHyperlinkProperty,E.hyperProps.value.put_Text(a)),e.isUndefined(t.paraProps)||(E.setDisabled(t.paraProps.locked||s),U.setDisabled(t.paraProps.locked||s),i._currentParaObjDisabled=t.paraProps.locked||s),j.setVisible(!1!==i.api.can_AddQuotedComment()&&i.mode.canCoAuthoring&&i.mode.canComments),j.setDisabled(!e.isUndefined(t.paraProps)&&t.paraProps.locked||s),D.setVisible(E.isVisible()||U.isVisible()||j.isVisible()),i.menuSpellCheckTable.setVisible(void 0!==t.spellProps&&!1===t.spellProps.value.get_Checked()),g.setVisible(void 0!==t.spellProps&&!1===t.spellProps.value.get_Checked()),i.langTableMenu.setDisabled(s),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 r=0;n?(r=i.addEquationMenu(!1,6),D.setVisible(D.isVisible()&&r>0)):i.clearEquationMenu(!1,6)}},items:[i.menuSpellCheckTable,g,it,tt,et,{caption:"--"},new Common.UI.MenuItem({caption:i.selectText,menu:new Common.UI.Menu({menuAlign:"tl-tr",items:[new Common.UI.MenuItem({caption:i.rowText}).on("click",function(){i.api&&i.api.selectRow()}),new Common.UI.MenuItem({caption:i.columnText}).on("click",function(){i.api&&i.api.selectColumn()}),new Common.UI.MenuItem({caption:i.cellText}).on("click",function(){i.api&&i.api.selectCell()}),new Common.UI.MenuIte
return' < div class = "toolbar" style = "<%= isCompactView ? \'height: 41px;\' : \'height: 67px;\' %>" > \ n \ x3c ! -- -- -- -- -- -- -- -- -- -- -- \ x3e \ n \ x3c ! -- Short view toolbar -- \ x3e \ n \ x3c ! -- -- -- -- -- -- -- -- -- -- -- \ x3e \ n < div id = "id-toolbar-short" style = "<%= isCompactView ? \'display: table;\' : \'display: none;\' %> width: 100%;" > \ n < div class = "toolbar-group" > \ n < div class = "toolbar-row" > \ n < span class = "btn-placeholder split" id = "id-toolbar-short-placeholder-btn-addslide" > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - p r e v i e w " > < / s p a n > \ n < / d i v > \ n < / d i v > \ n < d i v c l a s s = " s e p a r a t o r s h o r t " > < / d i v > \ n < d i v c l a s s = " t o o l b a r - g r o u p n o - m a s k " > \ n < d i v c l a s s = " t o o l b a r - r o w " > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - p r i n t " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - s a v e " > < / s p a n > \ n < / d i v > \ n < / d i v > \ n < d i v c l a s s = " s e p a r a t o r s h o r t " > < / d i v > \ n < d i v c l a s s = " t o o l b a r - g r o u p " > \ n < d i v c l a s s = " t o o l b a r - r o w " > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - u n d o " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - r e d o " > < / s p a n > \ n < / d i v > \ n < / d i v > \ n < d i v c l a s s = " s e p a r a t o r s h o r t " > < / d i v > \ n < d i v c l a s s = " t o o l b a r - g r o u p " > \ n < d i v c l a s s = " t o o l b a r - r o w " s t y l e = " w i d t h : 1 4 0 p x ; m a r g i n - t o p : - 1 p x ; " > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r " s t y l e = " f l o a t : l e f t ; w i d t h : 9 0 p x ; " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - f i e l d - f o n t n a m e " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r " s t y l e = " f l o a t : l e f t ; w i d t h : 4 5 p x ; m a r g i n - l e f t : 2 p x ; " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - f i e l d - f o n t s i z e " > < / s p a n > \ n < / d i v > \ n < / d i v > \ n < d i v c l a s s = " t o o l b a r - g r o u p " > \ n < d i v c l a s s = " t o o l b a r - r o w " > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - b o l d " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - i t a l i c " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - u n d e r l i n e " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - f o n t c o l o r " > < / s p a n > \ n < / d i v > \ n < / d i v > \ n < d i v c l a s s = " s e p a r a t o r s h o r t " > < / d i v > \ n < d i v c l a s s = " t o o l b a r - g r o u p " > \ n < d i v c l a s s = " t o o l b a r - r o w " > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - h a l i g n " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - v a l i g n " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - m a r k e r s " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - n u m b e r i n g " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - l i n e s p a c e " > < / s p a n > \ n < / d i v > \ n < / d i v > \ n < d i v c l a s s = " s e p a r a t o r s h o r t " s t y l e = " m a r g i n - l e f t : 5 p x ; " > < / d i v > \ n < d i v c l a s s = " t o o l b a r - g r o u p " > \ n < d i v c l a s s = " t o o l b a r - r o w " > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - a r r a n g e - s h a p e " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - a l i g n - s h a p e " > < / s p a n > \ n < / d i v > \ n < / d i v > \ n < d i v c l a s s = " s e p a r a t o r s h o r t " s t y l e = " m a r g i n - l e f t : 5 p x ; " > < / d i v > \ n < d i v c l a s s = " t o o l b a r - g r o u p " > \ n < d i v c l a s s = " t o o l b a r - r o w " > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - i n s e r t i m a g e " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - i n s e r t t a b l e " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - i n s e r t c h a r t " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - i n s e r t h y p e r l i n k " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - i n s e r t s h a p e " > < / s p a n > \ n < s p a n c l a s s = " b t n - p l a c e h o l d e r s p l i t " i d = " i d - t o o l b a r - s h o r t - p l a c e h o l d e r - b t n - i n s e r t t e x t " > < / s p a n > \ n < / d i v > \ n < / d i
e . colorSaved . css ( "background-color" , "#" + t ) ) , e . colorNew . css ( "background-color" , "#" + i ) } ( ) , e . stopevents = ! 0 ; var n = e . hexRe . exec ( i ) ; e . spinR . setValue ( parseInt ( n [ 1 ] , 16 ) ) , e . spinG . setValue ( parseInt ( n [ 2 ] , 16 ) ) , e . spinB . setValue ( parseInt ( n [ 3 ] , 16 ) ) , e . textColor . setValue ( ( n [ 1 ] + n [ 2 ] + n [ 3 ] ) . toUpperCase ( ) ) , e . stopevents = ! 1 } , show : function ( ) { Common . UI . Window . prototype . show . apply ( this , arguments ) ; var t = this ; _ . delay ( function ( ) { t . getChild ( "#extended-text-color" ) . focus ( ) } , 50 ) } , cancelButtonText : "Cancel" , addButtonText : "Add" , textNew : "New" , textCurrent : "Current" , textRGBErr : "The entered value is incorrect.<br>Please enter a numeric value between 0 and 255." , textHexErr : "The entered value is incorrect.<br>Please enter a value between 000000 and FFFFFF." } , Common . UI . ExtendedColorDialog || { } ) ) } ) , void 0 === Common ) var Common = { } ; if ( define ( "common/main/lib/component/ThemeColorPalette" , [ "common/main/lib/component/BaseView" , "common/main/lib/view/ExtendedColorDialog" ] , function ( ) { "use strict" ; Common . UI . ThemeColorPalette = Common . UI . BaseView . extend ( _ . extend ( { options : { dynamiccolors : 10 , standardcolors : 10 , themecolors : 10 , effects : 5 , allowReselect : ! 0 , transparent : ! 1 , value : "000000" } , template : _ . template ( '<div style="padding: 12px;"><% var me = this; %><% $(colors).each(function(num, item) { %><% if (me.isBlankSeparator(item)) { %> <div class="palette-color-spacer" style="width:100%;height:8px;float:left;"></div><% } else if (me.isSeparator(item)) { %> </div><div class="palette-color-separator" style="width:100%;height:1px;float:left;border-bottom: 1px solid #E0E0E0"></div><div style="padding: 12px;"><% } else if (me.isColor(item)) { %> <a class="palette-color color-<%=item%>" style="background:#<%=item%>" hidefocus="on"><em><span style="background:#<%=item%>;" unselectable="on"> </span></em></a><% } else if (me.isTransparent(item)) { %><a class="color-<%=item%>" hidefocus="on"><em><span unselectable="on"> </span></em></a><% } else if (me.isEffect(item)) { %><a effectid="<%=item.effectId%>" effectvalue="<%=item.effectValue%>" class="palette-color-effect color-<%=item.color%>" style="background:#<%=item.color%>" hidefocus="on"><em><span style="background:#<%=item.color%>;" unselectable="on"> </span></em></a><% } else if (me.isCaption(item)) { %><div class="palette-color-caption" style="width:100%;float:left;font-size: 11px;"><%=item%></div><% } %><% }); %></div><% if (me.options.dynamiccolors!==undefined) { %><div class="palette-color-spacer" style="width:100%;height:8px;float:left;"></div><div style="padding: 12px;"><% for (var i=0; i<me.options.dynamiccolors; i++) { %><a class="color-dynamic-<%=i%> dynamic-empty-color" style="background:#ffffff" color="" hidefocus="on"><em><span unselectable="on"> </span></em></a><% } %><% } %></div>' ) , colorRe : /(?:^|\s)color-(.{6})(?:\s|$)/ , selectedCls : "selected" , initialize : function ( t ) { Common . UI . BaseView . prototype . initialize . call ( this , t ) ; var e = this , i = $ ( this . el ) ; this . colors = e . options . colors || this . generateColorData ( e . options . themecolors , e . options . effects , e . options . standardcolors , e . options . transparent ) , i . addClass ( "theme-colorpalette" ) , this . render ( ) , this . options . updateColorsArr && this . updateColors ( this . options . updateColorsArr [ 0 ] , this . options . updateColorsArr [ 1 ] ) , this . options . value && this . select ( this . options . value , ! 0 ) , this . updateCustomColors ( ) , i . closest ( ".btn-group" ) . on ( "show.bs.dropdown" , _ . bind ( this . updateCustomColors , this ) ) , i . closest ( ".dropdown-submenu" ) . on ( "show.bs.dropdown" , _ . bind ( this . updateCustomColors , this ) ) , i . on ( "click" , _ . bind ( this . handleClick , this ) ) } , render : function ( ) { return $ ( this . el ) . html ( this . template ( { colors : this . colors } ) ) , this } , isBlankSeparator : function ( t ) { return "string" == typeof t && "-" == t } , isSeparator : function ( t ) { return "string" == typeof t && "--" == t } , isColor : function ( t ) { return "string" == typeof t && /[0-9A-F]{6}/ . test ( t ) } , isTransparent : function ( t ) { return "string" == typeof t && "transparent" == t } , isCaption : function ( t ) { return "string" == typeof t && "-" != t && "--" != t && ! /[0-9A-F]{6}|transparent/ . test ( t ) } , isEffect : function ( t ) { return "object" == typeof t && void 0 !== t . effectId } , getColor : function ( ) { return this . value } , updateCustomColors : function ( ) { var t =
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 ( ) } , applyPlacement : function ( ) { var t = this . target . offset ( ) ; "top" == this . placement ? this . cmpEl . css ( { bottom : Common . Utils . innerHeight ( ) - t . top + "px" , right : Common . Utils . innerWidth ( ) - t . left - this . target . width ( ) / 2 + "px" } ) : this . cmpEl . css ( { top : t . top + this . target . height ( ) / 2 + "px" , left : t . left + this . target . width ( ) + "px" } ) } , 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 ( "presentationeditor/main/app/view/Toolbar" , [ "backbone" , "text!presentationeditor/main/app/template/Toolbar.template" , "common/main/lib/collection/Fonts" , "common/main/lib/component/Button" , "common/main/lib/component/ComboBox" , "common/main/lib/component/DataView" , "common/main/lib/component/ColorPalette" , "common/main/lib/component/ThemeColorPalette" , "common/main/lib/component/Menu" , "common/main/lib/component/DimensionPicker" , "common/main/lib/component/Window" , "common/main/lib/component/ComboBoxFonts" , "common/main/lib/component/ComboDataView" , "common/main/lib/component/SynchronizeTip" ] , function ( t , e ) { "use strict" ; PE . enumLock = { paragraphLock : "para-lock" , shapeLock : "shape-lock" , slideLock : "slide-lock" , slideDeleted : "slide-deleted" , noSlides : "no-slides" , lostConnect : "disconnect" , incIndentLock : "can-inc-indent" , decIndentLock : "can-dec-indent" , hyperlinkLock : "can-hyperlink" , undoLock : "can-undo" , redoLock : "can-redo" , docPropsLock : "doc-props-lock" , themeLock : "theme-lock" , menuFileOpen : "menu-file-open" , noParagraphSelected : "no-paragraph" , noObjectSelected : "no-object" , disableOnStart : "on-start" , cantPrint : "cant-print" , noTextSelected : "no-text" , inEquation : "in-equation" } , PE . Views . Toolbar = t . View . extend ( _ . extend ( { el : "#toolbar" , template : _ . template ( e ) , events : { } , initialize : function ( ) { var t = this ; t . paragraphControls = [ ] , t . shapeControls = [ ] , t . slideOnlyControls = [ ] , t . synchTooltip = void 0 , t . schemeNames = [ t . txtScheme1 , t . txtScheme2 , t . txtScheme3 , t . txtScheme4 , t . txtScheme5 , t . txtScheme6 , t . txtScheme7 , t . txtScheme8 , t . txtScheme9 , t . txtScheme10 , t . txtScheme11 , t . txtScheme12 , t . txtScheme13 , t . txtScheme14 , t . txtScheme15 , t . txtScheme16 , t . txtScheme17 , t . txtScheme18 , t . txtScheme19 , t . txtScheme20 , t . txtScheme21 ] , t . _state = { hasCollaborativeChanges : void 0 } , t . btnSaveCls = "btn-save" , t . btnSaveTip = this . tipSave + Common . Utils . String . platformKey ( "Ctrl+S" ) ; var e = PE . enumLock ; t . btnNewDocument = new Common . UI . Button ( { id : "id-toolbar-btn-newdocument" , cls : "btn-toolbar" , iconCls : "btn-newdocument" , lock : [ e . slideDeleted , e . paragraphLock , e . lostConnect , e . noSlides ] } ) , t . paragraphControls . push ( t . btnNewDocument ) , t . btnOpenDocument = new Common . UI . Button ( { id : "id-toolbar-btn-opendocument" , cls : "btn-toolbar" , iconCls : "btn-opendocument" , lock : [ e . slideDeleted , e . paragraphLock , e . lostConnect , e . noSlides ] } ) , t . paragraphControls . push ( t . btnOpenDocument ) , t . btnAddSlide = new Common . UI . Button ( { id : "id-toolbar-button-add-slide" , cls : "btn-toolbar" , iconCls : "btn-addslide" , split : ! 0 , lock : [ e . menuFileOpen , e . lostConnect , e . disableOnStart ] , menu : ! 0 } ) , t . slideOnlyControls . push ( t . btnAddSlide ) , t . btnChangeSlide = new Common . UI . Button ( { id : "id-toolbar-button-change-slide" , cls : "btn-toolbar" , iconCls : "btn-changeslide" , lock : [ e . menuFileOpen , e . slideDeleted , e . slideLock , e . lostConnect , e . noSlides , e . disableOnStart ] , menu : ! 0 } ) , t . slideOnlyControls . push ( t . btnChangeSlide ) , t . btnPreview = new Common . UI . Button ( { id : "id-toolbar-button-preview" , cls : "btn-toolbar" , iconCls : "btn-preview" , lock : [ e . menuFileOpen , e . slideDeleted , e . noSlides , e . disableOnStart ] , split : ! 0 , menu : new Common . UI . Menu ( { items : [ { caption : this . textShowBegin , value : 0 } , { caption : this . textShowCurrent , value : 1 } , { caption : "--" } , t . mnuShowSettings = new Common . UI . MenuItem ( { caption : this . textShowSettings , value : 2 , lock : [ e . lostConnect ] } ) ] } ) } ) , t . slideOnlyControls . push ( t . btnPreview ) , t . btnPrint = new Common . UI . Button ( { id : "id-toolbar-btn-print" , cls : "btn-toolbar" , iconCls
this . btnColorSchemas . updateHint ( this . tipColorSchemas ) , this . btnHide . updateHint ( this . tipViewSettings ) , this . btnAdvSettings . updateHint ( this . tipAdvSettings ) , this . btnShapeAlign . updateHint ( this . tipShapeAlign ) , this . btnShapeArrange . updateHint ( this . tipShapeArrange ) , this . btnSlideSize . updateHint ( this . tipSlideSize ) ; var t = this ; this . btnHide . setMenu ( new Common . UI . Menu ( { cls : "pull-right" , style : "min-width: 180px;" , items : [ this . mnuitemCompactToolbar = new Common . UI . MenuItem ( { caption : this . textCompactView , checkable : ! 0 } ) , this . mnuitemHideTitleBar = new Common . UI . MenuItem ( { caption : this . textHideTitleBar , checkable : ! 0 } ) , this . mnuitemHideStatusBar = new Common . UI . MenuItem ( { caption : this . textHideStatusBar , checkable : ! 0 } ) , this . mnuitemHideRulers = new Common . UI . MenuItem ( { caption : this . textHideLines , checkable : ! 0 } ) , { caption : "--" } , this . btnFitPage = new Common . UI . MenuItem ( { caption : this . textFitPage , checkable : ! 0 , checked : this . btnFitPage . isChecked ( ) } ) , this . btnFitWidth = new Common . UI . MenuItem ( { caption : this . textFitWidth , checkable : ! 0 , checked : this . btnFitWidth . isChecked ( ) } ) , this . mnuZoom = new Common . UI . MenuItem ( { template : _ . template ( [ '<div id="id-toolbar-menu-zoom" class="menu-zoom" style="height: 25px;" ' , "<% if(!_.isUndefined(options.stopPropagation)) { %>" , 'data-stopPropagation="true"' , "<% } %>" , ">" , '<label class="title">' + this . textZoom + "</label>" , '<button id="id-menu-zoom-in" type="button" style="float:right; margin: 2px 5px 0 0;" class="btn small btn-toolbar"><span class="btn-icon btn-zoomin"> </span></button>' , '<label class="zoom"><%= options.value %>%</label>' , '<button id="id-menu-zoom-out" type="button" style="float:right; margin-top: 2px;" class="btn small btn-toolbar"><span class="btn-icon btn-zoomout"> </span></button>' , "</div>" ] . join ( "" ) ) , stopPropagation : ! 0 , value : this . mnuZoom . options . value } ) ] } ) ) , ( this . mode . isDesktopApp || this . mode . canBrandingExt && this . mode . customization && ! 1 === this . mode . customization . header ) && this . mnuitemHideTitleBar . hide ( ) , this . mode . canBrandingExt && this . mode . customization && ! 1 === this . mode . customization . statusBar && this . mnuitemHideStatusBar . hide ( ) , this . mnuZoomOut = new Common . UI . Button ( { el : $ ( "#id-menu-zoom-out" ) , cls : "btn-toolbar" } ) , this . mnuZoomIn = new Common . UI . Button ( { el : $ ( "#id-menu-zoom-in" ) , cls : "btn-toolbar" } ) , this . btnMarkers . setMenu ( new Common . UI . Menu ( { items : [ { template : _ . template ( '<div id="id-toolbar-menu-markers" class="menu-markers" style="width: 185px; margin: 0 5px;"></div>' ) } ] } ) ) , this . btnNumbers . setMenu ( new Common . UI . Menu ( { items : [ { template : _ . template ( '<div id="id-toolbar-menu-numbering" class="menu-markers" style="width: 185px; margin: 0 5px;"></div>' ) } ] } ) ) , this . btnAddSlide . setMenu ( new Common . UI . Menu ( { items : [ { template : _ . template ( '<div id="id-toolbar-menu-addslide" class="menu-layouts" style="width: 302px; margin: 0 4px;"></div>' ) } ] } ) ) , this . btnChangeSlide . setMenu ( new Common . UI . Menu ( { items : [ { template : _ . template ( '<div id="id-toolbar-menu-changeslide" class="menu-layouts" style="width: 302px; margin: 0 4px;"></div>' ) } ] } ) ) ; var e = this . mnuMarkersPicker . conf ; this . mnuMarkersPicker = new Common . UI . DataView ( { el : $ ( "#id-toolbar-menu-markers" ) , parentMenu : this . btnMarkers . menu , restoreHeight : 92 , allowScrollbar : ! 1 , store : new Common . UI . DataViewStore ( [ { offsety : 0 , data : { type : 0 , subtype : - 1 } } , { offsety : 38 , data : { type : 0 , subtype : 1 } } , { offsety : 76 , data : { type : 0 , subtype : 2 } } , { offsety : 114 , data : { type : 0 , subtype : 3 } } , { offsety : 152 , data : { type : 0 , subtype : 4 } } , { offsety : 190 , data : { type : 0 , subtype : 5 } } , { offsety : 228 , data : { type : 0 , subtype : 6 } } , { offsety : 266 , data : { type : 0 , subtype : 7 } } ] ) , itemTemplate : _ . template ( '<div id="<%= id %>" class="item-markerlist" style="background-position: 0 -<%= offsety %>px;"></div>' ) } ) , e && this . mnuMarkersPicker . selectByIndex ( e . index , ! 0 ) , e = this . mnuNumbersPicker . conf , this . mnuNumbersPicker = new Common . UI . DataView ( { el : $ ( "#id-toolbar-menu-numbering" ) , parentMenu : this . btnNumbers . menu , restoreHeight : 92 , allowScrollbar : ! 1 , store : new Common . UI . DataViewStore ( [ { offsety : 0 , data : { type : 1 , subtype : - 1 } } , { offsety : 570 , data : { type : 1 , subtype : 4 } } , { offsety : 532 , data : { type : 1 , subtype : 5 } } , { offsety : 608 , data : { type : 1 , subtype : 6 } } , { offsety : 418 , data : { type : 1 , subtype : 1 } } , { offsety : 456 , data : { type : 1 , subtype : 2 } } , { offsety :
this . api . asc _registerCallback ( "asc_onVerticalTextAlign" , _ . bind ( this . onApiVerticalTextAlign , this ) ) , this . api . asc _registerCallback ( "asc_onCanAddHyperlink" , _ . bind ( this . onApiCanAddHyperlink , this ) ) , this . api . asc _registerCallback ( "asc_onTextColor" , _ . bind ( this . onApiTextColor , this ) ) , this . api . asc _registerCallback ( "asc_onUpdateThemeIndex" , _ . bind ( this . onApiUpdateThemeIndex , this ) ) , this . api . asc _registerCallback ( "asc_onEndAddShape" , _ . bind ( this . onApiEndAddShape , this ) ) , this . api . asc _registerCallback ( "asc_onCanGroup" , _ . bind ( this . onApiCanGroup , this ) ) , this . api . asc _registerCallback ( "asc_onCanUnGroup" , _ . bind ( this . onApiCanUnGroup , this ) ) , this . api . asc _registerCallback ( "asc_onPresentationSize" , _ . bind ( this . onApiPageSize , this ) ) , this . api . asc _registerCallback ( "asc_onCoAuthoringDisconnect" , _ . bind ( this . onApiCoAuthoringDisconnect , this , ! 0 ) ) , Common . NotificationCenter . on ( "api:disconnect" , _ . bind ( this . onApiCoAuthoringDisconnect , this ) ) , this . api . asc _registerCallback ( "asc_onZoomChange" , _ . bind ( this . onApiZoomChange , this ) ) , this . api . asc _registerCallback ( "asc_onFocusObject" , _ . bind ( this . onApiFocusObject , this ) ) , this . api . asc _registerCallback ( "asc_onLockDocumentProps" , _ . bind ( this . onApiLockDocumentProps , this ) ) , this . api . asc _registerCallback ( "asc_onUnLockDocumentProps" , _ . bind ( this . onApiUnLockDocumentProps , this ) ) , this . api . asc _registerCallback ( "asc_onLockDocumentTheme" , _ . bind ( this . onApiLockDocumentTheme , this ) ) , this . api . asc _registerCallback ( "asc_onUnLockDocumentTheme" , _ . bind ( this . onApiUnLockDocumentTheme , this ) ) , this . api . asc _registerCallback ( "asc_onInitEditorStyles" , _ . bind ( this . onApiInitEditorStyles , this ) ) , this . api . asc _registerCallback ( "asc_onCountPages" , _ . bind ( this . onApiCountPages , this ) ) , this . api . asc _registerCallback ( "asc_onMathTypes" , _ . bind ( this . onMathTypes , this ) ) , this . onSetupCopyStyleButton ( ) } , onChangeCompactView : function ( t , e ) { Common . localStorage . setItem ( "pe-compact-toolbar" , e ? 1 : 0 ) , e || this . _state . changeslide _inited || this . toolbar . mnuChangeSlidePicker . on ( "item:click" , _ . bind ( this . onChangeSlide , this ) ) , this . _state . changeslide _inited = ! 0 , Common . NotificationCenter . trigger ( "layout:changed" , "toolbar" ) , Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar ) } , onApiFontSize : function ( t ) { this . _state . fontsize !== t && ( this . toolbar . cmbFontSize . setValue ( t ) , this . _state . fontsize = t ) } , onApiBold : function ( t ) { this . _state . bold !== t && ( this . toolbar . btnBold . toggle ( ! 0 === t , ! 0 ) , this . _state . bold = t ) } , onApiItalic : function ( t ) { this . _state . italic !== t && ( this . toolbar . btnItalic . toggle ( ! 0 === t , ! 0 ) , this . _state . italic = t ) } , onApiUnderline : function ( t ) { this . _state . underline !== t && ( this . toolbar . btnUnderline . toggle ( ! 0 === t , ! 0 ) , this . _state . underline = t ) } , onApiStrikeout : function ( t ) { this . _state . strike !== t && ( this . toolbar . btnStrikeout . toggle ( ! 0 === t , ! 0 ) , this . _state . strike = t ) } , onApiVerticalAlign : function ( t ) { this . _state . valign !== t && ( this . toolbar . btnSuperscript . toggle ( 1 == t , ! 0 ) , this . toolbar . btnSubscript . toggle ( 2 == t , ! 0 ) , this . _state . valign = t ) } , onApiCanRevert : function ( t , e ) { "undo" == t ? this . _state . can _undo !== e && ( this . toolbar . lockToolbar ( PE . enumLock . undoLock , ! e , { array : [ this . toolbar . btnUndo ] } ) , this . _state . activated && ( this . _state . can _undo = e ) ) : this . _state . can _redo !== e && ( this . toolbar . lockToolbar ( PE . enumLock . redoLock , ! e , { array : [ this . toolbar . btnRedo ] } ) , this . _state . activated && ( this . _state . can _redo = e ) ) } , onApiCanIncreaseIndent : function ( t ) { this . _state . can _increase !== t && ( this . toolbar . lockToolbar ( PE . enumLock . incIndentLock , ! t , { array : [ this . toolbar . btnIncLeftOffset ] } ) , this . _state . activated && ( this . _state . can _increase = t ) ) } , onApiCanDecreaseIndent : function ( t ) { this . _state . can _decrease !== t && ( this . toolbar . lockToolbar ( PE . enumLock . decIndentLock , ! t , { array : [ this . toolbar . btnDecLeftOffset ] } ) , this . _state . activated && ( this . _state . can _decrease = t ) ) } , onApiBullets : function ( t ) { if ( this . _state . bullets . type != t . get _ListType ( ) || this . _state . bullets . subtype != t . get _ListSubType ( ) ) switch ( this . _state . bullets . type = t . get _ListType ( ) , this . _state . bullets . subtype = t . get _ListSubType ( ) , this . _clearBullets ( ) , this . _state . bullets . type ) { case 0 : this . toolbar . btnMarkers . toggle ( ! 0 , ! 0 ) , this . toolbar . mnuMarkersPicker . selectByIndex ( this . _state . bullets . subtype , ! 0 ) ; break ; case 1 : var e = 0 ; switch ( this . _state . bulle
Common . NotificationCenter . trigger ( "edit:complete" , t . toolbar , t . toolbar . btnInsertShape ) , Common . component . Analytics . trackEvent ( "ToolBar" , "Add Shape" ) ) } ) } } , fillTextArt : function ( ) { var t = this ; if ( this . toolbar . mnuTextArtPicker ) { var e = this . getApplication ( ) . getCollection ( "Common.Collections.TextArt" ) . models , i = this . toolbar . mnuTextArtPicker . store . length ; if ( i > 0 && i == e . length ) { var n = this . toolbar . mnuTextArtPicker . store . models ; _ . each ( e , function ( t , e ) { n [ e ] . set ( "imageUrl" , t . get ( "imageUrl" ) ) } ) } else this . toolbar . mnuTextArtPicker . store . reset ( e ) } else this . toolbar . mnuTextArtPicker = new Common . UI . DataView ( { el : $ ( "#id-toolbar-menu-insart" ) , store : this . getApplication ( ) . getCollection ( "Common.Collections.TextArt" ) , parentMenu : this . toolbar . mnuInsertTextArt . menu , showLast : ! 1 , itemTemplate : _ . template ( '<div class="item-art"><img src="<%= imageUrl %>" id="<%= id %>" style="width:50px;height:50px;"></div>' ) } ) , this . toolbar . mnuTextArtPicker . on ( "item:click" , function ( e , i , n , o ) { t . api && ( t . toolbar . fireEvent ( "inserttextart" , t . toolbar ) , t . api . AddTextArt ( n . get ( "data" ) ) , t . toolbar . btnInsertShape . pressed && t . toolbar . btnInsertShape . toggle ( ! 1 , ! 0 ) , "click" !== o . type && t . toolbar . btnInsertText . menu . hide ( ) , Common . NotificationCenter . trigger ( "edit:complete" , t . toolbar , t . toolbar . btnInsertText ) , Common . component . Analytics . trackEvent ( "ToolBar" , "Add Text Art" ) ) } ) } , 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 . btnInsertEquation . menu . removeAll ( ) ; for ( var 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-equationgroup' + i + '" class="menu-shape" style="width:' + ( n . get ( "groupWidth" ) + 8 ) + "px; " + n . get ( "groupHeight" ) + 'margin-left:5px;"></div>' ) } ] } ) } ) ; t . toolbar . btnInsertEquation . menu . addItem ( o ) ; var s = new Common . UI . DataView ( { el : $ ( "#id-toolbar-menu-equationgroup" + i ) , store : n . get ( "groupStore" ) , parentMenu : o . menu , showLast : ! 1 , itemTemplate : _ . template ( '<div class="item-equation" style="background-position:<%= posX %>px <%= posY %>px;" ><div style="width:<%= width %>px;height:<%= height %>px;" id="<%= id %>">' ) } ) ; n . get ( "groupHeight" ) . length && ( t . equationPickers . push ( s ) , t . toolbar . btnInsertEquation . menu . on ( "show:after" , function ( ) { if ( t . equationPickers . length ) { var e = $ ( this . el ) . find ( ".over" ) . find ( ".menu-shape" ) ; if ( e . length ) for ( var i = 0 ; i < t . equationPickers . length ; ++ i ) if ( e [ 0 ] . id == t . equationPickers [ i ] . el . id ) return t . equationPickers [ i ] . scroller . update ( { alwaysVisibleY : ! 0 } ) , void t . equationPickers . splice ( i , 1 ) } } ) ) , s . on ( "item:click" , function ( e , i , n , o ) { t . api && ( t . api . asc _AddMath ( n . get ( "data" ) . equationType ) , t . toolbar . btnInsertText . pressed && t . toolbar . btnInsertText . toggle ( ! 1 , ! 0 ) , t . toolbar . btnInsertShape . pressed && t . toolbar . btnInsertShape . toggle ( ! 1 , ! 0 ) , "click" !== o . type && t . toolbar . btnInsertEquation . menu . hide ( ) , Common . NotificationCenter . trigger ( "edit:complete" , t . toolbar , t . toolbar . btnInsertEquation ) , Common . component . Analytics . trackEvent ( "ToolBar" , "Add Equation" ) ) } ) } } } , onInsertEquationClick : function ( ) { this . api && ( this . api . asc _AddMath ( ) , Common . component . Analytics . trackEvent ( "ToolBar" , "Add Equation" ) ) , Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar , this . toolbar . btnInsertEquation ) } , onMathTypes : function ( t ) { var e = [ ] , i = this . getCollection ( "EquationGroups" ) ; i . reset ( ) ; var n = { } ; n [ Common . define . c _oAscMathMainType . Symbol ] = [ this . textSymbols , 11 ] , n [ Common . define . c _oAscMathMainType . Fraction ] = [ this . textFraction , 4 ] , n [ Common . define . c _oAscMathMainType . Script ] = [ this . textScript , 4 ] , n [ Common . define . c _oAscMathMainType . Radical ] = [ this . textRadical , 4 ] , n [ Common . define . c _oAscMathMainType . Integral ] = [ this . textIntegral , 3 , ! 0 ] , n [ Common . define . c _oAscMathMainType . LargeOperator ] = [ this . textLargeOperator , 5 , ! 0 ] , n [ Common . define . c _oAscMathMainType . Bracket ] = [ this . textBracket , 4 , ! 0 ] , n [ Common . define . c _oAscMathMainType . Function ] = [ this . textFunction , 3 , ! 0 ] , n [ Common . define . c _oAscMathMainType . Accent ] = [ this . textAccent , 4 ] , n [ Common . define . c _oAscMathMainType . LimitLog ] = [ this . textLimit
this . panelUsers [ e > 1 || this . mode . sharingSettingsUrl && this . mode . sharingSettingsUrl . length ? "show" : "hide" ] ( ) , this . lblUserCount . css ( { "font-size" : e > 1 ? "11px" : "14px" , "font-weight" : e > 1 ? "bold" : "normal" , "margin-top" : e > 1 ? "0" : "-1px" } ) , this . lblUserCount . text ( e > 1 ? e : "+" ) , $ ( "#status-users-icon" ) . css ( "margin-bottom" , e > 1 ? "0" : "2px" ) ; var i = this . panelUsersBlock . data ( "bs.tooltip" ) ; i && ( i . options . title = e > 1 ? this . tipViewUsers : this . tipAccessRights , i . setContent ( ) ) , e > 1 ? this . panelUsersBlock . attr ( "data-toggle" , "dropdown" ) : this . panelUsersBlock . removeAttr ( "data-toggle" ) , this . panelUsersBlock . toggleClass ( "dropdown-toggle" , e > 1 ) , e > 1 ? this . panelUsersBlock . off ( "click" ) : this . panelUsersBlock . on ( "click" , _ . bind ( this . onUsersClick , this ) ) } , _onAddUser : function ( t , e , i ) { this . panelUsersList && ( this . panelUsersList . find ( "ul" ) . append ( _ . template ( this . tplUser ) ( { user : t , scope : this } ) ) , this . panelUsersList . scroller . update ( { minScrollbarLength : 40 , alwaysVisibleY : ! 0 } ) ) } , _onUsersChanged : function ( t ) { void 0 != t . changed . online && this . panelUsersList && ( this . panelUsersList . find ( "#" + t . get ( "iid" ) ) [ t . changed . online ? "removeClass" : "addClass" ] ( "offline" ) , this . panelUsersList . scroller . update ( { minScrollbarLength : 40 , alwaysVisibleY : ! 0 } ) ) } , _onResetUsers : function ( t , e ) { this . panelUsersList && ( this . panelUsersList . html ( this . templateUserList ( { users : t . models , usertpl : this . tplUser , scope : this } ) ) , this . panelUsersList . scroller = new Common . UI . Scroller ( { el : $ ( "#status-users-list ul" ) , useKeyboard : ! 0 , minScrollbarLength : 40 , alwaysVisibleY : ! 0 } ) ) } , getUserName : function ( t ) { return Common . Utils . String . htmlEncode ( t ) } , showStatusMessage : function ( t ) { $ ( "#status-label-action" ) . text ( t ) } , clearStatusMessage : function ( ) { $ ( "#status-label-action" ) . text ( "" ) } , reloadLanguages : function ( t ) { this . langMenu . removeAll ( ) , _ . each ( t , function ( t ) { this . langMenu . addItem ( { iconCls : t . tip , caption : t . title , value : { tip : t . tip , code : t . code } , checkable : ! 0 , checked : this . langMenu . saved == t . title , toggleGroup : "language" } ) } , this ) , this . langMenu . doLayout ( ) , this . langMenu . items . length > 0 && ( this . btnLanguage . setDisabled ( this . _state . no _paragraph ) , this . btnDocLanguage . setDisabled ( ! ! this . mode . isDisconnected ) ) } , setLanguage : function ( t ) { if ( this . langMenu . prevTip != t . tip && void 0 !== t . code ) { var e = $ ( this . langMenu . el . parentNode , this . $el ) ; e . find ( ".dropdown-toggle > .icon-lang-flag" ) . removeClass ( this . langMenu . prevTip ) . addClass ( t . tip ) , this . langMenu . prevTip = t . tip , e . find ( "#status-label-lang" ) . text ( t . title ) ; var i = e . find ( 'ul li a:contains("' + t . title + '")' ) . parent ( ) . index ( ) ; i < 0 ? this . langMenu . saved = t . title : this . langMenu . items [ i - 1 ] . setChecked ( ! 0 ) } } , SetDisabled : function ( t ) { var e = this . langMenu . items . length > 0 ; this . btnLanguage . setDisabled ( t || ! e || this . _state . no _paragraph ) , this . btnDocLanguage . setDisabled ( t || ! e ) } , onApiFocusObject : function ( t ) { if ( this . mode . isEdit ) { this . _state . no _paragraph = ! 0 ; for ( var e = - 1 ; ++ e < t . length ; ) { var i = t [ e ] . get _ObjectType ( ) ; if ( ( i == Asc . c _oAscTypeSelectElement . Paragraph || i == Asc . c _oAscTypeSelectElement . Shape || i == Asc . c _oAscTypeSelectElement . Chart || i == Asc . c _oAscTypeSelectElement . Table ) && ( this . _state . no _paragraph = t [ e ] . get _ObjectValue ( ) . get _Locked ( ) , this . _state . no _paragraph ) ) break } this . _state . no _paragraph = this . _state . no _paragraph || this . langMenu . items . length < 1 , this . _state . no _paragraph !== this . btnLanguage . isDisabled ( ) && this . btnLanguage . setDisabled ( this . _state . no _paragraph ) } } , onApiCoAuthoringDisconnect : function ( ) { this . setMode ( { isDisconnected : ! 0 } ) , this . SetDisabled ( ! 0 ) } , pageIndexText : "Slide {0} of {1}" , goToPageText : "Go to Slide" , tipUsers : "Document is currently being edited by several users." , tipMoreUsers : "and %1 users." , tipShowUsers : "To see all users click the icon below." , tipFitPage : "Fit to Slide" , tipFitWidth : "Fit to Width" , tipZoomIn : "Zoom In" , tipZoomOut : "Zoom Out" , tipZoomFactor : "Magnification" , txtPageNumInvalid : "Slide number invalid" , tipPreview : "Start Slideshow" , tipAccessRights : "Manage document access rights" , tipViewUsers : "View users and manage document access rights" , txAccessRights : "Change access rights" , tipSetLang : "Set Text Language" , tipSetDocLang : "Set Document Language" , tipSetSpelling : "Spell checking" } , PE . Views . Statusbar || { } ) ) } ) , void 0 === Common ) var Common = { } ; if ( Common . util = Common . util || { } , Common . util . LanguageIn
if ( Math . abs ( this . _state . LineHeight - e . Line ) > . 001 || ( null === this . _state . LineHeight || null === e . Line ) && this . _state . LineHeight !== e . Line ) { var o = "" ; e . LineRule == c _paragraphLinerule . LINERULE _AUTO ? o = e . Line : null !== e . LineRule && null !== e . Line && ( o = Common . Utils . Metric . fnRecalcFromMM ( e . Line ) ) , this . numLineHeight . setValue ( null !== o ? o : "" , ! 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 ) } } , 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 ) } if ( this . cmbLineRule ) { var i = this . cmbLineRule . store . at ( 1 ) ; if ( i . set ( { defaultUnit : Common . Utils . Metric . getCurrentMetricName ( ) , minValue : parseFloat ( Common . Utils . Metric . fnRecalcFromMM ( . 3 ) . toFixed ( 2 ) ) , step : Common . Utils . Metric . getCurrentMetric ( ) == Common . Utils . Metric . c _MetricUnits . pt ? 1 : . 01 } ) , null !== this . _state . LineRule ) { var n ; i = this . cmbLineRule . store . findWhere ( ( n = { } , n . value = this . _state . LineRule , n ) ) , i || ( i = this . cmbLineRule . store . at ( 0 ) ) , this . numLineHeight . setDefaultUnit ( i . get ( "defaultUnit" ) ) , this . numLineHeight . setStep ( i . get ( "step" ) ) } } } , createDelayedControls : function ( ) { this . _arrLineRule = [ { displayValue : this . textAuto , defaultValue : 1 , value : c _paragraphLinerule . LINERULE _AUTO , minValue : . 5 , step : . 01 , defaultUnit : "" } , { displayValue : this . textExact , defaultValue : 5 , value : c _paragraphLinerule . LINERULE _EXACT , minValue : . 03 , step : . 01 , defaultUnit : "cm" } ] , this . cmbLineRule = new Common . UI . ComboBox ( { el : e ( "#paragraph-combo-line-rule" ) , cls : "input-group-nr" , menuStyle : "min-width: 85px;" , editable : ! 1 , data : this . _arrLineRule } ) , this . cmbLineRule . setValue ( c _paragraphLinerule . LINERULE _AUTO ) , this . lockedControls . push ( this . cmbLineRule ) , this . numLineHeight = new Common . UI . MetricSpinner ( { el : e ( "#paragraph-spin-line-height" ) , step : . 01 , width : 85 , value : "1.5" , defaultUnit : "" , maxValue : 132 , minValue : . 5 } ) , this . lockedControls . push ( this . numLineHeight ) , this . numSpacingBefore = new Common . UI . MetricSpinner ( { el : e ( "#paragraph-spin-spacing-before" ) , step : . 1 , width : 85 , value : "0 cm" , defaultUnit : "cm" , maxValue : 55.88 , minValue : 0 , allowAuto : ! 0 , autoText : this . txtAutoText } ) , this . spinners . push ( this . numSpacingBefore ) , this . lockedControls . push ( this . numSpacingBefore ) , this . numSpacingAfter = new Common . UI . MetricSpinner ( { el : e ( "#paragraph-spin-spacing-after" ) , step : . 1 , width : 85 , value : "0.35 cm" , defaultUnit : "cm" , maxValue : 55.88 , minValue : 0 , allowAuto : ! 0 , autoText : this . txtAutoText } ) , this . spinners . push ( this . numSpacingAfter ) , this . lockedControls . push ( this . numSpacingAfter ) , this . numLineHeight . on ( "change" , i . bind ( this . onNumLineHeightChange , this ) ) , this . numSpacingBefore . on ( "change" , i . bind ( this . onNumSpacingBeforeChange , this ) ) , this . numSpacingAfter . on ( "change" , i . bind ( this . onNumSpacingAfterChange , this ) ) , this . cmbLineRule . on ( "selected" , i . bind ( this . onLineRuleSelect , this ) ) , this . cmbLineRule . on ( "hide:after" , i . bind ( this . onHideMenus , this ) ) , e ( this . el ) . on ( "click" , "#paragraph-advanced-link" , i . bind ( this . openAdvancedSettings , this ) ) } , createDelayedElements : function ( ) { this . createDelayedControls ( ) , 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 PE . Views . ParagraphSettingsAdvanced ( { paragraphProps : o , api : e . api , handler : function ( t , i ) { "ok" == t && e . api && e . api . paraApply ( i . paragrap
store : new Common . UI . DataViewStore ( [ { group : "menu-chart-group-bar" , type : Asc . c _oAscChartTypeSettings . barNormal , iconCls : "column-normal" , selected : ! 0 } , { group : "menu-chart-group-bar" , type : Asc . c _oAscChartTypeSettings . barStacked , iconCls : "column-stack" } , { group : "menu-chart-group-bar" , type : Asc . c _oAscChartTypeSettings . barStackedPer , iconCls : "column-pstack" } , { group : "menu-chart-group-bar" , type : Asc . c _oAscChartTypeSettings . barNormal3d , iconCls : "column-3d-normal" } , { group : "menu-chart-group-bar" , type : Asc . c _oAscChartTypeSettings . barStacked3d , iconCls : "column-3d-stack" } , { group : "menu-chart-group-bar" , type : Asc . c _oAscChartTypeSettings . barStackedPer3d , iconCls : "column-3d-pstack" } , { group : "menu-chart-group-bar" , type : Asc . c _oAscChartTypeSettings . barNormal3dPerspective , iconCls : "column-3d-normal-per" } , { group : "menu-chart-group-line" , type : Asc . c _oAscChartTypeSettings . lineNormal , iconCls : "line-normal" } , { group : "menu-chart-group-line" , type : Asc . c _oAscChartTypeSettings . lineStacked , iconCls : "line-stack" } , { group : "menu-chart-group-line" , type : Asc . c _oAscChartTypeSettings . lineStackedPer , iconCls : "line-pstack" } , { group : "menu-chart-group-line" , type : Asc . c _oAscChartTypeSettings . line3d , iconCls : "line-3d" } , { group : "menu-chart-group-pie" , type : Asc . c _oAscChartTypeSettings . pie , iconCls : "pie-normal" } , { group : "menu-chart-group-pie" , type : Asc . c _oAscChartTypeSettings . doughnut , iconCls : "pie-doughnut" } , { group : "menu-chart-group-pie" , type : Asc . c _oAscChartTypeSettings . pie3d , iconCls : "pie-3d-normal" } , { group : "menu-chart-group-hbar" , type : Asc . c _oAscChartTypeSettings . hBarNormal , iconCls : "bar-normal" } , { group : "menu-chart-group-hbar" , type : Asc . c _oAscChartTypeSettings . hBarStacked , iconCls : "bar-stack" } , { group : "menu-chart-group-hbar" , type : Asc . c _oAscChartTypeSettings . hBarStackedPer , iconCls : "bar-pstack" } , { group : "menu-chart-group-hbar" , type : Asc . c _oAscChartTypeSettings . hBarNormal3d , iconCls : "bar-3d-normal" } , { group : "menu-chart-group-hbar" , type : Asc . c _oAscChartTypeSettings . hBarStacked3d , iconCls : "bar-3d-stack" } , { group : "menu-chart-group-hbar" , type : Asc . c _oAscChartTypeSettings . hBarStackedPer3d , iconCls : "bar-3d-pstack" } , { group : "menu-chart-group-area" , type : Asc . c _oAscChartTypeSettings . areaNormal , iconCls : "area-normal" } , { group : "menu-chart-group-area" , type : Asc . c _oAscChartTypeSettings . areaStacked , iconCls : "area-stack" } , { group : "menu-chart-group-area" , type : Asc . c _oAscChartTypeSettings . areaStackedPer , iconCls : "area-pstack" } , { group : "menu-chart-group-scatter" , type : Asc . c _oAscChartTypeSettings . scatter , iconCls : "point-normal" } , { group : "menu-chart-group-stock" , type : Asc . c _oAscChartTypeSettings . stock , iconCls : "stock-normal" } ] ) , itemTemplate : i . template ( '<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>' ) } ) } ) , this . btnChartType . render ( e ( "#chart-button-type" ) ) , this . mnuChartTypePicker . on ( "item:click" , i . bind ( this . onSelectType , this , this . btnChartType ) ) , this . lockedControls . push ( this . btnChartType ) , this . btnEditData = new Common . UI . Button ( { el : e ( "#chart-button-edit-data" ) } ) , this . btnEditData . on ( "click" , i . bind ( this . setEditData , this ) ) , this . lockedControls . push ( this . btnEditData ) , this . spnWidth = new Common . UI . MetricSpinner ( { el : e ( "#chart-spin-width" ) , step : . 1 , width : 78 , defaultUnit : "cm" , value : "3 cm" , maxValue : 55.88 , minValue : 0 } ) , this . spinners . push ( this . spnWidth ) , this . lockedControls . push ( this . spnWidth ) , this . spnHeight = new Common . UI . MetricSpinner ( { el : e ( "#chart-spin-height" ) , step : . 1 , width : 78 , defaultUnit : "cm" , value : "3 cm" , maxValue : 55.88 , minValue : 0 } ) , this . spinners . push ( this . spnHeight ) , this . lockedControls . push ( this . spnHeight ) , this . spnWidth . on ( "change" , i . bind ( this . onWidthChange , this ) ) , this . spnHeight . on ( "change" , i . bind ( this . onHeightChange , this ) ) , this . btnRatio = new Common . UI . Button ( { cls : "btn-toolbar" , iconCls : "advanced-btn-ratio" , style : "margin-bottom: 1px;" , enableToggle : ! 0 , hint : this . textKeepRatio } ) , this . btnRatio . render ( e ( "#chart-button-ratio" ) ) , this . lockedControls . push ( this . btnRatio ) , this . btnRatio . on ( "click" , i . bind ( function ( t , e ) { if ( t . pressed && this . spnHeight . getNumberValue ( ) > 0 && ( this . _nRatio = this . spnWidth . getNumberValue ( ) / this . spnHeight . getNumberValue ( ) ) , this . api ) { var i = new Asc . CAscChartProp ; i . asc _putLockAspect ( t . pressed ) , this . api . ChartApply ( i ) } this . fireEvent ( "editcomplete" , thi
this . _UpdateBorderStyle ( e . get _InsideH ( ) , i ) ) } , _UpdateBorderStyle : function ( t , e ) { if ( null == t && ( t = new Asc . asc _CTextBorder ) , e && this . BorderSize > 0 ) { var i = parseFloat ( this . BorderSize ) ; t . put _Value ( 1 ) , t . put _Size ( 25.4 * i / 72 ) ; var n = Common . Utils . ThemeColor . getRgbColor ( this . btnBorderColor . color ) ; t . put _Color ( n ) } else t . put _Value ( 0 ) } , createDelayedElements : function ( ) { this . createDelayedControls ( ) , this . UpdateThemeColors ( ) , this . _initSettings = ! 1 } , UpdateThemeColors : function ( ) { this . btnBackColor || ( this . btnBorderColor = new Common . UI . ColorButton ( { style : "width:45px;" , menu : new Common . UI . Menu ( { items : [ { template : i . template ( '<div id="table-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>' ) } , { template : i . template ( '<a id="table-border-color-new" style="padding-left:12px;">' + this . textNewColor + "</a>" ) } ] } ) } ) , this . btnBorderColor . render ( e ( "#table-border-color-btn" ) ) , this . btnBorderColor . setColor ( "000000" ) , this . lockedControls . push ( this . btnBorderColor ) , this . borderColor = new Common . UI . ThemeColorPalette ( { el : e ( "#table-border-color-menu" ) } ) , this . borderColor . on ( "select" , i . bind ( this . onColorsBorderSelect , this ) ) , e ( this . el ) . on ( "click" , "#table-border-color-new" , i . bind ( this . addNewColor , this , this . borderColor , this . btnBorderColor ) ) , this . btnBackColor = new Common . UI . ColorButton ( { style : "width:45px;" , menu : new Common . UI . Menu ( { items : [ { template : i . template ( '<div id="table-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>' ) } , { template : i . template ( '<a id="table-back-color-new" style="padding-left:12px;">' + this . textNewColor + "</a>" ) } ] } ) } ) , this . btnBackColor . render ( e ( "#table-back-color-btn" ) ) , this . lockedControls . push ( this . btnBackColor ) , this . colorsBack = new Common . UI . ThemeColorPalette ( { el : e ( "#table-back-color-menu" ) , transparent : ! 0 } ) , this . colorsBack . on ( "select" , i . bind ( this . onColorsBackSelect , this ) ) , e ( this . el ) . on ( "click" , "#table-back-color-new" , i . bind ( this . addNewColor , this , this . colorsBack , this . btnBackColor ) ) ) , this . colorsBack . updateColors ( Common . Utils . ThemeColor . getEffectColors ( ) , Common . Utils . ThemeColor . getStandartColors ( ) ) , this . borderColor . updateColors ( Common . Utils . ThemeColor . getEffectColors ( ) , Common . Utils . ThemeColor . getStandartColors ( ) ) , this . btnBorderColor . setColor ( this . borderColor . getColor ( ) ) } , _onInitTemplates : function ( t ) { var n = this ; this . _isTemplatesChanged = ! 0 , this . cmbTableTemplate || ( this . cmbTableTemplate = new Common . UI . ComboDataView ( { itemWidth : 70 , itemHeight : 50 , menuMaxHeight : 300 , enableKeyEvents : ! 0 , cls : "combo-template" } ) , this . cmbTableTemplate . render ( e ( "#table-combo-template" ) ) , this . cmbTableTemplate . openButton . menu . cmpEl . css ( { "min-width" : 175 , "max-width" : 175 } ) , this . cmbTableTemplate . on ( "click" , i . bind ( this . onTableTemplateSelect , this ) ) , this . cmbTableTemplate . openButton . menu . on ( "show:after" , function ( ) { n . cmbTableTemplate . menuPicker . scroller . update ( { alwaysVisibleY : ! 0 } ) } ) , this . lockedControls . push ( this . cmbTableTemplate ) ) ; var o = n . cmbTableTemplate . menuPicker . store . length ; if ( o > 0 && o == t . length ) { var s = n . cmbTableTemplate . menuPicker . store . models ; i . each ( t , function ( t , e ) { s [ e ] . set ( "imageUrl" , t . get _Image ( ) ) } ) } else { n . cmbTableTemplate . menuPicker . store . reset ( [ ] ) ; var a = [ ] ; i . each ( t , function ( t ) { a . push ( { imageUrl : t . get _Image ( ) , id : Common . UI . getId ( ) , templateId : t . get _Id ( ) } ) } ) , n . cmbTableTemplate . menuPicker . store . add ( a ) } } , 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 . Table == n ) { new PE . Views . TableSettingsAdvanced ( { tableProps : o , handler : function ( t , i ) { "ok" == t && e . api && e . api . tblApply ( i . tableProps ) , e . fireEvent ( "editcomplete" , e ) } } ) . show ( ) ; break } } } } , setLocked : function ( t ) { this . _locked = t } , disableControls : function ( t ) { this . _initSettings || this . _state . DisabledControls !== t && ( this . _state . DisabledControls = t , i . each ( this . lockedControls , function ( e ) { e . setDisabled ( t ) } ) , this . linkAdvanced . toggleClass ( "disabled" , t ) ) } , textBorders : "Border's Style" , textBorderColor : "Color" , textBackColor : "Background color" , textEdit : "Rows & Columns" , selectRowText : "Select Row" , selectColumnText : "Select Column
this.api&&!0!==this._fromTextureCmb&&this.OriginalFillType==Asc.c_oAscFill.FILL_TYPE_BLIP){var i=new Asc.asc_CShapeProperty,n=new Asc.asc_CShapeFill;n.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP),n.put_fill(new Asc.asc_CFillBlip),n.get_fill().put_type(this.BlipFillType),i.put_fill(n),this.api.ShapeApply(i)}this.fireEvent(" editcomplete ",this)},onNumTransparencyChange:function(t,e,i,n){if(this.sldrTransparency.setValue(t.getNumberValue(),!0),this.api){var o=t.getNumberValue(),s=new Asc.asc_CShapeProperty,a=new Asc.asc_CShapeFill;a.put_transparent(2.55*o),s.put_fill(a),this.api.ShapeApply(s)}this.fireEvent(" editcomplete ",this)},onTransparencyChange:function(t,e,n){this._sliderChanged=e,this.numTransparency.setValue(e,!0),this._sendUndoPoint&&(this.api.setStartPointHistory(),this._sendUndoPoint=!1,this.updateslider=setInterval(i.bind(this._transparencyApplyFunc,this),100))},onTransparencyChangeComplete:function(t,e,i){clearInterval(this.updateslider),this._sliderChanged=e,this.api.setEndPointHistory(),this._transparencyApplyFunc(),this._sendUndoPoint=!0},_transparencyApplyFunc:function(){if(void 0!==this._sliderChanged){var t=new Asc.asc_CShapeProperty,e=new Asc.asc_CShapeFill;e.put_transparent(2.55*this._sliderChanged),t.put_fill(e),this.api.ShapeApply(t),this._sliderChanged=void 0}},onGradTypeSelect:function(t,e){if(this.GradFillType=e.value,this.GradFillType==Asc.c_oAscFillGradType.GRAD_LINEAR){this.mnuDirectionPicker.store.reset(this._viewDataLinear),this.mnuDirectionPicker.cmpEl.width(175),this.mnuDirectionPicker.restoreHeight=174;var e=this.mnuDirectionPicker.store.findWhere({type:this.GradLinearDirectionType});this.mnuDirectionPicker.selectRecord(e,!0),e?this.btnDirection.setIconCls(" item - gradient "+e.get(" iconcls ")):this.btnDirection.setIconCls(" ")}else this.GradFillType==Asc.c_oAscFillGradType.GRAD_PATH&&(this.mnuDirectionPicker.store.reset(this._viewDataRadial),this.mnuDirectionPicker.cmpEl.width(60),this.mnuDirectionPicker.restoreHeight=58,this.mnuDirectionPicker.selectByIndex(this.GradRadialDirectionIdx,!0),this.GradRadialDirectionIdx>=0?this.btnDirection.setIconCls(" item - gradient "+this._viewDataRadial[this.GradRadialDirectionIdx].iconcls):this.btnDirection.setIconCls(" "));if(this.api&&!this._noApply){var i=new Asc.asc_CShapeProperty,n=new Asc.asc_CShapeFill;n.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD),n.put_fill(new Asc.asc_CFillGrad),n.get_fill().put_grad_type(this.GradFillType),this.GradFillType==Asc.c_oAscFillGradType.GRAD_LINEAR&&(n.get_fill().put_linear_angle(6e4*this.GradLinearDirectionType),n.get_fill().put_linear_scale(!0)),i.put_fill(n),this.api.ShapeApply(i)}this.fireEvent(" editcomplete ",this)},onSelectGradient:function(t,e,n,o){if(!this._noApply){var s={};if(i.isFunction(o.toJSON)){if(!o.get(" selected "))return;s=o.toJSON()}else s=o;if(this.btnDirection.setIconCls(" item - gradient "+s.iconcls),this.GradFillType==Asc.c_oAscFillGradType.GRAD_LINEAR?this.GradLinearDirectionType=s.type:this.GradRadialDirectionIdx=0,this.api&&this.GradFillType==Asc.c_oAscFillGradType.GRAD_LINEAR){var a=new Asc.asc_CShapeProperty,r=new Asc.asc_CShapeFill;r.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD),r.put_fill(new Asc.asc_CFillGrad),r.get_fill().put_grad_type(this.GradFillType),r.get_fill().put_linear_angle(6e4*s.type),r.get_fill().put_linear_scale(!0),a.put_fill(r),this.api.ShapeApply(a)}this.fireEvent(" editcomplete ",this)}},onColorsGradientSelect:function(t,e){if(this.btnGradColor.setColor(e),this.GradColor.colors[this.GradColor.currentIdx]=e,this.sldrGradient.setColorValue(Common.Utils.String.format(" # { 0 } "," object "==typeof e?e.color:e)),this.api&&!this._noApply){var i=new Asc.asc_CShapeProperty,n=new Asc.asc_CShapeFill;n.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD),n.put_fill(new Asc.asc_CFillGrad),n.get_fill().put_grad_type(this.GradFillType),n.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]),Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]),this.OriginalFillType!==Asc.c_oAscFill.FILL_TYPE_GRAD&&(this.GradFillType==Asc.c_oAscFillGradType.GRAD_LINEAR&&(n.get_fill().put_linear_angle(6e4*thi
this.colorsBack.on(" select ",i.bind(this.onColorsBackSelect,this)),e(this.el).on(" click "," # shape - back - color - new ",i.bind(this.addNewColor,this,this.colorsBack,this.btnBackColor)),this.btnFGColor=new Common.UI.ColorButton({style:" width : 45 px ; ",menu:new Common.UI.Menu({items:[{template:i.template('<div id=" shape - foreground - color - menu " style=" width : 169 px ; height : 220 px ; margin : 10 px ; "></div>')},{template:i.template('<a id=" shape - foreground - color - new " style=" padding - left : 12 px ; ">'+this.textNewColor+" < / a > " ) } ] } ) } ) , t h i s . b t n F G C o l o r . r e n d e r ( e ( " # s h a p e - f o r e g r o u n d - c o l o r - b t n " ) ) , t h i s . b t n F G C o l o r . s e t C o l o r ( " 0 0 0 0 0 0 " ) , t h i s . f i l l C o n t r o l s . p u s h ( t h i s . b t n F G C o l o r ) , t h i s . c o l o r s F G = n e w C o m m o n . U I . T h e m e C o l o r P a l e t t e ( { e l : e ( " # s h a p e - f o r e g r o u n d - c o l o r - m e n u " ) , v a l u e : " 0 0 0 0 0 0 " } ) , t h i s . c o l o r s F G . o n ( " s e l e c t " , i . b i n d ( t h i s . o n C o l o r s F G S e l e c t , t h i s ) ) , e ( t h i s . e l ) . o n ( " c l i c k " , " # s h a p e - f o r e g r o u n d - c o l o r - n e w " , i . b i n d ( t h i s . a d d N e w C o l o r , t h i s , t h i s . c o l o r s F G , t h i s . b t n F G C o l o r ) ) , t h i s . b t n B G C o l o r = n e w C o m m o n . U I . C o l o r B u t t o n ( { s t y l e : " w i d t h : 4 5 p x ; " , m e n u : n e w C o m m o n . U I . M e n u ( { i t e m s : [ { t e m p l a t e : i . t e m p l a t e ( ' < d i v i d = " s h a p e - b a c k g r o u n d - c o l o r - m e n u " s t y l e = " w i d t h : 1 6 9 p x ; h e i g h t : 2 2 0 p x ; m a r g i n : 1 0 p x ; " > < / d i v > ' ) } , { t e m p l a t e : i . t e m p l a t e ( ' < a i d = " s h a p e - b a c k g r o u n d - c o l o r - n e w " s t y l e = " p a d d i n g - l e f t : 1 2 p x ; " > ' + t h i s . t e x t N e w C o l o r + " < / a > " ) } ] } ) } ) , t h i s . b t n B G C o l o r . r e n d e r ( e ( " # s h a p e - b a c k g r o u n d - c o l o r - b t n " ) ) , t h i s . b t n B G C o l o r . s e t C o l o r ( " f f f f f f " ) , t h i s . f i l l C o n t r o l s . p u s h ( t h i s . b t n B G C o l o r ) , t h i s . c o l o r s B G = n e w C o m m o n . U I . T h e m e C o l o r P a l e t t e ( { e l : e ( " # s h a p e - b a c k g r o u n d - c o l o r - m e n u " ) , v a l u e : " f f f f f f " } ) , t h i s . c o l o r s B G . o n ( " s e l e c t " , i . b i n d ( t h i s . o n C o l o r s B G S e l e c t , t h i s ) ) , e ( t h i s . e l ) . o n ( " c l i c k " , " # s h a p e - b a c k g r o u n d - c o l o r - n e w " , i . b i n d ( t h i s . a d d N e w C o l o r , t h i s , t h i s . c o l o r s B G , t h i s . b t n B G C o l o r ) ) , t h i s . b t n G r a d C o l o r = n e w C o m m o n . U I . C o l o r B u t t o n ( { s t y l e : " w i d t h : 4 5 p x ; " , m e n u : n e w C o m m o n . U I . M e n u ( { i t e m s : [ { t e m p l a t e : i . t e m p l a t e ( ' < d i v i d = " s h a p e - g r a d i e n t - c o l o r - m e n u " s t y l e = " w i d t h : 1 6 9 p x ; h e i g h t : 2 2 0 p x ; m a r g i n : 1 0 p x ; " > < / d i v > ' ) } , { t e m p l a t e : i . t e m p l a t e ( ' < a i d = " s h a p e - g r a d i e n t - c o l o r - n e w " s t y l e = " p a d d i n g - l e f t : 1 2 p x ; " > ' + t h i s . t e x t N e w C o l o r + " < / a > " ) } ] } ) } ) , t h i s . b t n G r a d C o l o r . r e n d e r ( e ( " # s h a p e - g r a d i e n t - c o l o r - b t n " ) ) , t h i s . b t n G r a d C o l o r . s e t C o l o r ( " 0 0 0 0 0 0 " ) , t h i s . f i l l C o n t r o l s . p u s h ( t h i s . b t n G r a d C o l o r ) , t h i s . c o l o r s G r a d = n e w C o m m o n . U I . T h e m e C o l o r P a l e t t e ( { e l : e ( " # s h a p e - g r a d i e n t - c o l o r - m e n u " ) , v a l u e : " 0 0 0 0 0 0 " } ) , t h i s . c o l o r s G r a d . o n ( " s e l e c t " , i . b i n d ( t h i s . o n C o l o r s G r a d i e n t S e l e c t , t h i s ) ) , e ( t h i s . e l ) . o n ( " c l i c k " , " # s h a p e - g r a d i e n t - c o l o r - n e w " , i . b i n d ( t h i s . a d d N e w C o l o r , t h i s , t h i s . c o l o r s G r a d , t h i s . b t n G r a d C o l o r ) ) , t h i s . b t n B o r d e r C o l o r = n e w C o m m o n . U I . C o l o r B u t t o n ( { s t y l e : " w i d t h : 4 5 p x ; " , m e n u : n e w C o m m o n . U I . M e n u ( { i t e m s : [ { t e m p l a t e : i . t e m p l a t e ( ' < d i v i d = " s h a p e - b o r d e r - c o l o r - m e n u " s t y l e = " w i d t h : 1 6 9 p x ; h e i g h t : 2 2 0 p x ; m a r g i n : 1 0 p x ; " > < / d i v > ' ) } , { t e m p l a t e : i . t e m p l a t e ( ' < a i d = " s h a p e - b o r d e r - c o l o r - n e w " s t y l e = " p a d d i n g - l e f t : 1 2 p x ; " > ' + t h i s . t e x t N e w C o l o r + " < / a > " ) } ] } ) } ) , t h i s . b t n B o r d e r C o l o r . r e n d e r ( e ( " # s h a p e - b o r d e r - c o l o r - b t n " ) ) , t h i s . b t n B o r d e r C o l o r . s e t C o l o r ( " 0 0 0 0 0 0 " ) , t h i s . l o c k e d C o n t r o l s . p u s h ( t h i s . b t n B o r d e r C o l o r ) , t h i s . c o l o r s B o r d e r = n e w C o m m o n . U I . T h e m e C o l o r P a l e t t e ( { e l : e ( " # s h a p e - b o r d e r - c o l o r - m e n u " ) , v a l u e : " 0 0 0 0 0 0 " } ) , t h i s . c o l o r s B o r d e r . o n ( " s e l e c t " , i . b i n d ( t h i s . o n C o l o r s B o r d e r S e l e c t , t h i s ) ) , e ( t h i s . e l ) . o n ( " c l i c k " , " # s h a p e - b o r d e r - c o l o r - n e w " , i . b i n d ( t h i s . a d d N e w C o l o r , t h i s , t h i s . c o l o r s B o r d e r , t h i s . b t n B o r d e r C o l o r ) ) ) , t h i s . c o l o r s B o r d e r . u p d a t e C o l o r s ( C o m m o n . U t i l s . T h e m e C o l o r . g e t E f f e c t C o l o r s ( ) , C o m m o n . U t i l s . T h e m e C o l o r . g e t S t a n d a r t C o l o r s ( ) ) , t h i s . c o l o r s B a c k . u p d a t e C o l o r s ( C o m m o n . U t i l s . T h e m e C o l o r . g e t E f f e c t C o l o r s ( ) , C o m m o n . U t i l s . T h e m e C o l o r . g e t S t a n d a r t C o l o r s ( ) ) , t h i s . c o l o r s F G . u p d a t e C o l o r s ( C o m m o n . U t i l s . T h e m e C o l o r . g e t E f f e c t C o l o r s ( ) , C o m m o n . U t i l s . T h e m e C o l o r . g e t S t a n d a r t C o l o r s ( ) ) , t h i s . c o l o r s B G . u p d a t e C o l o r s ( C o m m o n . U t i l s . T h e m e C o l o r . g e t E f f e c t C o l o r s ( ) , C o m m o n . U t i l s . T h e m e C o l o r . g e t S t a n d a r t C o l o r s ( ) ) , t h i s . c o l o r s G r a d . u p d a t e C o l o r s ( C o m m o n . U t i l s . T h e m e C o l o r . g e t E f f e c t C o l o r s ( ) , C o m m o n . U t i l s . T h e m e C o l o r . g e t S t a n d a r t C o l o r s ( ) ) } , _ p t 2 m m : f u n c t i o n ( t ) { r e t u r n 2 5 . 4 * t / 7 2 } , _ m m 2 p t : f u n c t i o n ( t ) { r e t u r n 7 2 * t / 2 5 . 4 } , d i s a b l e F i l l P a n e l s : f u n c t i o n ( t ) { t h i s . _ s t a t e . D i s a b l e d F i l l P a n e l s ! = = t & & ( t h i s . _ s t a t e . D i s a b l e d F i l l P a n e l s = t , i . e a c h ( t h i s . f i l l C o n t r o l s , f u n c t i o n ( e ) { e . s e t D i s a b l e d ( t ) } ) , t h i s . l b l T r a n s p a r e n c y S t a r t . t o g g l e C l a s s ( " d i s a b l e d " , t ) , t h i s . l b l T r a n s p a r e n c y E n d . t o g g l e C l a s s ( " d i s a b l e d " , t ) ) } , S h o w H i
this . _arrGradType = [ { displayValue : this . textLinear , value : Asc . c _oAscFillGradType . GRAD _LINEAR } , { displayValue : this . textRadial , value : Asc . c _oAscFillGradType . GRAD _PATH } ] , this . cmbGradType = new Common . UI . ComboBox ( { el : e ( "#slide-combo-grad-type" ) , cls : "input-group-nr" , menuStyle : "min-width: 90px;" , editable : ! 1 , data : this . _arrGradType } ) , this . cmbGradType . setValue ( this . _arrGradType [ 0 ] . value ) , this . cmbGradType . on ( "selected" , i . bind ( this . onGradTypeSelect , this ) ) , this . FillItems . push ( this . cmbGradType ) , this . _viewDataLinear = [ { offsetx : 0 , offsety : 0 , type : 45 , subtype : - 1 , iconcls : "gradient-left-top" } , { offsetx : 50 , offsety : 0 , type : 90 , subtype : 4 , iconcls : "gradient-top" } , { offsetx : 100 , offsety : 0 , type : 135 , subtype : 5 , iconcls : "gradient-right-top" } , { offsetx : 0 , offsety : 50 , 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: 60px;" , menuAlign : "tr-br" , items : [ { template : i . template ( '<div id="id-slide-menu-direction" style="width: 175px; margin: 0 5px;"></div>' ) } ] } ) } ) , this . btnDirection . on ( "render:after" , function ( n ) { t . mnuDirectionPicker = new Common . UI . DataView ( { el : e ( "#id-slide-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 ( "#slide-button-direction" ) ) , this . mnuDirectionPicker . on ( "item:click" , i . bind ( this . onSelectGradient , this , this . btnDirection ) ) , this . FillItems . push ( this . btnDirection ) , this . sldrGradient = new Common . UI . MultiSliderGradient ( { el : e ( "#slide-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 . FillItems . push ( this . sldrGradient ) } , createDelayedElements : function ( ) { this . createDelayedControls ( ) ; var t = [ 0 , 1 , 3 , 2 , 4 , 53 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 22 , 23 , 24 , 25 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45 , 46 , 49 , 50 , 51 , 52 ] ; this . patternViewData = [ ] ; for ( var e = 0 ; e < 13 ; e ++ ) for ( var i = 0 ; i < 4 ; i ++ ) { var n = 4 * e + i ; this . patternViewData [ n ] = { offsetx : 28 * i , offsety : 28 * e , type : t [ n ] } } this . patternViewData . splice ( this . patternViewData . length - 2 , 2 ) ; for ( var e = 0 ; e < this . patternViewData . length ; e ++ ) this . patternViewData [ e ] . id = Common . UI . getId ( ) ; this . cmbPattern . menuPicker . store . add ( this . patternViewData ) , this . cmbPattern . menuPicker . store . length > 0 && ( this . cmbPattern . fillComboView ( this . cmbPattern . menuPicker . store . at ( 0 ) , ! 0 ) , this . PatternFillType = this . patternViewData [ 0 ] . type ) , this . UpdateThemeColors ( ) , this . _initSettings = ! 1 } , onInitStandartTextures : function ( t ) { var n = this ; if ( t && t . length > 0 ) { this . btnTexture || ( this . btnTexture = new Common . UI . ComboBox ( { el : e ( "#slide-combo-fill-texture" ) , template : i . template ( [ '<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle" tabindex="0" data-toggle="dropdown">' , '<div class="form-control text" style="width: 90px;">' + this . textSelectTexture + "</div>" , '<div style="display: table-cell;"></div>' , '<button type="button" c
define("presentationeditor/main/app/view/TextArtSettings",["text!presentationeditor/main/app/template/TextArtSettings.template","jquery","underscore","backbone","common/main/lib/component/ComboBox","common/main/lib/component/ComboBorderSize","common/main/lib/component/MetricSpinner","common/main/lib/component/ThemeColorPalette","common/main/lib/component/ColorButton","common/main/lib/component/ComboDataView","common/main/lib/component/Slider","common/main/lib/component/MultiSliderGradient","common/main/lib/view/ImageFromUrlDialog"],function(t,e,i,n){"use strict";PE.Views.TextArtSettings=n.View.extend(i.extend({el:"#id-textart-settings",template:i.template(t),events:{},options:{alias:"TextArtSettings"},initialize:function(){this._initSettings=!0,this._noApply=!0,this.shapeprops=null,this._sendUndoPoint=!0,this._sliderChanged=!1,this.txtPt=Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt),this._state={Transparency:null,FillType:Asc.c_oAscFill.FILL_TYPE_SOLID,ShapeColor:"transparent",BlipFillType:Asc.c_oAscFillBlipType.STRETCH,StrokeType:Asc.c_oAscStrokeType.STROKE_COLOR,StrokeWidth:this._pt2mm(1),StrokeColor:"000000",StrokeBorderType:Asc.c_oDashType.solid,FGColor:"000000",BGColor:"ffffff",GradColor:"000000",GradFillType:Asc.c_oAscFillGradType.GRAD_LINEAR,FormId:null,DisabledControls:!1},this.lockedControls=[],this._locked=!1,this.OriginalFillType=Asc.c_oAscFill.FILL_TYPE_SOLID,this.ShapeColor={Value:1,Color:"transparent"},this.BlipFillType=Asc.c_oAscFillBlipType.STRETCH,this.GradFillType=Asc.c_oAscFillGradType.GRAD_LINEAR,this.GradColor={values:[0,100],colors:["000000","ffffff"],currentIdx:0},this.GradRadialDirectionIdx=0,this.GradLinearDirectionType=0,this.PatternFillType=0,this.FGColor={Value:1,Color:"000000"},this.BGColor={Value:1,Color:"ffffff"},this.BorderColor={Value:1,Color:"transparent"},this.BorderSize=0,this.BorderType=Asc.c_oDashType.solid,this.textureNames=[this.txtCanvas,this.txtCarton,this.txtDarkFabric,this.txtGrain,this.txtGranite,this.txtGreyPaper,this.txtKnit,this.txtLeather,this.txtBrownPaper,this.txtPapyrus,this.txtWood],this.render(),this.FillColorContainer=e("#textart-panel-color-fill"),this.FillImageContainer=e("#textart-panel-image-fill"),this.FillPatternContainer=e("#textart-panel-pattern-fill"),this.FillGradientContainer=e("#textart-panel-gradient-fill"),this.TransparencyContainer=e("#textart-panel-transparent-fill")},render:function(){e(this.el).html(this.template({scope:this}))},setApi:function(t){return this.api=t,this.api&&(this.api.SetInterfaceDrawImagePlaceTextArt("textart-texture-img"),this.api.asc_registerCallback("asc_onInitStandartTextures",i.bind(this.onInitStandartTextures,this))),this},onFillSrcSelect:function(t,e){switch(this.ShowHideElem(e.value),e.value){case Asc.c_oAscFill.FILL_TYPE_SOLID:if(this._state.FillType=Asc.c_oAscFill.FILL_TYPE_SOLID,!this._noApply){var i=new Asc.asc_TextArtProperties,n=new Asc.asc_CShapeFill;n.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID),n.put_fill(new Asc.asc_CFillSolid),n.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor("transparent"==this.ShapeColor.Color?{color:"4f81bd",effectId:24}:this.ShapeColor.Color)),i.asc_putFill(n),this.shapeprops.put_TextArtProperties(i),this.api.ShapeApply(this.shapeprops)}break;case Asc.c_oAscFill.FILL_TYPE_GRAD:if(this._state.FillType=Asc.c_oAscFill.FILL_TYPE_GRAD,!this._noApply){var i=new Asc.asc_TextArtProperties,n=new Asc.asc_CShapeFill;if(n.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD),n.put_fill(new Asc.asc_CFillGrad),n.get_fill().put_grad_type(this.GradFillType),this.GradFillType==Asc.c_oAscFillGradType.GRAD_LINEAR&&(n.get_fill().put_linear_angle(6e4*this.GradLinearDirectionType),n.get_fill().put_linear_scale(!0)),this.OriginalFillType!==Asc.c_oAscFill.FILL_TYPE_GRAD){var o=Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),s=Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();o="ffffff"===o&&"ffffff"===s?{color:"4f81bd",effectId:24}:this.GradColor.colors[0],n.get_fill().put_positions([1e3*this.GradColor.values[0],1e3*this.GradColo
this.lblTransparencyStart=e(this.el).find("#textart-lbl-transparency-start"),this.lblTransparencyEnd=e(this.el).find("#textart-lbl-transparency-end"),this._arrGradType=[{displayValue:this.textLinear,value:Asc.c_oAscFillGradType.GRAD_LINEAR},{displayValue:this.textRadial,value:Asc.c_oAscFillGradType.GRAD_PATH}],this.cmbGradType=new Common.UI.ComboBox({el:e("#textart-combo-grad-type"),cls:"input-group-nr",menuStyle:"min-width: 90px;",editable:!1,data:this._arrGradType}),this.cmbGradType.setValue(this._arrGradType[0].value),this.cmbGradType.on("selected",i.bind(this.onGradTypeSelect,this)),this.lockedControls.push(this.cmbGradType),this._viewDataLinear=[{offsetx:0,offsety:0,type:45,subtype:-1,iconcls:"gradient-left-top"},{offsetx:50,offsety:0,type:90,subtype:4,iconcls:"gradient-top"},{offsetx:100,offsety:0,type:135,subtype:5,iconcls:"gradient-right-top"},{offsetx:0,offsety:50,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: 60px;",menuAlign:"tr-br",items:[{template:i.template(' < div id = "id-textart-menu-direction" style = "width: 175px; margin: 0 5px;" > < / d i v > ' ) } ] } ) } ) , t h i s . b t n D i r e c t i o n . o n ( " r e n d e r : a f t e r " , f u n c t i o n ( n ) { t . m n u D i r e c t i o n P i c k e r = n e w C o m m o n . U I . D a t a V i e w ( { e l : e ( " # i d - t e x t a r t - m e n u - d i r e c t i o n " ) , p a r e n t M e n u : n . m e n u , r e s t o r e H e i g h t : 1 7 4 , s t o r e : n e w C o m m o n . U I . D a t a V i e w S t o r e ( t . _ v i e w D a t a L i n e a r ) , i t e m T e m p l a t e : i . t e m p l a t e ( ' < d i v i d = " < % = i d % > " c l a s s = " i t e m - g r a d i e n t " s t y l e = " b a c k g r o u n d - p o s i t i o n : - < % = o f f s e t x % > p x - < % = o f f s e t y % > p x ; " > < / d i v > ' ) } ) } ) , t h i s . b t n D i r e c t i o n . r e n d e r ( e ( " # t e x t a r t - b u t t o n - d i r e c t i o n " ) ) , t h i s . m n u D i r e c t i o n P i c k e r . o n ( " i t e m : c l i c k " , i . b i n d ( t h i s . o n S e l e c t G r a d i e n t , t h i s , t h i s . b t n D i r e c t i o n ) ) , t h i s . l o c k e d C o n t r o l s . p u s h ( t h i s . b t n D i r e c t i o n ) , t h i s . s l d r G r a d i e n t = n e w C o m m o n . U I . M u l t i S l i d e r G r a d i e n t ( { e l : e ( " # t e x t a r t - s l i d e r - g r a d i e n t " ) , w i d t h : 1 2 5 , m i n V a l u e : 0 , m a x V a l u e : 1 0 0 , v a l u e s : [ 0 , 1 0 0 ] } ) , t h i s . s l d r G r a d i e n t . o n ( " c h a n g e " , i . b i n d ( t h i s . o n G r a d i e n t C h a n g e , t h i s ) ) , t h i s . s l d r G r a d i e n t . o n ( " c h a n g e c o m p l e t e " , i . b i n d ( t h i s . o n G r a d i e n t C h a n g e C o m p l e t e , t h i s ) ) , t h i s . s l d r G r a d i e n t . o n ( " t h u m b c l i c k " , f u n c t i o n ( e , i ) { t . G r a d C o l o r . c u r r e n t I d x = i ; v a r n = t . G r a d C o l o r . c o l o r s [ t . G r a d C o l o r . c u r r e n t I d x ] ; t . b t n G r a d C o l o r . s e t C o l o r ( n ) , t . c o l o r s G r a d . s e l e c t ( n , ! 1 ) } ) , t h i s . s l d r G r a d i e n t . o n ( " t h u m b d b l c l i c k " , f u n c t i o n ( e ) { t . b t n G r a d C o l o r . c m p E l . f i n d ( " b u t t o n " ) . d r o p d o w n ( " t o g g l e " ) } ) , t h i s . s l d r G r a d i e n t . o n ( " s o r t t h u m b s " , f u n c t i o n ( e , n ) { v a r o , s = [ ] ; i . e a c h ( n , f u n c t i o n ( e , i ) { s . p u s h ( t . G r a d C o l o r . c o l o r s [ e ] ) , t . G r a d C o l o r . c u r r e n t I d x = = e & & ( o = i ) } ) , t . O r i g i n a l F i l l T y p e = n u l l , t . G r a d C o l o r . c o l o r s = s , t . G r a d C o l o r . c u r r e n t I d x = o } ) , t h i s . l o c k e d C o n t r o l s . p u s h ( t h i s . s l d r G r a d i e n t ) , t h i s . c m b B o r d e r S i z e = n e w C o m m o n . U I . C o m b o B o r d e r S i z e E d i t a b l e ( { e l : e ( " # t e x t a r t - c o m b o - b o r d e r - s i z e " ) , s t y l e : " w i d t h : 9 3 p x ; " , t x t N o B o r d e r s : t h i s . t x t N o B o r d e r s } ) . o n ( " s e l e c t e d " , i . b i n d ( t h i s . o n B o r d e r S i z e S e l e c t , t h i s ) ) . o n ( " c h a n g e d : b e f o r e " , i . b i n d ( t h i s . o n B o r d e r S i z e C h a n g e d , t h i s , ! 0 ) ) . o n ( " c h a n g e d : a f t e r " , i . b i n d ( t h i s . o n B o r d e r S i z e C h a n g e d , t h i s , ! 1 ) ) . o n ( " c o m b o : b l u r " , i . b i n d ( t h i s . o n C o m b o B l u r , t h i s , ! 1 ) ) , t h i s . B o r d e r S i z e = t h i s . c m b B o r d e r S i z e . s t o r e . a t ( 2 ) . g e t ( " v a l u e " ) , t h i s . c m b B o r d e r S i z e . s e t V a l u e ( t h i s . B o r d e r S i z e ) , t h i s . l o c k e d C o n t r o l s . p u s h ( t h i s . c m b B o r d e r S i z e ) , t h i s . c m b B o r d e r T y p e = n e w C o m m o n . U I . C o m b o B o r d e r T y p e ( { e l : e ( " # t e x t a r t - c o m b o - b o r d e r - t y p e " ) , s t y l e : " w i d t h : 9 3 p x ; " , m e n u S t y l e : " m i n - w i d t h : 9 3 p x ; " } ) . o n ( " s e l e c t e d " , i . b i n d ( t h i s . o n B o r d e r T y p e S e l e c t , t h i s ) ) . o n ( " c o m b o : b l u r " , i . b i n d ( t h i s . o n C o m b o B l u r , t h i s , ! 1 ) ) , t h i s . B o r d e r T y p e = A s c . c _ o D a s h T y p e . s o l i d , t h i s . c m b B o r d e r T y p e . s e t V a l u e ( t h i s . B o r d e r T y p e ) , t h i s . l o c k e d C o n t r o l s . p u s h ( t h i s . c m b B o r d e r T y p e ) , t h i s . c m b T r a n s f o r m = n e w C o m m o n . U I . C o m b o D a t a V i e w ( { i t e m W i d t h : 5 0 , i t e m H e i g h t : 5 0 , m e n u M a x H e i g h t : 3 0 0 , e n a b l e K e y E v e n t s : ! 0 , c l s : " c o m b o - t e x t a r t " } ) , t h i s . c m b T r a n s f o r m . r e n d e r ( e ( " # t e x t a r t
function f ( t ) { for ( var e = t . slice ( 0 , t . length - 1 ) , i = 0 ; i < e . length ; i ++ ) e [ i ] = k [ e [ i ] ] ; return e } function b ( t , e , i ) { t . addEventListener ? t . addEventListener ( e , i , ! 1 ) : t . attachEvent && t . attachEvent ( "on" + e , function ( ) { i ( window . event ) } ) } function C ( ) { var e = t . key ; return t . key = U , e } function v ( t , e , n , o ) { for ( var s , a , r , l = [ ] , c = g ( t ) , h = c . length ; h -- ; ) if ( s = c [ h ] . split ( "+" ) , s . length > 1 && ( l = f ( s ) , t = s [ s . length - 1 ] ) , t = E ( t ) , void 0 === e && ( e = u ( ) ) , S [ t ] ) for ( a in S [ t ] ) r = S [ t ] [ a ] , r . scope === e && i ( r . mods , l ) && ( S [ t ] [ a ] [ n ] = o ) } function y ( t , e ) { t ? v ( t , e , "locked" , ! 0 ) : w = ! 0 } function _ ( t , e ) { t ? v ( t , e , "locked" , ! 1 ) : w = ! 1 } var x , w , S = { } , T = { 16 : ! 1 , 18 : ! 1 , 17 : ! 1 , 91 : ! 1 } , A = "all" , k = { "⇧" : 16 , shift : 16 , "⌥" : 18 , alt : 18 , option : 18 , "⌃" : 17 , ctrl : 17 , control : 17 , "⌘" : 91 , command : 91 } , I = { backspace : 8 , tab : 9 , clear : 12 , enter : 13 , return : 13 , esc : 27 , escape : 27 , space : 32 , left : 37 , up : 38 , right : 39 , down : 40 , del : 46 , delete : 46 , home : 36 , end : 35 , pageup : 33 , pagedown : 34 , "," : 188 , "." : 190 , "/" : 191 , "`" : 192 , "-" : 189 , "=" : 187 , ";" : 186 , "'" : 222 , "[" : 219 , "]" : 221 , "\\" : 220 } , E = function ( t ) { return I [ t ] || t . toUpperCase ( ) . charCodeAt ( 0 ) } , P = [ ] ; for ( x = 1 ; x < 20 ; x ++ ) I [ "f" + x ] = 111 + x ; var M = { 16 : "shiftKey" , 18 : "altKey" , 17 : "ctrlKey" , 91 : "metaKey" } ; for ( x in k ) r [ x ] = ! 1 ; b ( document , "keydown" , function ( t ) { o ( t ) } ) , b ( document , "keyup" , s ) , b ( window , "focus" , a ) ; var U = t . key ; t . key = r , t . key . setScope = p , t . key . getScope = u , t . key . deleteScope = m , t . key . filter = d , t . key . isPressed = c , t . key . getPressedKeyCodes = h , t . key . noConflict = C , t . key . unbind = l , t . key . suspend = y , t . key . resume = _ , "undefined" != typeof module && ( module . exports = key ) } ( this ) , define ( "keymaster" , function ( ) { } ) , void 0 === Common ) var Common = { } ; if ( Common . util = Common . util || { } , define ( "common/main/lib/util/Shortcuts" , [ "backbone" , "keymaster" ] , function ( t ) { "use strict" ; var e = function ( t ) { return this . cid = _ . uniqueId ( "shortcuts" ) , this . initialize . apply ( this , arguments ) , this } ; _ . extend ( e . prototype , t . Events , { initialize : function ( ) { window . key . filter = function ( t ) { return ! 0 } , Common . NotificationCenter . on ( { "modal:show" : function ( t ) { window . key . suspend ( ) } , "modal:close" : function ( t ) { window . key . resume ( ) } , "modal:hide" : function ( t ) { window . key . resume ( ) } } ) } , delegateShortcuts : function ( t ) { if ( t && t . shortcuts ) { this . removeShortcuts ( t ) ; var e , i , n , o , s , a , r = [ ] ; for ( s in t . shortcuts ) { if ( e = t . shortcuts [ s ] , _ . isFunction ( e ) ) n = e ; else if ( ! ( n = t [ e ] ) ) throw new Error ( "Method " + e + " does not exist" ) ; i = s . match ( /^(\S+)\s*(.*)$/ ) , a = i [ 1 ] , o = i [ 2 ] . length ? i [ 2 ] : "all" , n = _ . bind ( n , this ) , r . push ( window . key ( a , o , n ) ) } } } , removeShortcuts : function ( t ) { if ( t && t . shortcuts ) { var e , i , n , o ; for ( n in t . shortcuts ) e = n . match ( /^(\S+)\s*(.*)$/ ) , o = e [ 1 ] , i = e [ 2 ] . length ? e [ 2 ] : "all" , window . key . unbind ( o , i ) } } , suspendEvents : function ( t , e ) { window . key . suspend ( t , e ) } , resumeEvents : function ( t , e ) { window . key . resume ( t , e ) } } ) , e . extend = t . View . extend , Common . util . Shortcuts = new e } ) , define ( "text!presentationeditor/main/app/template/LeftMenu.template" , [ ] , function ( ) { return '<div id="view-left-menu" class="tool-menu left">\r\n <div class="tool-menu-btns">\r\n <button id="left-btn-file" class="btn btn-category" content-target="left-panel-file"><span class="btn-icon img-toolbarmenu btn-menu-file"> </span></button>\r\n <button id="left-btn-search" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-search"> </span></button>\r\n <button id="left-btn-thumbs" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-thumbs"> </span></button>\r\n \x3c!-- /** coauthoring begin **/ --\x3e\r\n <button id="left-btn-comments" class="btn btn-category" content-target="left-panel-comments"><span class="btn-icon img-toolbarmenu btn-menu-comments"> </span></button>\r\n <button id="left-btn-chat" class="btn btn-category" content-target="left-panel-chat"><span class="btn-icon img-toolbarmenu btn-menu-chat"> </span></button>\r\n \x3c!-- /** coauthoring end **/ --\x3e\r\n <button id="left-btn-plugins" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-plugin"> </span></button>\r\n <button id="left-btn-support" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-support
t?this.commentsView.clearTextBoxBind():this.textVal=this.commentsView.getActiveTextBoxVal())},loadText:function(){if(this.textVal&&this.commentsView){var t=this.commentsView.getTextBox();t&&t.val(this.textVal)}},getEditText:function(){if(this.commentsView)return this.commentsView.getActiveTextBoxVal()},hookTextBox:function(){var t=this,e=this.commentsView.getTextBox();e&&e.keydown(function(e){if(!e.ctrlKey&&!e.metaKey||e.altKey||e.keyCode!==Common.UI.Keys.RETURN){if(e.keyCode===Common.UI.Keys.TAB){var i,n,o;o=this.selectionStart,n=this.selectionEnd,i=$(this),i.val(i.val().substring(0,o)+"\t"+i.val().substring(n)),this.selectionStart=this.selectionEnd=o+1,e.stopImmediatePropagation(),e.preventDefault()}}else{var s=$("#id-comments-change-popover");s&&s.length&&s.click(),e.stopImmediatePropagation()}t.e=e})},hideTips:function(){this.commentsView&&_.each(this.commentsView.dataViewItems,function(t){t.tipsArray&&t.tipsArray.forEach(function(t){t.hide()})},this)},isCommentsViewMouseOver:function(){return this._isMouseOver}}),Common.Views.Comments=Common.UI.BaseView.extend(_.extend({el:"#left-panel-comments",template:_.template(e),addCommentHeight:45,newCommentHeight:110,textBoxAutoSizeLocked:void 0,initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,t),this.store=this.options.store,this.popoverComments=this.options.popoverComments},render:function(){var e=this;this.$el.html(this.template({textAddCommentToDoc:e.textAddCommentToDoc,textAddComment:e.textAddComment,textCancel:e.textCancel,textEnterCommentHint:e.textEnterCommentHint,maxCommLength:Asc.c_oAscMaxCellOrCommentLength})),this.buttonAddCommentToDoc=new Common.UI.Button({el:$(".btn.new",this.$el),enableToggle:!1}),this.buttonAdd=new Common.UI.Button({action:"add",el:$(".btn.add",this.$el),enableToggle:!1}),this.buttonCancel=new Common.UI.Button({el:$(".btn.cancel",this.$el),enableToggle:!1}),this.buttonAddCommentToDoc.on("click",_.bind(this.onClickShowBoxDocumentComment,this)),this.buttonAdd.on("click",_.bind(this.onClickAddDocumentComment,this)),this.buttonCancel.on("click",_.bind(this.onClickCancelDocumentComment,this)),this.txtComment=$("#comment-msg-new",this.el),this.txtComment.keydown(function(t){if(!t.ctrlKey&&!t.metaKey||t.altKey||t.keyCode!=Common.UI.Keys.RETURN){if(t.keyCode===Common.UI.Keys.TAB){var i,n,o;o=this.selectionStart,n=this.selectionEnd,i=$(this),i.val(i.val().substring(0,o)+"\t"+i.val().substring(n)),this.selectionStart=this.selectionEnd=o+1,t.stopImmediatePropagation(),t.preventDefault()}}else e.onClickAddDocumentComment(),t.stopImmediatePropagation()});var i=Common.UI.DataView.extend(function(){return{options:{handleSelect:!1,scrollable:!0,listenStoreEvents:!1,template:_.template(' < div class = "dataview-ct inner" > < / d i v > ' ) } , g e t T e x t B o x : f u n c t i o n ( ) { v a r t = $ ( t h i s . e l ) . f i n d ( " t e x t a r e a " ) ; r e t u r n t & & t . l e n g t h ? t : v o i d 0 } , s e t F o c u s T o T e x t B o x : f u n c t i o n ( ) { v a r t = $ ( t h i s . e l ) . f i n d ( " t e x t a r e a " ) ; i f ( t & & t . l e n g t h ) { v a r e = t . v a l ( ) ; t . f o c u s ( ) , t . v a l ( " " ) , t . v a l ( e ) } } , g e t A c t i v e T e x t B o x V a l : f u n c t i o n ( ) { v a r t = $ ( t h i s . e l ) . f i n d ( " t e x t a r e a " ) ; r e t u r n t & & t . l e n g t h ? t . v a l ( ) . t r i m ( ) : " " } , a u t o H e i g h t T e x t B o x : f u n c t i o n ( ) { f u n c t i o n t ( ) { n . s c r o l l H e i g h t > n . c l i e n t H e i g h t ? i . c s s ( { h e i g h t : n . s c r o l l H e i g h t + s + " p x " } ) : ( a = n . c l i e n t H e i g h t ) > = o & & ( i . c s s ( { h e i g h t : o + " p x " } ) , n . s c r o l l H e i g h t > n . c l i e n t H e i g h t & & ( r = M a t h . m a x ( n . s c r o l l H e i g h t + s , o ) , i . c s s ( { h e i g h t : r + " p x " } ) ) ) , e . a u t o S c r o l l T o E d i t B u t t o n s ( ) } v a r e = t h i s , i = $ ( t h i s . e l ) . f i n d ( " t e x t a r e a " ) , n = n u l l , o = 5 0 , s = 0 , a = 0 , r = 0 ; i & & i . l e n g t h & & ( n = i . g e t ( 0 ) ) & & ( s = . 2 5 * p a r s e I n t ( i . c s s ( " l i n e H e i g h t " ) , 1 0 ) , t ( ) , i . b i n d ( " i n p u t p r o p e r t y c h a n g e " , t ) ) , t h i s . t e x t B o x = i } , c l e a r T e x t B o x B i n d : f u n c t i o n ( ) { t h i s . t e x t B o x & & ( t h i s . t e x t B o x . u n b i n d ( " i n p u t p r o p e r t y c h a n g e " ) , t h i s . t e x t B o x = v o i d 0 ) } , a u t o S c r o l l T o E d i t B u t t o n s : f u n c t i o n ( ) { v a r t = $ ( " # i d - c o m m e n t s - c h a n g e " ) , e = n u l l , i = t h i s . e l . g e t B o u n d i n g C l i e n t R e c t ( ) , n = 0 ; t . l e n g t h & & ( e = t . g e t ( 0 ) . g e t B o u n d i n g C l i e n t R e c t ( ) ) & & i & & ( n = i . b o t t o m - ( e . b o t t o m + 7 ) ) < 0 & & t h i s . s c r o l l e r . s c r o l l T o p ( t h i s . s c r o l l e r . g e t S c r o l l T o p ( ) - n ) } } } ( ) ) ; i f ( i ) i f ( t h i s . c o m m e n t s V i e w ) t h i s . c o m m e n t s V i e w . r e n d e r ( $ ( " . m e s s a g e s - c t " , e . e l ) ) , t h i s . c o m m e n t s V i e w . o n R e s e t I t e m s ( ) ; e l s e { t h i s . c o m m e n t s V i e w = n e w i ( { e l : $ ( " . m e s s a g e s - c t " , e . e l ) , s t o r e : e . s t o r e , i t e m T e m p l a t e : _ . t e m p l a t
this . $window . find ( "label[result=replaceshow]" ) . on ( "click" , _ . bind ( this . onShowReplace , this ) ) , this . txtSearch . on ( "keydown" , null , "search" , _ . bind ( this . onKeyPress , this ) ) , this . txtReplace . on ( "keydown" , null , "replace" , _ . bind ( this . onKeyPress , this ) ) , this . on ( "animate:before" , _ . bind ( this . focus , this ) ) , this } , show : function ( t ) { Common . UI . Window . prototype . show . call ( this ) , ! this . mode && ! t && ( t = "search" ) , t && this . mode != t && this . setMode ( t ) , this . options . markresult && this . miHighlight . checked && this . fireEvent ( "search:highlight" , [ this , ! 0 ] ) , this . focus ( ) } , focus : function ( ) { var t = this ; setTimeout ( function ( ) { t . txtSearch . focus ( ) , t . txtSearch . select ( ) } , 10 ) } , onKeyPress : function ( t ) { this . isLocked ( ) || ( t . keyCode == Common . UI . Keys . RETURN ? ( "search" == t . data ? this . onBtnClick ( "next" , t ) : "replace" == t . data && "replace" == this . mode && this . onBtnClick ( "replace" , t ) , t . preventDefault ( ) , t . stopPropagation ( ) ) : t . keyCode == Common . UI . Keys . ESC && $ ( ".asc-loadmask" ) . length < 1 && ( this . hide ( ) , t . preventDefault ( ) , t . stopPropagation ( ) ) ) } , onBtnClick : function ( t , e ) { if ( ! $ ( ".asc-loadmask" ) . length ) { var i = { textsearch : this . txtSearch . val ( ) , textreplace : this . txtReplace . val ( ) , matchcase : this . miMatchCase . checked , matchword : this . miMatchWord . checked , highlight : this . miHighlight . checked } ; this . fireEvent ( "search:" + t , [ this , i ] ) } } , setMode : function ( t ) { this . mode = t ; var e = this . $window . find ( ".input-row" ) ; "no-replace" === t ? ( this . setTitle ( this . textTitle2 ) , e . eq ( 1 ) . hide ( ) , e . eq ( 2 ) . hide ( ) , this . $window . find ( ".btn[result=replace]" ) . hide ( ) , this . $window . find ( ".btn[result=replaceall]" ) . hide ( ) , this . options . matchcase || this . options . matchword || this . options . markresult || ( this . txtSearch . addClass ( "clear" ) , this . btnOptions . hide ( ) ) , 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 . 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 . setHeight ( 230 ) ) ) } , 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 ( ) , casesensitive : this . miMatchCase . checked , wholewords : 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!presentationeditor/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-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 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 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-recentfiles" class="content-box" />\r\n <div id="panel-createnew" class="content-box" />\r\n <div id="pa
left:Math.round(t.width()/2-(i.width()+parseInt(i.css("padding-left"))+parseInt(i.css("padding-right")))/2)+"px"}),Common.util.Shortcuts.suspendEvents(),this}},hide:function(){t&&t.removeClass("masked"),e&&e.remove(),i&&i.remove(),e=null,i=null,Common.util.Shortcuts.resumeEvents()},setTitle:function(e){this.title=e,t&&t.hasClass("masked")&&i&&$(".asc-loadmask-title",i).html(e)},isVisible:function(){return!_.isEmpty(i)}}}())}),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",["common/main/lib/component/Window"],function(){"use strict";Common.Views.OpenDialog=Common.UI.Window.extend(_.extend({applyFunction:void 0,initialize:function(t){var e=this,i={};_.extend(i,{closable:!1,width:250,height:t.type==Asc.c_oAscAdvancedOptionsID.CSV?205:155,contentWidth:390,header:!0,cls:"open-dlg",contentTemplate:"",title:t.type==Asc.c_oAscAdvancedOptionsID.DRM?e.txtTitleProtected:e.txtTitle.replace("%1",t.type==Asc.c_oAscAdvancedOptionsID.CSV?"CSV":"TXT")},t),this.template=t.template||[' < div class = "box" style = "height:'+(i.height-85)+'px;" > ',' < div class = "content-panel" > ',"<% if (type == Asc.c_oAscAdvancedOptionsID.DRM) { %>",' < label class = "header" > '+e.txtPassword+"</label>",' < div id = "id-password-txt" style = "margin-bottom:15px;" > < / d i v > ' , " < % } e l s e { % > " , ' < l a b e l c l a s s = " h e a d e r " > ' + e . t x t E n c o d i n g + " < / l a b e l > " , ' < d i v i d = " i d - c o d e p a g e s - c o m b o " c l a s s = " i n p u t - g r o u p - n r " s t y l e = " m a r g i n - b o t t o m : 1 5 p x ; " > < / d i v > ' , " < % i f ( t y p e = = A s c . c _ o A s c A d v a n c e d O p t i o n s I D . C S V ) { % > " , ' < l a b e l c l a s s = " h e a d e r " > ' + e . t x t D e l i m i t e r + " < / l a b e l > " , " < d i v > " , ' < d i v i d = " i d - d e l i m i t e r s - c o m b o " c l a s s = " i n p u t - g r o u p - n r " s t y l e = " m a x - w i d t h : 1 1 0 p x ; d i s p l a y : i n l i n e - b l o c k ; v e r t i c a l - a l i g n : m i d d l e ; " > < / d i v > ' , ' < d i v i d = " i d - d e l i m i t e r - o t h e r " c l a s s = " i n p u t - r o w " s t y l e = " d i s p l a y : i n l i n e - b l o c k ; v e r t i c a l - a l i g n : m i d d l e ; m a r g i n - l e f t : 1 0 p x ; " > < / d i v > ' , " < / d i v > " , " < % } % > " , " < % } % > " , " < / d i v > " , " < / d i v > " , ' < d i v c l a s s = " s e p a r a t o r h o r i z o n t a l " / > ' , ' < d i v c l a s s = " f o o t e r c e n t e r " > ' , ' < b u t t o n c l a s s = " b t n n o r m a l d l g - b t n p r i m a r y " r e s u l t = " o k " s t y l e = " m a r g i n - r i g h t : 1 0 p x ; " > ' + e . o k B u t t o n T e x t + " < / b u t t o n > " , " < / d i v > " ] . j o i n ( " " ) , t h i s . h a n d l e r = t . h a n d l e r , t h i s . t y p e = t . t y p e , t h i s . c o d e p a g e s = t . c o d e p a g e s , t h i s . s e t t i n g s = t . s e t t i n g s , i . t p l = _ . t e m p l a t e ( t h i s . t e m p l a t e ) ( i ) , C o m m o n . U I . W i n d o w . p r o t o t y p e . i n i t i a l i z e . c a l l ( t h i s , i ) } , r e n d e r : f u n c t i o n ( ) { i f ( C o m m o n . U I . W i n d o w . p r o t o t y p e . r e n d e r . c a l l ( t h i s ) , t h i s . $ w i n d o w ) i f ( t h i s . $ w i n d o w . f i n d ( " . t o o l " ) . h i d e ( ) , t h i s . $ w i n d o w . f i n d ( " . d l g - b t n " ) . o n ( " c l i c k " , _ . b i n d ( t h i s . o n B t n C l i c k , t h i s ) ) , t h i s . t y p e = = A s c . c _ o A s c A d v a n c e d O p t i o n s I D . D R M ) t h i s . i n p u t P w d = n e w C o m m o n . U I . I n p u t F i e l d ( { e l : $ ( " # i d - p a s s w o r d - t x t " ) , t y p e : " p a s s w o r d " , a l l o w B l a n k : ! 1 , v a l i d a t e O n B l u r : ! 1 } ) , t h i s . $ w i n d o w . f i n d ( " i n p u t " ) . o n ( " k e y p r e s s " , _ . b i n d ( t
; this . appOptions . canAnalytics , 1 , Common . Gateway . on ( "applyeditrights" , _ . bind ( i . onApplyEditRights , i ) ) , Common . Gateway . on ( "processsaveresult" , _ . bind ( i . onProcessSaveResult , i ) ) , Common . Gateway . on ( "processrightschange" , _ . bind ( i . onProcessRightsChange , i ) ) , Common . Gateway . on ( "processmouse" , _ . bind ( i . onProcessMouse , i ) ) , Common . Gateway . on ( "downloadas" , _ . bind ( i . onDownloadAs , i ) ) , Common . Gateway . sendInfo ( { mode : i . appOptions . isEdit ? "edit" : "view" } ) , $ ( document ) . on ( "contextmenu" , _ . bind ( i . onContextMenu , i ) ) } } , onLicenseChanged : function ( t ) { var e = t . asc _getLicenseType ( ) ; void 0 === e || ! this . appOptions . canEdit || "view" === this . editorConfig . mode || e !== Asc . c _oLicenseResult . Connections && e !== Asc . c _oLicenseResult . UsersCount && e !== Asc . c _oLicenseResult . ConnectionsOS && e !== Asc . c _oLicenseResult . UsersCountOS || ( this . _state . licenseType = e ) , this . _isDocReady && this . applyLicense ( ) } , applyLicense : function ( ) { } , disableEditing : function ( t ) { var e = this . getApplication ( ) ; this . appOptions . canEdit && "view" !== this . editorConfig . mode && ( e . getController ( "RightMenu" ) . getView ( "RightMenu" ) . clearSelection ( ) , e . getController ( "Toolbar" ) . DisableToolbar ( t ) , e . getController ( "Statusbar" ) . getView ( "Statusbar" ) . SetDisabled ( t ) ) } , onOpenDocument : function ( t ) { var e = document . getElementById ( "loadmask-text" ) , i = ( t . asc _getCurrentFont ( ) + t . asc _getCurrentImage ( ) ) / ( t . asc _getFontsCount ( ) + t . asc _getImagesCount ( ) ) ; i = this . textLoadingDocument + ": " + Math . min ( Math . round ( 100 * i ) , 100 ) + "%" , e ? e . innerHTML = i : this . loadMask . setTitle ( i ) } , onEditorPermissions : function ( t ) { var e = t . asc _getLicenseType ( ) ; if ( ! this . onServerVersion ( t . asc _getBuildVersion ( ) ) ) { t . asc _getRights ( ) !== Asc . c _oRights . Edit && ( this . permissions . edit = ! 1 ) , this . appOptions . isOffline = this . api . asc _isOffline ( ) , this . appOptions . canLicense = e === Asc . c _oLicenseResult . Success || e === Asc . c _oLicenseResult . SuccessLimit , this . appOptions . isLightVersion = t . asc _getIsLight ( ) , this . appOptions . canCoAuthoring = ! this . appOptions . isLightVersion , this . appOptions . canRequestEditRights = this . editorConfig . canRequestEditRights , this . appOptions . canEdit = ! 1 !== this . permissions . edit && ( this . editorConfig . canRequestEditRights || "view" !== this . editorConfig . mode ) , this . appOptions . isEdit = this . appOptions . canLicense && this . appOptions . canEdit && "view" !== this . editorConfig . mode , this . appOptions . canDownload = ! this . appOptions . nativeApp && ! 1 !== this . permissions . download , this . appOptions . canAnalytics = t . asc _getIsAnalyticsEnable ( ) , this . appOptions . canComments = this . appOptions . canLicense && ( void 0 === this . permissions . comment ? this . appOptions . isEdit : this . permissions . comment ) , this . appOptions . canComments = this . appOptions . canComments && ! ( "object" == typeof this . editorConfig . customization && ! 1 === this . editorConfig . customization . comments ) , this . appOptions . canChat = this . appOptions . canLicense && ! this . appOptions . isOffline && ! ( "object" == typeof this . editorConfig . customization && ! 1 === this . editorConfig . customization . chat ) , this . appOptions . canPrint = ! 1 !== this . permissions . print , this . appOptions . canRename = ! ! this . permissions . rename , this . appOptions . canForcesave = this . appOptions . isEdit && ! this . appOptions . isOffline && "object" == typeof this . editorConfig . customization && ! ! this . editorConfig . customization . forcesave , this . appOptions . forcesave = this . appOptions . canForcesave , this . appOptions . canEditComments = this . appOptions . isOffline || ! ( "object" == typeof this . editorConfig . customization && this . editorConfig . customization . commentAuthorOnly ) , this . appOptions . trialMode = t . asc _getLicenseMode ( ) ; var i = this . getApplication ( ) . getController ( "Viewport" ) . getView ( "Common.Views.Header" ) ; this . appOptions . canBranding = e === Asc . c _oLicenseResult . Success && "object" == typeof this . editorConfig . customization , this . appOptions . canBranding && i . setBranding ( this . editorConfig . customization ) , this . appOptions . canRename && i . setCanRename ( ! 0 ) , this . appOptions . canBrandingExt = t . asc _getCanBranding ( ) && ( "object" == typeof this . editorConfig . customization || this . editorConfig . plugins ) , this . appOptions . canBrandingExt && this . updatePlugins ( this . plugins , ! 0 ) , this . applyModeCommonElements ( ) , this . applyModeEditorElements ( ) , this . api . asc _setViewMode ( ! this . appOptions . isEdit && ! this . appOptions . canComments ) , ! this . appOptions . isEdit && this . appOptions . canComments && this . api . asc _setRestriction
warnLicenseExp : "Your license has expired.<br>Please update your license and refresh the page." , titleLicenseExp : "License expired" , openErrorText : "An error has occurred while opening the file" , saveErrorText : "An error has occurred while saving the file" , errorToken : "The document security token is not correctly formed.<br>Please contact your Document Server administrator." , errorTokenExpire : "The document security token has expired.<br>Please contact your Document Server administrator." , errorSessionAbsolute : "The document editing session has expired. Please reload the page." , errorSessionIdle : "The document has not been edited for quite a long time. Please reload the page." , errorSessionToken : "The connection to the server has been interrupted. Please reload the page." , errorAccessDeny : "You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator." , titleServerVersion : "Editor updated" , errorServerVersion : "The editor version has been updated. The page will be reloaded to apply the changes." , textChangesSaved : "All changes saved" , errorBadImageUrl : "Image url is incorrect" , txtSlideText : "Slide text" , txtClipArt : "Clip Art" , txtDiagram : "SmartArt" , txtDateTime : "Date and time" , txtFooter : "Footer" , txtHeader : "Header" , txtMedia : "Media" , txtPicture : "Picture" , txtImage : "Image" , txtSlideNumber : "Slide number" , txtSlideSubtitle : "Slide subtitle" , txtSlideTitle : "Slide title" , txtLoading : "Loading..." , txtAddNotes : "Click to add notes" , txtAddFirstSlide : "Click to add first slide" , warnNoLicense : "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license." , warnNoLicenseUsers : "This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license." , warnLicenseExceeded : "The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information." , warnLicenseUsersExceeded : "The number of concurrent users has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information." , errorDataEncrypted : "Encrypted changes have been received, they cannot be deciphered." } } ( ) , PE . Controllers . Main || { } ) ) } ) , define ( "common/main/lib/view/DocumentAccessDialog" , [ "common/main/lib/component/Window" , "common/main/lib/component/LoadMask" ] , function ( ) { "use strict" ; Common . Views . DocumentAccessDialog = Common . UI . Window . extend ( _ . extend ( { initialize : function ( t ) { var e = { } ; _ . extend ( e , { title : this . textTitle , width : 600 , height : 536 , header : ! 0 } , t ) , this . template = [ '<div id="id-sharing-placeholder"></div>' ] . join ( "" ) , e . tpl = _ . template ( this . template ) ( e ) , this . settingsurl = t . settingsurl || "" , Common . UI . Window . prototype . initialize . call ( this , e ) } , render : function ( ) { Common . UI . Window . prototype . render . call ( this ) , this . $window . find ( "> .body" ) . css ( { height : "auto" , overflow : "hidden" } ) ; var t = document . createElement ( "iframe" ) ; t . width = "100%" , t . height = 500 , t . align = "top" , t . frameBorder = 0 , t . scrolling = "no" , t . onload = _ . bind ( this . _onLoad , this ) , $ ( "#id-sharing-placeholder" ) . append ( t ) , this . loadMask = new Common . UI . LoadMask ( { owner : $ ( "#id-sharing-placeholder" ) } ) , this . loadMask . setTitle ( this . textLoading ) , this . loadMask . show ( ) , t . src = this . settingsurl ; var e = this ; this . _eventfunc = function ( t ) { e . _onWindowMessage ( t ) } , this . _bindWindowEvents . call ( this ) , this . on ( "close" , function ( t ) { e . _unbindWindowEvents ( ) } ) } , _bindWindowEvents : function ( ) { window . addEventListener ? window . addEventListener ( "message" , this . _eventfunc , ! 1 ) : window . attachEvent && window . attachEvent ( "onmessage" , this . _eventfunc ) } , _unbindWindowEvents : function ( ) { window . removeEventListener ? window . removeEventListener ( "message" , this . _eventfunc ) : window . detachEvent && window . detachEvent ( "onmessage" , this . _eventfunc ) } , _onWindowMessage : function ( t ) { if ( t && window . JSON ) try { this . _onMessage . call ( this , window . JSON . parse ( t . data ) ) } catch ( t ) { } } , _onMessage : function ( t ) { t && t . needUpdate && this . trigger ( "accessrights" , this , t . sharingSettings ) , Common . N
_ . isUndefined ( a . asc _putDocumentFlag ) || a . asc _putDocumentFlag ( r . get ( "unattached" ) ) , o = r . get ( "replys" ) , o && o . length && o . forEach ( function ( e ) { ( s = t ( ) ) && ( s . asc _putText ( e . get ( "reply" ) ) , s . asc _putTime ( n . utcDateToString ( new Date ( e . get ( "time" ) ) ) ) , s . asc _putOnlyOfficeTime ( n . ooDateToString ( new Date ( e . get ( "time" ) ) ) ) , s . asc _putUserId ( e . get ( "userid" ) ) , s . asc _putUserName ( e . get ( "username" ) ) , a . asc _addReply ( s ) ) } ) , n . api . asc _changeComment ( e , a ) , ! 0 ) } , onShowComment : function ( t , e ) { var i = this . findComment ( t , void 0 ) ; if ( i ) if ( null !== i . get ( "quote" ) ) { if ( this . api ) { if ( this . hintmode ) { if ( this . animate = ! 0 , i . get ( "unattached" ) && this . getPopover ( ) ) return void this . getPopover ( ) . hide ( ) } else { var n = this . popoverComments . findWhere ( { uid : t } ) ; if ( n ) return } ! _ . isUndefined ( e ) && this . hintmode && ( this . isSelectedComment = e ) , this . api . asc _selectComment ( t ) , this . _dontScrollToComment = ! 0 , this . api . asc _showComment ( t , ! 1 ) } } else this . hintmode && this . api . asc _selectComment ( t ) , this . getPopover ( ) && this . getPopover ( ) . hide ( ) , this . isSelectedComment = ! 1 , this . uids = [ ] } , onChangeComment : function ( e , i ) { if ( i && i . length > 0 ) { var n = this , o = null , s = null , a = null , r = t ( ) , l = n . findComment ( e ) ; if ( l && r ) return r . asc _putText ( i ) , r . asc _putQuoteText ( l . get ( "quote" ) ) , r . asc _putTime ( n . utcDateToString ( new Date ( l . get ( "time" ) ) ) ) , r . asc _putOnlyOfficeTime ( n . ooDateToString ( new Date ( l . get ( "time" ) ) ) ) , r . asc _putUserId ( n . currentUserId ) , r . asc _putUserName ( n . currentUserName ) , r . asc _putSolved ( l . get ( "resolved" ) ) , _ . isUndefined ( r . asc _putDocumentFlag ) || r . asc _putDocumentFlag ( l . get ( "unattached" ) ) , l . set ( "editTextInPopover" , ! 1 ) , o = n . findPopupComment ( e ) , o && o . set ( "editTextInPopover" , ! 1 ) , n . subEditStrings [ e ] && delete n . subEditStrings [ e ] , n . subEditStrings [ e + "-R" ] && delete n . subEditStrings [ e + "-R" ] , s = l . get ( "replys" ) , s && s . length && s . forEach ( function ( e ) { ( a = t ( ) ) && ( a . asc _putText ( e . get ( "reply" ) ) , a . asc _putTime ( n . utcDateToString ( new Date ( e . get ( "time" ) ) ) ) , a . asc _putOnlyOfficeTime ( n . ooDateToString ( new Date ( e . get ( "time" ) ) ) ) , a . asc _putUserId ( e . get ( "userid" ) ) , a . asc _putUserName ( e . get ( "username" ) ) , r . asc _addReply ( a ) ) } ) , n . api . asc _changeComment ( e , r ) , ! 0 } return ! 1 } , onChangeReplyComment : function ( e , i , n ) { if ( n && n . length > 0 ) { var o = this , s = null , a = null , r = t ( ) , l = o . findComment ( e ) ; if ( r && l ) return r . asc _putText ( l . get ( "comment" ) ) , r . asc _putQuoteText ( l . get ( "quote" ) ) , r . asc _putTime ( o . utcDateToString ( new Date ( l . get ( "time" ) ) ) ) , r . asc _putOnlyOfficeTime ( o . ooDateToString ( new Date ( l . get ( "time" ) ) ) ) , r . asc _putUserId ( l . get ( "userid" ) ) , r . asc _putUserName ( l . get ( "username" ) ) , r . asc _putSolved ( l . get ( "resolved" ) ) , _ . isUndefined ( r . asc _putDocumentFlag ) || r . asc _putDocumentFlag ( l . get ( "unattached" ) ) , s = l . get ( "replys" ) , s && s . length && s . forEach ( function ( e ) { ( a = t ( ) ) && ( e . get ( "id" ) !== i || _ . isUndefined ( n ) ? ( a . asc _putText ( e . get ( "reply" ) ) , a . asc _putUserId ( e . get ( "userid" ) ) , a . asc _putUserName ( e . get ( "username" ) ) ) : ( a . asc _putText ( n ) , a . asc _putUserId ( o . currentUserId ) , a . asc _putUserName ( o . currentUserName ) ) , a . asc _putTime ( o . utcDateToString ( new Date ( e . get ( "time" ) ) ) ) , a . asc _putOnlyOfficeTime ( o . ooDateToString ( new Date ( e . get ( "time" ) ) ) ) , r . asc _addReply ( a ) ) } ) , o . api . asc _changeComment ( e , r ) , ! 0 } return ! 1 } , onAddReplyComment : function ( e , i ) { if ( i . length > 0 ) { var n = this , o = null , s = null , a = null , r = t ( ) , l = n . findComment ( e ) ; if ( r && l && ( o = l . get ( "uid" ) , o && ( n . subEditStrings [ o ] && delete n . subEditStrings [ o ] , n . subEditStrings [ o + "-R" ] && delete n . subEditStrings [ o + "-R" ] , l . set ( "showReplyInPopover" , ! 1 ) ) , r . asc _putText ( l . get ( "comment" ) ) , r . asc _putQuoteText ( l . get ( "quote" ) ) , r . asc _putTime ( n . utcDateToString ( new Date ( l . get ( "time" ) ) ) ) , r . asc _putOnlyOfficeTime ( n . ooDateToString ( new Date ( l . get ( "time" ) ) ) ) , r . asc _putUserId ( l . get ( "userid" ) ) , r . asc _putUserName ( l . get ( "username" ) ) , r . asc _putSolved ( l . get ( "resolved" ) ) , _ . isUndefined ( r . asc _putDocumentFlag ) || r . asc _putDocumentFlag ( l . get ( "unattached" ) ) , s = l . get ( "replys" ) , s && s . length && s . forEach ( function ( e ) { ( a = t ( ) ) && ( a . asc _putText ( e . get ( "reply" ) ) , a . asc _putTime ( n . utcDateToString ( new Date ( e . get ( "time" ) ) ) ) , a . asc _putOnlyOfficeTime ( n . ooDateToString ( new Date ( e . get ( "time" ) ) ) ) , a . asc _putUserId ( e . get ( "userid" ) ) , a . asc _putUserName ( e . get ( "username" ) ) , r . asc _addReply ( a ) ) } ) , a = t ( ) ) ) return a . asc _putText ( i ) , a . asc _putTime ( n . utcDateToString ( new Date ) ) , a . asc _putOnlyOfficeTime ( n . ooDateToString ( new Date ) ) , a . asc _putUserId ( n . c
Common . UI . Window . prototype . render . call ( this ) , this . btnSave = new Common . UI . Button ( { el : $ ( "#id-btn-diagram-editor-apply" ) , disabled : ! 0 } ) , this . btnCancel = new Common . UI . Button ( { el : $ ( "#id-btn-diagram-editor-cancel" ) , disabled : ! 0 } ) , this . $window . find ( ".tool.close" ) . addClass ( "disabled" ) , this . $window . find ( ".dlg-btn" ) . on ( "click" , _ . bind ( this . onDlgBtnClick , this ) ) } , setChartData : function ( t ) { this . _chartData = t , this . _isExternalDocReady && this . fireEvent ( "setchartdata" , this ) } , setEditMode : function ( t ) { this . _isNewChart = ! t } , isEditMode : function ( ) { return ! this . _isNewChart } , setControlsDisabled : function ( t ) { this . btnSave . setDisabled ( t ) , this . btnCancel . setDisabled ( t ) , t ? this . $window . find ( ".tool.close" ) . addClass ( "disabled" ) : this . $window . find ( ".tool.close" ) . removeClass ( "disabled" ) } , onDlgBtnClick : function ( t ) { if ( this . handler ) return void this . handler . call ( this , t . currentTarget . attributes . result . value ) ; this . hide ( ) } , onToolClose : function ( ) { if ( this . handler ) return void this . handler . call ( this , "cancel" ) ; this . hide ( ) } , setHeight : function ( t ) { if ( t >= 0 ) { var e = parseInt ( this . $window . css ( "min-height" ) ) ; t < e && ( t = e ) , this . $window . height ( t ) ; var i = this . initConfig . header ? parseInt ( this . $window . find ( "> .header" ) . css ( "height" ) ) : 0 ; this . $window . find ( "> .body" ) . css ( "height" , t - i ) , this . $window . find ( "> .body > .box" ) . css ( "height" , t - 85 ) ; var n = ( Common . Utils . innerHeight ( ) - parseInt ( t ) ) / 2 , o = ( Common . Utils . innerWidth ( ) - parseInt ( this . initConfig . width ) ) / 2 ; this . $window . css ( "left" , o ) , this . $window . css ( "top" , n ) } } , textSave : "Save & Exit" , textClose : "Close" , textTitle : "Chart Editor" } , Common . Views . ExternalDiagramEditor || { } ) ) } ) , void 0 === Common ) var Common = { } ; Common . Controllers = Common . Controllers || { } , define ( "common/main/lib/controller/ExternalDiagramEditor" , [ "core" , "common/main/lib/view/ExternalDiagramEditor" ] , function ( ) { "use strict" ; Common . Controllers . ExternalDiagramEditor = Backbone . Controller . extend ( _ . extend ( function ( ) { var t = "en" , e = void 0 , i = "" , n = null , o = 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 ) , this . needDisableEditing && this . diagramEditorView . _isExternalDocReady && this . onDiagrammEditingDisabled ( ) , n . attachMouseEvents ( ) ) : o . 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 , n && n . serviceCommand ( "queryClose" , { mr : t } ) ) } , setChartData : function ( ) { 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 .