{"version":3,"sources":["kendo.window.js"],"names":["f","define","$","undefined","defined","x","toInt","element","property","parseInt","css","constrain","value","low","high","normalizedValue","isNaN","indexOf","Math","max","min","Infinity","executableScript","this","type","toLowerCase","getPosition","elem","parentOverflowX","parentOverflowY","result","top","offsetTop","left","offsetLeft","parent","offsetParent","scrollTop","scrollLeft","WindowResizing","wnd","that","owner","_preventDragging","_draggable","Draggable","wrapper","filter","KWINDOWRESIZEHANDLES","group","id","dragstart","proxy","drag","dragend","userEvents","bind","addOverlay","removeOverlay","WindowDragging","dragHandle","dragcancel","stopPropagation","kendo","window","Widget","ui","TabKeyTrap","Popup","isPlainObject","activeElement","_activeElement","outerWidth","_outerWidth","outerHeight","_outerHeight","extend","each","template","BODY","NS","MODAL_NS","KWINDOW","KWINDOWTITLE","KWINDOWTITLEBAR","KWINDOWCONTENT","KDIALOGCONTENT","KOVERLAY","KCONTENTFRAME","LOADING","KHOVERSTATE","KFOCUSEDSTATE","MAXIMIZEDSTATE","VISIBLE","HIDDEN","CURSOR","OPEN","ACTIVATE","DEACTIVATE","CLOSE","REFRESH","MINIMIZE","MAXIMIZE","RESIZESTART","RESIZE","RESIZEEND","DRAGSTART","DRAGEND","ERROR","OVERFLOW","DATADOCOVERFLOWRULE","ZINDEX","MINIMIZE_MAXIMIZE","KPIN","KUNPIN","PIN_UNPIN","TITLEBAR_BUTTONS","REFRESHICON","WINDOWEVENTSHANDLED","zero","isLocalUrl","SIZE","small","medium","large","Window","init","options","visibility","display","position","content","windowContent","windowFrame","globalWindow","offset","isVisible","suppressActions","actions","length","fn","call","appendTo","containment","draggable","first","url","find","remove","is","visible","closest","addClass","_createWindow","title","_dimensions","minTop","minLeft","maxTop","maxLeft","_position","refresh","toFront","children","_tabindex","modal","_overlay","opacity","on","_buttonEnter","_buttonLeave","_windowActionHandler","_keydown","_focus","_blur","data","windowInstance","document","widgetInstance","not","i","_resizable","pinned","pin","attr","role","aria-labelledby","add","touchScroller","_resizeHandler","_onDocumentResize","_marker","guid","substring","trigger","notify","_tabKeyTrap","trap","shouldTrap","e","currentTarget","removeClass","width","height","maxHeight","sizeClass","size","dimensions","contentBoxSizing","lrBorderWidth","tbBorderWidth","paddingTop","_isPinned","_updateBoundaries","maxWidth","minWidth","minHeight","hide","innerWidth","innerHeight","clientWidth","support","scrollbar","clientHeight","_animationOptions","animation","basicAnimation","open","effects","close","_resize","resize","resizable","resizing","off","destroy","target","toggleMaximization","split","index","handler","append","templates","resizeHandle","dragging","_actions","titlebar","container","windowSpecificCommands","map","action","name","html","render","setOptions","scrollable","cachedOptions","JSON","parse","stringify","restore","_enableDocumentScrolling","events","zoom","direction","fade","duration","properties","scale","autoFocus","isMaximized","isMinimized","_closable","inArray","handled","newWidth","newHeight","w","h","keys","keyCode","distance","ESC","_close","_closing","altKey","unpin","UP","focus","maximize","DOWN","minimize","getOffset","ctrlKey","LEFT","RIGHT","preventDefault","overlay","insertBefore","toggle","preventScroll","_stopDocumentScrolling","_actionForIcon","icon","iconClass","exec","className","k-i-close","k-i-window-maximize","k-i-window-minimize","k-i-window-restore","k-i-refresh","k-i-pin","k-i-unpin","_modals","zStack","dom","object","_object","sort","a","b","widget","center","newTop","newLeft","documentWindow","_scrollIsAppended","titleBarHeight","encoded","titleBar","titleElement","arguments","text","htmlEncode","prepend","scrollContainer","angular","elements","empty","push","dataItem","otherModalsVisible","overlayFx","showOptions","contentElement","containmentContext","doc","kendoStop","Fade","fx","fadeIn","endValue","play","show","kendoAnimate","complete","_activate","_containerScrollTop","_containerScrollLeft","_removeOverlay","suppressAnimation","modals","hideOverlay","hideOptions","fadeOut","startValue","last","systemTriggered","defaultPrevented","userTriggered","reverse","_deactivate","lastModal","_actionable","_shouldFocus","active","windowTop","currentWindow","zIndex","originalZIndex","windowObject","zIndexNew","style","setTimeout","shouldRestrictTop","restoreOptions","end","removeAttr","_sizingAction","actionId","callback","eq","before","$body","$html","_storeOverflowRule","_restoreOverflowRule","body","$element","_isOverflowStored","overflowRule","get","overflow","removeData","win","zoomLevel","iframe","showIframe","initOptions","src","contentFrame","unbind","_triggerRefresh","_ajaxRequest","toggleClass","_ajaxComplete","clearTimeout","_loadingIconTimeout","_ajaxError","xhr","status","_ajaxSuccess","contentTemplate","prop","_showLoading","ajax","dataType","cache","error","success","_destroy","iframeSrcAttributes","contentHtml","isRtl","getAttribute","editor","prototype","marginTop","marginLeft","hasMargin","wrapperPosition","relativeElMarginLeft","relativeElMarginTop","elementPadding","initialPosition","resizeDirection","replace","initialSize","containerOffset","test","_relativeElMarginLeft","_relativeElMarginTop","rtl","leftRtlOffset","scrollOffset","windowBottom","windowRight","y","newWindowTop","location","reset","initialWindowPosition","initialPointerPosition","startPosition","client","axis","transforms","_finishDrag","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,gBACH,oBACA,eACDD,IACL,WA+8CE,MA97CC,UAAUE,EAAGC,GAMV,QAASC,GAAQC,GACb,MAAmB,KAALA,EAElB,QAASC,GAAMC,EAASC,GACpB,MAAOC,UAASF,EAAQG,IAAIF,GAAW,KAAO,EAElD,QAASG,GAAUC,EAAOC,EAAKC,GAC3B,GAAIC,EAMJ,OAJIA,GADAH,GAASI,MAAMJ,KAAUA,GAAAA,GAAiBK,QAAQ,MAAQ,EACxCL,EAEAM,KAAKC,IAAID,KAAKE,IAAIX,SAASG,EAAO,IAAKE,IAASO,EAAAA,EAAWP,EAAOL,SAASK,EAAM,KAAMD,MAASQ,EAAAA,GAAWR,EAAMJ,SAASI,EAAK,KAIzJ,QAASS,KACL,OAAQC,KAAKC,MAAQD,KAAKC,KAAKC,cAAcR,QAAQ,WAAa,EAEtE,QAASS,GAAYC,GAKjB,IALJ,GAQYC,GACAC,EARJC,GACIC,IAAKJ,EAAKK,UACVC,KAAMN,EAAKO,YACZC,EAASR,EAAKS,aACdD,GACHL,EAAOC,KAAOI,EAAOH,UACrBF,EAAOG,MAAQE,EAAOD,WAClBN,EAAk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AIuF,QAAQgJ,aAAaoH,MAAMhP,KAAK5D,GAAU6D,SACjGlJ,EAAE6E,GAAMrE,IAAIqF,EAAQ,KAExBlC,WAAY,SAAU0I,GACdhL,KAAKoB,mBAGTpB,KAAK6b,cACL7Q,EAAEC,cAAcjD,QAAQrE,GAASxE,IAAIa,KAAKmB,MAAMoa,yBAEpDxZ,QAAS,WACL,GAAId,GAAMjB,KAAKmB,KACf,KAAInB,KAAKoB,mBAAoBH,EAAIsO,cAMjC,MAHA5Q,GAAEsC,EAAIM,SAASpC,IAAI8B,EAAIuF,QAAQG,UAAUxH,IAAI,YAAa,IAC1Da,KAAK6b,cACL5a,EAAI0J,QAAQvF,IACL,GAEXgI,QAAS,WACDpN,KAAKqB,YACLrB,KAAKqB,WAAW+L,UAEpBpN,KAAKqB,WAAarB,KAAKmB,MAAQ,OAGvCqB,EAAMG,GAAGmZ,OAAOxV,KAClB7D,OAAOD,MAAMuZ,QACRtZ,OAAOD,OACE,kBAAV9D,SAAwBA,OAAOsd,IAAMtd,OAAS,SAAUud,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.window.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('kendo.window', [\n 'kendo.draganddrop',\n 'kendo.popup'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'window',\n name: 'Window',\n category: 'web',\n description: 'The Window widget displays content in a modal or non-modal HTML window.',\n depends: [\n 'draganddrop',\n 'popup'\n ],\n features: [{\n id: 'window-fx',\n name: 'Animation',\n description: 'Support for animation',\n depends: ['fx']\n }]\n };\n (function ($, undefined) {\n var kendo = window.kendo, Widget = kendo.ui.Widget, TabKeyTrap = kendo.ui.Popup.TabKeyTrap, Draggable = kendo.ui.Draggable, isPlainObject = $.isPlainObject, activeElement = kendo._activeElement, outerWidth = kendo._outerWidth, outerHeight = kendo._outerHeight, proxy = $.proxy, extend = $.extend, each = $.each, template = kendo.template, BODY = 'body', templates, NS = '.kendoWindow', MODAL_NS = '.kendoWindowModal', KWINDOW = '.k-window', KWINDOWTITLE = '.k-window-title', KWINDOWTITLEBAR = KWINDOWTITLE + 'bar', KWINDOWCONTENT = '.k-window-content', KDIALOGCONTENT = '.k-dialog-content', KWINDOWRESIZEHANDLES = '.k-resize-handle', KOVERLAY = '.k-overlay', KCONTENTFRAME = 'k-content-frame', LOADING = 'k-i-loading', KHOVERSTATE = 'k-state-hover', KFOCUSEDSTATE = 'k-state-focused', MAXIMIZEDSTATE = 'k-window-maximized', VISIBLE = ':visible', HIDDEN = 'hidden', CURSOR = 'cursor', OPEN = 'open', ACTIVATE = 'activate', DEACTIVATE = 'deactivate', CLOSE = 'close', REFRESH = 'refresh', MINIMIZE = 'minimize', MAXIMIZE = 'maximize', RESIZESTART = 'resizeStart', RESIZE = 'resize', RESIZEEND = 'resizeEnd', DRAGSTART = 'dragstart', DRAGEND = 'dragend', ERROR = 'error', OVERFLOW = 'overflow', DATADOCOVERFLOWRULE = 'original-overflow-rule', ZINDEX = 'zIndex', MINIMIZE_MAXIMIZE = '.k-window-actions .k-i-window-minimize,.k-window-actions .k-i-window-maximize', KPIN = '.k-i-pin', KUNPIN = '.k-i-unpin', PIN_UNPIN = KPIN + ',' + KUNPIN, TITLEBAR_BUTTONS = '.k-window-titlebar .k-window-action', REFRESHICON = '.k-window-titlebar .k-i-refresh', WINDOWEVENTSHANDLED = 'WindowEventsHandled', zero = /^0[a-z]*$/i, isLocalUrl = kendo.isLocalUrl, SIZE = {\n small: 'k-window-sm',\n medium: 'k-window-md',\n large: 'k-window-lg'\n };\n function defined(x) {\n return typeof x != 'undefined';\n }\n function toInt(element, property) {\n return parseInt(element.css(property), 10) || 0;\n }\n function constrain(value, low, high) {\n var normalizedValue;\n if (value && isNaN(value) && value.toString().indexOf('px') < 0) {\n normalizedValue = value;\n } else {\n normalizedValue = Math.max(Math.min(parseInt(value, 10), high === Infinity ? high : parseInt(high, 10)), low === -Infinity ? low : parseInt(low, 10));\n }\n return normalizedValue;\n }\n function executableScript() {\n return !this.type || this.type.toLowerCase().indexOf('script') >= 0;\n }\n function getPosition(elem) {\n var result = {\n top: elem.offsetTop,\n left: elem.offsetLeft\n }, parent = elem.offsetParent;\n while (parent) {\n result.top += parent.offsetTop;\n result.left += parent.offsetLeft;\n var parentOverflowX = $(parent).css('overflowX');\n var parentOverflowY = $(parent).css('overflowY');\n if (parentOverflowY === 'auto' || parentOverflowY === 'scroll') {\n result.top -= parent.scrollTop;\n }\n if (parentOverflowX === 'auto' || parentOverflowX === 'scroll') {\n result.left -= parent.scrollLeft;\n }\n parent = parent.offsetParent;\n }\n return result;\n }\n var Window = Widget.extend({\n init: function (element, options) {\n var that = this, wrapper, offset = {}, visibility, display, position, isVisible = false, content, windowContent, windowFrame, globalWindow, suppressActions = options && options.actions && !options.actions.length, id;\n Widget.fn.init.call(that, element, options);\n options = that.options;\n position = options.position;\n element = that.element;\n content = options.content;\n globalWindow = $(window);\n if (suppressActions) {\n options.actions = [];\n }\n that.appendTo = $(options.appendTo);\n that.containment = options.draggable.containment ? $(options.draggable.containment).first() : null;\n if (content && !isPlainObject(content)) {\n content = options.content = { url: content };\n }\n element.find('script').filter(executableScript).remove();\n if (!element.parent().is(that.appendTo) && !that.containment && (position.top === undefined || position.left === undefined)) {\n if (element.is(VISIBLE)) {\n offset = element.offset();\n isVisible = true;\n } else {\n visibility = element.css('visibility');\n display = element.css('display');\n element.css({\n visibility: HIDDEN,\n display: ''\n });\n offset = element.offset();\n element.css({\n visibility: visibility,\n display: display\n });\n }\n if (position.top === undefined) {\n position.top = offset.top;\n }\n if (position.left === undefined) {\n position.left = offset.left;\n }\n }\n if (!defined(options.visible) || options.visible === null) {\n options.visible = element.is(VISIBLE);\n }\n wrapper = that.wrapper = element.closest(KWINDOW);\n if (!element.is('.k-window-content') || !wrapper[0]) {\n element.addClass('k-window-content');\n that._createWindow(element, options);\n wrapper = that.wrapper = element.closest(KWINDOW);\n that.title(that.options.title);\n that._dimensions();\n }\n that.minTop = that.minLeft = -Infinity;\n that.maxTop = that.maxLeft = Infinity;\n that._position();\n if (content) {\n that.refresh(content);\n }\n if (options.visible) {\n that.toFront();\n }\n windowContent = wrapper.children(KWINDOWCONTENT);\n that._tabindex(windowContent);\n if (options.visible && options.modal) {\n that._overlay(wrapper.is(VISIBLE)).css({ opacity: 0.5 });\n }\n wrapper.on('mouseenter' + NS, TITLEBAR_BUTTONS, proxy(that._buttonEnter, that)).on('mouseleave' + NS, TITLEBAR_BUTTONS, proxy(that._buttonLeave, that)).on('click' + NS, '> ' + TITLEBAR_BUTTONS, proxy(that._windowActionHandler, that)).on('keydown' + NS, proxy(that._keydown, that)).on('focus' + NS, proxy(that._focus, that)).on('blur' + NS, proxy(that._blur, that));\n windowContent.on('keydown' + NS, proxy(that._keydown, that)).on('focus' + NS, proxy(that._focus, that)).on('blur' + NS, proxy(that._blur, that));\n windowFrame = windowContent.find('.' + KCONTENTFRAME)[0];\n if (windowFrame && !globalWindow.data(WINDOWEVENTSHANDLED)) {\n globalWindow.on('blur' + NS, function () {\n var element = $(document.activeElement).parent(KWINDOWCONTENT);\n if (element.length) {\n var windowInstance = kendo.widgetInstance(element);\n windowInstance._focus();\n }\n });\n globalWindow.on('focus' + NS, function () {\n $(KWINDOWCONTENT).not(KDIALOGCONTENT).each(function (i, element) {\n kendo.widgetInstance($(element))._blur();\n });\n });\n globalWindow.data(WINDOWEVENTSHANDLED, true);\n }\n this._resizable();\n this._draggable();\n if (options.pinned && this.wrapper.is(':visible')) {\n that.pin();\n }\n id = element.attr('id');\n if (id) {\n id = id + '_wnd_title';\n wrapper.children(KWINDOWTITLEBAR).children(KWINDOWTITLE).attr('id', id);\n windowContent.attr({\n 'role': 'dialog',\n 'aria-labelledby': id\n });\n }\n wrapper.add(wrapper.children('.k-resize-handle,' + KWINDOWTITLEBAR)).on('mousedown' + NS, proxy(that.toFront, that));\n that.touchScroller = kendo.touchScroller(element);\n that._resizeHandler = proxy(that._onDocumentResize, that);\n that._marker = kendo.guid().substring(0, 8);\n $(window).on('resize' + NS + that._marker, that._resizeHandler);\n if (options.visible) {\n that.trigger(OPEN);\n that.trigger(ACTIVATE);\n }\n kendo.notify(that);\n if (this.options.modal) {\n this._tabKeyTrap = new TabKeyTrap(wrapper);\n this._tabKeyTrap.trap();\n this._tabKeyTrap.shouldTrap = function () {\n return windowContent.data('isFront');\n };\n }\n },\n _buttonEnter: function (e) {\n $(e.currentTarget).addClass(KHOVERSTATE);\n },\n _buttonLeave: function (e) {\n $(e.currentTarget).removeClass(KHOVERSTATE);\n },\n _focus: function () {\n this.wrapper.addClass(KFOCUSEDSTATE);\n },\n _blur: function () {\n this.wrapper.removeClass(KFOCUSEDSTATE);\n },\n _dimensions: function () {\n var wrapper = this.wrapper;\n var options = this.options;\n var width = options.width;\n var height = options.height;\n var maxHeight = options.maxHeight;\n var sizeClass = options.size;\n var dimensions = [\n 'minWidth',\n 'minHeight',\n 'maxWidth',\n 'maxHeight'\n ];\n var contentBoxSizing = wrapper.css('box-sizing') == 'content-box';\n var lrBorderWidth = contentBoxSizing ? toInt(wrapper, 'border-left-width') + toInt(wrapper, 'border-right-width') : 0;\n var tbBorderWidth = contentBoxSizing ? toInt(wrapper, 'border-top-width') + toInt(wrapper, 'border-bottom-width') : 0;\n var paddingTop = contentBoxSizing ? toInt(wrapper, 'padding-top') : 0;\n if (this.containment && !this._isPinned) {\n this._updateBoundaries();\n options.maxHeight = Math.min(this.containment.height - (tbBorderWidth + paddingTop), maxHeight);\n options.maxWidth = Math.min(this.containment.width - lrBorderWidth, options.maxWidth);\n }\n for (var i = 0; i < dimensions.length; i++) {\n var value = options[dimensions[i]] || '';\n if (value != Infinity) {\n wrapper.css(dimensions[i], value);\n }\n }\n if (maxHeight != Infinity) {\n this.element.css('maxHeight', maxHeight);\n }\n if (width) {\n wrapper.width(constrain(width, options.minWidth, options.maxWidth));\n } else {\n wrapper.width('');\n }\n if (height) {\n wrapper.height(constrain(height, options.minHeight, options.maxHeight));\n } else {\n wrapper.height('');\n }\n if (!options.visible) {\n wrapper.hide();\n }\n if (sizeClass && SIZE[sizeClass]) {\n wrapper.addClass(SIZE[sizeClass]);\n }\n },\n _position: function () {\n var wrapper = this.wrapper, position = this.options.position;\n this._updateBoundaries();\n if (this.containment) {\n position.top = Math.min(this.minTop + (position.top || 0), this.maxTop);\n position.left = Math.min(this.minLeft + (position.left || 0), this.maxLeft);\n }\n if (position.top === 0) {\n position.top = position.top.toString();\n }\n if (position.left === 0) {\n position.left = position.left.toString();\n }\n wrapper.css({\n top: position.top || '',\n left: position.left || ''\n });\n },\n _updateBoundaries: function () {\n var containment = this.containment;\n if (!containment) {\n return null;\n }\n containment.width = containment.innerWidth();\n containment.height = containment.innerHeight();\n if (parseInt(containment.width, 10) > containment[0].clientWidth) {\n containment.width -= kendo.support.scrollbar();\n }\n if (parseInt(containment.height, 10) > containment[0].clientHeight) {\n containment.height -= kendo.support.scrollbar();\n }\n containment.position = getPosition(containment[0]);\n if (this._isPinned) {\n this.minTop = this.minLeft = -Infinity;\n this.maxTop = this.maxLeft = Infinity;\n } else {\n this.minTop = containment.scrollTop();\n this.minLeft = containment.scrollLeft();\n this.maxLeft = this.minLeft + containment.width - outerWidth(this.wrapper, true);\n this.maxTop = this.minTop + containment.height - outerHeight(this.wrapper, true);\n }\n },\n _animationOptions: function (id) {\n var animation = this.options.animation;\n var basicAnimation = {\n open: { effects: {} },\n close: {\n hide: true,\n effects: {}\n }\n };\n return animation && animation[id] || basicAnimation[id];\n },\n _resize: function () {\n kendo.resize(this.element.children());\n },\n _resizable: function () {\n var resizable = this.options.resizable;\n var wrapper = this.wrapper;\n if (this.resizing) {\n wrapper.off('dblclick' + NS).children(KWINDOWRESIZEHANDLES).remove();\n this.resizing.destroy();\n this.resizing = null;\n }\n if (resizable) {\n wrapper.on('dblclick' + NS, KWINDOWTITLEBAR, proxy(function (e) {\n if (!$(e.target).closest('.k-window-action').length) {\n this.toggleMaximization();\n }\n }, this));\n each('n e s w se sw ne nw'.split(' '), function (index, handler) {\n wrapper.append(templates.resizeHandle(handler));\n });\n this.resizing = new WindowResizing(this);\n }\n wrapper = null;\n },\n _draggable: function () {\n var draggable = this.options.draggable;\n if (this.dragging) {\n this.dragging.destroy();\n this.dragging = null;\n }\n if (draggable) {\n this.dragging = new WindowDragging(this, draggable.dragHandle || KWINDOWTITLEBAR);\n }\n },\n _actions: function () {\n var options = this.options;\n var actions = options.actions;\n var pinned = options.pinned;\n var titlebar = this.wrapper.children(KWINDOWTITLEBAR);\n var container = titlebar.find('.k-window-actions');\n var windowSpecificCommands = [\n 'maximize',\n 'minimize'\n ];\n actions = $.map(actions, function (action) {\n action = pinned && action.toLowerCase() === 'pin' ? 'unpin' : action;\n return { name: windowSpecificCommands.indexOf(action.toLowerCase()) > -1 ? 'window-' + action : action };\n });\n container.html(kendo.render(templates.action, actions));\n },\n setOptions: function (options) {\n var that = this;\n var sizeClass = that.options.size;\n var cachedOptions = JSON.parse(JSON.stringify(options));\n extend(options.position, that.options.position);\n extend(options.position, cachedOptions.position);\n Widget.fn.setOptions.call(that, options);\n var scrollable = that.options.scrollable !== false;\n that.restore();\n if (typeof options.title !== 'undefined') {\n that.title(options.title);\n }\n that.wrapper.removeClass(SIZE[sizeClass]);\n that._dimensions();\n that._position();\n that._resizable();\n that._draggable();\n that._actions();\n if (typeof options.modal !== 'undefined') {\n var visible = that.options.visible !== false;\n that._enableDocumentScrolling();\n that._overlay(options.modal && visible);\n }\n that.element.css(OVERFLOW, scrollable ? '' : 'hidden');\n },\n events: [\n OPEN,\n ACTIVATE,\n DEACTIVATE,\n CLOSE,\n MINIMIZE,\n MAXIMIZE,\n REFRESH,\n RESIZESTART,\n RESIZE,\n RESIZEEND,\n DRAGSTART,\n DRAGEND,\n ERROR\n ],\n options: {\n name: 'Window',\n animation: {\n open: {\n effects: {\n zoom: { direction: 'in' },\n fade: { direction: 'in' }\n },\n duration: 350\n },\n close: {\n effects: {\n zoom: {\n direction: 'out',\n properties: { scale: 0.7 }\n },\n fade: { direction: 'out' }\n },\n duration: 350,\n hide: true\n }\n },\n title: '',\n actions: ['Close'],\n autoFocus: true,\n modal: false,\n size: 'auto',\n resizable: true,\n draggable: true,\n minWidth: 90,\n minHeight: 50,\n maxWidth: Infinity,\n maxHeight: Infinity,\n pinned: false,\n scrollable: true,\n position: {},\n content: null,\n visible: null,\n height: null,\n width: null,\n appendTo: 'body',\n isMaximized: false,\n isMinimized: false\n },\n _closable: function () {\n return $.inArray('close', $.map(this.options.actions, function (x) {\n return x.toLowerCase();\n })) > -1;\n },\n _keydown: function (e) {\n var that = this, options = that.options, keys = kendo.keys, keyCode = e.keyCode, wrapper = that.wrapper, offset, handled, distance = 10, isMaximized = options.isMaximized, isMinimized = options.isMinimized, newWidth, newHeight, w, h;\n if (keyCode == keys.ESC && that._closable()) {\n e.stopPropagation();\n that._close(false);\n }\n if (e.target != e.currentTarget || that._closing) {\n return;\n }\n if (e.altKey && keyCode == 82) {\n that.refresh();\n }\n if (e.altKey && keyCode == 80) {\n if (that.options.pinned) {\n that.unpin();\n } else {\n that.pin();\n }\n }\n if (e.altKey && keyCode == keys.UP) {\n if (isMinimized) {\n that.restore();\n that.element.focus();\n } else if (!isMaximized) {\n that.maximize();\n that.element.focus();\n }\n } else if (e.altKey && keyCode == keys.DOWN) {\n if (!isMinimized && !isMaximized) {\n that.minimize();\n that.wrapper.focus();\n } else if (isMaximized) {\n that.restore();\n that.element.focus();\n }\n }\n offset = kendo.getOffset(wrapper);\n if (that.containment && !that._isPinned) {\n offset = that.options.position;\n }\n if (options.draggable && !e.ctrlKey && !e.altKey && !isMaximized) {\n that._updateBoundaries();\n if (keyCode == keys.UP) {\n offset.top = constrain(offset.top - distance, that.minTop, that.maxTop);\n handled = wrapper.css('top', offset.top);\n } else if (keyCode == keys.DOWN) {\n offset.top = constrain(offset.top + distance, that.minTop, that.maxTop);\n handled = wrapper.css('top', offset.top);\n } else if (keyCode == keys.LEFT) {\n offset.left = constrain(offset.left - distance, that.minLeft, that.maxLeft);\n handled = wrapper.css('left', offset.left);\n } else if (keyCode == keys.RIGHT) {\n offset.left = constrain(offset.left + distance, that.minLeft, that.maxLeft);\n handled = wrapper.css('left', offset.left);\n }\n }\n if (options.resizable && e.ctrlKey && !isMaximized && !isMinimized) {\n if (keyCode == keys.UP) {\n handled = true;\n newHeight = wrapper.height() - distance;\n } else if (keyCode == keys.DOWN) {\n handled = true;\n if (that.containment && !that._isPinned) {\n newHeight = Math.min(wrapper.height() + distance, that.containment.height - offset.top - toInt(wrapper, 'padding-top') - toInt(wrapper, 'borderBottomWidth') - toInt(wrapper, 'borderTopWidth'));\n } else {\n newHeight = wrapper.height() + distance;\n }\n }\n if (keyCode == keys.LEFT) {\n handled = true;\n newWidth = wrapper.width() - distance;\n } else if (keyCode == keys.RIGHT) {\n handled = true;\n if (that.containment && !that._isPinned) {\n newWidth = Math.min(wrapper.width() + distance, that.containment.width - offset.left - toInt(wrapper, 'borderLeftWidth') - toInt(wrapper, 'borderRightWidth'));\n } else {\n newWidth = wrapper.width() + distance;\n }\n }\n if (handled) {\n w = constrain(newWidth, options.minWidth, options.maxWidth);\n h = constrain(newHeight, options.minHeight, options.maxHeight);\n if (!isNaN(w)) {\n wrapper.width(w);\n that.options.width = w + 'px';\n }\n if (!isNaN(h)) {\n wrapper.height(h);\n that.options.height = h + 'px';\n }\n that.resize();\n }\n }\n if (handled) {\n e.preventDefault();\n }\n },\n _overlay: function (visible) {\n var overlay = this.containment ? this.containment.children(KOVERLAY) : this.appendTo.children(KOVERLAY), wrapper = this.wrapper;\n if (!overlay.length) {\n overlay = $('
');\n }\n overlay.insertBefore(wrapper[0]).toggle(visible).css(ZINDEX, parseInt(wrapper.css(ZINDEX), 10) - 1);\n if (this.options.modal.preventScroll && !this.containment) {\n this._stopDocumentScrolling();\n }\n return overlay;\n },\n _actionForIcon: function (icon) {\n var iconClass = /\\bk-i(-\\w+)+\\b/.exec(icon[0].className)[0];\n return {\n 'k-i-close': '_close',\n 'k-i-window-maximize': 'maximize',\n 'k-i-window-minimize': 'minimize',\n 'k-i-window-restore': 'restore',\n 'k-i-refresh': 'refresh',\n 'k-i-pin': 'pin',\n 'k-i-unpin': 'unpin'\n }[iconClass];\n },\n _windowActionHandler: function (e) {\n if (this._closing) {\n return;\n }\n var icon = $(e.target).closest('.k-window-action').find('.k-icon');\n var action = this._actionForIcon(icon);\n if (action) {\n e.preventDefault();\n this[action]();\n return false;\n }\n },\n _modals: function () {\n var that = this;\n var zStack = $(KWINDOW).filter(function () {\n var dom = $(this);\n var object = that._object(dom);\n var options = object && object.options;\n return options && options.modal && options.visible && options.appendTo === that.options.appendTo && dom.is(VISIBLE);\n }).sort(function (a, b) {\n return +$(a).css('zIndex') - +$(b).css('zIndex');\n });\n that = null;\n return zStack;\n },\n _object: function (element) {\n var content = element.children(KWINDOWCONTENT);\n var widget = kendo.widgetInstance(content);\n if (widget) {\n return widget;\n }\n return undefined;\n },\n center: function () {\n var that = this, position = that.options.position, wrapper = that.wrapper, documentWindow = $(window), scrollTop = 0, scrollLeft = 0, newTop, newLeft;\n if (that.options.isMaximized) {\n return that;\n }\n if (that.options.pinned && !that._isPinned) {\n that.pin();\n }\n if (!that.options.pinned) {\n scrollTop = documentWindow.scrollTop();\n scrollLeft = documentWindow.scrollLeft();\n }\n if (this.containment && !that.options.pinned) {\n newTop = this.minTop + (this.maxTop - this.minTop) / 2;\n newLeft = this.minLeft + (this.maxLeft - this.minLeft) / 2;\n } else {\n that._scrollIsAppended = true;\n newLeft = scrollLeft + Math.max(0, (documentWindow.width() - wrapper.width()) / 2);\n newTop = scrollTop + Math.max(0, (documentWindow.height() - wrapper.height() - toInt(wrapper, 'paddingTop')) / 2);\n }\n wrapper.css({\n left: newLeft,\n top: newTop\n });\n position.top = newTop;\n position.left = newLeft;\n return that;\n },\n title: function (title) {\n var that = this, value, encoded = true, wrapper = that.wrapper, titleBar = wrapper.children(KWINDOWTITLEBAR), titleElement = titleBar.children(KWINDOWTITLE), titleBarHeight, display, visibility;\n if (!arguments.length) {\n return titleElement.html();\n }\n if ($.isPlainObject(title)) {\n value = typeof title.text !== 'undefined' ? title.text : '';\n encoded = title.encoded !== false;\n } else {\n value = title;\n }\n if (value === false) {\n wrapper.addClass('k-window-titleless');\n wrapper.css('padding-top', 0);\n titleBar.remove();\n } else {\n if (!titleBar.length) {\n wrapper.prepend(templates.titlebar({ title: encoded ? kendo.htmlEncode(value) : value }));\n that._actions();\n titleBar = wrapper.children(KWINDOWTITLEBAR);\n } else {\n titleElement.html(encoded ? kendo.htmlEncode(value) : value);\n }\n visibility = wrapper.css('visibility');\n display = wrapper.css('display');\n if (visibility === HIDDEN) {\n wrapper.css({ display: '' });\n titleBarHeight = parseInt(outerHeight(titleBar), 10);\n wrapper.css({ display: display });\n } else {\n wrapper.css({\n visibility: HIDDEN,\n display: ''\n });\n titleBarHeight = parseInt(outerHeight(titleBar), 10);\n wrapper.css({\n visibility: visibility,\n display: display\n });\n }\n wrapper.css('padding-top', titleBarHeight);\n titleBar.css('margin-top', -titleBarHeight);\n }\n that.options.title = value;\n return that;\n },\n content: function (html, data) {\n var content = this.wrapper.children(KWINDOWCONTENT), scrollContainer = content.children('.km-scroll-container');\n content = scrollContainer[0] ? scrollContainer : content;\n if (!defined(html)) {\n return content.html();\n }\n this.angular('cleanup', function () {\n return { elements: content.children() };\n });\n kendo.destroy(this.element.children());\n content.empty().html(html);\n this.angular('compile', function () {\n var a = [];\n for (var i = content.length; --i >= 0;) {\n a.push({ dataItem: data });\n }\n return {\n elements: content.children(),\n data: a\n };\n });\n return this;\n },\n open: function () {\n var that = this, wrapper = that.wrapper, options = that.options, showOptions = this._animationOptions('open'), contentElement = wrapper.children(KWINDOWCONTENT), overlay, otherModalsVisible, containmentContext = this.containment && !that._isPinned, doc = containmentContext ? this.containment : $(document);\n if (!that.trigger(OPEN)) {\n if (that._closing) {\n wrapper.kendoStop(true, true);\n }\n that._closing = false;\n that.toFront();\n if (options.autoFocus) {\n that.element.focus();\n }\n options.visible = true;\n if (options.modal) {\n otherModalsVisible = !!that._modals().length;\n overlay = that._overlay(otherModalsVisible);\n overlay.kendoStop(true, true);\n if (showOptions.duration && kendo.effects.Fade && !otherModalsVisible) {\n var overlayFx = kendo.fx(overlay).fadeIn();\n overlayFx.duration(showOptions.duration || 0);\n overlayFx.endValue(0.5);\n overlayFx.play();\n } else {\n overlay.css('opacity', 0.5);\n }\n overlay.show();\n $(window).on('focus' + MODAL_NS, function () {\n if (contentElement.data('isFront') && !$(document.activeElement).closest(contentElement).length) {\n that.element.focus();\n }\n });\n }\n if (!wrapper.is(VISIBLE)) {\n contentElement.css(OVERFLOW, HIDDEN);\n that.wrapper.find(TITLEBAR_BUTTONS).addClass('k-flat');\n wrapper.show().kendoStop().kendoAnimate({\n effects: showOptions.effects,\n duration: showOptions.duration,\n complete: proxy(this._activate, this)\n });\n }\n }\n if (options.isMaximized) {\n that._containerScrollTop = doc.scrollTop();\n that._containerScrollLeft = doc.scrollLeft();\n that._stopDocumentScrolling();\n }\n if (this.options.pinned && !this._isPinned) {\n this.pin();\n }\n return that;\n },\n _activate: function () {\n var scrollable = this.options.scrollable !== false;\n if (this.options.autoFocus) {\n this.element.focus();\n }\n this.element.css(OVERFLOW, scrollable ? '' : 'hidden');\n kendo.resize(this.element.children());\n this.trigger(ACTIVATE);\n },\n _removeOverlay: function (suppressAnimation) {\n var modals = this._modals();\n var options = this.options;\n var hideOverlay = options.modal && !modals.length;\n var overlay = options.modal ? this._overlay(true) : $(undefined);\n var hideOptions = this._animationOptions('close');\n if (hideOverlay) {\n if (!suppressAnimation && hideOptions.duration && kendo.effects.Fade) {\n var overlayFx = kendo.fx(overlay).fadeOut();\n overlayFx.duration(hideOptions.duration || 0);\n overlayFx.startValue(0.5);\n overlayFx.play();\n } else {\n this._overlay(false).remove();\n }\n if (options.modal.preventScroll) {\n this._enableDocumentScrolling();\n }\n } else if (modals.length) {\n this._object(modals.last())._overlay(true);\n if (options.modal.preventScroll) {\n this._stopDocumentScrolling();\n }\n }\n },\n _close: function (systemTriggered) {\n var that = this, wrapper = that.wrapper, options = that.options, showOptions = this._animationOptions('open'), hideOptions = this._animationOptions('close'), containmentContext = this.containment && !that._isPinned, doc = containmentContext ? this.containment : $(document), defaultPrevented;\n if (that._closing) {\n return;\n }\n defaultPrevented = that.trigger(CLOSE, { userTriggered: !systemTriggered });\n that._closing = !defaultPrevented;\n if (wrapper.is(VISIBLE) && !defaultPrevented) {\n options.visible = false;\n $(KWINDOW).each(function (i, element) {\n var contentElement = $(element).children(KWINDOWCONTENT);\n if (element != wrapper && contentElement.find('> .' + KCONTENTFRAME).length > 0) {\n contentElement.children(KOVERLAY).remove();\n }\n });\n this._removeOverlay();\n that.wrapper.find(TITLEBAR_BUTTONS).removeClass('k-flat');\n wrapper.kendoStop().kendoAnimate({\n effects: hideOptions.effects || showOptions.effects,\n reverse: hideOptions.reverse === true,\n duration: hideOptions.duration,\n complete: proxy(this._deactivate, this)\n });\n $(window).off(MODAL_NS);\n }\n if (that.options.isMaximized) {\n that._enableDocumentScrolling();\n if (that._containerScrollTop && that._containerScrollTop > 0) {\n doc.scrollTop(that._containerScrollTop);\n }\n if (that._containerScrollLeft && that._containerScrollLeft > 0) {\n doc.scrollLeft(that._containerScrollLeft);\n }\n }\n },\n _deactivate: function () {\n var that = this;\n that.wrapper.hide().css('opacity', '');\n that.trigger(DEACTIVATE);\n if (that.options.modal) {\n var lastModal = that._object(that._modals().last());\n if (lastModal) {\n lastModal.toFront();\n }\n }\n },\n close: function () {\n this._close(true);\n return this;\n },\n _actionable: function (element) {\n return $(element).is(TITLEBAR_BUTTONS + ',' + TITLEBAR_BUTTONS + ' .k-icon,:input,a');\n },\n _shouldFocus: function (target) {\n var active = activeElement(), element = this.element;\n return this.options.autoFocus && !$(active).is(element) && !this._actionable(target) && (!element.find(active).length || !element.find(target).length);\n },\n toFront: function (e) {\n var that = this, wrapper = that.wrapper, currentWindow = wrapper[0], containmentContext = that.containment && !that._isPinned, zIndex = +wrapper.css(ZINDEX), originalZIndex = zIndex, target = e && e.target || null;\n $(KWINDOW).each(function (i, element) {\n var windowObject = $(element), zIndexNew = windowObject.css(ZINDEX), contentElement = windowObject.children(KWINDOWCONTENT);\n if (!isNaN(zIndexNew)) {\n zIndex = Math.max(+zIndexNew, zIndex);\n }\n contentElement.data('isFront', element == currentWindow);\n if (element != currentWindow && contentElement.find('> .' + KCONTENTFRAME).length > 0) {\n contentElement.append(templates.overlay);\n }\n });\n if (!wrapper[0].style.zIndex || originalZIndex < zIndex) {\n wrapper.css(ZINDEX, zIndex + 2);\n }\n that.element.find('> .k-overlay').remove();\n if (that._shouldFocus(target)) {\n if (that.isMinimized()) {\n that.wrapper.focus();\n } else if ($(target).is(KOVERLAY)) {\n setTimeout(function () {\n that.element.focus();\n });\n } else {\n that.element.focus();\n }\n var scrollTop = containmentContext ? that.containment.scrollTop() : $(window).scrollTop(), windowTop = parseInt(wrapper.position().top, 10);\n if (!that.options.pinned && windowTop > 0 && windowTop < scrollTop) {\n if (scrollTop > 0) {\n $(window).scrollTop(windowTop);\n } else {\n wrapper.css('top', scrollTop);\n }\n }\n }\n wrapper = null;\n return that;\n },\n toggleMaximization: function () {\n if (this._closing) {\n return this;\n }\n return this[this.options.isMaximized ? 'restore' : 'maximize']();\n },\n restore: function () {\n var that = this;\n var options = that.options;\n var minHeight = options.minHeight;\n var restoreOptions = that.restoreOptions;\n var shouldRestrictTop;\n var container = that.containment && !that._isPinned ? that.containment : $(document);\n if (!options.isMaximized && !options.isMinimized) {\n return that;\n }\n if (minHeight && minHeight != Infinity) {\n that.wrapper.css('min-height', minHeight);\n }\n if (restoreOptions && !options.isMaximized) {\n restoreOptions.height = constrain(restoreOptions.height, that.options.minHeight, that.options.maxHeight);\n shouldRestrictTop = options.position.top + parseInt(restoreOptions.height, 10) > that.maxTop;\n if (shouldRestrictTop) {\n options.position.top = constrain(options.position.top, that.minTop, that.maxTop - parseInt(restoreOptions.height, 10));\n extend(restoreOptions, {\n left: options.position.left,\n top: options.position.top\n });\n }\n }\n that.wrapper.css({\n position: options.pinned ? 'fixed' : 'absolute',\n left: restoreOptions.left,\n top: restoreOptions.top,\n width: restoreOptions.width,\n height: restoreOptions.height\n }).removeClass(MAXIMIZEDSTATE).find('.k-window-content,.k-resize-handle').show().end().find('.k-window-titlebar .k-i-window-restore').parent().remove().end().end().find(MINIMIZE_MAXIMIZE).parent().show().end().end().find(PIN_UNPIN).parent().show();\n if (options.isMaximized) {\n that.wrapper.find('.k-i-window-maximize').parent().focus();\n } else if (options.isMinimized) {\n that.wrapper.find('.k-i-window-minimize').parent().focus();\n }\n that.options.width = restoreOptions.width;\n that.options.height = restoreOptions.height;\n if (!that.options.modal.preventScroll) {\n that._enableDocumentScrolling();\n }\n if (that._containerScrollTop && that._containerScrollTop > 0) {\n container.scrollTop(that._containerScrollTop);\n }\n if (that._containerScrollLeft && that._containerScrollLeft > 0) {\n container.scrollLeft(that._containerScrollLeft);\n }\n options.isMaximized = options.isMinimized = false;\n that.wrapper.removeAttr('tabindex');\n that.wrapper.removeAttr('aria-labelled-by');\n that.resize();\n return that;\n },\n _sizingAction: function (actionId, callback) {\n var that = this, wrapper = that.wrapper, style = wrapper[0].style, options = that.options;\n if (options.isMaximized || options.isMinimized) {\n return that;\n }\n that.restoreOptions = {\n width: style.width,\n height: style.height\n };\n wrapper.children(KWINDOWRESIZEHANDLES).hide().end().children(KWINDOWTITLEBAR).find(MINIMIZE_MAXIMIZE).parent().hide().eq(0).before(templates.action({ name: 'window-restore' }));\n callback.call(that);\n that.wrapper.children(KWINDOWTITLEBAR).find(PIN_UNPIN).parent().toggle(actionId !== 'maximize');\n that.trigger(actionId);\n wrapper.find('.k-i-window-restore').parent().focus();\n return that;\n },\n maximize: function () {\n this._sizingAction('maximize', function () {\n var that = this, wrapper = that.wrapper, containmentContext = this.containment && !that._isPinned, position = wrapper.position(), doc = $(document);\n extend(that.restoreOptions, {\n left: position.left + (containmentContext ? this.containment.scrollLeft() : 0),\n top: position.top + (containmentContext ? this.containment.scrollTop() : 0)\n });\n this._containerScrollTop = containmentContext ? this.containment.scrollTop() : doc.scrollTop();\n this._containerScrollLeft = containmentContext ? this.containment.scrollLeft() : doc.scrollLeft();\n that._stopDocumentScrolling();\n wrapper.css({\n top: containmentContext ? this.containment.scrollTop() : 0,\n left: containmentContext ? this.containment.scrollLeft() : 0,\n position: containmentContext ? 'absolute' : 'fixed'\n }).addClass(MAXIMIZEDSTATE);\n that.options.isMaximized = true;\n that._onDocumentResize();\n });\n return this;\n },\n _stopDocumentScrolling: function () {\n var that = this;\n var containment = that.containment;\n if (containment && !that._isPinned) {\n that._storeOverflowRule(containment);\n containment.css(OVERFLOW, HIDDEN);\n that.wrapper.css({\n maxWidth: containment.innerWidth(),\n maxHeight: containment.innerHeight()\n });\n return;\n }\n var $body = $('body');\n that._storeOverflowRule($body);\n $body.css(OVERFLOW, HIDDEN);\n var $html = $('html');\n that._storeOverflowRule($html);\n $html.css(OVERFLOW, HIDDEN);\n },\n _enableDocumentScrolling: function () {\n var that = this;\n var containment = that.containment;\n if (containment && !that._isPinned) {\n that._restoreOverflowRule(containment);\n that.wrapper.css({\n maxWidth: containment.width,\n maxHeight: containment.height\n });\n return;\n }\n that._restoreOverflowRule($(document.body));\n that._restoreOverflowRule($('html'));\n },\n _storeOverflowRule: function ($element) {\n if (this._isOverflowStored($element)) {\n return;\n }\n var overflowRule = $element.get(0).style.overflow;\n if (typeof overflowRule === 'string') {\n $element.data(DATADOCOVERFLOWRULE, overflowRule);\n }\n },\n _isOverflowStored: function ($element) {\n return typeof $element.data(DATADOCOVERFLOWRULE) === 'string';\n },\n _restoreOverflowRule: function ($element) {\n var overflowRule = $element.data(DATADOCOVERFLOWRULE);\n if (overflowRule !== null && overflowRule !== undefined) {\n $element.css(OVERFLOW, overflowRule);\n $element.removeData(DATADOCOVERFLOWRULE);\n } else {\n $element.css(OVERFLOW, '');\n }\n },\n isMaximized: function () {\n return this.options.isMaximized;\n },\n minimize: function () {\n this._sizingAction('minimize', function () {\n var that = this;\n that.wrapper.css({\n height: '',\n minHeight: ''\n });\n that.element.hide();\n that.options.isMinimized = true;\n });\n this.wrapper.attr('tabindex', 0);\n this.wrapper.attr('aria-labelled-by', this.element.attr('aria-labelled-by'));\n this._updateBoundaries();\n return this;\n },\n isMinimized: function () {\n return this.options.isMinimized;\n },\n pin: function () {\n var that = this, win = $(window), wrapper = that.wrapper, options = that.options, position = options.position, top = this.containment ? getPosition(wrapper[0]).top + toInt(this.containment, 'borderTopWidth') : toInt(wrapper, 'top'), left = this.containment ? getPosition(wrapper[0]).left + toInt(this.containment, 'borderLeftWidth') : toInt(wrapper, 'left');\n if (!that.options.isMaximized) {\n position.top = top;\n position.left = left;\n if (that._scrollIsAppended && (!this.containment || this.containment.css('position') !== 'fixed')) {\n position.top -= win.scrollTop();\n position.left -= win.scrollLeft();\n that._scrollIsAppended = false;\n }\n wrapper.css(extend(position, { position: 'fixed' }));\n wrapper.children(KWINDOWTITLEBAR).find(KPIN).addClass('k-i-unpin').removeClass('k-i-pin');\n that._isPinned = true;\n that.options.pinned = true;\n if (this.containment) {\n options.maxWidth = options.maxHeight = Infinity;\n wrapper.css({\n maxWidth: '',\n maxHeight: ''\n });\n }\n }\n },\n unpin: function () {\n var that = this, win = $(window), wrapper = that.wrapper, options = that.options, position = that.options.position, containment = that.containment, top = parseInt(wrapper.css('top'), 10) + win.scrollTop(), left = parseInt(wrapper.css('left'), 10) + win.scrollLeft();\n if (!that.options.isMaximized) {\n that._isPinned = false;\n that._scrollIsAppended = true;\n that.options.pinned = false;\n if (containment) {\n that._updateBoundaries();\n options.maxWidth = Math.min(containment.width, options.maxWidth);\n options.maxHeight = Math.min(containment.height - toInt(wrapper, 'padding-top'), options.maxHeight);\n wrapper.css({\n maxWidth: options.maxWidth,\n maxHeight: options.maxHeight\n });\n if (top < containment.position.top) {\n top = that.minTop;\n } else if (top > containment.position.top + containment.height) {\n top = that.maxTop;\n } else {\n top = top + containment.scrollTop() - (containment.position.top + toInt(containment, 'border-top-width'));\n }\n if (left < containment.position.left) {\n left = that.minLeft;\n } else if (left > containment.position.left + containment.width) {\n left = that.maxLeft;\n } else {\n left = left + containment.scrollLeft() - (containment.position.left + toInt(containment, 'border-left-width'));\n }\n }\n position.top = constrain(top, that.minTop, that.maxTop);\n position.left = constrain(left, that.minLeft, that.maxLeft);\n wrapper.css(extend(position, { position: '' }));\n wrapper.children(KWINDOWTITLEBAR).find(KUNPIN).addClass('k-i-pin').removeClass('k-i-unpin');\n }\n },\n _onDocumentResize: function () {\n var that = this, wrapper = that.wrapper, wnd = $(window), zoomLevel = kendo.support.zoomLevel(), contentBoxSizing = wrapper.css('box-sizing') == 'content-box', w, h;\n if (!that.options.isMaximized) {\n return;\n }\n var lrBorderWidth = contentBoxSizing ? toInt(wrapper, 'border-left-width') + toInt(wrapper, 'border-right-width') : 0;\n var tbBorderWidth = contentBoxSizing ? toInt(wrapper, 'border-top-width') + toInt(wrapper, 'border-bottom-width') : 0;\n var paddingTop = contentBoxSizing ? toInt(wrapper, 'padding-top') : 0;\n if (that.containment && !that._isPinned) {\n w = that.containment.innerWidth() - lrBorderWidth;\n h = that.containment.innerHeight() - (tbBorderWidth + paddingTop);\n } else {\n w = wnd.width() / zoomLevel - lrBorderWidth;\n h = wnd.height() / zoomLevel - (tbBorderWidth + paddingTop);\n }\n wrapper.css({\n width: w,\n height: h\n });\n that.options.width = w;\n that.options.height = h;\n that.resize();\n },\n refresh: function (options) {\n var that = this, initOptions = that.options, element = $(that.element), iframe, showIframe, url;\n if (!isPlainObject(options)) {\n options = { url: options };\n }\n options = extend({}, initOptions.content, options);\n showIframe = defined(initOptions.iframe) ? initOptions.iframe : options.iframe;\n url = options.url;\n if (url) {\n if (!defined(showIframe)) {\n showIframe = !isLocalUrl(url);\n }\n if (!showIframe) {\n that._ajaxRequest(options);\n } else {\n iframe = element.find('.' + KCONTENTFRAME)[0];\n if (iframe) {\n iframe.src = url || iframe.src;\n } else {\n element.html(templates.contentFrame(extend({}, initOptions, { content: options })));\n }\n element.find('.' + KCONTENTFRAME).unbind('load' + NS).on('load' + NS, proxy(this._triggerRefresh, this));\n }\n } else {\n if (options.template) {\n that.content(template(options.template)({}));\n }\n that.trigger(REFRESH);\n }\n element.toggleClass('k-window-iframecontent', !!showIframe);\n return that;\n },\n _triggerRefresh: function () {\n this.trigger(REFRESH);\n },\n _ajaxComplete: function () {\n clearTimeout(this._loadingIconTimeout);\n this.wrapper.find(REFRESHICON).removeClass(LOADING);\n },\n _ajaxError: function (xhr, status) {\n this.trigger(ERROR, {\n status: status,\n xhr: xhr\n });\n },\n _ajaxSuccess: function (contentTemplate) {\n return function (data) {\n var html = data;\n if (contentTemplate) {\n html = template(contentTemplate)(data || {});\n }\n this.content(html, data);\n this.element.prop('scrollTop', 0);\n this.trigger(REFRESH);\n };\n },\n _showLoading: function () {\n this.wrapper.find(REFRESHICON).addClass(LOADING);\n },\n _ajaxRequest: function (options) {\n this._loadingIconTimeout = setTimeout(proxy(this._showLoading, this), 100);\n $.ajax(extend({\n type: 'GET',\n dataType: 'html',\n cache: false,\n error: proxy(this._ajaxError, this),\n complete: proxy(this._ajaxComplete, this),\n success: proxy(this._ajaxSuccess(options.template), this)\n }, options));\n },\n _destroy: function () {\n if (this.resizing) {\n this.resizing.destroy();\n }\n if (this.dragging) {\n this.dragging.destroy();\n }\n this.wrapper.off(NS).children(KWINDOWCONTENT).off(NS).end().find('.k-resize-handle,.k-window-titlebar').off(NS);\n $(window).off('resize' + NS + this._marker);\n $(window).off(MODAL_NS);\n $(window).off(NS);\n clearTimeout(this._loadingIconTimeout);\n Widget.fn.destroy.call(this);\n this.unbind(undefined);\n kendo.destroy(this.wrapper);\n this._removeOverlay(true);\n },\n destroy: function () {\n this._destroy();\n this.wrapper.empty().remove();\n this.wrapper = this.appendTo = this.element = $();\n },\n _createWindow: function () {\n var contentHtml = this.element, options = this.options, iframeSrcAttributes, wrapper, isRtl = kendo.support.isRtl(contentHtml);\n if (options.scrollable === false) {\n contentHtml.css('overflow', 'hidden');\n }\n wrapper = $(templates.wrapper(options));\n iframeSrcAttributes = contentHtml.find('iframe:not(.k-content-frame)').map(function () {\n var src = this.getAttribute('src');\n this.src = '';\n return src;\n });\n wrapper.toggleClass('k-rtl', isRtl).append(contentHtml).find('iframe:not(.k-content-frame)').each(function (index) {\n this.src = iframeSrcAttributes[index];\n });\n if (this.containment) {\n this.containment.prepend(wrapper);\n } else if (this.appendTo) {\n wrapper.appendTo(this.appendTo);\n }\n wrapper.find('.k-window-title').css(isRtl ? 'left' : 'right', outerWidth(wrapper.find('.k-window-actions')) + 10);\n contentHtml.css('visibility', '').show();\n contentHtml.find('[data-role=editor]').each(function () {\n var editor = $(this).data('kendoEditor');\n if (editor) {\n editor.refresh();\n }\n });\n wrapper = contentHtml = null;\n }\n });\n templates = {\n wrapper: template('
'),\n action: template('' + '' + ''),\n titlebar: template('
' + '#= title #' + '
' + '
'),\n overlay: '
',\n contentFrame: template(''),\n resizeHandle: template('
')\n };\n function WindowResizing(wnd) {\n var that = this;\n that.owner = wnd;\n that._preventDragging = false;\n that._draggable = new Draggable(wnd.wrapper, {\n filter: '>' + KWINDOWRESIZEHANDLES,\n group: wnd.wrapper.id + '-resizing',\n dragstart: proxy(that.dragstart, that),\n drag: proxy(that.drag, that),\n dragend: proxy(that.dragend, that)\n });\n that._draggable.userEvents.bind('press', proxy(that.addOverlay, that));\n that._draggable.userEvents.bind('release', proxy(that.removeOverlay, that));\n }\n WindowResizing.prototype = {\n addOverlay: function () {\n this.owner.wrapper.append(templates.overlay);\n },\n removeOverlay: function () {\n this.owner.wrapper.find(KOVERLAY).remove();\n },\n dragstart: function (e) {\n var that = this;\n var wnd = that.owner;\n var wrapper = wnd.wrapper;\n that._preventDragging = wnd.trigger(RESIZESTART);\n if (that._preventDragging) {\n return;\n }\n that.elementPadding = parseInt(wrapper.css('padding-top'), 10);\n that.initialPosition = kendo.getOffset(wrapper, 'position');\n that.resizeDirection = e.currentTarget.prop('className').replace('k-resize-handle k-resize-', '');\n that.initialSize = {\n width: wrapper.width(),\n height: wrapper.height()\n };\n wnd._updateBoundaries();\n that.containerOffset = wnd.containment ? wnd.containment.position : kendo.getOffset(wnd.appendTo, 'position');\n var offsetParent = wrapper.offsetParent();\n if (offsetParent.is('html')) {\n that.containerOffset.top = that.containerOffset.left = 0;\n } else {\n var marginTop = offsetParent.css('margin-top');\n var marginLeft = offsetParent.css('margin-left');\n var hasMargin = !zero.test(marginTop) || !zero.test(marginLeft);\n if (hasMargin) {\n var wrapperPosition = getPosition(wrapper[0]);\n var relativeElMarginLeft = wrapperPosition.left - that.containerOffset.left - that.initialPosition.left;\n var relativeElMarginTop = wrapperPosition.top - that.containerOffset.top - that.initialPosition.top;\n that._relativeElMarginLeft = relativeElMarginLeft > 1 ? relativeElMarginLeft : 0;\n that._relativeElMarginTop = relativeElMarginTop > 1 ? relativeElMarginTop : 0;\n that.initialPosition.left += that._relativeElMarginLeft;\n that.initialPosition.top += that._relativeElMarginTop;\n }\n }\n wrapper.children(KWINDOWRESIZEHANDLES).not(e.currentTarget).hide();\n $(BODY).css(CURSOR, e.currentTarget.css(CURSOR));\n },\n drag: function (e) {\n if (this._preventDragging) {\n return;\n }\n var that = this, wnd = that.owner, wrapper = wnd.wrapper, options = wnd.options, position = options.position, direction = that.resizeDirection, containerOffset = that.containerOffset, initialPosition = that.initialPosition, initialSize = that.initialSize, containmentContext = wnd.containment && !wnd._isPinned, rtl = kendo.support.isRtl(wnd.containment), leftRtlOffset = containmentContext && rtl && wnd.containment.innerWidth() > wnd.containment.width ? kendo.support.scrollbar() : 0, scrollOffset = containmentContext ? {\n top: wnd.containment.scrollTop(),\n left: wnd.containment.scrollLeft()\n } : {\n top: 0,\n left: 0\n }, newWidth, newHeight, windowBottom, windowRight, x = Math.max(e.x.location, 0), y = Math.max(e.y.location, 0);\n if (direction.indexOf('e') >= 0) {\n if (wnd.containment && x - initialSize.width >= wnd.maxLeft - scrollOffset.left + containerOffset.left + leftRtlOffset) {\n newWidth = wnd.maxLeft + leftRtlOffset - initialPosition.left + initialSize.width - scrollOffset.left;\n } else {\n newWidth = x - initialPosition.left - containerOffset.left;\n }\n wrapper.width(constrain(newWidth, options.minWidth, options.maxWidth));\n } else if (direction.indexOf('w') >= 0) {\n windowRight = initialPosition.left + initialSize.width + containerOffset.left;\n newWidth = constrain(windowRight - x, options.minWidth, options.maxWidth);\n position.left = windowRight - newWidth - containerOffset.left - leftRtlOffset - (that._relativeElMarginLeft || 0) + scrollOffset.left;\n if (wnd.containment && position.left <= wnd.minLeft) {\n position.left = wnd.minLeft;\n newWidth = constrain(windowRight - leftRtlOffset - position.left - containerOffset.left + scrollOffset.left, options.minWidth, options.maxWidth);\n }\n wrapper.css({\n left: position.left,\n width: newWidth\n });\n }\n var newWindowTop = y;\n if (wnd.options.pinned) {\n newWindowTop -= $(window).scrollTop();\n }\n if (direction.indexOf('s') >= 0) {\n newHeight = newWindowTop - initialPosition.top - that.elementPadding - containerOffset.top;\n if (newWindowTop - initialSize.height - that.elementPadding >= wnd.maxTop + containerOffset.top - scrollOffset.top) {\n newHeight = wnd.maxTop - initialPosition.top + initialSize.height - scrollOffset.top;\n }\n wrapper.height(constrain(newHeight, options.minHeight, options.maxHeight));\n } else if (direction.indexOf('n') >= 0) {\n windowBottom = initialPosition.top + initialSize.height + containerOffset.top;\n newHeight = constrain(windowBottom - newWindowTop, options.minHeight, options.maxHeight);\n position.top = windowBottom - newHeight - containerOffset.top - (that._relativeElMarginTop || 0) + scrollOffset.top;\n if (position.top <= wnd.minTop && wnd.containment) {\n position.top = wnd.minTop;\n newHeight = constrain(windowBottom - position.top - containerOffset.top + scrollOffset.top, options.minHeight, options.maxHeight);\n }\n wrapper.css({\n top: position.top,\n height: newHeight\n });\n }\n if (newWidth) {\n wnd.options.width = newWidth + 'px';\n }\n if (newHeight) {\n wnd.options.height = newHeight + 'px';\n }\n wnd.resize();\n },\n dragend: function (e) {\n if (this._preventDragging) {\n return;\n }\n var that = this, wnd = that.owner, wrapper = wnd.wrapper;\n wrapper.children(KWINDOWRESIZEHANDLES).not(e.currentTarget).show();\n $(BODY).css(CURSOR, '');\n if (wnd.touchScroller) {\n wnd.touchScroller.reset();\n }\n if (e.keyCode == 27) {\n wrapper.css(that.initialPosition).css(that.initialSize);\n }\n wnd.trigger(RESIZEEND);\n return false;\n },\n destroy: function () {\n if (this._draggable) {\n this._draggable.destroy();\n }\n this._draggable = this.owner = null;\n }\n };\n function WindowDragging(wnd, dragHandle) {\n var that = this;\n that.owner = wnd;\n that._preventDragging = false;\n that._draggable = new Draggable(wnd.wrapper, {\n filter: dragHandle,\n group: wnd.wrapper.id + '-moving',\n dragstart: proxy(that.dragstart, that),\n drag: proxy(that.drag, that),\n dragend: proxy(that.dragend, that),\n dragcancel: proxy(that.dragcancel, that)\n });\n that._draggable.userEvents.stopPropagation = false;\n }\n WindowDragging.prototype = {\n dragstart: function (e) {\n var wnd = this.owner, draggable = wnd.options.draggable, element = wnd.element, actions = element.find('.k-window-actions'), containerOffset = kendo.getOffset(wnd.appendTo);\n this._preventDragging = wnd.trigger(DRAGSTART) || !draggable;\n if (this._preventDragging || wnd.isMaximized()) {\n return;\n }\n wnd.initialWindowPosition = kendo.getOffset(wnd.wrapper, 'position');\n wnd.initialPointerPosition = {\n left: wnd.options.position.left,\n top: wnd.options.position.top\n };\n wnd.startPosition = {\n left: e.x.client - wnd.initialWindowPosition.left,\n top: e.y.client - wnd.initialWindowPosition.top\n };\n wnd._updateBoundaries();\n if (!wnd.containment) {\n if (actions.length > 0) {\n wnd.minLeft = outerWidth(actions) + parseInt(actions.css('right'), 10) - outerWidth(element);\n } else {\n wnd.minLeft = 20 - outerWidth(element);\n }\n wnd.minLeft -= containerOffset.left;\n wnd.minTop = -containerOffset.top;\n }\n wnd.wrapper.append(templates.overlay).children(KWINDOWRESIZEHANDLES).hide();\n $(BODY).css(CURSOR, e.currentTarget.css(CURSOR));\n },\n drag: function (e) {\n var wnd = this.owner;\n var position = wnd.options.position;\n var axis = wnd.options.draggable.axis;\n var left;\n var top;\n if (this._preventDragging || wnd.isMaximized()) {\n return;\n }\n if (!axis || axis.toLowerCase() === 'x') {\n left = e.x.client - wnd.startPosition.left;\n if (wnd.containment && !wnd._isPinned) {\n left += wnd.containment.scrollLeft();\n }\n position.left = constrain(left, wnd.minLeft, wnd.maxLeft);\n }\n if (!axis || axis.toLowerCase() === 'y') {\n top = e.y.client - wnd.startPosition.top;\n if (wnd.containment && !wnd._isPinned) {\n top += wnd.containment.scrollTop();\n }\n position.top = constrain(top, wnd.minTop, wnd.maxTop);\n }\n if (kendo.support.transforms) {\n $(wnd.wrapper).css('transform', 'translate(' + (position.left - wnd.initialPointerPosition.left) + 'px, ' + (position.top - wnd.initialPointerPosition.top) + 'px)');\n } else {\n $(wnd.wrapper).css(position);\n }\n },\n _finishDrag: function () {\n var wnd = this.owner;\n wnd.wrapper.children(KWINDOWRESIZEHANDLES).toggle(!wnd.options.isMinimized).end().find(KOVERLAY).remove();\n $(BODY).css(CURSOR, '');\n },\n dragcancel: function (e) {\n if (this._preventDragging) {\n return;\n }\n this._finishDrag();\n e.currentTarget.closest(KWINDOW).css(this.owner.initialWindowPosition);\n },\n dragend: function () {\n var wnd = this.owner;\n if (this._preventDragging || wnd.isMaximized()) {\n return;\n }\n $(wnd.wrapper).css(wnd.options.position).css('transform', '');\n this._finishDrag();\n wnd.trigger(DRAGEND);\n return false;\n },\n destroy: function () {\n if (this._draggable) {\n this._draggable.destroy();\n }\n this._draggable = this.owner = null;\n }\n };\n kendo.ui.plugin(Window);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}