/*! * filename: ej2-filemanager.min.js * version : 19.1.66 * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ this.ej=this.ej||{},this.ej.filemanager=function(e,t,i,n,s,a,r,o,l,h,d){"use strict";function p(e,i,n){var s=t.getValue("name",i),a=e.getAttribute("data-id"),r=t.isNullOrUndefined(a)?s:a;n.setProperties({path:c(e,r,n.hasId)},!0),n.pathId=u(e),n.pathNames=f(e,s)}function c(e,t,i){for(var n=g(e,t,!1,i),s=i?"":"/",a=n.length-(i?1:2);a>=0;a--)s+=n[a]+"/";return s}function u(e){for(var t=g(e,e.getAttribute("data-uid"),!0),i=[],n=t.length-1;n>=0;n--)i.push(t[n]);return i}function f(e,t){for(var i=g(e,t,!1),n=[],s=i.length-1;s>=0;s--)n.push(i[s]);return n}function g(e,i,n,s){for(var a=[i],r=e.parentNode;!t.isNullOrUndefined(r);){if(t.matches(r,"."+hi)){var o=n?r.getAttribute("data-uid"):s?r.getAttribute("data-id"):t.select("."+di,r).textContent;a.push(o)}if((r=r.parentNode).classList.contains(ki))break}return a}function m(e){var i=e.hasId?"id":"name",n=e.hasId?"":"/",s=e.hasId?0:1;for(s;s0){var s=e.searchSettings.ignoreCase,a=e.showHiddenItems;Ve(e,i?pn:rn,e.path,n,a,!s)}else e.isFiltered?Ce(e,pn):De(e,i?pn:rn,e.path)}function D(e,t){e.setProperties({view:t},!0),(""!==e.breadcrumbbarModule.searchObj.element.value||e.isFiltered)&&(e.layoutSelectedItems=e.selectedItems);var i="";e.breadcrumbbarModule.searchObj.element.value&&(i=e.breadcrumbbarModule.searchObj.element.value),e.isLayoutChange=!0,I(e,i,!0)}function S(e,i){var n="";i&&(n=t.closest(i,".e-gridcontent")?"detailsview":t.closest(i,"."+li)?"largeiconsview":i.classList.contains("e-fullrow")||i.classList.contains("e-icon-expandable")?"navigationpane":t.closest(i,".e-address-list-item")?"breadcrumbbar":""),e.targetModule=n}function C(e){e.itemData=[x(e)],me(e.itemData[0])?De(e,Xi,e.path):fe(e,e.itemData[0],Mn)}function j(e){De(e,ln,e.path)}function x(e){return t.getValue(e.pathId[e.pathId.length-1],e.feParent)}function P(e){y("copy",e)&&(e.fileAction="copy")}function N(e){y("cut",e)&&(e.isCut=!0,e.fileAction="move")}function E(e){if(!t.getValue("isFile",e))return ji;var i=["bmp","dib","jpg","jpeg","jpe","jfif","gif","tif","tiff","png","ico"],n=["mp3","wav","aac","ogg","wma","aif","fla","m4a"],s=["webm","mkv","flv","vob","ogv","ogg","avi","wmv","mp4","3gp"],a=["css","exe","html","js","msi","pdf","pptx","ppt","rar","zip","txt","docx","doc","xlsx","xls","xml","rtf","php"],r=t.getValue("type",e);-1!==(r=r.toLowerCase()).indexOf(".")&&(r=r.split(".").join(""));return-1!==i.indexOf(r)?xi:-1!==n.indexOf(r)?Pi:-1!==s.indexOf(r)?Ni:-1!==a.indexOf(r)?"e-fe-"+r:"e-fe-unknown e-fe-"+r}function R(e,i){var n,s=e.ajaxSettings.getImageUrl?e.ajaxSettings.getImageUrl:e.ajaxSettings.url,a=t.getValue("name",i),r=t.getValue("filterPath",i);if(e.hasId){var o=t.getValue("id",i);n=s+"?path="+e.path+"&id="+o}else n=t.isNullOrUndefined(r)?s+"?path="+e.path+a:s+"?path="+r.replace(/\\/g,"/")+a;var l={fileDetails:[i],imageUrl:n=n+"&time="+(new Date).getTime().toString()};return e.trigger("beforeImageLoad",l),l.imageUrl}function M(e,i,n){var s=t.getValue(e.hasId?"id":"name",i)+"/",a=t.getValue(e.hasId?"filterId":"filterPath",i);return t.isNullOrUndefined(a)?n+s:a.replace(/\\/g,"/")+s}function k(e,i){var n=t.getValue("name",i),s=t.getValue("filterPath",i);return""===e.breadcrumbbarModule.searchObj.element.value&&!e.isFiltered||t.isNullOrUndefined(s)||(n=(s=s.replace(/\\/g,"/")).replace(e.path,"")+n),n}function L(e,i){if(0===i.length)return i;var n;n="None"!==e.sortOrder?(new s.Query).sortBy(e.sortBy,e.sortOrder.toLowerCase(),!0).group("isFile"):(new s.Query).group("isFile");var a=new s.DataManager(i).executeLocal(n);return t.getValue("records",a)}function T(e,i,n){var a=t.getValue(e.pathId[e.pathId.length-1],e.feFiles),r=(new s.Query).where(i,"equal",n);return new s.DataManager(a).executeLocal(r)[0]}function A(e,i,n){var s,a=t.select("#"+e.element.id+Jt,e.element),r=t.select("#"+e.element.id+ni,a).offsetHeight;if(s=a.offsetHeight-r,"Details"===e.view&&(s-=t.select("."+Mi,a).offsetHeight),t.isNullOrUndefined(i.querySelector("."+Oi))){var o=t.createElement("div",{className:Oi}),l=t.createElement("div",{className:Ri}),h=t.createElement("div",{className:wi}),d=t.createElement("div",{className:Ii});"Details"===e.view?i.querySelector("."+Ti).appendChild(o):i.appendChild(o),o.appendChild(l),o.appendChild(h),o.appendChild(d)}i.querySelector("."+Oi)&&(t.isNullOrUndefined(n.error)?e.isFiltered?(i.querySelector("."+wi).innerHTML=V(e,"Filter-Empty"),i.querySelector("."+Ii).innerHTML=V(e,"Filter-Key")):""!==e.breadcrumbbarModule.searchObj.element.value?(i.querySelector("."+wi).innerHTML=V(e,"Search-Empty"),i.querySelector("."+Ii).innerHTML=V(e,"Search-Key")):(i.querySelector("."+wi).innerHTML=V(e,"Folder-Empty"),i.querySelector("."+Ii).innerHTML=V(e,"File-Upload")):(i.querySelector("."+wi).innerHTML=V(e,"Access-Denied"),i.querySelector("."+Ii).innerHTML=V(e,"Access-Details")));var p=t.select("."+Oi,i);s=(s-p.offsetHeight)/2,p.style.marginTop=s+"px"}function F(e){return new s.DataManager(e).executeLocal((new s.Query).where(zi,"equal",!1,!1))}function U(e,i){for(var n=F(e.files),s=0,a=n.length;s0&&(h=s+o.substring(0,l+1)),h===n){var d={files:null,error:{code:"402",message:V(e,"Same-Folder-Error"),fileExists:null}};ze(e,"Error",d),a=!0;break}}else{var p=M(e,i[r],s);if(0===n.indexOf(p)){ze(e,"Error",d={files:null,error:{code:"402",message:V(e,"Sub-Folder-Error"),fileExists:null}}),a=!0;break}}return a}function Y(e){e.isDragDrop=!0,0!==e.dragData.length&&(e.dragPath=e.dragPath.replace(/\\/g,"/"),e.dropPath=e.dropPath.replace(/\\/g,"/"),G(e,e.dragData,e.dropPath,e.dragPath)||e.dragPath===e.dropPath||(e.itemData=[e.dropData],xe(e,e.dragPath,e.dragNodes,e.dropPath,"move",[],e.dragData),e.notify(wn,{})))}function Q(e){for(var t=e.split("/"),i=t[0]+"/",n=1;n1){var r=e.createElement("span",{className:"e-fe-count",innerHTML:e.dragNodes.length.toString(10)});a.appendChild(r)}e.virtualDragElement=a,e.element.appendChild(e.virtualDragElement)}function te(e,i){var n=i;n.cancel=!1,null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),se(e),e.element.classList.remove("e-fe-drop","e-no-drop"),O(e),e.uploadObj.dropArea=t.select("#"+e.element.id+ii,e.element);var s=t.select("."+Di,e.element);s&&t.detach(s),S(e,i.target),e.notify(xn,i),O(e,"hover"),n.fileDetails=e.dragData,e.trigger("fileDragStop",n,function(i){i.cancel||t.isNullOrUndefined(e.targetModule)||""===e.targetModule||Y(e)})}function ie(e,i,n){var s=i;if(s.cancel=!1,s.fileDetails=e.dragData,e.droppedObjects=[],(!e.allowDragAndDrop||"navigationpane"===e.activeModule&&t.closest(i.element,"li").getAttribute("data-uid")===e.pathId[0])&&(s.cancel=!0),"navigationpane"===e.activeModule&&-1!==e.pathId.indexOf(t.closest(i.element,"li").getAttribute("data-uid"))?e.isPathDrag=!0:e.isPathDrag=!1,O(e),s.cancel)n.intDestroy(i.event),ne(e);else if(!s.cancel){for(var a=0;a0&&He(e,e.path,e.selectedItems)}function ce(e,t,i){for(var n=0;n0&&He(e,e.path,i)}function fe(e,i,n){var s=t.getValue("message",t.getValue("permission",i));""===s&&(s=V(e,"Access-Message").replace("{0}",t.getValue("name",i)).replace("{1}",n)),ze(e,"Error",{error:{code:"401",fileExists:null,message:s}})}function ge(e){return me(e)?"e-fe-locked":"e-fe-locked e-fe-hidden"}function me(e){var i=t.getValue("permission",e);return!(i&&!t.getValue("read",i))}function be(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("write",i)}function ye(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("writeContents",i)}function ve(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("upload",i)}function Oe(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("download",i)}function we(e){var t=e.itemData[0];ye(t)?ze(e,"NewFolder"):fe(e,t,Ln)}function Ie(e){var t=e.itemData[0];if(ve(t)){var i="#"+e.element.id+si;document.querySelector(i).click()}else fe(e,t,Tn)}function De(e,i,n){for(var s=e.itemData,a=0;a"+V(e,"Content-Rename-Confirmation")+"",o.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Yes")},click:function(){e.extDialogObj.hide(),je(e,n,e.renameText)}},{buttonModel:{content:V(e,"Button-No")},click:function(){e.extDialogObj.hide(),e.dialogObj.hide()}}],o.dialogName="Extension Change";break;case"DuplicateItems":o.dialogName="Duplicate Items",e.replaceItems=i,a=-1===(r=(a=e.replaceItems[e.fileLength]).lastIndexOf("/"))?a:a.substring(r),o.header=V(e,"Header-Duplicate"),s="
"+V(e,"Content-Duplicate")+"
",o.content=s.replace("{0}",a),o.close=function(){if(!e.isDropEnd&&0===e.duplicateItems.length){var t={fileDetails:e.droppedObjects};e.trigger("fileDropped",t),e.isDropEnd=e.isDragDrop=!1}Ye(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Yes")},click:function(){if(e.duplicateItems.push(e.replaceItems[e.fileLength]),e.duplicateRecords.push(Z(e,e.replaceItems[e.fileLength])),e.fileLength++,i[e.fileLength]){var t=e.replaceItems[e.fileLength],n=t.lastIndexOf("/");t=-1===n?t:t.substring(n),e.extDialogObj.content=s.replace("{0}",t),e.extDialogObj.show()}else{e.extDialogObj.hide();var a=e.isDragDrop?e.dragPath:e.targetPath,r=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath,o=e.isDragDrop?"move":e.fileAction;xe(e,a,e.duplicateItems,r,o,e.duplicateItems,e.duplicateRecords)}}},{buttonModel:{content:V(e,"Button-No")},click:function(){if(e.fileLength++,i[e.fileLength]){var t=e.replaceItems[e.fileLength],n=t.lastIndexOf("/");t=-1===n?t:t.substring(n),e.extDialogObj.content=s.replace("{0}",t),e.extDialogObj.show()}else if(e.extDialogObj.hide(),0!==e.duplicateItems.length){var a=e.isDragDrop?"move":e.fileAction,r=e.isDragDrop?e.dragPath:e.targetPath,o=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath;xe(e,r,e.duplicateItems,o,a,e.duplicateItems,e.duplicateRecords)}}}];break;case"UploadRetry":o.dialogName="Retry Upload",o.header=V(e,"Header-Retry"),o.content=e.retryFiles[0].name+'
'+V(e,"Content-Retry")+"
",o.open=$e.bind(this,e),o.close=function(){e.isRetryOpened=!1,Xe(e),Ye(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Keep-Both")},click:function(){Je(e,!0)}},{buttonModel:{isPrimary:!0,content:V(e,"Button-Replace")},click:function(){Je(e,!1)}},{buttonModel:{isPrimary:!0,content:V(e,"Button-Skip")},click:function(){var t=0;e.isApplySame?(t=e.retryFiles.length,e.retryFiles=[],Xe(e)):(t=1,e.retryFiles.splice(0,1),0!==e.retryFiles.length?qe(e,"UploadRetry"):Xe(e)),e.notify(nn,{count:t})}}]}return o}function Je(e,t){e.isApplySame?(t?Ze(e):et(e),Xe(e)):(e.retryArgs.push({action:t?"keepboth":"replace",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1),0!==e.retryFiles.length?qe(e,"UploadRetry"):Xe(e))}function Xe(e){var i=!0;e.isRetryOpened?e.isRetryOpened=!1:i=!1;var n=t.select(".e-dlg-checkbox",e.extDialogObj.element);n&&t.remove(n),i?e.extDialogObj.hide():e.retryFiles=[]}function $e(e,i){e.isRetryOpened=!0;var n=t.getValue("element",i),s=t.select(".e-dlg-content",n),a=e.createElement("div",{className:"e-dlg-checkbox"}),o=e.createElement("input",{id:e.element.id+"_applyall"});a.appendChild(o),s.appendChild(a),new r.CheckBox({label:V(e,"ApplyAll-Label"),change:function(t){e.isApplySame=t.checked}}).appendTo("#"+e.element.id+"_applyall"),Ge(e,e.extDialogObj,"Retry Upload")}function Ze(e){for(;0!==e.retryFiles.length;)e.retryArgs.push({action:"keepboth",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1)}function et(e){for(;0!==e.retryFiles.length;)e.retryArgs.push({action:"replace",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1)}function tt(e){var i=t.select("#newname",e.dialogObj.element);i.focus(),i.value="";var n=i.value.length;i.setSelectionRange(0,n)}function it(e){var i=t.select("#newname",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||at(i,V(e,"Content-NewFolder")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){ft(e,i)},i.onkeyup=function(t){13===bt(t)&&pt(e)},tt(e),Ge(e,e.dialogObj,"Create Folder")}function nt(e){var i=t.select("#rename",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||at(i,V(e,"Content-Rename")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){ft(e,i)},i.onkeyup=function(t){13===bt(t)&&ct(e)},st(e,i),Ge(e,e.dialogObj,"Rename")}function st(e,t){t.focus();var i="";if(e.isFile&&!e.showFileExtension){var n=e.currentItemText.lastIndexOf(".");i=-1===n?e.currentItemText:e.currentItemText.substring(0,n)}else i=e.currentItemText;t.value=i,e.isFile&&e.showFileExtension&&-1!==t.value.indexOf(".")?t.setSelectionRange(0,t.value.lastIndexOf(".")):t.setSelectionRange(0,t.value.length)}function at(e,t){a.Input.createInput({element:e,properties:{placeholder:t}})}function rt(e,i,n,s,a){var r,o,l,h,d,p={header:"",content:"",buttons:[],dialogName:""};switch(p.open=function(){Ge(e,e.dialogObj,p.dialogName)},p.close=function(){Ye(e,e.dialogObj,p.dialogName)},i=s&&!0===s.multipleFiles?"MultipleFileDetails":i){case"NewFolder":p.dialogName="Create Folder",p.header=V(e,"Header-NewFolder"),p.content='
',p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Create")},click:function(t){"keydown"!==t.type&&pt(e)}}],p.open=it.bind(this,e);break;case"Delete":p.dialogName="Delete",e.selectedItems.length>1?(p.content=("
"+V(e,"Content-Multiple-Delete")+"
").replace("{0}",e.selectedItems.length.toString()),p.header=V(e,"Header-Multiple-Delete")):(p.content="
"+V(e,e.isFile?"Content-Delete":"Content-Folder-Delete")+"
",p.header=V(e,e.isFile?"Header-Delete":"Header-Folder-Delete")),p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Yes")},click:function(t){ut(e)}},{buttonModel:{content:V(e,"Button-No")},click:function(){e.dialogObj.hide()}}];break;case"Rename":p.dialogName="Rename",p.header=V(e,"Header-Rename"),p.content='
',p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Save")},click:function(t){"keydown"!==t.type&&ct(e)}}],p.open=nt.bind(this,e);break;case"details":p.dialogName="File Details",o=new t.Internationalization(e.locale).formatDate(new Date(s.modified),{format:"MMMM dd, yyyy HH:mm:ss"}),r="",t.isNullOrUndefined(s.permission)||(r=""+V(e,"Permission")+''+oe(s.permission)+""),p.header=s.name,p.content=""+r+"
"+V(e,"Type")+''+(s.isFile?"File":"Folder")+"
"+V(e,"Size")+''+s.size+"
"+V(e,"Location")+''+s.location+"
"+V(e,"Modified")+''+o+"
",p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}];break;case"MultipleFileDetails":p.dialogName="File Details",h=(l=s.name.split(",").map(function(e){var t=e.indexOf(".")+1;return 0===t?"Folder":e.substr(t).replace(" ","")})).every(function(e,t,i){return e===i[0]})?"Folder"===l[0]?"Folder":l[0].toLocaleUpperCase()+" Type":"Multiple Types",d=s.location,p.header=s.name,p.content="
"+V(e,"Type")+':'+h+"
"+V(e,"Size")+":"+s.size+'
'+V(e,"Location")+':'+d+"
",p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Ok")},click:function(t){"keydown"!==t.type&&e.dialogObj.hide()}}];break;case"Error":e.notify(an,{}),p.dialogName="Error","401"===n.error.code?p.header='
'+V(e,"Access-Denied")+"
":p.header=V(e,"Error"),p.content='
'+n.error.message+"
",p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}]}return p}function ot(e,i,n){ht(t.selectAll(".e-btn",e.dialogObj.element)),We(e,e.dialogObj,n,i)}function lt(e,i,n){ht(t.selectAll(".e-btn",e.extDialogObj.element)),We(e,e.extDialogObj,n,i)}function ht(e){for(var t=0;t:]/.test(t.value)?mt(e,t):""===t.value?t.parentElement.nextElementSibling.innerHTML=V(e,"Validation-Empty"):t.parentElement.nextElementSibling.innerHTML=""}function gt(e,t){ft(e,t);var i=t.value.length-1;""===t.value||t.value.lastIndexOf(".")!==i&&t.value.lastIndexOf(" ")!==i||!e.showFileExtension&&-1!==e.currentItemText.lastIndexOf(".")||mt(e,t)}function mt(e,t){var i=V(e,"Validation-Invalid").replace("{0}",'"'+t.value+'"');t.parentElement.nextElementSibling.innerHTML=i}function bt(e){return e.keyCode?e.keyCode:e.which?e.which:e.charCode}function yt(e,i,s){var a=t.createElement("div",{className:"e-image-wrap"}),r=t.createElement("img",{className:"e-image",attrs:{src:s,alt:i}});a.appendChild(r),t.isNullOrUndefined(e.viewerObj)?(e.viewerObj=new n.Dialog({header:i,content:a,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,isModal:!0,width:"350px",height:"350px",target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:B(e,e.isMobile?ri:ai),locale:e.locale,enableResize:!0,allowDragging:!0,enableHtmlSanitizer:e.enableHtmlSanitizer,position:{X:"center",Y:"center"},enableRtl:e.enableRtl,open:vt.bind(this,e),close:function(){Ye(e,e.viewerObj,"Image Preview")},beforeOpen:function(t){We(e,e.viewerObj,t,"Image Preview")},beforeClose:function(t){Ke(e,e.viewerObj,t,"Image Preview")},resizing:Ot.bind(this,e),resizeStop:Ot.bind(this,e)}),e.viewerObj.isStringTemplate=!0,e.viewerObj.appendTo("#"+e.element.id+ei)):(e.viewerObj.refresh(),e.viewerObj.header=i,e.viewerObj.content=a,e.viewerObj.enableRtl=e.enableRtl,e.viewerObj.dataBind(),e.viewerObj.show())}function vt(e){setTimeout(function(){e.viewerObj&&e.viewerObj.element.focus()}),Ot(e),Ge(e,e.viewerObj,"Image Preview")}function Ot(e){var i=t.select(".e-dlg-content",e.viewerObj.element),n=t.select(".e-image-wrap",e.viewerObj.element),s=window.getComputedStyle(i,null),a=s?2*parseFloat(s.paddingRight):36,r=s?2*parseFloat(s.paddingBottom):20;n.style.width=i.offsetWidth-a+"px",n.style.height=i.offsetHeight-r+"px"}var wt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),It=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Dt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return wt(i,e),It([t.Property(null)],i.prototype,"downloadUrl",void 0),It([t.Property(null)],i.prototype,"getImageUrl",void 0),It([t.Property(null)],i.prototype,"uploadUrl",void 0),It([t.Property(null)],i.prototype,"url",void 0),i}(t.ChildProperty),St=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ct=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},jt=["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"],xt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return St(i,e),Ct([t.Property(jt)],i.prototype,"items",void 0),Ct([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),Pt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Nt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Pt(i,e),Nt([t.Property(!0)],i.prototype,"allowSearchOnTyping",void 0),Nt([t.Property("contains")],i.prototype,"filterType",void 0),Nt([t.Property(!0)],i.prototype,"ignoreCase",void 0),i}(t.ChildProperty),Rt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},kt=[{field:"name",headerText:"Name",minWidth:120,template:'${name}',customAttributes:{class:"e-fe-grid-name"}},{field:"_fm_modified",headerText:"DateModified",type:"dateTime",format:"MMMM dd, yyyy HH:mm",minWidth:120,width:"190"},{field:"size",headerText:"Size",minWidth:90,width:"110",template:'${size}'}],Lt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Rt(i,e),Mt([t.Property(!0)],i.prototype,"columnResizing",void 0),Mt([t.Property(kt)],i.prototype,"columns",void 0),i}(t.ChildProperty),Tt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),At=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Ft=["Open","|","Cut","Copy","|","Delete","Download","Rename","|","Details"],Ut=["Open","|","Cut","Copy","Paste","|","Delete","Rename","Download","|","Details"],_t=["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"],Vt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Tt(i,e),At([t.Property(Ft)],i.prototype,"file",void 0),At([t.Property(Ut)],i.prototype,"folder",void 0),At([t.Property(_t)],i.prototype,"layout",void 0),At([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),Bt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ht=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bt(i,e),Ht([t.Property("650px")],i.prototype,"maxWidth",void 0),Ht([t.Property("240px")],i.prototype,"minWidth",void 0),Ht([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),qt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Wt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qt(i,e),Wt([t.Property("")],i.prototype,"allowedExtensions",void 0),Wt([t.Property(!0)],i.prototype,"autoUpload",void 0),Wt([t.Property(!1)],i.prototype,"autoClose",void 0),Wt([t.Property(0)],i.prototype,"minFileSize",void 0),Wt([t.Property(3e7)],i.prototype,"maxFileSize",void 0),i}(t.ChildProperty),Gt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Gt(i,e),Yt([t.Property("")],i.prototype,"field",void 0),Yt([t.Property("")],i.prototype,"headerText",void 0),Yt([t.Property("")],i.prototype,"width",void 0),Yt([t.Property("")],i.prototype,"minWidth",void 0),Yt([t.Property("")],i.prototype,"maxWidth",void 0),Yt([t.Property("Left")],i.prototype,"textAlign",void 0),Yt([t.Property(null)],i.prototype,"headerTextAlign",void 0),Yt([t.Property(null)],i.prototype,"type",void 0),Yt([t.Property(null)],i.prototype,"format",void 0),Yt([t.Property(null)],i.prototype,"template",void 0),Yt([t.Property(null)],i.prototype,"headerTemplate",void 0),Yt([t.Property(!0)],i.prototype,"allowSorting",void 0),Yt([t.Property(!0)],i.prototype,"allowResizing",void 0),Yt([t.Property(null)],i.prototype,"customAttributes",void 0),Yt([t.Property("")],i.prototype,"hideAtMedia",void 0),Yt([t.Property(null)],i.prototype,"customFormat",void 0),i}(t.ChildProperty),Jt="_layout",Xt="_grid",$t="_largeicons",Zt="_dialog",ei="_img_dialog",ti="_extn_dialog",ii="_content",ni="_breadcrumbbar",si="_upload",ai="e-fe-popup",ri="e-fe-popup e-fe-mobile",oi="e-fe-m-filter",li="e-large-icons",hi="e-list-item",di="e-list-text",pi="e-icons e-fe-tick",ci="e-icons e-fe-dot",ui="e-blur",fi="e-active",gi="e-hover",mi="e-focus",bi="e-check",yi="e-checkbox-wrapper",vi="e-row",Oi="e-empty",wi="e-empty-content",Ii="e-empty-inner-content",Di="e-fe-clone",Si="e-fe-drop-folder",Ci="e-fe-drop-file",ji="e-fe-folder",xi="e-fe-image",Pi="e-fe-music",Ni="e-fe-video",Ei="e-large-icon",Ri="e-empty-icon e-fe-folder",Mi="e-gridheader",ki="e-treeview",Li="e-menu-icon",Ti="e-content",Ai="e-icons e-fe-cut",Fi="e-icons e-fe-grid",Ui="e-icons e-fe-large",_i="e-fe-errorcontent",Vi="e-rtl",Bi="e-display-none",Hi="e-fe-value",zi="isFile",qi="model-changed",Wi="initial-end",Ki="finalize-end",Gi="create-end",Yi="path-drag",Qi="delete-init",Ji="delete-end",Xi="refresh-end",$i="resize-end",Zi="path-changed",en="destroy",tn="before-request",nn="skip-upload",sn="after-request",an="actionFailure",rn="search",on="open-init",ln="open-end",hn="selection-changed",dn="clear-path-init",pn="layout-change",cn="sort-by-change",un="details-init",fn="menu-item-data",gn="rename-init",mn="rename-end-parent",bn="rename-end",yn="show-paste",vn="hide-paste",On="cut-copy-init",wn="paste-init",In="paste-end",Dn="cut-end",Sn="sort-column",Cn="path-column",jn="search-change",xn="drop-init",Pn="drag-end",Nn="drop-path",En="dragging",Rn="method-call",Mn="read",kn="write",Ln="writeContents",Tn="upload",An="download",Fn=function(){function e(e){this.isInteraction=!0,this.uploadOperation=!1,this.count=0,this.isRendered=!0,this.tapCount=0,this.isPasteOperation=!1,this.isInteracted=!0,this.parent=e,this.element=t.select("#"+this.parent.element.id+$t,this.parent.element),t.addClass([this.element],li),this.addEventListener(),this.keyConfigs={end:"end",home:"home",tab:"tab",moveDown:"downarrow",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",ctrlEnd:"ctrl+end",ctrlHome:"ctrl+home",ctrlDown:"ctrl+downarrow",ctrlLeft:"ctrl+leftarrow",ctrlRight:"ctrl+rightarrow",ctrlUp:"ctrl+uparrow",shiftEnd:"shift+end",shiftHome:"shift+home",shiftDown:"shift+downarrow",shiftLeft:"shift+leftarrow",shiftRight:"shift+rightarrow",shiftUp:"shift+uparrow",csEnd:"ctrl+shift+end",csHome:"ctrl+shift+home",csDown:"ctrl+shift+downarrow",csLeft:"ctrl+shift+leftarrow",csRight:"ctrl+shift+rightarrow",csUp:"ctrl+shift+uparrow",space:"space",ctrlSpace:"ctrl+space",shiftSpace:"shift+space",csSpace:"ctrl+shift+space",ctrlA:"ctrl+a",enter:"enter",altEnter:"alt+enter",esc:"escape",del:"delete",ctrlX:"ctrl+x",ctrlC:"ctrl+c",ctrlV:"ctrl+v",f2:"f2",shiftdel:"shift+delete",back:"backspace",ctrlD:"ctrl+d"}}return e.prototype.render=function(e){if(this.parent.visitedItem=null,this.startItem=null,n.showSpinner(this.parent.element),"LargeIcons"===this.parent.view){this.resetMultiSelect(),this.element.setAttribute("tabindex","0"),this.listObj&&(this.unWireEvents(),this.removeEventListener()),this.parent.notify("hide-layout",{});var i=t.select("#"+this.parent.element.id+$t,this.parent.element),s=t.select("ul",i);if(s&&t.remove(s),this.listObj={ariaAttributes:{itemRole:"option",listRole:"listbox",itemText:"",groupItemRole:"group",wrapperRole:""},showIcon:!0,fields:{text:"name",iconCss:"_fm_icon",imageUrl:"_fm_imageUrl",htmlAttributes:"_fm_htmlAttr"},sortOrder:this.parent.sortOrder,itemCreated:this.onItemCreated.bind(this),enableHtmlSanitizer:this.parent.enableHtmlSanitizer},this.items=[],this.items=this.renderList(e),this.items=L(this.parent,this.items),this.listElements=o.ListBase.createListFromJson(t.createElement,this.items,this.listObj),this.itemList=Array.prototype.slice.call(t.selectAll("."+hi,this.listElements)),this.element.appendChild(this.listElements),this.preventImgDrag(),this.createDragObj(),i.classList.remove(Bi),0===this.itemList.length){var a=this.element.querySelector(".e-list-parent");this.element.removeChild(a),A(this.parent,this.element,e)}else 0!==this.itemList.length&&this.element.querySelector("."+Oi)&&this.element.removeChild(this.element.querySelector("."+Oi));!0===this.isPasteOperation&&(this.selectItems(this.parent.pasteNodes),this.isPasteOperation=!1),!0===this.uploadOperation&&(this.selectItems(this.parent.uploadItem),this.parent.setProperties({selectedItems:[]},!0),++this.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[]));var r=this.element.querySelectorAll("."+fi);0!==r.length&&(this.parent.activeModule="largeiconsview");for(var l=0;l0&&i.doTapAction(i.tapEvent),i.tapCount=0},350)):2===e.tapCount&&3!==e.originalEvent.which?i.dblClickHandler(e):i.clickHandler(e)},tapHold:function(e){i.parent.isDevice&&(i.multiSelect=!!i.parent.allowMultiSelection,i.parent.allowMultiSelection&&t.addClass([i.parent.element],"e-fe-m-select"),i.clickHandler(e))}})}else this.clickObj&&this.clickObj.destroy()},e.prototype.doTapAction=function(e){var i=e.originalEvent.target,n=t.closest(i,"."+hi);this.multiSelect||i.classList.contains("e-list-parent")||t.isNullOrUndefined(n)?this.clickHandler(e):(this.parent.isFile=!1,this.updateType(n),this.parent.isFile?2===e.tapCount?(this.clickHandler(e),this.dblClickHandler(e)):this.clickHandler(e):this.dblClickHandler(e))},e.prototype.clickHandler=function(e){var t=e.originalEvent.target;O(this.parent,"hover"),this.doSelection(t,e.originalEvent),this.parent.activeModule="largeiconsview"},e.prototype.doSelection=function(e,i){var n=t.closest(e,"."+hi),s=e.classList;this.parent.isFile=!1;var a="select";if(3===i.which&&!t.isNullOrUndefined(n)&&n.classList.contains(fi))return void this.updateType(n);if(t.isNullOrUndefined(n))this.clearSelection();else if(this.parent.allowMultiSelection&&n.classList.contains(fi)&&(i.ctrlKey||e.classList.contains(bi))&&(a="unselect"),!0!==this.triggerSelection(a,n).cancel){if(this.parent.allowMultiSelection&&(this.multiSelect||!i||i.ctrlKey)||s.contains("e-frame")||(this.updateType(n),this.clearSelect()),this.parent.allowMultiSelection&&i.shiftKey){i&&i.ctrlKey||this.clearSelect(),this.startItem||(this.startItem=n);var r=this.itemList.indexOf(this.startItem),o=this.itemList.indexOf(n);if(r>o)for(l=r;l>=o;l--)this.addActive(this.itemList[l]);else for(var l=r;l<=o;l++)this.addActive(this.itemList[l]);this.addFocus(this.itemList[o])}else this.startItem=n,this.parent.allowMultiSelection&&n.classList.contains(fi)?this.removeActive(n):this.addActive(n),this.addFocus(n);0===this.parent.selectedItems.length&&this.resetMultiSelect(),this.parent.notify(hn,{}),this.triggerSelect(a,n)}t.isNullOrUndefined(n)||this.updateType(n)},e.prototype.dblClickHandler=function(e){this.parent.activeModule="largeiconsview";var t=e.originalEvent.target;this.doOpenAction(t)},e.prototype.clearSelection=function(){this.clearSelect(),this.resetMultiSelect(),this.parent.notify(hn,{})},e.prototype.resetMultiSelect=function(){this.multiSelect=!1,t.removeClass([this.parent.element],"e-fe-m-select")},e.prototype.doOpenAction=function(e){var i=this;if(!t.isNullOrUndefined(e)){var n=t.closest(e,"."+hi);if(this.parent.isFile=!1,!t.isNullOrUndefined(n)){this.updateType(n);var s=this.getItemObject(n);if(!me(s))return void fe(this.parent,s,Mn);var a={cancel:!1,fileDetails:s,module:"LargeIconsView"};this.parent.trigger("fileOpen",a,function(e){if(!e.cancel){var n=t.getValue("name",s);if(i.parent.isFile){if(E(s)===xi){var a=R(i.parent,s);yt(i.parent,n,a)}}else{if(""!==i.parent.breadcrumbbarModule.searchObj.element.value||i.parent.isFiltered)W(i.parent,s);else{var r=t.getValue("id",s),o=i.parent.path+(t.isNullOrUndefined(r)?n:r)+"/";i.parent.setProperties({path:o},!0),i.parent.pathNames.push(n),i.parent.pathId.push(t.getValue("_fm_id",s)),i.parent.itemData=[s],j(i.parent)}i.parent.isFiltered=!1,i.parent.setProperties({selectedItems:[]},!0)}}})}}},e.prototype.updateType=function(e){var i=t.select("."+ji,e);this.parent.isFile=!!t.isNullOrUndefined(i)},e.prototype.keydownActionHandler=function(e){if(this.isRendered)switch(e.action){case"end":case"home":case"moveDown":case"moveLeft":case"moveRight":case"moveUp":case"ctrlEnd":case"shiftEnd":case"csEnd":case"ctrlHome":case"shiftHome":case"csHome":case"ctrlDown":case"shiftDown":case"csDown":case"ctrlLeft":case"shiftLeft":case"csLeft":case"ctrlRight":case"shiftRight":case"csRight":case"space":case"ctrlSpace":case"shiftSpace":case"csSpace":case"ctrlA":case"enter":case"altEnter":case"esc":case"del":case"shiftdel":case"ctrlC":case"ctrlV":case"ctrlX":case"f2":case"ctrlD":e.preventDefault()}},e.prototype.keyActionHandler=function(e){if(this.isRendered){var i=this.getFocusedItem(),n=this.getFirstItem(),s=this.getLastItem();switch(e.action){case"end":this.navigateItem(s);break;case"home":this.navigateItem(n);break;case"tab":t.isNullOrUndefined(i)?t.isNullOrUndefined(n)||this.addFocus(n):this.addFocus(i);break;case"moveDown":this.navigateDown(i,!0);break;case"moveLeft":this.navigateRight(i,!1);break;case"moveRight":this.navigateRight(i,!0);break;case"moveUp":this.navigateDown(i,!1);break;case"ctrlEnd":case"shiftEnd":case"csEnd":this.csEndKey(s,e);break;case"ctrlHome":case"shiftHome":case"csHome":this.csHomeKey(n,e);break;case"ctrlDown":case"shiftDown":case"csDown":this.csDownKey(i,e);break;case"ctrlLeft":case"shiftLeft":case"csLeft":this.csLeftKey(i,e);break;case"ctrlRight":case"shiftRight":case"csRight":this.csRightKey(i,e);break;case"ctrlUp":case"shiftUp":case"csUp":this.csUpKey(i,e);break;case"space":this.spaceKey(i);break;case"ctrlSpace":case"shiftSpace":case"csSpace":t.isNullOrUndefined(i)||this.doSelection(i,e);break;case"ctrlA":this.ctrlAKey(n,s);break;case"enter":this.doOpenAction(this.parent.visitedItem?this.parent.visitedItem:this.getVisitedItem());break;case"altEnter":this.parent.notify(un,{}),Ne(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":b(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"ctrlC":P(this.parent);break;case"ctrlV":this.parent.folderPath="",K(this.parent);break;case"ctrlX":N(this.parent);break;case"f2":this.performRename();break;case"ctrlD":this.doDownload()}}},e.prototype.doDownload=function(){this.updateSelectedData(),pe(this.parent)},e.prototype.performDelete=function(){if(this.parent.selectedItems&&this.parent.selectedItems.length>0){this.updateSelectedData();for(var e=this.parent.itemData,t=0;t-1&&(this.parent.selectedItems.splice(i,1),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)),this.parent.visitedItem=null}},e.prototype.getDataName=function(e){var t=this.getItemObject(e);return le(this.parent,t)},e.prototype.addFocus=function(e){this.element.setAttribute("tabindex","-1");var i=this.getFocusedItem();i&&(i.removeAttribute("tabindex"),t.removeClass([i],[mi])),t.addClass([e],[mi]),e.setAttribute("tabindex","0"),e.focus()},e.prototype.checkState=function(e,i){if(this.parent.allowMultiSelection){var n=t.select(".e-frame",e);t.isNullOrUndefined(n)||(i?n.classList.contains(bi)||(t.addClass([n],bi),t.closest(n,"."+yi).setAttribute("aria-checked","true")):n.classList.contains(bi)&&(t.removeClass([n],bi),t.closest(n,"."+yi).setAttribute("aria-checked","false")))}},e.prototype.clearSelect=function(){var e=Array.prototype.slice.call(t.selectAll("."+fi,this.listElements));if(0!==e.length){if(!0!==this.triggerSelection("unselect",e[0]).cancel)for(var i=0,n=e.length;i0&&(i=new s.DataManager(n).executeLocal((new s.Query).where("filterPath","equal",this.parent.filterPath,!1)))}if(i.length>0){var a=this.items.indexOf(i[0]),r={ctrlKey:!0,shiftKey:!1};this.doSelection(this.itemList[a],r)}},e.prototype.updateSelectedData=function(){for(var e=[],i=t.selectAll("."+hi+"."+fi,this.element),n=0;n0&&this.doOpenAction(this.itemList[i[0]])}},e.prototype.renameFile=function(e,i){if(this.parent.activeModule="largeiconsview",t.isNullOrUndefined(e))return void this.performRename();var n=this.getItemsIndex([e]);n.length>0&&(he(this.parent,this.items[n[0]]),t.isNullOrUndefined(i)?de(this.parent):be(this.parent.itemData[0])?je(this.parent,this.parent.path,i):fe(this.parent,this.parent.itemData[0],kn))},e}(),Un=function(){function e(e){this.addressPath="",this.addressBarLink="",this.searchTimer=null,this.searchWrapWidth=null,this.parent=e,this.keyConfigs={enter:"enter"},this.render()}return e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var i=0,n=Object.keys(e.newProp);i0){for(var r="",o=0;oh){for(u=i.length;u--;){var I=h-c[u];if(!(I>40)){for(var D=[],S=0;S<=u;S++){var C=i[S];D.push({text:C.innerText,utext:C.getAttribute("data-utext")})}var j=this.parent.createElement("li",{className:"e-breadcrumb-menu"}),x={className:"e-breadcrumb-submenu"},P=this.parent.createElement("button",x);j.appendChild(P),d.insertBefore(j,d.querySelector("li")),this.subMenuObj=new l.DropDownButton({items:D,cssClass:"e-caret-hide e-submenu",iconCss:"e-icons e-fe-breadcrumb",iconPosition:"Top",enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.addSubMenuAttributes.bind(this),select:this.subMenuSelectOperations.bind(this)}),this.subMenuObj.isStringTemplate=!0,this.subMenuObj.appendTo(P);break}d.insertBefore(i[u],d.querySelector("li")),h=I}this.parent.breadCrumbBarNavigation.insertBefore(d,w)}else this.parent.breadCrumbBarNavigation.insertBefore(e,w)},e.prototype.onFocus=function(){t.closest(this.searchObj.element,".e-search-wrap").classList.add("e-focus")},e.prototype.onKeyUp=function(){this.parent.notify(Cn,{args:this.parent})},e.prototype.onBlur=function(){t.closest(this.searchObj.element,".e-search-wrap").classList.remove("e-focus")},e.prototype.subMenuSelectOperations=function(e){var t={target:e.element};this.addressPathClickHandler(t)},e.prototype.addSubMenuAttributes=function(e){e.element.setAttribute("data-utext",t.getValue("utext",e.item));var i=this.parent.createElement("a",{className:"e-list-text"});e.element.appendChild(i)},e.prototype.searchEventBind=function(e){e?(this.searchObj.input=this.searchChangeHandler.bind(this),this.searchObj.change=null):(this.searchObj.change=this.searchChangeHandler.bind(this),this.searchObj.input=null)},e.prototype.searchChangeHandler=function(e){var i=this;t.isNullOrUndefined(e.value)||(this.parent.isFiltered=!1,this.parent.searchSettings.allowSearchOnTyping?(window.clearTimeout(this.searchTimer),this.searchTimer=window.setTimeout(function(){I(i.parent,e.value,!1)},300)):I(this.parent,e.value,!1))},e.prototype.addressPathClickHandler=function(e){var i=e.target;if("LI"===i.nodeName||"A"===i.nodeName){var n="LI"===i.nodeName?i.children[0]:i;if(!t.isNullOrUndefined(n)){this.parent.isFiltered=!1;var s=this.updatePath(n);this.parent.itemData=[t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)],this.triggerFileOpen(this.parent.itemData[0]),De(this.parent,Zi,s);var a=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify("update-tree-selection",{module:"treeview",selectedNode:a})}}},e.prototype.triggerFileOpen=function(e){var t={cancel:!1,fileDetails:e,module:"BreadCrumbBar"};delete t.cancel,this.parent.trigger("fileOpen",t)},e.prototype.onShowInput=function(){if(this.parent.isMobile)if(this.parent.element.classList.contains(oi))t.removeClass([this.parent.element],oi),this.searchWrapWidth=null;else{var e=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");this.searchWrapWidth=e.offsetWidth,t.addClass([this.parent.element],oi),this.searchObj.element.focus()}},e.prototype.updatePath=function(e){var i=t.closest(e,"li").getAttribute("data-utext");this.addressBarLink=i;var n=this.addressBarLink.split("/"),s=this.parent.pathId,a=this.parent.pathNames;this.parent.pathId=[],this.parent.pathNames=[];for(var r="",o=0,l=n.length-1;o0&&He(i.parent,i.parent.path,i.parent.selectedItems);break;case"rename":be(n[0])?(i.parent.notify(gn,{}),ze(i.parent,"Rename")):fe(i.parent,n[0],kn);break;case"selectall":i.parent.notify("select-all-init",{});break;case"refresh":C(i.parent);break;case"open":i.parent.visitedItem&&i.parent.notify(on,{target:i.parent.visitedItem});break;case"details":i.parent.notify(un,{}),a=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(a=[]),Ne(i.parent,a,i.parent.path,"details");break;case"newfolder":we(i.parent);break;case"upload":Ie(i.parent);break;case"name":case"size":case"date":case"ascending":case"descending":case"none":H(i.parent,e);break;case"largeiconsview":D(i.parent,"LargeIcons");break;case"detailsview":D(i.parent,"Details")}})}},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t|',"Validation-NewFolder-Exists":"A file or folder with the name {0} already exists.","Validation-Rename-Exists":"Cannot rename {0} to {1}: destination already exists.","Folder-Empty":"This folder is empty","File-Upload":"Drag files here to upload","Search-Empty":"No results found","Search-Key":"Try with different keywords","Filter-Empty":"No results found","Filter-Key":"Try with different filter","Sub-Folder-Error":"The destination folder is the subfolder of the source folder.","Same-Folder-Error":"The destination folder is the same as the source folder.","Access-Denied":"Access Denied","Access-Details":'You don"t have permission to access this folder.',"Header-Retry":"File Already Exists","Content-Retry":"A file with this name already exists in this folder. What would you like to do?","Button-Keep-Both":"Keep both","Button-Replace":"Replace","Button-Skip":"Skip","ApplyAll-Label":"Do this for all current items",KB:"KB","Access-Message":"{0} is not accessible. You need permission to perform the {1} action.","Network-Error":"NetworkError: Failed to send on XMLHTTPRequest: Failed to load","Server-Error":"ServerError: Invalid response from"},Bn=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Hn=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},zn=function(e){function s(t,i){var n=e.call(this,t,i)||this;return n.filterData=null,n.selectedNodes=[],n.duplicateItems=[],n.duplicateRecords=[],n.previousPath=[],n.nextPath=[],n.isLayoutChange=!1,n.layoutSelectedItems=[],n.renamedId=null,n.uploadItem=[],n.deleteRecords=[],n.isFile=!1,n.sortBy="name",n.isCut=!1,n.isSearchCut=!1,n.isSearchDrag=!1,n.isPasteError=!1,n.folderPath="",n.isSameAction=!1,n.isFiltered=!1,n.enablePaste=!1,n.persistData=!1,n.retryArgs=[],n.isOpened=!1,n.isRetryOpened=!1,n.isPathDrag=!1,n.searchedItems=[],n.retryFiles=[],n.isApplySame=!1,n.dragData=[],n.dragNodes=[],n.dragPath="",n.dropPath="",n.isDragDrop=!1,n.treeExpandTimer=null,n.dragCursorPosition={left:44,top:18},n.isDropEnd=!1,n.droppedObjects=[],n.uploadingCount=0,n.uploadedCount=0,r.Inject(Un,Fn,_n),n}Bn(s,e),r=s,s.prototype.getModuleName=function(){return"filemanager"},s.prototype.preRender=function(){this.ensurePath(),this.feParent=[],this.feFiles=[],t.setStyleAttribute(this.element,{width:t.formatUnit(this.width),height:t.formatUnit(this.height)}),this.isDevice=t.Browser.isDevice,this.isMobile=this.checkMobile(),this.isMobile&&this.setProperties({navigationPaneSettings:{visible:!1}},!0);var e=t.closest(this.element,".e-bigger");this.isBigger=!!e,this.activeModule="LargeIcons"===this.view?"largeiconsview":"detailsview",n.createSpinner({target:this.element},t.createElement),this.addWrapper(),this.keyConfigs={altN:"alt+n",f5:"f5",ctrlShift1:"ctrl+shift+1",ctrlShift2:"ctrl+shift+2",ctrlU:"ctrl+u"},this.localeObj=new t.L10n(this.getModuleName(),Vn,this.locale)},s.prototype.getPersistData=function(){var e=["view","path","selectedItems"];return this.addOnPersist(e)},s.prototype.requiredModules=function(){var e=[];return e.push({member:"breadcrumbbar",args:[this]}),e.push({member:"largeiconsview",args:[this]}),this.toolbarSettings.visible&&e.push({member:"toolbar",args:[this]}),this.navigationPaneSettings.visible&&e.push({member:"navigationpane",args:[this]}),this.view&&e.push({member:"detailsview",args:[this]}),this.contextMenuSettings.visible&&!this.isDevice&&e.push({member:"contextmenu",args:[this]}),e},s.prototype.render=function(){this.initialize();var e=t.isNullOrUndefined(this.selectedItems)?[]:this.allowMultiSelection?this.selectedItems:this.selectedItems.slice(this.selectedItems.length-1);this.setProperties({selectedItems:e},!0),this.fileView=this.view,this.setRtl(this.enableRtl),this.addEventListeners(),De(this,this.path!==this.originalPath?Wi:Ki,this.path),this.adjustHeight(),t.isNullOrUndefined(this.navigationpaneModule)&&(this.splitterObj.collapse(this.enableRtl?1:0),t.select(".e-split-bar",this.element).classList.add(Bi)),this.wireEvents(),this.renderComplete()},s.prototype.ensurePath=function(){var e=this.path;t.isNullOrUndefined(e)&&(e="/"),e.lastIndexOf("/")!==e.length-1&&(e+="/"),this.originalPath=e;var i=e.split("/");this.setProperties({path:i[0]+"/"},!0),this.pathNames=[],this.pathId=["fe_tree"],this.itemData=[]},s.prototype.initialize=function(){this.isMobile&&t.addClass([this.element],"e-fe-mobile"),this.allowMultiSelection&&t.addClass([this.element],"e-fe-cb-select"),this.addCssClass(null,this.cssClass),this.renderFileUpload()},s.prototype.addWrapper=function(){var e=this.createElement("div",{id:this.element.id+"_toolbar"});this.element.appendChild(e);var t=this.createElement("div",{id:this.element.id+Jt,className:"e-layout"});this.element.appendChild(t);var n=this.createElement("div",{id:this.element.id+"_navigation",className:"e-navigation"}),s=this.createElement("div",{id:this.element.id+"_tree"});n.appendChild(s);var a=this.createElement("div",{id:this.element.id+ii,className:"e-layout-content"});this.breadCrumbBarNavigation=this.createElement("div",{id:this.element.id+ni,className:"e-address"}),a.appendChild(this.breadCrumbBarNavigation);var r=this.createElement("div",{id:this.element.id+Xt});a.appendChild(r);var o=this.createElement("div",{id:this.element.id+$t,className:li,attrs:{role:"group"}});a.appendChild(o);var l=this.createElement("span",{className:"e-fe-overlay"});a.appendChild(l);var h;this.enableRtl?(t.appendChild(a),t.appendChild(n),h=[{size:"75%",min:"270px"},{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()}]):(t.appendChild(n),t.appendChild(a),h=[{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()},{size:"75%",min:"270px"}]),this.splitterObj=new i.Splitter({paneSettings:h,width:"100%",enableRtl:!1,enableHtmlSanitizer:this.enableHtmlSanitizer,resizing:this.splitterResize.bind(this)}),this.splitterObj.isStringTemplate=!0,this.splitterObj.appendTo(t);var d=this.createElement("div",{id:this.element.id+Zt});this.element.appendChild(d);var p=this.createElement("ul",{id:this.element.id+"_contextmenu"});this.element.appendChild(p);var c=this.createElement("div",{id:this.element.id+ei});this.element.appendChild(c);var u=this.createElement("div",{id:this.element.id+ti});this.element.appendChild(u);var f=this.createElement("div",{id:this.element.id+"_upload_dialog"});this.element.appendChild(f)},s.prototype.adjustHeight=function(){var e=t.select("#"+this.element.id+"_toolbar",this.element),i=e?e.offsetHeight:0;this.splitterObj&&(this.splitterObj.height=(this.element.clientHeight-i).toString(),this.splitterObj.dataBind())},s.prototype.splitterResize=function(){this.notify("splitter-resize",{})},s.prototype.splitterAdjust=function(){var e=t.select(".e-split-bar",this.element);this.navigationPaneSettings.visible?(this.splitterObj.expand(this.enableRtl?1:0),e.classList.remove(Bi)):(this.splitterObj.collapse(this.enableRtl?1:0),e.classList.add(Bi))},s.prototype.addCssClass=function(e,i){t.isNullOrUndefined(e)||""===e||t.removeClass([this.element],e.split(" ")),t.isNullOrUndefined(i)||""===i||t.addClass([this.element],i.split(" "))},s.prototype.showSpinner=function(){n.showSpinner(this.element)},s.prototype.hideSpinner=function(){n.hideSpinner(this.element)},s.prototype.onContextMenu=function(e){e.preventDefault()},s.prototype.checkMobile=function(){return/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i.test(t.Browser.userAgent.toLowerCase())&&/mobile/i.test(t.Browser.userAgent.toLowerCase())},s.prototype.renderFileUpload=function(){var e=this.element.id+si,t=this.createElement("input",{id:e,attrs:{name:"uploadFiles",type:"file"}});this.element.appendChild(t),this.uploadDialogObj=new n.Dialog({header:V(this,"Header-Upload"),content:t,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!1,isModal:!0,width:"350px",target:this.popupTarget?this.popupTarget:"#"+this.element.id,cssClass:B(this,this.isMobile?ri:ai),locale:this.locale,allowDragging:!0,position:{X:"center",Y:"center"},enableRtl:this.enableRtl,enableHtmlSanitizer:this.enableHtmlSanitizer,open:this.onOpen.bind(this),close:this.onClose.bind(this),beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this)}),this.uploadDialogObj.appendTo("#"+this.element.id+"_upload_dialog"),this.renderUploadBox()},s.prototype.renderUploadBox=function(){var e=this.ajaxSettings.uploadUrl?this.ajaxSettings.uploadUrl:this.ajaxSettings.url;this.uploadObj=new a.Uploader({dropArea:t.select("#"+this.element.id+ii,this.element),asyncSettings:{saveUrl:e,removeUrl:e},locale:this.locale,enableRtl:this.enableRtl,uploading:this.onUploading.bind(this),removing:this.onRemoving.bind(this),clearing:this.onClearing.bind(this),selected:this.onSelected.bind(this),success:this.onUploadSuccess.bind(this),failure:this.onUploadFailure.bind(this),autoUpload:this.uploadSettings.autoUpload,minFileSize:this.uploadSettings.minFileSize,maxFileSize:this.uploadSettings.maxFileSize,allowedExtensions:this.uploadSettings.allowedExtensions,fileListRendering:this.onFileListRender.bind(this)}),this.uploadObj.appendTo("#"+this.element.id+si)},s.prototype.onFileListRender=function(e){this.trigger("uploadListCreate",e)},s.prototype.updateUploader=function(){this.uploadObj.autoUpload=this.uploadSettings.autoUpload,this.uploadObj.minFileSize=this.uploadSettings.minFileSize,this.uploadObj.maxFileSize=this.uploadSettings.maxFileSize,this.uploadObj.allowedExtensions=this.uploadSettings.allowedExtensions,this.uploadObj.dataBind()},s.prototype.onBeforeOpen=function(e){var i={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};t.isBlazor()&&delete i.popupModule,this.trigger("beforePopupOpen",i,function(t){e.cancel=t.cancel})},s.prototype.onBeforeClose=function(e){var i={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};t.isBlazor()&&delete i.popupModule,this.trigger("beforePopupClose",i,function(t){e.cancel=t.cancel})},s.prototype.onOpen=function(){this.isOpened=!0,this.uploadDialogObj.element.focus();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};t.isBlazor()&&delete e.popupModule,this.trigger("popupOpen",e)},s.prototype.onClose=function(){this.isOpened=!1,this.uploadObj.clearAll();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};t.isBlazor()&&delete e.popupModule,this.trigger("popupClose",e)},s.prototype.onUploading=function(e){var i="save";if(0!==this.retryArgs.length)for(var n=0;n1&&this.setProperties({selectedItems:this.selectedItems.slice(this.selectedItems.length-1)},!0),t.removeClass([this.element],"e-fe-cb-select")),this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"cssClass":this.addCssClass(i.cssClass,e.cssClass),this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"detailsViewSettings":this.notify(qi,{module:"detailsview",newProp:e,oldProp:i});break;case"enableRtl":this.enableRtl=e.enableRtl,this.refresh();break;case"rootAliasName":this.rootAliasName=e.rootAliasName,this.refresh();break;case"height":n=t.isNullOrUndefined(e.height)?e.height:t.formatUnit(e.height),t.setStyleAttribute(this.element,{height:n}),this.adjustHeight(),this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"locale":t.isNullOrUndefined(e.enableRtl)||this.setProperties({enableRtl:e.enableRtl},!0),this.localeSetModelOption(e);break;case"navigationPaneSettings":this.splitterAdjust(),this.notify(qi,{module:"navigationpane",newProp:e,oldProp:i});break;case"path":this.setPath();break;case"searchSettings":t.isNullOrUndefined(e.searchSettings.allowSearchOnTyping)||this.setProperties({searchSettings:{allowSearchOnTyping:e.searchSettings.allowSearchOnTyping}},!0),t.isNullOrUndefined(e.searchSettings.ignoreCase)&&this.setProperties({searchSettings:{ignoreCase:e.searchSettings.ignoreCase}},!0),t.isNullOrUndefined(e.searchSettings.filterType)&&this.setProperties({searchSettings:{filterType:e.searchSettings.filterType}},!0),this.notify(qi,{module:"breadcrumbbar",newProp:e,oldProp:i});break;case"selectedItems":"Details"===this.view?this.notify(qi,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===this.view&&this.notify(qi,{module:"largeiconsview",newProp:e,oldProp:i});break;case"showFileExtension":case"showHiddenItems":this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"showThumbnail":this.notify(qi,{module:"largeiconsview",newProp:e,oldProp:i});break;case"toolbarSettings":this.adjustHeight(),this.notify(qi,{module:"toolbar",newProp:e,oldProp:i});break;case"uploadSettings":this.updateUploader();break;case"view":"Details"===e.view?this.notify(qi,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===e.view&&this.notify(qi,{module:"largeiconsview",newProp:e,oldProp:i});break;case"width":t.setStyleAttribute(this.element,{width:t.isNullOrUndefined(e.width)?e.width:t.formatUnit(e.width)}),this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"sortOrder":C(this),this.notify(cn,{});break;case"popupTarget":this.uploadDialogObj&&(this.uploadDialogObj.target=e.popupTarget),this.dialogObj&&(this.dialogObj.target=e.popupTarget),this.extDialogObj&&(this.extDialogObj.target=e.popupTarget),this.viewerObj&&(this.viewerObj.target=e.popupTarget)}},s.prototype.ajaxSettingSetModel=function(i){t.isNullOrUndefined(i.ajaxSettings.url)||this.setProperties({ajaxSettings:{url:i.ajaxSettings.url}},!0),t.isNullOrUndefined(i.ajaxSettings.uploadUrl)||this.setProperties({ajaxSettings:{uploadUrl:i.ajaxSettings.uploadUrl}},!0),t.isNullOrUndefined(i.ajaxSettings.downloadUrl)||this.setProperties({ajaxSettings:{downloadUrl:i.ajaxSettings.downloadUrl}},!0),t.isNullOrUndefined(i.ajaxSettings.getImageUrl)||this.setProperties({ajaxSettings:{getImageUrl:i.ajaxSettings.getImageUrl}},!0),this.setProperties({path:"/"},!0),this.setProperties({selectedItems:[]},!0),e.prototype.refresh.call(this)},s.prototype.localeSetModelOption=function(t){this.uploadObj.locale=t.locale,e.prototype.refresh.call(this)},s.prototype.destroy=function(){this.isDestroyed||(this.refreshing||this.notify(en,{}),this.uploadObj.destroy(),this.uploadObj=null,this.uploadDialogObj.destroy(),this.uploadDialogObj=null,this.splitterObj.destroy(),this.splitterObj=null,this.dialogObj&&(this.dialogObj.destroy(),this.dialogObj=null),this.viewerObj&&(this.viewerObj.destroy(),this.viewerObj=null),this.extDialogObj&&(this.extDialogObj.destroy(),this.extDialogObj=null),this.element.removeAttribute("style"),this.element.removeAttribute("tabindex"),this.removeEventListeners(),this.unWireEvents(),this.addCssClass(this.cssClass,null),t.removeClass([this.element],[Vi,"e-fe-mobile","e-fe-cb-select"]),this.element.innerHTML="",e.prototype.destroy.call(this))},s.prototype.createFolder=function(e){this.notify(Rn,{action:"createFolder"});var t=[x(this)];this.itemData=t,e?/[\/\\|*?"<>:]/.test(e)?ze(this,"Error",{files:null,error:{code:"402",message:V(this,"Validation-Invalid").replace("{0}",'"'+e+'"'),fileExists:null}}):ye(t[0])?Se(this,e):fe(this,t[0],Ln):we(this)},s.prototype.deleteFiles=function(e){this.notify(Rn,{action:"deleteFiles",ids:e})},s.prototype.disableToolbarItems=function(e){t.isNullOrUndefined(e)||this.toolbarModule.enableItems(e,!1)},s.prototype.downloadFiles=function(e){this.notify(Rn,{action:"downloadFiles",ids:e})},s.prototype.enableToolbarItems=function(e){t.isNullOrUndefined(e)||this.toolbarModule.enableItems(e,!0)},s.prototype.disableMenuItems=function(e){t.isNullOrUndefined(e)||t.isNullOrUndefined(this.contextmenuModule.contextMenu)||this.contextmenuModule.disableItem(e)},s.prototype.getMenuItemIndex=function(e){return this.contextmenuModule?this.contextmenuModule.getItemIndex(e):-1},s.prototype.getToolbarItemIndex=function(e){return this.toolbarModule?this.toolbarModule.getItemIndex(e):-1},s.prototype.filterFiles=function(e){this.filterData=e||null,this.setProperties({selectedItems:[]},!0),this.notify(hn,{}),this.isFiltered=!0,""!==this.breadcrumbbarModule.searchObj.element.value&&(this.breadcrumbbarModule.searchObj.element.value=""),Ce(this,"filter-end")},s.prototype.getSelectedFiles=function(){return this.notify("update-selection-data",{}),this.itemData},s.prototype.openFile=function(e){this.notify(Rn,{action:"openFile",id:e})},s.prototype.refreshFiles=function(){C(this)},s.prototype.refreshLayout=function(){this.adjustHeight(),this.notify("layout-refresh",{})},s.prototype.selectAll=function(){this.notify(Rn,{action:"selectAll"})},s.prototype.clearSelection=function(){this.notify(Rn,{action:"clearSelection"})},s.prototype.renameFile=function(e,t){this.notify(Rn,{action:"renameFile",id:e,newName:t})},s.prototype.uploadFiles=function(){var e=[x(this)];this.itemData=e,Ie(this)},s.prototype.setRtl=function(e){e?this.addCssClass(null,Vi):this.addCssClass(Vi,null),this.uploadObj&&(this.uploadDialogObj.enableRtl=e,this.uploadObj.enableRtl=e)};var r;return Hn([t.Complex({},Dt)],s.prototype,"ajaxSettings",void 0),Hn([t.Property(!1)],s.prototype,"allowDragAndDrop",void 0),Hn([t.Property(!0)],s.prototype,"allowMultiSelection",void 0),Hn([t.Complex({},Vt)],s.prototype,"contextMenuSettings",void 0),Hn([t.Property("")],s.prototype,"cssClass",void 0),Hn([t.Complex({},Lt)],s.prototype,"detailsViewSettings",void 0),Hn([t.Property(!0)],s.prototype,"enableHtmlSanitizer",void 0),Hn([t.Property(!1)],s.prototype,"enablePersistence",void 0),Hn([t.Property("400px")],s.prototype,"height",void 0),Hn([t.Property("LargeIcons")],s.prototype,"view",void 0),Hn([t.Complex({},zt)],s.prototype,"navigationPaneSettings",void 0),Hn([t.Property("/")],s.prototype,"path",void 0),Hn([t.Property(null)],s.prototype,"popupTarget",void 0),Hn([t.Complex({},Et)],s.prototype,"searchSettings",void 0),Hn([t.Property()],s.prototype,"selectedItems",void 0),Hn([t.Property(!0)],s.prototype,"showFileExtension",void 0),Hn([t.Property(null)],s.prototype,"rootAliasName",void 0),Hn([t.Property(!1)],s.prototype,"showHiddenItems",void 0),Hn([t.Property(!0)],s.prototype,"showThumbnail",void 0),Hn([t.Property("Ascending")],s.prototype,"sortOrder",void 0),Hn([t.Complex({},xt)],s.prototype,"toolbarSettings",void 0),Hn([t.Complex({},Kt)],s.prototype,"uploadSettings",void 0),Hn([t.Property("100%")],s.prototype,"width",void 0),Hn([t.Event()],s.prototype,"fileLoad",void 0),Hn([t.Event()],s.prototype,"fileOpen",void 0),Hn([t.Event()],s.prototype,"beforeDownload",void 0),Hn([t.Event()],s.prototype,"beforeImageLoad",void 0),Hn([t.Event()],s.prototype,"beforePopupClose",void 0),Hn([t.Event()],s.prototype,"beforePopupOpen",void 0),Hn([t.Event()],s.prototype,"beforeSend",void 0),Hn([t.Event()],s.prototype,"created",void 0),Hn([t.Event()],s.prototype,"destroyed",void 0),Hn([t.Event()],s.prototype,"fileDragStart",void 0),Hn([t.Event()],s.prototype,"fileDragging",void 0),Hn([t.Event()],s.prototype,"fileDragStop",void 0),Hn([t.Event()],s.prototype,"fileDropped",void 0),Hn([t.Event()],s.prototype,"fileSelection",void 0),Hn([t.Event()],s.prototype,"fileSelect",void 0),Hn([t.Event()],s.prototype,"menuClick",void 0),Hn([t.Event()],s.prototype,"menuOpen",void 0),Hn([t.Event()],s.prototype,"failure",void 0),Hn([t.Event()],s.prototype,"popupClose",void 0),Hn([t.Event()],s.prototype,"popupOpen",void 0),Hn([t.Event()],s.prototype,"success",void 0),Hn([t.Event()],s.prototype,"toolbarClick",void 0),Hn([t.Event()],s.prototype,"toolbarCreate",void 0),Hn([t.Event()],s.prototype,"uploadListCreate",void 0),s=r=Hn([t.NotifyPropertyChanges],s)}(t.Component),qn=function(){function e(e){this.default=["Delete","Rename","Download","Cut","Copy","Paste"],this.single=["Delete","Rename","Download","Cut","Copy"],this.multiple=["Delete","Download","Cut","Copy","Refresh"],this.selection=["NewFolder","Upload","SortBy","Refresh"],this.parent=e,this.render(),this.addEventListener()}return e.prototype.render=function(){var e=this;this.items=this.toolbarItemData(this.getItems(this.parent.toolbarSettings.items.map(function(e){return e.trim()})));var t={items:this.items};this.parent.trigger("toolbarCreate",t,function(t){e.items=t.items,e.toolbarObj=new h.Toolbar({items:e.items,created:e.toolbarCreateHandler.bind(e),overflowMode:"Popup",clicked:e.onClicked.bind(e),enableHtmlSanitizer:e.parent.enableHtmlSanitizer,enableRtl:e.parent.enableRtl}),e.toolbarObj.isStringTemplate=!0,e.toolbarObj.appendTo("#"+e.parent.element.id+"_toolbar")})},e.prototype.getItemIndex=function(e){for(var t=this.getId(e),i=0;i'+V(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?"":pi},{id:this.getPupupId("details"),text:''+V(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?pi:""}];this.layoutBtnObj=new l.DropDownButton({iconCss:"Details"===this.parent.view?Fi:Ui,cssClass:B(this.parent,"e-caret-hide "+ai),items:i,select:this.layoutChange.bind(this),enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,content:''+V(this.parent,"View")+""}),this.layoutBtnObj.isStringTemplate=!0,this.layoutBtnObj.appendTo("#"+this.getId("View"))}this.hideItems(this.default,!0),this.hideStatus();for(var n=t.selectAll(".e-btn",this.toolbarObj.element),s=0;s'+r+"";switch(e[n]){case"|":s={type:"Separator"};break;case"Upload":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-upload",showTextOn:i};break;case"SortBy":s={id:a,tooltipText:o,template:'"};break;case"Refresh":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-refresh",showTextOn:i};break;case"Selection":s={id:a,text:r,tooltipText:o,suffixIcon:"e-icons e-fe-clear",overflow:"Show",align:"Right"};break;case"View":s={id:a,tooltipText:o,prefixIcon:"Details"===this.parent.view?Fi:Ui,overflow:"Show",align:"Right",text:r,showTextOn:"Overflow",template:'