@syncfusion/ej2-filemanager 29.1.34 → 29.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-filemanager.min.js +2 -2
- package/dist/ej2-filemanager.umd.min.js +2 -2
- package/dist/ej2-filemanager.umd.min.js.map +1 -1
- package/dist/es6/ej2-filemanager.es2015.js +7 -9
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +7 -9
- package/dist/es6/ej2-filemanager.es5.js.map +1 -1
- package/dist/global/ej2-filemanager.min.js +2 -2
- package/dist/global/ej2-filemanager.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +23 -21
- package/src/file-manager/base/file-manager.js +1 -0
- package/src/file-manager/common/utility.js +6 -9
@@ -1,10 +1,10 @@
|
|
1
1
|
/*!
|
2
2
|
* filename: ej2-filemanager.min.js
|
3
|
-
* version : 29.1.
|
3
|
+
* version : 29.1.37
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
|
5
5
|
* Use of this code is subject to the terms of our license.
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
8
8
|
* applicable laws.
|
9
9
|
*/
|
10
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionLayouts"),require("SyncfusionPopups"),require("SyncfusionData"),require("SyncfusionGrids"),require("SyncfusionInputs"),require("SyncfusionButtons"),require("SyncfusionLists"),require("SyncfusionSplitbuttons"),require("SyncfusionNavigations")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionLayouts","SyncfusionPopups","SyncfusionData","SyncfusionGrids","SyncfusionInputs","SyncfusionButtons","SyncfusionLists","SyncfusionSplitbuttons","SyncfusionNavigations"],t):"object"==typeof exports?exports.SyncfusionFilemanager=t(require("SyncfusionBase"),require("SyncfusionLayouts"),require("SyncfusionPopups"),require("SyncfusionData"),require("SyncfusionGrids"),require("SyncfusionInputs"),require("SyncfusionButtons"),require("SyncfusionLists"),require("SyncfusionSplitbuttons"),require("SyncfusionNavigations")):e.SyncfusionFilemanager=t(e.SyncfusionBase,e.SyncfusionLayouts,e.SyncfusionPopups,e.SyncfusionData,e.SyncfusionGrids,e.SyncfusionInputs,e.SyncfusionButtons,e.SyncfusionLists,e.SyncfusionSplitbuttons,e.SyncfusionNavigations)}(self,((e,t,i,n,a,s,r,o,l,h)=>(()=>{"use strict";var d={766:t=>{t.exports=e},741:e=>{e.exports=r},74:e=>{e.exports=n},707:e=>{e.exports=a},323:e=>{e.exports=s},40:e=>{e.exports=t},90:e=>{e.exports=o},215:e=>{e.exports=h},197:e=>{e.exports=i},295:e=>{e.exports=l}},p={};function c(e){var t=p[e];if(void 0!==t)return t.exports;var i=p[e]={exports:{}};return d[e](i,i.exports,c),i.exports}c.d=(e,t)=>{for(var i in t)c.o(t,i)&&!c.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{c.r(u),c.d(u,{ACTIVE:()=>Ie,ALT_DIALOG_ID:()=>H,AjaxSettings:()=>a,BLUR:()=>ye,BREADCRUMBBAR_ID:()=>X,BREADCRUMBS:()=>Ct,BreadCrumbBar:()=>Ss,CB_WRAP:()=>xe,CHECK:()=>Se,CHECK_SELECT:()=>ne,CLONE:()=>Me,COLLAPSED:()=>Nt,CONTENT_ID:()=>Q,CONTEXT_MENU_ID:()=>K,CONTROL:()=>ie,Column:()=>k,ContextMenu:()=>xs,ContextMenuSettings:()=>S,DETAILS_LABEL:()=>wt,DIALOG_ID:()=>_,DISPLAY_NONE:()=>jt,DROP_FILE:()=>Le,DROP_FOLDER:()=>ke,Delete:()=>Ia,DetailsView:()=>Ls,DetailsViewSettings:()=>v,Download:()=>Ga,EMPTY:()=>Pe,EMPTY_CONTENT:()=>Ee,EMPTY_INNER_CONTENT:()=>Re,ERROR_CONTENT:()=>Dt,EXTN_DIALOG_ID:()=>z,FILTER:()=>le,FOCUS:()=>we,FOCUSED:()=>De,FOLDER:()=>Te,FRAME:()=>Ce,FULLROW:()=>Pt,FileManager:()=>Es,GRID_CONTENT:()=>$e,GRID_HEADER:()=>We,GRID_ID:()=>U,GRID_VIEW:()=>Xe,GetDetails:()=>Oa,HEADER_CHECK:()=>Mt,HOVER:()=>Oe,ICONS:()=>Ot,ICON_BREADCRUMB:()=>mt,ICON_CLEAR:()=>bt,ICON_COLLAPSIBLE:()=>Et,ICON_COPY:()=>nt,ICON_CUT:()=>it,ICON_DELETE:()=>st,ICON_DETAILS:()=>lt,ICON_DOWNLOAD:()=>ct,ICON_DROP_IN:()=>vt,ICON_DROP_OUT:()=>yt,ICON_GRID:()=>ft,ICON_IMAGE:()=>Ae,ICON_LARGE:()=>gt,ICON_MUSIC:()=>Fe,ICON_NEWFOLDER:()=>ot,ICON_NO_DROP:()=>It,ICON_OPEN:()=>et,ICON_OPTIONS:()=>ut,ICON_PASTE:()=>at,ICON_REFRESH:()=>dt,ICON_RENAME:()=>rt,ICON_SELECTALL:()=>pt,ICON_SHORTBY:()=>ht,ICON_UPLOAD:()=>tt,ICON_VIDEO:()=>Ue,ICON_VIEW:()=>Ze,IMG_DIALOG_ID:()=>B,LARGEICON_ID:()=>V,LARGE_EMPTY_FOLDER:()=>_e,LARGE_EMPTY_FOLDER_TWO:()=>He,LARGE_ICON:()=>Ve,LARGE_ICONS:()=>ce,LARGE_ICON_FOLDER:()=>Be,LAYOUT:()=>he,LAYOUT_CONTENT:()=>pe,LAYOUT_ID:()=>T,LIST_ITEM:()=>fe,LIST_PARENT:()=>me,LIST_TEXT:()=>ge,LargeIconsView:()=>ws,MENU_ICON:()=>Je,MENU_ITEM:()=>Ye,MOBILE:()=>se,MOB_POPUP:()=>re,MULTI_SELECT:()=>oe,NAVIGATION:()=>de,NAVIGATION_ID:()=>A,NavigationPane:()=>ks,NavigationPaneSettings:()=>j,OVERLAY:()=>kt,RETRY_DIALOG_ID:()=>W,RETRY_ID:()=>Z,ROOT:()=>te,ROOT_POPUP:()=>ae,ROW:()=>je,ROWCELL:()=>Ne,RTL:()=>xt,SEARCH_ID:()=>ee,SELECTED_ITEMS:()=>ze,SORTBY_ID:()=>G,SPLITTER_ID:()=>J,SPLIT_BAR:()=>Rt,STATUS:()=>St,SUBMENU_ICON:()=>Qe,Search:()=>Wa,SearchSettings:()=>f,TB_ITEM:()=>ue,TB_OPTION_DOT:()=>ve,TB_OPTION_TICK:()=>be,TEMPLATE_CELL:()=>Ke,TEXT_CONTENT:()=>qe,TOOLBAR_ID:()=>L,TREE_ID:()=>F,TREE_VIEW:()=>Ge,Toolbar:()=>Rs,ToolbarItem:()=>h,ToolbarSettings:()=>l,UPLOAD_DIALOG_ID:()=>q,UPLOAD_ID:()=>$,UploadSettings:()=>E,VALUE:()=>Lt,VIEW_ID:()=>Y,Virtualization:()=>Ms,actionFailure:()=>ii,activeElement:()=>an,addBlur:()=>sn,afterRequest:()=>Zt,beforeDelete:()=>Ht,beforeDownload:()=>Ri,beforeRequest:()=>Qt,clearAllInit:()=>li,clearPathInit:()=>hi,closePopup:()=>pa,columnArray:()=>b,copyFiles:()=>gn,createDeniedDialog:()=>ia,createDialog:()=>Xa,createEmptyElement:()=>Dn,createEnd:()=>Vt,createExtDialog:()=>$a,createFolder:()=>ma,createImageDialog:()=>vs,createNewFolder:()=>ha,createVirtualDragElement:()=>Hn,cutCopyInit:()=>Oi,cutEnd:()=>Si,cutFiles:()=>mn,defaultToolbarItems:()=>o,deleteEnd:()=>qt,deleteInit:()=>zt,destroy:()=>Jt,detailsInit:()=>ui,doDeleteFiles:()=>ea,doDownload:()=>Zn,doDownloadFiles:()=>ta,doPasteUpdate:()=>Un,doRename:()=>$n,download:()=>ei,downloadInit:()=>Mi,dragCancel:()=>qn,dragEnd:()=>Li,dragHelper:()=>Ai,dragStartHandler:()=>zn,dragStopHandler:()=>Bn,dragging:()=>Fi,draggingHandler:()=>Yn,dropHandler:()=>Tn,dropInit:()=>ki,dropPath:()=>Ti,fileItems:()=>O,fileType:()=>bn,filter:()=>ba,filterEnd:()=>_t,finalizeEnd:()=>Ut,folderItems:()=>w,generatePath:()=>tn,getAccessClass:()=>na,getAccessDetails:()=>ua,getAllChildItems:()=>ln,getCssClass:()=>Nn,getDirectories:()=>Sn,getDirectoryPath:()=>Fn,getDuplicateData:()=>_n,getFullPath:()=>yn,getImageUrl:()=>vn,getItemName:()=>Qn,getLocaleText:()=>jn,getModule:()=>on,getName:()=>In,getObject:()=>wn,getParentPath:()=>An,getParents:()=>en,getPath:()=>Xi,getPathId:()=>$i,getPathNames:()=>Zi,getPathObject:()=>fn,getSortField:()=>En,getSortedData:()=>On,getTargetModule:()=>pn,getTargetPath:()=>ca,hasContentAccess:()=>ra,hasDownloadAccess:()=>la,hasEditAccess:()=>sa,hasReadAccess:()=>aa,hasUploadAccess:()=>oa,hideLayout:()=>Ci,hidePaste:()=>yi,initialEnd:()=>Ft,isFile:()=>Tt,isFileSystemData:()=>wa,layoutChange:()=>di,layoutItems:()=>D,layoutRefresh:()=>ti,menuItemData:()=>fi,methodCall:()=>Vi,modelChanged:()=>At,nodeExpand:()=>ci,objectToString:()=>Jn,openAction:()=>un,openEnd:()=>si,openInit:()=>ai,openSearchFolder:()=>Mn,paste:()=>ya,pasteEnd:()=>Di,pasteHandler:()=>kn,pasteInit:()=>wi,pathChanged:()=>Yt,pathColumn:()=>Pi,pathDrag:()=>Bt,permissionCopy:()=>zi,permissionDownload:()=>Wi,permissionEdit:()=>Hi,permissionEditContents:()=>Bi,permissionRead:()=>_i,permissionUpload:()=>qi,read:()=>ga,readDropPath:()=>Vn,refresh:()=>cn,refreshEnd:()=>Wt,removeActive:()=>nn,removeBlur:()=>rn,removeDropTarget:()=>Wn,removeItemClass:()=>Kn,rename:()=>va,renameEnd:()=>bi,renameEndParent:()=>mi,renameInit:()=>gi,resizeEnd:()=>Kt,scrollHandler:()=>Gn,search:()=>ni,searchTextChange:()=>Ei,searchWordHandler:()=>hn,selectAllInit:()=>oi,selectedData:()=>Ii,selectionChanged:()=>ri,setDateObject:()=>xn,setNextPath:()=>Rn,setNodeId:()=>Cn,showPaste:()=>vi,skipUpload:()=>$t,sortByChange:()=>pi,sortColumn:()=>Ni,sortComparer:()=>Ji,sortbyClickHandler:()=>Pn,splitterResize:()=>Gt,treeSelect:()=>ji,updateLayout:()=>dn,updatePath:()=>Qi,updateRenamingData:()=>Xn,updateSelectionData:()=>Ui,updateTreeSelection:()=>xi,upload:()=>Xt,uploadItem:()=>da,validateSubFolder:()=>Ln});var e,t=c(766),i=(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])},e(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}),n=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},a=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return i(a,e),n([(0,t.Property)(null)],a.prototype,"downloadUrl",void 0),n([(0,t.Property)(null)],a.prototype,"getImageUrl",void 0),n([(0,t.Property)(null)],a.prototype,"uploadUrl",void 0),n([(0,t.Property)(null)],a.prototype,"url",void 0),a}(t.ChildProperty),s=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])},e(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)}}(),r=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},o=["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"],l=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return s(i,e),r([(0,t.Property)(o)],i.prototype,"items",void 0),r([(0,t.Property)(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),h=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return s(i,e),r([(0,t.Property)("")],i.prototype,"id",void 0),r([(0,t.Property)("")],i.prototype,"text",void 0),r([(0,t.Property)("auto")],i.prototype,"width",void 0),r([(0,t.Property)("")],i.prototype,"cssClass",void 0),r([(0,t.Property)(!1)],i.prototype,"showAlwaysInPopup",void 0),r([(0,t.Property)(!1)],i.prototype,"disabled",void 0),r([(0,t.Property)("")],i.prototype,"prefixIcon",void 0),r([(0,t.Property)("")],i.prototype,"suffixIcon",void 0),r([(0,t.Property)(!0)],i.prototype,"visible",void 0),r([(0,t.Property)("None")],i.prototype,"overflow",void 0),r([(0,t.Property)("")],i.prototype,"template",void 0),r([(0,t.Property)("Button")],i.prototype,"type",void 0),r([(0,t.Property)("Both")],i.prototype,"showTextOn",void 0),r([(0,t.Property)(null)],i.prototype,"htmlAttributes",void 0),r([(0,t.Property)("")],i.prototype,"tooltipText",void 0),r([(0,t.Property)("Left")],i.prototype,"align",void 0),r([(0,t.Property)(-1)],i.prototype,"tabIndex",void 0),r([(0,t.Property)()],i.prototype,"name",void 0),i}(t.ChildProperty),d=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])},e(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)}}(),p=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},f=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return d(i,e),p([(0,t.Property)(!0)],i.prototype,"allowSearchOnTyping",void 0),p([(0,t.Property)("contains")],i.prototype,"filterType",void 0),p([(0,t.Property)(!0)],i.prototype,"ignoreCase",void 0),p([(0,t.Property)(null)],i.prototype,"placeholder",void 0),i}(t.ChildProperty),g=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])},e(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)}}(),m=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=[{field:"name",headerText:"Name",minWidth:120,template:'<span class="e-fe-text">${name}</span>',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:(0,t.initializeCSPTemplate)((function(e){return'<span class="e-fe-size">'+e.size+"</span>"})),format:"n2"}],v=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return g(i,e),m([(0,t.Property)(!0)],i.prototype,"columnResizing",void 0),m([(0,t.Property)(b)],i.prototype,"columns",void 0),i}(t.ChildProperty),y=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])},e(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)}}(),I=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},O=["Open","|","Cut","Copy","|","Delete","Download","Rename","|","Details"],w=["Open","|","Cut","Copy","Paste","|","Delete","Rename","Download","|","Details"],D=["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"],S=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return y(i,e),I([(0,t.Property)(O)],i.prototype,"file",void 0),I([(0,t.Property)(w)],i.prototype,"folder",void 0),I([(0,t.Property)(D)],i.prototype,"layout",void 0),I([(0,t.Property)(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),C=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])},e(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)}}(),x=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},j=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return C(i,e),x([(0,t.Property)("650px")],i.prototype,"maxWidth",void 0),x([(0,t.Property)("240px")],i.prototype,"minWidth",void 0),x([(0,t.Property)(!0)],i.prototype,"visible",void 0),x([(0,t.Property)("None")],i.prototype,"sortOrder",void 0),i}(t.ChildProperty),N=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])},e(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)}}(),P=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},E=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return N(i,e),P([(0,t.Property)("")],i.prototype,"allowedExtensions",void 0),P([(0,t.Property)(!0)],i.prototype,"autoUpload",void 0),P([(0,t.Property)(!1)],i.prototype,"autoClose",void 0),P([(0,t.Property)(!1)],i.prototype,"directoryUpload",void 0),P([(0,t.Property)(0)],i.prototype,"minFileSize",void 0),P([(0,t.Property)(3e7)],i.prototype,"maxFileSize",void 0),P([(0,t.Property)(0)],i.prototype,"chunkSize",void 0),i}(t.ChildProperty),R=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])},e(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)}}(),M=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},k=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return R(i,e),M([(0,t.Property)("")],i.prototype,"field",void 0),M([(0,t.Property)("")],i.prototype,"headerText",void 0),M([(0,t.Property)("")],i.prototype,"width",void 0),M([(0,t.Property)("")],i.prototype,"minWidth",void 0),M([(0,t.Property)("")],i.prototype,"maxWidth",void 0),M([(0,t.Property)("Left")],i.prototype,"textAlign",void 0),M([(0,t.Property)(null)],i.prototype,"headerTextAlign",void 0),M([(0,t.Property)(null)],i.prototype,"type",void 0),M([(0,t.Property)(null)],i.prototype,"format",void 0),M([(0,t.Property)(null)],i.prototype,"template",void 0),M([(0,t.Property)(null)],i.prototype,"sortComparer",void 0),M([(0,t.Property)(null)],i.prototype,"headerTemplate",void 0),M([(0,t.Property)(!0)],i.prototype,"allowSorting",void 0),M([(0,t.Property)(!0)],i.prototype,"allowResizing",void 0),M([(0,t.Property)(null)],i.prototype,"customAttributes",void 0),M([(0,t.Property)("")],i.prototype,"hideAtMedia",void 0),M([(0,t.Property)(null)],i.prototype,"customFormat",void 0),M([(0,t.Property)(!1)],i.prototype,"isPrimaryKey",void 0),i}(t.ChildProperty),L="_toolbar",T="_layout",A="_navigation",F="_tree",U="_grid",V="_largeicons",_="_dialog",H="_alt_dialog",B="_img_dialog",z="_extn_dialog",q="_upload_dialog",W="_retry_dialog",K="_contextmenu",G="_sortby",Y="_view",J="_splitter",Q="_content",X="_breadcrumbbar",$="_upload",Z="_retry",ee="_search",te="e-filemanager",ie="e-control",ne="e-fe-cb-select",ae="e-fe-popup",se="e-fe-mobile",re="e-fe-popup e-fe-mobile",oe="e-fe-m-select",le="e-fe-m-filter",he="e-layout",de="e-navigation",pe="e-layout-content",ce="e-large-icons",ue="e-toolbar-item",fe="e-list-item",ge="e-list-text",me="e-list-parent",be="e-icons e-fe-tick",ve="e-icons e-fe-dot",ye="e-blur",Ie="e-active",Oe="e-hover",we="e-focus",De="e-focused",Se="e-check",Ce="e-frame",xe="e-checkbox-wrapper",je="e-row",Ne="e-rowcell",Pe="e-empty",Ee="e-empty-content",Re="e-empty-inner-content",Me="e-fe-clone",ke="e-fe-drop-folder",Le="e-fe-drop-file",Te="e-fe-folder",Ae="e-fe-image",Fe="e-fe-music",Ue="e-fe-video",Ve="e-large-icon",_e="e-empty-icon e-fe-folder",He="e-empty-icon.e-fe-folder",Be="e-fe-folder",ze="e-items",qe="e-text-content",We="e-gridheader",Ke="e-templatecell",Ge="e-treeview",Ye="e-menu-item",Je="e-menu-icon",Qe="e-caret",Xe="e-content",$e="e-gridcontent",Ze="e-list-parent",et="e-icons e-fe-open",tt="e-icons e-fe-upload",it="e-icons e-fe-cut",nt="e-icons e-fe-copy",at="e-icons e-fe-paste",st="e-icons e-fe-delete",rt="e-icons e-fe-rename",ot="e-icons e-fe-newfolder",lt="e-icons e-fe-details",ht="e-icons e-fe-sort",dt="e-icons e-fe-refresh",pt="e-icons e-fe-select",ct="e-icons e-fe-download",ut="e-icons e-fe-options",ft="e-icons e-fe-grid",gt="e-icons e-fe-large",mt="e-icons e-fe-breadcrumb",bt="e-icons e-fe-clear",vt="e-icons e-fe-drop-in",yt="e-icons e-fe-drop-out",It="e-icons e-fe-no-drop",Ot="e-icons",wt="e-detailslabel",Dt="e-fe-errorcontent",St="e-status",Ct="e-address",xt="e-rtl",jt="e-display-none",Nt="e-node-collapsed",Pt="e-fullrow",Et="e-icon-collapsible",Rt="e-split-bar",Mt="e-headercheck",kt="e-fe-overlay",Lt="e-fe-value",Tt="isFile",At="model-changed",Ft="initial-end",Ut="finalize-end",Vt="create-end",_t="filter-end",Ht="before-delete",Bt="path-drag",zt="delete-init",qt="delete-end",Wt="refresh-end",Kt="resize-end",Gt="splitter-resize",Yt="path-changed",Jt="destroy",Qt="before-request",Xt="upload",$t="skip-upload",Zt="after-request",ei="download",ti="layout-refresh",ii="actionFailure",ni="search",ai="open-init",si="open-end",ri="selection-changed",oi="select-all-init",li="clear-all-init",hi="clear-path-init",di="layout-change",pi="sort-by-change",ci="node-expand",ui="details-init",fi="menu-item-data",gi="rename-init",mi="rename-end-parent",bi="rename-end",vi="show-paste",yi="hide-paste",Ii="selected-data",Oi="cut-copy-init",wi="paste-init",Di="paste-end",Si="cut-end",Ci="hide-layout",xi="update-tree-selection",ji="select-node",Ni="sort-column",Pi="path-column",Ei="search-change",Ri="before-download",Mi="download-init",ki="drop-init",Li="drag-end",Ti="drop-path",Ai="drag-helper",Fi="dragging",Ui="update-selection-data",Vi="method-call",_i="read",Hi="write",Bi="writeContents",zi="copy",qi="upload",Wi="download",Ki=c(40),Gi=c(197),Yi=c(74);function Ji(e,t){var i=/\.\S+/.test(e),n=/\.\S+/.test(t);if(i&&!n)return 1;if(!i&&n)return-1;var a=[],s=[];for((e+"").replace(/(\d+)|(\D+)/g,(function(e,t,i){return a.push([t||1/0,i||""]),""})),(t+"").replace(/(\d+)|(\D+)/g,(function(e,t,i){return s.push([t||1/0,i||""]),""}));a.length&&s.length;){var r=a.shift(),o=s.shift();if(r&&o){var l=r[0]-o[0]||r[1].localeCompare(o[1]);if(l)return l}}return a.length-s.length}function Qi(e,i,n){var a=(0,t.getValue)("name",i),s=e.getAttribute("data-id"),r=(0,t.isNullOrUndefined)(s)?a:s;n.setProperties({path:Xi(e,r,n.hasId)},!0),n.pathId=$i(e),n.pathNames=Zi(e,a)}function Xi(e,t,i){for(var n=en(e,t,!1,i),a="/",s=n.length-2;s>=0;s--)a+=n[s]+"/";return a}function $i(e){for(var t=en(e,e.getAttribute("data-uid"),!0),i=[],n=t.length-1;n>=0;n--)i.push(t[n]);return i}function Zi(e,t){for(var i=en(e,t,!1),n=[],a=i.length-1;a>=0;a--)n.push(i[a]);return n}function en(e,i,n,a){for(var s=[i],r=e.parentNode;!(0,t.isNullOrUndefined)(r);){if((0,t.matches)(r,"."+fe)){var o=n?r.getAttribute("data-uid"):a?r.getAttribute("data-id"):(0,t.select)("."+ge,r).textContent;s.push(o)}if((r=r.parentNode).classList.contains(Ge))break}return s}function tn(e){for(var i=e.hasId?"id":"name",n="/",a=1;a<e.pathId.length;a++){var s=(0,t.getValue)(e.pathId[parseInt(a.toString(),10)],e.feParent);n+=(0,t.getValue)(i,s)+"/"}e.setProperties({path:n},!0)}function nn(e){e.isCut&&(rn(e),e.selectedNodes=[],e.actionRecords=[],e.enablePaste=!1,e.notify(yi,{}))}function an(e,i){if(i.isSearchCut=!1,i.actionRecords=[],i.activeElements=[],i.notify(Oi,{}),0===i.activeElements.length)return!1;rn(i);var n=i.activeElements;"navigationpane"!==i.activeModule?i.targetPath=i.path:i.targetPath=An(i.path);var a=0;if(n&&(on(i,n[0]),"cut"===e))for(;a<n.length;)sn(n[a]),a++;for(a=0,i.selectedNodes=[],i.enablePaste=!0,i.notify(vi,{});a<i.activeRecords.length;)i.actionRecords.push(i.activeRecords[a]),i.selectedNodes.push((0,t.getValue)("name",i.activeRecords[a])),a++;if((""!==i.breadcrumbbarModule.searchObj.element.value||i.isFiltered)&&"navigationpane"!==i.activeModule){i.selectedNodes=[],i.isSearchCut=!0;for(var s=0;s<i.selectedItems.length;)i.selectedNodes.push(i.selectedItems[s]),s++}return!0}function sn(e){e.classList.add(ye)}function rn(e,t){for(var i=t?e.element.querySelectorAll("."+Oe):e.element.querySelectorAll("."+ye),n=0;n<i.length;)i[n].classList.remove(t?Oe:ye),n++}function on(e,i){i&&(i.classList.contains(je)?e.activeModule="detailsview":(0,t.closest)(i,"."+Ve)?e.activeModule="largeiconsview":e.activeModule="navigationpane")}function ln(e,t){var i=e.fileSystemData.filter((function(e){return String(e.parentId)===String(t)})),n=i.slice();return i.forEach((function(t){var i=t.id;n=n.concat(ln(e,i))})),n}function hn(e,i,n){var a;if(0!==i.length||e.isFiltered||e.notify(Pi,{args:e}),wa(e))if(""===i)e.itemData=e.fileSystemData,ga(e,n?di:ni,e.path);else{e.searchSettings.filterType=(0,t.isNullOrUndefined)(e.searchSettings.filterType)?"contains":e.searchSettings.filterType;var s=(0,t.getValue)(e.pathId[e.pathId.length-1],e.feParent),r=ln(e,(0,t.getValue)("id",s)),o=new Yi.DataManager(r).executeLocal((new Yi.Query).where("name",e.searchSettings.filterType,i,e.searchSettings.ignoreCase)),l=e.searchSettings.ignoreCase?i.toLowerCase():i;e.itemData=o,Wa(e,n?di:ni,e.path,l,e.showHiddenItems,!e.searchSettings.ignoreCase)}else if(a="startsWith"===e.searchSettings.filterType?i+"*":"endsWith"===e.searchSettings.filterType?"*"+i:"*"+i+"*",e.searchWord=a,e.itemData=[fn(e)],i.length>0){var h=e.searchSettings.ignoreCase,d=e.showHiddenItems;Wa(e,n?di:ni,e.path,a,d,!h)}else e.isFiltered?ba(e,di):e.isSortByClicked?(e.notify(di,{files:"Details"===e.oldView?e.detailsviewModule.gridObj.dataSource:e.largeiconsviewModule.allItems}),e.isSortByClicked=!1):ga(e,n?di:ni,e.path)}function dn(e,t){e.oldView=e.view,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,hn(e,i,!0)}function pn(e,i){var n="";i&&(n=(0,t.closest)(i,"."+te+"."+ie+" ."+$e)?"detailsview":(0,t.closest)(i,"."+ce)?"largeiconsview":i.classList.contains("e-fullrow")||i.classList.contains("e-icon-expandable")?"navigationpane":(0,t.closest)(i,".e-address-list-item")?"breadcrumbbar":""),e.targetModule=n}function cn(e){e.itemData=[fn(e)],aa(e.itemData[0])?ga(e,Wt,e.path):ia(e,e.itemData[0],_i)}function un(e){ga(e,si,e.path)}function fn(e){return(0,t.getValue)(e.pathId[e.pathId.length-1],e.feParent)}function gn(e){an("copy",e)&&(e.fileAction="copy")}function mn(e){an("cut",e)&&(e.isCut=!0,e.fileAction="move")}function bn(e){if(!(0,t.getValue)("isFile",e))return Te;var i=(0,t.getValue)("type",e);return-1!==(i=i.toLowerCase()).indexOf(".")&&(i=i.split(".").join("")),-1!==["bmp","dib","jpg","jpeg","jpe","jfif","gif","tif","tiff","png","ico"].indexOf(i)?Ae:-1!==["mp3","wav","aac","ogg","wma","aif","fla","m4a"].indexOf(i)?Fe:-1!==["webm","mkv","flv","vob","ogv","ogg","avi","wmv","mp4","3gp"].indexOf(i)?Ue:-1!==["css","exe","html","js","msi","pdf","pptx","ppt","rar","zip","txt","docx","doc","xlsx","xls","xml","rtf","php"].indexOf(i)?"e-fe-"+i:"e-fe-unknown e-fe-"+i}function vn(e,i){var n=wa(e)?(0,t.getValue)("imageUrl",i):"";if(wa(e)){var a={fileDetails:[i],imageUrl:n};return e.trigger("beforeImageLoad",a),a.imageUrl}var s=e.ajaxSettings.getImageUrl?e.ajaxSettings.getImageUrl:e.ajaxSettings.url,r=-1!==s.indexOf("?")?"&path=":"?path=",o=encodeURIComponent((0,t.getValue)("name",i)),l=(0,t.getValue)("filterPath",i);if(e.hasId){var h=(0,t.getValue)("id",i);n=s+r+e.path+"&id="+h}else n=(0,t.isNullOrUndefined)(l)?s+r+e.path+o:s+r+encodeURIComponent(l.replace(/\\/g,"/"))+o;var d={fileDetails:[i],imageUrl:n=n+"&time="+(new Date).getTime().toString()};return e.trigger("beforeImageLoad",d),d.imageUrl}function yn(e,i,n){var a=(0,t.getValue)(e.hasId?"id":"name",i)+"/",s=(0,t.getValue)(e.hasId?"filterId":"filterPath",i);return(0,t.isNullOrUndefined)(s)?n+a:s.replace(/\\/g,"/").replace(/^.*?(?=\/)/,"")+a}function In(e,i){var n=(0,t.getValue)("name",i),a=(0,t.getValue)("filterPath",i);return""===e.breadcrumbbarModule.searchObj.element.value&&!e.isFiltered||(0,t.isNullOrUndefined)(a)||(n=(a=a.replace(/\\/g,"/")).replace(e.path,"")+n),n}function On(e,i){if(0===i.length)return i;var n;n="None"===e.sortOrder||(0,t.isNullOrUndefined)(e.sortOrder)?(new Yi.Query).group("isFile"):(new Yi.Query).sortBy(e.sortBy,e.sortOrder.toLowerCase(),!0).group("isFile");var a=new Yi.DataManager(i).executeLocal(n);return(0,t.getValue)("records",a)}function wn(e,i,n){var a=(0,t.getValue)(e.pathId[e.pathId.length-1],e.feFiles).filter((function(e){return e[i].toString()===n}));return a.length>0?a[0]:null}function Dn(e,i,n){var a,s=(0,t.select)("#"+e.element.id+T,e.element),r=(0,t.select)("#"+e.element.id+X,s).offsetHeight;if(a=s.offsetHeight-r,"Details"===e.view&&(a-=(0,t.select)("."+We,s).offsetHeight),(0,t.isNullOrUndefined)(i.querySelector("."+Pe))){var o=(0,t.createElement)("div",{className:Pe}),l=(0,t.createElement)("div",{className:_e}),h=(0,t.createElement)("div",{className:Ee}),d=(0,t.createElement)("div",{className:Re});"Details"===e.view?i.querySelector("."+Xe).appendChild(o):i.appendChild(o),o.appendChild(l),o.appendChild(h),o.appendChild(d)}i.querySelector("."+Pe)&&((0,t.isNullOrUndefined)(n.error)?e.isFiltered?(i.querySelector("."+Ee).innerHTML=jn(e,"Filter-Empty"),i.querySelector("."+Re).innerHTML=jn(e,"Filter-Key")):""!==e.breadcrumbbarModule.searchObj.element.value?(i.querySelector("."+Ee).innerHTML=jn(e,"Search-Empty"),i.querySelector("."+Re).innerHTML=jn(e,"Search-Key")):(i.querySelector("."+Ee).innerHTML=jn(e,"Folder-Empty"),i.querySelector("."+Re).innerHTML=jn(e,"File-Upload")):(i.querySelector("."+Ee).innerHTML=jn(e,"Access-Denied"),i.querySelector("."+Re).innerHTML=jn(e,"Access-Details")));var p=(0,t.select)("."+Pe,i);a=(a-p.offsetHeight)/2,p.style.marginTop=a+"px"}function Sn(e){return new Yi.DataManager(e).executeLocal((new Yi.Query).where(Tt,"equal",!1,!1))}function Cn(e,i){for(var n=Sn(e.files),a=0,s=n.length;a<s;a++)(0,t.setValue)("_fm_id",i+"_"+a,n[a])}function xn(e){for(var i=0;i<e.length;i++){var n=new Date((0,t.getValue)("dateCreated",e[i])),a=new Date((0,t.getValue)("dateModified",e[i]));(0,t.setValue)("_fm_created",n,e[i]),(0,t.setValue)("_fm_modified",a,e[i])}}function jn(e,t){var i=e.localeObj.getConstant(t);return""===i?t:i}function Nn(e,i){var n=e.cssClass;return n=(0,t.isNullOrUndefined)(n)||""===n?i:n+" "+i}function Pn(e,t){e.isSortByClicked=!0,-1!==t.item.id.indexOf("ascending")||-1!==t.item.id.indexOf("descending")||-1!==t.item.id.indexOf("none")?e.sortOrder=En(t.item.id):e.sortBy=En(t.item.id,e),e.itemData=[fn(e)],"Details"===e.view&&(e.isMobile?dn(e,"Details"):(e.notify(Ni,{module:"detailsview"}),e.isSortByClicked=!1)),"LargeIcons"===e.view&&dn(e,"LargeIcons"),e.notify(pi,{})}function En(e,t){var i,n=e.substring(e.lastIndexOf("_")+1),a=n;switch(t&&(i=t.detailsViewSettings.columns),n){case"date":for(var s=0,r=i.length;s<r;s++){if("dateModified"===i[s].field||"dateCreated"===i[s].field){a=i[s].field;break}a="_fm_modified"}break;case"ascending":a="Ascending";break;case"descending":a="Descending";break;case"none":a="None"}return a}function Rn(e,i){for(var n=i.split("/"),a=e.originalPath.split("/"),s=(0,t.getValue)(e.pathId[0],e.feParent),r=(0,t.isNullOrUndefined)((0,t.getValue)("id",s))?"name":"id",o=n.length-1,l=a.length-1;o<l;o++){var h=""===a[o+1]?Ut:Ft,d=""===a[o]?"/":e.path+a[o]+"/",p=wn(e,r,a[parseInt(o.toString(),10)]);if((0,t.isNullOrUndefined)(p))e.originalPath=d;else{var c=(0,t.getValue)("_fm_id",p);e.setProperties({path:d},!0),e.pathId.push(c),e.itemData=[p],e.pathNames.push((0,t.getValue)("name",p))}ga(e,h,e.path);break}}function Mn(e,i){e.originalPath=yn(e,i,e.path);var n=(0,t.getValue)(e.pathId[0],e.feParent),a=e.feParent[(0,t.getValue)("_fm_id",e.itemData[0])],s=(0,t.isNullOrUndefined)(a)||"fe_tree"===(0,t.getValue)("_fm_id",a),r=wn(e,(0,t.isNullOrUndefined)((0,t.getValue)("id",n))?"name":"id",wa(e)?(0,t.getValue)("id",i):(0,t.getValue)("name",i));if((0,t.isNullOrUndefined)(r)){if(s)return void Rn(e,e.path);e.notify(hi,{selectedNode:e.pathId[e.pathId.length-1]})}else{var o=(0,t.getValue)("_fm_id",r);e.setProperties({path:e.originalPath},!0),e.pathId.push(o),e.itemData=[r],e.pathNames.push((0,t.getValue)("name",r))}ga(e,e.path!==e.originalPath?Ft:Ut,e.path)}function kn(e){if(e.isDragDrop=!1,0!==e.selectedNodes.length&&e.enablePaste){var t=""===e.folderPath?e.path:e.folderPath;if("navigationpane"!==e.activeModule||e.selectedNodes[0].includes("/")||(e.targetPath=ca(e,e.actionRecords[0])),!Ln(e,e.actionRecords,t,e.path))if("move"===e.fileAction&&e.targetPath!==t||"copy"===e.fileAction)e.notify(wi,{}),ya(e,e.targetPath,e.selectedNodes,t,e.fileAction,[],e.actionRecords);else e.enablePaste=!1,e.notify(yi,{}),rn(e),Xa(e,"Error",{files:null,error:{code:"402",message:jn(e,"Same-Folder-Error"),fileExists:null}})}}function Ln(e,i,n,a){for(var s=!1,r=0;r<i.length;r++)if((0,t.getValue)("isFile",i[r])){var o=e.dragData[r]?e.dragData[r].name:null,l=wa(e)?o:e.dragNodes[r],h=0;l&&(h=l.lastIndexOf("/"));var d="";if(h>0&&(d=a+l.substring(0,h+1)),d===n){Xa(e,"Error",{files:null,error:{code:"402",message:jn(e,"Same-Folder-Error"),fileExists:null}}),s=!0;break}}else{var p=yn(e,i[r],a);if(0===n.indexOf(p)){Xa(e,"Error",{files:null,error:{code:"402",message:jn(e,"Sub-Folder-Error"),fileExists:null}}),s=!0;break}}return s}function Tn(e){(e.isDragDrop=!0,0!==e.dragData.length)&&(e.dragPath=e.dragPath.replace(/\\/g,"/"),e.dropPath=e.dropPath.replace(/\\/g,"/"),Ln(e,e.dragData,e.dropPath,e.dragPath)||e.dragPath===e.dropPath||(e.itemData=[e.dropData],ya(e,e.dragPath,e.dragNodes,e.dropPath,"move",[],e.dragData),e.notify(wi,{})))}function An(e){for(var t=e.split("/"),i=t[0]+"/",n=1;n<t.length-2;n++)i+=t[n]+"/";return i}function Fn(e,i){var n=(0,t.getValue)(e.hasId?"id":"name",i.cwd)+"/",a=(0,t.getValue)(e.hasId&&!(0,t.isNullOrUndefined)(e.ajaxSettings.url)?"filterId":"filterPath",i.cwd);return(0,t.isNullOrUndefined)(a)?wa(e)?n:e.path+n:""===a?"/":a.replace(/\\/g,"/").replace(/^.*?(?=\/)/,"")+n}function Un(e,t,i){"move"===t&&(e.isDragDrop?e.notify(Li,i):(e.enablePaste=!1,e.notify(yi,{}),e.notify(Si,i))),0===e.duplicateItems.length&&(e.pasteNodes=[]);for(var n=0;n<i.files.length;n++)e.pasteNodes.push(i.files[n][e.hasId?"id":"name"]),e.isDragDrop&&e.droppedObjects.push(i.files[n]);e.duplicateItems=[],e.duplicateRecords=[],e.isDragDrop&&!e.isPasteError?e.isDropEnd=!0:e.isDropEnd=!1,e.trigger("success",{action:t,result:i}),!e.isDragDrop||e.path===e.dragPath||e.path===e.dropPath||e.isSearchDrag?(e.isPathDrag=!1,ga(e,Di,e.path)):Vn(e)}function Vn(e){var i=(0,t.getValue)("_fm_id",e.dropData);if(e.expandedId=i,e.itemData=[e.dropData],e.isPathDrag)e.notify(Bt,e.itemData);else{if(e.navigationpaneModule){var n=(0,t.select)('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element);if(!n)i=document.querySelector('[data-id = "'+(0,t.getValue)("id",e.dropData)+'"]').getAttribute("data-uid"),n=(0,t.select)('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element);Qi(n,e.dropData,e)}ga(e,Ti,e.dropPath)}}function _n(e,i){for(var n=null,a=e.isDragDrop?e.dragData:e.actionRecords,s=0;s<a.length;s++)if((0,t.getValue)("name",a[s])===i){n=a[s];break}return n}function Hn(e){if(e.isSearchDrag=!1,""!==e.breadcrumbbarModule.searchObj.element.value&&(e.isSearchDrag=!0),"navigationpane"!==e.activeModule){e.dragNodes=[];for(var t=0;t<e.selectedItems.length;)e.dragNodes.push(e.selectedItems[t]),t++;0===e.selectedItems.length&&e.dragData&&1===e.dragData.length&&e.dragNodes.push(Qn(e,e.dragData[0]))}var i=e.createElement("div",{className:"e-fe-icon "+bn(e.dragData[0])}),n=e.createElement("div",{className:"e-fe-name",innerHTML:e.dragData[0].name}),a=e.createElement("div",{className:"e-fe-content"});a.appendChild(i),a.appendChild(n);var s=e.createElement("div",{className:Me});if(s.appendChild(a),e.dragNodes.length>1){var r=e.createElement("span",{className:"e-fe-count",innerHTML:e.dragNodes.length.toString(10)});s.appendChild(r)}e.virtualDragElement=s,e.element.appendChild(e.virtualDragElement)}function Bn(e,i){var n=i;n.cancel=!1,null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),Wn(e),e.element.classList.remove("e-fe-drop","e-no-drop"),rn(e),e.uploadObj.dropArea=(0,t.select)("#"+e.element.id+Q,e.element);var a=(0,t.select)("."+Me,e.element);a&&(0,t.detach)(a),pn(e,i.target),e.notify(ki,i),rn(e,"hover"),n.fileDetails=e.dragData,e.trigger("fileDragStop",n,(function(i){!i.cancel&&!(0,t.isNullOrUndefined)(e.targetModule)&&""!==e.targetModule&&e.dragCount>2&&Tn(e),e.dragCount=0}))}function zn(e,i,n){var a=i;if(a.cancel=!1,a.fileDetails=e.dragData,e.dragCount=0,e.droppedObjects=[],(!e.allowDragAndDrop||"navigationpane"===e.activeModule&&(0,t.closest)(i.element,"li").getAttribute("data-uid")===e.pathId[0])&&(a.cancel=!0),"navigationpane"===e.activeModule&&-1!==e.pathId.indexOf((0,t.closest)(i.element,"li").getAttribute("data-uid"))?e.isPathDrag=!0:e.isPathDrag=!1,rn(e),a.cancel)n.intDestroy(i.event),qn(e);else if(!a.cancel){for(var s=0;s<e.activeElements.length;)sn(e.activeElements[s]),s++;e.trigger("fileDragStart",a,(function(t){t.cancel?(n.intDestroy(i.event),qn(e)):e.uploadObj.dropArea=null}))}}function qn(e){rn(e);var i=(0,t.select)("."+Me,e.element);i&&(0,t.detach)(i)}function Wn(e){Kn(e,ke),Kn(e,Le)}function Kn(e,t){for(var i=e.element.querySelectorAll("."+t),n=0;n<i.length;n++)i[n].classList.remove(t)}function Gn(e,i,n,a){var s,r=e.getBoundingClientRect(),o=(0,t.select)("."+n,e);a>=r.top+e.clientHeight-30&&!(0,t.isNullOrUndefined)(o)&&(s="navigationpane"===i.targetModule||"detailsview"===i.targetModule?o.offsetHeight/2.5:o.offsetHeight/4.5,e.scrollBy(0,s)),!(0,t.isNullOrUndefined)(o)&&a<=r.top+30&&(s="navigationpane"===i.targetModule||"detailsview"===i.targetModule?o.offsetHeight/2.5:o.offsetHeight/4.5,e.scrollBy(0,-s))}function Yn(e,i){var n=i;n.fileDetails=e.dragData;var a=!1;pn(e,i.target),Wn(e),null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),rn(e,"hover");var s=null;"navigationpane"===e.targetModule?((s=(0,t.closest)(i.target,"li")).classList.add(Oe,ke),a=!0,e.treeExpandTimer=window.setTimeout((function(){e.notify(Fi,i)}),800),Gn(e.navigationpaneModule.treeObj.element.parentElement,e,"e-level-2",i.event.y)):"detailsview"===e.targetModule?((s=(0,t.closest)(i.target,"tr"))&&s.querySelector("."+Te)&&!s.classList.contains(ye)?s.classList.add(ke):!s||s.querySelector("."+Te)||s.classList.contains(ye)||s.classList.add(Le),a=!0,Gn(e.detailsviewModule.gridObj.element.querySelector(".e-content"),e,"e-row",i.event.y)):"largeiconsview"===e.targetModule?((s=(0,t.closest)(i.target,"li"))&&s.querySelector("."+Te)&&!s.classList.contains(ye)&&s.classList.add(Oe,ke),a=!0,Gn(e.largeiconsviewModule.element.firstElementChild,e,"e-large-icon",i.event.y)):"breadcrumbbar"===e.targetModule&&(a=!0),e.element.classList.remove("e-fe-drop","e-no-drop"),e.element.classList.add(a?"e-fe-drop":"e-no-drop"),e.dragCount=e.dragCount+1,e.trigger("fileDragging",n)}function Jn(e){for(var i="",n=Object.keys(e),a=0;a<n.length;a++)"message"!==n[a]&&(i+=(0===a?"":", ")+n[a]+": "+(0,t.getValue)(n[a],e));return i}function Qn(e,i){return e.hasId?(0,t.getValue)("id",i):In(e,i)}function Xn(e,i){e.itemData=[i],e.currentItemText=(0,t.getValue)("name",i),e.isFile=(0,t.getValue)("isFile",i),e.filterPath=(0,t.getValue)("filterPath",i)}function $n(e){sa(e.itemData[0])?Xa(e,"Rename"):ia(e,e.itemData[0],Hi)}function Zn(e){for(var t=e.itemData,i=0;i<t.length;i++)if(!la(t[i]))return void ia(e,t[i],Wi);e.selectedItems.length>0&&Ga(e,e.path,e.selectedItems)}function ea(e,t,i){for(var n=0;n<t.length;n++)if(!sa(t[n]))return void ia(e,t[n],Hi);e.itemData=t,Ia(e,i,e.path,"delete")}function ta(e,t,i){for(var n=0;n<t.length;n++)if(!la(t[n]))return void ia(e,t[n],Wi);e.itemData=t,i.length>0&&Ga(e,e.path,i)}function ia(e,i,n){var a=(0,t.getValue)("message",(0,t.getValue)("permission",i));""===a&&(a=jn(e,"Access-Message").replace("{0}",(0,t.getValue)("name",i)).replace("{1}",n)),Xa(e,"Error",{error:{code:"401",fileExists:null,message:a}})}function na(e){return aa(e)?"e-fe-locked":"e-fe-locked e-fe-hidden"}function aa(e){var i=(0,t.getValue)("permission",e);return!(i&&!(0,t.getValue)("read",i))}function sa(e){var i=(0,t.getValue)("permission",e);return!i||(0,t.getValue)("read",i)&&(0,t.getValue)("write",i)}function ra(e){var i=(0,t.getValue)("permission",e);return!i||(0,t.getValue)("read",i)&&(0,t.getValue)("writeContents",i)}function oa(e){var i=(0,t.getValue)("permission",e);return!i||(0,t.getValue)("read",i)&&(0,t.getValue)("upload",i)}function la(e){var i=(0,t.getValue)("permission",e);return!i||(0,t.getValue)("read",i)&&(0,t.getValue)("download",i)}function ha(e){var t=e.itemData[0];ra(t)?Xa(e,"NewFolder"):ia(e,t,Bi)}function da(e){var t=e.itemData[0];if(oa(t)){var i="#"+e.element.id+$;document.querySelector(i).click()}else ia(e,t,qi)}function pa(e){(0,t.isNullOrUndefined)(e.dialogObj)||e.dialogObj.hide()}function ca(e,i){return e.hasId&&!(0,t.isNullOrUndefined)((0,t.getValue)("filterId",i))?(0,t.getValue)("filterId",i).replace(/\\/g,"/").replace(/^[^/]+\//,"/"):(0,t.getValue)("filterPath",i).replace(/\\/g,"/")}function ua(e,i,n,a){for(var s="",r=0;r<i.length;r++){var o=(0,t.getValue)("permission",i[r]);if(null==o&&(o=void 0),a)!o||(0,t.getValue)("read",o)&&(0,t.getValue)("writeContents",o)||""===(s=(0,t.getValue)("message",(0,t.getValue)("permission",i[r])))&&(s=jn(e,"Access-Message").replace("{0}",(0,t.getValue)("name",i[r])).replace("{1}","writeContents"));else{var l="copy"===n?(0,t.getValue)("copy",o):(0,t.getValue)("write",o);!o||(0,t.getValue)("read",o)&&l||""===(s=(0,t.getValue)("message",(0,t.getValue)("permission",i[r])))&&(s=jn(e,"Access-Message").replace("{0}",(0,t.getValue)("name",i[r])).replace("{1}",n))}if(""!==s){e.responseData={cwd:null,details:null,error:{code:"401",message:s,fileExists:null},files:null};break}}return s}var fa=c(707);function ga(e,i,n){for(var a=e.itemData,s=0;s<a.length;s++)(0,t.isNullOrUndefined)((0,t.getValue)("hasChild",a[s]))&&(0,t.setValue)("hasChild",!1,a[s]);Ma(e,{action:"read",path:n,showHiddenItems:e.showHiddenItems,data:a},Fa,i)}function ma(e,t){Ma(e,{action:"create",path:e.path,name:t,data:e.itemData},Va,t)}function ba(e,i){var n={action:"filter",path:e.path,showHiddenItems:e.showHiddenItems,data:[fn(e)]},a=e.filterData?(0,t.extend)(undefined,n,e.filterData):n;Ma(e,a,Ua,i,(0,t.getValue)("action",a))}function va(e,t,i){var n,a;if(""!==e.breadcrumbbarModule.searchObj.element.value||e.isFiltered){var s=e.filterPath;e.hasId?(n=e.currentItemText,a=i):(n=(s=s.replace(/\\/g,"/")).replace(t,"")+e.currentItemText,a=s.replace(t,"")+i)}else n=e.currentItemText,a=i;Ma(e,{action:"rename",path:t,name:n,newName:a,data:e.itemData,showFileExtension:e.showFileExtension},_a,t)}function ya(e,t,i,n,a,s,r){var o={action:a,path:t,targetData:e.itemData[0],targetPath:n,names:i,renameFiles:s,data:r};e.destinationPath=n,Ma(e,o,Ha,t,a,n)}function Ia(e,t,i,n){Ma(e,{action:n,path:i,names:t,data:e.itemData},Ba,i)}function Oa(e,t,i,n){Ma(e,{action:n,path:i,names:t,data:e.itemData},za,i,n)}function wa(e){return e.fileSystemData.length>=0&&(0,t.isNullOrUndefined)(e.ajaxSettings.url)}function Da(e,t){return e.some((function(e){return e.name===t}))}function Sa(e,i){return e.fileSystemData.findIndex((function(e){return!(0,t.isNullOrUndefined)(e)&&String(e.id)===String(i)}))}function Ca(e,t){return e.fileSystemData.filter((function(e){return String(e.id)===String(t)}))[0]}function xa(e,t){return e.fileSystemData.filter((function(e){return String(e.parentId)===String(t)}))}function ja(e,i,n,a){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(s[r]=null);var o=new Date,l=String(i.id)===String(0)||(0,t.isNullOrUndefined)(i.parentId)?"\\":i.filterPath+i.name+"\\";return Object.assign(s,{dateCreated:o,dateModified:o,filterPath:l,hasChild:!!a&&e.hasChild,id:(0,fa.getUid)(null===n?e.name:n),isFile:!!a&&e.isFile,name:null===n?e.name:n,parentId:i.id,size:a?e.size:0,type:a?e.type:""}),s}function Na(e,t,i,n){e.responseData={cwd:null,details:null,error:{code:i,message:t,fileExists:null!=n?n:null},files:null}}function Pa(e,i,n){var a={cancel:!1,newName:(0,t.getValue)("newName",i),itemData:(0,t.getValue)("data",i),path:(0,t.getValue)("path",i)};e.trigger("beforeRename",a,(function(t){if(t.cancel)n.cancel=!0;else if(wa(e))if(Da(e.fileSystemData,t.newName)){var i="Cannot rename"+t.itemData[0].name+"to"+t.newName+": destination already exists.";Na(e,i,"400",null)}else{var a=Ca(e,t.itemData[0].id),s=a.name;a.name=t.newName,Ea(e,a.id,s,t.newName)}}))}function Ea(e,t,i,n){e.fileSystemData.forEach((function(a){if(String(a.parentId)===String(t)){var s=a.filterPath.replace(i+"\\",n+"\\");a.filterPath=s,Ea(e,a.id,i,n)}}))}function Ra(e,i,n){switch((0,t.getValue)("action",i)){case"create":!function(e,i,n){var a={folderName:(0,t.getValue)("name",i),cancel:!1,path:(0,t.getValue)("path",i),parentFolder:(0,t.getValue)("data",i)};e.trigger("beforeFolderCreate",a,(function(t){if(t.cancel)n.cancel=!0;else if(wa(e))if(Da(e.fileSystemData,t.folderName)){var i="A file or folder with the name "+t.folderName+" already exists.";Na(e,i,"400",null)}else{var a=t.parentFolder[0],s=ja(a,a,t.folderName,!1);e.fileSystemData.push(s)}}))}(e,i,n);break;case"delete":!function(e,i,n){var a={cancel:!1,itemData:(0,t.getValue)("data",i),path:(0,t.getValue)("path",i)};e.trigger("beforeDelete",a,(function(t){t.cancel?n.cancel=!0:wa(e)&&t.itemData.forEach((function(t){var i=Sa(e,t.id);-1!==i&&e.fileSystemData.splice(i,1),t.isFile||e.fileSystemData.filter((function(e){return e.filterPath.includes(t.name)})).forEach((function(t){var i=Sa(e,t.id);-1!==i&&e.fileSystemData.splice(i,1)}))}))}))}(e,i,n);break;case"rename":Pa(e,i,n);break;case"move":case"copy":!function(e,i,n){var a={cancel:!1,itemData:(0,t.getValue)("data",i),isCopy:"copy"===(0,t.getValue)("action",i),path:(0,t.getValue)("path",i),targetData:(0,t.getValue)("targetData",i),targetPath:(0,t.getValue)("targetPath",i)};e.trigger("beforeMove",a,(function(a){if(a.cancel)n.cancel=!0;else if(wa(e)){var s="File Already Exists",r=(0,t.getValue)("action",i),o=ua(e,a.itemData,r,!1),l=ua(e,[a.targetData],r,!0),h=[];if(e.pasteNodes=[],""===o&&""===l){if(a.isCopy){var d=xa(e,a.targetData.id);return a.itemData.forEach((function(n){if(!Da(d,n.name)||(0,t.getValue)("renameFiles",i).length>0){if((0,t.getValue)("renameFiles",i).length>0){var s=n.name.split("."),r=n.name.includes(".")?s[0]+"("+e.existingFileCount+")."+s[1]:s[0]+"("+e.existingFileCount+")";return Ta(e,n,a.targetData,r),e.responseData.error=null,void e.existingFileCount++}Ta(e,n,a.targetData,null)}else h.push(n.name)})),void(h.length>0&&Na(e,s,"400",h))}for(var p=a.targetData,c=xa(e,p.id),u=0;u<a.itemData.length;u++){var f=a.itemData[u];if(!Da(c,f.name)||(0,t.getValue)("renameFiles",i).length>0){if(!p.hasChild){p.hasChild=!f.isFile;var g=e.fileSystemData.filter((function(e){return String(e.id)===String(p.id)}));g.length>0&&(g[0].hasChild=p.hasChild)}if(!f.isFile){var m=0!==f.parentId?xa(e,f.parentId):[];Ca(e,f.parentId).hasChild=m.length>1}var b=Ca(e,f.id);if((0,t.getValue)("renameFiles",i).length>0){var v=f.name.split(".");f.name=f.name.includes(".")?v[0]+"("+e.existingFileCount+")."+v[1]:v[0]+"("+e.existingFileCount+")",b.name=f.name,e.responseData.error=null,e.existingFileCount++,e.dropData=p,e.dropPath=a.path;var y=a.targetPath.replace(/^\/|\/$/g,"").split("/");p=Ca(e,y[y.length-1])}b.parentId=p.id,b.filterPath=0===p.id?"\\":p.filterPath+p.name+"\\"}else h.push(f.name)}h.length>0&&Na(e,s,"400",h)}}}))}(e,i,n);break;case"search":!function(e,i,n){var a={searchResults:(0,t.getValue)("data",i),cancel:!1,path:(0,t.getValue)("path",i),searchText:(0,t.getValue)("searchString",i),caseSensitive:(0,t.getValue)("caseSensitive",i),showHiddenItems:(0,t.getValue)("showHiddenItems",i)};e.trigger("search",a,(function(e){(0,t.setValue)("data",e.searchResults,i),e.cancel&&(n.cancel=!0)}))}(e,i,n)}}function Ma(e,i,n,a,s,r){var o={url:e.ajaxSettings.url,type:"POST",mode:!0,dataType:"json",contentType:"application/json",data:JSON.stringify(i),onSuccess:null,onFailure:null,beforeSend:null},l={action:(0,t.getValue)("action",i),ajaxSettings:o,cancel:!1};Ra(e,i,l),e.trigger("beforeSend",l,(function(o){if(!o.cancel){if(e.notify(Qt,{}),wa(e)){var l=("node-expand"===a||"finalize-end"===a||"rename-end-parent"===a?(0,t.getValue)("path",i):e.path).replace(/^\/|\/$/g,"").split("/"),h="rename-end-parent"===a||"path-changed"===a&&0!==(0,t.getValue)("data",i).length&&(0,t.isNullOrUndefined)(e.renamedItem)?(0,t.getValue)("data",i)[0].id:l[l.length-1],d=(0,t.getValue)("action",i),p=("move"===d||"rename"===d||"copy"===d||"delete"===d||"search"===d)&&"rename-end"!==a;if("read"===d||"create"===d||"rename-end"===a){var c=e.fileSystemData.filter((function(e){return(0,t.isNullOrUndefined)(e.parentId)})).length>0?e.fileSystemData.filter((function(e){return(0,t.isNullOrUndefined)(e.parentId)}))[0].id:0;if(e.responseData={cwd:Ca(e,"/"===e.path&&"node-expand"!==a&&"rename-end-parent"!==a?c:h),details:null,error:null,files:xa(e,"/"===e.path&&"node-expand"!==a&&"rename-end-parent"!==a?c:h)},(0,t.isNullOrUndefined)(e.responseData.cwd)){Na(e,"Cannot load empty data within the File Manager.","400",null)}}else if(p&&null===e.responseData.error){0===(u="search"===d||"delete"===d?(0,t.getValue)("data",i):[]).length&&(u="copy"===d?e.pasteNodes.map((function(t){return Ca(e,t)})):(0,t.getValue)("data",i).map((function(t){return Ca(e,t.id)}))),e.responseData={cwd:null,details:null,error:null,files:u}}else if("details"===(0,t.getValue)("action",i)){var u,f=(u=(0,t.getValue)("data",i))[0],g=u.length>1,m=u.map((function(e){return e.name})),b=ka(g?u.reduce((function(e,t){return e+(t.size||0)}),0):f.size),v=e.pathNames.includes(f.name)||g?e.pathNames.join("/"):e.pathNames.join("/")+"/"+f.name;e.responseData.details=Object.assign({location:v,multipleFiles:g,name:m.join(", "),size:b},g?{}:{created:f.dateCreated,isFile:f.isFile,modified:f.dateModified,permission:f.permission})}return void La(e,e.responseData,n,i,a,s,r,o)}new t.Ajax({url:(0,t.getValue)("url",o.ajaxSettings),type:(0,t.getValue)("type",o.ajaxSettings),mode:(0,t.getValue)("mode",o.ajaxSettings),dataType:(0,t.getValue)("dataType",o.ajaxSettings),contentType:(0,t.getValue)("contentType",o.ajaxSettings),data:(0,t.getValue)("data",o.ajaxSettings),beforeSend:(0,t.getValue)("beforeSend",o.ajaxSettings),onSuccess:function(l){if((0,t.isNullOrUndefined)(l)){var h={error:{fileExists:null,message:jn(e,"Server-Error")+" "+e.ajaxSettings.url,code:"406"},files:null};Aa(e,o,n,h,a,s,r)}else"string"==typeof l&&(l=JSON.parse(l)),La(e,l,n,i,a,s,r,o)},onFailure:function(){var t={files:null,error:{code:"404",message:jn(e,"Network-Error")+" "+e.ajaxSettings.url,fileExists:null}};Aa(e,o,n,t,a,s,r)}}).send()}}))}function ka(e){return e<1024?e+" B":e<1048576?(e/1024).toFixed(2)+" KB":e<1073741824?(e/1024/1024).toFixed(2)+" MB":(e/1024/1024/1024).toFixed(2)+" GB"}function La(e,i,n,a,s,r,o,l){e.notify(Zt,{action:"success"});var h=e.expandedId?e.expandedId:e.pathId[e.pathId.length-1];if(!(0,t.isNullOrUndefined)(i.cwd)&&"read"===(0,t.getValue)("action",a)&&(i.cwd.name=1===e.pathId.length&&e.rootAliasName||i.cwd.name,(0,t.setValue)("_fm_id",h,i.cwd),(0,t.setValue)(h,i.cwd,e.feParent),!(0,t.isNullOrUndefined)(i.files)||"401"===i.error.code)){if(("finalize-end"===s||"initial-end"===s)&&0===e.pathNames.length){var d=(0,t.getValue)(e.pathId[0],e.feParent);e.pathNames[0]=(0,t.getValue)("name",d),e.hasId=!(0,t.isNullOrUndefined)((0,t.getValue)("id",d))}"finalize-end"===s&&tn(e)}if(!(0,t.isNullOrUndefined)(i.files)){xn(i.files);for(var p=0,c=i.files.length;p<c;p++){var u=i.files[p];(0,t.setValue)("_fm_iconClass",bn(u),u)}"read"===(0,t.getValue)("action",a)&&(Cn(i,h),(0,t.setValue)(h,i.files,e.feFiles))}if(!(0,t.isNullOrUndefined)(i.details)&&!(0,t.isNullOrUndefined)(e.rootAliasName)){var f=e.rootAliasName||(0,t.getValue)("name",i.details),g=(0,t.getValue)("location",i.details).replace(new RegExp("/","g"),"\\");"/"===(0,t.getValue)("path",a)||e.hasId&&1===(0,t.getValue)("path",a).match(/[/]/g).length?(0===(0,t.getValue)("names",a).length&&(0,t.setValue)("name",f,i.details),g=-1===g.indexOf("\\")?f:g.replace(g.substring(0,g.indexOf("\\")),f)):g=g.replace(g.substring(0,g.indexOf("\\")),f),(0,t.setValue)("location",g,i.details)}n(e,i,s,r,o),(0,t.isNullOrUndefined)(i.files)||"path-changed"!==s&&"finalize-end"!==s&&"open-end"!==s&&"drop-path"!==s||e.notify(Ei,i),"function"==typeof(0,t.getValue)("onSuccess",l.ajaxSettings)&&(0,t.getValue)("onSuccess",l.ajaxSettings)()}function Ta(e,t,i,n){var a=ja(t,i,n,!0);e.fileSystemData.push(a),e.pasteNodes.push(a.id);for(var s=xa(e,t.id),r=0;r<s.length;r++)Ta(e,s[r],a,null)}function Aa(e,i,n,a,s,r,o){e.notify(Zt,{action:"failure"}),n(e,a,s,r,o),"function"==typeof(0,t.getValue)("onFailure",i.ajaxSettings)&&(0,t.getValue)("onFailure",i.ajaxSettings)()}function Fa(e,i,n){try{if((0,t.isNullOrUndefined)(i.files))(0,t.isNullOrUndefined)(i.error)||"401"!==i.error.code||(i.files=[],e.notify(n,i),e.notify(ri,{})),qa(e,i,"read"),e.setProperties({path:e.oldPath},!0),e.pathNames.pop();else{e.notify(n,i),e.notify(ri,{});var a={action:"read",result:i};e.trigger("success",a)}}catch(t){Ya(e,t,"read"),e.setProperties({path:e.oldPath},!0),e.pathNames.pop()}if(e.isDragDrop&&e.isDropEnd){if(0!==e.droppedObjects.length){a={fileDetails:e.droppedObjects};e.trigger("fileDropped",a)}e.isDropEnd=e.isDragDrop=!1}}function Ua(e,i,n,a){try{if((0,t.isNullOrUndefined)(i.files))qa(e,i,a);else{e.notify(n,i);var s={action:a,result:i};e.trigger("success",s)}}catch(t){Ya(e,t,a)}}function Va(e,i,n){try{if((0,t.isNullOrUndefined)(i.files))if("400"===i.error.code){if(e.dialogObj&&e.dialogObj.visible){var a=(0,t.select)("#newname",e.dialogObj.element),s=jn(e,"Validation-NewFolder-Exists").replace("{0}",'"'+a.value+'"');a.parentElement.nextElementSibling.innerHTML=s}else{Xa(e,"Error",{files:null,error:{code:"400",message:jn(e,"Validation-NewFolder-Exists").replace("{0}",'"'+n+'"'),fileExists:null}})}o={action:"create",error:i.error};e.trigger("failure",o)}else e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),qa(e,i,"create");else{e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),e.createdItem=wa(e)?i.files[i.files.length-1]:i.files[0],e.breadcrumbbarModule.searchObj.value="";var r={folderName:n,path:e.path,parentFolder:e.itemData};e.trigger("folderCreate",r);var o={action:"create",result:i};e.trigger("success",o),e.itemData=[fn(e)],ga(e,Vt,e.path)}}catch(s){e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),Ya(e,s,"create")}}function _a(e,i){try{if((0,t.isNullOrUndefined)(i.files))if("400"===i.error.code&&e.dialogObj&&e.dialogObj.visible){var n=(0,t.select)("#rename",e.dialogObj.element),a=jn(e,"Validation-Rename-Exists").replace("{0}",'"'+e.currentItemText+'"');a=a.replace("{1}",'"'+n.value+'"'),n.parentElement.nextElementSibling.innerHTML=a;s={action:"rename",error:i.error};e.trigger("failure",s)}else(0,t.isNullOrUndefined)(e.dialogObj)||e.dialogObj.hide(),qa(e,i,"rename");else{(0,t.isNullOrUndefined)(e.dialogObj)||e.dialogObj.hide();var s={action:"rename",result:i};e.trigger("success",s),e.renamedItem=Array.isArray(i.files)?i.files[0]:i.files;var r={newName:e.renamedItem.name,itemData:[e.renamedItem],path:e.path};if(e.trigger("rename",r),"navigationpane"===e.activeModule){var o=fn(e),l=e.pathId[e.pathId.length-1].split("_").length-2;e.pathId.pop(),e.itemData=[(0,t.getValue)(e.pathId[e.pathId.length-1],e.feParent)];var h=ca(e,e.renamedItem);ga(e,mi,h),!(0,t.isNullOrUndefined)(o)&&e.pathNames.length>1&&l<=e.pathNames.length-1&&(e.pathNames[l]=e.renameText,e.hasId||e.setProperties({path:"/"+e.pathNames.slice(1).join("/")+"/"},!0)),e.itemData=e.navigationpaneModule.previousSelected.length>0?e.navigationpaneModule.treeObj.getTreeData(e.navigationpaneModule.previousSelected[0]):e.itemData,ga(e,Yt,e.path),e.itemData[0]=e.renamedItem,e.renamedItem=null}else e.itemData=[fn(e)],""!==e.breadcrumbbarModule.searchObj.value?Wa(e,bi,e.path,e.searchWord,e.showHiddenItems,!e.searchSettings.ignoreCase):e.isFiltered?ba(e,bi):ga(e,bi,e.path)}}catch(a){(0,t.isNullOrUndefined)(e.dialogObj)||e.dialogObj.hide(),Ya(e,a,"rename")}}function Ha(e,i,n,a){try{var s={itemData:i.files,isCopy:"copy"===a,path:n,targetData:e.itemData[0],targetPath:e.path};e.trigger("move",s),i.error&&i.error.fileExists?(e.fileLength=0,(0,t.isNullOrUndefined)(i.files)||(e.isPasteError=!0,Un(e,a,i)),$a(e,"DuplicateItems",i.error.fileExists),"404"===i.error.code&&Xa(e,"Error",i)):i.error||(0,t.isNullOrUndefined)(i.files)?i.error&&!(0,t.isNullOrUndefined)(i.files)?(e.isPasteError=!0,Un(e,a,i),Xa(e,"Error",i)):qa(e,i,a):(e.isPasteError=!1,Un(e,a,i))}catch(t){Ya(e,t,a)}}function Ba(e,i,n){try{var a={itemData:i.files,path:n};if(e.trigger("delete",a),(0,t.isNullOrUndefined)(i.files))qa(e,i,"delete");else if(e.setProperties({path:n},!0),e.itemData=[fn(e)],ga(e,qt,e.path),i.error)qa(e,i,"delete");else{var s={action:"delete",result:i};e.trigger("success",s)}}catch(t){Ya(e,t,"delete")}}function za(e,i,n,a){try{if((0,t.isNullOrUndefined)(i.details))qa(e,i,"details");else{Xa(e,a,null,i.details);var s={action:"details",result:i};e.trigger("success",s)}}catch(t){Ya(e,t,"details")}}function qa(e,t,i){Xa(e,"Error",t);var n={action:i,error:t.error};e.trigger("failure",n)}function Wa(e,t,i,n,a,s){Ma(e,{action:"search",path:i,searchString:n,showHiddenItems:a,caseSensitive:s,data:e.itemData},Ka,t)}function Ka(e,i,n){try{if((0,t.isNullOrUndefined)(i.files))qa(e,i,"search");else{e.notify(n,i);var a={action:"search",result:i};e.trigger("success",a)}}catch(t){Ya(e,t,"search")}}function Ga(e,i,n){var a=e.ajaxSettings.downloadUrl?e.ajaxSettings.downloadUrl:e.ajaxSettings.url,s={action:"download",path:i,names:n,data:e.itemData},r={data:s,cancel:!1,useFormPost:!0,ajaxSettings:{url:a,type:"POST",contentType:"application/json",responseType:"blob",data:JSON.stringify(s),onSuccess:null,onFailure:null,beforeSend:null}};e.trigger("beforeDownload",r,(function(i){if(!i.cancel)if(i.useFormPost){var n=(0,t.createElement)("form",{id:e.element.id+"_downloadForm",attrs:{action:a,method:"post",name:"downloadForm",download:""}}),s=(0,t.createElement)("input",{id:e.element.id+"_hiddenForm",attrs:{name:"downloadInput",value:JSON.stringify(i.data),type:"hidden"}});n.appendChild(s),e.element.appendChild(n),document.forms.namedItem("downloadForm").submit(),e.element.removeChild(n)}else try{var r,o;new t.Fetch({url:(0,t.getValue)("url",i.ajaxSettings),type:(0,t.getValue)("type",i.ajaxSettings),contentType:(0,t.getValue)("contentType",i.ajaxSettings),responseType:(0,t.getValue)("responseType",i.ajaxSettings),beforeSend:(0,t.getValue)("beforeSend",i.ajaxSettings),onLoad:function(i){if(r=i.headers.get("Content-Disposition")){var n=r.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/),a=n&&n[1];o=a?a.replace(/['"]/g,""):o}else o=e.itemData.length>1?"files.zip":(0,t.getValue)("isFile",e.itemData[0])?(0,t.getValue)("name",e.itemData[0]):(0,t.getValue)("name",e.itemData[0])+".zip"},onSuccess:function(t){e.trigger("success",i);var n=t,a=URL.createObjectURL(n),s=document.createElement("a");s.href=a,s.download=o,document.body.appendChild(s),s.click(),document.body.removeChild(s)},onFailure:function(t){var n={error:{code:t.status.toString(),message:jn(e,"Network-Error")+" "+e.ajaxSettings.downloadUrl}};Xa(e,"Error",n),e.trigger("failure",i)}}).send(JSON.stringify(i.data))}catch(t){Ya(e,t,"download")}}))}function Ya(e,t,i){qa(e,{files:null,error:{message:t.message,fileExists:null}},i)}var Ja=c(323),Qa=c(741);function Xa(e,i,n,a){var s=function(e,i,n,a){var s,r,o,l,h,d,p={header:"",content:"",buttons:[],dialogName:""};switch(p.open=function(){ts(e,e.dialogObj,p.dialogName)},p.close=function(){is(e,e.dialogObj,p.dialogName)},i=a&&!0===a.multipleFiles?"MultipleFileDetails":i){case"NewFolder":p.dialogName="Create Folder",p.header=jn(e,"Header-NewFolder"),p.content='<input type="text" value="New folder" id="newname"><div class="e-fe-error"></div>',p.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Create")},click:function(t){"keydown"!==t.type&&cs(e)}}],p.open=rs.bind(this,e);break;case"Delete":p.dialogName="Delete",e.selectedItems.length>1?(p.content=("<div>"+jn(e,"Content-Multiple-Delete")+"</div>").replace("{0}",e.selectedItems.length.toString()),p.header=jn(e,"Header-Multiple-Delete")):(p.content="<div>"+jn(e,e.isFile?"Content-Delete":"Content-Folder-Delete")+"</div>",p.header=jn(e,e.isFile?"Header-Delete":"Header-Folder-Delete")),p.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Yes")},click:function(){!function(e){e.dialogObj.hide(),e.notify(zt,{})}(e)}},{buttonModel:{content:jn(e,"Button-No")},click:function(){e.dialogObj.hide()}}];break;case"Rename":p.dialogName="Rename",p.header=jn(e,"Header-Rename"),p.content='<input type="text" class="e-input" id="rename"><div class="e-fe-error"></div>',p.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Save")},click:function(t){"keydown"!==t.type&&us(e)}}],p.open=os.bind(this,e);break;case"details":p.dialogName="File Details",r=new t.Internationalization(e.locale).formatDate(new Date(a.modified),{format:"MMMM dd, yyyy HH:mm:ss"}),s="",(0,t.isNullOrUndefined)(a.permission)||(s="<tr><td>"+jn(e,"Permission")+'</td><td class="'+Lt+'" >'+Jn(a.permission)+"</td></tr>"),p.header=a.name,p.content="<table><tr><td>"+jn(e,"Type")+'</td><td class="'+Lt+'" title="'+(a.isFile?"File":"Folder")+'">'+(a.isFile?"File":"Folder")+"</td></tr><tr><td>"+jn(e,"Size")+'</td><td><span class="'+Lt+'" title ="'+a.size+'">'+a.size+"</span></td></tr><tr><td>"+jn(e,"Location")+'</td><td class="'+Lt+'" title="'+a.location+'">'+a.location+"</td></tr><tr><td>"+jn(e,"Modified")+'</td><td class="'+Lt+'" >'+r+"</td></tr>"+s+"</table>",p.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Ok")},click:function(){e.dialogObj.hide()}}];break;case"MultipleFileDetails":p.dialogName="File Details",void 0===(o=e.itemData.map((function(e){return 0!==(d=e.name.indexOf(".")+1)||e.isFile?0!==d?e.name.substr(d).replace(" ",""):"undetermined":"Folder"})))[0]&&(o=a.name.split(",").map((function(e){return 0===(d=e.indexOf(".")+1)?"Folder":e.substr(d).replace(" ","")}))),l=o.every((function(e,t,i){return e===i[0]}))?"Folder"===o[0]?"Folder":o[0].toLocaleUpperCase()+" Type":"Multiple Types",h=a.location,p.header=a.name,p.content="<table><tr><td>"+jn(e,"Type")+':</td><td class="'+Lt+'">'+l+"</td></tr><tr><td>"+jn(e,"Size")+":</td><td>"+a.size+'<span class="'+Lt+'" title ="'+a.size+'"></span></td></tr><tr><td>'+jn(e,"Location")+':</td><td class="'+Lt+'" title="'+h+'">'+h+"</td></tr></table>",p.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Ok")},click:function(t){"keydown"!==t.type&&e.dialogObj.hide()}}];break;case"Error":e.notify(ii,{}),p.dialogName="Error","401"===n.error.code?p.header='<span class="e-fe-icon e-fe-access-error"></span><div class="e-fe-access-header">'+jn(e,"Access-Denied")+"</div>":p.header=jn(e,"Error"),p.content='<div class="'+Dt+'">'+n.error.message+"</div>",p.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Ok")},click:function(){e.dialogObj.hide()}}]}return p}(e,i,n,a);(0,t.isNullOrUndefined)(e.dialogObj)?(e.dialogObj=new Gi.Dialog({beforeOpen:hs.bind(this,e,s.dialogName),beforeClose:function(t){es(e,e.dialogObj,t,s.dialogName)},header:s.header,content:s.content,buttons:s.buttons,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,allowDragging:!0,isModal:!0,target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:Nn(e,e.isMobile?re:ae),width:"350px",open:s.open,close:s.close,enableRtl:e.enableRtl,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.dialogObj.isStringTemplate=!0,e.dialogObj.appendTo("#"+e.element.id+_)):function(e,t){e.dialogObj.header=t.header,e.dialogObj.content=t.content,e.dialogObj.buttons=t.buttons,e.dialogObj.enableRtl=e.enableRtl,e.dialogObj.open=t.open,e.dialogObj.close=t.close,e.dialogObj.beforeOpen=hs.bind(this,e,t.dialogName),e.dialogObj.beforeClose=function(i){es(e,e.dialogObj,i,t.dialogName)},e.dialogObj.dataBind(),e.dialogObj.show()}(e,s)}function $a(e,i,n,a){var s=function(e,t,i,n){var a,s,r,o={header:"",content:"",buttons:[],dialogName:""};switch(o.open=function(){ts(e,e.extDialogObj,o.dialogName)},o.close=function(){is(e,e.extDialogObj,o.dialogName)},t){case"Extension":o.header=jn(e,"Header-Rename-Confirmation"),o.content="<div>"+jn(e,"Content-Rename-Confirmation")+"</div>",o.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Yes")},click:function(){e.extDialogObj.hide(),va(e,n,e.renameText)}},{buttonModel:{content:jn(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,r=(s=e.replaceItems[e.fileLength]).lastIndexOf("/"),s=-1===r?s:s.substring(r),o.header=jn(e,"Header-Duplicate"),a="<div>"+jn(e,"Content-Duplicate")+"</div>",o.content=a.replace("{0}",s),o.close=function(){if(!e.isDropEnd&&0===e.duplicateItems.length){var t={fileDetails:e.droppedObjects};e.trigger("fileDropped",t),e.isDropEnd=e.isDragDrop=!1}is(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Yes")},click:function(){if(e.duplicateItems.push(e.replaceItems[e.fileLength]),e.duplicateRecords.push(_n(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=a.replace("{0}",t),e.extDialogObj.show()}else{e.extDialogObj.hide();var s=e.isDragDrop?e.dragPath:e.targetPath,r=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath,o=e.isDragDrop?"move":e.fileAction;ya(e,s,e.duplicateItems,r,o,e.duplicateItems,e.duplicateRecords)}}},{buttonModel:{content:jn(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=a.replace("{0}",t),e.extDialogObj.show()}else if(e.extDialogObj.hide(),0!==e.duplicateItems.length){var s=e.isDragDrop?"move":e.fileAction,r=e.isDragDrop?e.dragPath:e.targetPath,o=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath;ya(e,r,e.duplicateItems,o,s,e.duplicateItems,e.duplicateRecords)}}}];break;case"UploadRetry":o.dialogName="Retry Upload",o.header=jn(e,"Header-Retry"),o.content=e.retryFiles[0].name+'<div class="e-fe-retrycontent">'+jn(e,"Content-Retry")+"</div>",o.open=ss.bind(this,e),o.close=function(){e.isRetryOpened=!1,as(e),is(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Keep-Both")},click:function(){ns(e,!0)}},{buttonModel:{isPrimary:!0,content:jn(e,"Button-Replace")},click:function(){ns(e,!1)}},{buttonModel:{isPrimary:!0,content:jn(e,"Button-Skip")},click:function(){var t=0;e.isApplySame?(t=e.retryFiles.length,e.retryFiles=[],as(e)):(t=1,e.retryFiles.splice(0,1),0!==e.retryFiles.length?$a(e,"UploadRetry"):as(e)),e.notify($t,{count:t})}}]}return o}(e,i,n,a);e.isApplySame=!1,(0,t.isNullOrUndefined)(e.extDialogObj)?(e.extDialogObj=new Gi.Dialog({beforeOpen:ds.bind(this,e,s.dialogName),beforeClose:function(t){es(e,e.extDialogObj,t,s.dialogName)},content:s.content,header:s.header,closeOnEscape:!0,allowDragging:!0,animationSettings:{effect:"None"},target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:Nn(e,e.isMobile?re:ae),enableRtl:e.enableRtl,showCloseIcon:!0,isModal:!0,width:350,buttons:s.buttons,open:s.open,close:s.close,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.extDialogObj.isStringTemplate=!0,e.extDialogObj.appendTo("#"+e.element.id+z)):(e.extDialogObj.header=s.header,e.extDialogObj.close=s.close,e.extDialogObj.open=s.open,e.extDialogObj.close=s.close,e.extDialogObj.content=s.content,e.extDialogObj.buttons=s.buttons,e.extDialogObj.enableRtl=e.enableRtl,e.extDialogObj.locale=e.locale,e.extDialogObj.beforeOpen=ds.bind(this,e,s.dialogName),e.extDialogObj.beforeClose=function(t){es(e,e.extDialogObj,t,s.dialogName)},e.extDialogObj.dataBind(),e.extDialogObj.show())}function Za(e,t,i,n){var a={cancel:i.cancel,popupName:n,popupModule:t};e.trigger("beforePopupOpen",a,(function(e){i.cancel=e.cancel}))}function es(e,t,i,n){var a={cancel:i.cancel,popupModule:t,popupName:n};e.trigger("beforePopupClose",a,(function(t){i.cancel=t.cancel,i.cancel||!i.isInteracted||"Rename"!==n&&"Create Folder"!==n||e.trigger(ii,{})}))}function ts(e,t,i){var n={popupModule:t,element:t.element,popupName:i};e.trigger("popupOpen",n)}function is(e,t,i){var n={popupModule:t,element:t.element,popupName:i};e.trigger("popupClose",n)}function ns(e,t){e.isApplySame?(t?function(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)}(e):function(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)}(e),as(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?$a(e,"UploadRetry"):as(e))}function as(e){var i=!0;e.isRetryOpened?e.isRetryOpened=!1:i=!1;var n=(0,t.select)(".e-dlg-checkbox",e.extDialogObj.element);n&&(0,t.remove)(n),i?e.extDialogObj.hide():e.retryFiles=[]}function ss(e,i){e.isRetryOpened=!0;var n=(0,t.getValue)("element",i),a=(0,t.select)(".e-dlg-content",n),s=e.createElement("div",{className:"e-dlg-checkbox"}),r=e.createElement("input",{id:e.element.id+"_applyall"});s.appendChild(r),a.appendChild(s);var o=new Qa.CheckBox({label:jn(e,"ApplyAll-Label"),change:function(t){e.isApplySame=t.checked}});o.appendTo("#"+e.element.id+"_applyall"),ts(e,e.extDialogObj,"Retry Upload")}function rs(e){var i=(0,t.select)("#newname",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||ls(i,jn(e,"Content-NewFolder")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){fs(e,i)},i.onkeyup=function(t){13===bs(t)&&cs(e)},function(e){var i=(0,t.select)("#newname",e.dialogObj.element);i.focus(),i.value="";var n=i.value.length;i.setSelectionRange(0,n)}(e),ts(e,e.dialogObj,"Create Folder")}function os(e){var i=(0,t.select)("#rename",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||ls(i,jn(e,"Content-Rename")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){fs(e,i)},i.onkeyup=function(t){13===bs(t)&&us(e)},function(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)}(e,i),ts(e,e.dialogObj,"Rename")}function ls(e,t){Ja.Input.createInput({element:e,properties:{placeholder:t}})}function hs(e,i,n){ps((0,t.selectAll)(".e-btn",e.dialogObj.element)),Za(e,e.dialogObj,n,i)}function ds(e,i,n){ps((0,t.selectAll)(".e-btn",e.extDialogObj.element)),Za(e,e.extDialogObj,n,i)}function ps(e){for(var t=function(t){e[t].onkeydown=function(e){13===e.keyCode&&e.preventDefault()},e[t].onkeyup=function(i){13===i.keyCode&&e[t].click()}},i=0;i<e.length;i++)t(i)}function cs(e){var i=(0,t.select)("#newname",e.dialogObj.element);gs(e,i),""===i.parentElement.nextElementSibling.innerHTML&&ma(e,i.value)}function us(e){var i=(0,t.select)("#rename",e.dialogObj.element);if(gs(e,i),""===i.parentElement.nextElementSibling.innerHTML){var n=i.value,a=e.currentItemText.lastIndexOf(".");if(e.isFile&&!e.showFileExtension)n+=-1===a?"":e.currentItemText.substr(a);if(e.renameText=n,e.currentItemText!==n){var s="";if(s="navigationpane"===e.activeModule?ca(e,e.itemData[0]):e.path,e.renamedId=(0,t.getValue)("id",e.itemData[0]),e.isFile){var r=-1===a?"":e.currentItemText.substr(a),o=n.lastIndexOf("."),l=-1===o?"":n.substr(o);e.showFileExtension&&r!==l?$a(e,"Extension",null,s):va(e,s,n)}else va(e,s,n)}else e.dialogObj.hide()}}function fs(e,t){/[/\\|*?"<>:]/.test(t.value)?ms(e,t):""===t.value?t.parentElement.nextElementSibling.innerHTML=jn(e,"Validation-Empty"):t.parentElement.nextElementSibling.innerHTML=""}function gs(e,t){fs(e,t);var i=t.value.length-1;""===t.value||t.value.lastIndexOf(".")!==i&&t.value.lastIndexOf(" ")!==i||!e.showFileExtension&&-1!==t.value.lastIndexOf(".")&&0!==t.value.substring(t.value.indexOf(".")+1).length||ms(e,t)}function ms(e,t){var i=jn(e,"Validation-Invalid").replace("{0}",'"'+t.value+'"');e.enableHtmlSanitizer?t.parentElement.nextElementSibling.textContent=i:t.parentElement.nextElementSibling.innerHTML=i}function bs(e){return e.keyCode?e.keyCode:e.which?e.which:e.charCode}function vs(e,i,n){var a=(0,t.createElement)("div",{className:"e-image-wrap"}),s=(0,t.createElement)("img",{className:"e-image",attrs:{src:n,alt:i}});a.appendChild(s),(0,t.isNullOrUndefined)(e.viewerObj)?(e.viewerObj=new Gi.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:Nn(e,e.isMobile?re:ae),locale:e.locale,enableResize:!0,allowDragging:!0,enableHtmlSanitizer:e.enableHtmlSanitizer,position:{X:"center",Y:"center"},enableRtl:e.enableRtl,open:ys.bind(this,e),close:function(){is(e,e.viewerObj,"Image Preview")},beforeOpen:function(t){Za(e,e.viewerObj,t,"Image Preview")},beforeClose:function(t){es(e,e.viewerObj,t,"Image Preview")},resizing:Is.bind(this,e),resizeStop:Is.bind(this,e)}),e.viewerObj.isStringTemplate=!0,e.viewerObj.appendTo("#"+e.element.id+B)):(e.viewerObj.refresh(),e.viewerObj.header=i,e.viewerObj.content=a,e.viewerObj.enableRtl=e.enableRtl,e.viewerObj.dataBind(),e.viewerObj.show())}function ys(e){setTimeout((function(){e.viewerObj&&e.viewerObj.element.focus()})),Is(e),ts(e,e.viewerObj,"Image Preview")}function Is(e){var i=(0,t.select)(".e-dlg-content",e.viewerObj.element),n=(0,t.select)(".e-image-wrap",e.viewerObj.element),a=window.getComputedStyle(i,null),s=a?2*parseFloat(a.paddingRight):36,r=a?2*parseFloat(a.paddingBottom):20;n.style.width=i.offsetWidth-s+"px",n.style.height=i.offsetHeight-r+"px"}var Os=c(90),ws=function(){function e(e){this.isInteraction=!0,this.uploadOperation=!1,this.count=0,this.isRendered=!0,this.tapCount=0,this.isSelectAllCalled=!1,this.isPasteOperation=!1,this.isInteracted=!0,this.parent=e,this.element=(0,t.select)("#"+this.parent.element.id+V,this.parent.element),(0,t.addClass)([this.element],ce),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:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"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,(0,Gi.showSpinner)(this.parent.element),"LargeIcons"===this.parent.view){this.resetMultiSelect(),this.element.setAttribute("tabindex","0"),this.listObj&&(this.unWireEvents(),this.removeEventListener()),this.parent.notify(Ci,{});var i=(0,t.select)("#"+this.parent.element.id+V,this.parent.element),n=(0,t.select)("ul",i);if(n&&(0,t.remove)(n),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.parent.sortComparer&&"None"!==this.parent.sortBy?this.items=this.allItems=Yi.DataUtil.sort(this.items,this.parent.sortBy,this.comparer.bind(this)):this.items=this.allItems=On(this.parent,this.items),i.classList.remove(jt),this.parent.enableVirtualization&&this.allItems.length>0&&!(0,t.isNullOrUndefined)(this.parent.virtualizationModule)&&this.parent.virtualizationModule.setUIVirtualization(),this.listElements=Os.ListBase.createListFromJson(t.createElement,this.items,this.listObj),this.itemList=Array.prototype.slice.call((0,t.selectAll)("."+fe,this.listElements)),this.element.appendChild(this.listElements),this.listElements.setAttribute("aria-label","listbox"),this.preventImgDrag(),this.createDragObj(),0===this.itemList.length){var a=this.element.querySelector("."+me);this.element.removeChild(a),Dn(this.parent,this.element,e)}else 0!==this.itemList.length&&this.element.querySelector("."+Pe)&&this.element.removeChild(this.element.querySelector("."+Pe));!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.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[]));var s=this.element.querySelectorAll("."+Ie);0!==s.length&&(this.parent.activeModule="largeiconsview");for(var r=0;r<s.length;r++)s[r].setAttribute("aria-selected","true");this.element.style.maxHeight="100%",this.getItemCount(),this.addEventListener(),this.wireEvents(),this.parent.enableVirtualization&&this.allItems.length>0&&!(0,t.isNullOrUndefined)(this.parent.virtualizationModule)&&(this.parent.virtualizationModule.setUlElementHeight(),this.parent.virtualizationModule.wireScrollEvent(!1)),this.isRendered=!0,(0,Gi.hideSpinner)(this.parent.element),this.parent.selectedItems.length&&this.checkItem()}},e.prototype.comparer=function(e,t){if("Descending"===this.parent.sortOrder){var i=e;e=t,t=i}return this.parent.sortComparer(e,t)},e.prototype.preventImgDrag=function(){for(var e=0;e<this.itemList.length;)this.itemList[e].querySelector("img")&&(this.itemList[e].ondragstart=function(){return!1}),e++},e.prototype.createDragObj=function(){var e=this;this.listObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.listElements,{enableTailMode:!0,distance:5,enableAutoScroll:!1,dragTarget:"."+Ve,helper:this.dragHelper.bind(this),cursorAt:this.parent.dragCursorPosition,dragArea:this.parent.element,dragStop:Bn.bind(this,this.parent),drag:Yn.bind(this,this.parent),clone:!0,dragStart:function(t){zn(e.parent,t,e.dragObj)}})):this.dragObj&&!this.parent.allowDragAndDrop&&this.dragObj.destroy())},e.prototype.dragHelper=function(e){var i=e.sender.target,n=(0,t.closest)(i,".e-list-item");if(!n)return null;n&&!n.classList.contains("e-active")&&this.setFocus(n);var a=this.element.querySelectorAll("."+Ie);this.parent.activeElements=[],this.parent.dragData=[];for(var s=0;s<a.length;s++)this.parent.dragData.push(this.getItemObject(a[parseInt(s.toString(),10)])),this.parent.activeElements.push(a[s]);return on(this.parent,n),this.parent.dragPath=this.parent.path,Hn(this.parent),this.parent.virtualDragElement},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=(0,t.closest)(e.target,".e-list-item"),n=(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent);if(i){var a=this.getItemObject(i);this.parent.dropPath=a.isFile?this.parent.path:yn(this.parent,a,this.parent.path),this.parent.dropData=a.isFile?n:a}else this.parent.dropPath=this.parent.path,this.parent.dropData=n}},e.prototype.getModuleName=function(){return"largeiconsview"},e.prototype.onItemCreated=function(e){if(e.item.removeAttribute("aria-level"),!this.parent.showFileExtension&&(0,t.getValue)("isFile",e.curData)){var i=e.item.querySelector("."+ge),n=(0,t.getValue)("name",e.curData),a=(0,t.getValue)("type",e.curData);-1!==n.indexOf(a)&&(i.innerHTML=n.substr(0,n.length-a.length))}this.renderCheckbox(e);var s={element:e.item,fileDetails:e.curData,module:"LargeIconsView"};this.parent.trigger("fileLoad",s)},e.prototype.renderCheckbox=function(e){if(this.parent.showItemCheckBoxes){var i=(0,Qa.createCheckBox)(t.createElement,!1,{checked:!1,cssClass:"e-small"});i.setAttribute("role","checkbox"),i.setAttribute("aria-checked","false"),i.setAttribute("aria-label","checkbox"),e.item.firstElementChild.insertBefore(i,e.item.firstElementChild.childNodes[0])}},e.prototype.onLayoutChange=function(e){if("LargeIcons"===this.parent.view){if(this.destroy(),this.parent.enableVirtualization&&this.parent.setProperties({selectedItems:[]},!0),this.render(e),"layout-change"===(0,t.getValue)("name",e)&&"move"===this.parent.fileAction&&this.parent.isCut&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length)for(var i=this.getIndexes(this.parent.selectedNodes),n=0;n<i.length;)sn(this.itemList[i[n]]),n++;0!==this.element.querySelectorAll("."+Ie).length&&this.element.focus(),this.checkItem(),this.parent.isLayoutChange=!1}else this.element.setAttribute("tabindex","-1")},e.prototype.checkItem=function(){var e=this.element.querySelectorAll("."+Ie);if(e)for(var t=0;t<e.length;)this.checkState(e[t],!0),t++},e.prototype.renderList=function(e){for(var i=0,n=JSON.parse(JSON.stringify(e.files));i<n.length;){var a=bn(n[i]),s=(0,t.getValue)("name",n[i]),r=Qn(this.parent,n[i]),o=this.parent.selectedItems&&-1!==this.parent.selectedItems.indexOf(r)?Ve+" e-active":Ve;if(sa(n[i])||(o+=" "+na(n[i])),a===Ae&&this.parent.showThumbnail&&aa(n[i])){var l=vn(this.parent,n[i]);(0,t.setValue)("_fm_imageUrl",l,n[i]),(0,t.setValue)("_fm_imageAttr",{alt:s},n[i])}else(0,t.setValue)("_fm_icon",a,n[i]);(0,t.setValue)("_fm_htmlAttr",{class:o,title:s},n[i]),i++}return n},e.prototype.onFinalizeEnd=function(e){this.render(e)},e.prototype.onCreateEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.clearSelect(),this.selectItems([(0,t.getValue)(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null,this.parent.largeiconsviewModule.element.focus(),this.parent.activeModule="largeiconsview")},e.prototype.onSelectedData=function(){"largeiconsview"===this.parent.activeModule&&this.updateSelectedData()},e.prototype.onDeleteInit=function(){"largeiconsview"===this.parent.activeModule&&Ia(this.parent,this.parent.selectedItems,this.parent.path,"delete")},e.prototype.onDeleteEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.parent.setProperties({selectedItems:[]},!0),this.clearSelect())},e.prototype.onRefreshEnd=function(e){"LargeIcons"===this.parent.view&&this.onLayoutChange(e)},e.prototype.onRenameInit=function(){"largeiconsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},e.prototype.onPathChanged=function(e){this.parent.isCut=!1,""===this.parent.breadcrumbbarModule.searchObj.element.value&&(this.parent.searchedItems=[]),"LargeIcons"===this.parent.view&&(rn(this.parent),this.parent.setProperties({selectedItems:[]},!0),this.onLayoutChange(e),this.parent.renamedItem&&"largeiconsview"===this.parent.activeModule&&(this.clearSelect(),this.addSelection(this.parent.renamedItem)))},e.prototype.onOpenInit=function(e){"largeiconsview"===this.parent.activeModule&&this.doOpenAction(e.target)},e.prototype.onHideLayout=function(){"LargeIcons"!==this.parent.view&&this.element&&this.element.classList.add(jt)},e.prototype.onSelectAllInit=function(){if("LargeIcons"===this.parent.view){this.startItem=this.getFirstItem();var e=this.getLastItem();this.doSelection(e,{ctrlKey:!0,shiftKey:!0}),this.isInteraction=!0,this.isInteracted=!0}},e.prototype.onClearAllInit=function(){"LargeIcons"===this.parent.view&&(this.clearSelection(),this.isInteraction=!0,this.isInteracted=!0)},e.prototype.onBeforeRequest=function(){this.isRendered=!1},e.prototype.onAfterRequest=function(){this.isRendered=!0},e.prototype.onSearch=function(e){"LargeIcons"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(ri,{}),this.parent.searchedItems=e.files,this.onLayoutChange(e))},e.prototype.onLayoutRefresh=function(){this.parent.view},e.prototype.onUpdateSelectionData=function(){"LargeIcons"===this.parent.view&&this.updateSelectedData()},e.prototype.onPathColumn=function(){"LargeIcons"!==this.parent.view||(0,t.isNullOrUndefined)(this.listObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||"filterPath"!==this.parent.sortBy||(this.parent.sortBy="name",this.parent.notify(pi,{}))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Pi,this.onPathColumn),this.parent.off(Ut,this.onFinalizeEnd),this.parent.off(Vt,this.onCreateEnd),this.parent.off(Ii,this.onSelectedData),this.parent.off(zt,this.onDeleteInit),this.parent.off(qt,this.onDeleteEnd),this.parent.off(Wt,this.onRefreshEnd),this.parent.off(Yt,this.onPathChanged),this.parent.off(di,this.onLayoutChange),this.parent.off(ni,this.onSearch),this.parent.off(ai,this.onOpenInit),this.parent.off(si,this.onPathChanged),this.parent.off(At,this.onPropertyChanged),this.parent.off(Vi,this.onMethodCall),this.parent.off(ii,this.onActionFailure),this.parent.off(gi,this.onRenameInit),this.parent.off(bi,this.onPathChanged),this.parent.off(Ci,this.onHideLayout),this.parent.off(oi,this.onSelectAllInit),this.parent.off(li,this.onClearAllInit),this.parent.off(fi,this.onMenuItemData),this.parent.off(Qt,this.onBeforeRequest),this.parent.off(Zt,this.onAfterRequest),this.parent.off(Gt,this.splitterResizeHandler),this.parent.off(Kt,this.resizeHandler),this.parent.off(wi,this.onpasteInit),this.parent.off(Di,this.onpasteEnd),this.parent.off(Oi,this.oncutCopyInit),this.parent.off(ki,this.onDropInit),this.parent.off(ui,this.onDetailsInit),this.parent.off(ti,this.onLayoutRefresh),this.parent.off(Ti,this.onDropPath),this.parent.off(Ui,this.onUpdateSelectionData),this.parent.off(_t,this.onPathChanged))},e.prototype.addEventListener=function(){this.parent.on(Pi,this.onPathColumn,this),this.parent.on(Ut,this.onFinalizeEnd,this),this.parent.on(Vt,this.onCreateEnd,this),this.parent.on(Wt,this.onRefreshEnd,this),this.parent.on(Ii,this.onSelectedData,this),this.parent.on(Yt,this.onPathChanged,this),this.parent.on(zt,this.onDeleteInit,this),this.parent.on(wi,this.onpasteInit,this),this.parent.on(qt,this.onDeleteEnd,this),this.parent.on(di,this.onLayoutChange,this),this.parent.on(ni,this.onSearch,this),this.parent.on(ai,this.onOpenInit,this),this.parent.on(gi,this.onRenameInit,this),this.parent.on(bi,this.onPathChanged,this),this.parent.on(si,this.onPathChanged,this),this.parent.on(At,this.onPropertyChanged,this),this.parent.on(Vi,this.onMethodCall,this),this.parent.on(ii,this.onActionFailure,this),this.parent.on(Ci,this.onHideLayout,this),this.parent.on(oi,this.onSelectAllInit,this),this.parent.on(li,this.onClearAllInit,this),this.parent.on(fi,this.onMenuItemData,this),this.parent.on(Qt,this.onBeforeRequest,this),this.parent.on(Zt,this.onAfterRequest,this),this.parent.on(ki,this.onDropInit,this),this.parent.on(ui,this.onDetailsInit,this),this.parent.on(Gt,this.splitterResizeHandler,this),this.parent.on(Kt,this.resizeHandler,this),this.parent.on(Di,this.onpasteEnd,this),this.parent.on(Oi,this.oncutCopyInit,this),this.parent.on(ti,this.onLayoutRefresh,this),this.parent.on(Ti,this.onDropPath,this),this.parent.on(Ui,this.onUpdateSelectionData,this),this.parent.on(_t,this.onPathChanged,this)},e.prototype.onActionFailure=function(){this.isInteraction=!0,this.isInteracted=!0},e.prototype.onMenuItemData=function(e){if(this.parent.activeModule===this.getModuleName()){var i=(0,t.closest)(e.target,"li");this.parent.itemData=[this.getItemObject(i)]}},e.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.updateSelectedData():this.parent.itemData=[(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},e.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""===this.parent.folderPath?[fn(this.parent)]:[this.getItemObject((0,t.select)(".e-active",this.element))])},e.prototype.oncutCopyInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.element.querySelectorAll("."+Ie);this.parent.activeRecords=[],this.parent.activeElements=[];for(var t=0;t<e.length;t++)this.parent.activeElements.push(e[t]),this.parent.activeRecords.push(this.getItemObject(e[t]))}},e.prototype.onpasteEnd=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,(this.parent.path===this.parent.destinationPath||this.parent.path===Fn(this.parent,e)||this.parent.hasId)&&this.onPathChanged(e))},e.prototype.onDropPath=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},e.prototype.onPropertyChanged=function(e){var i;if(e.module===this.getModuleName()||"common"===e.module)for(var n=0,a=Object.keys(e.newProp);n<a.length;n++){switch(a[n]){case"allowDragAndDrop":this.createDragObj();break;case"selectedItems":this.isInteraction=!1,this.isInteracted=!1,i=(0,t.isNullOrUndefined)(this.parent.selectedItems)?[]:this.parent.selectedItems.slice(0),i=this.parent.allowMultiSelection?i:i.slice(i.length-1),this.parent.setProperties({selectedItems:[]},!0),this.onClearAllInit(),i.length&&this.selectItems(i),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),this.isInteraction=!0,this.isInteracted=!0;break;case"showThumbnail":cn(this.parent);break;case"showFileExtension":case"showHiddenItems":ga(this.parent,Yt,this.parent.path);break;case"allowMultiSelection":case"showItemCheckBoxes":if("LargeIcons"!==this.parent.view)break;cn(this.parent);break;case"view":dn(this.parent,"LargeIcons")}}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.listObj&&this.unWireEvents(),this.startItem=null,this.listElements=null)},e.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new t.KeyboardEvents(this.element,{keyAction:this.keydownActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),t.EventHandler.add(this.element,"mouseover",this.onMouseOver,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),t.EventHandler.remove(this.element,"mouseover",this.onMouseOver),this.keyboardModule.destroy(),this.keyboardDownModule.destroy()},e.prototype.onMouseOver=function(e){var i=(0,t.closest)(e.target,".e-list-item");rn(this.parent,"hover"),null!==i&&i.classList.add(Oe)},e.prototype.wireClickEvent=function(e){var i=this;e?this.clickObj=new t.Touch(this.element,{tap:function(e){i.parent.isDevice?(i.tapCount=e.tapCount,i.tapEvent=e,setTimeout((function(){i.tapCount>0&&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&&(0,t.addClass)([i.parent.element],oe),i.clickHandler(e))}}):this.clickObj&&this.clickObj.destroy()},e.prototype.doTapAction=function(e){var i=e.originalEvent.target,n=(0,t.closest)(i,"."+fe);this.multiSelect||i.classList.contains(me)||(0,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;rn(this.parent,"hover"),this.doSelection(t,e.originalEvent),this.parent.activeModule="largeiconsview"},e.prototype.doSelection=function(e,i){var n=this.parent.isMac?i.metaKey:i.ctrlKey,a=this.parent.isMac&&i.ctrlKey&&i.shiftKey,s=(0,t.closest)(e,"."+fe),r=e.classList;this.parent.isFile=!1;var o="select";if((3===i.which||a)&&!(0,t.isNullOrUndefined)(s)&&s.classList.contains(Ie))return this.addActive(s),void this.updateType(s);if((0,t.isNullOrUndefined)(s))this.parent.selectedItems.length===this.itemList.length&&(this.isSelectAllCalled=!0),this.clearSelection();else if(this.parent.allowMultiSelection&&s.classList.contains(Ie)&&(n||e.classList.contains(Se))&&(o="unselect"),n&&i.shiftKey&&!a&&(this.isSelectAllCalled=!0),!0!==this.triggerSelection(o,s).cancel){if(this.parent.allowMultiSelection&&(this.multiSelect||!i||n)||r.contains(Ce)||(this.updateType(s),this.clearSelect()),this.parent.allowMultiSelection&&i.shiftKey&&!a){i&&n||this.clearSelect(),this.startItem||(this.startItem=s);var l=this.itemList.indexOf(this.startItem),h=this.itemList.indexOf(s);if(l>h)for(var d=l;d>=h;d--)this.addActive(this.itemList[d]);else for(d=l;d<=h;d++)this.addActive(this.itemList[d]);this.addFocus(this.itemList[h])}else this.startItem=s,this.parent.allowMultiSelection&&s.classList.contains(Ie)?this.removeActive(s):this.addActive(s),this.addFocus(s);0===this.parent.selectedItems.length&&this.resetMultiSelect(),this.parent.notify(ri,{}),this.triggerSelect(o,s)}(0,t.isNullOrUndefined)(s)||(this.isSelectAllCalled=!1,this.updateType(s))},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(ri,{})},e.prototype.resetMultiSelect=function(){this.multiSelect=!1,(0,t.removeClass)([this.parent.element],oe)},e.prototype.doOpenAction=function(e){var i=this;if(!(0,t.isNullOrUndefined)(e)){var n=(0,t.closest)(e,"."+fe);if(this.parent.isFile=!1,!(0,t.isNullOrUndefined)(n)){this.updateType(n);var a=this.getItemObject(n);if(!aa(a))return void ia(this.parent,a,_i);var s={cancel:!1,fileDetails:a,module:"LargeIconsView"};this.parent.trigger("fileOpen",s,(function(e){if(!e.cancel){var n=(0,t.getValue)("name",a);if(i.parent.isFile){if(bn(a)===Ae){var s=vn(i.parent,a);vs(i.parent,n,s)}}else{if(""!==i.parent.breadcrumbbarModule.searchObj.element.value||i.parent.isFiltered)Mn(i.parent,a);else{var r=(0,t.getValue)("id",a);i.parent.oldPath=i.parent.path;var o=i.parent.path+((0,t.isNullOrUndefined)(r)?n:r)+"/";i.parent.setProperties({path:o},!0),i.parent.pathNames.push(n),i.parent.pathId.push((0,t.getValue)("_fm_id",a)),i.parent.itemData=[a],un(i.parent)}i.parent.isFiltered=!1,i.parent.setProperties({selectedItems:[]},!0)}}}))}}},e.prototype.updateType=function(e){var i=(0,t.select)("."+Te,e);this.parent.isFile=!!(0,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){var i=this;if(this.isRendered){var n=this.getFocusedItem(),a=this.getFirstItem(),s=this.getLastItem();switch(e.action){case"end":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTo(0,this.element.firstElementChild.scrollHeight),setTimeout((function(){i.navigateItem(i.itemList[i.itemList.length-1])}),10)):this.navigateItem(s);break;case"home":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTop=0,setTimeout((function(){i.navigateItem(i.itemList[0])}),10)):this.navigateItem(a);break;case"tab":(0,t.isNullOrUndefined)(n)?(0,t.isNullOrUndefined)(a)||this.addFocus(a):this.addFocus(n);break;case"moveDown":this.navigateDown(n,!0);break;case"moveLeft":this.navigateRight(n,!1);break;case"moveRight":this.navigateRight(n,!0);break;case"moveUp":this.navigateDown(n,!1);break;case"ctrlEnd":case"shiftEnd":case"csEnd":this.csEndKey(s,e);break;case"ctrlHome":case"shiftHome":case"csHome":this.csHomeKey(a,e);break;case"ctrlDown":case"shiftDown":case"csDown":this.csDownKey(n,e);break;case"ctrlLeft":case"shiftLeft":case"csLeft":this.csLeftKey(n,e);break;case"ctrlRight":case"shiftRight":case"csRight":this.csRightKey(n,e);break;case"ctrlUp":case"shiftUp":case"csUp":this.csUpKey(n,e);break;case"space":this.spaceKey(n);break;case"ctrlSpace":case"shiftSpace":case"csSpace":(0,t.isNullOrUndefined)(n)||this.doSelection(n,e);break;case"ctrlA":this.ctrlAKey(a,s);break;case"enter":this.doOpenAction(this.parent.visitedItem?this.parent.visitedItem:this.getVisitedItem());break;case"altEnter":this.parent.notify(ui,{}),Oa(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":nn(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"ctrlC":gn(this.parent);break;case"ctrlV":this.parent.folderPath="",kn(this.parent);break;case"ctrlX":mn(this.parent);break;case"f2":this.performRename();break;case"ctrlD":this.doDownload();break;case"back":this.parent.traverseBackward()}}},e.prototype.doDownload=function(){this.updateSelectedData(),Zn(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<e.length;t++)if(!sa(e[t]))return void ia(this.parent,e[t],Hi);Xa(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),$n(this.parent))},e.prototype.updateRenameData=function(){var e=(0,t.select)("."+fe+"."+Ie,this.element),i=this.getItemObject(e);Xn(this.parent,i)},e.prototype.getVisitedItem=function(){var e=this.parent.selectedItems[this.parent.selectedItems.length-1],t=this.getIndexes([e],this.parent.hasId);return this.itemList[t[0]]},e.prototype.getFocusedItem=function(){return(0,t.select)("."+fe+"."+we,this.element)},e.prototype.getActiveItem=function(){return(0,t.select)("."+fe+"."+Ie,this.element)},e.prototype.getFirstItem=function(){return this.itemList[0]},e.prototype.getLastItem=function(){return this.itemList[this.itemList.length-1]},e.prototype.navigateItem=function(e){this.setFocus(e)},e.prototype.navigateDown=function(e,t){var i=this.getNextItem(e,t,this.perRow);this.setFocus(i)},e.prototype.navigateRight=function(e,t){var i=this.getNextItem(e,t);this.setFocus(i)},e.prototype.getNextItem=function(e,i,n){if((0,t.isNullOrUndefined)(e))return this.getFocusedItem()||this.getActiveItem()||this.getFirstItem();var a,s=this.itemList.indexOf(e);do{if(s=i?n?s+n:s+1:n?s-n:s-1,a=this.itemList[s],this.parent.enableVirtualization&&(0,t.isNullOrUndefined)(a)){var r=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-bottom"),10),o=this.itemList[0].getBoundingClientRect().height+r;this.element.firstElementChild.scrollTo(this.element.firstElementChild.scrollTop,this.element.firstElementChild.scrollTop+o)}if((0,t.isNullOrUndefined)(a))return e}while(!(0,t.isVisible)(a));return a},e.prototype.setFocus=function(e){(0,t.isNullOrUndefined)(e)||!0!==this.triggerSelection("select",e).cancel&&(this.startItem=e,this.clearSelect(),this.addActive(e),this.addFocus(e),this.parent.notify(ri,{}),this.triggerSelect("select",e))},e.prototype.spaceKey=function(e){(0,t.isNullOrUndefined)(e)||e.classList.contains(Ie)||!0!==this.triggerSelection("select",e).cancel&&(this.addActive(e),this.parent.notify(ri,{}),this.triggerSelect("select",e))},e.prototype.ctrlAKey=function(e,i){if(this.parent.allowMultiSelection&&!(0,t.isNullOrUndefined)(e)){this.startItem=e;var n=this.element.querySelector("."+me),a=n.scrollTop,s=this.getFocusedItem();this.doSelection(i,{ctrlKey:!0,shiftKey:!0}),n.scrollTop=a,(0,t.isNullOrUndefined)(s)||this.addFocus(s)}},e.prototype.csEndKey=function(e,i){this.parent.allowMultiSelection?(0,t.isNullOrUndefined)(e)||("ctrlEnd"===i.action?this.addFocus(e):this.doSelection(e,i)):this.navigateItem(e)},e.prototype.csHomeKey=function(e,i){this.parent.allowMultiSelection?(0,t.isNullOrUndefined)(e)||("ctrlHome"===i.action?this.addFocus(e):this.doSelection(e,i)):this.navigateItem(e)},e.prototype.csDownKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!0,this.perRow);(0,t.isNullOrUndefined)(n)||("ctrlDown"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateDown(e,!0)},e.prototype.csLeftKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!1);(0,t.isNullOrUndefined)(n)||("ctrlLeft"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateRight(e,!1)},e.prototype.csRightKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!0);(0,t.isNullOrUndefined)(n)||("ctrlRight"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateRight(e,!0)},e.prototype.csUpKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!1,this.perRow);(0,t.isNullOrUndefined)(n)||("ctrlUp"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateDown(e,!1)},e.prototype.addActive=function(e){(0,t.isNullOrUndefined)(e)||(e.classList.contains(Ie)||(this.parent.selectedItems.push(this.getDataName(e)),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),(0,t.addClass)([e],[Ie]),e.setAttribute("aria-selected","true"),this.checkState(e,!0)),this.parent.visitedItem=e)},e.prototype.removeActive=function(e){if(!(0,t.isNullOrUndefined)(e)){(0,t.removeClass)([e],[Ie]),this.parent.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),this.checkState(e,!1);var i=this.parent.selectedItems.indexOf(this.getDataName(e));i>-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 Qn(this.parent,t)},e.prototype.addFocus=function(e){this.element.setAttribute("tabindex","-1");var i=this.getFocusedItem();i&&(i.removeAttribute("tabindex"),(0,t.removeClass)([i],[we])),(0,t.addClass)([e],[we]),e.setAttribute("tabindex","0"),e.focus()},e.prototype.checkState=function(e,i){if(this.parent.showItemCheckBoxes){var n=(0,t.select)("."+Ce,e);(0,t.isNullOrUndefined)(n)||(i?n.classList.contains(Se)||((0,t.addClass)([n],Se),(0,t.closest)(n,"."+xe).setAttribute("aria-checked","true")):n.classList.contains(Se)&&((0,t.removeClass)([n],Se),(0,t.closest)(n,"."+xe).setAttribute("aria-checked","false")))}},e.prototype.clearSelect=function(){var e=Array.prototype.slice.call((0,t.selectAll)("."+Ie,this.listElements));if(0!==e.length){if(!0!==this.triggerSelection("unselect",e[0]).cancel)for(var i=0,n=e.length;i<n;i++)this.removeActive(e[i]);this.triggerSelect("unselect",e[0])}},e.prototype.resizeHandler=function(){this.getItemCount()},e.prototype.splitterResizeHandler=function(){this.getItemCount()},e.prototype.getItemCount=function(){var e=1;if(this.itemList)for(var t=0,i=this.itemList.length-1;t<i&&this.itemList[t].getBoundingClientRect().top===this.itemList[t+1].getBoundingClientRect().top;t++)e++;this.perRow=e},e.prototype.triggerSelection=function(e,t){var i=[];if(this.isSelectAllCalled)for(var n=0,a=this.itemList.length;n<a;n++)i[n]=this.getItemObject(this.itemList[n]);else i[0]=this.getItemObject(t);var s={action:e,fileDetails:i.length>1?i:i[0],isInteracted:this.isInteraction,cancel:!1,target:this.isSelectAllCalled?null:t};return this.parent.trigger("fileSelection",s),this.isInteraction=!0,s},e.prototype.triggerSelect=function(e,t){var i=[];if(this.isSelectAllCalled){for(var n=0,a=this.itemList.length;n<a;n++)i[n]=this.getItemObject(this.itemList[n]);this.isSelectAllCalled=!1}else i[0]=this.getItemObject(t);this.parent.visitedData=i.length>1?i[i.length-1]:i[0];var s={action:e,fileDetails:i.length>1?i:i[0],isInteracted:this.isInteracted};this.parent.trigger("fileSelect",s),this.isInteracted=!0},e.prototype.selectItems=function(e){for(var t=this.getIndexes(e,this.parent.hasId),i=0,n=t.length;i<n;i++){this.doSelection(this.itemList[t[i]],{ctrlKey:!0,shiftKey:!1})}},e.prototype.getIndexes=function(e,i){for(var n=[],a=i?"id":"name",s=0,r=this.items.length;s<r;s++)-1!==e.indexOf((0,t.getValue)(a,this.items[s]))&&n.push(s);return n},e.prototype.getItemObject=function(e){var t=this.itemList.indexOf(e);return this.items[t]},e.prototype.addSelection=function(e){var i=[];if(this.parent.hasId)i=new Yi.DataManager(this.items).executeLocal((new Yi.Query).where("id","equal",this.parent.renamedId,!1));else{var n=new Yi.DataManager(this.items).executeLocal((new Yi.Query).where("name","equal",(0,t.getValue)("name",e),!1));n.length>0&&(i=new Yi.DataManager(n).executeLocal((new Yi.Query).where("filterPath","equal",this.parent.filterPath,!1)))}if(i.length>0){var a=this.items.indexOf(i[0]);this.doSelection(this.itemList[a],{ctrlKey:!0,shiftKey:!1})}},e.prototype.updateSelectedData=function(){for(var e=[],i=(0,t.selectAll)("."+fe+"."+Ie,this.element),n=0;n<i.length;n++)e[n]=this.getItemObject(i[n]);this.parent.itemData=e},e.prototype.onMethodCall=function(e){if("LargeIcons"===this.parent.view)switch((0,t.getValue)("action",e)){case"deleteFiles":this.deleteFiles((0,t.getValue)("ids",e));break;case"downloadFiles":this.downloadFiles((0,t.getValue)("ids",e));break;case"openFile":this.openFile((0,t.getValue)("id",e));break;case"renameFile":this.isInteraction=!1,this.isInteracted=!1,this.renameFile((0,t.getValue)("id",e),(0,t.getValue)("newName",e));break;case"createFolder":this.isInteraction=!1,this.isInteracted=!1;break;case"clearSelection":this.isInteraction=!1,this.isInteracted=!1,this.onClearAllInit();break;case"selectAll":this.isInteraction=!1,this.isInteracted=!1,this.onSelectAllInit()}},e.prototype.getItemsIndex=function(e){var i=[],n=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),a=this.parent.hasId?"id":"name";if(this.parent.hasId||!n)for(var s=0,r=this.items.length;s<r;s++)-1!==e.indexOf((0,t.getValue)(a,this.items[s]))&&i.push(s);else for(s=0,r=this.items.length;s<r;s++){var o=(0,t.getValue)("filterPath",this.items[s])+(0,t.getValue)("name",this.items[s]);-1===e.indexOf(o)&&-1===e.indexOf((0,t.getValue)(a,this.items[s]))||i.push(s)}return i},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="largeiconsview",(0,t.isNullOrUndefined)(e))this.performDelete();else{var i=this.getItemsIndex(e);if(0!==i.length){for(var n=[],a=[],s=0;s<i.length;s++)n[s]=this.items[i[s]],a[s]=Qn(this.parent,n[s]);ea(this.parent,n,a)}}},e.prototype.downloadFiles=function(e){if((0,t.isNullOrUndefined)(e))this.doDownload();else{var i=this.getItemsIndex(e);if(0!==i.length){for(var n=[],a=[],s=0;s<i.length;s++)n[s]=this.items[i[s]],a[s]=Qn(this.parent,n[s]);ta(this.parent,n,a)}}},e.prototype.openFile=function(e){if(!(0,t.isNullOrUndefined)(e)){var i=this.getItemsIndex([e]);i.length>0&&this.doOpenAction(this.itemList[i[0]])}},e.prototype.renameFile=function(e,i){if(this.parent.activeModule="largeiconsview",(0,t.isNullOrUndefined)(e))this.performRename();else{var n=this.getItemsIndex([e]);n.length>0&&(Xn(this.parent,this.items[n[0]]),(0,t.isNullOrUndefined)(i)?$n(this.parent):sa(this.parent.itemData[0])?va(this.parent,this.parent.path,i):ia(this.parent,this.parent.itemData[0],Hi))}},e}(),Ds=c(295),Ss=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);i<n.length;i++){var a=n[i],s=e.newProp.searchSettings;if("searchSettings"===a)(0,t.isNullOrUndefined)(s.allowSearchOnTyping)||this.searchEventBind(s.allowSearchOnTyping),!this.parent.breadcrumbbarModule.searchObj.value||""===this.parent.breadcrumbbarModule.searchObj.value||!(0,t.isNullOrUndefined)(s.allowSearchOnTyping)&&(0,t.isNullOrUndefined)(s.filterType)&&(0,t.isNullOrUndefined)(s.ignoreCase)||hn(this.parent,this.parent.breadcrumbbarModule.searchObj.value,!1)}},e.prototype.render=function(){this.addEventListener()},e.prototype.onPathChange=function(){var e=this.parent.pathNames,i=this.parent.path.split("/"),n=this.parent.createElement("ul",{className:"e-addressbar-ul"}),a=null,s=e.length;if(e.length>0){for(var r="",o=0;o<s;o++){var l=null;a=this.parent.createElement("li",{className:"e-address-list-item"});for(var h=0;h<=o;h++)r=r+i[h]+"/";if(a.setAttribute("data-utext",r),0!==o){var d=(0,t.createElement)("span",{className:Ot});a.appendChild(d)}s-o!=1?(l=(0,t.createElement)("a",{className:ge}),a.setAttribute("tabindex","0")):l=(0,t.createElement)("span",{className:ge}),r="",l.innerText=e[o],a.appendChild(l),n.appendChild(a)}var p=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul");(0,t.isNullOrUndefined)(p)||((0,t.isNullOrUndefined)(this.subMenuObj)||this.subMenuObj.destroy(),(0,t.remove)(p));var c=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");c?this.parent.breadCrumbBarNavigation.appendChild(n):this.parent.breadCrumbBarNavigation.insertBefore(n,c),this.updateBreadCrumbBar(n)}},e.prototype.updateBreadCrumbBar=function(e){for(var i=e.querySelectorAll("li"),n=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul"),a=window.getComputedStyle(n,null),s=parseFloat(a.getPropertyValue("padding-right")),r=parseFloat(a.getPropertyValue("padding-left")),o=n.offsetWidth-s-r,l=this.parent.createElement("ul",{className:"e-addressbar-ul"}),h=0,d=[],p=0;p<i.length;p++){var c=i[p].clientWidth;d.push(c),h+=c}(0,t.isNullOrUndefined)(n)||(0,t.remove)(n);var u=this.parent.createElement("div");u.setAttribute("class","e-search-wrap");var f=this.parent.element.id+ee,g=(0,t.createElement)("input",{id:f,attrs:{autocomplete:"off","aria-label":jn(this.parent,"Search")}});u.appendChild(g);var m=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap .e-input");if((0,t.isNullOrUndefined)(m)){this.parent.breadCrumbBarNavigation.appendChild(u);var b=(0,t.createElement)("span",{className:"e-icons e-fe-search"});t.EventHandler.add(b,"click",this.onShowInput,this),g.parentElement.insertBefore(b,g),this.searchObj=new Ja.TextBox({value:"",showClearButton:!0,placeholder:jn(this.parent,"Search"),focus:this.onFocus.bind(this),blur:this.onBlur.bind(this)}),this.searchObj.appendTo("#"+this.parent.element.id+ee),this.searchEventBind(this.parent.searchSettings.allowSearchOnTyping);var v=this.searchObj.element.nextElementSibling;t.EventHandler.add(v,"mousedown",this.searchChangeHandler.bind(this),this),t.EventHandler.add(this.searchObj.element,"keyup",this.onKeyUp.bind(this),this)}var y=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");if(h>(o-=this.searchWrapWidth?this.searchWrapWidth:y.offsetWidth)){for(p=i.length;p--;){var I=o-d[p];if(!(I>40)){for(var O=[],w=0;w<=p;w++){var D=i[w];O.push({text:D.innerText,utext:D.getAttribute("data-utext")})}var S=this.parent.createElement("li",{className:"e-breadcrumb-menu"}),C=this.parent.createElement("button",{className:"e-breadcrumb-submenu"});S.appendChild(C),l.insertBefore(S,l.querySelector("li")),this.subMenuObj=new Ds.DropDownButton({items:O,cssClass:"e-caret-hide e-submenu",iconCss:mt,iconPosition:"Top",enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.addSubMenuAttributes.bind(this),select:this.subMenuSelectOperations.bind(this)}),this.subMenuObj.isStringTemplate=!0,this.subMenuObj.appendTo(C);break}l.insertBefore(i[p],l.querySelector("li")),o=I}this.parent.breadCrumbBarNavigation.insertBefore(l,y)}else this.parent.breadCrumbBarNavigation.insertBefore(e,y)},e.prototype.onFocus=function(){(0,t.closest)(this.searchObj.element,".e-search-wrap").classList.add("e-focus")},e.prototype.onKeyUp=function(){this.parent.notify(Pi,{args:this.parent})},e.prototype.onBlur=function(){(0,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",(0,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;(0,t.isNullOrUndefined)(e.value)||(this.parent.isFiltered=!1,this.parent.searchSettings.allowSearchOnTyping?(window.clearTimeout(this.searchTimer),this.searchTimer=window.setTimeout((function(){hn(i.parent,e.value,!1)}),300)):hn(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(!(0,t.isNullOrUndefined)(n)){this.parent.isFiltered=!1;var a=this.updatePath(n);this.parent.itemData=[(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)],this.triggerFileOpen(this.parent.itemData[0]),ga(this.parent,Yt,a);var s=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify(xi,{module:"treeview",selectedNode:s})}}},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(le))(0,t.removeClass)([this.parent.element],le),this.searchWrapWidth=null;else{var e=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");this.searchWrapWidth=e.offsetWidth,(0,t.addClass)([this.parent.element],le),this.searchObj.element.focus()}},e.prototype.updatePath=function(e){var i=(0,t.closest)(e,"li").getAttribute("data-utext");this.addressBarLink=i;var n=this.addressBarLink.split("/"),a=this.parent.pathId,s=this.parent.pathNames;this.parent.pathId=[],this.parent.pathNames=[];for(var r="",o=0,l=n.length-1;o<l;o++)this.parent.pathId.push(a[o]),this.parent.pathNames.push(s[o]),r+=n[o]+"/";return this.parent.setProperties({path:r},!0),r},e.prototype.onUpdatePath=function(){this.onPathChange(),this.removeSearchValue()},e.prototype.onCreateEnd=function(){this.onPathChange()},e.prototype.onRenameEnd=function(){this.onPathChange()},e.prototype.onDeleteEnd=function(){this.onUpdatePath()},e.prototype.removeSearchValue=function(){this.parent.isFiltered=!1,!this.searchObj||""===this.searchObj.value&&""===this.searchObj.element.value||(this.searchObj.value="",this.searchObj.element.value="",this.searchObj.dataBind())},e.prototype.onResize=function(){this.onPathChange()},e.prototype.onPasteEnd=function(){this.onPathChange()},e.prototype.addEventListener=function(){this.keyboardModule=new t.KeyboardEvents(this.parent.breadCrumbBarNavigation,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.parent.on(At,this.onPropertyChanged,this),t.EventHandler.add(this.parent.breadCrumbBarNavigation,"click",this.addressPathClickHandler,this),this.parent.on(Jt,this.destroy,this),this.parent.on(Yt,this.onUpdatePath,this),this.parent.on(Ut,this.onUpdatePath,this),this.parent.on(Wt,this.onUpdatePath,this),this.parent.on(si,this.onUpdatePath,this),this.parent.on(Vt,this.onCreateEnd,this),this.parent.on(bi,this.onRenameEnd,this),this.parent.on(qt,this.onDeleteEnd,this),this.parent.on(Gt,this.onResize,this),this.parent.on(Di,this.onPasteEnd,this),this.parent.on(Kt,this.onResize,this),this.parent.on(Ei,this.onSearchTextChange,this),this.parent.on(ki,this.onDropInit,this),this.parent.on(ti,this.onResize,this),this.parent.on(Ti,this.onPathChange,this)},e.prototype.keyActionHandler=function(e){if("enter"===e.action)this.addressPathClickHandler(e)},e.prototype.removeEventListener=function(){this.keyboardModule.destroy(),this.parent.off(Yt,this.onUpdatePath),this.parent.off(Ut,this.onUpdatePath),this.parent.off(Wt,this.onUpdatePath),this.parent.off(si,this.onUpdatePath),this.parent.off(Di,this.onPasteEnd),this.parent.off(Vt,this.onCreateEnd),this.parent.off(bi,this.onRenameEnd),this.parent.off(qt,this.onDeleteEnd),this.parent.off(Gt,this.onResize),this.parent.off(Kt,this.onResize),this.parent.off(Ei,this.onSearchTextChange),this.parent.off(ki,this.onDropInit),this.parent.off(ti,this.onResize),this.parent.off(Ti,this.onPathChange)},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=e.target.closest("li");this.parent.dropPath=this.updatePath(i.children[0]),this.parent.dropData=(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent),this.triggerFileOpen(this.parent.dropData);var n=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify(xi,{module:"treeview",selectedNode:n})}},e.prototype.getModuleName=function(){return"breadcrumbbar"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),(0,t.isNullOrUndefined)(this.subMenuObj)||this.subMenuObj.destroy(),(0,t.isNullOrUndefined)(this.searchObj)||this.searchObj.destroy())},e.prototype.onSearchTextChange=function(e){this.searchObj.element.placeholder=null!=this.parent.searchSettings.placeholder?this.parent.searchSettings.placeholder:jn(this.parent,"Search")+" "+jn(this.parent,e.cwd.name.toString())},e}(),Cs=c(215),xs=function(){function e(e){this.isMenuItemClicked=!1,this.currentItems=[],this.currentElement=null,this.disabledItems=[],this.parent=e,this.render()}return e.prototype.render=function(){this.keyConfigs={downarrow:"downarrow",uparrow:"uparrown"},this.contextMenu=new Cs.ContextMenu({enableRtl:this.parent.enableRtl,locale:this.parent.locale,target:"#"+this.parent.element.id,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.onBeforeItemRender.bind(this),select:this.onSelect.bind(this),beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this),cssClass:Nn(this.parent,ae)}),this.contextMenu.isStringTemplate=!0,this.contextMenu.appendTo("#"+this.parent.element.id+K),this.addEventListener()},e.prototype.onBeforeItemRender=function(e){if(e.item.id===this.getMenuId("largeiconsview")){var i=(0,t.createElement)("span");(n=e.element).insertBefore(i,"LargeIcons"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",gt+" "+Je)}if(e.item.id===this.getMenuId("detailsview")){var n;i=(0,t.createElement)("span");(n=e.element).insertBefore(i,"Details"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",ft+" "+Je)}},e.prototype.onBeforeClose=function(e){var i={cancel:!1,element:e.element,event:e.event,isFocused:e.isFocused,fileDetails:[this.menuItemData],items:e.items,parentItem:e.parentItem,menuType:this.menuType};if(this.parent.trigger("menuClose",i,(function(t){t.cancel&&(e.cancel=t.cancel)})),this.menuTarget=null,!this.isMenuItemClicked&&this.parent.pathId.length>1&&"navigationpane"===this.parent.activeModule){this.parent.pathId.pop();for(var n=[],a=0,s=Object.keys(this.parent.feParent);a<s.length;a++){var r=s[a],o=(0,t.getValue)(r,this.parent.feParent);-1!==this.parent.pathNames.indexOf(o.name)&&n.push(o._fm_id)}this.parent.pathId.push(n[n.length-1]),this.parent.navigationpaneModule.treeObj.setProperties({selectedNodes:[this.parent.pathId[this.parent.pathId.length-1]]})}this.isMenuItemClicked=!1},e.prototype.onBeforeOpen=function(e){var i,n,a=this,s=!1,r=!1,o=e.event.target;this.menuTarget=this.targetNodeElement=o,this.currentElement=e.element,o.classList.contains("e-spinner-pane")&&(o=this.parent.navigationpaneModule.activeNode.getElementsByClassName(Pt)[0],this.menuTarget=this.targetNodeElement=o),this.targetElement="Details"===this.parent.view?(0,t.closest)(o,"tr.e-row"):o,this.parent.enableVirtualization&&(o.classList.contains("e-virtual-bottom")||o.classList.contains("e-virtualtable"))&&(o=o.parentElement.closest("div"));var l=this.getTargetView(o);if(this.updateActiveModule(),o.classList.contains(Ge)||(0,t.closest)(o,"th")||(0,t.closest)(o,"#"+this.parent.element.id+X)||(0,t.closest)(o,"#"+this.parent.element.id+L))e.cancel=!0;else if("LargeIcons"!==this.parent.view&&this.targetElement&&this.targetElement.classList.contains("e-emptyrow"))this.setLayoutItem(o);else if((0,t.closest)(o,"."+Pe))this.setLayoutItem(o);else if(!o.classList.contains(Ye)&&!o.classList.contains(Je)&&!o.classList.contains(Qe)){if("LargeIcons"!==this.parent.view||(0,t.isNullOrUndefined)((0,t.closest)(o,"li"))||(0,t.closest)(o,"#"+this.parent.element.id+F))(0,t.isNullOrUndefined)((0,t.closest)(o,"tr.e-row"))?(0,t.closest)(o,"#"+this.parent.element.id+F)&&(i=(0,t.closest)(o,"li").getAttribute("data-uid"),(0,t.isNullOrUndefined)(i)||(this.navUid=i),r=!0):(i=this.targetElement.getAttribute("data-uid"),n=this.parent.detailsviewModule.gridObj.getRowObjectFromUID(i).data,(0,t.isNullOrUndefined)(this.targetElement.getAttribute("aria-selected"))&&this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute("aria-rowindex"),10)-1]),s=!0);else{(0,t.closest)(o,"li").classList.contains("e-active")||this.parent.largeiconsviewModule.doSelection(o,{ctrlKey:!0,shiftKey:!0}),n=this.parent.visitedData,s=!0}if(s)!0===(0,t.getValue)("isFile",n)?this.setFileItem():this.setFolderItem(!1);else if(r)if(this.setFolderItem(!0),i===this.parent.pathId[0])this.disabledItems.push("Delete","Rename","Cut","Copy");else for(var h=["Delete","Rename","Cut","Copy"],d=0;d<this.disabledItems.length;d++){var p=this.disabledItems[d];-1!==h.indexOf(p)&&(this.disabledItems.splice(d,1),d--)}else"TreeView"===l||"GridView"===l||"LargeIcon"===l?this.setLayoutItem(o):e.cancel=!0}var c=(0,t.select)("#"+this.getMenuId("Paste"),this.contextMenu.element);if(e.cancel||this.parent.enablePaste||!c||c.classList.contains("e-disabled")){var u=this.disabledItems.indexOf("Paste");-1!==u&&this.disabledItems.splice(u,1)}else-1===this.disabledItems.indexOf("Paste")&&this.disabledItems.push("Paste");if(e.cancel)this.menuTarget=this.currentElement=null;else{this.contextMenu.dataBind();var f=!1;(o.classList.contains(Ye)||o.classList.contains(Je)||o.classList.contains(Qe))&&(f=!0),this.menuItemData=f?this.menuItemData:this.getMenuItemData();var g={fileDetails:[this.menuItemData],element:e.element,target:o,items:f?e.items:this.contextMenu.items,menuModule:this.contextMenu,cancel:!1,menuType:this.menuType,isSubMenu:f};this.currentItems=g.items,this.parent.trigger("menuOpen",g,(function(t){f||(a.contextMenu.dataBind(),a.contextMenu.items=t.items,a.contextMenu.dataBind()),a.enableItems(a.disabledItems,!1,!0),e.cancel=t.cancel,t.cancel&&(a.menuTarget=a.targetNodeElement=a.currentElement=null)}))}},e.prototype.updateActiveModule=function(){this.parent.activeModule=(0,t.closest)(this.menuTarget,"#"+this.parent.element.id+F)?"navigationpane":(0,t.closest)(this.menuTarget,"#"+this.parent.element.id+U)?"detailsview":(0,t.closest)(this.menuTarget,"#"+this.parent.element.id+V)?"largeiconsview":this.parent.activeModule},e.prototype.getTargetView=function(e){return e.classList.contains(Ge)?"TreeView":e.classList.contains(Xe)?"GridView":e.classList.contains(Ze)||e.classList.contains(ce)?"LargeIcon":""},e.prototype.getItemIndex=function(e){for(var t=this.getMenuId(e),i=0;i<this.currentItems.length;i++)if(this.currentItems[i].id===t||this.currentItems[i].id===e)return i;return-1},e.prototype.disableItem=function(e){0!==e.length&&(this.disabledItems=this.disabledItems.concat(e))},e.prototype.enableItems=function(e,t,i){t&&(this.disabledItems=this.disabledItems.filter((function(t){return-1===e.indexOf(t)})));for(var n=0;n<e.length;n++){var a=this.checkValidItem(e[n]);1===a?this.contextMenu.enableItems([this.getMenuId(e[n])],t,i):2===a&&this.contextMenu.enableItems([e[n]],t,i)}},e.prototype.setFolderItem=function(e){if(this.menuType="folder",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.folder.map((function(e){return e.trim()}))),this.contextMenu.dataBind(),e){var i=(0,t.select)('[data-uid="'+this.navUid+'"]',this.parent.navigationpaneModule.treeObj.element);if((0,t.isNullOrUndefined)(i)||this.parent.pathNames[this.parent.pathNames.length-1]!==i.querySelector(".e-list-text").innerHTML||"navigationpane"!==this.parent.activeModule){var n=this.disabledItems.indexOf("Open");-1!==n&&this.disabledItems.splice(n,1)}else this.disabledItems.push("Open");if(0===this.parent.selectedItems.length)-1!==(a=this.disabledItems.indexOf("Rename"))&&this.disabledItems.splice(a,1)}else if("navigationpane"!==this.parent.activeModule){var a;if(1===this.parent.selectedItems.length)-1!==(a=this.disabledItems.indexOf("Rename"))&&this.disabledItems.splice(a,1);else this.disabledItems.push("Rename","Paste")}},e.prototype.setFileItem=function(){if(this.menuType="file",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.file.map((function(e){return e.trim()}))),this.contextMenu.dataBind(),1===this.parent.selectedItems.length){var e=this.disabledItems.indexOf("Rename");-1!==e&&this.disabledItems.splice(e,1)}else this.disabledItems.push("Rename")},e.prototype.setLayoutItem=function(e){this.menuType="layout",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.layout.map((function(e){return e.trim()}))),this.contextMenu.dataBind(),!this.parent.allowMultiSelection||"LargeIcons"===this.parent.view&&0!==(0,t.closest)(e,"#"+this.parent.element.id+V).getElementsByClassName(Pe).length||"Details"===this.parent.view&&0!==(0,t.closest)(e,"#"+this.parent.element.id+U).getElementsByClassName(Pe).length?this.disabledItems.push("SelectAll"):this.disabledItems=this.disabledItems.filter((function(e){return"SelectAll"!==e})),0===this.parent.selectedNodes.length&&-1===this.disabledItems.indexOf("Paste")&&this.disabledItems.push("Paste"),this.contextMenu.dataBind()},e.prototype.checkValidItem=function(e){if(!(0,t.isNullOrUndefined)(this.currentElement)){if(!(0,t.isNullOrUndefined)((0,t.select)("#"+this.getMenuId(e),this.currentElement)))return 1;if(!(0,t.isNullOrUndefined)((0,t.select)("#"+e,this.currentElement)))return 2}return-1},e.prototype.getMenuItemData=function(){if("layout"===this.menuType)return fn(this.parent);var e={target:this.menuTarget};return this.parent.notify(fi,e),this.parent.itemData[0]},e.prototype.onSelect=function(e){var i=this;if(!(0,t.isNullOrUndefined)(e.item)&&e.item.id){var n,a=e.item.id.substr((this.parent.element.id+"_cm_").length);"refresh"===a||"newfolder"===a||"upload"===a?(n=[fn(this.parent)],this.parent.itemData=n):(this.parent.notify(Ii,{}),n="navigationpane"===this.parent.activeModule&&"open"===a?[this.menuItemData]:this.parent.itemData);var s={cancel:!1,element:e.element,fileDetails:n,item:e.item};this.parent.trigger("menuClick",s,(function(s){var r;if(!s.cancel)switch("cut"!==a&&"copy"!==a&&(i.isMenuItemClicked=!0),a){case"cut":mn(i.parent);break;case"copy":gn(i.parent);break;case"paste":"folder"===i.menuType?"navigationpane"===i.parent.activeModule?(i.parent.navigationpaneModule.openFileOnContextMenuClick((0,t.closest)(i.targetNodeElement,"li")),i.parent.folderPath=i.parent.path):i.parent.folderPath=yn(i.parent,i.menuItemData,i.parent.path):i.parent.folderPath="",kn(i.parent);break;case"delete":for(var o=0;o<n.length;o++)if(!sa(n[o]))return void ia(i.parent,n[o],Hi);Xa(i.parent,"Delete");break;case"download":for(var l=0;l<n.length;l++)if(!la(n[l]))return void ia(i.parent,n[l],Wi);"navigationpane"===i.parent.activeModule?i.parent.notify(Mi,{}):i.parent.selectedItems.length>0&&Ga(i.parent,i.parent.path,i.parent.selectedItems);break;case"rename":sa(n[0])?(i.parent.notify(gi,{}),Xa(i.parent,"Rename")):ia(i.parent,n[0],Hi);break;case"selectall":i.parent.notify(oi,{});break;case"refresh":cn(i.parent);break;case"open":i.parent.visitedItem&&"navigationpane"!==i.parent.activeModule?i.parent.notify(ai,{target:i.parent.visitedItem}):"navigationpane"===i.parent.activeModule&&(i.parent.visitedItem&&i.parent.notify(ai,{target:i.parent.visitedItem}),i.parent.navigationpaneModule.openFileOnContextMenuClick((0,t.closest)(i.targetNodeElement,"li")));break;case"details":i.parent.notify(ui,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[],i.parent.navigationpaneModule.openFileOnContextMenuClick((0,t.closest)(i.targetNodeElement,"li"))),Oa(i.parent,r,i.parent.path,"details");break;case"newfolder":ha(i.parent);break;case"upload":da(i.parent);break;case"name":case"size":case"date":case"ascending":case"descending":case"none":Pn(i.parent,e);break;case"largeiconsview":dn(i.parent,"LargeIcons");break;case"detailsview":dn(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<i.length;t++){if("cssClass"===i[t])this.contextMenu.cssClass=Nn(this.parent,ae)}},e.prototype.addEventListener=function(){this.parent.on(Jt,this.destroy,this),this.parent.on(At,this.onPropertyChanged,this),this.keyboardModule=new t.KeyboardEvents(this.contextMenu.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},e.prototype.removeEventListener=function(){this.parent.off(Jt,this.destroy),this.parent.off(At,this.onPropertyChanged),this.keyboardModule.destroy()},e.prototype.keyActionHandler=function(e){switch(e.action){case"uparrow":case"downarrow":e.preventDefault()}},e.prototype.getModuleName=function(){return"contextmenu"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.contextMenu.destroy(),this.targetElement=null)},e.prototype.getItemData=function(e){for(var t=[],i=0;i<e.length;i++){var n=void 0,a=this.getMenuId(e[i]),s=jn(this.parent,e[i]);switch(e[i]){case"|":n={separator:!0};break;case"Open":n={id:a,text:s,iconCss:et};break;case"Upload":n={id:a,text:s,iconCss:tt};break;case"Cut":n={id:a,text:s,iconCss:it};break;case"Copy":n={id:a,text:s,iconCss:nt};break;case"Paste":n={id:a,text:s,iconCss:at};break;case"Delete":n={id:a,text:s,iconCss:st};break;case"Rename":n={id:a,text:s,iconCss:rt};break;case"NewFolder":n={id:a,text:s,iconCss:ot};break;case"Details":n={id:a,text:s,iconCss:lt};break;case"SortBy":n={id:a,text:s,iconCss:ht,items:[{id:this.getMenuId("Name"),text:jn(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?ve:null},{id:this.getMenuId("Size"),text:jn(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?ve:null},{id:this.getMenuId("Date"),text:jn(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?ve:null},{separator:!0},{id:this.getMenuId("Ascending"),text:jn(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?be:null},{id:this.getMenuId("Descending"),text:jn(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?be:null},{id:this.getMenuId("None"),text:jn(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?be:null}]};break;case"View":n={id:a,text:s,iconCss:"Details"===this.parent.view?ft:gt,items:[{id:this.getMenuId("largeiconsview"),text:jn(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?null:be},{id:this.getMenuId("detailsview"),text:jn(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?be:null}]};break;case"Refresh":n={id:a,text:s,iconCss:dt};break;case"SelectAll":n={id:a,text:s,iconCss:pt};break;case"Download":n={id:a,text:s,iconCss:ct};break;default:n={id:a,text:s}}t.push(n)}return t},e.prototype.getMenuId=function(e){return this.parent.element.id+"_cm_"+e.split(" ").join("").toLowerCase()},e}(),js={NewFolder:"New folder",Upload:"Upload",Delete:"Delete",Rename:"Rename",Download:"Download",Cut:"Cut",Copy:"Copy",Paste:"Paste",SortBy:"Sort by",Refresh:"Refresh","Item-Selection":"item selected","Items-Selection":"items selected",View:"View",Details:"Details",SelectAll:"Select all",Open:"Open","Tooltip-NewFolder":"New folder","Tooltip-Upload":"Upload","Tooltip-Delete":"Delete","Tooltip-Rename":"Rename","Tooltip-Download":"Download","Tooltip-Cut":"Cut","Tooltip-Copy":"Copy","Tooltip-Paste":"Paste","Tooltip-SortBy":"Sort by","Tooltip-Refresh":"Refresh","Tooltip-Selection":"Clear selection","Tooltip-View":"View","Tooltip-Details":"Details","Tooltip-SelectAll":"Select all",Name:"Name",Size:"Size",DateModified:"Modified",DateCreated:"Date created",Path:"Path",Modified:"Modified",Created:"Created",Location:"Location",Type:"Type",Permission:"Permission",Ascending:"Ascending",Descending:"Descending",None:"None","View-LargeIcons":"Large icons","View-Details":"Details",Search:"Search","Button-Ok":"OK","Button-Cancel":"Cancel","Button-Yes":"Yes","Button-No":"No","Button-Create":"Create","Button-Save":"Save","Header-NewFolder":"Folder","Content-NewFolder":"Enter your folder name","Header-Rename":"Rename","Content-Rename":"Enter your new name","Header-Rename-Confirmation":"Rename Confirmation","Content-Rename-Confirmation":"If you change a file name extension, the file might become unstable. Are you sure you want to change it?","Header-Delete":"Delete File","Content-Delete":"Are you sure you want to delete this file?","Header-Folder-Delete":"Delete Folder","Content-Folder-Delete":"Are you sure you want to delete this folder?","Header-Multiple-Delete":"Delete Multiple Items","Content-Multiple-Delete":"Are you sure you want to delete these {0} items?","Header-Duplicate":"File/Folder exists","Content-Duplicate":"{0} already exists. Do you want to rename and paste?","Header-Upload":"Upload Files",Error:"Error","Validation-Empty":"The file or folder name cannot be empty.","Validation-Invalid":'The file or folder name {0} contains invalid characters. Please use a different name. Valid file or folder names cannot end with a dot or space, and cannot contain any of the following characters: \\/:*?"<>|',"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"},Ns=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])},e(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)}}(),Ps=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Es=function(e){function i(i,a){var s=e.call(this,i,a)||this;return s.filterData=null,s.selectedNodes=[],s.duplicateItems=[],s.duplicateRecords=[],s.previousPath=[],s.nextPath=[],s.existingFileCount=0,s.isLayoutChange=!1,s.layoutSelectedItems=[],s.renamedId=null,s.uploadItem=[],s.deleteRecords=[],s.isFile=!1,s.isCut=!1,s.isSearchCut=!1,s.isSearchDrag=!1,s.isPasteError=!1,s.folderPath="",s.isSameAction=!1,s.isFiltered=!1,s.isSortByClicked=!1,s.enablePaste=!1,s.persistData=!1,s.retryArgs=[],s.isOpened=!1,s.isRetryOpened=!1,s.isPathDrag=!1,s.searchedItems=[],s.retryFiles=[],s.isApplySame=!1,s.dragData=[],s.dragNodes=[],s.dragPath="",s.dropPath="",s.isDragDrop=!1,s.treeExpandTimer=null,s.dragCursorPosition={left:44,top:18},s.isDropEnd=!1,s.dragCount=0,s.droppedObjects=[],s.uploadingCount=0,s.uploadedCount=0,s.isMac=!1,s.dragSelectedItems=[],s.onScrollHandler=function(){(0,t.isNullOrUndefined)(s.contextmenuModule)||(0,t.isNullOrUndefined)(s.contextmenuModule.contextMenu)||s.contextmenuModule.contextMenu.close()},n.Inject(Ss,ws,xs),s}var n;return Ns(i,e),n=i,i.prototype.getModuleName=function(){return"filemanager"},i.prototype.preRender=function(){((0,t.isNullOrUndefined)(this.element.id)||""===this.element.id)&&this.element.setAttribute("id",(0,t.getUniqueID)("filemanager")),this.ensurePath(),this.feParent=[],this.feFiles=[],(0,t.setStyleAttribute)(this.element,{width:(0,t.formatUnit)(this.width),height:(0,t.formatUnit)(this.height)}),this.isDevice=t.Browser.isDevice,this.isMobile=this.checkMobile(),this.isMobile&&this.setProperties({navigationPaneSettings:{visible:!1}},!0);var e=(0,t.closest)(this.element,".e-bigger");this.isBigger=!!e,this.activeModule="LargeIcons"===this.view?"largeiconsview":"detailsview",(0,Gi.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(),js,this.locale)},i.prototype.getPersistData=function(){return this.addOnPersist(["view","path","selectedItems"])},i.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],name:"Toolbar"}),this.navigationPaneSettings.visible&&e.push({member:"navigationpane",args:[this],name:"NavigationPane"}),this.view&&e.push({member:"detailsview",args:[this],name:"DetailsView"}),this.contextMenuSettings.visible&&!this.isDevice&&e.push({member:"contextmenu",args:[this],name:"ContextMenu"}),this.enableVirtualization&&e.push({member:"virtualization",args:[this],name:"Virtualization"}),e},i.prototype.render=function(){this.initialize();var e=(0,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.isMac=navigator.platform.toUpperCase().indexOf("MAC")>=0,this.setRtl(this.enableRtl),this.addEventListeners(),ga(this,this.path!==this.originalPath?Ft:Ut,this.path),"Details"===this.fileView&&this.largeiconsviewModule.element.classList.add(jt),this.adjustHeight(),(0,t.isNullOrUndefined)(this.navigationpaneModule))&&(this.splitterObj.collapse(this.enableRtl?1:0),(0,t.select)("."+Rt,this.element).classList.add(jt));this.wireEvents(),this.renderComplete()},i.prototype.ensurePath=function(){var e=this.path;(0,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=[]},i.prototype.initialize=function(){this.isMobile&&(0,t.addClass)([this.element],se),this.allowMultiSelection&&(0,t.addClass)([this.element],ne),this.addCssClass(null,this.cssClass),this.renderFileUpload()},i.prototype.addWrapper=function(){var e=this.createElement("div",{id:this.element.id+L});this.element.appendChild(e);var t=this.createElement("div",{id:this.element.id+T,className:he});this.element.appendChild(t);var i=this.createElement("div",{id:this.element.id+A,className:de}),n=this.createElement("div",{id:this.element.id+F});i.appendChild(n);var a=this.createElement("div",{id:this.element.id+Q,className:pe});this.breadCrumbBarNavigation=this.createElement("div",{id:this.element.id+X,className:Ct}),a.appendChild(this.breadCrumbBarNavigation);var s=this.createElement("div",{id:this.element.id+U});a.appendChild(s);var r=this.createElement("div",{id:this.element.id+V,className:ce,attrs:{role:"group"}});a.appendChild(r);var o,l=this.createElement("span",{className:kt});a.appendChild(l),this.enableRtl?(t.appendChild(a),t.appendChild(i),o=[{size:"75%",min:"270px"},{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()}]):(t.appendChild(i),t.appendChild(a),o=[{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()},{size:"75%",min:"270px"}]),this.splitterObj=new Ki.Splitter({paneSettings:o,width:"100%",enableRtl:!1,enableHtmlSanitizer:this.enableHtmlSanitizer,resizing:this.splitterResize.bind(this)}),this.splitterObj.isStringTemplate=!0,this.splitterObj.appendTo(t);var h=this.createElement("div",{id:this.element.id+_});this.element.appendChild(h);var d=this.createElement("ul",{id:this.element.id+K});this.element.appendChild(d);var p=this.createElement("div",{id:this.element.id+B});this.element.appendChild(p);var c=this.createElement("div",{id:this.element.id+z});this.element.appendChild(c);var u=this.createElement("div",{id:this.element.id+q});this.element.appendChild(u)},i.prototype.adjustHeight=function(){var e=(0,t.select)("#"+this.element.id+L,this.element),i=e?e.offsetHeight:0;this.splitterObj&&(this.splitterObj.height=(this.element.clientHeight-i).toString(),this.splitterObj.dataBind())},i.prototype.splitterResize=function(){this.notify(Gt,{})},i.prototype.splitterAdjust=function(){var e=(0,t.select)("."+Rt,this.element);this.navigationPaneSettings.visible?(this.splitterObj.expand(this.enableRtl?1:0),e.classList.remove(jt)):(this.splitterObj.collapse(this.enableRtl?1:0),e.classList.add(jt))},i.prototype.addCssClass=function(e,i){(0,t.isNullOrUndefined)(e)||""===e||(0,t.removeClass)([this.element],e.split(" ")),(0,t.isNullOrUndefined)(i)||""===i||(0,t.addClass)([this.element],i.split(" "))},i.prototype.showSpinner=function(){(0,Gi.showSpinner)(this.element)},i.prototype.hideSpinner=function(){(0,Gi.hideSpinner)(this.element)},i.prototype.onContextMenu=function(e){e.preventDefault()},i.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())},i.prototype.renderFileUpload=function(){var e=this.element.id+$,t=this.createElement("input",{id:e,attrs:{name:"uploadFiles",type:"file"}});this.element.appendChild(t),this.uploadDialogObj=new Gi.Dialog({header:jn(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:Nn(this,this.isMobile?re:ae),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+q),this.renderUploadBox()},i.prototype.renderUploadBox=function(){var e=this.ajaxSettings.uploadUrl?this.ajaxSettings.uploadUrl:this.ajaxSettings.url;this.uploadObj=new Ja.Uploader({dropArea:(0,t.select)("#"+this.element.id+Q,this.element),asyncSettings:{saveUrl:e,removeUrl:e,chunkSize:this.uploadSettings.chunkSize,retryCount:0},locale:this.locale,enableRtl:this.enableRtl,uploading:this.onUploading.bind(this),chunkUploading:this.onChunkUploading.bind(this),removing:this.onRemoving.bind(this),canceling:this.onCancel.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,directoryUpload:this.uploadSettings.directoryUpload,fileListRendering:this.onFileListRender.bind(this)}),this.uploadObj.appendTo("#"+this.element.id+$)},i.prototype.onFileListRender=function(e){this.trigger("uploadListCreate",e)},i.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.directoryUpload=this.uploadSettings.directoryUpload,this.uploadObj.dataBind()},i.prototype.onBeforeOpen=function(e){var t={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupOpen",t,(function(t){e.cancel=t.cancel}))},i.prototype.onBeforeClose=function(e){var t={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupClose",t,(function(t){e.cancel=t.cancel}))},i.prototype.onOpen=function(){this.isOpened=!0,this.uploadDialogObj.element.focus();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};this.trigger("popupOpen",e)},i.prototype.onClose=function(){this.isOpened=!1,this.uploadObj.clearAll();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};this.trigger("popupClose",e)},i.prototype.onChunkUploading=function(e){var i="save";if(0!==this.retryArgs.length)for(var n=0;n<this.retryArgs.length;n++)e.fileData.name===this.retryArgs[n].file.name&&(i=this.retryArgs[n].action);var a=JSON.stringify((0,t.getValue)(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{size:e.fileData.size},{action:i},{data:a},{filename:e.fileData.name}]},i.prototype.onUploading=function(e){var i="save";if(0!==this.retryArgs.length)for(var n=0;n<this.retryArgs.length;n++)e.fileData.name===this.retryArgs[n].file.name&&(i=this.retryArgs[n].action,0===this.uploadSettings.chunkSize&&(this.retryArgs.splice(n,1),n=this.retryArgs.length));var a=JSON.stringify((0,t.getValue)(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{size:e.fileData.size},{action:i},{data:a},{filename:e.fileData.name}];var s={url:this.ajaxSettings.uploadUrl?this.ajaxSettings.uploadUrl:this.ajaxSettings.url,type:"POST",mode:!0,dataType:null,contentType:null,data:JSON.stringify(e.customFormData),onSuccess:null,onFailure:null,beforeSend:null};this.uploadEventArgs={action:"Upload",ajaxSettings:s,cancel:!1},this.trigger("beforeSend",this.uploadEventArgs,(function(i){e.customFormData=JSON.parse((0,t.getValue)("data",i.ajaxSettings)),e.cancel=i.cancel;var n={cancel:!1,httpRequest:e.currentRequest};"function"==typeof(0,t.getValue)("beforeSend",i.ajaxSettings)&&((0,t.getValue)("beforeSend",i.ajaxSettings)(n),(0,t.getValue)("cancel",n)&&(e.cancel=(0,t.getValue)("cancel",n)))}))},i.prototype.onRemoving=function(){this.onFileUploadSuccess({count:1}),1===this.uploadObj.getFilesData().length&&this.uploadDialogObj.hide()},i.prototype.onCancel=function(e){var i=JSON.stringify((0,t.getValue)(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{action:"remove"},{data:i}]},i.prototype.onClearing=function(){this.isOpened&&this.uploadDialogObj.hide()},i.prototype.onSelected=function(e){if(0!==e.filesData.length){this.uploadingCount=e.filesData.length,this.uploadedCount=0;var t=fn(this);if(!oa(t))return e.cancel=!0,void ia(this,t,qi);this.uploadDialogObj.show()}},i.prototype.onFileUploadSuccess=function(e){this.uploadedCount=this.uploadedCount+e.count,this.uploadSettings.autoClose&&this.uploadingCount===this.uploadedCount&&this.uploadDialogObj.hide()},i.prototype.onChunkUploadComplete=function(e){if(0!==this.retryArgs.length)for(var i=0;i<this.retryArgs.length;i++){((0,t.isNullOrUndefined)(e)?"":(0,t.getValue)("file",e).name)===this.retryArgs[i].file.name&&(this.retryArgs.splice(i,1),i=this.retryArgs.length)}},i.prototype.onUploadSuccess=function(e){this.uploadSettings.chunkSize>0&&this.onChunkUploadComplete(e);var i={action:"Upload",result:e};this.trigger("success",i),this.itemData=[(0,t.getValue)(this.pathId[this.pathId.length-1],this.feParent)],ga(this,Yt,this.path),this.onFileUploadSuccess({count:1}),"function"==typeof(0,t.getValue)("onSuccess",this.uploadEventArgs.ajaxSettings)&&(0,t.getValue)("onSuccess",this.uploadEventArgs.ajaxSettings)()},i.prototype.onUploadFailure=function(e){this.uploadSettings.chunkSize>0&&this.onChunkUploadComplete(e);var i=(0,t.getValue)("response",e),n=(0,t.getValue)("statusText",i);""!==n&&(0,t.setValue)("statusText",n,e);var a={action:"Upload",error:e};this.trigger("failure",a),400===(0,t.getValue)("statusCode",i)&&(this.retryFiles.push((0,t.getValue)("file",e)),this.isRetryOpened||$a(this,"UploadRetry")),"function"==typeof(0,t.getValue)("onFailure",this.uploadEventArgs.ajaxSettings)&&(0,t.getValue)("onFailure",this.uploadEventArgs.ajaxSettings)()},i.prototype.onInitialEnd=function(){Rn(this,this.path)},i.prototype.addEventListeners=function(){this.on(Qt,this.showSpinner,this),this.on(Zt,this.hideSpinner,this),this.on(Ft,this.onInitialEnd,this),this.on(ui,this.onDetailsInit,this),this.on($t,this.onFileUploadSuccess,this),t.EventHandler.add(this.element,"contextmenu",this.onContextMenu,this)},i.prototype.removeEventListeners=function(){this.isDestroyed||(this.off(Qt,this.showSpinner),this.off(Zt,this.hideSpinner),this.off(Ft,this.onInitialEnd),this.off(ui,this.onDetailsInit),this.off($t,this.onFileUploadSuccess),t.EventHandler.remove(this.element,"contextmenu",this.onContextMenu))},i.prototype.onDetailsInit=function(){(0,t.isNullOrUndefined)(this.activeModule)&&(this.itemData=[(0,t.getValue)(this.pathId[this.pathId.length-1],this.feParent)])},i.prototype.resizeHandler=function(){this.adjustHeight(),this.notify(Kt,{})},i.prototype.keyActionHandler=function(e){switch(e.action){case"altN":e.preventDefault(),this.itemData=[fn(this)],ra(this.itemData[0])?Xa(this,"NewFolder"):ia(this,this.itemData[0],Bi);break;case"f5":e.preventDefault(),cn(this);break;case"ctrlShift1":e.preventDefault(),this.fileView="Details",this.setProperties({view:"Details"},!0),(0,Gi.showSpinner)(this.element),dn(this,"Details");break;case"ctrlShift2":e.preventDefault(),this.fileView="LargeIcons",this.setProperties({view:"LargeIcons"},!0),(0,Gi.showSpinner)(this.element),dn(this,"LargeIcons");break;case"ctrlU":e.preventDefault(),-1!==this.toolbarSettings.items.indexOf("Upload")&&(0,t.select)("#"+this.element.id+$,this.element).click()}},i.prototype.wireSelectOnDragEvent=function(e){(0,t.isNullOrUndefined)(this.view)||(e&&(this.viewElem="LargeIcons"===this.view?this.largeiconsviewModule.element:this.element.querySelector(".e-gridcontent")),this.viewElem&&(e?this.allowMultiSelection&&(t.EventHandler.add(this.viewElem,"mousedown",this.onDragStart,this),this.on(di,this.onLayoutChange,this),this.on(ri,this.onLayoutChange,this)):(t.EventHandler.remove(this.viewElem,"mousedown",this.onDragStart),this.off(di,this.onLayoutChange),this.off(ri,this.onLayoutChange))))},i.prototype.wireEvents=function(){this.enableRangeSelection&&this.wireSelectOnDragEvent(!0),t.EventHandler.add(window,"resize",this.resizeHandler,this),this.contextMenuSettings.visible&&this.element.addEventListener("scroll",this.onScrollHandler,!0),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},i.prototype.unWireEvents=function(){this.wireSelectOnDragEvent(!1),t.EventHandler.remove(window,"resize",this.resizeHandler),this.contextMenuSettings.visible&&this.element.removeEventListener("scroll",this.onScrollHandler,!0),this.keyboardModule.destroy()},i.prototype.onDragStart=function(e){if(this.viewElem){if(this.allowDragAndDrop)if((0,t.closest)(e.target,this.viewElem.classList.contains("e-large-icons")?".e-list-item":".e-fe-text"))return;e.preventDefault(),this.dragX=e.pageX,this.dragY=e.pageY,this.dragSelectElement||(this.dragSelectElement=(0,t.createElement)("div",{id:this.element.id+"_drag",className:"e-filemanager e-drag-select",styles:"left: "+this.dragX+"px;top: "+this.dragY+"px;"}),document.body.append(this.dragSelectElement)),t.EventHandler.add(document,"mouseup",this.onDragStop,this),t.EventHandler.add(this.viewElem,"mousemove",this.onDrag,this),t.EventHandler.add(this.dragSelectElement,"mousemove",this.onDrag,this)}},i.prototype.onDrag=function(e){if(e.stopPropagation(),this.dragSelectElement){var i=e.pageX-this.dragX,n=e.pageY-this.dragY;(0,t.setStyleAttribute)(this.dragSelectElement,{left:i<0?this.dragX+i+"px":this.dragX+"px",top:n<0?this.dragY+n+"px":this.dragY+"px",height:Math.abs(n)+"px",width:Math.abs(i)+"px"}),this.selectItems()}else t.EventHandler.remove(this.viewElem,"mousemove",this.onDrag)},i.prototype.onDragStop=function(){this.viewElem&&(t.EventHandler.remove(document,"mouseup",this.onDragStop),t.EventHandler.remove(this.viewElem,"mousemove",this.onDrag)),this.dragSelectElement&&(t.EventHandler.remove(this.dragSelectElement,"mousemove",this.onDrag),this.dragSelectElement.clientHeight>0&&this.dragSelectElement.clientWidth>0&&this.setProperties({selectedItems:this.dragSelectedItems}),this.dragSelectedItems=[],(0,t.detach)(this.dragSelectElement),this.dragSelectElement=null)},i.prototype.selectItems=function(){var e=this.dragSelectElement.getBoundingClientRect();e.height>0&&e.width>0&&(this.dragSelectedItems=[],(0,t.removeClass)((0,t.selectAll)(".e-active",this.viewElem),["e-active","e-focus"]),(0,t.removeClass)((0,t.selectAll)(".e-check",this.viewElem),["e-check"]));for(var i=0,n=(0,t.selectAll)(this.viewElem.classList.contains("e-large-icons")?".e-list-item":".e-row",this.viewElem);i<n.length;i++){var a=n[i],s=a.getBoundingClientRect();!(e.right<s.left||e.left>s.right||e.bottom<s.top||e.top>s.bottom)&&e.height>0&&e.width>0&&(this.viewElem.classList.contains("e-large-icons")?(a.classList.add("e-active"),this.dragSelectedItems.push(a.getAttribute("title"))):((0,t.addClass)((0,t.selectAll)(".e-rowcell",a),["e-active"]),this.dragSelectedItems.push(a.querySelector(".e-drag-text").textContent)),a.querySelector(".e-frame").classList.add("e-check"))}},i.prototype.onLayoutChange=function(){this.enableRangeSelection&&(this.unWireEvents(),this.wireEvents())},i.prototype.setPath=function(){this.setProperties({selectedItems:[]},!0),this.ensurePath(),this.notify(hi,{selectedNode:this.pathId[0]}),ga(this,this.path!==this.originalPath?Ft:Ut,this.path)},i.prototype.onPropertyChanged=function(e,i){for(var n,a=this,s=!1,r=0,o=Object.keys(e);r<o.length;r++){switch(o[r]){case"ajaxSettings":this.ajaxSettingSetModel(e);break;case"allowDragAndDrop":this.allowDragAndDrop=e.allowDragAndDrop,this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"showItemCheckBoxes":this.showItemCheckBoxes=e.showItemCheckBoxes,this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"enableVirtualization":this.enableVirtualization=e.enableVirtualization,s=!0;break;case"allowMultiSelection":this.allowMultiSelection?(0,t.addClass)([this.element],ne):(this.selectedItems.length>1&&this.setProperties({selectedItems:this.selectedItems.slice(this.selectedItems.length-1)},!0),(0,t.removeClass)([this.element],ne)),this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"cssClass":this.addCssClass(i.cssClass,e.cssClass),this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"detailsViewSettings":this.notify(At,{module:"detailsview",newProp:e,oldProp:i});break;case"enableRangeSelection":this.wireSelectOnDragEvent(!1),e.enableRangeSelection&&this.wireSelectOnDragEvent(!0);break;case"enableRtl":this.enableRtl=e.enableRtl,s=!0;break;case"rootAliasName":this.rootAliasName=e.rootAliasName,s=!0;break;case"height":n=(0,t.isNullOrUndefined)(e.height)?e.height:(0,t.formatUnit)(e.height),(0,t.setStyleAttribute)(this.element,{height:n}),this.adjustHeight(),this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"locale":(0,t.isNullOrUndefined)(e.enableRtl)||this.setProperties({enableRtl:e.enableRtl},!0),this.localeSetModelOption(e);break;case"navigationPaneSettings":this.splitterAdjust(),this.notify(At,{module:"navigationpane",newProp:e,oldProp:i});break;case"path":this.setPath();break;case"searchSettings":(0,t.isNullOrUndefined)(e.searchSettings.allowSearchOnTyping)||this.setProperties({searchSettings:{allowSearchOnTyping:e.searchSettings.allowSearchOnTyping}},!0),(0,t.isNullOrUndefined)(e.searchSettings.ignoreCase)&&this.setProperties({searchSettings:{ignoreCase:e.searchSettings.ignoreCase}},!0),(0,t.isNullOrUndefined)(e.searchSettings.filterType)&&this.setProperties({searchSettings:{filterType:e.searchSettings.filterType}},!0),this.notify(At,{module:"breadcrumbbar",newProp:e,oldProp:i});break;case"selectedItems":"Details"===this.view?this.notify(At,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===this.view&&this.notify(At,{module:"largeiconsview",newProp:e,oldProp:i});break;case"showFileExtension":case"showHiddenItems":this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"showThumbnail":this.notify(At,{module:"largeiconsview",newProp:e,oldProp:i});break;case"toolbarSettings":case"toolbarItems":this.adjustHeight(),this.notify(At,{module:"toolbar",newProp:e,oldProp:i});break;case"uploadSettings":this.updateUploader();break;case"view":"Details"===e.view?this.notify(At,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===e.view&&this.notify(At,{module:"largeiconsview",newProp:e,oldProp:i});break;case"width":(0,t.setStyleAttribute)(this.element,{width:(0,t.isNullOrUndefined)(e.width)?e.width:(0,t.formatUnit)(e.width)}),this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"sortOrder":cn(this),this.notify(pi,{});break;case"sortBy":if("Details"===this.view){var l=this.detailsViewSettings.columns;if(!(!(0,t.isNullOrUndefined)(l)&&-1!==l.findIndex((function(e){return e.field===a.sortBy}))))return;cn(this),this.notify(pi,{}),this.notify(Ni,{})}else cn(this),this.notify(pi,{});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);break;case"fileSystemData":this.fileSystemData=e.fileSystemData,s=!0}}s&&this.refresh()},i.prototype.ajaxSettingSetModel=function(i){(0,t.isNullOrUndefined)(i.ajaxSettings.url)||this.setProperties({ajaxSettings:{url:i.ajaxSettings.url}},!0),(0,t.isNullOrUndefined)(i.ajaxSettings.uploadUrl)||this.setProperties({ajaxSettings:{uploadUrl:i.ajaxSettings.uploadUrl}},!0),(0,t.isNullOrUndefined)(i.ajaxSettings.downloadUrl)||this.setProperties({ajaxSettings:{downloadUrl:i.ajaxSettings.downloadUrl}},!0),(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)},i.prototype.localeSetModelOption=function(t){this.uploadObj.locale=t.locale,e.prototype.refresh.call(this)},i.prototype.destroy=function(){this.isDestroyed||(this.refreshing||this.notify(Jt,{}),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),(0,t.removeClass)([this.element],[xt,se,ne]),this.element.innerHTML="",this.breadCrumbBarNavigation=null,this.activeElements=null,this.virtualDragElement=null,this.visitedItem=null,e.prototype.destroy.call(this),this.virtualizationModule=null,this.navigationpaneModule=null,this.toolbarModule=null,this.contextmenuModule=null,this.largeiconsviewModule=null,this.detailsviewModule=null,this.breadcrumbbarModule=null,this.viewElem=null,this.dragSelectElement=null,this.dragSelectedItems=null)},i.prototype.createFolder=function(e){this.notify(Vi,{action:"createFolder"});var t=[fn(this)];(this.itemData=t,e)?/[/\\|*?"<>:]/.test(e)?Xa(this,"Error",{files:null,error:{code:"402",message:jn(this,"Validation-Invalid").replace("{0}",'"'+e+'"'),fileExists:null}}):ra(t[0])?ma(this,e):ia(this,t[0],Bi):ha(this)},i.prototype.deleteFiles=function(e){this.notify(Vi,{action:"deleteFiles",ids:e})},i.prototype.disableToolbarItems=function(e){!(0,t.isNullOrUndefined)(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!1)},i.prototype.downloadFiles=function(e){this.notify(Vi,{action:"downloadFiles",ids:e})},i.prototype.enableToolbarItems=function(e){!(0,t.isNullOrUndefined)(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!0)},i.prototype.enableMenuItems=function(e){(0,t.isNullOrUndefined)(e)||(0,t.isNullOrUndefined)(this.contextmenuModule)||(0,t.isNullOrUndefined)(this.contextmenuModule.contextMenu)||this.contextmenuModule.enableItems(e,!0,!0)},i.prototype.disableMenuItems=function(e){(0,t.isNullOrUndefined)(e)||(0,t.isNullOrUndefined)(this.contextmenuModule)||(0,t.isNullOrUndefined)(this.contextmenuModule.contextMenu)||this.contextmenuModule.disableItem(e)},i.prototype.getMenuItemIndex=function(e){return this.contextmenuModule?this.contextmenuModule.getItemIndex(e):-1},i.prototype.getToolbarItemIndex=function(e){return this.toolbarModule?this.toolbarModule.getItemIndex(e):-1},i.prototype.filterFiles=function(e){this.filterData=e||null,this.setProperties({selectedItems:[]},!0),this.notify(ri,{}),this.isFiltered=!0,""!==this.breadcrumbbarModule.searchObj.element.value&&(this.breadcrumbbarModule.searchObj.element.value=""),ba(this,_t)},i.prototype.getSelectedFiles=function(){return this.notify(Ui,{}),this.itemData},i.prototype.openFile=function(e){this.notify(Vi,{action:"openFile",id:e})},i.prototype.refreshFiles=function(){cn(this)},i.prototype.refreshLayout=function(){this.adjustHeight(),this.notify(ti,{})},i.prototype.selectAll=function(){this.notify(Vi,{action:"selectAll"})},i.prototype.traverseBackward=function(){if(this.pathNames.length>1&&""===this.breadcrumbbarModule.searchObj.element.value&&!this.isFiltered){this.pathId.pop(),this.pathNames.pop();var e=this.pathNames.slice(1).join("/");e=""===e?"/":"/"+e+"/",this.setProperties({path:e},!0),ga(this,Yt,this.path);var t=this.pathId[this.pathId.length-1];this.notify(xi,{module:"treeview",selectedNode:t})}},i.prototype.clearSelection=function(){this.notify(Vi,{action:"clearSelection"})},i.prototype.renameFile=function(e,t){this.notify(Vi,{action:"renameFile",id:e,newName:t})},i.prototype.uploadFiles=function(){var e=[fn(this)];this.itemData=e,da(this)},i.prototype.closeDialog=function(){pa(this)},i.prototype.setRtl=function(e){e?this.addCssClass(null,xt):this.addCssClass(xt,null),this.uploadObj&&(this.uploadDialogObj.enableRtl=e,this.uploadObj.enableRtl=e)},Ps([(0,t.Complex)({},a)],i.prototype,"ajaxSettings",void 0),Ps([(0,t.Property)([])],i.prototype,"fileSystemData",void 0),Ps([(0,t.Property)(!1)],i.prototype,"allowDragAndDrop",void 0),Ps([(0,t.Property)(!0)],i.prototype,"allowMultiSelection",void 0),Ps([(0,t.Property)(!0)],i.prototype,"showItemCheckBoxes",void 0),Ps([(0,t.Complex)({},S)],i.prototype,"contextMenuSettings",void 0),Ps([(0,t.Property)("")],i.prototype,"cssClass",void 0),Ps([(0,t.Complex)({},v)],i.prototype,"detailsViewSettings",void 0),Ps([(0,t.Property)(!0)],i.prototype,"enableHtmlSanitizer",void 0),Ps([(0,t.Property)(!1)],i.prototype,"enablePersistence",void 0),Ps([(0,t.Property)(!1)],i.prototype,"enableVirtualization",void 0),Ps([(0,t.Property)("400px")],i.prototype,"height",void 0),Ps([(0,t.Property)("LargeIcons")],i.prototype,"view",void 0),Ps([(0,t.Complex)({},j)],i.prototype,"navigationPaneSettings",void 0),Ps([(0,t.Property)("/")],i.prototype,"path",void 0),Ps([(0,t.Property)(null)],i.prototype,"popupTarget",void 0),Ps([(0,t.Complex)({},f)],i.prototype,"searchSettings",void 0),Ps([(0,t.Property)()],i.prototype,"selectedItems",void 0),Ps([(0,t.Property)(!0)],i.prototype,"showFileExtension",void 0),Ps([(0,t.Property)(null)],i.prototype,"rootAliasName",void 0),Ps([(0,t.Property)(!1)],i.prototype,"showHiddenItems",void 0),Ps([(0,t.Property)(!0)],i.prototype,"showThumbnail",void 0),Ps([(0,t.Property)("Ascending")],i.prototype,"sortOrder",void 0),Ps([(0,t.Property)("name")],i.prototype,"sortBy",void 0),Ps([(0,t.Property)(null)],i.prototype,"sortComparer",void 0),Ps([(0,t.Property)(!1)],i.prototype,"enableRangeSelection",void 0),Ps([(0,t.Complex)({},l)],i.prototype,"toolbarSettings",void 0),Ps([(0,t.Collection)([],h)],i.prototype,"toolbarItems",void 0),Ps([(0,t.Complex)({},E)],i.prototype,"uploadSettings",void 0),Ps([(0,t.Property)("100%")],i.prototype,"width",void 0),Ps([(0,t.Event)()],i.prototype,"fileLoad",void 0),Ps([(0,t.Event)()],i.prototype,"fileOpen",void 0),Ps([(0,t.Event)()],i.prototype,"beforeDownload",void 0),Ps([(0,t.Event)()],i.prototype,"beforeImageLoad",void 0),Ps([(0,t.Event)()],i.prototype,"beforePopupClose",void 0),Ps([(0,t.Event)()],i.prototype,"beforePopupOpen",void 0),Ps([(0,t.Event)()],i.prototype,"beforeSend",void 0),Ps([(0,t.Event)()],i.prototype,"created",void 0),Ps([(0,t.Event)()],i.prototype,"beforeFolderCreate",void 0),Ps([(0,t.Event)()],i.prototype,"folderCreate",void 0),Ps([(0,t.Event)()],i.prototype,"destroyed",void 0),Ps([(0,t.Event)()],i.prototype,"beforeDelete",void 0),Ps([(0,t.Event)()],i.prototype,"delete",void 0),Ps([(0,t.Event)()],i.prototype,"beforeRename",void 0),Ps([(0,t.Event)()],i.prototype,"rename",void 0),Ps([(0,t.Event)()],i.prototype,"beforeMove",void 0),Ps([(0,t.Event)()],i.prototype,"move",void 0),Ps([(0,t.Event)()],i.prototype,"search",void 0),Ps([(0,t.Event)()],i.prototype,"fileDragStart",void 0),Ps([(0,t.Event)()],i.prototype,"fileDragging",void 0),Ps([(0,t.Event)()],i.prototype,"fileDragStop",void 0),Ps([(0,t.Event)()],i.prototype,"fileDropped",void 0),Ps([(0,t.Event)()],i.prototype,"fileSelection",void 0),Ps([(0,t.Event)()],i.prototype,"fileSelect",void 0),Ps([(0,t.Event)()],i.prototype,"menuClick",void 0),Ps([(0,t.Event)()],i.prototype,"menuOpen",void 0),Ps([(0,t.Event)()],i.prototype,"menuClose",void 0),Ps([(0,t.Event)()],i.prototype,"failure",void 0),Ps([(0,t.Event)()],i.prototype,"popupClose",void 0),Ps([(0,t.Event)()],i.prototype,"popupOpen",void 0),Ps([(0,t.Event)()],i.prototype,"success",void 0),Ps([(0,t.Event)()],i.prototype,"toolbarClick",void 0),Ps([(0,t.Event)()],i.prototype,"toolbarCreate",void 0),Ps([(0,t.Event)()],i.prototype,"uploadListCreate",void 0),i=n=Ps([t.NotifyPropertyChanges],i)}(t.Component),Rs=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 Cs.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.root=e.parent.root?e.parent.root:e.parent,e.toolbarObj.appendTo("#"+e.parent.element.id+L)}))},e.prototype.getItemIndex=function(e){for(var t=this.getId(e),i=0;i<this.items.length;i++)if(this.items[i].id===t)return i;return-1},e.prototype.getItems=function(e){var t=e.slice();return this.parent.isDevice&&this.parent.allowMultiSelection&&t.push("SelectAll"),this.parent.toolbarItems.length>0&&(t=this.parent.toolbarItems.map((function(e){return e.name}))),t},e.prototype.onClicked=function(e){var i=this;if(!(0,t.isNullOrUndefined)(e.item)&&e.item.id){var n,a=e.item.id.substr((this.parent.element.id+"_tb_").length);"refresh"===a||"newfolder"===a||"upload"===a?(n=[fn(this.parent)],this.parent.itemData=n):(this.parent.notify(Ii,{}),n=this.parent.itemData);var s={cancel:!1,fileDetails:n,item:e.item};this.parent.trigger("toolbarClick",s,(function(s){var r,o;if(!s.cancel)switch(a){case"sortby":(o=(0,t.closest)(e.originalEvent.target,"."+ue))&&o.classList.contains("e-toolbar-popup")&&(e.cancel=!0);break;case"newfolder":ha(i.parent);break;case"cut":mn(i.parent);break;case"copy":gn(i.parent);break;case"delete":for(var l=0;l<n.length;l++)if(!sa(n[l]))return void ia(i.parent,n[l],Hi);Xa(i.parent,"Delete");break;case"details":i.parent.notify(ui,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[]),Oa(i.parent,r,i.parent.path,"details");break;case"paste":i.parent.folderPath="",kn(i.parent);break;case"refresh":cn(i.parent);break;case"download":Zn(i.parent);break;case"rename":sa(n[0])?(i.parent.notify(gi,{}),Xa(i.parent,"Rename")):ia(i.parent,n[0],Hi);break;case"upload":da(i.parent);break;case"selectall":i.parent.notify(oi,{});break;case"selection":i.parent.notify(li,{})}}))}},e.prototype.toolbarCreateHandler=function(){var e=this;if(!(0,t.isNullOrUndefined)((0,t.select)("#"+this.getId("SortBy"),this.parent.element))){var i=[{id:this.getPupupId("name"),text:jn(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?ve:""},{id:this.getPupupId("size"),text:jn(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?ve:""},{id:this.getPupupId("date"),text:jn(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?ve:""},{separator:!0},{id:this.getPupupId("ascending"),text:jn(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?be:""},{id:this.getPupupId("descending"),text:jn(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?be:""},{id:this.getPupupId("none"),text:jn(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?be:""}];this.buttonObj=new Ds.DropDownButton({items:i,cssClass:Nn(this.parent,ae),select:Pn.bind(this,this.parent),enableHtmlSanitizer:this.parent.enableHtmlSanitizer,enableRtl:this.parent.enableRtl,iconCss:ht}),this.buttonObj.isStringTemplate=!0,this.buttonObj.appendTo("#"+this.getId("SortBy"))}if(!(0,t.isNullOrUndefined)((0,t.select)("#"+this.getId("View"),this.parent.element))){var n='<span class="'+ft+" "+Je+'"></span>',a='<span class="'+gt+" "+Je+'"></span>',s=[{id:this.getPupupId("large"),text:jn(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?"":be},{id:this.getPupupId("details"),text:jn(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?be:""}];this.layoutBtnObj=new Ds.DropDownButton({iconCss:"Details"===this.parent.view?ft:gt,cssClass:Nn(this.parent,"e-caret-hide "+ae),items:s,select:this.layoutChange.bind(this),enableRtl:this.parent.enableRtl,content:'<span class="e-tbar-btn-text">'+jn(this.parent,"View")+"</span>",beforeItemRender:function(t){var i=t.item.iconCss,s=t.item.text===jn(e.parent,"View-LargeIcons"),r=i?" e-menu-icon "+i:"";t.element.innerHTML='<span class="'+r+'"></span>'+(s?a:n)+t.item.text;var o=t.element.firstChild;o&&""===o.className&&t.element.removeChild(o)}}),this.layoutBtnObj.isStringTemplate=!0,this.layoutBtnObj.appendTo("#"+this.getId("View"))}this.hideItems(this.default,!0),this.hideStatus(),this.parent.portals&&this.toolbarObj.portals&&(this.parent.portals=this.parent.portals.concat(this.toolbarObj.portals),this.parent.renderReactTemplates());for(var r=(0,t.selectAll)(".e-btn",this.toolbarObj.element),o=function(e){r[e].onkeydown=function(e){13!==e.keyCode||e.target.classList.contains("e-fe-popup")||e.preventDefault()},r[e].onkeyup=function(t){13!==t.keyCode||t.target.classList.contains("e-fe-popup")||r[e].click()}},l=0;l<r.length;l++)o(l);this.parent.refreshLayout()},e.prototype.updateSortByButton=function(){if(this.buttonObj)for(var e=this.buttonObj.items,t=0;t<e.length;t++)e[t].id===this.getPupupId("name")?e[t].iconCss="name"===this.parent.sortBy?ve:"":e[t].id===this.getPupupId("size")?e[t].iconCss="size"===this.parent.sortBy?ve:"":e[t].id===this.getPupupId("date")?"dateModified"===this.parent.sortBy||"dateCreated"===this.parent.sortBy?e[t].iconCss=this.parent.sortBy==this.parent.sortBy?ve:"":e[t].iconCss="_fm_modified"===this.parent.sortBy?ve:"":e[t].id===this.getPupupId("ascending")?e[t].iconCss="Ascending"===this.parent.sortOrder?be:"":e[t].id===this.getPupupId("descending")?e[t].iconCss="Descending"===this.parent.sortOrder?be:"":e[t].id===this.getPupupId("none")&&(e[t].iconCss="None"===this.parent.sortOrder?be:"")},e.prototype.getPupupId=function(e){return this.parent.element.id+"_ddl_"+e.toLowerCase()},e.prototype.layoutChange=function(e){"Details"===this.parent.view?e.item.id===this.getPupupId("large")&&dn(this.parent,"LargeIcons"):e.item.id===this.getPupupId("details")&&dn(this.parent,"Details")},e.prototype.toolbarItemData=function(e){var t=[],i="Both";this.parent.isMobile&&(i="Overflow");for(var n=0;n<e.length;n++){var a=void 0,s=void 0;this.parent.toolbarItems.length>0&&(s=this.getItemModel(this.parent.toolbarItems[parseInt(n.toString(),10)]));var r=this.getId(e[n]),o=jn(this.parent,e[n]),l=jn(this.parent,"Tooltip-"+e[n]);switch(e[n]){case"|":a={type:"Separator"};break;case"Upload":a={id:r,text:o,tooltipText:l,prefixIcon:tt,showTextOn:i};break;case"SortBy":var h='<span class="e-tbar-btn-text e-tbar-ddb-text">'+o+"</span>";s&&s.text&&(h='<span class="e-tbar-btn-text e-tbar-ddb-text">'+s.text+"</span>"),a={id:r,tooltipText:l,template:'<button id="'+r+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1">'+h+"</button>"};break;case"Refresh":a={id:r,text:o,tooltipText:l,prefixIcon:dt,showTextOn:i};break;case"Selection":a={id:r,text:o,tooltipText:l,suffixIcon:bt,overflow:"Show",align:"Right"};break;case"View":var d=void 0;d=s&&s.text?s.text:jn(this.parent,"View"),a={id:r,tooltipText:l,prefixIcon:"Details"===this.parent.view?ft:gt,overflow:"Show",align:"Right",text:o,showTextOn:"Overflow",template:'<button id="'+r+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1" aria-label='+d+"></button>"};break;case"Details":a={id:r,tooltipText:l,prefixIcon:lt,overflow:"Show",align:"Right",text:o,showTextOn:"Overflow"};break;case"NewFolder":a={id:r,text:o,tooltipText:l,prefixIcon:ot,showTextOn:i};break;case"Cut":a={id:r,text:o,tooltipText:l,prefixIcon:it,showTextOn:i};break;case"Copy":a={id:r,text:o,tooltipText:l,prefixIcon:nt,showTextOn:i};break;case"Paste":a={id:r,text:o,tooltipText:l,prefixIcon:at,showTextOn:i};break;case"Delete":a={id:r,text:o,tooltipText:l,prefixIcon:st,showTextOn:i};break;case"Rename":a={id:r,text:o,tooltipText:l,prefixIcon:rt,showTextOn:i};break;case"Download":a={id:r,text:o,tooltipText:l,prefixIcon:ct,showTextOn:i};break;case"SelectAll":a={id:r,text:o,tooltipText:l,prefixIcon:pt,showTextOn:i};break;default:a={id:r,text:o,tooltipText:l,template:""}}if(this.parent.toolbarItems.length>0&&s){var p=Object.assign({},a,s);t.push(p)}else t.push(a)}return t},e.prototype.getItemModel=function(e){var t={};return e.id&&(t.id=e.id),e.text&&(t.text=e.text),e.tooltipText&&(t.tooltipText=e.tooltipText),e.prefixIcon&&(t.prefixIcon=e.prefixIcon),e.cssClass&&(t.cssClass=e.cssClass),"Both"!==e.showTextOn&&(t.showTextOn=e.showTextOn),e.template&&(t.template=e.template),e.disabled&&(t.disabled=e.disabled),"auto"!==e.width&&(t.width=e.width),e.suffixIcon&&(t.suffixIcon=e.suffixIcon),"Left"!==e.align&&(t.align=e.align),"None"!==e.overflow&&(t.overflow=e.overflow),e.htmlAttributes&&(t.htmlAttributes=e.htmlAttributes),"Button"!==e.type&&(t.type=e.type),!0!==e.visible&&(t.visible=e.visible),e.showAlwaysInPopup&&(t.showAlwaysInPopup=e.showAlwaysInPopup),-1!==e.tabIndex&&(t.tabIndex=e.tabIndex),t},e.prototype.getId=function(e){return this.parent.element.id+"_tb_"+e.toLowerCase()},e.prototype.addEventListener=function(){this.parent.on(At,this.onPropertyChanged,this),this.parent.on(ri,this.onSelectionChanged,this),this.parent.on(di,this.onLayoutChange,this),this.parent.on(vi,this.showPaste,this),this.parent.on(yi,this.hidePaste,this),this.parent.on(Jt,this.destroy,this),this.parent.on(pi,this.updateSortByButton,this)},e.prototype.reRenderToolbar=function(e){var t=this,i=[];if(this.parent.toolbarItems.length>0?i=this.parent.toolbarItems.map((function(e){return e.name})):void 0!==e.newProp.toolbarSettings.items&&(i=e.newProp.toolbarSettings.items.map((function(e){return e.trim()}))),i.length>0){this.items=this.toolbarItemData(this.getItems(i));var n={items:this.items};this.parent.trigger("toolbarCreate",n,(function(e){t.buttonObj&&t.buttonObj.destroy(),t.layoutBtnObj&&t.layoutBtnObj.destroy(),t.items=e.items,t.toolbarObj.items=t.items,t.toolbarObj.dataBind(),t.toolbarCreateHandler()}))}},e.prototype.onSelectionChanged=function(){this.hideStatus(),this.hideItems(this.single,!0),this.hideItems(this.selection,!1),1===this.parent.selectedItems.length?(this.hideItems(this.single,!1),this.hideItems(this.selection,!0)):this.parent.selectedItems.length>1&&(this.hideItems(this.multiple,!1),this.hideItems(this.selection,!0));var e=(0,t.select)("#"+this.getId("Selection"),this.toolbarObj.element);if(this.parent.selectedItems.length>0&&e&&!this.parent.enableVirtualization){var i=void 0;i=1===this.parent.selectedItems.length?this.parent.selectedItems.length+" "+jn(this.parent,"Item-Selection"):this.parent.selectedItems.length+" "+jn(this.parent,"Items-Selection"),(0,t.select)(".e-tbar-btn-text",e).textContent=i,this.toolbarObj.hideItem(e.parentElement,!1)}},e.prototype.hideItems=function(e,i){for(var n=0;n<e.length;n++){var a=(0,t.select)("#"+this.getId(e[n]),this.parent.element);a&&this.toolbarObj.hideItem(a.parentElement,i)}},e.prototype.hideStatus=function(){var e=(0,t.select)("#"+this.getId("Selection"),this.toolbarObj.element);e&&this.toolbarObj.hideItem(e.parentElement,!0)},e.prototype.showPaste=function(){this.hideItems(["Paste"],!1)},e.prototype.hidePaste=function(){this.hideItems(["Paste"],!0)},e.prototype.onLayoutChange=function(){if(this.layoutBtnObj){this.layoutBtnObj.iconCss="Details"===this.parent.view?ft:gt;for(var e=this.layoutBtnObj.items,t=0;t<e.length;t++)e[t].id===this.getPupupId("large")?e[t].iconCss="LargeIcons"===this.parent.view?be:"":e[t].id===this.getPupupId("details")&&(e[t].iconCss="Details"===this.parent.view?be:"")}},e.prototype.removeEventListener=function(){this.parent.off(At,this.onPropertyChanged),this.parent.off(ri,this.onSelectionChanged),this.parent.off(di,this.onLayoutChange),this.parent.off(vi,this.showPaste),this.parent.off(yi,this.hidePaste),this.parent.off(Jt,this.destroy),this.parent.off(pi,this.updateSortByButton)},e.prototype.getModuleName=function(){return"toolbar"},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++){switch(i[t]){case"cssClass":this.buttonObj&&(this.buttonObj.cssClass=Nn(this.parent,ae)),this.layoutBtnObj&&(this.layoutBtnObj.cssClass=Nn(this.parent,"e-caret-hide "+ae));break;case"height":case"width":this.toolbarObj.refreshOverflow();break;case"toolbarSettings":case"toolbarItems":this.reRenderToolbar(e)}}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.buttonObj&&this.buttonObj.destroy(),this.layoutBtnObj&&this.layoutBtnObj.destroy(),this.toolbarObj.destroy(),this.parent.refreshLayout())},e.prototype.enableItems=function(e,i){for(var n=0;n<e.length;n++){var a=(0,t.select)("#"+this.getId(e[n]),this.parent.element);a&&this.toolbarObj.enableItems(a.parentElement,i)}},e}(),Ms=function(){function e(e){this.filemanagerInstance=e,this.largeIconInstance=e.largeiconsviewModule}return e.prototype.setUIVirtualization=function(){var e=this.largeIconInstance.items,i=e.slice(0,1),n=Os.ListBase.createListFromJson(t.createElement,i,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call((0,t.selectAll)("."+fe,n)),this.largeIconInstance.element.appendChild(n),0!==this.itemList.length&&this.largeIconInstance.element.querySelector("."+Pe)&&this.largeIconInstance.element.removeChild(this.largeIconInstance.element.querySelector("."+Pe)),this.itemCount=this.getItemCount(Object.keys(this.largeIconInstance.allItems).length),this.largeIconInstance.element.firstChild.remove(),this.largeIconInstance.items=e.slice(0,this.itemCount)},e.prototype.setUlElementHeight=function(){this.lastRowCount=(this.largeIconInstance.allItems.length-this.itemCount)%this.rowItemCount?(this.largeIconInstance.allItems.length-this.itemCount)%this.rowItemCount:this.rowItemCount,this.topElement=this.filemanagerInstance.createElement("div"),this.topElement.classList.add("e-virtual-top"),this.largeIconInstance.element.firstElementChild.insertBefore(this.topElement,this.largeIconInstance.element.firstElementChild.firstChild),this.bottomElement=this.filemanagerInstance.createElement("div"),this.bottomElement.classList.add("e-virtual-bottom"),this.largeIconInstance.element.firstElementChild.insertBefore(this.bottomElement,null);var e=parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue("margin-bottom"),10);this.listItemHeight=this.largeIconInstance.itemList[0].getBoundingClientRect().height+e,this.totalHeight=Object.keys(this.largeIconInstance.allItems).length/this.rowItemCount*this.listItemHeight,this.topElement.style.height="0px",this.bottomElement.style.height=this.totalHeight+"px",this.topElementHeight=0,this.bottomElementHeight=this.totalHeight,this.listDiff=0,this.renderedCount=this.itemCount},e.prototype.getItemCount=function(e){var i=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-right"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-left"),10);this.rowItemCount=Math.floor(parseFloat((0,t.formatUnit)(this.largeIconInstance.element.firstElementChild.clientWidth))/(this.itemList[0].offsetWidth+i));var n=this.rowItemCount*Math.round(parseFloat((0,t.formatUnit)(this.largeIconInstance.element.clientHeight))/this.itemList[0].offsetHeight);return(n>e||0===n)&&(n=e),n},e.prototype.wireScrollEvent=function(e){e?t.EventHandler.remove(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll):t.EventHandler.add(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll,this)},e.prototype.onVirtualUiScroll=function(){var e;this.scrollPosition=(0,t.isNullOrUndefined)(this.scrollPosition)?0:this.scrollPosition;var i=this.getscrollerHeight(0);if(this.topElementHeight=this.listItemHeight*Math.floor(i/this.listItemHeight),this.bottomElementHeight=this.totalHeight-this.topElementHeight,e=i<=this.totalHeight?[this.topElementHeight,this.bottomElementHeight]:[this.totalHeight,0],this.topElementHeight=e[0],this.bottomElementHeight=e[1],this.topElementHeight!==parseFloat(this.topElement.style.height))if(this.topElement.style.height=this.topElementHeight+"px",this.bottomElement.style.height=this.bottomElementHeight+"px",i>this.scrollPosition){var n=Math.round(this.topElementHeight/this.listItemHeight-this.listDiff);this.onNormalScroll(n,!0)}else{n=Math.round(this.listDiff-this.topElementHeight/this.listItemHeight);this.onNormalScroll(n,!1)}this.listDiff=Math.round(this.topElementHeight/this.listItemHeight),this.scrollPosition=i,this.largeIconInstance.itemList=Array.prototype.slice.call((0,t.selectAll)("."+fe,this.largeIconInstance.element)),this.itemCount=this.itemCount!==this.largeIconInstance.itemList.length?this.largeIconInstance.itemList.length:this.itemCount,this.largeIconInstance.items=this.largeIconInstance.allItems.slice(this.renderedCount-this.itemCount,this.renderedCount)},e.prototype.getscrollerHeight=function(e){return this.largeIconInstance.element.firstElementChild.scrollTop-e<=0?0:this.largeIconInstance.element.firstElementChild.scrollTop-e},e.prototype.onNormalScroll=function(e,t){for(var i=0;i<e;i++)this.updateUI(t)},e.prototype.updateUI=function(e){var i=this;if(e){if(this.items=this.largeIconInstance.allItems.slice(this.renderedCount,this.renderedCount+this.rowItemCount),this.items.length>0){var n=Os.ListBase.createListFromJson(t.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call((0,t.selectAll)("."+fe,n)),this.itemList.forEach((function(e){i.largeIconInstance.element.firstElementChild.insertBefore(e,i.bottomElement)})),this.renderedCount=this.largeIconInstance.allItems.length>=this.renderedCount+this.rowItemCount?this.renderedCount+this.rowItemCount:this.renderedCount+this.lastRowCount;for(var a=0;a<this.rowItemCount;a++)(0,t.detach)(this.topElement.nextElementSibling)}}else{var s=void 0,r=void 0;this.renderedCount===this.largeIconInstance.allItems.length?(s=this.renderedCount-(this.itemCount-this.rowItemCount+this.lastRowCount),this.renderedCount=this.renderedCount-this.lastRowCount<this.itemCount?this.itemCount:this.renderedCount-this.lastRowCount,r=!0):(s=this.renderedCount-this.itemCount,this.renderedCount=this.renderedCount-this.rowItemCount<this.itemCount?this.itemCount:this.renderedCount-this.rowItemCount);var o=s-this.rowItemCount>0?s-this.rowItemCount:0;if(this.items=this.largeIconInstance.allItems.slice(o,s),this.items.length>0){n=Os.ListBase.createListFromJson(t.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call((0,t.selectAll)("."+fe,n));for(var l=this.itemList.length;l>0;l--)this.largeIconInstance.element.firstElementChild.insertBefore(this.itemList[l-1],this.topElement.nextElementSibling);for(a=0;a<(r?this.lastRowCount:this.rowItemCount);a++)(0,t.detach)(this.bottomElement.previousElementSibling)}}},e.prototype.getModuleName=function(){return"virtualization"},e.prototype.destroy=function(){this.filemanagerInstance.isDestroyed||(0,t.isNullOrUndefined)(this.largeIconInstance.element.firstElementChild)||this.wireScrollEvent(!0)},e}(),ks=function(){function e(e){this.removeNodes=[],this.moveNames=[],this.previousSelected=[],this.isDrag=!1,this.isPathDragged=!1,this.isRenameParent=!1,this.isRightClick=!1,this.isSameNodeClicked=!1,this.isNodeExpandCalled=!1,this.renameParent=null,this.isNodeClickCalled=!1,this.restrictSelecting=!1,this.parent=e,this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",del:"delete",ctrlX:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"ctrl+v",ctrlShiftN:"ctrl+shift+n",shiftF10:"shift+F10",f2:"f2"}}return e.prototype.onInit=function(){if((0,t.isNullOrUndefined)(this.treeObj)){var e=(0,t.getValue)(this.parent.pathId[0],this.parent.feParent);(0,t.setValue)("_fm_icon","e-fe-folder",e);var i={},n=(0,t.getValue)("id",e);(0,t.isNullOrUndefined)(n)||(0,t.setValue)("data-id",n,i),sa(e)||(0,t.setValue)("class",na(e),i),(0,t.isNullOrUndefined)(i)||(0,t.setValue)("_fm_htmlAttr",i,e),this.treeObj=new Cs.TreeView({fields:{dataSource:[e],id:"_fm_id",parentID:"_fm_pId",expanded:"_fm_expanded",selected:"_fm_selected",text:"name",hasChildren:"hasChild",iconCss:"_fm_icon",htmlAttributes:"_fm_htmlAttr",tooltip:"name"},enableHtmlSanitizer:this.parent.enableHtmlSanitizer,sortOrder:this.parent.navigationPaneSettings.sortOrder,nodeSelecting:this.onNodeSelecting.bind(this),nodeSelected:this.onNodeSelected.bind(this),nodeExpanding:this.onNodeExpand.bind(this),nodeClicked:this.onNodeClicked.bind(this),allowEditing:!0,nodeEditing:this.onNodeEditing.bind(this),drawNode:this.onDrowNode.bind(this),enableRtl:this.parent.enableRtl,dataBound:this.addDragDrop.bind(this)}),this.treeObj.isStringTemplate=!0,this.treeObj.appendTo("#"+this.parent.element.id+F),this.wireEvents()}},e.prototype.addDragDrop=function(){var e=this;!this.parent.isMobile&&this.treeObj&&(this.parent.allowDragAndDrop&&(0,t.isNullOrUndefined)(this.dragObj)?this.dragObj=new t.Draggable(this.treeObj.element,{cursorAt:this.parent.dragCursorPosition,dragTarget:"."+Pt,distance:5,dragArea:this.parent.element,drag:Yn.bind(this,this.parent),dragStart:function(t){zn(e.parent,t,e.dragObj)},dragStop:Bn.bind(this,this.parent),enableTailMode:!0,enableAutoScroll:!1,helper:this.dragHelper.bind(this)}):!this.parent.allowDragAndDrop&&this.dragObj&&(this.dragObj.destroy(),this.dragObj=null))},e.prototype.dragHelper=function(e){var i=e.sender.target;if(!i.classList.contains(Pt))return null;var n=(0,t.closest)(i,"li");return this.parent.dragPath="",this.parent.dragData=[],this.parent.activeElements=[],this.parent.activeElements=[n],this.parent.dragNodes=[],on(this.parent,n),this.parent.dragData=this.getTreeData(n),this.parent.dragPath=this.getDragPath(n,this.parent.dragData[0].name),this.parent.dragNodes.push(this.parent.dragData[0].name),Hn(this.parent),this.parent.virtualDragElement},e.prototype.getDragPath=function(e,t){return An(this.getDropPath(e,t))},e.prototype.getDropPath=function(e,t){var i=e.getAttribute("data-id");return Xi(e,this.parent.hasId?i:t,this.parent.hasId)},e.prototype.onDrowNode=function(e){var t={element:e.node,fileDetails:e.nodeData,module:"NavigationPane"};this.parent.trigger("fileLoad",t)},e.prototype.addChild=function(e,i,n){var a=Sn(e),s=this.getTreeData(i);if(a.length>0&&s.length>0&&(null==a[0].filterPath||(0,t.isNullOrUndefined)(s[0])&&null==s[0].filterPath||a[0].filterPath!==s[0].filterPath)){for(var r=0,o=a;r<a.length;){o[parseInt(r.toString(),10)]._fm_icon="e-fe-folder";var l={},h=(0,t.getValue)("id",o[r]);(0,t.isNullOrUndefined)(h)||(0,t.setValue)("data-id",h,l),sa(o[r])||(0,t.setValue)("class",na(o[r]),l),(0,t.isNullOrUndefined)(l)||(0,t.setValue)("_fm_htmlAttr",l,o[r]),r++}var d=(0,t.select)('[data-uid="'+i+'"]',this.treeObj.element),p=(0,t.select)("ul",d);(0,t.isNullOrUndefined)(p)&&this.treeObj.addNodes(a,i,null,n)}},e.prototype.onNodeSelecting=function(e){if(!e.isInteracted&&!this.isRightClick&&!this.isSameNodeClicked&&!this.isPathDragged&&!this.isRenameParent||this.restrictSelecting)return this.restrictSelecting=!1,void(this.isNodeClickCalled=!1);if(!this.renameParent){this.parent.activeModule="navigationpane";var i=this.getTreeData((0,t.getValue)("id",e.nodeData));if(e.node.getAttribute("data-uid")!==this.parent.pathId[this.parent.pathId.length-1]&&!this.isRightClick&&!this.isNodeClickCalled||this.isSameNodeClicked||this.isPathDragged){if(this.isNodeClickCalled=!1,!this.isSameNodeClicked){this.isSameNodeClicked=!0;var n={action:e.action,fileDetails:i[0],isInteracted:e.isInteracted};this.parent.trigger("fileSelect",n)}if(!this.isRightClick){var a={cancel:!1,fileDetails:i[0],module:"NavigationPane"};this.parent.trigger("fileOpen",a),e.cancel=a.cancel}e.cancel&&(this.restrictSelecting=!!this.isNodeClickCalled&&this.previousSelected[0]!==e.node.getAttribute("data-uid"),this.isNodeClickCalled=!0,this.isSameNodeClicked=!1,this.isPathDragged=!1,this.previousSelected=this.treeObj.selectedNodes,this.treeObj.setProperties({selectedNodes:[e.node.getAttribute("data-uid")]}))}else if(this.previousSelected[0]!==e.node.getAttribute("data-uid")){n={action:e.action,fileDetails:i[0],isInteracted:this.isNodeClickCalled};this.parent.trigger("fileSelect",n)}}},e.prototype.openFileOnContextMenuClick=function(e){var t=this.treeObj.getTreeData(e);this.parent.selectedItems=[],this.parent.itemData=t,this.activeNode=e,this.parent.activeModule="navigationpane";var i={cancel:!1,fileDetails:t[0],module:"NavigationPane"};this.parent.trigger("fileOpen",i),this.isNodeClickCalled=!0,i.cancel||(Qi(e,this.parent.itemData[0],this.parent),ga(this.parent,this.isPathDragged?Di:Yt,this.parent.path),this.parent.visitedItem=e,this.isPathDragged=this.isRenameParent=this.isRightClick=!1,this.treeObj.setProperties({selectedNodes:[e.getAttribute("data-uid")]}))},e.prototype.onNodeSelected=function(e){if(this.parent.breadcrumbbarModule&&this.parent.breadcrumbbarModule.searchObj&&!this.renameParent&&(this.parent.breadcrumbbarModule.searchObj.element.value="",this.parent.isFiltered=!1,this.isNodeClickCalled=!1),this.parent.searchedItems=[],e.isInteracted||this.isRightClick||this.isSameNodeClicked||this.isPathDragged||this.isRenameParent){this.activeNode=e.node,this.parent.activeModule="navigationpane";var i=this.getTreeData((0,t.getValue)("id",e.nodeData));this.parent.selectedItems=[],this.parent.itemData=i;var n=this.parent.path;!this.isRightClick&&this.isSameNodeClicked?Qi(e.node,this.parent.itemData[0],this.parent):(this.parent.pathId=$i(e.node),this.parent.visitedItem=e.node),e.node.querySelector("."+Ot)&&null===e.node.querySelector("."+fe)&&(this.expandNodeTarget="add"),n!==this.parent.path&&(!this.isRightClick&&this.isSameNodeClicked&&ga(this.parent,this.isPathDragged?Di:Yt,this.parent.path),this.parent.visitedItem=e.node),this.isPathDragged=this.isRenameParent=this.isRightClick=this.isSameNodeClicked=!1}else this.parent.pathId=$i(e.node)},e.prototype.onPathDrag=function(e){this.isPathDragged=!0,this.selectResultNode(e[0])},e.prototype.onNodeExpand=function(e){if((e.isInteracted||this.isDrag)&&null===e.node.querySelector("."+fe)){this.isNodeExpandCalled=!0;var i=(0,t.getValue)("text",e.nodeData),n=e.node.getAttribute("data-id"),a=!(0,t.isNullOrUndefined)(n),s=(0,t.isNullOrUndefined)(n)?i:n,r=Xi(e.node,s,a);this.expandNodeTarget=e.node.getAttribute("data-uid"),this.parent.expandedId=this.expandNodeTarget,this.parent.itemData=this.getTreeData((0,t.getValue)("id",e.nodeData)),this.parent.pathId.push((0,t.getValue)("id",e.nodeData)),ga(this.parent,ci,r)}},e.prototype.onNodeExpanded=function(e){this.addChild(e.files,this.expandNodeTarget,!1),this.parent.expandedId=null,this.isNodeExpandCalled=!1},e.prototype.onNodeClicked=function(e){if(this.parent.activeModule="navigationpane",this.previousSelected=this.treeObj.selectedNodes,this.activeNode=e.node,3===e.event.which&&e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0])this.isRightClick=!0,this.isNodeClickCalled=!0,this.treeObj.setProperties({selectedNodes:[e.node.getAttribute("data-uid")]});else if(e.node.getAttribute("data-uid")===this.treeObj.selectedNodes[0]&&0!==this.parent.selectedItems.length){this.parent.setProperties({selectedItems:[]},!0);var t="LargeIcons"===this.parent.view?"largeiconsview":"detailsview";this.parent.notify(At,{module:t,newProp:{selectedItems:[]}})}else e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0]||this.isNodeClickCalled||this.isNodeExpandCalled||(3===e.event.which&&(this.isRightClick=!0),this.isSameNodeClicked=!0,this.isNodeClickCalled=!0)},e.prototype.onNodeEditing=function(e){(0,t.isNullOrUndefined)(e.innerHtml)||(e.cancel=!0)},e.prototype.onPathChanged=function(e){this.parent.isCut=!1;var i=(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feFiles);if("add"===this.expandNodeTarget){var n=(0,t.select)('[data-uid="'+this.treeObj.selectedNodes[0]+'"]',this.treeObj.element),a=(0,t.isNullOrUndefined)(n)?null:(0,t.select)("."+me,n);(0,t.isNullOrUndefined)(a)&&this.addChild(e.files,this.treeObj.selectedNodes[0],!0),this.expandNodeTarget=""}(0,t.isNullOrUndefined)(i)&&(0,t.setValue)(this.parent.pathId[this.parent.pathId.length-1],e.files,this.parent.feFiles),this.parent.uploadObj.directoryUpload&&!this.parent.hasId&&this.updateTree(e)},e.prototype.updateTree=function(e){if(this.treeObj){var t=this.treeObj.selectedNodes[0];this.updateTreeNode(e,t)}},e.prototype.updateTreeNode=function(e,t){var i=-1!==this.treeObj.expandedNodes.indexOf(t);this.removeChildNodes(t),this.addChild(e.files,t,!i)},e.prototype.removeChildNodes=function(e){var i=(0,t.select)('[data-uid="'+e+'"]',this.treeObj.element),n=(0,t.select)("."+me,i),a=n?Array.prototype.slice.call(n.children):null;a&&this.treeObj.removeNodes(a)},e.prototype.onOpenEnd=function(e){var t=this.parent.pathId[this.parent.pathId.length-1];this.treeObj.expandAll(this.treeObj.selectedNodes),this.treeObj.setProperties({selectedNodes:[t]}),this.expandNodeTarget="add",this.onPathChanged(e)},e.prototype.onOpenInit=function(e){"navigationpane"===this.parent.activeModule&&e.target.querySelector("."+Ot)&&this.treeObj.expandAll(this.treeObj.selectedNodes)},e.prototype.onInitialEnd=function(e){this.onInit(),this.addChild(e.files,(0,t.getValue)("_fm_id",e.cwd),!1)},e.prototype.onFinalizeEnd=function(e){this.onInit();var i=(0,t.getValue)("_fm_id",e.cwd);this.addChild(e.files,i,!1),this.treeObj.setProperties({selectedNodes:[this.parent.pathId[this.parent.pathId.length-1]]})},e.prototype.onCreateEnd=function(e){this.updateTree(e)},e.prototype.onSelectedData=function(){"navigationpane"===this.parent.activeModule&&this.updateItemData()},e.prototype.onDeleteInit=function(){if("navigationpane"===this.parent.activeModule){this.updateActionData();var e=(0,t.getValue)("name",this.parent.itemData[0]);Ia(this.parent,[e],this.parent.path,"delete")}},e.prototype.onDeleteEnd=function(e){if("navigationpane"===this.parent.activeModule){var i=this.treeObj.selectedNodes[0],n=(0,t.select)('[data-uid="'+i+'"]',this.treeObj.element),a=(0,t.closest)(n,"."+me).parentElement;this.treeObj.selectedNodes=[a.getAttribute("data-uid")],this.treeObj.dataBind()}this.updateTree(e)},e.prototype.onRefreshEnd=function(e){this.updateTree(e)},e.prototype.onRenameInit=function(){"navigationpane"===this.parent.activeModule&&this.updateRenameData()},e.prototype.onRenameEndParent=function(e){var i=this.renameParent?this.renameParent:this.parent.pathId[this.parent.pathId.length-1];if(this.updateTreeNode(e,i),this.parent.expandedId=null,this.renameParent)this.renameParent=null;else{var n=[];if(this.parent.hasId)n=new Yi.DataManager(this.treeObj.getTreeData()).executeLocal((new Yi.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new Yi.DataManager(this.treeObj.getTreeData()).executeLocal((new Yi.Query).where(this.treeObj.fields.text,"equal",this.parent.renameText,!1));a.length>0&&(n=new Yi.DataManager(a).executeLocal((new Yi.Query).where("_fm_pId","equal",i,!1)))}if(n.length>0){var s=this.previousSelected.length>0&&0!==this.treeObj.getTreeData(this.previousSelected[0]).length?this.previousSelected[0]:(0,t.getValue)(this.treeObj.fields.id,n[0]);this.treeObj.selectedNodes=[s],this.treeObj.dataBind(),this.updateItemData()}}},e.prototype.onRenameEnd=function(e){if(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered){var i=this.treeObj.getTreeData(),n=[];if(this.parent.hasId)n=new Yi.DataManager(i).executeLocal((new Yi.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new Yi.DataManager(i).executeLocal((new Yi.Query).where(this.treeObj.fields.text,"equal",this.parent.currentItemText,!1));a.length>0&&(n=new Yi.DataManager(a).executeLocal((new Yi.Query).where("filterPath","equal",this.parent.filterPath,!1)))}n.length>0&&(this.renameParent=(0,t.getValue)(this.treeObj.fields.parentID,n[0]),this.parent.expandedId=this.renameParent,this.parent.itemData=this.getTreeData(this.renameParent),ga(this.parent,mi,this.parent.filterPath.replace(/\\/g,"/")))}else this.updateTree(e)},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++){switch(i[t]){case"allowDragAndDrop":this.addDragDrop();break;case"navigationPaneSettings":ga(this.parent,Ut,this.parent.path),e.oldProp.navigationPaneSettings.sortOrder!==e.newProp.navigationPaneSettings.sortOrder&&(this.treeObj.sortOrder=e.newProp.navigationPaneSettings.sortOrder)}}},e.prototype.onDownLoadInit=function(){this.doDownload()},e.prototype.onSelectionChanged=function(e){this.treeObj.setProperties({selectedNodes:[e.selectedNode]})},e.prototype.onClearPathInit=function(e){this.removeChildNodes(e.selectedNode)},e.prototype.onDragEnd=function(e){if(wa(this.parent)){this.moveNames=[];for(var i=this.parent.dragData,n=0;n<i.length;n++)!1===(0,t.getValue)("isFile",i[n])&&this.moveNames.push((0,t.getValue)("_fm_id",i[n]))}var a=[];a=this.parent.isPasteError||this.parent.isSearchDrag?this.getMoveNames(e.files,this.parent.isSearchDrag,this.parent.dragPath):this.moveNames,this.treeObj.removeNodes(a)},e.prototype.getMoveNames=function(e,i,n){for(var a=[],s=0;s<e.length;s++)if(!e[s].isFile&&!this.parent.hasId){var r=e[s].previousName;if(i){var o=(n+=e[s].previousName).lastIndexOf("/");r=n.substring(o+1),n=n.substring(0,o+1)}for(var l=new Yi.DataManager(this.treeObj.getTreeData()).executeLocal((new Yi.Query).where(this.treeObj.fields.text,"equal",r,!1)),h=0;h<l.length;h++){var d=(0,t.getValue)("filterPath",l[h]);if((d=d.replace(/\\/g,"/"))===n){a.push((0,t.getValue)(this.treeObj.fields.id,l[h]));break}}}return a},e.prototype.onCutEnd=function(e){var t=[];this.parent.isPasteError||this.parent.isSearchCut?this.moveNames=this.getMoveNames(e.files,this.parent.isSearchCut,this.parent.targetPath):t=this.moveNames,this.treeObj.removeNodes(t)},e.prototype.selectResultNode=function(e){if(this.parent.hasId){var i=this.treeObj.getTreeData().filter((function(t){return t.name===e.name}))[0];this.treeObj.selectedNodes=[(0,t.getValue)("_fm_id",i)],this.treeObj.dataBind()}else{var n=(0,t.getValue)("filterPath",e),a=(0,t.getValue)("name",e),s=new Yi.DataManager(this.treeObj.getTreeData()).executeLocal((new Yi.Query).where(this.treeObj.fields.text,"equal",a,!1));if(s.length>0){var r=new Yi.DataManager(s).executeLocal((new Yi.Query).where("filterPath","equal",n,!1));if(r.length>0){var o=(0,t.getValue)(this.treeObj.fields.id,r[0]);this.treeObj.selectedNodes=[o],this.treeObj.dataBind()}}}},e.prototype.onDropPath=function(e){this.onpasteEnd(e),this.selectResultNode(this.parent.dropData),this.parent.isDropEnd=!this.parent.isPasteError},e.prototype.onpasteEnd=function(e){var i=[];if(this.parent.hasId)i=new Yi.DataManager(this.treeObj.getTreeData()).executeLocal((new Yi.Query).where("id","equal",(0,t.getValue)("id",e.cwd),!1));else{var n=new Yi.DataManager(this.treeObj.getTreeData()).executeLocal((new Yi.Query).where(this.treeObj.fields.text,"equal",(0,t.getValue)("name",e.cwd),!1));n.length>0&&(i=new Yi.DataManager(n).executeLocal((new Yi.Query).where("filterPath","equal",(0,t.getValue)("filterPath",e.cwd),!1)))}if(i.length>0){var a=(0,t.getValue)(this.treeObj.fields.id,i[0]),s=-1===this.treeObj.expandedNodes.indexOf(a);this.removeChildNodes(a),this.addChild(e.files,a,s)}this.parent.expandedId=null,this.onPathChanged(e),this.parent.isDragDrop&&this.checkDropPath(e)},e.prototype.checkDropPath=function(e){(!wa(this.parent)||this.parent.path!==this.parent.dropPath&&"navigationpane"!==this.parent.targetModule)&&(-1===this.parent.dropPath.indexOf(Fn(this.parent,e))?(this.parent.isDropEnd=!1,Vn(this.parent)):this.parent.isDropEnd=!this.parent.isPasteError)},e.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&this.updateItemData(),this.moveNames=[];for(var e=this.parent.isDragDrop?this.parent.dragData:this.parent.actionRecords,i=0;i<e.length;i++)!1===(0,t.getValue)("isFile",e[i])&&this.moveNames.push((0,t.getValue)("_fm_id",e[i]))},e.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.getTreeData(this.treeObj.selectedNodes[0]),this.parent.activeElements=[this.activeNode])},e.prototype.addEventListener=function(){this.parent.on(At,this.onPropertyChanged,this),this.parent.on(Mi,this.onDownLoadInit,this),this.parent.on(Ft,this.onInitialEnd,this),this.parent.on(Ut,this.onFinalizeEnd,this),this.parent.on(Yt,this.onPathChanged,this),this.parent.on(Di,this.onpasteEnd,this),this.parent.on(Si,this.onCutEnd,this),this.parent.on(wi,this.onpasteInit,this),this.parent.on(ci,this.onNodeExpanded,this),this.parent.on(Vt,this.onCreateEnd,this),this.parent.on(Ii,this.onSelectedData,this),this.parent.on(zt,this.onDeleteInit,this),this.parent.on(qt,this.onDeleteEnd,this),this.parent.on(Wt,this.onRefreshEnd,this),this.parent.on(xi,this.onSelectionChanged,this),this.parent.on(ai,this.onOpenInit,this),this.parent.on(si,this.onOpenEnd,this),this.parent.on(Jt,this.destroy,this),this.parent.on(gi,this.onRenameInit,this),this.parent.on(bi,this.onRenameEnd,this),this.parent.on(mi,this.onRenameEndParent,this),this.parent.on(hi,this.onClearPathInit,this),this.parent.on(Oi,this.oncutCopyInit,this),this.parent.on(ki,this.onDropInit,this),this.parent.on(fi,this.onMenuItemData,this),this.parent.on(Li,this.onDragEnd,this),this.parent.on(Fi,this.onDragging,this),this.parent.on(Ti,this.onDropPath,this),this.parent.on(ui,this.onDetailsInit,this),this.parent.on(Bt,this.onPathDrag,this)},e.prototype.removeEventListener=function(){this.parent.off(Ft,this.onInitialEnd),this.parent.off(Mi,this.onDownLoadInit),this.parent.off(Ut,this.onFinalizeEnd),this.parent.off(Ii,this.onSelectedData),this.parent.off(At,this.onPropertyChanged),this.parent.off(Yt,this.onPathChanged),this.parent.off(Di,this.onpasteEnd),this.parent.off(Si,this.onCutEnd),this.parent.off(wi,this.onpasteInit),this.parent.off(xi,this.onSelectionChanged),this.parent.off(ci,this.onNodeExpanded),this.parent.off(Vt,this.onCreateEnd),this.parent.off(Wt,this.onRefreshEnd),this.parent.off(ai,this.onOpenInit),this.parent.off(si,this.onOpenEnd),this.parent.off(Jt,this.destroy),this.parent.off(gi,this.onRenameInit),this.parent.off(bi,this.onRenameEnd),this.parent.off(mi,this.onRenameEndParent),this.parent.off(hi,this.onClearPathInit),this.parent.off(zt,this.onDeleteInit),this.parent.off(qt,this.onDeleteEnd),this.parent.off(Oi,this.oncutCopyInit),this.parent.off(ki,this.onDropInit),this.parent.off(Li,this.onDragEnd),this.parent.off(Fi,this.onDragging),this.parent.off(Ti,this.onDropPath),this.parent.off(ui,this.onDetailsInit),this.parent.off(fi,this.onMenuItemData),this.parent.off(Bt,this.onPathDrag)},e.prototype.onDetailsInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.getTreeData(this.treeObj.selectedNodes[0]);this.parent.itemData=e}},e.prototype.onMenuItemData=function(e){if(this.parent.activeModule===this.getModuleName()){var i=(0,t.closest)(e.target,"li");this.parent.itemData=this.getTreeData(i.getAttribute("data-uid"))}},e.prototype.onDragging=function(e){var i=(0,t.closest)(e.target,"li");if(i.classList.contains("e-node-collapsed")){this.isDrag=!0;var n=parseInt(i.getAttribute("aria-level"),10);this.treeObj.expandAll([i.getAttribute("data-uid")],n+1),this.isDrag=!1}},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=(0,t.closest)(e.target,"li");this.parent.dropData=this.getTreeData(i)[0],this.parent.dropPath=this.getDropPath(i,(0,t.getValue)("name",this.parent.dropData))}},e.prototype.getModuleName=function(){return"navigationpane"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.treeObj&&(this.unWireEvents(),this.treeObj.destroy()))},e.prototype.wireEvents=function(){this.keyboardModule=new t.KeyboardEvents(this.treeObj.element,{keyAction:this.keyDown.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},e.prototype.unWireEvents=function(){this.keyboardModule.destroy()},e.prototype.keyDown=function(e){switch(e.action){case"altEnter":this.parent.notify(ui,{}),Oa(this.parent,[],this.parent.path,"details");break;case"esc":nn(this.parent);break;case"del":this.parent.pathId[0]!==this.activeNode.getAttribute("data-uid")&&(this.updateItemData(),sa(this.parent.itemData[0])?(this.removeNodes=[],Xa(this.parent,"Delete")):ia(this.parent,this.parent.itemData[0],Hi));break;case"ctrlC":gn(this.parent);break;case"ctrlV":this.parent.folderPath="",kn(this.parent);break;case"ctrlX":mn(this.parent);break;case"shiftF10":if(this.updateItemData(),!la(this.parent.itemData[0]))return void ia(this.parent,this.parent.itemData[0],Wi);0!==this.parent.selectedItems.length&&this.doDownload();break;case"f2":if(0===this.parent.selectedItems.length){var t=this.getTreeData(this.treeObj.selectedNodes[0])[0];sa(t)?(this.updateRenameData(),Xa(this.parent,"Rename")):ia(this.parent,t,Hi)}}},e.prototype.getTreeData=function(e){for(var i=this.treeObj.getTreeData(e),n=0;n<i.length;n++)(0,t.isNullOrUndefined)((0,t.getValue)("hasChild",i[n]))&&(0,t.setValue)("hasChild",!1,i[n]);return i},e.prototype.updateRenameData=function(){this.updateItemData(),this.parent.currentItemText=(0,t.getValue)("name",this.parent.itemData[0])},e.prototype.updateItemData=function(){var e=this.getTreeData(this.treeObj.selectedNodes[0])[0];this.parent.itemData=[e],this.parent.isFile=!1},e.prototype.updateActionData=function(){this.updateItemData(),Qi((0,t.select)('[data-uid="'+this.parent.pathId[this.parent.pathId.length-1]+'"]',this.treeObj.element),this.parent.itemData[0],this.parent);var e=An(this.parent.path);this.parent.setProperties({path:e},!0),this.parent.pathId.pop(),this.parent.pathNames.pop()},e.prototype.doDownload=function(){var e=An(this.parent.path),i=this.treeObj.selectedNodes[0]===this.parent.pathId[0]?"":(0,t.getValue)("name",this.parent.itemData[0]);Ga(this.parent,e,[i])},e}(),Ls=function(){function e(e){this.isInteracted=!0,this.interaction=!0,this.isPasteOperation=!1,this.isColumnRefresh=!1,this.dragObj=null,this.startIndex=null,this.firstItemIndex=null,this.isSelectionUpdate=!1,this.currentSelectedItem=[],this.count=0,this.isRendered=!0,this.isLoaded=!1,this.isNameWidth=!1,this.isMultiSelect=!1,this.pasteOperation=!1,this.uploadOperation=!1,fa.Grid.Inject(fa.Resize,fa.ContextMenu,fa.Sort,fa.VirtualScroll),this.parent=e,this.element=(0,t.select)("#"+this.parent.element.id+U,this.parent.element),this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",tab:"tab",moveDown:"downarrow",ctrlEnd:"ctrl+end",ctrlHome:"ctrl+home",ctrlDown:"ctrl+downarrow",ctrlLeft:"ctrl+leftarrow",ctrlRight:"ctrl+rightarrow",shiftEnd:"shift+end",shiftHome:"shift+home",shiftDown:"shift+downarrow",shiftUp:"shift+uparrow",ctrlUp:"ctrl+uparrow",csEnd:"ctrl+shift+end",csHome:"ctrl+shift+home",csDown:"ctrl+shift+downarrow",csUp:"ctrl+shift+uparrow",space:"space",ctrlSpace:"ctrl+space",shiftSpace:"shift+space",csSpace:"ctrl+shift+space",end:"end",home:"home",moveUp:"uparrow",del:"delete",ctrlX:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"ctrl+v",ctrlShiftN:"ctrl+shift+n",shiftdel:"shift+delete",ctrlD:"ctrl+d",f2:"f2",ctrlA:"ctrl+a",enter:"enter",back:"backspace"}}return e.prototype.render=function(e){var i=this;if(this.parent.enablePersistence){var n=window.localStorage.getItem("grid"+this.parent.element.id+"_grid");if(!(0,t.isNullOrUndefined)(n)){var a=JSON.parse(n);!(0,t.isNullOrUndefined)(a)&&Object.keys(a).length>0&&"sortSettings"in a&&(delete a.sortSettings,window.localStorage.setItem("grid"+this.parent.element.id+"_grid",JSON.stringify(a)))}}if((0,Gi.showSpinner)(this.parent.element),"Details"===this.parent.view){(0,t.removeClass)([this.parent.element],oe);var s=On(this.parent,e.files);this.checkNameWidth();var r=this.getColumns(),o=void 0,l=!(0,t.isNullOrUndefined)(r)&&-1!==r.findIndex((function(e){return e.field===i.parent.sortBy}));this.parent.isMobile||!l?o=[]:"None"!==this.parent.sortOrder&&(o=[{direction:this.parent.sortOrder,field:this.parent.sortBy}]),this.gridObj=new fa.Grid({dataSource:s,allowSorting:!0,rowSelecting:this.onSelection.bind(this,"select"),rowDeselecting:this.onSelection.bind(this,"unselect"),rowSelected:this.onSelected.bind(this),rowDeselected:this.onDeSelection.bind(this),allowResizing:this.parent.detailsViewSettings.columnResizing,selectionSettings:{type:this.parent.allowMultiSelection?"Multiple":"Single",checkboxMode:"ResetOnRowClick"},enableRtl:this.parent.enableRtl,pageSettings:{pageSize:20},enableVirtualization:this.parent.enableVirtualization,enablePersistence:this.parent.enablePersistence,enableVirtualMaskRow:!0,sortSettings:{allowUnsort:!1,columns:o},columns:r,recordDoubleClick:this.DblClickEvents.bind(this),beforeDataBound:this.onBeforeDataBound.bind(this),dataBound:this.onDataBound.bind(this),rowDataBound:this.onRowDataBound.bind(this),actionBegin:this.onActionBegin.bind(this),headerCellInfo:this.onHeaderCellInfo.bind(this),width:"100%",height:this.parent.enableVirtualization?this.getGridHeight():"auto",beforeCopy:function(e){e.cancel=!0},load:function(){this.focusModule.destroy()},locale:this.parent.locale}),this.parent.isReact&&(this.gridObj.isReact=!0,this.gridObj.portals=[],this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this)),this.gridObj.isStringTemplate=!0,this.gridObj.appendTo("#"+this.parent.element.id+U),0!==this.parent.selectedItems.length&&this.parent.enableVirtualization&&this.parent.enablePersistence&&(this.isLoaded=!0),this.wireEvents(),this.adjustHeight(),this.emptyArgs=e}},e.prototype.reactTemplateRender=function(e){this.parent.portals=e,this.parent.portals&&this.parent.toolbarModule&&this.parent.toolbarModule.toolbarObj&&this.parent.toolbarModule.toolbarObj.portals&&(this.parent.portals=this.parent.portals.concat(this.parent.toolbarModule.toolbarObj.portals)),this.parent.notify("renderReactTemplate",this.parent.portals),this.parent.renderReactTemplates()},e.prototype.getGridHeight=function(){var e=(0,t.select)("#"+this.parent.element.id+Q,this.parent.element),i=(0,t.select)("#"+this.parent.element.id+X,this.parent.element);return e.offsetHeight-i.offsetHeight-36},e.prototype.checkNameWidth=function(){var e=this.parent.detailsViewSettings.columns;this.isNameWidth=!1;for(var i=0;i<e.length;i++)if("name"===e[i].field)return void(this.isNameWidth=!(0,t.isNullOrUndefined)(e[i].width))},e.prototype.adjustWidth=function(e,t){if(!this.isNameWidth||"name"!==t)for(var i=0;i<e.length;i++)if(e[i].field===t){var n=void 0;n=""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===t?"120px":"180px":"auto":this.element.clientWidth<=500?"120px":"auto",e[i].width=n}},e.prototype.getColumns=function(){var e,i=this.parent.enableHtmlSanitizer;if(this.parent.isMobile)e=[{field:"name",headerText:jn(this.parent,"Name"),width:"auto",minWidth:120,headerTextAlign:"Left",template:(0,t.initializeCSPTemplate)((function(e){return'<div class="e-fe-text">'+(i?t.SanitizeHtmlHelper.sanitize(e.name):e.name)+'</div><div class="e-fe-date">'+e._fm_modified+'</div><span class="e-fe-size">'+e.size+"</span>"}))}];else{e=(0,t.extend)([],this.parent.detailsViewSettings.columns,null,!0),this.adjustWidth(e,"name");for(var n=function(n,s){if(e[n].headerText=jn(a.parent,e[n].headerText),"name"===e[n].field&&!(0,t.isNullOrUndefined)(e[n].template)&&"function"!=typeof e[n].template){var r=e[n].template;e[n].template=(0,t.initializeCSPTemplate)((function(e){var n=i?t.SanitizeHtmlHelper.sanitize(e.name):e.name;return r.replace(/\${name}/g,n)}))}},a=this,s=0,r=e.length;s<r;s++)n(s)}var o=this.parent.isMobile||this.parent.isBigger?"54":"46",l={field:"type",width:o,minWidth:o,template:(0,t.initializeCSPTemplate)((function(e){return'<span class="e-fe-icon '+e._fm_iconClass+'"></span>'})),allowResizing:!1,allowSorting:!0,customAttributes:{class:"e-fe-grid-icon"},headerTemplate:(0,t.initializeCSPTemplate)((function(){return"<span class='e-fe-icon e-fe-folder'></span>"}))};if(e.unshift(l),this.parent.showItemCheckBoxes){var h=this.parent.isBigger?"36":"26",d={type:"checkbox",width:h,minWidth:h,customAttributes:{class:"e-fe-checkbox"},allowResizing:!1,allowSorting:!1};this.parent.isMobile?e.push(d):e.unshift(d)}for(s=0,r=e.length;s<r;s++)e[s].disableHtmlEncode=!this.parent.enableHtmlSanitizer;if(this.parent.enableRangeSelection){e.push({field:"name",visible:!1,customAttributes:{class:"e-drag-text"}})}return e},e.prototype.adjustHeight=function(){if(this.gridObj){var e=(0,t.select)("#"+this.parent.element.id+Q,this.parent.element),i=(0,t.select)("#"+this.parent.element.id+X,this.parent.element),n=(0,t.select)("."+We,this.parent.element),a=e.offsetHeight-i.offsetHeight-n.offsetHeight;this.gridObj.height=a,this.gridObj.dataBind()}},e.prototype.renderCheckBox=function(){this.gridObj.columns=this.getColumns(),this.isColumnRefresh=!0,this.gridObj.refreshColumns()},e.prototype.onRowDataBound=function(e){var i=(0,t.select)(".e-fe-grid-name",e.row);if(!i)for(var n=this.parent.detailsViewSettings.columns,a=0;a<n.length;a++)if("name"===n[a].field){i=e.row.children[this.parent.allowMultiSelection?a+2:a+1];break}if(i&&i.setAttribute("title",(0,t.getValue)("name",e.data)),this.parent.isLayoutChange&&this.parent.isCut&&"move"===this.parent.fileAction&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length&&-1!==this.parent.selectedNodes.indexOf((0,t.getValue)("name",e.data))&&sn(e.row),!this.parent.showFileExtension&&(0,t.getValue)("isFile",e.data)){var s=(0,t.getValue)("name",e.data),r=e.row.querySelector('[title= "'+s+'"]');if(r){var o=(0,t.getValue)("name",e.data),l=(0,t.getValue)("type",e.data);-1!==o.indexOf(l)&&(r.innerHTML=o.substr(0,o.length-l.length))}}if(void 0!==(0,t.getValue)("size",e.data)&&e.row.querySelector(".e-fe-size")){var h=e.row.querySelector(".e-fe-size"),d=void 0;if((0,t.getValue)("isFile",e.data)){var p=(0,t.getValue)("size",e.data),c=new t.Internationalization(this.parent.locale),u=void 0;for(n=this.parent.detailsViewSettings.columns,a=0;a<n.length;a++)if("size"===n[a].field){u=(0,t.isNullOrUndefined)(n[a].format)?"n":n[a].format.toString();break}d=c.formatNumber(p/1024,{format:u})+" "+jn(this.parent,"KB")}else d="";h.innerHTML=d}if(this.parent.isMobile&&void 0!==(0,t.getValue)("_fm_modified",e.data)&&e.row.querySelector(".e-fe-date")){var f=e.row.querySelector(".e-fe-date"),g=(c=new t.Internationalization(this.parent.locale),n=this.parent.detailsViewSettings.columns,void 0);for(a=0;a<n.length;a++)if("dateModified"===n[a].field){g=n[a].format;break}var m=c.formatDate(new Date((0,t.getValue)("_fm_modified",e.data)),g);f.innerHTML=m}var b=e.row.querySelector("."+xe);b&&b.classList.add("e-small"),sa(e.data)||(e.row.className+=" "+na(e.data));var v={element:e.row,fileDetails:e.data,module:"DetailsView"};this.parent.trigger("fileLoad",v)},e.prototype.onActionBegin=function(e){if("sorting"===e.requestType){if(this.parent.setProperties({sortOrder:e.direction},!0),this.parent.setProperties({sortBy:e.columnName},!0),0!==this.parent.selectedItems.length){this.sortItem=!0;var i=this.gridObj.getSelectedRowIndexes(),n=i.length;for(this.sortSelectedNodes=[];n>0;){var a=this.gridObj.getRowsObject()[i[n-1]].data;this.sortSelectedNodes.push((0,t.getValue)(this.parent.hasId?"id":"name",a)),n--}}this.parent.notify(pi,{})}},e.prototype.onHeaderCellInfo=function(e){var t=e.node.querySelector("."+xe);t&&t.classList.add("e-small")},e.prototype.onBeforeDataBound=function(e){var t=this;(0,Gi.showSpinner)(this.parent.element);var i=this.parent.detailsViewSettings.columns.find((function(e){return e.field===t.parent.sortBy}));if(i&&!("sortComparer"in i)){var n=On(this.parent,this.parent.enableVirtualization?e.result:this.gridObj.dataSource);e.result=n}},e.prototype.onDataBound=function(){if(this.createDragObj(),(0!==this.parent.selectedItems.length&&!this.parent.enableVirtualization||this.isLoaded)&&this.selectRecords(this.parent.selectedItems),!0===this.isPasteOperation&&!(0,t.isNullOrUndefined)(this.gridObj.getDataRows())&&this.gridObj.getDataRows().length>0&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.parent.pasteNodes),this.isPasteOperation=!1)),this.parent.createdItem&&(this.selectRecords([(0,t.getValue)(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null),this.parent.layoutSelectedItems.length&&this.selectRecords(this.parent.layoutSelectedItems),this.parent.renamedItem&&(this.addSelection(this.parent.renamedItem),this.parent.renamedItem=null),!0===this.sortItem&&(this.selectRecords(this.sortSelectedNodes),this.sortItem=!1),this.isSelectionUpdate&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.currentSelectedItem),this.isSelectionUpdate=!1)),!0===this.uploadOperation&&(this.count++,this.selectRecords(this.parent.uploadItem),this.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[])),this.gridObj.currentViewData.length*this.gridObj.getRowHeight()<this.gridObj.height){(i=this.gridObj.getHeaderContent()).style.paddingRight="",i.style.paddingLeft="",(0,t.select)(".e-headercontent",i).style.borderRightWidth="0",(e=this.gridObj.getContent().querySelector(".e-content")).style.overflowY="",e.classList.add("e-scrollShow")}else{var e,i=this.gridObj.getHeaderContent();this.parent.enableRtl?i.style.paddingLeft="16px":i.style.paddingRight="16px",(e=this.gridObj.getContent().querySelector(".e-content")).classList.remove("e-scrollShow")}this.isRendered=!0,this.parent.isLayoutChange=!1,(0,Gi.hideSpinner)(this.parent.element),this.checkEmptyDiv(this.emptyArgs),this.isInteracted=!!this.isLoaded||this.isInteracted,this.isLoaded=!1},e.prototype.selectRecords=function(e){for(var i=this.gridObj.getCurrentViewRecords(),n=[],a=0,s=i.length;a<s;a++){var r=this.parent.hasId?(0,t.getValue)("id",i[a]):In(this.parent,i[a]);if(-1!==e.indexOf(r))n.push(a);else if(!this.parent.showFileExtension&&!this.parent.hasId&&r.includes(".")){var o=r.split(".").slice(0,-1).join(".");-1!==e.indexOf(o)&&n.push(a)}}0!==n.length&&(this.gridObj.selectRows(n),this.addFocus(this.gridObj.selectedRowIndex))},e.prototype.addSelection=function(e){var i=this.gridObj.getCurrentViewRecords(),n=[];if(this.parent.hasId)n=new Yi.DataManager(i).executeLocal((new Yi.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new Yi.DataManager(i).executeLocal((new Yi.Query).where("name","equal",(0,t.getValue)("name",e),!1));a.length>0&&(n=new Yi.DataManager(a).executeLocal((new Yi.Query).where("filterPath","equal",this.parent.filterPath,!1)))}if(n.length>0){var s=i.indexOf(n[0]);this.gridObj.selectRows([s])}},e.prototype.onSortColumn=function(){"None"!==this.parent.sortOrder?this.gridObj.sortModule.sortColumn(this.parent.sortBy,this.parent.sortOrder):this.gridObj.dataSource=On(this.parent,this.gridObj.dataSource),0!==this.element.querySelector(".e-content").scrollTop&&this.gridObj.freezeRefresh()},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var i=0,n=Object.keys(e.newProp);i<n.length;i++){switch(n[i]){case"allowDragAndDrop":this.createDragObj();break;case"height":this.adjustHeight();break;case"detailsViewSettings":if(!(0,t.isNullOrUndefined)(this.gridObj)){this.checkNameWidth();var a=this.getColumns();this.gridObj.columns=a,this.gridObj.allowResizing=this.parent.detailsViewSettings.columnResizing,this.gridObj.dataBind(),this.gridObj.refreshColumns()}break;case"selectedItems":if(this.interaction=!1,0!==this.parent.selectedItems.length){if(!this.parent.allowMultiSelection){var s=this.parent.selectedItems.slice(this.parent.selectedItems.length-1);this.parent.setProperties({selectedItems:s},!0)}this.selectRecords(this.parent.selectedItems),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)}else(0,t.isNullOrUndefined)(this.gridObj)||(this.gridObj.clearSelection(),this.interaction=!0);break;case"showFileExtension":case"showHiddenItems":ga(this.parent,Yt,this.parent.path);break;case"showItemCheckBoxes":case"allowMultiSelection":(0,t.isNullOrUndefined)(this.gridObj)||(this.currentSelectedItem=this.parent.selectedItems,this.gridObj.selectionSettings.type=e.newProp.allowMultiSelection?"Multiple":"Single",this.isSelectionUpdate=!0,this.renderCheckBox());break;case"view":dn(this.parent,"Details");break;case"width":this.onDetailsResize()}}},e.prototype.onPathChanged=function(e){this.parent.isCut=!1;var i=this.parent.detailsViewSettings.columns.find((function(e){return"filterPath"===e.field}));(""===this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.gridObj||!(0,t.isNullOrUndefined)(i)&&!(0,t.isNullOrUndefined)(i.hideAtMedia)&&""!==i.hideAtMedia)&&(this.parent.searchedItems=[],this.parent.isFiltered?this.updatePathColumn():this.removePathColumn(!1)),rn(this.parent),"Details"===this.parent.view&&(this.isInteracted=!1,(0,Gi.showSpinner)(this.parent.element),this.parent.setProperties({selectedItems:[]},!0),this.gridObj.dataSource=On(this.parent,e.files),this.gridObj.freezeRefresh(),this.parent.isReact&&this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this),this.wireClickEvent(!0)),this.emptyArgs=e},e.prototype.updatePathColumn=function(){var e=this.gridObj.columns.length,t=JSON.parse(JSON.stringify(this.gridObj.columns));if(t[e-1].field&&"filterPath"!==t[e-1].field&&!this.parent.isMobile){var i={field:"filterPath",headerText:jn(this.parent,"Path"),minWidth:180,width:"auto"};this.gridObj.columns.push(i),this.adjustWidth(this.gridObj.columns,"filterPath"),this.adjustWidth(this.gridObj.columns,"name"),this.isColumnRefresh=!0,this.gridObj.refreshColumns()}},e.prototype.checkEmptyDiv=function(e){var i=On(this.parent,e.files);if(0!==i.length||(0,t.isNullOrUndefined)(this.element.querySelector("."+Xe))){if(0!==i.length&&this.element.querySelector("."+Pe))if(this.element.querySelector("."+Xe).querySelector("."+Pe)){var n=this.element.querySelector("."+Xe).querySelector("."+Pe);this.element.querySelector("."+Xe).removeChild(n)}else this.element.removeChild(this.element.querySelector("."+Pe))}else Dn(this.parent,this.element,e)},e.prototype.onOpenInit=function(){if("detailsview"===this.parent.activeModule){var e=this.gridObj.getSelectedRecords()[0];this.openContent(e)}},e.prototype.DblClickEvents=function(e){var t;this.gridObj.selectRows([e.rowIndex]),e.rowData&&(t=JSON.parse(JSON.stringify(e.rowData)),this.openContent(t))},e.prototype.openContent=function(e){var i=this;if(aa(e)){var n={cancel:!1,fileDetails:e,module:"DetailsView"};this.parent.trigger("fileOpen",n,(function(n){if(!n.cancel){var a=(0,t.getValue)("name",e);if((0,t.getValue)("isFile",e)){if(bn(e)===Ae){var s=vn(i.parent,e);vs(i.parent,a,s)}}else{if(""!==i.parent.breadcrumbbarModule.searchObj.element.value||i.parent.isFiltered)Mn(i.parent,e);else{var r=(0,t.getValue)("id",e);i.parent.oldPath=i.parent.path;var o=i.parent.path+((0,t.isNullOrUndefined)(r)?a:r)+"/";i.parent.setProperties({path:o},!0),i.parent.pathNames.push(a),i.parent.pathId.push((0,t.getValue)("_fm_id",e)),i.parent.itemData=[e],un(i.parent)}i.parent.isFiltered=!1}i.element.focus(),i.parent.enableVirtualization&&i.parent.element.querySelector("#"+i.parent.element.id+B).focus()}}))}else ia(this.parent,e,_i)},e.prototype.onLayoutChange=function(e){"Details"===this.parent.view&&(this.parent.enableVirtualization&&this.parent.setProperties({selectedItems:[]},!0),this.gridObj?this.isLoaded=!0:this.render(e),this.parent.isFiltered&&(this.updatePathColumn(),this.parent.setProperties({selectedItems:[]},!0)),this.gridObj.dataSource=On(this.parent,e.files),this.parent.notify(Ci,{}),this.gridObj.element.classList.remove(jt),this.isInteracted=!1,this.gridObj.clearSelection(),""!==this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.onSearchFiles(e),this.adjustHeight(),this.gridObj.sortSettings.columns.length>0&&this.gridObj.sortSettings.columns[0].field!==this.parent.sortBy&&"None"!==this.parent.sortOrder&&this.gridObj.sortColumn(this.parent.sortBy,this.parent.sortOrder))},e.prototype.onSearchFiles=function(e){"Details"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(ri,{}),this.parent.isLayoutChange||(this.parent.layoutSelectedItems=[]),this.updatePathColumn(),this.parent.searchedItems=e.files,this.onPathChanged(e))},e.prototype.removePathColumn=function(e){var i=this.gridObj.columns.length,n=JSON.parse(JSON.stringify(this.gridObj.columns)),a=this.parent.detailsViewSettings.columns.some((function(e){return"filterPath"===e.field}));n[i-1].field&&"filterPath"===n[i-1].field&&!a&&((0,t.isNullOrUndefined)(this.gridObj.sortSettings.columns[0])||"filterPath"!==this.gridObj.sortSettings.columns[0].field||("None"!==this.parent.sortOrder?this.gridObj.sortColumn("name",this.parent.sortOrder):this.gridObj.dataSource=On(this.parent,this.gridObj.dataSource),this.parent.notify(pi,{})),this.gridObj.columns.pop(),e||(this.isColumnRefresh=!0,this.gridObj.refreshColumns()))},e.prototype.onFinalizeEnd=function(e){"Details"===this.parent.view&&(this.gridObj?this.onPathChanged(e):this.render(e))},e.prototype.onCreateEnd=function(e){"Details"===this.parent.view&&this.onPathChanged(e)},e.prototype.onRenameInit=function(){"detailsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},e.prototype.onSelectedData=function(){"detailsview"===this.parent.activeModule&&(this.parent.itemData=this.gridObj.getSelectedRecords())},e.prototype.onDeleteInit=function(){"detailsview"===this.parent.activeModule&&Ia(this.parent,this.parent.selectedItems,this.parent.path,"delete")},e.prototype.onDeleteEnd=function(e){"Details"===this.parent.view&&(this.onPathChanged(e),this.parent.setProperties({selectedItems:[]},!0))},e.prototype.onRefreshEnd=function(e){"Details"===this.parent.view&&(this.isInteracted=!1,this.removePathColumn(!1),this.gridObj.dataSource=On(this.parent,e.files),this.emptyArgs=e)},e.prototype.onHideLayout=function(){"Details"!==this.parent.view&&this.gridObj&&this.gridObj.element.classList.add(jt)},e.prototype.onSelectAllInit=function(){"Details"===this.parent.view&&(this.isInteracted=!1,this.parent.allowMultiSelection?this.gridObj.selectionModule.selectRowsByRange(0,this.gridObj.getRows().length):this.gridObj.selectRow(this.gridObj.getRows().length-1),this.isInteracted=!0,this.interaction=!0)},e.prototype.onClearAllInit=function(){"Details"===this.parent.view&&(this.removeSelection(),this.interaction=!0)},e.prototype.onSelectionChanged=function(){(0,t.removeClass)([this.element],Mt),this.parent.selectedItems.length>0&&(0,t.addClass)([this.element],Mt)},e.prototype.onLayoutRefresh=function(){"Details"===this.parent.view&&this.adjustHeight()},e.prototype.onBeforeRequest=function(){this.isRendered=!1},e.prototype.onAfterRequest=function(){this.isRendered=!0},e.prototype.onUpdateSelectionData=function(){"Details"===this.parent.view&&(this.parent.itemData=this.gridObj.getSelectedRecords())},e.prototype.addEventListener=function(){this.parent.on(Ut,this.onFinalizeEnd,this),this.parent.on(Jt,this.destroy,this),this.parent.on(di,this.onLayoutChange,this),this.parent.on(Yt,this.onPathChanged,this),this.parent.on(Vt,this.onCreateEnd,this),this.parent.on(ki,this.onDropInit,this),this.parent.on(ui,this.onDetailsInit,this),this.parent.on(Wt,this.onRefreshEnd,this),this.parent.on(ni,this.onSearchFiles,this),this.parent.on(Vi,this.onMethodCall,this),this.parent.on(ii,this.onActionFailure,this),this.parent.on(At,this.onPropertyChanged,this),this.parent.on(zt,this.onDeleteInit,this),this.parent.on(qt,this.onDeleteEnd,this),this.parent.on(Ii,this.onSelectedData,this),this.parent.on(gi,this.onRenameInit,this),this.parent.on(bi,this.onPathChanged,this),this.parent.on(ai,this.onOpenInit,this),this.parent.on(Ni,this.onSortColumn,this),this.parent.on(si,this.onPathChanged,this),this.parent.on(_t,this.onPathChanged,this),this.parent.on(wi,this.onPasteInit,this),this.parent.on(Ci,this.onHideLayout,this),this.parent.on(oi,this.onSelectAllInit,this),this.parent.on(li,this.onClearAllInit,this),this.parent.on(Pi,this.onPathColumn,this),this.parent.on(ri,this.onSelectionChanged,this),this.parent.on(Qt,this.onBeforeRequest,this),this.parent.on(Zt,this.onAfterRequest,this),this.parent.on(Di,this.onpasteEnd,this),this.parent.on(Oi,this.oncutCopyInit,this),this.parent.on(fi,this.onMenuItemData,this),this.parent.on(Kt,this.onDetailsResizeHandler,this),this.parent.on(Gt,this.onDetailsResize,this),this.parent.on(ti,this.onLayoutRefresh,this),this.parent.on(Ti,this.onDropPath,this),this.parent.on(Ui,this.onUpdateSelectionData,this)},e.prototype.removeEventListener=function(){this.parent.off(Ut,this.onFinalizeEnd),this.parent.off(Jt,this.destroy),this.parent.off(di,this.onLayoutChange),this.parent.off(Yt,this.onPathChanged),this.parent.off(wi,this.onPasteInit),this.parent.off(Vt,this.onCreateEnd),this.parent.off(Wt,this.onRefreshEnd),this.parent.off(ni,this.onSearchFiles),this.parent.off(Vi,this.onMethodCall),this.parent.off(ii,this.onActionFailure),this.parent.off(At,this.onPropertyChanged),this.parent.off(gi,this.onRenameInit),this.parent.off(bi,this.onPathChanged),this.parent.off(_t,this.onPathChanged),this.parent.off(ai,this.onOpenInit),this.parent.off(Ni,this.onSortColumn),this.parent.off(si,this.onPathChanged),this.parent.off(Ci,this.onHideLayout),this.parent.off(oi,this.onSelectAllInit),this.parent.off(li,this.onClearAllInit),this.parent.off(zt,this.onDeleteInit),this.parent.off(qt,this.onDeleteEnd),this.parent.off(Pi,this.onPathColumn),this.parent.off(ri,this.onSelectionChanged),this.parent.off(Qt,this.onBeforeRequest),this.parent.off(Zt,this.onAfterRequest),this.parent.off(Di,this.onpasteEnd),this.parent.off(Oi,this.oncutCopyInit),this.parent.off(ki,this.onDropInit),this.parent.off(Ii,this.onSelectedData),this.parent.off(ui,this.onDetailsInit),this.parent.off(fi,this.onMenuItemData),this.parent.off(Kt,this.onDetailsResizeHandler),this.parent.off(Gt,this.onDetailsResize),this.parent.off(ti,this.onLayoutRefresh),this.parent.off(Ti,this.onDropPath),this.parent.off(Ui,this.onUpdateSelectionData)},e.prototype.onActionFailure=function(){this.interaction=!0},e.prototype.onMenuItemData=function(e){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=[this.gridObj.getRowInfo(e.target).rowData])},e.prototype.onPasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""!==this.parent.folderPath?this.gridObj.getSelectedRecords():[fn(this.parent)])},e.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.parent.itemData=this.gridObj.getSelectedRecords():this.parent.itemData=[(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},e.prototype.dragHelper=function(e){var t,i,n=e.sender.target.closest("tr.e-row");return n?(n.getElementsByClassName("e-fe-text")[0]?t=this.parent.hasId?this.gridObj.getRowInfo(n).rowData.id:n.getElementsByClassName("e-fe-text")[0].innerText:n.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling&&(t=this.parent.hasId?this.gridObj.getRowInfo(n).rowData.id:n.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling.innerText),n&&!n.querySelector(".e-active")&&this.selectRecords([t]),on(this.parent,n),this.parent.activeElements=[],this.parent.dragData=[],this.parent.dragData=this.gridObj.getSelectedRecords(),0===this.parent.dragData.length&&n&&(i=this.gridObj.getRowInfo(n)),i&&this.parent.dragData.push(i.rowData),this.parent.dragPath=this.parent.path,this.parent.activeElements=this.gridObj.getSelectedRows(),Hn(this.parent),this.parent.virtualDragElement):null},e.prototype.onDetailsResize=function(){if("Details"===this.parent.view&&!this.parent.isMobile&&!(0,t.isNullOrUndefined)(this.gridObj))for(var e=this.gridObj.getHeaderContent().querySelector(".e-headercontent").firstChild.childNodes[0],i=this.gridObj.getContent().querySelector(".e-content .e-table").children[0],n=this.gridObj.getColumns(),a=0;a<n.length;a++)(!this.isNameWidth&&"name"===n[a].field||"filterPath"===n[a].field)&&(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===n[a].field?(e.children[a].style.width="120px",i.children[a].style.width="120px"):(e.children[a].style.width="180px",i.children[a].style.width="180px"):this.element.clientWidth>680&&(e.children[a].style.width="auto",i.children[a].style.width="auto"):this.element.clientWidth<=500?(e.children[a].style.width="120px",i.children[a].style.width="120px"):this.element.clientWidth>500&&(e.children[a].style.width="auto",i.children[a].style.width="auto"))},e.prototype.onDetailsResizeHandler=function(){this.onDetailsResize(),"Details"!==this.parent.view||this.parent.isMobile||(0,t.isNullOrUndefined)(this.gridObj)||this.adjustHeight()},e.prototype.createDragObj=function(){var e=this;this.gridObj&&(this.parent.allowDragAndDrop&&(0,t.isNullOrUndefined)(this.dragObj)?this.dragObj=new t.Draggable(this.gridObj.element,{cursorAt:this.parent.dragCursorPosition,distance:5,enableTailMode:!0,dragArea:this.parent.element,dragTarget:"."+je,drag:Yn.bind(this,this.parent),dragStart:function(t){zn(e.parent,t,e.dragObj)},dragStop:Bn.bind(this,this.parent),enableAutoScroll:!1,helper:this.dragHelper.bind(this)}):!this.parent.allowDragAndDrop&&this.dragObj&&(this.dragObj.destroy(),this.dragObj=null))},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent);if(e.target.closest("tr")){var n;n=this.gridObj.getRowInfo(e.target).rowData,this.parent.dropPath=n.isFile?this.parent.path:yn(this.parent,n,this.parent.path),this.parent.dropData=n.isFile?i:n}else this.parent.dropPath=this.parent.path,this.parent.dropData=i}},e.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.gridObj.getSelectedRecords(),this.parent.activeElements=this.gridObj.getSelectedRows())},e.prototype.onpasteEnd=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,(this.parent.path===this.parent.destinationPath||this.parent.path===Fn(this.parent,e)||this.parent.hasId)&&this.onPathChanged(e))},e.prototype.onDropPath=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},e.prototype.getModuleName=function(){return"detailsview"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.gridObj&&(this.parent.isReact&&this.gridObj.off("reactTemplateRender",this.reactTemplateRender),this.unWireEvents(),this.gridObj.destroy()))},e.prototype.updateType=function(e){var i=(0,t.select)("."+Te,e);this.parent.isFile=!!(0,t.isNullOrUndefined)(i)},e.prototype.onSelection=function(e,t){var i={action:e,fileDetails:t.data,isInteracted:this.interaction,cancel:!1,target:t.target};if(this.parent.trigger("fileSelection",i),t.cancel=i.cancel,!this.isMultiSelect){if(this.isMultiSelect=!0,(t.isShiftPressed||t.isCtrlPressed)&&!this.parent.allowMultiSelection&&t.target&&t.target.parentElement&&!t.target.parentElement.classList.contains("e-checkbox-wrapper")){t.cancel=!0;var n=t&&t.rowIndexes?t.rowIndexes[t.rowIndexes.length-1]:t.rowIndex;this.gridObj.selectRow(n)}this.isMultiSelect=!1}},e.prototype.onSelected=function(e){this.parent.activeModule="detailsview",this.parent.isLayoutChange&&!this.parent.isFiltered||this.selectedRecords(),this.parent.notify(ri,{}),1===this.gridObj.getSelectedRowIndexes().length&&(this.firstItemIndex=this.gridObj.selectedRowIndex),this.gridObj.element.setAttribute("tabindex","-1"),this.triggerSelect("select",e);var i=this.gridObj.getRowByIndex(this.gridObj.selectedRowIndex);if(this.updateType(i),!(0,t.isNullOrUndefined)(i)&&!(0,t.isNullOrUndefined)(i.querySelector(".e-checkselect"))){if(1!==this.gridObj.getSelectedRowIndexes().length){var n=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2],a=this.gridObj.getRowByIndex(n);(0,t.isNullOrUndefined)(a)||a.querySelector(".e-checkselect").setAttribute("tabindex","-1")}i.querySelector(".e-rowcell.e-fe-checkbox").removeAttribute("tabindex")}(0,t.isNullOrUndefined)(this.gridObj)||(0,t.isNullOrUndefined)(this.gridObj.element.querySelector(".e-checkselectall"))||this.gridObj.element.querySelector(".e-checkselectall").setAttribute("tabindex","-1");var s=this.gridObj.getSelectedRowIndexes();if(!this.parent.allowMultiSelection)for(var r=0;r<s.length;r++)s[r]===this.gridObj.selectedRowIndex?this.gridObj.getRowByIndex(s[r]).setAttribute("tabindex","0"):this.gridObj.getRowByIndex(s[r]).removeAttribute("tabindex");var o=s.length;if(this.parent.enableVirtualization)this.parent.currentItemText=(0,t.getValue)("name",e.data);else if(o>0){var l=this.gridObj.getRowsObject()[s[o-1]].data;this.parent.currentItemText=(0,t.getValue)("name",l)}var h=(0,t.getValue)("rowIndexes",e),d=(0,t.getValue)("enableSelectMultiTouch",this.gridObj.selectionModule);this.parent.isDevice&&(0,t.isNullOrUndefined)(h)&&e.target&&!d&&!e.target.closest(".e-headercell")&&(this.parent.isFile=(0,t.getValue)("isFile",e.data),this.parent.isFile||this.openContent(e.data)),this.parent.visitedItem=e.row,this.parent.enableVirtualization&&e.isHeaderCheckboxClicked||this.addFocus(this.gridObj.selectedRowIndex),this.parent.isLayoutChange||(this.isInteracted=!0)},e.prototype.onPathColumn=function(){"Details"!==this.parent.view||(0,t.isNullOrUndefined)(this.gridObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||this.removePathColumn(!1)},e.prototype.selectedRecords=function(){this.parent.setProperties({selectedItems:[]},!0);for(var e=this.gridSelectNodes(),t=0;t<e.length;){var i=e[t],n=Qn(this.parent,i);this.parent.selectedItems.push(n),t++}this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)},e.prototype.onDeSelection=function(e){if(!this.parent.allowMultiSelection&&(0,t.isNullOrUndefined)(e.data)){var i=this.gridObj.getRowByIndex(e.rowIndex);(0,t.isNullOrUndefined)(i)||i.removeAttribute("tabindex")}else if(this.gridObj.getSelectedRowIndexes().length>1){var n=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2],a=this.gridObj.getRowByIndex(n);(0,t.isNullOrUndefined)(a)||a.querySelector(".e-checkselect").removeAttribute("tabindex")}-1===this.gridObj.selectedRowIndex&&this.gridObj.element.setAttribute("tabindex","0"),this.isInteracted?(this.selectedRecords(),0===this.parent.selectedItems.length&&((0,t.setValue)("enableSelectMultiTouch",!1,this.gridObj.selectionModule),(0,t.removeClass)([this.parent.element],oe)),this.parent.notify(ri,{}),this.triggerSelect("unselect",e),this.parent.visitedItem=null):this.isInteracted=!0},e.prototype.triggerSelect=function(e,t){var i={action:e,fileDetails:t.data,isInteracted:this.interaction};this.parent.trigger("fileSelect",i),this.interaction=!0},e.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new t.KeyboardEvents(this.gridObj.element,{keyAction:this.keyupHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new t.KeyboardEvents(this.element,{keyAction:this.keydownHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),t.EventHandler.add(this.gridObj.element,"blur",this.removeFocus,this),t.EventHandler.add(this.parent.element,"focusout",this.onBlur,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),this.keyboardModule.destroy(),this.keyboardDownModule.destroy(),t.EventHandler.remove(this.gridObj.element,"blur",this.removeFocus),t.EventHandler.remove(this.parent.element,"focusout",this.onBlur)},e.prototype.wireClickEvent=function(e){var i=this;if(e){var n=this.gridObj.getContent();this.clickObj=new t.Touch(n,{tap:function(e){1===e.tapCount&&e.originalEvent.target.classList.contains("e-content")&&i.onClearAllInit()},tapHold:function(e){if(i.parent.isDevice){e.originalEvent.preventDefault(),i.parent.allowMultiSelection&&((0,t.setValue)("enableSelectMultiTouch",i.parent.allowMultiSelection,i.gridObj.selectionModule),(0,t.addClass)([i.parent.element],oe));var n=e.originalEvent.target;if(n){var a=(0,t.closest)(n,"."+je),s=i.gridObj.getRows().indexOf(a);i.gridObj.selectRow(s)}}}})}else this.clickObj&&this.clickObj.destroy()},e.prototype.removeSelection=function(){(0,t.removeClass)([this.parent.element],oe),this.gridObj.clearSelection(),this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(ri,{}),-1===this.gridObj.selectedRowIndex&&(this.startIndex=null),this.isInteracted=!0},e.prototype.removeFocus=function(){this.addFocus(null)},e.prototype.onBlur=function(e){if((null===e.relatedTarget||(0,t.closest)(e.relatedTarget,".e-grid")===e.relatedTarget)&&!(0,t.isNullOrUndefined)(this.gridObj.element))for(var i=this.gridObj.element.querySelectorAll("th"),n=0;n<i.length;n++)i[n].classList.contains("e-focus")&&this.addFocus(null)},e.prototype.getFocusedItemIndex=function(){return(0,t.isNullOrUndefined)(this.getFocusedItem())?null:parseInt(this.getFocusedItem().getAttribute("aria-rowindex"),10)-1},e.prototype.keydownHandler=function(e){if(this.isRendered)switch(e.action){case"end":case"home":case"space":case"ctrlSpace":case"shiftSpace":case"csSpace":case"ctrlA":case"enter":case"altEnter":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"esc":case"del":case"shiftdel":case"ctrlC":case"ctrlV":case"ctrlX":case"f2":case"moveDown":case"moveUp":case"ctrlD":e.preventDefault()}},e.prototype.keyupHandler=function(e){if(this.isRendered){e.preventDefault();var i,n,a,s=e.action,r=On(this.parent,this.gridObj.dataSource),o=r.length,l=this.getFocusedItemIndex(),h=this.gridObj.selectedRowIndex,d=this.gridObj.getSelectedRowIndexes();switch(s){case"altEnter":this.parent.notify(ui,{}),Oa(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":nn(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"enter":if(-1===this.gridObj.selectedRowIndex&&!0===this.gridObj.allowSorting){if(!e.target.classList.contains("e-fe-grid-icon")){var p=e.target.getElementsByClassName("e-ascending").length?"Descending":"Ascending",c=this.gridObj.getColumnByUid(e.target.querySelector(".e-headercelldiv").getAttribute("e-mappinguid")).field;this.gridObj.sortColumn(c,p),(0,t.isNullOrUndefined)(this.getFocusedItem().nextSibling)||this.getFocusedItem().nextSibling.setAttribute("tabindex","0")}break}if(i=this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data){var u=JSON.parse(JSON.stringify(i));this.openContent(u)}break;case"ctrlC":gn(this.parent);break;case"ctrlV":this.parent.folderPath="",kn(this.parent);break;case"ctrlX":mn(this.parent);break;case"ctrlD":this.doDownload();break;case"f2":this.performRename();break;case"ctrlA":if(!(0,t.isNullOrUndefined)(r[0])&&this.parent.allowMultiSelection){var f=this.gridObj.getContent().querySelector(".e-content"),g=f.scrollTop,m=this.gridObj.selectedRowIndex;this.gridObj.selectionModule.selectRowsByRange(0,r.length-1),f.scrollTop=g,-1!==m&&this.addFocus(m)}break;case"ctrlHome":case"tab":if(!(0,t.isNullOrUndefined)(r[0]))if(this.parent.allowMultiSelection||"ctrlHome"!==e.action){if(-1!==this.gridObj.selectedRowIndex&&"tab"===e.action)return;this.addHeaderFocus(e)}else this.gridObj.selectRow(0);break;case"ctrlEnd":(0,t.isNullOrUndefined)(r[0])||(this.parent.allowMultiSelection?this.addFocus(o-1):this.gridObj.selectRow(o-1));break;case"shiftHome":case"shiftEnd":case"csHome":case"csEnd":this.parent.allowMultiSelection?(0,t.isNullOrUndefined)(r[0])||((0,t.isNullOrUndefined)(h)||-1===h?"csHome"===e.action||"shiftHome"===e.action?this.gridObj.selectRow(0):this.gridObj.selectionModule.selectRowsByRange(0,r.length-1):this.checkRowsKey(r,h,null,e)):this.gridObj.selectRow("shiftHome"===e.action||"csHome"===e.action?0:r.length-1);break;case"space":case"csSpace":case"shiftSpace":case"ctrlSpace":this.spaceSelection(d,l,h,e);break;case"csUp":case"csDown":case"shiftUp":case"shiftDown":this.shiftMoveMethod(r,h,l,d,e);break;case"ctrlUp":case"ctrlDown":this.parent.allowMultiSelection?this.ctrlMoveFunction(r,e,h):this.moveFunction(r,e,h);break;case"home":n=[(0,t.getValue)(this.parent.hasId?"id":"name",r[0])],this.parent.setProperties({selectedItems:n},!0),this.selectRecords(n);break;case"moveUp":case"moveDown":this.moveFunction(r,e,h);break;case"end":a=[(0,t.getValue)(this.parent.hasId?"id":"name",r[o-1])],this.parent.setProperties({selectedItems:a},!0),this.selectRecords(a);break;case"back":this.parent.traverseBackward()}}},e.prototype.gridSelectNodes=function(){return this.gridObj.getSelectedRecords()},e.prototype.doDownload=function(){if(0!==this.parent.selectedItems.length){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!la(e[t]))return void ia(this.parent,e[t],Wi);Ga(this.parent,this.parent.path,this.parent.selectedItems)}},e.prototype.performDelete=function(){if(this.parent.selectedItems&&this.parent.selectedItems.length>0){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!sa(e[t]))return void ia(this.parent,e[t],Hi);Xa(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),$n(this.parent))},e.prototype.updateRenameData=function(){var e=this.gridSelectNodes()[0];Xn(this.parent,e)},e.prototype.shiftMoveMethod=function(e,t,i,n,a){this.parent.allowMultiSelection?-1!==t||"csUp"!==a.action&&"csDown"!==a.action?-1===t||i===t||("csUp"===a.action||"csDown"===a.action)&&this.isSelected(n,i)?this.shiftSelectedItem(t,n,e,a):this.shiftSelectFocusItem(t,i,n,a):this.ctrlMoveFunction(e,a,t):this.moveFunction(e,a,t)},e.prototype.moveFunction=function(e,i,n){!(0,t.isNullOrUndefined)(this.getFocusedItem())&&this.parent.allowMultiSelection?"moveDown"===i.action?this.gridObj.selectRow(this.getFocusedItemIndex()+1):this.gridObj.selectRow(this.getFocusedItemIndex()-1):(0,t.isNullOrUndefined)(n)||-1===n?(0,t.isNullOrUndefined)(e[0])||this.gridObj.selectRow(0):"moveDown"===i.action||"ctrlDown"===i.action||"shiftDown"===i.action||"csDown"===i.action?this.gridObj.selectRow(n+(n!==e.length-1?1:0)):this.gridObj.selectRow(n-(0!==n?1:0))},e.prototype.spaceSelection=function(e,i,n,a){if(this.isSelected(e,i)||-1===n||"shiftSpace"!==a.action&&"csSpace"!==a.action)if((0,t.isNullOrUndefined)(this.getFocusedItem())||i===n)if(-1!==n&&"ctrlSpace"===a.action&&this.parent.allowMultiSelection){var s=n;e.pop(),this.gridObj.selectRows(e),this.addFocus(s)}else"shiftSpace"===a.action&&this.gridObj.selectRow(n);else e.push(this.getFocusedItemIndex()),this.gridObj.selectRows(e);else i<n?this.gridObj.selectionModule.selectRowsByRange(i,n):this.gridObj.selectionModule.selectRowsByRange(n,i)},e.prototype.ctrlMoveFunction=function(e,i,n){var a;if((0,t.isNullOrUndefined)(this.getFocusedItem()))(0,t.isNullOrUndefined)(n)||-1===n?(0,t.isNullOrUndefined)(e[0])||(a=0):a="ctrlDown"===i.action||"csDown"===i.action?n+(n<e.length?1:0):n-(n<1?0:1);else{var s=this.getFocusedItemIndex();a="ctrlDown"===i.action||"csDown"===i.action?s+(s<e.length-1?1:0):s-(s<1?0:1)}this.addFocus(a)},e.prototype.checkRowsKey=function(e,i,n,a){"Uncheck"===this.gridObj.checkAllRows||"Intermediate"===this.gridObj.checkAllRows?"csHome"!==a.action&&"csEnd"!==a.action?((0,t.isNullOrUndefined)(this.startIndex)&&this.firstItemIndex!==i&&(this.firstItemIndex=i),"shiftEnd"===a.action?this.gridObj.selectionModule.selectRowsByRange(this.firstItemIndex,e.length-1):this.gridObj.selectionModule.selectRowsByRange(0,this.firstItemIndex),this.startIndex=i):"csEnd"===a.action?this.gridObj.selectRows(this.InnerItems((0,t.isNullOrUndefined)(i)?0:i,(0,t.isNullOrUndefined)(n)?e.length-1:n,a)):(0,t.isNullOrUndefined)(i)?this.gridObj.selectRow(0):this.gridObj.selectRows(this.InnerItems((0,t.isNullOrUndefined)(n)?0:n,i,a)):this.gridObj.selectionModule.selectRow("shiftHome"===a.action||"csHome"===a.action?0:e.length-1)},e.prototype.InnerItems=function(e,t,i){var n=this.gridObj.getSelectedRowIndexes();if("csEnd"===i.action)for(var a=e+1;a<=t;a++)n.push(a);else for(a=t-1;e<=a;a--)n.push(a);return n},e.prototype.shiftSelectFocusItem=function(e,i,n,a){var s=i+("shiftDown"===a.action||"csDown"===a.action?1:-1),r=(0,t.isNullOrUndefined)(this.startIndex)?e:n[0];r===s?this.gridObj.selectRow(r):r<s?"shiftDown"===a.action||"csDown"===a.action?this.gridObj.selectionModule.selectRowsByRange(r,s):this.gridObj.selectionModule.selectRowsByRange(s,r):"shiftDown"===a.action||"csDown"===a.action?this.gridObj.selectionModule.selectRowsByRange(s,r):this.gridObj.selectionModule.selectRowsByRange(r,s),this.startIndex=this.gridObj.selectedRowIndex},e.prototype.addFocus=function(e){var i=this.getFocusedItem(),n=this.gridObj.getRowByIndex(e);i&&(i.removeAttribute("tabindex"),(0,t.removeClass)([i],[we,De])),(0,t.isNullOrUndefined)(n)||(this.gridObj.element.setAttribute("tabindex","-1"),n.setAttribute("tabindex","0"),n.focus(),(0,t.addClass)([n],[we,De]))},e.prototype.addHeaderFocus=function(e){var i,n=(0,t.select)(".e-row",this.element);this.gridObj.element.setAttribute("tabindex","-1"),!(0,t.isNullOrUndefined)(e.target)&&e.target.classList.contains("e-defaultcursor")?(this.addFocus(0),i=e.target.nextElementSibling):(0,t.isNullOrUndefined)(this.gridObj.element.querySelector(".e-focus"))||"TH"!==this.gridObj.element.querySelector(".e-focus").tagName?i=(0,t.select)("th.e-fe-grid-icon",this.element):(i=this.gridObj.element.querySelector(".e-focus").nextElementSibling,this.addFocus(0)),(0,t.isNullOrUndefined)(i)||(i.setAttribute("tabindex","0"),i.focus(),(0,t.addClass)([i],[we,De]),n.setAttribute("tabindex","0"),0===n.tabIndex&&0===i.tabIndex&&(0,t.removeClass)([n],[we,De]))},e.prototype.getFocusedItem=function(){return(0,t.select)("."+De,this.element)},e.prototype.isSelected=function(e,t){for(var i=!1,n=0;n<=e.length-1;n++)if(e[n]===t){i=!0;break}return i},e.prototype.shiftSelectedItem=function(e,i,n,a){-1===e?this.gridObj.selectRow(0):(0,t.isNullOrUndefined)(this.startIndex)&&a.shiftKey?(this.startIndex=this.gridObj.selectedRowIndex,this.gridObj.selectRows([e,"shiftDown"===a.action||"csDown"===a.action?e+(e!==n.length-1?1:0):e-(0!==e?1:0)])):"shiftDown"===a.action||"shiftUp"===a.action?("shiftDown"===a.action&&-1===i.indexOf(e+1)?e!==n.length-1&&i.push(e+1):"shiftUp"===a.action&&-1===i.indexOf(e-1)?0!==e&&i.push(e-1):i.pop(),this.gridObj.selectRows(i)):"csDown"===a.action?this.isSelected(i,this.getFocusedItemIndex()+1)?this.addFocus(this.getFocusedItemIndex()+1):(i.push(this.getFocusedItemIndex()+1),this.gridObj.selectRows(i)):this.isSelected(i,this.getFocusedItemIndex()-1)?this.addFocus(this.getFocusedItemIndex()-1):(i.push(this.getFocusedItemIndex()-1),this.gridObj.selectRows(i))},e.prototype.onMethodCall=function(e){if("Details"===this.parent.view)switch((0,t.getValue)("action",e)){case"deleteFiles":this.deleteFiles((0,t.getValue)("ids",e));break;case"downloadFiles":this.downloadFiles((0,t.getValue)("ids",e));break;case"openFile":this.openFile((0,t.getValue)("id",e));break;case"createFolder":this.interaction=!1;break;case"renameFile":this.interaction=!1,this.renameFile((0,t.getValue)("id",e),(0,t.getValue)("newName",e));break;case"selectAll":this.interaction=!1,this.onSelectAllInit();break;case"clearSelection":this.interaction=!1,this.onClearAllInit()}},e.prototype.getRecords=function(e){var i=this.gridObj.getCurrentViewRecords(),n=[],a=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),s=this.parent.hasId?"id":"name";if(this.parent.hasId||!a)for(var r=0,o=i.length;r<o;r++)-1!==e.indexOf((0,t.getValue)(s,i[r]))&&n.push(i[r]);else for(r=0,o=i.length;r<o;r++){var l=(0,t.getValue)("filterPath",i[r])+(0,t.getValue)("name",i[r]);-1!==e.indexOf(l)&&n.push(i[r])}return n},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="detailsview",(0,t.isNullOrUndefined)(e))this.performDelete();else{var i=this.getRecords(e);if(0!==i.length){for(var n=[],a=[],s=0;s<i.length;s++)n[s]=i[s],a[s]=Qn(this.parent,n[s]);ea(this.parent,n,a)}}},e.prototype.downloadFiles=function(e){if((0,t.isNullOrUndefined)(e))this.doDownload();else{var i=this.getRecords(e);if(0!==i.length){for(var n=[],a=[],s=0;s<i.length;s++)n[s]=i[s],a[s]=Qn(this.parent,n[s]);ta(this.parent,n,a)}}},e.prototype.openFile=function(e){if(!(0,t.isNullOrUndefined)(e)){var i=this.getRecords([e]);i.length>0&&this.openContent(i[0])}},e.prototype.renameFile=function(e,i){if(this.parent.activeModule="detailsview",(0,t.isNullOrUndefined)(e))this.performRename();else{var n=this.getRecords([e]);n.length>0&&(Xn(this.parent,n[0]),(0,t.isNullOrUndefined)(i)?$n(this.parent):sa(this.parent.itemData[0])?va(this.parent,this.parent.path,i):ia(this.parent,this.parent.itemData[0],Hi))}},e}()})(),u})()));
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionLayouts"),require("SyncfusionPopups"),require("SyncfusionData"),require("SyncfusionGrids"),require("SyncfusionInputs"),require("SyncfusionButtons"),require("SyncfusionLists"),require("SyncfusionSplitbuttons"),require("SyncfusionNavigations")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionLayouts","SyncfusionPopups","SyncfusionData","SyncfusionGrids","SyncfusionInputs","SyncfusionButtons","SyncfusionLists","SyncfusionSplitbuttons","SyncfusionNavigations"],t):"object"==typeof exports?exports.SyncfusionFilemanager=t(require("SyncfusionBase"),require("SyncfusionLayouts"),require("SyncfusionPopups"),require("SyncfusionData"),require("SyncfusionGrids"),require("SyncfusionInputs"),require("SyncfusionButtons"),require("SyncfusionLists"),require("SyncfusionSplitbuttons"),require("SyncfusionNavigations")):e.SyncfusionFilemanager=t(e.SyncfusionBase,e.SyncfusionLayouts,e.SyncfusionPopups,e.SyncfusionData,e.SyncfusionGrids,e.SyncfusionInputs,e.SyncfusionButtons,e.SyncfusionLists,e.SyncfusionSplitbuttons,e.SyncfusionNavigations)}(self,((e,t,i,n,a,s,r,o,l,h)=>(()=>{"use strict";var d={766:t=>{t.exports=e},741:e=>{e.exports=r},74:e=>{e.exports=n},707:e=>{e.exports=a},323:e=>{e.exports=s},40:e=>{e.exports=t},90:e=>{e.exports=o},215:e=>{e.exports=h},197:e=>{e.exports=i},295:e=>{e.exports=l}},p={};function c(e){var t=p[e];if(void 0!==t)return t.exports;var i=p[e]={exports:{}};return d[e](i,i.exports,c),i.exports}c.d=(e,t)=>{for(var i in t)c.o(t,i)&&!c.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{c.r(u),c.d(u,{ACTIVE:()=>Ie,ALT_DIALOG_ID:()=>H,AjaxSettings:()=>a,BLUR:()=>ye,BREADCRUMBBAR_ID:()=>X,BREADCRUMBS:()=>Ct,BreadCrumbBar:()=>Ss,CB_WRAP:()=>xe,CHECK:()=>Se,CHECK_SELECT:()=>ne,CLONE:()=>Me,COLLAPSED:()=>Nt,CONTENT_ID:()=>Q,CONTEXT_MENU_ID:()=>K,CONTROL:()=>ie,Column:()=>k,ContextMenu:()=>xs,ContextMenuSettings:()=>S,DETAILS_LABEL:()=>wt,DIALOG_ID:()=>_,DISPLAY_NONE:()=>jt,DROP_FILE:()=>Le,DROP_FOLDER:()=>ke,Delete:()=>Ia,DetailsView:()=>Ls,DetailsViewSettings:()=>v,Download:()=>Ga,EMPTY:()=>Pe,EMPTY_CONTENT:()=>Ee,EMPTY_INNER_CONTENT:()=>Re,ERROR_CONTENT:()=>Dt,EXTN_DIALOG_ID:()=>z,FILTER:()=>le,FOCUS:()=>we,FOCUSED:()=>De,FOLDER:()=>Te,FRAME:()=>Ce,FULLROW:()=>Pt,FileManager:()=>Es,GRID_CONTENT:()=>$e,GRID_HEADER:()=>We,GRID_ID:()=>U,GRID_VIEW:()=>Xe,GetDetails:()=>Oa,HEADER_CHECK:()=>Mt,HOVER:()=>Oe,ICONS:()=>Ot,ICON_BREADCRUMB:()=>mt,ICON_CLEAR:()=>bt,ICON_COLLAPSIBLE:()=>Et,ICON_COPY:()=>nt,ICON_CUT:()=>it,ICON_DELETE:()=>st,ICON_DETAILS:()=>lt,ICON_DOWNLOAD:()=>ct,ICON_DROP_IN:()=>vt,ICON_DROP_OUT:()=>yt,ICON_GRID:()=>ft,ICON_IMAGE:()=>Ae,ICON_LARGE:()=>gt,ICON_MUSIC:()=>Fe,ICON_NEWFOLDER:()=>ot,ICON_NO_DROP:()=>It,ICON_OPEN:()=>et,ICON_OPTIONS:()=>ut,ICON_PASTE:()=>at,ICON_REFRESH:()=>dt,ICON_RENAME:()=>rt,ICON_SELECTALL:()=>pt,ICON_SHORTBY:()=>ht,ICON_UPLOAD:()=>tt,ICON_VIDEO:()=>Ue,ICON_VIEW:()=>Ze,IMG_DIALOG_ID:()=>B,LARGEICON_ID:()=>V,LARGE_EMPTY_FOLDER:()=>_e,LARGE_EMPTY_FOLDER_TWO:()=>He,LARGE_ICON:()=>Ve,LARGE_ICONS:()=>ce,LARGE_ICON_FOLDER:()=>Be,LAYOUT:()=>he,LAYOUT_CONTENT:()=>pe,LAYOUT_ID:()=>T,LIST_ITEM:()=>fe,LIST_PARENT:()=>me,LIST_TEXT:()=>ge,LargeIconsView:()=>ws,MENU_ICON:()=>Je,MENU_ITEM:()=>Ye,MOBILE:()=>se,MOB_POPUP:()=>re,MULTI_SELECT:()=>oe,NAVIGATION:()=>de,NAVIGATION_ID:()=>A,NavigationPane:()=>ks,NavigationPaneSettings:()=>j,OVERLAY:()=>kt,RETRY_DIALOG_ID:()=>W,RETRY_ID:()=>Z,ROOT:()=>te,ROOT_POPUP:()=>ae,ROW:()=>je,ROWCELL:()=>Ne,RTL:()=>xt,SEARCH_ID:()=>ee,SELECTED_ITEMS:()=>ze,SORTBY_ID:()=>G,SPLITTER_ID:()=>J,SPLIT_BAR:()=>Rt,STATUS:()=>St,SUBMENU_ICON:()=>Qe,Search:()=>Wa,SearchSettings:()=>f,TB_ITEM:()=>ue,TB_OPTION_DOT:()=>ve,TB_OPTION_TICK:()=>be,TEMPLATE_CELL:()=>Ke,TEXT_CONTENT:()=>qe,TOOLBAR_ID:()=>L,TREE_ID:()=>F,TREE_VIEW:()=>Ge,Toolbar:()=>Rs,ToolbarItem:()=>h,ToolbarSettings:()=>l,UPLOAD_DIALOG_ID:()=>q,UPLOAD_ID:()=>$,UploadSettings:()=>E,VALUE:()=>Lt,VIEW_ID:()=>Y,Virtualization:()=>Ms,actionFailure:()=>ii,activeElement:()=>an,addBlur:()=>sn,afterRequest:()=>Zt,beforeDelete:()=>Ht,beforeDownload:()=>Ri,beforeRequest:()=>Qt,clearAllInit:()=>li,clearPathInit:()=>hi,closePopup:()=>pa,columnArray:()=>b,copyFiles:()=>gn,createDeniedDialog:()=>ia,createDialog:()=>Xa,createEmptyElement:()=>Dn,createEnd:()=>Vt,createExtDialog:()=>$a,createFolder:()=>ma,createImageDialog:()=>vs,createNewFolder:()=>ha,createVirtualDragElement:()=>Hn,cutCopyInit:()=>Oi,cutEnd:()=>Si,cutFiles:()=>mn,defaultToolbarItems:()=>o,deleteEnd:()=>qt,deleteInit:()=>zt,destroy:()=>Jt,detailsInit:()=>ui,doDeleteFiles:()=>ea,doDownload:()=>Zn,doDownloadFiles:()=>ta,doPasteUpdate:()=>Un,doRename:()=>$n,download:()=>ei,downloadInit:()=>Mi,dragCancel:()=>qn,dragEnd:()=>Li,dragHelper:()=>Ai,dragStartHandler:()=>zn,dragStopHandler:()=>Bn,dragging:()=>Fi,draggingHandler:()=>Yn,dropHandler:()=>Tn,dropInit:()=>ki,dropPath:()=>Ti,fileItems:()=>O,fileType:()=>bn,filter:()=>ba,filterEnd:()=>_t,finalizeEnd:()=>Ut,folderItems:()=>w,generatePath:()=>tn,getAccessClass:()=>na,getAccessDetails:()=>ua,getAllChildItems:()=>ln,getCssClass:()=>Nn,getDirectories:()=>Sn,getDirectoryPath:()=>Fn,getDuplicateData:()=>_n,getFullPath:()=>yn,getImageUrl:()=>vn,getItemName:()=>Qn,getLocaleText:()=>jn,getModule:()=>on,getName:()=>In,getObject:()=>wn,getParentPath:()=>An,getParents:()=>en,getPath:()=>Xi,getPathId:()=>$i,getPathNames:()=>Zi,getPathObject:()=>fn,getSortField:()=>En,getSortedData:()=>On,getTargetModule:()=>pn,getTargetPath:()=>ca,hasContentAccess:()=>ra,hasDownloadAccess:()=>la,hasEditAccess:()=>sa,hasReadAccess:()=>aa,hasUploadAccess:()=>oa,hideLayout:()=>Ci,hidePaste:()=>yi,initialEnd:()=>Ft,isFile:()=>Tt,isFileSystemData:()=>wa,layoutChange:()=>di,layoutItems:()=>D,layoutRefresh:()=>ti,menuItemData:()=>fi,methodCall:()=>Vi,modelChanged:()=>At,nodeExpand:()=>ci,objectToString:()=>Jn,openAction:()=>un,openEnd:()=>si,openInit:()=>ai,openSearchFolder:()=>Mn,paste:()=>ya,pasteEnd:()=>Di,pasteHandler:()=>kn,pasteInit:()=>wi,pathChanged:()=>Yt,pathColumn:()=>Pi,pathDrag:()=>Bt,permissionCopy:()=>zi,permissionDownload:()=>Wi,permissionEdit:()=>Hi,permissionEditContents:()=>Bi,permissionRead:()=>_i,permissionUpload:()=>qi,read:()=>ga,readDropPath:()=>Vn,refresh:()=>cn,refreshEnd:()=>Wt,removeActive:()=>nn,removeBlur:()=>rn,removeDropTarget:()=>Wn,removeItemClass:()=>Kn,rename:()=>va,renameEnd:()=>bi,renameEndParent:()=>mi,renameInit:()=>gi,resizeEnd:()=>Kt,scrollHandler:()=>Gn,search:()=>ni,searchTextChange:()=>Ei,searchWordHandler:()=>hn,selectAllInit:()=>oi,selectedData:()=>Ii,selectionChanged:()=>ri,setDateObject:()=>xn,setNextPath:()=>Rn,setNodeId:()=>Cn,showPaste:()=>vi,skipUpload:()=>$t,sortByChange:()=>pi,sortColumn:()=>Ni,sortComparer:()=>Ji,sortbyClickHandler:()=>Pn,splitterResize:()=>Gt,treeSelect:()=>ji,updateLayout:()=>dn,updatePath:()=>Qi,updateRenamingData:()=>Xn,updateSelectionData:()=>Ui,updateTreeSelection:()=>xi,upload:()=>Xt,uploadItem:()=>da,validateSubFolder:()=>Ln});var e,t=c(766),i=(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])},e(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}),n=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},a=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return i(a,e),n([(0,t.Property)(null)],a.prototype,"downloadUrl",void 0),n([(0,t.Property)(null)],a.prototype,"getImageUrl",void 0),n([(0,t.Property)(null)],a.prototype,"uploadUrl",void 0),n([(0,t.Property)(null)],a.prototype,"url",void 0),a}(t.ChildProperty),s=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])},e(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)}}(),r=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},o=["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"],l=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return s(i,e),r([(0,t.Property)(o)],i.prototype,"items",void 0),r([(0,t.Property)(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),h=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return s(i,e),r([(0,t.Property)("")],i.prototype,"id",void 0),r([(0,t.Property)("")],i.prototype,"text",void 0),r([(0,t.Property)("auto")],i.prototype,"width",void 0),r([(0,t.Property)("")],i.prototype,"cssClass",void 0),r([(0,t.Property)(!1)],i.prototype,"showAlwaysInPopup",void 0),r([(0,t.Property)(!1)],i.prototype,"disabled",void 0),r([(0,t.Property)("")],i.prototype,"prefixIcon",void 0),r([(0,t.Property)("")],i.prototype,"suffixIcon",void 0),r([(0,t.Property)(!0)],i.prototype,"visible",void 0),r([(0,t.Property)("None")],i.prototype,"overflow",void 0),r([(0,t.Property)("")],i.prototype,"template",void 0),r([(0,t.Property)("Button")],i.prototype,"type",void 0),r([(0,t.Property)("Both")],i.prototype,"showTextOn",void 0),r([(0,t.Property)(null)],i.prototype,"htmlAttributes",void 0),r([(0,t.Property)("")],i.prototype,"tooltipText",void 0),r([(0,t.Property)("Left")],i.prototype,"align",void 0),r([(0,t.Property)(-1)],i.prototype,"tabIndex",void 0),r([(0,t.Property)()],i.prototype,"name",void 0),i}(t.ChildProperty),d=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])},e(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)}}(),p=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},f=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return d(i,e),p([(0,t.Property)(!0)],i.prototype,"allowSearchOnTyping",void 0),p([(0,t.Property)("contains")],i.prototype,"filterType",void 0),p([(0,t.Property)(!0)],i.prototype,"ignoreCase",void 0),p([(0,t.Property)(null)],i.prototype,"placeholder",void 0),i}(t.ChildProperty),g=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])},e(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)}}(),m=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=[{field:"name",headerText:"Name",minWidth:120,template:'<span class="e-fe-text">${name}</span>',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:(0,t.initializeCSPTemplate)((function(e){return'<span class="e-fe-size">'+e.size+"</span>"})),format:"n2"}],v=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return g(i,e),m([(0,t.Property)(!0)],i.prototype,"columnResizing",void 0),m([(0,t.Property)(b)],i.prototype,"columns",void 0),i}(t.ChildProperty),y=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])},e(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)}}(),I=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},O=["Open","|","Cut","Copy","|","Delete","Download","Rename","|","Details"],w=["Open","|","Cut","Copy","Paste","|","Delete","Rename","Download","|","Details"],D=["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"],S=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return y(i,e),I([(0,t.Property)(O)],i.prototype,"file",void 0),I([(0,t.Property)(w)],i.prototype,"folder",void 0),I([(0,t.Property)(D)],i.prototype,"layout",void 0),I([(0,t.Property)(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),C=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])},e(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)}}(),x=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},j=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return C(i,e),x([(0,t.Property)("650px")],i.prototype,"maxWidth",void 0),x([(0,t.Property)("240px")],i.prototype,"minWidth",void 0),x([(0,t.Property)(!0)],i.prototype,"visible",void 0),x([(0,t.Property)("None")],i.prototype,"sortOrder",void 0),i}(t.ChildProperty),N=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])},e(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)}}(),P=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},E=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return N(i,e),P([(0,t.Property)("")],i.prototype,"allowedExtensions",void 0),P([(0,t.Property)(!0)],i.prototype,"autoUpload",void 0),P([(0,t.Property)(!1)],i.prototype,"autoClose",void 0),P([(0,t.Property)(!1)],i.prototype,"directoryUpload",void 0),P([(0,t.Property)(0)],i.prototype,"minFileSize",void 0),P([(0,t.Property)(3e7)],i.prototype,"maxFileSize",void 0),P([(0,t.Property)(0)],i.prototype,"chunkSize",void 0),i}(t.ChildProperty),R=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])},e(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)}}(),M=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},k=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return R(i,e),M([(0,t.Property)("")],i.prototype,"field",void 0),M([(0,t.Property)("")],i.prototype,"headerText",void 0),M([(0,t.Property)("")],i.prototype,"width",void 0),M([(0,t.Property)("")],i.prototype,"minWidth",void 0),M([(0,t.Property)("")],i.prototype,"maxWidth",void 0),M([(0,t.Property)("Left")],i.prototype,"textAlign",void 0),M([(0,t.Property)(null)],i.prototype,"headerTextAlign",void 0),M([(0,t.Property)(null)],i.prototype,"type",void 0),M([(0,t.Property)(null)],i.prototype,"format",void 0),M([(0,t.Property)(null)],i.prototype,"template",void 0),M([(0,t.Property)(null)],i.prototype,"sortComparer",void 0),M([(0,t.Property)(null)],i.prototype,"headerTemplate",void 0),M([(0,t.Property)(!0)],i.prototype,"allowSorting",void 0),M([(0,t.Property)(!0)],i.prototype,"allowResizing",void 0),M([(0,t.Property)(null)],i.prototype,"customAttributes",void 0),M([(0,t.Property)("")],i.prototype,"hideAtMedia",void 0),M([(0,t.Property)(null)],i.prototype,"customFormat",void 0),M([(0,t.Property)(!1)],i.prototype,"isPrimaryKey",void 0),i}(t.ChildProperty),L="_toolbar",T="_layout",A="_navigation",F="_tree",U="_grid",V="_largeicons",_="_dialog",H="_alt_dialog",B="_img_dialog",z="_extn_dialog",q="_upload_dialog",W="_retry_dialog",K="_contextmenu",G="_sortby",Y="_view",J="_splitter",Q="_content",X="_breadcrumbbar",$="_upload",Z="_retry",ee="_search",te="e-filemanager",ie="e-control",ne="e-fe-cb-select",ae="e-fe-popup",se="e-fe-mobile",re="e-fe-popup e-fe-mobile",oe="e-fe-m-select",le="e-fe-m-filter",he="e-layout",de="e-navigation",pe="e-layout-content",ce="e-large-icons",ue="e-toolbar-item",fe="e-list-item",ge="e-list-text",me="e-list-parent",be="e-icons e-fe-tick",ve="e-icons e-fe-dot",ye="e-blur",Ie="e-active",Oe="e-hover",we="e-focus",De="e-focused",Se="e-check",Ce="e-frame",xe="e-checkbox-wrapper",je="e-row",Ne="e-rowcell",Pe="e-empty",Ee="e-empty-content",Re="e-empty-inner-content",Me="e-fe-clone",ke="e-fe-drop-folder",Le="e-fe-drop-file",Te="e-fe-folder",Ae="e-fe-image",Fe="e-fe-music",Ue="e-fe-video",Ve="e-large-icon",_e="e-empty-icon e-fe-folder",He="e-empty-icon.e-fe-folder",Be="e-fe-folder",ze="e-items",qe="e-text-content",We="e-gridheader",Ke="e-templatecell",Ge="e-treeview",Ye="e-menu-item",Je="e-menu-icon",Qe="e-caret",Xe="e-content",$e="e-gridcontent",Ze="e-list-parent",et="e-icons e-fe-open",tt="e-icons e-fe-upload",it="e-icons e-fe-cut",nt="e-icons e-fe-copy",at="e-icons e-fe-paste",st="e-icons e-fe-delete",rt="e-icons e-fe-rename",ot="e-icons e-fe-newfolder",lt="e-icons e-fe-details",ht="e-icons e-fe-sort",dt="e-icons e-fe-refresh",pt="e-icons e-fe-select",ct="e-icons e-fe-download",ut="e-icons e-fe-options",ft="e-icons e-fe-grid",gt="e-icons e-fe-large",mt="e-icons e-fe-breadcrumb",bt="e-icons e-fe-clear",vt="e-icons e-fe-drop-in",yt="e-icons e-fe-drop-out",It="e-icons e-fe-no-drop",Ot="e-icons",wt="e-detailslabel",Dt="e-fe-errorcontent",St="e-status",Ct="e-address",xt="e-rtl",jt="e-display-none",Nt="e-node-collapsed",Pt="e-fullrow",Et="e-icon-collapsible",Rt="e-split-bar",Mt="e-headercheck",kt="e-fe-overlay",Lt="e-fe-value",Tt="isFile",At="model-changed",Ft="initial-end",Ut="finalize-end",Vt="create-end",_t="filter-end",Ht="before-delete",Bt="path-drag",zt="delete-init",qt="delete-end",Wt="refresh-end",Kt="resize-end",Gt="splitter-resize",Yt="path-changed",Jt="destroy",Qt="before-request",Xt="upload",$t="skip-upload",Zt="after-request",ei="download",ti="layout-refresh",ii="actionFailure",ni="search",ai="open-init",si="open-end",ri="selection-changed",oi="select-all-init",li="clear-all-init",hi="clear-path-init",di="layout-change",pi="sort-by-change",ci="node-expand",ui="details-init",fi="menu-item-data",gi="rename-init",mi="rename-end-parent",bi="rename-end",vi="show-paste",yi="hide-paste",Ii="selected-data",Oi="cut-copy-init",wi="paste-init",Di="paste-end",Si="cut-end",Ci="hide-layout",xi="update-tree-selection",ji="select-node",Ni="sort-column",Pi="path-column",Ei="search-change",Ri="before-download",Mi="download-init",ki="drop-init",Li="drag-end",Ti="drop-path",Ai="drag-helper",Fi="dragging",Ui="update-selection-data",Vi="method-call",_i="read",Hi="write",Bi="writeContents",zi="copy",qi="upload",Wi="download",Ki=c(40),Gi=c(197),Yi=c(74);function Ji(e,t){var i=/\.\S+/.test(e),n=/\.\S+/.test(t);if(i&&!n)return 1;if(!i&&n)return-1;var a=[],s=[];for((e+"").replace(/(\d+)|(\D+)/g,(function(e,t,i){return a.push([t||1/0,i||""]),""})),(t+"").replace(/(\d+)|(\D+)/g,(function(e,t,i){return s.push([t||1/0,i||""]),""}));a.length&&s.length;){var r=a.shift(),o=s.shift();if(r&&o){var l=r[0]-o[0]||r[1].localeCompare(o[1]);if(l)return l}}return a.length-s.length}function Qi(e,i,n){var a=(0,t.getValue)("name",i),s=e.getAttribute("data-id"),r=(0,t.isNullOrUndefined)(s)?a:s;n.setProperties({path:Xi(e,r,n.hasId)},!0),n.pathId=$i(e),n.pathNames=Zi(e,a)}function Xi(e,t,i){for(var n=en(e,t,!1,i),a="/",s=n.length-2;s>=0;s--)a+=n[s]+"/";return a}function $i(e){for(var t=en(e,e.getAttribute("data-uid"),!0),i=[],n=t.length-1;n>=0;n--)i.push(t[n]);return i}function Zi(e,t){for(var i=en(e,t,!1),n=[],a=i.length-1;a>=0;a--)n.push(i[a]);return n}function en(e,i,n,a){for(var s=[i],r=e.parentNode;!(0,t.isNullOrUndefined)(r);){if((0,t.matches)(r,"."+fe)){var o=n?r.getAttribute("data-uid"):a?r.getAttribute("data-id"):(0,t.select)("."+ge,r).textContent;s.push(o)}if((r=r.parentNode).classList.contains(Ge))break}return s}function tn(e){for(var i=e.hasId?"id":"name",n="/",a=1;a<e.pathId.length;a++){var s=(0,t.getValue)(e.pathId[parseInt(a.toString(),10)],e.feParent);n+=(0,t.getValue)(i,s)+"/"}e.setProperties({path:n},!0)}function nn(e){e.isCut&&(rn(e),e.selectedNodes=[],e.actionRecords=[],e.enablePaste=!1,e.notify(yi,{}))}function an(e,i){if(i.isSearchCut=!1,i.actionRecords=[],i.activeElements=[],i.notify(Oi,{}),0===i.activeElements.length)return!1;rn(i);var n=i.activeElements;"navigationpane"!==i.activeModule?i.targetPath=i.path:i.targetPath=An(i.path);var a=0;if(n&&(on(i,n[0]),"cut"===e))for(;a<n.length;)sn(n[a]),a++;for(a=0,i.selectedNodes=[],i.enablePaste=!0,i.notify(vi,{});a<i.activeRecords.length;)i.actionRecords.push(i.activeRecords[a]),i.selectedNodes.push((0,t.getValue)("name",i.activeRecords[a])),a++;if((""!==i.breadcrumbbarModule.searchObj.element.value||i.isFiltered)&&"navigationpane"!==i.activeModule){i.selectedNodes=[],i.isSearchCut=!0;for(var s=0;s<i.selectedItems.length;)i.selectedNodes.push(i.selectedItems[s]),s++}return!0}function sn(e){e.classList.add(ye)}function rn(e,t){for(var i=t?e.element.querySelectorAll("."+Oe):e.element.querySelectorAll("."+ye),n=0;n<i.length;)i[n].classList.remove(t?Oe:ye),n++}function on(e,i){i&&(i.classList.contains(je)?e.activeModule="detailsview":(0,t.closest)(i,"."+Ve)?e.activeModule="largeiconsview":e.activeModule="navigationpane")}function ln(e,t){var i=e.fileSystemData.filter((function(e){return String(e.parentId)===String(t)})),n=i.slice();return i.forEach((function(t){var i=t.id;n=n.concat(ln(e,i))})),n}function hn(e,i,n){var a;if(0!==i.length||e.isFiltered||e.notify(Pi,{args:e}),wa(e))if(""===i)e.itemData=e.fileSystemData,ga(e,n?di:ni,e.path);else{e.searchSettings.filterType=(0,t.isNullOrUndefined)(e.searchSettings.filterType)?"contains":e.searchSettings.filterType;var s=(0,t.getValue)(e.pathId[e.pathId.length-1],e.feParent),r=ln(e,(0,t.getValue)("id",s)),o=new Yi.DataManager(r).executeLocal((new Yi.Query).where("name",e.searchSettings.filterType,i,e.searchSettings.ignoreCase)),l=e.searchSettings.ignoreCase?i.toLowerCase():i;e.itemData=o,Wa(e,n?di:ni,e.path,l,e.showHiddenItems,!e.searchSettings.ignoreCase)}else if(a="startsWith"===e.searchSettings.filterType?i+"*":"endsWith"===e.searchSettings.filterType?"*"+i:"*"+i+"*",e.searchWord=a,e.itemData=[fn(e)],i.length>0){var h=e.searchSettings.ignoreCase,d=e.showHiddenItems;Wa(e,n?di:ni,e.path,a,d,!h)}else e.isFiltered?ba(e,di):e.isSortByClicked?(e.notify(di,{files:"Details"===e.oldView?e.detailsviewModule.gridObj.dataSource:e.largeiconsviewModule.allItems}),e.isSortByClicked=!1):ga(e,n?di:ni,e.path)}function dn(e,t){e.oldView=e.view,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,hn(e,i,!0)}function pn(e,i){var n="";i&&(n=(0,t.closest)(i,"."+te+"."+ie+" ."+$e)?"detailsview":(0,t.closest)(i,"."+ce)?"largeiconsview":i.classList.contains("e-fullrow")||i.classList.contains("e-icon-expandable")?"navigationpane":(0,t.closest)(i,".e-address-list-item")?"breadcrumbbar":""),e.targetModule=n}function cn(e){e.itemData=[fn(e)],aa(e.itemData[0])?ga(e,Wt,e.path):ia(e,e.itemData[0],_i)}function un(e){ga(e,si,e.path)}function fn(e){return(0,t.getValue)(e.pathId[e.pathId.length-1],e.feParent)}function gn(e){an("copy",e)&&(e.fileAction="copy")}function mn(e){an("cut",e)&&(e.isCut=!0,e.fileAction="move")}function bn(e){if(!(0,t.getValue)("isFile",e))return Te;var i=(0,t.getValue)("type",e);return-1!==(i=i.toLowerCase()).indexOf(".")&&(i=i.split(".").join("")),-1!==["bmp","dib","jpg","jpeg","jpe","jfif","gif","tif","tiff","png","ico"].indexOf(i)?Ae:-1!==["mp3","wav","aac","ogg","wma","aif","fla","m4a"].indexOf(i)?Fe:-1!==["webm","mkv","flv","vob","ogv","ogg","avi","wmv","mp4","3gp"].indexOf(i)?Ue:-1!==["css","exe","html","js","msi","pdf","pptx","ppt","rar","zip","txt","docx","doc","xlsx","xls","xml","rtf","php"].indexOf(i)?"e-fe-"+i:"e-fe-unknown e-fe-"+i}function vn(e,i){var n=wa(e)?(0,t.getValue)("imageUrl",i):"";if(wa(e)){var a={fileDetails:[i],imageUrl:n};return e.trigger("beforeImageLoad",a),a.imageUrl}var s=e.ajaxSettings.getImageUrl?e.ajaxSettings.getImageUrl:e.ajaxSettings.url,r=-1!==s.indexOf("?")?"&path=":"?path=",o=encodeURIComponent((0,t.getValue)("name",i)),l=(0,t.getValue)("filterPath",i);if(e.hasId){var h=(0,t.getValue)("id",i);n=s+r+e.path+"&id="+h}else n=(0,t.isNullOrUndefined)(l)?s+r+e.path+o:s+r+encodeURIComponent(l.replace(/\\/g,"/"))+o;var d={fileDetails:[i],imageUrl:n=n+"&time="+(new Date).getTime().toString()};return e.trigger("beforeImageLoad",d),d.imageUrl}function yn(e,i,n){var a=(0,t.getValue)(e.hasId?"id":"name",i)+"/",s=(0,t.getValue)(e.hasId?"filterId":"filterPath",i);return(0,t.isNullOrUndefined)(s)?n+a:s.replace(/\\/g,"/").replace(/^.*?(?=\/)/,"")+a}function In(e,i){var n=(0,t.getValue)("name",i),a=(0,t.getValue)("filterPath",i);return""===e.breadcrumbbarModule.searchObj.element.value&&!e.isFiltered||(0,t.isNullOrUndefined)(a)||(n=(a=a.replace(/\\/g,"/")).replace(e.path,"")+n),n}function On(e,i){if(0===i.length)return i;var n;n="None"===e.sortOrder||(0,t.isNullOrUndefined)(e.sortOrder)?(new Yi.Query).group("isFile"):(new Yi.Query).sortBy(e.sortBy,e.sortOrder.toLowerCase(),!0).group("isFile");var a=new Yi.DataManager(i).executeLocal(n);return(0,t.getValue)("records",a)}function wn(e,i,n){return(0,t.getValue)(e.pathId[e.pathId.length-1],e.feFiles).filter((function(e){return e[i].toString()===n}))[0]}function Dn(e,i,n){var a,s=(0,t.select)("#"+e.element.id+T,e.element),r=(0,t.select)("#"+e.element.id+X,s).offsetHeight;if(a=s.offsetHeight-r,"Details"===e.view&&(a-=(0,t.select)("."+We,s).offsetHeight),(0,t.isNullOrUndefined)(i.querySelector("."+Pe))){var o=(0,t.createElement)("div",{className:Pe}),l=(0,t.createElement)("div",{className:_e}),h=(0,t.createElement)("div",{className:Ee}),d=(0,t.createElement)("div",{className:Re});"Details"===e.view?i.querySelector("."+Xe).appendChild(o):i.appendChild(o),o.appendChild(l),o.appendChild(h),o.appendChild(d)}i.querySelector("."+Pe)&&((0,t.isNullOrUndefined)(n.error)?e.isFiltered?(i.querySelector("."+Ee).innerHTML=jn(e,"Filter-Empty"),i.querySelector("."+Re).innerHTML=jn(e,"Filter-Key")):""!==e.breadcrumbbarModule.searchObj.element.value?(i.querySelector("."+Ee).innerHTML=jn(e,"Search-Empty"),i.querySelector("."+Re).innerHTML=jn(e,"Search-Key")):(i.querySelector("."+Ee).innerHTML=jn(e,"Folder-Empty"),i.querySelector("."+Re).innerHTML=jn(e,"File-Upload")):(i.querySelector("."+Ee).innerHTML=jn(e,"Access-Denied"),i.querySelector("."+Re).innerHTML=jn(e,"Access-Details")));var p=(0,t.select)("."+Pe,i);a=(a-p.offsetHeight)/2,p.style.marginTop=a+"px"}function Sn(e){return new Yi.DataManager(e).executeLocal((new Yi.Query).where(Tt,"equal",!1,!1))}function Cn(e,i){for(var n=Sn(e.files),a=0,s=n.length;a<s;a++)(0,t.setValue)("_fm_id",i+"_"+a,n[a])}function xn(e){for(var i=0;i<e.length;i++){var n=new Date((0,t.getValue)("dateCreated",e[i])),a=new Date((0,t.getValue)("dateModified",e[i]));(0,t.setValue)("_fm_created",n,e[i]),(0,t.setValue)("_fm_modified",a,e[i])}}function jn(e,t){var i=e.localeObj.getConstant(t);return""===i?t:i}function Nn(e,i){var n=e.cssClass;return n=(0,t.isNullOrUndefined)(n)||""===n?i:n+" "+i}function Pn(e,t){e.isSortByClicked=!0,-1!==t.item.id.indexOf("ascending")||-1!==t.item.id.indexOf("descending")||-1!==t.item.id.indexOf("none")?e.sortOrder=En(t.item.id):e.sortBy=En(t.item.id,e),e.itemData=[fn(e)],"Details"===e.view&&(e.isMobile?dn(e,"Details"):(e.notify(Ni,{module:"detailsview"}),e.isSortByClicked=!1)),"LargeIcons"===e.view&&dn(e,"LargeIcons"),e.notify(pi,{})}function En(e,t){var i,n=e.substring(e.lastIndexOf("_")+1),a=n;switch(t&&(i=t.detailsViewSettings.columns),n){case"date":for(var s=0,r=i.length;s<r;s++){if("dateModified"===i[s].field||"dateCreated"===i[s].field){a=i[s].field;break}a="_fm_modified"}break;case"ascending":a="Ascending";break;case"descending":a="Descending";break;case"none":a="None"}return a}function Rn(e,i){for(var n=i.split("/"),a=e.originalPath.split("/"),s=(0,t.getValue)(e.pathId[0],e.feParent),r=(0,t.isNullOrUndefined)((0,t.getValue)("id",s))?"name":"id",o=n.length-1,l=a.length-1;o<l;o++){var h=""===a[o+1]?Ut:Ft,d=""===a[o]?"/":e.path+a[o]+"/",p=wn(e,r,a[parseInt(o.toString(),10)]),c=(0,t.getValue)("_fm_id",p);e.setProperties({path:d},!0),(0,t.isNullOrUndefined)(c)||e.pathId.push(c),e.itemData=[p],e.pathNames.push((0,t.getValue)("name",p)),ga(e,h,e.path);break}}function Mn(e,i){e.originalPath=yn(e,i,e.path);var n=(0,t.getValue)(e.pathId[0],e.feParent),a=e.feParent[(0,t.getValue)("_fm_id",e.itemData[0])],s=(0,t.isNullOrUndefined)(a)||"fe_tree"===(0,t.getValue)("_fm_id",a),r=wn(e,(0,t.isNullOrUndefined)((0,t.getValue)("id",n))?"name":"id",wa(e)?(0,t.getValue)("id",i):(0,t.getValue)("name",i));if((0,t.isNullOrUndefined)(r)){if(s)return void Rn(e,e.path);e.notify(hi,{selectedNode:e.pathId[e.pathId.length-1]})}else{var o=(0,t.getValue)("_fm_id",r);e.setProperties({path:e.originalPath},!0),e.pathId.push(o),e.itemData=[r],e.pathNames.push((0,t.getValue)("name",r))}ga(e,e.path!==e.originalPath?Ft:Ut,e.path)}function kn(e){if(e.isDragDrop=!1,0!==e.selectedNodes.length&&e.enablePaste){var t=""===e.folderPath?e.path:e.folderPath;if("navigationpane"!==e.activeModule||e.selectedNodes[0].includes("/")||(e.targetPath=ca(e,e.actionRecords[0])),!Ln(e,e.actionRecords,t,e.path))if("move"===e.fileAction&&e.targetPath!==t||"copy"===e.fileAction)e.notify(wi,{}),ya(e,e.targetPath,e.selectedNodes,t,e.fileAction,[],e.actionRecords);else e.enablePaste=!1,e.notify(yi,{}),rn(e),Xa(e,"Error",{files:null,error:{code:"402",message:jn(e,"Same-Folder-Error"),fileExists:null}})}}function Ln(e,i,n,a){for(var s=!1,r=0;r<i.length;r++)if((0,t.getValue)("isFile",i[r])){var o=e.dragData[r]?e.dragData[r].name:null,l=wa(e)?o:e.dragNodes[r],h=0;l&&(h=l.lastIndexOf("/"));var d="";if(h>0&&(d=a+l.substring(0,h+1)),d===n){Xa(e,"Error",{files:null,error:{code:"402",message:jn(e,"Same-Folder-Error"),fileExists:null}}),s=!0;break}}else{var p=yn(e,i[r],a);if(0===n.indexOf(p)){Xa(e,"Error",{files:null,error:{code:"402",message:jn(e,"Sub-Folder-Error"),fileExists:null}}),s=!0;break}}return s}function Tn(e){(e.isDragDrop=!0,0!==e.dragData.length)&&(e.dragPath=e.dragPath.replace(/\\/g,"/"),e.dropPath=e.dropPath.replace(/\\/g,"/"),Ln(e,e.dragData,e.dropPath,e.dragPath)||e.dragPath===e.dropPath||(e.itemData=[e.dropData],ya(e,e.dragPath,e.dragNodes,e.dropPath,"move",[],e.dragData),e.notify(wi,{})))}function An(e){for(var t=e.split("/"),i=t[0]+"/",n=1;n<t.length-2;n++)i+=t[n]+"/";return i}function Fn(e,i){var n=(0,t.getValue)(e.hasId?"id":"name",i.cwd)+"/",a=(0,t.getValue)(e.hasId&&!(0,t.isNullOrUndefined)(e.ajaxSettings.url)?"filterId":"filterPath",i.cwd);return(0,t.isNullOrUndefined)(a)?wa(e)?n:e.path+n:""===a?"/":a.replace(/\\/g,"/").replace(/^.*?(?=\/)/,"")+n}function Un(e,t,i){"move"===t&&(e.isDragDrop?e.notify(Li,i):(e.enablePaste=!1,e.notify(yi,{}),e.notify(Si,i))),0===e.duplicateItems.length&&(e.pasteNodes=[]);for(var n=0;n<i.files.length;n++)e.pasteNodes.push(i.files[n][e.hasId?"id":"name"]),e.isDragDrop&&e.droppedObjects.push(i.files[n]);e.duplicateItems=[],e.duplicateRecords=[],e.isDragDrop&&!e.isPasteError?e.isDropEnd=!0:e.isDropEnd=!1,e.trigger("success",{action:t,result:i}),!e.isDragDrop||e.path===e.dragPath||e.path===e.dropPath||e.isSearchDrag?(e.isPathDrag=!1,ga(e,Di,e.path)):Vn(e)}function Vn(e){var i=(0,t.getValue)("_fm_id",e.dropData);if(e.expandedId=i,e.itemData=[e.dropData],e.isPathDrag)e.notify(Bt,e.itemData);else{if(e.navigationpaneModule){var n=(0,t.select)('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element);if(!n)i=document.querySelector('[data-id = "'+(0,t.getValue)("id",e.dropData)+'"]').getAttribute("data-uid"),n=(0,t.select)('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element);Qi(n,e.dropData,e)}ga(e,Ti,e.dropPath)}}function _n(e,i){for(var n=null,a=e.isDragDrop?e.dragData:e.actionRecords,s=0;s<a.length;s++)if((0,t.getValue)("name",a[s])===i){n=a[s];break}return n}function Hn(e){if(e.isSearchDrag=!1,""!==e.breadcrumbbarModule.searchObj.element.value&&(e.isSearchDrag=!0),"navigationpane"!==e.activeModule){e.dragNodes=[];for(var t=0;t<e.selectedItems.length;)e.dragNodes.push(e.selectedItems[t]),t++;0===e.selectedItems.length&&e.dragData&&1===e.dragData.length&&e.dragNodes.push(Qn(e,e.dragData[0]))}var i=e.createElement("div",{className:"e-fe-icon "+bn(e.dragData[0])}),n=e.createElement("div",{className:"e-fe-name",innerHTML:e.dragData[0].name}),a=e.createElement("div",{className:"e-fe-content"});a.appendChild(i),a.appendChild(n);var s=e.createElement("div",{className:Me});if(s.appendChild(a),e.dragNodes.length>1){var r=e.createElement("span",{className:"e-fe-count",innerHTML:e.dragNodes.length.toString(10)});s.appendChild(r)}e.virtualDragElement=s,e.element.appendChild(e.virtualDragElement)}function Bn(e,i){var n=i;n.cancel=!1,null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),Wn(e),e.element.classList.remove("e-fe-drop","e-no-drop"),rn(e),e.uploadObj.dropArea=(0,t.select)("#"+e.element.id+Q,e.element);var a=(0,t.select)("."+Me,e.element);a&&(0,t.detach)(a),pn(e,i.target),e.notify(ki,i),rn(e,"hover"),n.fileDetails=e.dragData,e.trigger("fileDragStop",n,(function(i){!i.cancel&&!(0,t.isNullOrUndefined)(e.targetModule)&&""!==e.targetModule&&e.dragCount>2&&Tn(e),e.dragCount=0}))}function zn(e,i,n){var a=i;if(a.cancel=!1,a.fileDetails=e.dragData,e.dragCount=0,e.droppedObjects=[],(!e.allowDragAndDrop||"navigationpane"===e.activeModule&&(0,t.closest)(i.element,"li").getAttribute("data-uid")===e.pathId[0])&&(a.cancel=!0),"navigationpane"===e.activeModule&&-1!==e.pathId.indexOf((0,t.closest)(i.element,"li").getAttribute("data-uid"))?e.isPathDrag=!0:e.isPathDrag=!1,rn(e),a.cancel)n.intDestroy(i.event),qn(e);else if(!a.cancel){for(var s=0;s<e.activeElements.length;)sn(e.activeElements[s]),s++;e.trigger("fileDragStart",a,(function(t){t.cancel?(n.intDestroy(i.event),qn(e)):e.uploadObj.dropArea=null}))}}function qn(e){rn(e);var i=(0,t.select)("."+Me,e.element);i&&(0,t.detach)(i)}function Wn(e){Kn(e,ke),Kn(e,Le)}function Kn(e,t){for(var i=e.element.querySelectorAll("."+t),n=0;n<i.length;n++)i[n].classList.remove(t)}function Gn(e,i,n,a){var s,r=e.getBoundingClientRect(),o=(0,t.select)("."+n,e);a>=r.top+e.clientHeight-30&&!(0,t.isNullOrUndefined)(o)&&(s="navigationpane"===i.targetModule||"detailsview"===i.targetModule?o.offsetHeight/2.5:o.offsetHeight/4.5,e.scrollBy(0,s)),!(0,t.isNullOrUndefined)(o)&&a<=r.top+30&&(s="navigationpane"===i.targetModule||"detailsview"===i.targetModule?o.offsetHeight/2.5:o.offsetHeight/4.5,e.scrollBy(0,-s))}function Yn(e,i){var n=i;n.fileDetails=e.dragData;var a=!1;pn(e,i.target),Wn(e),null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),rn(e,"hover");var s=null;"navigationpane"===e.targetModule?((s=(0,t.closest)(i.target,"li")).classList.add(Oe,ke),a=!0,e.treeExpandTimer=window.setTimeout((function(){e.notify(Fi,i)}),800),Gn(e.navigationpaneModule.treeObj.element.parentElement,e,"e-level-2",i.event.y)):"detailsview"===e.targetModule?((s=(0,t.closest)(i.target,"tr"))&&s.querySelector("."+Te)&&!s.classList.contains(ye)?s.classList.add(ke):!s||s.querySelector("."+Te)||s.classList.contains(ye)||s.classList.add(Le),a=!0,Gn(e.detailsviewModule.gridObj.element.querySelector(".e-content"),e,"e-row",i.event.y)):"largeiconsview"===e.targetModule?((s=(0,t.closest)(i.target,"li"))&&s.querySelector("."+Te)&&!s.classList.contains(ye)&&s.classList.add(Oe,ke),a=!0,Gn(e.largeiconsviewModule.element.firstElementChild,e,"e-large-icon",i.event.y)):"breadcrumbbar"===e.targetModule&&(a=!0),e.element.classList.remove("e-fe-drop","e-no-drop"),e.element.classList.add(a?"e-fe-drop":"e-no-drop"),e.dragCount=e.dragCount+1,e.trigger("fileDragging",n)}function Jn(e){for(var i="",n=Object.keys(e),a=0;a<n.length;a++)"message"!==n[a]&&(i+=(0===a?"":", ")+n[a]+": "+(0,t.getValue)(n[a],e));return i}function Qn(e,i){return e.hasId?(0,t.getValue)("id",i):In(e,i)}function Xn(e,i){e.itemData=[i],e.currentItemText=(0,t.getValue)("name",i),e.isFile=(0,t.getValue)("isFile",i),e.filterPath=(0,t.getValue)("filterPath",i)}function $n(e){sa(e.itemData[0])?Xa(e,"Rename"):ia(e,e.itemData[0],Hi)}function Zn(e){for(var t=e.itemData,i=0;i<t.length;i++)if(!la(t[i]))return void ia(e,t[i],Wi);e.selectedItems.length>0&&Ga(e,e.path,e.selectedItems)}function ea(e,t,i){for(var n=0;n<t.length;n++)if(!sa(t[n]))return void ia(e,t[n],Hi);e.itemData=t,Ia(e,i,e.path,"delete")}function ta(e,t,i){for(var n=0;n<t.length;n++)if(!la(t[n]))return void ia(e,t[n],Wi);e.itemData=t,i.length>0&&Ga(e,e.path,i)}function ia(e,i,n){var a=(0,t.getValue)("message",(0,t.getValue)("permission",i));""===a&&(a=jn(e,"Access-Message").replace("{0}",(0,t.getValue)("name",i)).replace("{1}",n)),Xa(e,"Error",{error:{code:"401",fileExists:null,message:a}})}function na(e){return aa(e)?"e-fe-locked":"e-fe-locked e-fe-hidden"}function aa(e){var i=(0,t.getValue)("permission",e);return!(i&&!(0,t.getValue)("read",i))}function sa(e){var i=(0,t.getValue)("permission",e);return!i||(0,t.getValue)("read",i)&&(0,t.getValue)("write",i)}function ra(e){var i=(0,t.getValue)("permission",e);return!i||(0,t.getValue)("read",i)&&(0,t.getValue)("writeContents",i)}function oa(e){var i=(0,t.getValue)("permission",e);return!i||(0,t.getValue)("read",i)&&(0,t.getValue)("upload",i)}function la(e){var i=(0,t.getValue)("permission",e);return!i||(0,t.getValue)("read",i)&&(0,t.getValue)("download",i)}function ha(e){var t=e.itemData[0];ra(t)?Xa(e,"NewFolder"):ia(e,t,Bi)}function da(e){var t=e.itemData[0];if(oa(t)){var i="#"+e.element.id+$;document.querySelector(i).click()}else ia(e,t,qi)}function pa(e){(0,t.isNullOrUndefined)(e.dialogObj)||e.dialogObj.hide()}function ca(e,i){return e.hasId&&!(0,t.isNullOrUndefined)((0,t.getValue)("filterId",i))?(0,t.getValue)("filterId",i).replace(/\\/g,"/").replace(/^[^/]+\//,"/"):(0,t.getValue)("filterPath",i).replace(/\\/g,"/")}function ua(e,i,n,a){for(var s="",r=0;r<i.length;r++){var o=(0,t.getValue)("permission",i[r]);if(null==o&&(o=void 0),a)!o||(0,t.getValue)("read",o)&&(0,t.getValue)("writeContents",o)||""===(s=(0,t.getValue)("message",(0,t.getValue)("permission",i[r])))&&(s=jn(e,"Access-Message").replace("{0}",(0,t.getValue)("name",i[r])).replace("{1}","writeContents"));else{var l="copy"===n?(0,t.getValue)("copy",o):(0,t.getValue)("write",o);!o||(0,t.getValue)("read",o)&&l||""===(s=(0,t.getValue)("message",(0,t.getValue)("permission",i[r])))&&(s=jn(e,"Access-Message").replace("{0}",(0,t.getValue)("name",i[r])).replace("{1}",n))}if(""!==s){e.responseData={cwd:null,details:null,error:{code:"401",message:s,fileExists:null},files:null};break}}return s}var fa=c(707);function ga(e,i,n){for(var a=e.itemData,s=0;s<a.length;s++)(0,t.isNullOrUndefined)((0,t.getValue)("hasChild",a[s]))&&(0,t.setValue)("hasChild",!1,a[s]);Ma(e,{action:"read",path:n,showHiddenItems:e.showHiddenItems,data:a},Fa,i)}function ma(e,t){Ma(e,{action:"create",path:e.path,name:t,data:e.itemData},Va,t)}function ba(e,i){var n={action:"filter",path:e.path,showHiddenItems:e.showHiddenItems,data:[fn(e)]},a=e.filterData?(0,t.extend)(undefined,n,e.filterData):n;Ma(e,a,Ua,i,(0,t.getValue)("action",a))}function va(e,t,i){var n,a;if(""!==e.breadcrumbbarModule.searchObj.element.value||e.isFiltered){var s=e.filterPath;e.hasId?(n=e.currentItemText,a=i):(n=(s=s.replace(/\\/g,"/")).replace(t,"")+e.currentItemText,a=s.replace(t,"")+i)}else n=e.currentItemText,a=i;Ma(e,{action:"rename",path:t,name:n,newName:a,data:e.itemData,showFileExtension:e.showFileExtension},_a,t)}function ya(e,t,i,n,a,s,r){var o={action:a,path:t,targetData:e.itemData[0],targetPath:n,names:i,renameFiles:s,data:r};e.destinationPath=n,Ma(e,o,Ha,t,a,n)}function Ia(e,t,i,n){Ma(e,{action:n,path:i,names:t,data:e.itemData},Ba,i)}function Oa(e,t,i,n){Ma(e,{action:n,path:i,names:t,data:e.itemData},za,i,n)}function wa(e){return e.fileSystemData.length>=0&&(0,t.isNullOrUndefined)(e.ajaxSettings.url)}function Da(e,t){return e.some((function(e){return e.name===t}))}function Sa(e,i){return e.fileSystemData.findIndex((function(e){return!(0,t.isNullOrUndefined)(e)&&String(e.id)===String(i)}))}function Ca(e,t){return e.fileSystemData.filter((function(e){return String(e.id)===String(t)}))[0]}function xa(e,t){return e.fileSystemData.filter((function(e){return String(e.parentId)===String(t)}))}function ja(e,i,n,a){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(s[r]=null);var o=new Date,l=String(i.id)===String(0)||(0,t.isNullOrUndefined)(i.parentId)?"\\":i.filterPath+i.name+"\\";return Object.assign(s,{dateCreated:o,dateModified:o,filterPath:l,hasChild:!!a&&e.hasChild,id:(0,fa.getUid)(null===n?e.name:n),isFile:!!a&&e.isFile,name:null===n?e.name:n,parentId:i.id,size:a?e.size:0,type:a?e.type:""}),s}function Na(e,t,i,n){e.responseData={cwd:null,details:null,error:{code:i,message:t,fileExists:null!=n?n:null},files:null}}function Pa(e,i,n){var a={cancel:!1,newName:(0,t.getValue)("newName",i),itemData:(0,t.getValue)("data",i),path:(0,t.getValue)("path",i)};e.trigger("beforeRename",a,(function(t){if(t.cancel)n.cancel=!0;else if(wa(e))if(Da(e.fileSystemData,t.newName)){var i="Cannot rename"+t.itemData[0].name+"to"+t.newName+": destination already exists.";Na(e,i,"400",null)}else{var a=Ca(e,t.itemData[0].id),s=a.name;a.name=t.newName,Ea(e,a.id,s,t.newName)}}))}function Ea(e,t,i,n){e.fileSystemData.forEach((function(a){if(String(a.parentId)===String(t)){var s=a.filterPath.replace(i+"\\",n+"\\");a.filterPath=s,Ea(e,a.id,i,n)}}))}function Ra(e,i,n){switch((0,t.getValue)("action",i)){case"create":!function(e,i,n){var a={folderName:(0,t.getValue)("name",i),cancel:!1,path:(0,t.getValue)("path",i),parentFolder:(0,t.getValue)("data",i)};e.trigger("beforeFolderCreate",a,(function(t){if(t.cancel)n.cancel=!0;else if(wa(e))if(Da(e.fileSystemData,t.folderName)){var i="A file or folder with the name "+t.folderName+" already exists.";Na(e,i,"400",null)}else{var a=t.parentFolder[0],s=ja(a,a,t.folderName,!1);e.fileSystemData.push(s)}}))}(e,i,n);break;case"delete":!function(e,i,n){var a={cancel:!1,itemData:(0,t.getValue)("data",i),path:(0,t.getValue)("path",i)};e.trigger("beforeDelete",a,(function(t){t.cancel?n.cancel=!0:wa(e)&&t.itemData.forEach((function(t){var i=Sa(e,t.id);-1!==i&&e.fileSystemData.splice(i,1),t.isFile||e.fileSystemData.filter((function(e){return e.filterPath.includes(t.name)})).forEach((function(t){var i=Sa(e,t.id);-1!==i&&e.fileSystemData.splice(i,1)}))}))}))}(e,i,n);break;case"rename":Pa(e,i,n);break;case"move":case"copy":!function(e,i,n){var a={cancel:!1,itemData:(0,t.getValue)("data",i),isCopy:"copy"===(0,t.getValue)("action",i),path:(0,t.getValue)("path",i),targetData:(0,t.getValue)("targetData",i),targetPath:(0,t.getValue)("targetPath",i)};e.trigger("beforeMove",a,(function(a){if(a.cancel)n.cancel=!0;else if(wa(e)){var s="File Already Exists",r=(0,t.getValue)("action",i),o=ua(e,a.itemData,r,!1),l=ua(e,[a.targetData],r,!0),h=[];if(e.pasteNodes=[],""===o&&""===l){if(a.isCopy){var d=xa(e,a.targetData.id);return a.itemData.forEach((function(n){if(!Da(d,n.name)||(0,t.getValue)("renameFiles",i).length>0){if((0,t.getValue)("renameFiles",i).length>0){var s=n.name.split("."),r=n.name.includes(".")?s[0]+"("+e.existingFileCount+")."+s[1]:s[0]+"("+e.existingFileCount+")";return Ta(e,n,a.targetData,r),e.responseData.error=null,void e.existingFileCount++}Ta(e,n,a.targetData,null)}else h.push(n.name)})),void(h.length>0&&Na(e,s,"400",h))}for(var p=a.targetData,c=xa(e,p.id),u=0;u<a.itemData.length;u++){var f=a.itemData[u];if(!Da(c,f.name)||(0,t.getValue)("renameFiles",i).length>0){if(!p.hasChild){p.hasChild=!f.isFile;var g=e.fileSystemData.filter((function(e){return String(e.id)===String(p.id)}));g.length>0&&(g[0].hasChild=p.hasChild)}if(!f.isFile){var m=0!==f.parentId?xa(e,f.parentId):[];Ca(e,f.parentId).hasChild=m.length>1}var b=Ca(e,f.id);if((0,t.getValue)("renameFiles",i).length>0){var v=f.name.split(".");f.name=f.name.includes(".")?v[0]+"("+e.existingFileCount+")."+v[1]:v[0]+"("+e.existingFileCount+")",b.name=f.name,e.responseData.error=null,e.existingFileCount++,e.dropData=p,e.dropPath=a.path;var y=a.targetPath.replace(/^\/|\/$/g,"").split("/");p=Ca(e,y[y.length-1])}b.parentId=p.id,b.filterPath=0===p.id?"\\":p.filterPath+p.name+"\\"}else h.push(f.name)}h.length>0&&Na(e,s,"400",h)}}}))}(e,i,n);break;case"search":!function(e,i,n){var a={searchResults:(0,t.getValue)("data",i),cancel:!1,path:(0,t.getValue)("path",i),searchText:(0,t.getValue)("searchString",i),caseSensitive:(0,t.getValue)("caseSensitive",i),showHiddenItems:(0,t.getValue)("showHiddenItems",i)};e.trigger("search",a,(function(e){(0,t.setValue)("data",e.searchResults,i),e.cancel&&(n.cancel=!0)}))}(e,i,n)}}function Ma(e,i,n,a,s,r){var o={url:e.ajaxSettings.url,type:"POST",mode:!0,dataType:"json",contentType:"application/json",data:JSON.stringify(i),onSuccess:null,onFailure:null,beforeSend:null},l={action:(0,t.getValue)("action",i),ajaxSettings:o,cancel:!1};Ra(e,i,l),e.trigger("beforeSend",l,(function(o){if(!o.cancel){if(e.notify(Qt,{}),wa(e)){var l=("node-expand"===a||"finalize-end"===a||"rename-end-parent"===a?(0,t.getValue)("path",i):e.path).replace(/^\/|\/$/g,"").split("/"),h="rename-end-parent"===a||"path-changed"===a&&0!==(0,t.getValue)("data",i).length&&(0,t.isNullOrUndefined)(e.renamedItem)?(0,t.getValue)("data",i)[0].id:l[l.length-1],d=(0,t.getValue)("action",i),p=("move"===d||"rename"===d||"copy"===d||"delete"===d||"search"===d)&&"rename-end"!==a;if("read"===d||"create"===d||"rename-end"===a){var c=e.fileSystemData.filter((function(e){return(0,t.isNullOrUndefined)(e.parentId)})).length>0?e.fileSystemData.filter((function(e){return(0,t.isNullOrUndefined)(e.parentId)}))[0].id:0;if(e.responseData={cwd:Ca(e,"/"===e.path&&"node-expand"!==a&&"rename-end-parent"!==a?c:h),details:null,error:null,files:xa(e,"/"===e.path&&"node-expand"!==a&&"rename-end-parent"!==a?c:h)},(0,t.isNullOrUndefined)(e.responseData.cwd)){Na(e,"Cannot load empty data within the File Manager.","400",null)}}else if(p&&null===e.responseData.error){0===(u="search"===d||"delete"===d?(0,t.getValue)("data",i):[]).length&&(u="copy"===d?e.pasteNodes.map((function(t){return Ca(e,t)})):(0,t.getValue)("data",i).map((function(t){return Ca(e,t.id)}))),e.responseData={cwd:null,details:null,error:null,files:u}}else if("details"===(0,t.getValue)("action",i)){var u,f=(u=(0,t.getValue)("data",i))[0],g=u.length>1,m=u.map((function(e){return e.name})),b=ka(g?u.reduce((function(e,t){return e+(t.size||0)}),0):f.size),v=e.pathNames.includes(f.name)||g?e.pathNames.join("/"):e.pathNames.join("/")+"/"+f.name;e.responseData.details=Object.assign({location:v,multipleFiles:g,name:m.join(", "),size:b},g?{}:{created:f.dateCreated,isFile:f.isFile,modified:f.dateModified,permission:f.permission})}return void La(e,e.responseData,n,i,a,s,r,o)}new t.Ajax({url:(0,t.getValue)("url",o.ajaxSettings),type:(0,t.getValue)("type",o.ajaxSettings),mode:(0,t.getValue)("mode",o.ajaxSettings),dataType:(0,t.getValue)("dataType",o.ajaxSettings),contentType:(0,t.getValue)("contentType",o.ajaxSettings),data:(0,t.getValue)("data",o.ajaxSettings),beforeSend:(0,t.getValue)("beforeSend",o.ajaxSettings),onSuccess:function(l){if((0,t.isNullOrUndefined)(l)){var h={error:{fileExists:null,message:jn(e,"Server-Error")+" "+e.ajaxSettings.url,code:"406"},files:null};Aa(e,o,n,h,a,s,r)}else"string"==typeof l&&(l=JSON.parse(l)),La(e,l,n,i,a,s,r,o)},onFailure:function(){var t={files:null,error:{code:"404",message:jn(e,"Network-Error")+" "+e.ajaxSettings.url,fileExists:null}};Aa(e,o,n,t,a,s,r)}}).send()}}))}function ka(e){return e<1024?e+" B":e<1048576?(e/1024).toFixed(2)+" KB":e<1073741824?(e/1024/1024).toFixed(2)+" MB":(e/1024/1024/1024).toFixed(2)+" GB"}function La(e,i,n,a,s,r,o,l){e.notify(Zt,{action:"success"});var h=e.expandedId?e.expandedId:e.pathId[e.pathId.length-1];if(!(0,t.isNullOrUndefined)(i.cwd)&&"read"===(0,t.getValue)("action",a)&&(i.cwd.name=1===e.pathId.length&&e.rootAliasName||i.cwd.name,(0,t.setValue)("_fm_id",h,i.cwd),(0,t.setValue)(h,i.cwd,e.feParent),!(0,t.isNullOrUndefined)(i.files)||"401"===i.error.code)){if(("finalize-end"===s||"initial-end"===s)&&0===e.pathNames.length){var d=(0,t.getValue)(e.pathId[0],e.feParent);e.pathNames[0]=(0,t.getValue)("name",d),e.hasId=!(0,t.isNullOrUndefined)((0,t.getValue)("id",d))}"finalize-end"===s&&tn(e)}if(!(0,t.isNullOrUndefined)(i.files)){xn(i.files);for(var p=0,c=i.files.length;p<c;p++){var u=i.files[p];(0,t.setValue)("_fm_iconClass",bn(u),u)}"read"===(0,t.getValue)("action",a)&&(Cn(i,h),(0,t.setValue)(h,i.files,e.feFiles))}if(!(0,t.isNullOrUndefined)(i.details)&&!(0,t.isNullOrUndefined)(e.rootAliasName)){var f=e.rootAliasName||(0,t.getValue)("name",i.details),g=(0,t.getValue)("location",i.details).replace(new RegExp("/","g"),"\\");"/"===(0,t.getValue)("path",a)||e.hasId&&1===(0,t.getValue)("path",a).match(/[/]/g).length?(0===(0,t.getValue)("names",a).length&&(0,t.setValue)("name",f,i.details),g=-1===g.indexOf("\\")?f:g.replace(g.substring(0,g.indexOf("\\")),f)):g=g.replace(g.substring(0,g.indexOf("\\")),f),(0,t.setValue)("location",g,i.details)}n(e,i,s,r,o),(0,t.isNullOrUndefined)(i.files)||"path-changed"!==s&&"finalize-end"!==s&&"open-end"!==s&&"drop-path"!==s||e.notify(Ei,i),"function"==typeof(0,t.getValue)("onSuccess",l.ajaxSettings)&&(0,t.getValue)("onSuccess",l.ajaxSettings)()}function Ta(e,t,i,n){var a=ja(t,i,n,!0);e.fileSystemData.push(a),e.pasteNodes.push(a.id);for(var s=xa(e,t.id),r=0;r<s.length;r++)Ta(e,s[r],a,null)}function Aa(e,i,n,a,s,r,o){e.notify(Zt,{action:"failure"}),n(e,a,s,r,o),"function"==typeof(0,t.getValue)("onFailure",i.ajaxSettings)&&(0,t.getValue)("onFailure",i.ajaxSettings)()}function Fa(e,i,n){try{if((0,t.isNullOrUndefined)(i.files))(0,t.isNullOrUndefined)(i.error)||"401"!==i.error.code||(i.files=[],e.notify(n,i),e.notify(ri,{})),qa(e,i,"read"),e.setProperties({path:e.oldPath},!0),e.pathNames.pop();else{e.notify(n,i),e.notify(ri,{});var a={action:"read",result:i};e.trigger("success",a)}}catch(t){Ya(e,t,"read"),e.setProperties({path:e.oldPath},!0),e.pathNames.pop()}if(e.isDragDrop&&e.isDropEnd){if(0!==e.droppedObjects.length){a={fileDetails:e.droppedObjects};e.trigger("fileDropped",a)}e.isDropEnd=e.isDragDrop=!1}}function Ua(e,i,n,a){try{if((0,t.isNullOrUndefined)(i.files))qa(e,i,a);else{e.notify(n,i);var s={action:a,result:i};e.trigger("success",s)}}catch(t){Ya(e,t,a)}}function Va(e,i,n){try{if((0,t.isNullOrUndefined)(i.files))if("400"===i.error.code){if(e.dialogObj&&e.dialogObj.visible){var a=(0,t.select)("#newname",e.dialogObj.element),s=jn(e,"Validation-NewFolder-Exists").replace("{0}",'"'+a.value+'"');a.parentElement.nextElementSibling.innerHTML=s}else{Xa(e,"Error",{files:null,error:{code:"400",message:jn(e,"Validation-NewFolder-Exists").replace("{0}",'"'+n+'"'),fileExists:null}})}o={action:"create",error:i.error};e.trigger("failure",o)}else e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),qa(e,i,"create");else{e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),e.createdItem=wa(e)?i.files[i.files.length-1]:i.files[0],e.breadcrumbbarModule.searchObj.value="";var r={folderName:n,path:e.path,parentFolder:e.itemData};e.trigger("folderCreate",r);var o={action:"create",result:i};e.trigger("success",o),e.itemData=[fn(e)],ga(e,Vt,e.path)}}catch(s){e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),Ya(e,s,"create")}}function _a(e,i){try{if((0,t.isNullOrUndefined)(i.files))if("400"===i.error.code&&e.dialogObj&&e.dialogObj.visible){var n=(0,t.select)("#rename",e.dialogObj.element),a=jn(e,"Validation-Rename-Exists").replace("{0}",'"'+e.currentItemText+'"');a=a.replace("{1}",'"'+n.value+'"'),n.parentElement.nextElementSibling.innerHTML=a;s={action:"rename",error:i.error};e.trigger("failure",s)}else(0,t.isNullOrUndefined)(e.dialogObj)||e.dialogObj.hide(),qa(e,i,"rename");else{(0,t.isNullOrUndefined)(e.dialogObj)||e.dialogObj.hide();var s={action:"rename",result:i};e.trigger("success",s),e.renamedItem=Array.isArray(i.files)?i.files[0]:i.files;var r={newName:e.renamedItem.name,itemData:[e.renamedItem],path:e.path};if(e.trigger("rename",r),"navigationpane"===e.activeModule){var o=fn(e),l=e.pathId[e.pathId.length-1].split("_").length-2;e.pathId.pop(),e.itemData=[(0,t.getValue)(e.pathId[e.pathId.length-1],e.feParent)];var h=ca(e,e.renamedItem);ga(e,mi,h),!(0,t.isNullOrUndefined)(o)&&e.pathNames.length>1&&l<=e.pathNames.length-1&&(e.pathNames[l]=e.renameText,e.hasId||e.setProperties({path:"/"+e.pathNames.slice(1).join("/")+"/"},!0)),e.itemData=e.navigationpaneModule.previousSelected.length>0?e.navigationpaneModule.treeObj.getTreeData(e.navigationpaneModule.previousSelected[0]):e.itemData,ga(e,Yt,e.path),e.itemData[0]=e.renamedItem,e.renamedItem=null}else e.itemData=[fn(e)],""!==e.breadcrumbbarModule.searchObj.value?Wa(e,bi,e.path,e.searchWord,e.showHiddenItems,!e.searchSettings.ignoreCase):e.isFiltered?ba(e,bi):ga(e,bi,e.path)}}catch(a){(0,t.isNullOrUndefined)(e.dialogObj)||e.dialogObj.hide(),Ya(e,a,"rename")}}function Ha(e,i,n,a){try{var s={itemData:i.files,isCopy:"copy"===a,path:n,targetData:e.itemData[0],targetPath:e.path};e.trigger("move",s),i.error&&i.error.fileExists?(e.fileLength=0,(0,t.isNullOrUndefined)(i.files)||(e.isPasteError=!0,Un(e,a,i)),$a(e,"DuplicateItems",i.error.fileExists),"404"===i.error.code&&Xa(e,"Error",i)):i.error||(0,t.isNullOrUndefined)(i.files)?i.error&&!(0,t.isNullOrUndefined)(i.files)?(e.isPasteError=!0,Un(e,a,i),Xa(e,"Error",i)):qa(e,i,a):(e.isPasteError=!1,Un(e,a,i))}catch(t){Ya(e,t,a)}}function Ba(e,i,n){try{var a={itemData:i.files,path:n};if(e.trigger("delete",a),(0,t.isNullOrUndefined)(i.files))qa(e,i,"delete");else if(e.setProperties({path:n},!0),e.itemData=[fn(e)],ga(e,qt,e.path),i.error)qa(e,i,"delete");else{var s={action:"delete",result:i};e.trigger("success",s)}}catch(t){Ya(e,t,"delete")}}function za(e,i,n,a){try{if((0,t.isNullOrUndefined)(i.details))qa(e,i,"details");else{Xa(e,a,null,i.details);var s={action:"details",result:i};e.trigger("success",s)}}catch(t){Ya(e,t,"details")}}function qa(e,t,i){Xa(e,"Error",t);var n={action:i,error:t.error};e.trigger("failure",n)}function Wa(e,t,i,n,a,s){Ma(e,{action:"search",path:i,searchString:n,showHiddenItems:a,caseSensitive:s,data:e.itemData},Ka,t)}function Ka(e,i,n){try{if((0,t.isNullOrUndefined)(i.files))qa(e,i,"search");else{e.notify(n,i);var a={action:"search",result:i};e.trigger("success",a)}}catch(t){Ya(e,t,"search")}}function Ga(e,i,n){var a=e.ajaxSettings.downloadUrl?e.ajaxSettings.downloadUrl:e.ajaxSettings.url,s={action:"download",path:i,names:n,data:e.itemData},r={data:s,cancel:!1,useFormPost:!0,ajaxSettings:{url:a,type:"POST",contentType:"application/json",responseType:"blob",data:JSON.stringify(s),onSuccess:null,onFailure:null,beforeSend:null}};e.trigger("beforeDownload",r,(function(i){if(!i.cancel)if(i.useFormPost){var n=(0,t.createElement)("form",{id:e.element.id+"_downloadForm",attrs:{action:a,method:"post",name:"downloadForm",download:""}}),s=(0,t.createElement)("input",{id:e.element.id+"_hiddenForm",attrs:{name:"downloadInput",value:JSON.stringify(i.data),type:"hidden"}});n.appendChild(s),e.element.appendChild(n),document.forms.namedItem("downloadForm").submit(),e.element.removeChild(n)}else try{var r,o;new t.Fetch({url:(0,t.getValue)("url",i.ajaxSettings),type:(0,t.getValue)("type",i.ajaxSettings),contentType:(0,t.getValue)("contentType",i.ajaxSettings),responseType:(0,t.getValue)("responseType",i.ajaxSettings),beforeSend:(0,t.getValue)("beforeSend",i.ajaxSettings),onLoad:function(i){if(r=i.headers.get("Content-Disposition")){var n=r.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/),a=n&&n[1];o=a?a.replace(/['"]/g,""):o}else o=e.itemData.length>1?"files.zip":(0,t.getValue)("isFile",e.itemData[0])?(0,t.getValue)("name",e.itemData[0]):(0,t.getValue)("name",e.itemData[0])+".zip"},onSuccess:function(t){e.trigger("success",i);var n=t,a=URL.createObjectURL(n),s=document.createElement("a");s.href=a,s.download=o,document.body.appendChild(s),s.click(),document.body.removeChild(s)},onFailure:function(t){var n={error:{code:t.status.toString(),message:jn(e,"Network-Error")+" "+e.ajaxSettings.downloadUrl}};Xa(e,"Error",n),e.trigger("failure",i)}}).send(JSON.stringify(i.data))}catch(t){Ya(e,t,"download")}}))}function Ya(e,t,i){qa(e,{files:null,error:{message:t.message,fileExists:null}},i)}var Ja=c(323),Qa=c(741);function Xa(e,i,n,a){var s=function(e,i,n,a){var s,r,o,l,h,d,p={header:"",content:"",buttons:[],dialogName:""};switch(p.open=function(){ts(e,e.dialogObj,p.dialogName)},p.close=function(){is(e,e.dialogObj,p.dialogName)},i=a&&!0===a.multipleFiles?"MultipleFileDetails":i){case"NewFolder":p.dialogName="Create Folder",p.header=jn(e,"Header-NewFolder"),p.content='<input type="text" value="New folder" id="newname"><div class="e-fe-error"></div>',p.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Create")},click:function(t){"keydown"!==t.type&&cs(e)}}],p.open=rs.bind(this,e);break;case"Delete":p.dialogName="Delete",e.selectedItems.length>1?(p.content=("<div>"+jn(e,"Content-Multiple-Delete")+"</div>").replace("{0}",e.selectedItems.length.toString()),p.header=jn(e,"Header-Multiple-Delete")):(p.content="<div>"+jn(e,e.isFile?"Content-Delete":"Content-Folder-Delete")+"</div>",p.header=jn(e,e.isFile?"Header-Delete":"Header-Folder-Delete")),p.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Yes")},click:function(){!function(e){e.dialogObj.hide(),e.notify(zt,{})}(e)}},{buttonModel:{content:jn(e,"Button-No")},click:function(){e.dialogObj.hide()}}];break;case"Rename":p.dialogName="Rename",p.header=jn(e,"Header-Rename"),p.content='<input type="text" class="e-input" id="rename"><div class="e-fe-error"></div>',p.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Save")},click:function(t){"keydown"!==t.type&&us(e)}}],p.open=os.bind(this,e);break;case"details":p.dialogName="File Details",r=new t.Internationalization(e.locale).formatDate(new Date(a.modified),{format:"MMMM dd, yyyy HH:mm:ss"}),s="",(0,t.isNullOrUndefined)(a.permission)||(s="<tr><td>"+jn(e,"Permission")+'</td><td class="'+Lt+'" >'+Jn(a.permission)+"</td></tr>"),p.header=a.name,p.content="<table><tr><td>"+jn(e,"Type")+'</td><td class="'+Lt+'" title="'+(a.isFile?"File":"Folder")+'">'+(a.isFile?"File":"Folder")+"</td></tr><tr><td>"+jn(e,"Size")+'</td><td><span class="'+Lt+'" title ="'+a.size+'">'+a.size+"</span></td></tr><tr><td>"+jn(e,"Location")+'</td><td class="'+Lt+'" title="'+a.location+'">'+a.location+"</td></tr><tr><td>"+jn(e,"Modified")+'</td><td class="'+Lt+'" >'+r+"</td></tr>"+s+"</table>",p.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Ok")},click:function(){e.dialogObj.hide()}}];break;case"MultipleFileDetails":p.dialogName="File Details",void 0===(o=e.itemData.map((function(e){return 0!==(d=e.name.indexOf(".")+1)||e.isFile?0!==d?e.name.substr(d).replace(" ",""):"undetermined":"Folder"})))[0]&&(o=a.name.split(",").map((function(e){return 0===(d=e.indexOf(".")+1)?"Folder":e.substr(d).replace(" ","")}))),l=o.every((function(e,t,i){return e===i[0]}))?"Folder"===o[0]?"Folder":o[0].toLocaleUpperCase()+" Type":"Multiple Types",h=a.location,p.header=a.name,p.content="<table><tr><td>"+jn(e,"Type")+':</td><td class="'+Lt+'">'+l+"</td></tr><tr><td>"+jn(e,"Size")+":</td><td>"+a.size+'<span class="'+Lt+'" title ="'+a.size+'"></span></td></tr><tr><td>'+jn(e,"Location")+':</td><td class="'+Lt+'" title="'+h+'">'+h+"</td></tr></table>",p.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Ok")},click:function(t){"keydown"!==t.type&&e.dialogObj.hide()}}];break;case"Error":e.notify(ii,{}),p.dialogName="Error","401"===n.error.code?p.header='<span class="e-fe-icon e-fe-access-error"></span><div class="e-fe-access-header">'+jn(e,"Access-Denied")+"</div>":p.header=jn(e,"Error"),p.content='<div class="'+Dt+'">'+n.error.message+"</div>",p.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Ok")},click:function(){e.dialogObj.hide()}}]}return p}(e,i,n,a);(0,t.isNullOrUndefined)(e.dialogObj)?(e.dialogObj=new Gi.Dialog({beforeOpen:hs.bind(this,e,s.dialogName),beforeClose:function(t){es(e,e.dialogObj,t,s.dialogName)},header:s.header,content:s.content,buttons:s.buttons,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,allowDragging:!0,isModal:!0,target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:Nn(e,e.isMobile?re:ae),width:"350px",open:s.open,close:s.close,enableRtl:e.enableRtl,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.dialogObj.isStringTemplate=!0,e.dialogObj.appendTo("#"+e.element.id+_)):function(e,t){e.dialogObj.header=t.header,e.dialogObj.content=t.content,e.dialogObj.buttons=t.buttons,e.dialogObj.enableRtl=e.enableRtl,e.dialogObj.open=t.open,e.dialogObj.close=t.close,e.dialogObj.beforeOpen=hs.bind(this,e,t.dialogName),e.dialogObj.beforeClose=function(i){es(e,e.dialogObj,i,t.dialogName)},e.dialogObj.dataBind(),e.dialogObj.show()}(e,s)}function $a(e,i,n,a){var s=function(e,t,i,n){var a,s,r,o={header:"",content:"",buttons:[],dialogName:""};switch(o.open=function(){ts(e,e.extDialogObj,o.dialogName)},o.close=function(){is(e,e.extDialogObj,o.dialogName)},t){case"Extension":o.header=jn(e,"Header-Rename-Confirmation"),o.content="<div>"+jn(e,"Content-Rename-Confirmation")+"</div>",o.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Yes")},click:function(){e.extDialogObj.hide(),va(e,n,e.renameText)}},{buttonModel:{content:jn(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,r=(s=e.replaceItems[e.fileLength]).lastIndexOf("/"),s=-1===r?s:s.substring(r),o.header=jn(e,"Header-Duplicate"),a="<div>"+jn(e,"Content-Duplicate")+"</div>",o.content=a.replace("{0}",s),o.close=function(){if(!e.isDropEnd&&0===e.duplicateItems.length){var t={fileDetails:e.droppedObjects};e.trigger("fileDropped",t),e.isDropEnd=e.isDragDrop=!1}is(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Yes")},click:function(){if(e.duplicateItems.push(e.replaceItems[e.fileLength]),e.duplicateRecords.push(_n(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=a.replace("{0}",t),e.extDialogObj.show()}else{e.extDialogObj.hide();var s=e.isDragDrop?e.dragPath:e.targetPath,r=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath,o=e.isDragDrop?"move":e.fileAction;ya(e,s,e.duplicateItems,r,o,e.duplicateItems,e.duplicateRecords)}}},{buttonModel:{content:jn(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=a.replace("{0}",t),e.extDialogObj.show()}else if(e.extDialogObj.hide(),0!==e.duplicateItems.length){var s=e.isDragDrop?"move":e.fileAction,r=e.isDragDrop?e.dragPath:e.targetPath,o=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath;ya(e,r,e.duplicateItems,o,s,e.duplicateItems,e.duplicateRecords)}}}];break;case"UploadRetry":o.dialogName="Retry Upload",o.header=jn(e,"Header-Retry"),o.content=e.retryFiles[0].name+'<div class="e-fe-retrycontent">'+jn(e,"Content-Retry")+"</div>",o.open=ss.bind(this,e),o.close=function(){e.isRetryOpened=!1,as(e),is(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:jn(e,"Button-Keep-Both")},click:function(){ns(e,!0)}},{buttonModel:{isPrimary:!0,content:jn(e,"Button-Replace")},click:function(){ns(e,!1)}},{buttonModel:{isPrimary:!0,content:jn(e,"Button-Skip")},click:function(){var t=0;e.isApplySame?(t=e.retryFiles.length,e.retryFiles=[],as(e)):(t=1,e.retryFiles.splice(0,1),0!==e.retryFiles.length?$a(e,"UploadRetry"):as(e)),e.notify($t,{count:t})}}]}return o}(e,i,n,a);e.isApplySame=!1,(0,t.isNullOrUndefined)(e.extDialogObj)?(e.extDialogObj=new Gi.Dialog({beforeOpen:ds.bind(this,e,s.dialogName),beforeClose:function(t){es(e,e.extDialogObj,t,s.dialogName)},content:s.content,header:s.header,closeOnEscape:!0,allowDragging:!0,animationSettings:{effect:"None"},target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:Nn(e,e.isMobile?re:ae),enableRtl:e.enableRtl,showCloseIcon:!0,isModal:!0,width:350,buttons:s.buttons,open:s.open,close:s.close,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.extDialogObj.isStringTemplate=!0,e.extDialogObj.appendTo("#"+e.element.id+z)):(e.extDialogObj.header=s.header,e.extDialogObj.close=s.close,e.extDialogObj.open=s.open,e.extDialogObj.close=s.close,e.extDialogObj.content=s.content,e.extDialogObj.buttons=s.buttons,e.extDialogObj.enableRtl=e.enableRtl,e.extDialogObj.locale=e.locale,e.extDialogObj.beforeOpen=ds.bind(this,e,s.dialogName),e.extDialogObj.beforeClose=function(t){es(e,e.extDialogObj,t,s.dialogName)},e.extDialogObj.dataBind(),e.extDialogObj.show())}function Za(e,t,i,n){var a={cancel:i.cancel,popupName:n,popupModule:t};e.trigger("beforePopupOpen",a,(function(e){i.cancel=e.cancel}))}function es(e,t,i,n){var a={cancel:i.cancel,popupModule:t,popupName:n};e.trigger("beforePopupClose",a,(function(t){i.cancel=t.cancel,i.cancel||!i.isInteracted||"Rename"!==n&&"Create Folder"!==n||e.trigger(ii,{})}))}function ts(e,t,i){var n={popupModule:t,element:t.element,popupName:i};e.trigger("popupOpen",n)}function is(e,t,i){var n={popupModule:t,element:t.element,popupName:i};e.trigger("popupClose",n)}function ns(e,t){e.isApplySame?(t?function(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)}(e):function(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)}(e),as(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?$a(e,"UploadRetry"):as(e))}function as(e){var i=!0;e.isRetryOpened?e.isRetryOpened=!1:i=!1;var n=(0,t.select)(".e-dlg-checkbox",e.extDialogObj.element);n&&(0,t.remove)(n),i?e.extDialogObj.hide():e.retryFiles=[]}function ss(e,i){e.isRetryOpened=!0;var n=(0,t.getValue)("element",i),a=(0,t.select)(".e-dlg-content",n),s=e.createElement("div",{className:"e-dlg-checkbox"}),r=e.createElement("input",{id:e.element.id+"_applyall"});s.appendChild(r),a.appendChild(s);var o=new Qa.CheckBox({label:jn(e,"ApplyAll-Label"),change:function(t){e.isApplySame=t.checked}});o.appendTo("#"+e.element.id+"_applyall"),ts(e,e.extDialogObj,"Retry Upload")}function rs(e){var i=(0,t.select)("#newname",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||ls(i,jn(e,"Content-NewFolder")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){fs(e,i)},i.onkeyup=function(t){13===bs(t)&&cs(e)},function(e){var i=(0,t.select)("#newname",e.dialogObj.element);i.focus(),i.value="";var n=i.value.length;i.setSelectionRange(0,n)}(e),ts(e,e.dialogObj,"Create Folder")}function os(e){var i=(0,t.select)("#rename",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||ls(i,jn(e,"Content-Rename")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){fs(e,i)},i.onkeyup=function(t){13===bs(t)&&us(e)},function(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)}(e,i),ts(e,e.dialogObj,"Rename")}function ls(e,t){Ja.Input.createInput({element:e,properties:{placeholder:t}})}function hs(e,i,n){ps((0,t.selectAll)(".e-btn",e.dialogObj.element)),Za(e,e.dialogObj,n,i)}function ds(e,i,n){ps((0,t.selectAll)(".e-btn",e.extDialogObj.element)),Za(e,e.extDialogObj,n,i)}function ps(e){for(var t=function(t){e[t].onkeydown=function(e){13===e.keyCode&&e.preventDefault()},e[t].onkeyup=function(i){13===i.keyCode&&e[t].click()}},i=0;i<e.length;i++)t(i)}function cs(e){var i=(0,t.select)("#newname",e.dialogObj.element);gs(e,i),""===i.parentElement.nextElementSibling.innerHTML&&ma(e,i.value)}function us(e){var i=(0,t.select)("#rename",e.dialogObj.element);if(gs(e,i),""===i.parentElement.nextElementSibling.innerHTML){var n=i.value,a=e.currentItemText.lastIndexOf(".");if(e.isFile&&!e.showFileExtension)n+=-1===a?"":e.currentItemText.substr(a);if(e.renameText=n,e.currentItemText!==n){var s="";if(s="navigationpane"===e.activeModule?ca(e,e.itemData[0]):e.path,e.renamedId=(0,t.getValue)("id",e.itemData[0]),e.isFile){var r=-1===a?"":e.currentItemText.substr(a),o=n.lastIndexOf("."),l=-1===o?"":n.substr(o);e.showFileExtension&&r!==l?$a(e,"Extension",null,s):va(e,s,n)}else va(e,s,n)}else e.dialogObj.hide()}}function fs(e,t){/[/\\|*?"<>:]/.test(t.value)?ms(e,t):""===t.value?t.parentElement.nextElementSibling.innerHTML=jn(e,"Validation-Empty"):t.parentElement.nextElementSibling.innerHTML=""}function gs(e,t){fs(e,t);var i=t.value.length-1;""===t.value||t.value.lastIndexOf(".")!==i&&t.value.lastIndexOf(" ")!==i||!e.showFileExtension&&-1!==t.value.lastIndexOf(".")&&0!==t.value.substring(t.value.indexOf(".")+1).length||ms(e,t)}function ms(e,t){var i=jn(e,"Validation-Invalid").replace("{0}",'"'+t.value+'"');e.enableHtmlSanitizer?t.parentElement.nextElementSibling.textContent=i:t.parentElement.nextElementSibling.innerHTML=i}function bs(e){return e.keyCode?e.keyCode:e.which?e.which:e.charCode}function vs(e,i,n){var a=(0,t.createElement)("div",{className:"e-image-wrap"}),s=(0,t.createElement)("img",{className:"e-image",attrs:{src:n,alt:i}});a.appendChild(s),(0,t.isNullOrUndefined)(e.viewerObj)?(e.viewerObj=new Gi.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:Nn(e,e.isMobile?re:ae),locale:e.locale,enableResize:!0,allowDragging:!0,enableHtmlSanitizer:e.enableHtmlSanitizer,position:{X:"center",Y:"center"},enableRtl:e.enableRtl,open:ys.bind(this,e),close:function(){is(e,e.viewerObj,"Image Preview")},beforeOpen:function(t){Za(e,e.viewerObj,t,"Image Preview")},beforeClose:function(t){es(e,e.viewerObj,t,"Image Preview")},resizing:Is.bind(this,e),resizeStop:Is.bind(this,e)}),e.viewerObj.isStringTemplate=!0,e.viewerObj.appendTo("#"+e.element.id+B)):(e.viewerObj.refresh(),e.viewerObj.header=i,e.viewerObj.content=a,e.viewerObj.enableRtl=e.enableRtl,e.viewerObj.dataBind(),e.viewerObj.show())}function ys(e){setTimeout((function(){e.viewerObj&&e.viewerObj.element.focus()})),Is(e),ts(e,e.viewerObj,"Image Preview")}function Is(e){var i=(0,t.select)(".e-dlg-content",e.viewerObj.element),n=(0,t.select)(".e-image-wrap",e.viewerObj.element),a=window.getComputedStyle(i,null),s=a?2*parseFloat(a.paddingRight):36,r=a?2*parseFloat(a.paddingBottom):20;n.style.width=i.offsetWidth-s+"px",n.style.height=i.offsetHeight-r+"px"}var Os=c(90),ws=function(){function e(e){this.isInteraction=!0,this.uploadOperation=!1,this.count=0,this.isRendered=!0,this.tapCount=0,this.isSelectAllCalled=!1,this.isPasteOperation=!1,this.isInteracted=!0,this.parent=e,this.element=(0,t.select)("#"+this.parent.element.id+V,this.parent.element),(0,t.addClass)([this.element],ce),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:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"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,(0,Gi.showSpinner)(this.parent.element),"LargeIcons"===this.parent.view){this.resetMultiSelect(),this.element.setAttribute("tabindex","0"),this.listObj&&(this.unWireEvents(),this.removeEventListener()),this.parent.notify(Ci,{});var i=(0,t.select)("#"+this.parent.element.id+V,this.parent.element),n=(0,t.select)("ul",i);if(n&&(0,t.remove)(n),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.parent.sortComparer&&"None"!==this.parent.sortBy?this.items=this.allItems=Yi.DataUtil.sort(this.items,this.parent.sortBy,this.comparer.bind(this)):this.items=this.allItems=On(this.parent,this.items),i.classList.remove(jt),this.parent.enableVirtualization&&this.allItems.length>0&&!(0,t.isNullOrUndefined)(this.parent.virtualizationModule)&&this.parent.virtualizationModule.setUIVirtualization(),this.listElements=Os.ListBase.createListFromJson(t.createElement,this.items,this.listObj),this.itemList=Array.prototype.slice.call((0,t.selectAll)("."+fe,this.listElements)),this.element.appendChild(this.listElements),this.listElements.setAttribute("aria-label","listbox"),this.preventImgDrag(),this.createDragObj(),0===this.itemList.length){var a=this.element.querySelector("."+me);this.element.removeChild(a),Dn(this.parent,this.element,e)}else 0!==this.itemList.length&&this.element.querySelector("."+Pe)&&this.element.removeChild(this.element.querySelector("."+Pe));!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.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[]));var s=this.element.querySelectorAll("."+Ie);0!==s.length&&(this.parent.activeModule="largeiconsview");for(var r=0;r<s.length;r++)s[r].setAttribute("aria-selected","true");this.element.style.maxHeight="100%",this.getItemCount(),this.addEventListener(),this.wireEvents(),this.parent.enableVirtualization&&this.allItems.length>0&&!(0,t.isNullOrUndefined)(this.parent.virtualizationModule)&&(this.parent.virtualizationModule.setUlElementHeight(),this.parent.virtualizationModule.wireScrollEvent(!1)),this.isRendered=!0,(0,Gi.hideSpinner)(this.parent.element),this.parent.selectedItems.length&&this.checkItem()}},e.prototype.comparer=function(e,t){if("Descending"===this.parent.sortOrder){var i=e;e=t,t=i}return this.parent.sortComparer(e,t)},e.prototype.preventImgDrag=function(){for(var e=0;e<this.itemList.length;)this.itemList[e].querySelector("img")&&(this.itemList[e].ondragstart=function(){return!1}),e++},e.prototype.createDragObj=function(){var e=this;this.listObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.listElements,{enableTailMode:!0,distance:5,enableAutoScroll:!1,dragTarget:"."+Ve,helper:this.dragHelper.bind(this),cursorAt:this.parent.dragCursorPosition,dragArea:this.parent.element,dragStop:Bn.bind(this,this.parent),drag:Yn.bind(this,this.parent),clone:!0,dragStart:function(t){zn(e.parent,t,e.dragObj)}})):this.dragObj&&!this.parent.allowDragAndDrop&&this.dragObj.destroy())},e.prototype.dragHelper=function(e){var i=e.sender.target,n=(0,t.closest)(i,".e-list-item");if(!n)return null;n&&!n.classList.contains("e-active")&&this.setFocus(n);var a=this.element.querySelectorAll("."+Ie);this.parent.activeElements=[],this.parent.dragData=[];for(var s=0;s<a.length;s++)this.parent.dragData.push(this.getItemObject(a[parseInt(s.toString(),10)])),this.parent.activeElements.push(a[s]);return on(this.parent,n),this.parent.dragPath=this.parent.path,Hn(this.parent),this.parent.virtualDragElement},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=(0,t.closest)(e.target,".e-list-item"),n=(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent);if(i){var a=this.getItemObject(i);this.parent.dropPath=a.isFile?this.parent.path:yn(this.parent,a,this.parent.path),this.parent.dropData=a.isFile?n:a}else this.parent.dropPath=this.parent.path,this.parent.dropData=n}},e.prototype.getModuleName=function(){return"largeiconsview"},e.prototype.onItemCreated=function(e){if(e.item.removeAttribute("aria-level"),!this.parent.showFileExtension&&(0,t.getValue)("isFile",e.curData)){var i=e.item.querySelector("."+ge),n=(0,t.getValue)("name",e.curData),a=(0,t.getValue)("type",e.curData);-1!==n.indexOf(a)&&(i.innerHTML=n.substr(0,n.length-a.length))}this.renderCheckbox(e);var s={element:e.item,fileDetails:e.curData,module:"LargeIconsView"};this.parent.trigger("fileLoad",s)},e.prototype.renderCheckbox=function(e){if(this.parent.showItemCheckBoxes){var i=(0,Qa.createCheckBox)(t.createElement,!1,{checked:!1,cssClass:"e-small"});i.setAttribute("role","checkbox"),i.setAttribute("aria-checked","false"),i.setAttribute("aria-label","checkbox"),e.item.firstElementChild.insertBefore(i,e.item.firstElementChild.childNodes[0])}},e.prototype.onLayoutChange=function(e){if("LargeIcons"===this.parent.view){if(this.destroy(),this.parent.enableVirtualization&&this.parent.setProperties({selectedItems:[]},!0),this.render(e),"layout-change"===(0,t.getValue)("name",e)&&"move"===this.parent.fileAction&&this.parent.isCut&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length)for(var i=this.getIndexes(this.parent.selectedNodes),n=0;n<i.length;)sn(this.itemList[i[n]]),n++;0!==this.element.querySelectorAll("."+Ie).length&&this.element.focus(),this.checkItem(),this.parent.isLayoutChange=!1}else this.element.setAttribute("tabindex","-1")},e.prototype.checkItem=function(){var e=this.element.querySelectorAll("."+Ie);if(e)for(var t=0;t<e.length;)this.checkState(e[t],!0),t++},e.prototype.renderList=function(e){for(var i=0,n=JSON.parse(JSON.stringify(e.files));i<n.length;){var a=bn(n[i]),s=(0,t.getValue)("name",n[i]),r=Qn(this.parent,n[i]),o=this.parent.selectedItems&&-1!==this.parent.selectedItems.indexOf(r)?Ve+" e-active":Ve;if(sa(n[i])||(o+=" "+na(n[i])),a===Ae&&this.parent.showThumbnail&&aa(n[i])){var l=vn(this.parent,n[i]);(0,t.setValue)("_fm_imageUrl",l,n[i]),(0,t.setValue)("_fm_imageAttr",{alt:s},n[i])}else(0,t.setValue)("_fm_icon",a,n[i]);(0,t.setValue)("_fm_htmlAttr",{class:o,title:s},n[i]),i++}return n},e.prototype.onFinalizeEnd=function(e){this.render(e)},e.prototype.onCreateEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.clearSelect(),this.selectItems([(0,t.getValue)(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null,this.parent.largeiconsviewModule.element.focus(),this.parent.activeModule="largeiconsview")},e.prototype.onSelectedData=function(){"largeiconsview"===this.parent.activeModule&&this.updateSelectedData()},e.prototype.onDeleteInit=function(){"largeiconsview"===this.parent.activeModule&&Ia(this.parent,this.parent.selectedItems,this.parent.path,"delete")},e.prototype.onDeleteEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.parent.setProperties({selectedItems:[]},!0),this.clearSelect())},e.prototype.onRefreshEnd=function(e){"LargeIcons"===this.parent.view&&this.onLayoutChange(e)},e.prototype.onRenameInit=function(){"largeiconsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},e.prototype.onPathChanged=function(e){this.parent.isCut=!1,""===this.parent.breadcrumbbarModule.searchObj.element.value&&(this.parent.searchedItems=[]),"LargeIcons"===this.parent.view&&(rn(this.parent),this.parent.setProperties({selectedItems:[]},!0),this.onLayoutChange(e),this.parent.renamedItem&&"largeiconsview"===this.parent.activeModule&&(this.clearSelect(),this.addSelection(this.parent.renamedItem)))},e.prototype.onOpenInit=function(e){"largeiconsview"===this.parent.activeModule&&this.doOpenAction(e.target)},e.prototype.onHideLayout=function(){"LargeIcons"!==this.parent.view&&this.element&&this.element.classList.add(jt)},e.prototype.onSelectAllInit=function(){if("LargeIcons"===this.parent.view){this.startItem=this.getFirstItem();var e=this.getLastItem();this.doSelection(e,{ctrlKey:!0,shiftKey:!0}),this.isInteraction=!0,this.isInteracted=!0}},e.prototype.onClearAllInit=function(){"LargeIcons"===this.parent.view&&(this.clearSelection(),this.isInteraction=!0,this.isInteracted=!0)},e.prototype.onBeforeRequest=function(){this.isRendered=!1},e.prototype.onAfterRequest=function(){this.isRendered=!0},e.prototype.onSearch=function(e){"LargeIcons"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(ri,{}),this.parent.searchedItems=e.files,this.onLayoutChange(e))},e.prototype.onLayoutRefresh=function(){this.parent.view},e.prototype.onUpdateSelectionData=function(){"LargeIcons"===this.parent.view&&this.updateSelectedData()},e.prototype.onPathColumn=function(){"LargeIcons"!==this.parent.view||(0,t.isNullOrUndefined)(this.listObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||"filterPath"!==this.parent.sortBy||(this.parent.sortBy="name",this.parent.notify(pi,{}))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Pi,this.onPathColumn),this.parent.off(Ut,this.onFinalizeEnd),this.parent.off(Vt,this.onCreateEnd),this.parent.off(Ii,this.onSelectedData),this.parent.off(zt,this.onDeleteInit),this.parent.off(qt,this.onDeleteEnd),this.parent.off(Wt,this.onRefreshEnd),this.parent.off(Yt,this.onPathChanged),this.parent.off(di,this.onLayoutChange),this.parent.off(ni,this.onSearch),this.parent.off(ai,this.onOpenInit),this.parent.off(si,this.onPathChanged),this.parent.off(At,this.onPropertyChanged),this.parent.off(Vi,this.onMethodCall),this.parent.off(ii,this.onActionFailure),this.parent.off(gi,this.onRenameInit),this.parent.off(bi,this.onPathChanged),this.parent.off(Ci,this.onHideLayout),this.parent.off(oi,this.onSelectAllInit),this.parent.off(li,this.onClearAllInit),this.parent.off(fi,this.onMenuItemData),this.parent.off(Qt,this.onBeforeRequest),this.parent.off(Zt,this.onAfterRequest),this.parent.off(Gt,this.splitterResizeHandler),this.parent.off(Kt,this.resizeHandler),this.parent.off(wi,this.onpasteInit),this.parent.off(Di,this.onpasteEnd),this.parent.off(Oi,this.oncutCopyInit),this.parent.off(ki,this.onDropInit),this.parent.off(ui,this.onDetailsInit),this.parent.off(ti,this.onLayoutRefresh),this.parent.off(Ti,this.onDropPath),this.parent.off(Ui,this.onUpdateSelectionData),this.parent.off(_t,this.onPathChanged))},e.prototype.addEventListener=function(){this.parent.on(Pi,this.onPathColumn,this),this.parent.on(Ut,this.onFinalizeEnd,this),this.parent.on(Vt,this.onCreateEnd,this),this.parent.on(Wt,this.onRefreshEnd,this),this.parent.on(Ii,this.onSelectedData,this),this.parent.on(Yt,this.onPathChanged,this),this.parent.on(zt,this.onDeleteInit,this),this.parent.on(wi,this.onpasteInit,this),this.parent.on(qt,this.onDeleteEnd,this),this.parent.on(di,this.onLayoutChange,this),this.parent.on(ni,this.onSearch,this),this.parent.on(ai,this.onOpenInit,this),this.parent.on(gi,this.onRenameInit,this),this.parent.on(bi,this.onPathChanged,this),this.parent.on(si,this.onPathChanged,this),this.parent.on(At,this.onPropertyChanged,this),this.parent.on(Vi,this.onMethodCall,this),this.parent.on(ii,this.onActionFailure,this),this.parent.on(Ci,this.onHideLayout,this),this.parent.on(oi,this.onSelectAllInit,this),this.parent.on(li,this.onClearAllInit,this),this.parent.on(fi,this.onMenuItemData,this),this.parent.on(Qt,this.onBeforeRequest,this),this.parent.on(Zt,this.onAfterRequest,this),this.parent.on(ki,this.onDropInit,this),this.parent.on(ui,this.onDetailsInit,this),this.parent.on(Gt,this.splitterResizeHandler,this),this.parent.on(Kt,this.resizeHandler,this),this.parent.on(Di,this.onpasteEnd,this),this.parent.on(Oi,this.oncutCopyInit,this),this.parent.on(ti,this.onLayoutRefresh,this),this.parent.on(Ti,this.onDropPath,this),this.parent.on(Ui,this.onUpdateSelectionData,this),this.parent.on(_t,this.onPathChanged,this)},e.prototype.onActionFailure=function(){this.isInteraction=!0,this.isInteracted=!0},e.prototype.onMenuItemData=function(e){if(this.parent.activeModule===this.getModuleName()){var i=(0,t.closest)(e.target,"li");this.parent.itemData=[this.getItemObject(i)]}},e.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.updateSelectedData():this.parent.itemData=[(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},e.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""===this.parent.folderPath?[fn(this.parent)]:[this.getItemObject((0,t.select)(".e-active",this.element))])},e.prototype.oncutCopyInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.element.querySelectorAll("."+Ie);this.parent.activeRecords=[],this.parent.activeElements=[];for(var t=0;t<e.length;t++)this.parent.activeElements.push(e[t]),this.parent.activeRecords.push(this.getItemObject(e[t]))}},e.prototype.onpasteEnd=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,(this.parent.path===this.parent.destinationPath||this.parent.path===Fn(this.parent,e)||this.parent.hasId)&&this.onPathChanged(e))},e.prototype.onDropPath=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},e.prototype.onPropertyChanged=function(e){var i;if(e.module===this.getModuleName()||"common"===e.module)for(var n=0,a=Object.keys(e.newProp);n<a.length;n++){switch(a[n]){case"allowDragAndDrop":this.createDragObj();break;case"selectedItems":this.isInteraction=!1,this.isInteracted=!1,i=(0,t.isNullOrUndefined)(this.parent.selectedItems)?[]:this.parent.selectedItems.slice(0),i=this.parent.allowMultiSelection?i:i.slice(i.length-1),this.parent.setProperties({selectedItems:[]},!0),this.onClearAllInit(),i.length&&this.selectItems(i),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),this.isInteraction=!0,this.isInteracted=!0;break;case"showThumbnail":cn(this.parent);break;case"showFileExtension":case"showHiddenItems":ga(this.parent,Yt,this.parent.path);break;case"allowMultiSelection":case"showItemCheckBoxes":if("LargeIcons"!==this.parent.view)break;cn(this.parent);break;case"view":dn(this.parent,"LargeIcons")}}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.listObj&&this.unWireEvents(),this.startItem=null,this.listElements=null)},e.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new t.KeyboardEvents(this.element,{keyAction:this.keydownActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),t.EventHandler.add(this.element,"mouseover",this.onMouseOver,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),t.EventHandler.remove(this.element,"mouseover",this.onMouseOver),this.keyboardModule.destroy(),this.keyboardDownModule.destroy()},e.prototype.onMouseOver=function(e){var i=(0,t.closest)(e.target,".e-list-item");rn(this.parent,"hover"),null!==i&&i.classList.add(Oe)},e.prototype.wireClickEvent=function(e){var i=this;e?this.clickObj=new t.Touch(this.element,{tap:function(e){i.parent.isDevice?(i.tapCount=e.tapCount,i.tapEvent=e,setTimeout((function(){i.tapCount>0&&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&&(0,t.addClass)([i.parent.element],oe),i.clickHandler(e))}}):this.clickObj&&this.clickObj.destroy()},e.prototype.doTapAction=function(e){var i=e.originalEvent.target,n=(0,t.closest)(i,"."+fe);this.multiSelect||i.classList.contains(me)||(0,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;rn(this.parent,"hover"),this.doSelection(t,e.originalEvent),this.parent.activeModule="largeiconsview"},e.prototype.doSelection=function(e,i){var n=this.parent.isMac?i.metaKey:i.ctrlKey,a=this.parent.isMac&&i.ctrlKey&&i.shiftKey,s=(0,t.closest)(e,"."+fe),r=e.classList;this.parent.isFile=!1;var o="select";if((3===i.which||a)&&!(0,t.isNullOrUndefined)(s)&&s.classList.contains(Ie))return this.addActive(s),void this.updateType(s);if((0,t.isNullOrUndefined)(s))this.parent.selectedItems.length===this.itemList.length&&(this.isSelectAllCalled=!0),this.clearSelection();else if(this.parent.allowMultiSelection&&s.classList.contains(Ie)&&(n||e.classList.contains(Se))&&(o="unselect"),n&&i.shiftKey&&!a&&(this.isSelectAllCalled=!0),!0!==this.triggerSelection(o,s).cancel){if(this.parent.allowMultiSelection&&(this.multiSelect||!i||n)||r.contains(Ce)||(this.updateType(s),this.clearSelect()),this.parent.allowMultiSelection&&i.shiftKey&&!a){i&&n||this.clearSelect(),this.startItem||(this.startItem=s);var l=this.itemList.indexOf(this.startItem),h=this.itemList.indexOf(s);if(l>h)for(var d=l;d>=h;d--)this.addActive(this.itemList[d]);else for(d=l;d<=h;d++)this.addActive(this.itemList[d]);this.addFocus(this.itemList[h])}else this.startItem=s,this.parent.allowMultiSelection&&s.classList.contains(Ie)?this.removeActive(s):this.addActive(s),this.addFocus(s);0===this.parent.selectedItems.length&&this.resetMultiSelect(),this.parent.notify(ri,{}),this.triggerSelect(o,s)}(0,t.isNullOrUndefined)(s)||(this.isSelectAllCalled=!1,this.updateType(s))},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(ri,{})},e.prototype.resetMultiSelect=function(){this.multiSelect=!1,(0,t.removeClass)([this.parent.element],oe)},e.prototype.doOpenAction=function(e){var i=this;if(!(0,t.isNullOrUndefined)(e)){var n=(0,t.closest)(e,"."+fe);if(this.parent.isFile=!1,!(0,t.isNullOrUndefined)(n)){this.updateType(n);var a=this.getItemObject(n);if(!aa(a))return void ia(this.parent,a,_i);var s={cancel:!1,fileDetails:a,module:"LargeIconsView"};this.parent.trigger("fileOpen",s,(function(e){if(!e.cancel){var n=(0,t.getValue)("name",a);if(i.parent.isFile){if(bn(a)===Ae){var s=vn(i.parent,a);vs(i.parent,n,s)}}else{if(""!==i.parent.breadcrumbbarModule.searchObj.element.value||i.parent.isFiltered)Mn(i.parent,a);else{var r=(0,t.getValue)("id",a);i.parent.oldPath=i.parent.path;var o=i.parent.path+((0,t.isNullOrUndefined)(r)?n:r)+"/";i.parent.setProperties({path:o},!0),i.parent.pathNames.push(n),i.parent.pathId.push((0,t.getValue)("_fm_id",a)),i.parent.itemData=[a],un(i.parent)}i.parent.isFiltered=!1,i.parent.setProperties({selectedItems:[]},!0)}}}))}}},e.prototype.updateType=function(e){var i=(0,t.select)("."+Te,e);this.parent.isFile=!!(0,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){var i=this;if(this.isRendered){var n=this.getFocusedItem(),a=this.getFirstItem(),s=this.getLastItem();switch(e.action){case"end":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTo(0,this.element.firstElementChild.scrollHeight),setTimeout((function(){i.navigateItem(i.itemList[i.itemList.length-1])}),10)):this.navigateItem(s);break;case"home":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTop=0,setTimeout((function(){i.navigateItem(i.itemList[0])}),10)):this.navigateItem(a);break;case"tab":(0,t.isNullOrUndefined)(n)?(0,t.isNullOrUndefined)(a)||this.addFocus(a):this.addFocus(n);break;case"moveDown":this.navigateDown(n,!0);break;case"moveLeft":this.navigateRight(n,!1);break;case"moveRight":this.navigateRight(n,!0);break;case"moveUp":this.navigateDown(n,!1);break;case"ctrlEnd":case"shiftEnd":case"csEnd":this.csEndKey(s,e);break;case"ctrlHome":case"shiftHome":case"csHome":this.csHomeKey(a,e);break;case"ctrlDown":case"shiftDown":case"csDown":this.csDownKey(n,e);break;case"ctrlLeft":case"shiftLeft":case"csLeft":this.csLeftKey(n,e);break;case"ctrlRight":case"shiftRight":case"csRight":this.csRightKey(n,e);break;case"ctrlUp":case"shiftUp":case"csUp":this.csUpKey(n,e);break;case"space":this.spaceKey(n);break;case"ctrlSpace":case"shiftSpace":case"csSpace":(0,t.isNullOrUndefined)(n)||this.doSelection(n,e);break;case"ctrlA":this.ctrlAKey(a,s);break;case"enter":this.doOpenAction(this.parent.visitedItem?this.parent.visitedItem:this.getVisitedItem());break;case"altEnter":this.parent.notify(ui,{}),Oa(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":nn(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"ctrlC":gn(this.parent);break;case"ctrlV":this.parent.folderPath="",kn(this.parent);break;case"ctrlX":mn(this.parent);break;case"f2":this.performRename();break;case"ctrlD":this.doDownload();break;case"back":this.parent.traverseBackward()}}},e.prototype.doDownload=function(){this.updateSelectedData(),Zn(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<e.length;t++)if(!sa(e[t]))return void ia(this.parent,e[t],Hi);Xa(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),$n(this.parent))},e.prototype.updateRenameData=function(){var e=(0,t.select)("."+fe+"."+Ie,this.element),i=this.getItemObject(e);Xn(this.parent,i)},e.prototype.getVisitedItem=function(){var e=this.parent.selectedItems[this.parent.selectedItems.length-1],t=this.getIndexes([e],this.parent.hasId);return this.itemList[t[0]]},e.prototype.getFocusedItem=function(){return(0,t.select)("."+fe+"."+we,this.element)},e.prototype.getActiveItem=function(){return(0,t.select)("."+fe+"."+Ie,this.element)},e.prototype.getFirstItem=function(){return this.itemList[0]},e.prototype.getLastItem=function(){return this.itemList[this.itemList.length-1]},e.prototype.navigateItem=function(e){this.setFocus(e)},e.prototype.navigateDown=function(e,t){var i=this.getNextItem(e,t,this.perRow);this.setFocus(i)},e.prototype.navigateRight=function(e,t){var i=this.getNextItem(e,t);this.setFocus(i)},e.prototype.getNextItem=function(e,i,n){if((0,t.isNullOrUndefined)(e))return this.getFocusedItem()||this.getActiveItem()||this.getFirstItem();var a,s=this.itemList.indexOf(e);do{if(s=i?n?s+n:s+1:n?s-n:s-1,a=this.itemList[s],this.parent.enableVirtualization&&(0,t.isNullOrUndefined)(a)){var r=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-bottom"),10),o=this.itemList[0].getBoundingClientRect().height+r;this.element.firstElementChild.scrollTo(this.element.firstElementChild.scrollTop,this.element.firstElementChild.scrollTop+o)}if((0,t.isNullOrUndefined)(a))return e}while(!(0,t.isVisible)(a));return a},e.prototype.setFocus=function(e){(0,t.isNullOrUndefined)(e)||!0!==this.triggerSelection("select",e).cancel&&(this.startItem=e,this.clearSelect(),this.addActive(e),this.addFocus(e),this.parent.notify(ri,{}),this.triggerSelect("select",e))},e.prototype.spaceKey=function(e){(0,t.isNullOrUndefined)(e)||e.classList.contains(Ie)||!0!==this.triggerSelection("select",e).cancel&&(this.addActive(e),this.parent.notify(ri,{}),this.triggerSelect("select",e))},e.prototype.ctrlAKey=function(e,i){if(this.parent.allowMultiSelection&&!(0,t.isNullOrUndefined)(e)){this.startItem=e;var n=this.element.querySelector("."+me),a=n.scrollTop,s=this.getFocusedItem();this.doSelection(i,{ctrlKey:!0,shiftKey:!0}),n.scrollTop=a,(0,t.isNullOrUndefined)(s)||this.addFocus(s)}},e.prototype.csEndKey=function(e,i){this.parent.allowMultiSelection?(0,t.isNullOrUndefined)(e)||("ctrlEnd"===i.action?this.addFocus(e):this.doSelection(e,i)):this.navigateItem(e)},e.prototype.csHomeKey=function(e,i){this.parent.allowMultiSelection?(0,t.isNullOrUndefined)(e)||("ctrlHome"===i.action?this.addFocus(e):this.doSelection(e,i)):this.navigateItem(e)},e.prototype.csDownKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!0,this.perRow);(0,t.isNullOrUndefined)(n)||("ctrlDown"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateDown(e,!0)},e.prototype.csLeftKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!1);(0,t.isNullOrUndefined)(n)||("ctrlLeft"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateRight(e,!1)},e.prototype.csRightKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!0);(0,t.isNullOrUndefined)(n)||("ctrlRight"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateRight(e,!0)},e.prototype.csUpKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!1,this.perRow);(0,t.isNullOrUndefined)(n)||("ctrlUp"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateDown(e,!1)},e.prototype.addActive=function(e){(0,t.isNullOrUndefined)(e)||(e.classList.contains(Ie)||(this.parent.selectedItems.push(this.getDataName(e)),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),(0,t.addClass)([e],[Ie]),e.setAttribute("aria-selected","true"),this.checkState(e,!0)),this.parent.visitedItem=e)},e.prototype.removeActive=function(e){if(!(0,t.isNullOrUndefined)(e)){(0,t.removeClass)([e],[Ie]),this.parent.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),this.checkState(e,!1);var i=this.parent.selectedItems.indexOf(this.getDataName(e));i>-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 Qn(this.parent,t)},e.prototype.addFocus=function(e){this.element.setAttribute("tabindex","-1");var i=this.getFocusedItem();i&&(i.removeAttribute("tabindex"),(0,t.removeClass)([i],[we])),(0,t.addClass)([e],[we]),e.setAttribute("tabindex","0"),e.focus()},e.prototype.checkState=function(e,i){if(this.parent.showItemCheckBoxes){var n=(0,t.select)("."+Ce,e);(0,t.isNullOrUndefined)(n)||(i?n.classList.contains(Se)||((0,t.addClass)([n],Se),(0,t.closest)(n,"."+xe).setAttribute("aria-checked","true")):n.classList.contains(Se)&&((0,t.removeClass)([n],Se),(0,t.closest)(n,"."+xe).setAttribute("aria-checked","false")))}},e.prototype.clearSelect=function(){var e=Array.prototype.slice.call((0,t.selectAll)("."+Ie,this.listElements));if(0!==e.length){if(!0!==this.triggerSelection("unselect",e[0]).cancel)for(var i=0,n=e.length;i<n;i++)this.removeActive(e[i]);this.triggerSelect("unselect",e[0])}},e.prototype.resizeHandler=function(){this.getItemCount()},e.prototype.splitterResizeHandler=function(){this.getItemCount()},e.prototype.getItemCount=function(){var e=1;if(this.itemList)for(var t=0,i=this.itemList.length-1;t<i&&this.itemList[t].getBoundingClientRect().top===this.itemList[t+1].getBoundingClientRect().top;t++)e++;this.perRow=e},e.prototype.triggerSelection=function(e,t){var i=[];if(this.isSelectAllCalled)for(var n=0,a=this.itemList.length;n<a;n++)i[n]=this.getItemObject(this.itemList[n]);else i[0]=this.getItemObject(t);var s={action:e,fileDetails:i.length>1?i:i[0],isInteracted:this.isInteraction,cancel:!1,target:this.isSelectAllCalled?null:t};return this.parent.trigger("fileSelection",s),this.isInteraction=!0,s},e.prototype.triggerSelect=function(e,t){var i=[];if(this.isSelectAllCalled){for(var n=0,a=this.itemList.length;n<a;n++)i[n]=this.getItemObject(this.itemList[n]);this.isSelectAllCalled=!1}else i[0]=this.getItemObject(t);this.parent.visitedData=i.length>1?i[i.length-1]:i[0];var s={action:e,fileDetails:i.length>1?i:i[0],isInteracted:this.isInteracted};this.parent.trigger("fileSelect",s),this.isInteracted=!0},e.prototype.selectItems=function(e){for(var t=this.getIndexes(e,this.parent.hasId),i=0,n=t.length;i<n;i++){this.doSelection(this.itemList[t[i]],{ctrlKey:!0,shiftKey:!1})}},e.prototype.getIndexes=function(e,i){for(var n=[],a=i?"id":"name",s=0,r=this.items.length;s<r;s++)-1!==e.indexOf((0,t.getValue)(a,this.items[s]))&&n.push(s);return n},e.prototype.getItemObject=function(e){var t=this.itemList.indexOf(e);return this.items[t]},e.prototype.addSelection=function(e){var i=[];if(this.parent.hasId)i=new Yi.DataManager(this.items).executeLocal((new Yi.Query).where("id","equal",this.parent.renamedId,!1));else{var n=new Yi.DataManager(this.items).executeLocal((new Yi.Query).where("name","equal",(0,t.getValue)("name",e),!1));n.length>0&&(i=new Yi.DataManager(n).executeLocal((new Yi.Query).where("filterPath","equal",this.parent.filterPath,!1)))}if(i.length>0){var a=this.items.indexOf(i[0]);this.doSelection(this.itemList[a],{ctrlKey:!0,shiftKey:!1})}},e.prototype.updateSelectedData=function(){for(var e=[],i=(0,t.selectAll)("."+fe+"."+Ie,this.element),n=0;n<i.length;n++)e[n]=this.getItemObject(i[n]);this.parent.itemData=e},e.prototype.onMethodCall=function(e){if("LargeIcons"===this.parent.view)switch((0,t.getValue)("action",e)){case"deleteFiles":this.deleteFiles((0,t.getValue)("ids",e));break;case"downloadFiles":this.downloadFiles((0,t.getValue)("ids",e));break;case"openFile":this.openFile((0,t.getValue)("id",e));break;case"renameFile":this.isInteraction=!1,this.isInteracted=!1,this.renameFile((0,t.getValue)("id",e),(0,t.getValue)("newName",e));break;case"createFolder":this.isInteraction=!1,this.isInteracted=!1;break;case"clearSelection":this.isInteraction=!1,this.isInteracted=!1,this.onClearAllInit();break;case"selectAll":this.isInteraction=!1,this.isInteracted=!1,this.onSelectAllInit()}},e.prototype.getItemsIndex=function(e){var i=[],n=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),a=this.parent.hasId?"id":"name";if(this.parent.hasId||!n)for(var s=0,r=this.items.length;s<r;s++)-1!==e.indexOf((0,t.getValue)(a,this.items[s]))&&i.push(s);else for(s=0,r=this.items.length;s<r;s++){var o=(0,t.getValue)("filterPath",this.items[s])+(0,t.getValue)("name",this.items[s]);-1===e.indexOf(o)&&-1===e.indexOf((0,t.getValue)(a,this.items[s]))||i.push(s)}return i},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="largeiconsview",(0,t.isNullOrUndefined)(e))this.performDelete();else{var i=this.getItemsIndex(e);if(0!==i.length){for(var n=[],a=[],s=0;s<i.length;s++)n[s]=this.items[i[s]],a[s]=Qn(this.parent,n[s]);ea(this.parent,n,a)}}},e.prototype.downloadFiles=function(e){if((0,t.isNullOrUndefined)(e))this.doDownload();else{var i=this.getItemsIndex(e);if(0!==i.length){for(var n=[],a=[],s=0;s<i.length;s++)n[s]=this.items[i[s]],a[s]=Qn(this.parent,n[s]);ta(this.parent,n,a)}}},e.prototype.openFile=function(e){if(!(0,t.isNullOrUndefined)(e)){var i=this.getItemsIndex([e]);i.length>0&&this.doOpenAction(this.itemList[i[0]])}},e.prototype.renameFile=function(e,i){if(this.parent.activeModule="largeiconsview",(0,t.isNullOrUndefined)(e))this.performRename();else{var n=this.getItemsIndex([e]);n.length>0&&(Xn(this.parent,this.items[n[0]]),(0,t.isNullOrUndefined)(i)?$n(this.parent):sa(this.parent.itemData[0])?va(this.parent,this.parent.path,i):ia(this.parent,this.parent.itemData[0],Hi))}},e}(),Ds=c(295),Ss=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);i<n.length;i++){var a=n[i],s=e.newProp.searchSettings;if("searchSettings"===a)(0,t.isNullOrUndefined)(s.allowSearchOnTyping)||this.searchEventBind(s.allowSearchOnTyping),!this.parent.breadcrumbbarModule.searchObj.value||""===this.parent.breadcrumbbarModule.searchObj.value||!(0,t.isNullOrUndefined)(s.allowSearchOnTyping)&&(0,t.isNullOrUndefined)(s.filterType)&&(0,t.isNullOrUndefined)(s.ignoreCase)||hn(this.parent,this.parent.breadcrumbbarModule.searchObj.value,!1)}},e.prototype.render=function(){this.addEventListener()},e.prototype.onPathChange=function(){var e=this.parent.pathNames,i=this.parent.path.split("/"),n=this.parent.createElement("ul",{className:"e-addressbar-ul"}),a=null,s=e.length;if(e.length>0){for(var r="",o=0;o<s;o++){var l=null;a=this.parent.createElement("li",{className:"e-address-list-item"});for(var h=0;h<=o;h++)r=r+i[h]+"/";if(a.setAttribute("data-utext",r),0!==o){var d=(0,t.createElement)("span",{className:Ot});a.appendChild(d)}s-o!=1?(l=(0,t.createElement)("a",{className:ge}),a.setAttribute("tabindex","0")):l=(0,t.createElement)("span",{className:ge}),r="",l.innerText=e[o],a.appendChild(l),n.appendChild(a)}var p=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul");(0,t.isNullOrUndefined)(p)||((0,t.isNullOrUndefined)(this.subMenuObj)||this.subMenuObj.destroy(),(0,t.remove)(p));var c=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");c?this.parent.breadCrumbBarNavigation.appendChild(n):this.parent.breadCrumbBarNavigation.insertBefore(n,c),this.updateBreadCrumbBar(n)}},e.prototype.updateBreadCrumbBar=function(e){for(var i=e.querySelectorAll("li"),n=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul"),a=window.getComputedStyle(n,null),s=parseFloat(a.getPropertyValue("padding-right")),r=parseFloat(a.getPropertyValue("padding-left")),o=n.offsetWidth-s-r,l=this.parent.createElement("ul",{className:"e-addressbar-ul"}),h=0,d=[],p=0;p<i.length;p++){var c=i[p].clientWidth;d.push(c),h+=c}(0,t.isNullOrUndefined)(n)||(0,t.remove)(n);var u=this.parent.createElement("div");u.setAttribute("class","e-search-wrap");var f=this.parent.element.id+ee,g=(0,t.createElement)("input",{id:f,attrs:{autocomplete:"off","aria-label":jn(this.parent,"Search")}});u.appendChild(g);var m=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap .e-input");if((0,t.isNullOrUndefined)(m)){this.parent.breadCrumbBarNavigation.appendChild(u);var b=(0,t.createElement)("span",{className:"e-icons e-fe-search"});t.EventHandler.add(b,"click",this.onShowInput,this),g.parentElement.insertBefore(b,g),this.searchObj=new Ja.TextBox({value:"",showClearButton:!0,placeholder:jn(this.parent,"Search"),focus:this.onFocus.bind(this),blur:this.onBlur.bind(this)}),this.searchObj.appendTo("#"+this.parent.element.id+ee),this.searchEventBind(this.parent.searchSettings.allowSearchOnTyping);var v=this.searchObj.element.nextElementSibling;t.EventHandler.add(v,"mousedown",this.searchChangeHandler.bind(this),this),t.EventHandler.add(this.searchObj.element,"keyup",this.onKeyUp.bind(this),this)}var y=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");if(h>(o-=this.searchWrapWidth?this.searchWrapWidth:y.offsetWidth)){for(p=i.length;p--;){var I=o-d[p];if(!(I>40)){for(var O=[],w=0;w<=p;w++){var D=i[w];O.push({text:D.innerText,utext:D.getAttribute("data-utext")})}var S=this.parent.createElement("li",{className:"e-breadcrumb-menu"}),C=this.parent.createElement("button",{className:"e-breadcrumb-submenu"});S.appendChild(C),l.insertBefore(S,l.querySelector("li")),this.subMenuObj=new Ds.DropDownButton({items:O,cssClass:"e-caret-hide e-submenu",iconCss:mt,iconPosition:"Top",enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.addSubMenuAttributes.bind(this),select:this.subMenuSelectOperations.bind(this)}),this.subMenuObj.isStringTemplate=!0,this.subMenuObj.appendTo(C);break}l.insertBefore(i[p],l.querySelector("li")),o=I}this.parent.breadCrumbBarNavigation.insertBefore(l,y)}else this.parent.breadCrumbBarNavigation.insertBefore(e,y)},e.prototype.onFocus=function(){(0,t.closest)(this.searchObj.element,".e-search-wrap").classList.add("e-focus")},e.prototype.onKeyUp=function(){this.parent.notify(Pi,{args:this.parent})},e.prototype.onBlur=function(){(0,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",(0,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;(0,t.isNullOrUndefined)(e.value)||(this.parent.isFiltered=!1,this.parent.searchSettings.allowSearchOnTyping?(window.clearTimeout(this.searchTimer),this.searchTimer=window.setTimeout((function(){hn(i.parent,e.value,!1)}),300)):hn(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(!(0,t.isNullOrUndefined)(n)){this.parent.isFiltered=!1;var a=this.updatePath(n);this.parent.itemData=[(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)],this.triggerFileOpen(this.parent.itemData[0]),ga(this.parent,Yt,a);var s=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify(xi,{module:"treeview",selectedNode:s})}}},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(le))(0,t.removeClass)([this.parent.element],le),this.searchWrapWidth=null;else{var e=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");this.searchWrapWidth=e.offsetWidth,(0,t.addClass)([this.parent.element],le),this.searchObj.element.focus()}},e.prototype.updatePath=function(e){var i=(0,t.closest)(e,"li").getAttribute("data-utext");this.addressBarLink=i;var n=this.addressBarLink.split("/"),a=this.parent.pathId,s=this.parent.pathNames;this.parent.pathId=[],this.parent.pathNames=[];for(var r="",o=0,l=n.length-1;o<l;o++)this.parent.pathId.push(a[o]),this.parent.pathNames.push(s[o]),r+=n[o]+"/";return this.parent.setProperties({path:r},!0),r},e.prototype.onUpdatePath=function(){this.onPathChange(),this.removeSearchValue()},e.prototype.onCreateEnd=function(){this.onPathChange()},e.prototype.onRenameEnd=function(){this.onPathChange()},e.prototype.onDeleteEnd=function(){this.onUpdatePath()},e.prototype.removeSearchValue=function(){this.parent.isFiltered=!1,!this.searchObj||""===this.searchObj.value&&""===this.searchObj.element.value||(this.searchObj.value="",this.searchObj.element.value="",this.searchObj.dataBind())},e.prototype.onResize=function(){this.onPathChange()},e.prototype.onPasteEnd=function(){this.onPathChange()},e.prototype.addEventListener=function(){this.keyboardModule=new t.KeyboardEvents(this.parent.breadCrumbBarNavigation,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.parent.on(At,this.onPropertyChanged,this),t.EventHandler.add(this.parent.breadCrumbBarNavigation,"click",this.addressPathClickHandler,this),this.parent.on(Jt,this.destroy,this),this.parent.on(Yt,this.onUpdatePath,this),this.parent.on(Ut,this.onUpdatePath,this),this.parent.on(Wt,this.onUpdatePath,this),this.parent.on(si,this.onUpdatePath,this),this.parent.on(Vt,this.onCreateEnd,this),this.parent.on(bi,this.onRenameEnd,this),this.parent.on(qt,this.onDeleteEnd,this),this.parent.on(Gt,this.onResize,this),this.parent.on(Di,this.onPasteEnd,this),this.parent.on(Kt,this.onResize,this),this.parent.on(Ei,this.onSearchTextChange,this),this.parent.on(ki,this.onDropInit,this),this.parent.on(ti,this.onResize,this),this.parent.on(Ti,this.onPathChange,this)},e.prototype.keyActionHandler=function(e){if("enter"===e.action)this.addressPathClickHandler(e)},e.prototype.removeEventListener=function(){this.keyboardModule.destroy(),this.parent.off(Yt,this.onUpdatePath),this.parent.off(Ut,this.onUpdatePath),this.parent.off(Wt,this.onUpdatePath),this.parent.off(si,this.onUpdatePath),this.parent.off(Di,this.onPasteEnd),this.parent.off(Vt,this.onCreateEnd),this.parent.off(bi,this.onRenameEnd),this.parent.off(qt,this.onDeleteEnd),this.parent.off(Gt,this.onResize),this.parent.off(Kt,this.onResize),this.parent.off(Ei,this.onSearchTextChange),this.parent.off(ki,this.onDropInit),this.parent.off(ti,this.onResize),this.parent.off(Ti,this.onPathChange)},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=e.target.closest("li");this.parent.dropPath=this.updatePath(i.children[0]),this.parent.dropData=(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent),this.triggerFileOpen(this.parent.dropData);var n=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify(xi,{module:"treeview",selectedNode:n})}},e.prototype.getModuleName=function(){return"breadcrumbbar"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),(0,t.isNullOrUndefined)(this.subMenuObj)||this.subMenuObj.destroy(),(0,t.isNullOrUndefined)(this.searchObj)||this.searchObj.destroy())},e.prototype.onSearchTextChange=function(e){this.searchObj.element.placeholder=null!=this.parent.searchSettings.placeholder?this.parent.searchSettings.placeholder:jn(this.parent,"Search")+" "+jn(this.parent,e.cwd.name.toString())},e}(),Cs=c(215),xs=function(){function e(e){this.isMenuItemClicked=!1,this.currentItems=[],this.currentElement=null,this.disabledItems=[],this.parent=e,this.render()}return e.prototype.render=function(){this.keyConfigs={downarrow:"downarrow",uparrow:"uparrown"},this.contextMenu=new Cs.ContextMenu({enableRtl:this.parent.enableRtl,locale:this.parent.locale,target:"#"+this.parent.element.id,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.onBeforeItemRender.bind(this),select:this.onSelect.bind(this),beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this),cssClass:Nn(this.parent,ae)}),this.contextMenu.isStringTemplate=!0,this.contextMenu.appendTo("#"+this.parent.element.id+K),this.addEventListener()},e.prototype.onBeforeItemRender=function(e){if(e.item.id===this.getMenuId("largeiconsview")){var i=(0,t.createElement)("span");(n=e.element).insertBefore(i,"LargeIcons"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",gt+" "+Je)}if(e.item.id===this.getMenuId("detailsview")){var n;i=(0,t.createElement)("span");(n=e.element).insertBefore(i,"Details"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",ft+" "+Je)}},e.prototype.onBeforeClose=function(e){var i={cancel:!1,element:e.element,event:e.event,isFocused:e.isFocused,fileDetails:[this.menuItemData],items:e.items,parentItem:e.parentItem,menuType:this.menuType};if(this.parent.trigger("menuClose",i,(function(t){t.cancel&&(e.cancel=t.cancel)})),this.menuTarget=null,!this.isMenuItemClicked&&this.parent.pathId.length>1&&"navigationpane"===this.parent.activeModule){this.parent.pathId.pop();for(var n=[],a=0,s=Object.keys(this.parent.feParent);a<s.length;a++){var r=s[a],o=(0,t.getValue)(r,this.parent.feParent);-1!==this.parent.pathNames.indexOf(o.name)&&n.push(o._fm_id)}this.parent.pathId.push(n[n.length-1]),this.parent.navigationpaneModule.treeObj.setProperties({selectedNodes:[this.parent.pathId[this.parent.pathId.length-1]]})}this.isMenuItemClicked=!1},e.prototype.onBeforeOpen=function(e){var i,n,a=this,s=!1,r=!1,o=e.event.target;this.menuTarget=this.targetNodeElement=o,this.currentElement=e.element,o.classList.contains("e-spinner-pane")&&(o=this.parent.navigationpaneModule.activeNode.getElementsByClassName(Pt)[0],this.menuTarget=this.targetNodeElement=o),this.targetElement="Details"===this.parent.view?(0,t.closest)(o,"tr.e-row"):o,this.parent.enableVirtualization&&(o.classList.contains("e-virtual-bottom")||o.classList.contains("e-virtualtable"))&&(o=o.parentElement.closest("div"));var l=this.getTargetView(o);if(this.updateActiveModule(),o.classList.contains(Ge)||(0,t.closest)(o,"th")||(0,t.closest)(o,"#"+this.parent.element.id+X)||(0,t.closest)(o,"#"+this.parent.element.id+L))e.cancel=!0;else if("LargeIcons"!==this.parent.view&&this.targetElement&&this.targetElement.classList.contains("e-emptyrow"))this.setLayoutItem(o);else if((0,t.closest)(o,"."+Pe))this.setLayoutItem(o);else if(!o.classList.contains(Ye)&&!o.classList.contains(Je)&&!o.classList.contains(Qe)){if("LargeIcons"!==this.parent.view||(0,t.isNullOrUndefined)((0,t.closest)(o,"li"))||(0,t.closest)(o,"#"+this.parent.element.id+F))(0,t.isNullOrUndefined)((0,t.closest)(o,"tr.e-row"))?(0,t.closest)(o,"#"+this.parent.element.id+F)&&(i=(0,t.closest)(o,"li").getAttribute("data-uid"),(0,t.isNullOrUndefined)(i)||(this.navUid=i),r=!0):(i=this.targetElement.getAttribute("data-uid"),n=this.parent.detailsviewModule.gridObj.getRowObjectFromUID(i).data,(0,t.isNullOrUndefined)(this.targetElement.getAttribute("aria-selected"))&&this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute("aria-rowindex"),10)-1]),s=!0);else{(0,t.closest)(o,"li").classList.contains("e-active")||this.parent.largeiconsviewModule.doSelection(o,{ctrlKey:!0,shiftKey:!0}),n=this.parent.visitedData,s=!0}if(s)!0===(0,t.getValue)("isFile",n)?this.setFileItem():this.setFolderItem(!1);else if(r)if(this.setFolderItem(!0),i===this.parent.pathId[0])this.disabledItems.push("Delete","Rename","Cut","Copy");else for(var h=["Delete","Rename","Cut","Copy"],d=0;d<this.disabledItems.length;d++){var p=this.disabledItems[d];-1!==h.indexOf(p)&&(this.disabledItems.splice(d,1),d--)}else"TreeView"===l||"GridView"===l||"LargeIcon"===l?this.setLayoutItem(o):e.cancel=!0}var c=(0,t.select)("#"+this.getMenuId("Paste"),this.contextMenu.element);if(e.cancel||this.parent.enablePaste||!c||c.classList.contains("e-disabled")){var u=this.disabledItems.indexOf("Paste");-1!==u&&this.disabledItems.splice(u,1)}else-1===this.disabledItems.indexOf("Paste")&&this.disabledItems.push("Paste");if(e.cancel)this.menuTarget=this.currentElement=null;else{this.contextMenu.dataBind();var f=!1;(o.classList.contains(Ye)||o.classList.contains(Je)||o.classList.contains(Qe))&&(f=!0),this.menuItemData=f?this.menuItemData:this.getMenuItemData();var g={fileDetails:[this.menuItemData],element:e.element,target:o,items:f?e.items:this.contextMenu.items,menuModule:this.contextMenu,cancel:!1,menuType:this.menuType,isSubMenu:f};this.currentItems=g.items,this.parent.trigger("menuOpen",g,(function(t){f||(a.contextMenu.dataBind(),a.contextMenu.items=t.items,a.contextMenu.dataBind()),a.enableItems(a.disabledItems,!1,!0),e.cancel=t.cancel,t.cancel&&(a.menuTarget=a.targetNodeElement=a.currentElement=null)}))}},e.prototype.updateActiveModule=function(){this.parent.activeModule=(0,t.closest)(this.menuTarget,"#"+this.parent.element.id+F)?"navigationpane":(0,t.closest)(this.menuTarget,"#"+this.parent.element.id+U)?"detailsview":(0,t.closest)(this.menuTarget,"#"+this.parent.element.id+V)?"largeiconsview":this.parent.activeModule},e.prototype.getTargetView=function(e){return e.classList.contains(Ge)?"TreeView":e.classList.contains(Xe)?"GridView":e.classList.contains(Ze)||e.classList.contains(ce)?"LargeIcon":""},e.prototype.getItemIndex=function(e){for(var t=this.getMenuId(e),i=0;i<this.currentItems.length;i++)if(this.currentItems[i].id===t||this.currentItems[i].id===e)return i;return-1},e.prototype.disableItem=function(e){0!==e.length&&(this.disabledItems=this.disabledItems.concat(e))},e.prototype.enableItems=function(e,t,i){t&&(this.disabledItems=this.disabledItems.filter((function(t){return-1===e.indexOf(t)})));for(var n=0;n<e.length;n++){var a=this.checkValidItem(e[n]);1===a?this.contextMenu.enableItems([this.getMenuId(e[n])],t,i):2===a&&this.contextMenu.enableItems([e[n]],t,i)}},e.prototype.setFolderItem=function(e){if(this.menuType="folder",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.folder.map((function(e){return e.trim()}))),this.contextMenu.dataBind(),e){var i=(0,t.select)('[data-uid="'+this.navUid+'"]',this.parent.navigationpaneModule.treeObj.element);if((0,t.isNullOrUndefined)(i)||this.parent.pathNames[this.parent.pathNames.length-1]!==i.querySelector(".e-list-text").innerHTML||"navigationpane"!==this.parent.activeModule){var n=this.disabledItems.indexOf("Open");-1!==n&&this.disabledItems.splice(n,1)}else this.disabledItems.push("Open");if(0===this.parent.selectedItems.length)-1!==(a=this.disabledItems.indexOf("Rename"))&&this.disabledItems.splice(a,1)}else if("navigationpane"!==this.parent.activeModule){var a;if(1===this.parent.selectedItems.length)-1!==(a=this.disabledItems.indexOf("Rename"))&&this.disabledItems.splice(a,1);else this.disabledItems.push("Rename","Paste")}},e.prototype.setFileItem=function(){if(this.menuType="file",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.file.map((function(e){return e.trim()}))),this.contextMenu.dataBind(),1===this.parent.selectedItems.length){var e=this.disabledItems.indexOf("Rename");-1!==e&&this.disabledItems.splice(e,1)}else this.disabledItems.push("Rename")},e.prototype.setLayoutItem=function(e){this.menuType="layout",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.layout.map((function(e){return e.trim()}))),this.contextMenu.dataBind(),!this.parent.allowMultiSelection||"LargeIcons"===this.parent.view&&0!==(0,t.closest)(e,"#"+this.parent.element.id+V).getElementsByClassName(Pe).length||"Details"===this.parent.view&&0!==(0,t.closest)(e,"#"+this.parent.element.id+U).getElementsByClassName(Pe).length?this.disabledItems.push("SelectAll"):this.disabledItems=this.disabledItems.filter((function(e){return"SelectAll"!==e})),0===this.parent.selectedNodes.length&&-1===this.disabledItems.indexOf("Paste")&&this.disabledItems.push("Paste"),this.contextMenu.dataBind()},e.prototype.checkValidItem=function(e){if(!(0,t.isNullOrUndefined)(this.currentElement)){if(!(0,t.isNullOrUndefined)((0,t.select)("#"+this.getMenuId(e),this.currentElement)))return 1;if(!(0,t.isNullOrUndefined)((0,t.select)("#"+e,this.currentElement)))return 2}return-1},e.prototype.getMenuItemData=function(){if("layout"===this.menuType)return fn(this.parent);var e={target:this.menuTarget};return this.parent.notify(fi,e),this.parent.itemData[0]},e.prototype.onSelect=function(e){var i=this;if(!(0,t.isNullOrUndefined)(e.item)&&e.item.id){var n,a=e.item.id.substr((this.parent.element.id+"_cm_").length);"refresh"===a||"newfolder"===a||"upload"===a?(n=[fn(this.parent)],this.parent.itemData=n):(this.parent.notify(Ii,{}),n="navigationpane"===this.parent.activeModule&&"open"===a?[this.menuItemData]:this.parent.itemData);var s={cancel:!1,element:e.element,fileDetails:n,item:e.item};this.parent.trigger("menuClick",s,(function(s){var r;if(!s.cancel)switch("cut"!==a&&"copy"!==a&&(i.isMenuItemClicked=!0),a){case"cut":mn(i.parent);break;case"copy":gn(i.parent);break;case"paste":"folder"===i.menuType?"navigationpane"===i.parent.activeModule?(i.parent.navigationpaneModule.openFileOnContextMenuClick((0,t.closest)(i.targetNodeElement,"li")),i.parent.folderPath=i.parent.path):i.parent.folderPath=yn(i.parent,i.menuItemData,i.parent.path):i.parent.folderPath="",kn(i.parent);break;case"delete":for(var o=0;o<n.length;o++)if(!sa(n[o]))return void ia(i.parent,n[o],Hi);Xa(i.parent,"Delete");break;case"download":for(var l=0;l<n.length;l++)if(!la(n[l]))return void ia(i.parent,n[l],Wi);"navigationpane"===i.parent.activeModule?i.parent.notify(Mi,{}):i.parent.selectedItems.length>0&&Ga(i.parent,i.parent.path,i.parent.selectedItems);break;case"rename":sa(n[0])?(i.parent.notify(gi,{}),Xa(i.parent,"Rename")):ia(i.parent,n[0],Hi);break;case"selectall":i.parent.notify(oi,{});break;case"refresh":cn(i.parent);break;case"open":i.parent.visitedItem&&"navigationpane"!==i.parent.activeModule?i.parent.notify(ai,{target:i.parent.visitedItem}):"navigationpane"===i.parent.activeModule&&(i.parent.visitedItem&&i.parent.notify(ai,{target:i.parent.visitedItem}),i.parent.navigationpaneModule.openFileOnContextMenuClick((0,t.closest)(i.targetNodeElement,"li")));break;case"details":i.parent.notify(ui,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[],i.parent.navigationpaneModule.openFileOnContextMenuClick((0,t.closest)(i.targetNodeElement,"li"))),Oa(i.parent,r,i.parent.path,"details");break;case"newfolder":ha(i.parent);break;case"upload":da(i.parent);break;case"name":case"size":case"date":case"ascending":case"descending":case"none":Pn(i.parent,e);break;case"largeiconsview":dn(i.parent,"LargeIcons");break;case"detailsview":dn(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<i.length;t++){if("cssClass"===i[t])this.contextMenu.cssClass=Nn(this.parent,ae)}},e.prototype.addEventListener=function(){this.parent.on(Jt,this.destroy,this),this.parent.on(At,this.onPropertyChanged,this),this.keyboardModule=new t.KeyboardEvents(this.contextMenu.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},e.prototype.removeEventListener=function(){this.parent.off(Jt,this.destroy),this.parent.off(At,this.onPropertyChanged),this.keyboardModule.destroy()},e.prototype.keyActionHandler=function(e){switch(e.action){case"uparrow":case"downarrow":e.preventDefault()}},e.prototype.getModuleName=function(){return"contextmenu"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.contextMenu.destroy(),this.targetElement=null)},e.prototype.getItemData=function(e){for(var t=[],i=0;i<e.length;i++){var n=void 0,a=this.getMenuId(e[i]),s=jn(this.parent,e[i]);switch(e[i]){case"|":n={separator:!0};break;case"Open":n={id:a,text:s,iconCss:et};break;case"Upload":n={id:a,text:s,iconCss:tt};break;case"Cut":n={id:a,text:s,iconCss:it};break;case"Copy":n={id:a,text:s,iconCss:nt};break;case"Paste":n={id:a,text:s,iconCss:at};break;case"Delete":n={id:a,text:s,iconCss:st};break;case"Rename":n={id:a,text:s,iconCss:rt};break;case"NewFolder":n={id:a,text:s,iconCss:ot};break;case"Details":n={id:a,text:s,iconCss:lt};break;case"SortBy":n={id:a,text:s,iconCss:ht,items:[{id:this.getMenuId("Name"),text:jn(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?ve:null},{id:this.getMenuId("Size"),text:jn(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?ve:null},{id:this.getMenuId("Date"),text:jn(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?ve:null},{separator:!0},{id:this.getMenuId("Ascending"),text:jn(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?be:null},{id:this.getMenuId("Descending"),text:jn(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?be:null},{id:this.getMenuId("None"),text:jn(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?be:null}]};break;case"View":n={id:a,text:s,iconCss:"Details"===this.parent.view?ft:gt,items:[{id:this.getMenuId("largeiconsview"),text:jn(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?null:be},{id:this.getMenuId("detailsview"),text:jn(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?be:null}]};break;case"Refresh":n={id:a,text:s,iconCss:dt};break;case"SelectAll":n={id:a,text:s,iconCss:pt};break;case"Download":n={id:a,text:s,iconCss:ct};break;default:n={id:a,text:s}}t.push(n)}return t},e.prototype.getMenuId=function(e){return this.parent.element.id+"_cm_"+e.split(" ").join("").toLowerCase()},e}(),js={NewFolder:"New folder",Upload:"Upload",Delete:"Delete",Rename:"Rename",Download:"Download",Cut:"Cut",Copy:"Copy",Paste:"Paste",SortBy:"Sort by",Refresh:"Refresh","Item-Selection":"item selected","Items-Selection":"items selected",View:"View",Details:"Details",SelectAll:"Select all",Open:"Open","Tooltip-NewFolder":"New folder","Tooltip-Upload":"Upload","Tooltip-Delete":"Delete","Tooltip-Rename":"Rename","Tooltip-Download":"Download","Tooltip-Cut":"Cut","Tooltip-Copy":"Copy","Tooltip-Paste":"Paste","Tooltip-SortBy":"Sort by","Tooltip-Refresh":"Refresh","Tooltip-Selection":"Clear selection","Tooltip-View":"View","Tooltip-Details":"Details","Tooltip-SelectAll":"Select all",Name:"Name",Size:"Size",DateModified:"Modified",DateCreated:"Date created",Path:"Path",Modified:"Modified",Created:"Created",Location:"Location",Type:"Type",Permission:"Permission",Ascending:"Ascending",Descending:"Descending",None:"None","View-LargeIcons":"Large icons","View-Details":"Details",Search:"Search","Button-Ok":"OK","Button-Cancel":"Cancel","Button-Yes":"Yes","Button-No":"No","Button-Create":"Create","Button-Save":"Save","Header-NewFolder":"Folder","Content-NewFolder":"Enter your folder name","Header-Rename":"Rename","Content-Rename":"Enter your new name","Header-Rename-Confirmation":"Rename Confirmation","Content-Rename-Confirmation":"If you change a file name extension, the file might become unstable. Are you sure you want to change it?","Header-Delete":"Delete File","Content-Delete":"Are you sure you want to delete this file?","Header-Folder-Delete":"Delete Folder","Content-Folder-Delete":"Are you sure you want to delete this folder?","Header-Multiple-Delete":"Delete Multiple Items","Content-Multiple-Delete":"Are you sure you want to delete these {0} items?","Header-Duplicate":"File/Folder exists","Content-Duplicate":"{0} already exists. Do you want to rename and paste?","Header-Upload":"Upload Files",Error:"Error","Validation-Empty":"The file or folder name cannot be empty.","Validation-Invalid":'The file or folder name {0} contains invalid characters. Please use a different name. Valid file or folder names cannot end with a dot or space, and cannot contain any of the following characters: \\/:*?"<>|',"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"},Ns=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])},e(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)}}(),Ps=function(e,t,i,n){var a,s=arguments.length,r=s<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--)(a=e[o])&&(r=(s<3?a(r):s>3?a(t,i,r):a(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Es=function(e){function i(i,a){var s=e.call(this,i,a)||this;return s.filterData=null,s.selectedNodes=[],s.duplicateItems=[],s.duplicateRecords=[],s.previousPath=[],s.nextPath=[],s.existingFileCount=0,s.isLayoutChange=!1,s.layoutSelectedItems=[],s.renamedId=null,s.uploadItem=[],s.deleteRecords=[],s.isFile=!1,s.isCut=!1,s.isSearchCut=!1,s.isSearchDrag=!1,s.isPasteError=!1,s.folderPath="",s.isSameAction=!1,s.isFiltered=!1,s.isSortByClicked=!1,s.enablePaste=!1,s.persistData=!1,s.retryArgs=[],s.isOpened=!1,s.isRetryOpened=!1,s.isPathDrag=!1,s.searchedItems=[],s.retryFiles=[],s.isApplySame=!1,s.dragData=[],s.dragNodes=[],s.dragPath="",s.dropPath="",s.isDragDrop=!1,s.treeExpandTimer=null,s.dragCursorPosition={left:44,top:18},s.isDropEnd=!1,s.dragCount=0,s.droppedObjects=[],s.uploadingCount=0,s.uploadedCount=0,s.isMac=!1,s.dragSelectedItems=[],s.onScrollHandler=function(){(0,t.isNullOrUndefined)(s.contextmenuModule)||(0,t.isNullOrUndefined)(s.contextmenuModule.contextMenu)||s.contextmenuModule.contextMenu.close()},n.Inject(Ss,ws,xs),s}var n;return Ns(i,e),n=i,i.prototype.getModuleName=function(){return"filemanager"},i.prototype.preRender=function(){((0,t.isNullOrUndefined)(this.element.id)||""===this.element.id)&&this.element.setAttribute("id",(0,t.getUniqueID)("filemanager")),this.ensurePath(),this.feParent=[],this.feFiles=[],(0,t.setStyleAttribute)(this.element,{width:(0,t.formatUnit)(this.width),height:(0,t.formatUnit)(this.height)}),this.isDevice=t.Browser.isDevice,this.isMobile=this.checkMobile(),this.isMobile&&this.setProperties({navigationPaneSettings:{visible:!1}},!0);var e=(0,t.closest)(this.element,".e-bigger");this.isBigger=!!e,this.activeModule="LargeIcons"===this.view?"largeiconsview":"detailsview",(0,Gi.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(),js,this.locale)},i.prototype.getPersistData=function(){return this.addOnPersist(["view","path","selectedItems"])},i.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],name:"Toolbar"}),this.navigationPaneSettings.visible&&e.push({member:"navigationpane",args:[this],name:"NavigationPane"}),this.view&&e.push({member:"detailsview",args:[this],name:"DetailsView"}),this.contextMenuSettings.visible&&!this.isDevice&&e.push({member:"contextmenu",args:[this],name:"ContextMenu"}),this.enableVirtualization&&e.push({member:"virtualization",args:[this],name:"Virtualization"}),e},i.prototype.render=function(){this.initialize();var e=(0,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.isMac=navigator.platform.toUpperCase().indexOf("MAC")>=0,this.setRtl(this.enableRtl),this.addEventListeners(),ga(this,this.path!==this.originalPath?Ft:Ut,this.path),"Details"===this.fileView&&this.largeiconsviewModule.element.classList.add(jt),this.adjustHeight(),(0,t.isNullOrUndefined)(this.navigationpaneModule))&&(this.splitterObj.collapse(this.enableRtl?1:0),(0,t.select)("."+Rt,this.element).classList.add(jt));this.wireEvents(),this.renderComplete()},i.prototype.ensurePath=function(){var e=this.path;(0,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=[]},i.prototype.initialize=function(){this.isMobile&&(0,t.addClass)([this.element],se),this.allowMultiSelection&&(0,t.addClass)([this.element],ne),this.addCssClass(null,this.cssClass),this.renderFileUpload()},i.prototype.addWrapper=function(){var e=this.createElement("div",{id:this.element.id+L});this.element.appendChild(e);var t=this.createElement("div",{id:this.element.id+T,className:he});this.element.appendChild(t);var i=this.createElement("div",{id:this.element.id+A,className:de}),n=this.createElement("div",{id:this.element.id+F});i.appendChild(n);var a=this.createElement("div",{id:this.element.id+Q,className:pe});this.breadCrumbBarNavigation=this.createElement("div",{id:this.element.id+X,className:Ct}),a.appendChild(this.breadCrumbBarNavigation);var s=this.createElement("div",{id:this.element.id+U});a.appendChild(s);var r=this.createElement("div",{id:this.element.id+V,className:ce,attrs:{role:"group"}});a.appendChild(r);var o,l=this.createElement("span",{className:kt});a.appendChild(l),this.enableRtl?(t.appendChild(a),t.appendChild(i),o=[{size:"75%",min:"270px"},{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()}]):(t.appendChild(i),t.appendChild(a),o=[{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()},{size:"75%",min:"270px"}]),this.splitterObj=new Ki.Splitter({paneSettings:o,width:"100%",enableRtl:!1,enableHtmlSanitizer:this.enableHtmlSanitizer,resizing:this.splitterResize.bind(this)}),this.splitterObj.isStringTemplate=!0,this.splitterObj.appendTo(t);var h=this.createElement("div",{id:this.element.id+_});this.element.appendChild(h);var d=this.createElement("ul",{id:this.element.id+K});this.element.appendChild(d);var p=this.createElement("div",{id:this.element.id+B});this.element.appendChild(p);var c=this.createElement("div",{id:this.element.id+z});this.element.appendChild(c);var u=this.createElement("div",{id:this.element.id+q});this.element.appendChild(u)},i.prototype.adjustHeight=function(){var e=(0,t.select)("#"+this.element.id+L,this.element),i=e?e.offsetHeight:0;this.splitterObj&&(this.splitterObj.height=(this.element.clientHeight-i).toString(),this.splitterObj.dataBind())},i.prototype.splitterResize=function(){this.notify(Gt,{})},i.prototype.splitterAdjust=function(){var e=(0,t.select)("."+Rt,this.element);this.navigationPaneSettings.visible?(this.splitterObj.expand(this.enableRtl?1:0),e.classList.remove(jt)):(this.splitterObj.collapse(this.enableRtl?1:0),e.classList.add(jt))},i.prototype.addCssClass=function(e,i){(0,t.isNullOrUndefined)(e)||""===e||(0,t.removeClass)([this.element],e.split(" ")),(0,t.isNullOrUndefined)(i)||""===i||(0,t.addClass)([this.element],i.split(" "))},i.prototype.showSpinner=function(){(0,Gi.showSpinner)(this.element)},i.prototype.hideSpinner=function(){(0,Gi.hideSpinner)(this.element)},i.prototype.onContextMenu=function(e){e.preventDefault()},i.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())},i.prototype.renderFileUpload=function(){var e=this.element.id+$,t=this.createElement("input",{id:e,attrs:{name:"uploadFiles",type:"file"}});this.element.appendChild(t),this.uploadDialogObj=new Gi.Dialog({header:jn(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:Nn(this,this.isMobile?re:ae),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+q),this.renderUploadBox()},i.prototype.renderUploadBox=function(){var e=this.ajaxSettings.uploadUrl?this.ajaxSettings.uploadUrl:this.ajaxSettings.url;this.uploadObj=new Ja.Uploader({dropArea:(0,t.select)("#"+this.element.id+Q,this.element),asyncSettings:{saveUrl:e,removeUrl:e,chunkSize:this.uploadSettings.chunkSize,retryCount:0},locale:this.locale,enableRtl:this.enableRtl,uploading:this.onUploading.bind(this),chunkUploading:this.onChunkUploading.bind(this),removing:this.onRemoving.bind(this),canceling:this.onCancel.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,directoryUpload:this.uploadSettings.directoryUpload,fileListRendering:this.onFileListRender.bind(this)}),this.uploadObj.appendTo("#"+this.element.id+$)},i.prototype.onFileListRender=function(e){this.trigger("uploadListCreate",e)},i.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.directoryUpload=this.uploadSettings.directoryUpload,this.uploadObj.dataBind()},i.prototype.onBeforeOpen=function(e){var t={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupOpen",t,(function(t){e.cancel=t.cancel}))},i.prototype.onBeforeClose=function(e){var t={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupClose",t,(function(t){e.cancel=t.cancel}))},i.prototype.onOpen=function(){this.isOpened=!0,this.uploadDialogObj.element.focus();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};this.trigger("popupOpen",e)},i.prototype.onClose=function(){this.isOpened=!1,this.uploadObj.clearAll();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};this.trigger("popupClose",e)},i.prototype.onChunkUploading=function(e){var i="save";if(0!==this.retryArgs.length)for(var n=0;n<this.retryArgs.length;n++)e.fileData.name===this.retryArgs[n].file.name&&(i=this.retryArgs[n].action);var a=JSON.stringify((0,t.getValue)(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{size:e.fileData.size},{action:i},{data:a},{filename:e.fileData.name}]},i.prototype.onUploading=function(e){var i="save";if(0!==this.retryArgs.length)for(var n=0;n<this.retryArgs.length;n++)e.fileData.name===this.retryArgs[n].file.name&&(i=this.retryArgs[n].action,0===this.uploadSettings.chunkSize&&(this.retryArgs.splice(n,1),n=this.retryArgs.length));var a=JSON.stringify((0,t.getValue)(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{size:e.fileData.size},{action:i},{data:a},{filename:e.fileData.name}];var s={url:this.ajaxSettings.uploadUrl?this.ajaxSettings.uploadUrl:this.ajaxSettings.url,type:"POST",mode:!0,dataType:null,contentType:null,data:JSON.stringify(e.customFormData),onSuccess:null,onFailure:null,beforeSend:null};this.uploadEventArgs={action:"Upload",ajaxSettings:s,cancel:!1},this.trigger("beforeSend",this.uploadEventArgs,(function(i){e.customFormData=JSON.parse((0,t.getValue)("data",i.ajaxSettings)),e.cancel=i.cancel;var n={cancel:!1,httpRequest:e.currentRequest};"function"==typeof(0,t.getValue)("beforeSend",i.ajaxSettings)&&((0,t.getValue)("beforeSend",i.ajaxSettings)(n),(0,t.getValue)("cancel",n)&&(e.cancel=(0,t.getValue)("cancel",n)))}))},i.prototype.onRemoving=function(){this.onFileUploadSuccess({count:1}),1===this.uploadObj.getFilesData().length&&this.uploadDialogObj.hide()},i.prototype.onCancel=function(e){var i=JSON.stringify((0,t.getValue)(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{action:"remove"},{data:i}]},i.prototype.onClearing=function(){this.isOpened&&this.uploadDialogObj.hide()},i.prototype.onSelected=function(e){if(0!==e.filesData.length){this.uploadingCount=e.filesData.length,this.uploadedCount=0;var t=fn(this);if(!oa(t))return e.cancel=!0,void ia(this,t,qi);this.uploadDialogObj.show()}},i.prototype.onFileUploadSuccess=function(e){this.uploadedCount=this.uploadedCount+e.count,this.uploadSettings.autoClose&&this.uploadingCount===this.uploadedCount&&this.uploadDialogObj.hide()},i.prototype.onChunkUploadComplete=function(e){if(0!==this.retryArgs.length)for(var i=0;i<this.retryArgs.length;i++){((0,t.isNullOrUndefined)(e)?"":(0,t.getValue)("file",e).name)===this.retryArgs[i].file.name&&(this.retryArgs.splice(i,1),i=this.retryArgs.length)}},i.prototype.onUploadSuccess=function(e){this.uploadSettings.chunkSize>0&&this.onChunkUploadComplete(e);var i={action:"Upload",result:e};this.trigger("success",i),this.itemData=[(0,t.getValue)(this.pathId[this.pathId.length-1],this.feParent)],ga(this,Yt,this.path),this.onFileUploadSuccess({count:1}),"function"==typeof(0,t.getValue)("onSuccess",this.uploadEventArgs.ajaxSettings)&&(0,t.getValue)("onSuccess",this.uploadEventArgs.ajaxSettings)()},i.prototype.onUploadFailure=function(e){this.uploadSettings.chunkSize>0&&this.onChunkUploadComplete(e);var i=(0,t.getValue)("response",e),n=(0,t.getValue)("statusText",i);""!==n&&(0,t.setValue)("statusText",n,e);var a={action:"Upload",error:e};this.trigger("failure",a),400===(0,t.getValue)("statusCode",i)&&(this.retryFiles.push((0,t.getValue)("file",e)),this.isRetryOpened||$a(this,"UploadRetry")),"function"==typeof(0,t.getValue)("onFailure",this.uploadEventArgs.ajaxSettings)&&(0,t.getValue)("onFailure",this.uploadEventArgs.ajaxSettings)()},i.prototype.onInitialEnd=function(){Rn(this,this.path)},i.prototype.addEventListeners=function(){this.on(Qt,this.showSpinner,this),this.on(Zt,this.hideSpinner,this),this.on(Ft,this.onInitialEnd,this),this.on(ui,this.onDetailsInit,this),this.on($t,this.onFileUploadSuccess,this),t.EventHandler.add(this.element,"contextmenu",this.onContextMenu,this)},i.prototype.removeEventListeners=function(){this.isDestroyed||(this.off(Qt,this.showSpinner),this.off(Zt,this.hideSpinner),this.off(Ft,this.onInitialEnd),this.off(ui,this.onDetailsInit),this.off($t,this.onFileUploadSuccess),t.EventHandler.remove(this.element,"contextmenu",this.onContextMenu))},i.prototype.onDetailsInit=function(){(0,t.isNullOrUndefined)(this.activeModule)&&(this.itemData=[(0,t.getValue)(this.pathId[this.pathId.length-1],this.feParent)])},i.prototype.resizeHandler=function(){this.adjustHeight(),this.notify(Kt,{})},i.prototype.keyActionHandler=function(e){switch(e.action){case"altN":e.preventDefault(),this.itemData=[fn(this)],ra(this.itemData[0])?Xa(this,"NewFolder"):ia(this,this.itemData[0],Bi);break;case"f5":e.preventDefault(),cn(this);break;case"ctrlShift1":e.preventDefault(),this.fileView="Details",this.setProperties({view:"Details"},!0),(0,Gi.showSpinner)(this.element),dn(this,"Details");break;case"ctrlShift2":e.preventDefault(),this.fileView="LargeIcons",this.setProperties({view:"LargeIcons"},!0),(0,Gi.showSpinner)(this.element),dn(this,"LargeIcons");break;case"ctrlU":e.preventDefault(),-1!==this.toolbarSettings.items.indexOf("Upload")&&(0,t.select)("#"+this.element.id+$,this.element).click()}},i.prototype.wireSelectOnDragEvent=function(e){(0,t.isNullOrUndefined)(this.view)||(e&&(this.viewElem="LargeIcons"===this.view?this.largeiconsviewModule.element:this.element.querySelector(".e-gridcontent")),this.viewElem&&(e?this.allowMultiSelection&&(t.EventHandler.add(this.viewElem,"mousedown",this.onDragStart,this),this.on(di,this.onLayoutChange,this),this.on(ri,this.onLayoutChange,this)):(t.EventHandler.remove(this.viewElem,"mousedown",this.onDragStart),this.off(di,this.onLayoutChange),this.off(ri,this.onLayoutChange))))},i.prototype.wireEvents=function(){this.enableRangeSelection&&this.wireSelectOnDragEvent(!0),t.EventHandler.add(window,"resize",this.resizeHandler,this),this.contextMenuSettings.visible&&this.element.addEventListener("scroll",this.onScrollHandler,!0),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},i.prototype.unWireEvents=function(){this.wireSelectOnDragEvent(!1),t.EventHandler.remove(window,"resize",this.resizeHandler),this.contextMenuSettings.visible&&this.element.removeEventListener("scroll",this.onScrollHandler,!0),this.keyboardModule.destroy()},i.prototype.onDragStart=function(e){if(this.viewElem){if(this.allowDragAndDrop)if((0,t.closest)(e.target,this.viewElem.classList.contains("e-large-icons")?".e-list-item":".e-fe-text"))return;e.preventDefault(),this.dragX=e.pageX,this.dragY=e.pageY,this.dragSelectElement||(this.dragSelectElement=(0,t.createElement)("div",{id:this.element.id+"_drag",className:"e-filemanager e-drag-select",styles:"left: "+this.dragX+"px;top: "+this.dragY+"px;"}),document.body.append(this.dragSelectElement)),t.EventHandler.add(document,"mouseup",this.onDragStop,this),t.EventHandler.add(this.viewElem,"mousemove",this.onDrag,this),t.EventHandler.add(this.dragSelectElement,"mousemove",this.onDrag,this)}},i.prototype.onDrag=function(e){if(e.stopPropagation(),this.dragSelectElement){var i=e.pageX-this.dragX,n=e.pageY-this.dragY;(0,t.setStyleAttribute)(this.dragSelectElement,{left:i<0?this.dragX+i+"px":this.dragX+"px",top:n<0?this.dragY+n+"px":this.dragY+"px",height:Math.abs(n)+"px",width:Math.abs(i)+"px"}),this.selectItems()}else t.EventHandler.remove(this.viewElem,"mousemove",this.onDrag)},i.prototype.onDragStop=function(){this.viewElem&&(t.EventHandler.remove(document,"mouseup",this.onDragStop),t.EventHandler.remove(this.viewElem,"mousemove",this.onDrag)),this.dragSelectElement&&(t.EventHandler.remove(this.dragSelectElement,"mousemove",this.onDrag),this.dragSelectElement.clientHeight>0&&this.dragSelectElement.clientWidth>0&&this.setProperties({selectedItems:this.dragSelectedItems}),this.dragSelectedItems=[],(0,t.detach)(this.dragSelectElement),this.dragSelectElement=null)},i.prototype.selectItems=function(){var e=this.dragSelectElement.getBoundingClientRect();e.height>0&&e.width>0&&(this.dragSelectedItems=[],(0,t.removeClass)((0,t.selectAll)(".e-active",this.viewElem),["e-active","e-focus"]),(0,t.removeClass)((0,t.selectAll)(".e-check",this.viewElem),["e-check"]));for(var i=0,n=(0,t.selectAll)(this.viewElem.classList.contains("e-large-icons")?".e-list-item":".e-row",this.viewElem);i<n.length;i++){var a=n[i],s=a.getBoundingClientRect();!(e.right<s.left||e.left>s.right||e.bottom<s.top||e.top>s.bottom)&&e.height>0&&e.width>0&&(this.viewElem.classList.contains("e-large-icons")?(a.classList.add("e-active"),this.dragSelectedItems.push(a.getAttribute("title"))):((0,t.addClass)((0,t.selectAll)(".e-rowcell",a),["e-active"]),this.dragSelectedItems.push(a.querySelector(".e-drag-text").textContent)),a.querySelector(".e-frame").classList.add("e-check"))}},i.prototype.onLayoutChange=function(){this.enableRangeSelection&&(this.unWireEvents(),this.wireEvents())},i.prototype.setPath=function(){this.setProperties({selectedItems:[]},!0),this.ensurePath(),this.notify(hi,{selectedNode:this.pathId[0]}),ga(this,this.path!==this.originalPath?Ft:Ut,this.path)},i.prototype.onPropertyChanged=function(e,i){for(var n,a=this,s=!1,r=0,o=Object.keys(e);r<o.length;r++){switch(o[r]){case"ajaxSettings":this.ajaxSettingSetModel(e);break;case"allowDragAndDrop":this.allowDragAndDrop=e.allowDragAndDrop,this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"showItemCheckBoxes":this.showItemCheckBoxes=e.showItemCheckBoxes,this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"enableVirtualization":this.enableVirtualization=e.enableVirtualization,s=!0;break;case"allowMultiSelection":this.allowMultiSelection?(0,t.addClass)([this.element],ne):(this.selectedItems.length>1&&this.setProperties({selectedItems:this.selectedItems.slice(this.selectedItems.length-1)},!0),(0,t.removeClass)([this.element],ne)),this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"cssClass":this.addCssClass(i.cssClass,e.cssClass),this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"detailsViewSettings":this.notify(At,{module:"detailsview",newProp:e,oldProp:i});break;case"enableRangeSelection":this.wireSelectOnDragEvent(!1),e.enableRangeSelection&&this.wireSelectOnDragEvent(!0);break;case"enableRtl":this.enableRtl=e.enableRtl,s=!0;break;case"rootAliasName":this.rootAliasName=e.rootAliasName,s=!0;break;case"height":n=(0,t.isNullOrUndefined)(e.height)?e.height:(0,t.formatUnit)(e.height),(0,t.setStyleAttribute)(this.element,{height:n}),this.adjustHeight(),this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"locale":(0,t.isNullOrUndefined)(e.enableRtl)||this.setProperties({enableRtl:e.enableRtl},!0),this.localeSetModelOption(e);break;case"navigationPaneSettings":this.splitterAdjust(),this.notify(At,{module:"navigationpane",newProp:e,oldProp:i});break;case"path":this.oldPath=i.path,this.setPath();break;case"searchSettings":(0,t.isNullOrUndefined)(e.searchSettings.allowSearchOnTyping)||this.setProperties({searchSettings:{allowSearchOnTyping:e.searchSettings.allowSearchOnTyping}},!0),(0,t.isNullOrUndefined)(e.searchSettings.ignoreCase)&&this.setProperties({searchSettings:{ignoreCase:e.searchSettings.ignoreCase}},!0),(0,t.isNullOrUndefined)(e.searchSettings.filterType)&&this.setProperties({searchSettings:{filterType:e.searchSettings.filterType}},!0),this.notify(At,{module:"breadcrumbbar",newProp:e,oldProp:i});break;case"selectedItems":"Details"===this.view?this.notify(At,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===this.view&&this.notify(At,{module:"largeiconsview",newProp:e,oldProp:i});break;case"showFileExtension":case"showHiddenItems":this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"showThumbnail":this.notify(At,{module:"largeiconsview",newProp:e,oldProp:i});break;case"toolbarSettings":case"toolbarItems":this.adjustHeight(),this.notify(At,{module:"toolbar",newProp:e,oldProp:i});break;case"uploadSettings":this.updateUploader();break;case"view":"Details"===e.view?this.notify(At,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===e.view&&this.notify(At,{module:"largeiconsview",newProp:e,oldProp:i});break;case"width":(0,t.setStyleAttribute)(this.element,{width:(0,t.isNullOrUndefined)(e.width)?e.width:(0,t.formatUnit)(e.width)}),this.notify(At,{module:"common",newProp:e,oldProp:i});break;case"sortOrder":cn(this),this.notify(pi,{});break;case"sortBy":if("Details"===this.view){var l=this.detailsViewSettings.columns;if(!(!(0,t.isNullOrUndefined)(l)&&-1!==l.findIndex((function(e){return e.field===a.sortBy}))))return;cn(this),this.notify(pi,{}),this.notify(Ni,{})}else cn(this),this.notify(pi,{});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);break;case"fileSystemData":this.fileSystemData=e.fileSystemData,s=!0}}s&&this.refresh()},i.prototype.ajaxSettingSetModel=function(i){(0,t.isNullOrUndefined)(i.ajaxSettings.url)||this.setProperties({ajaxSettings:{url:i.ajaxSettings.url}},!0),(0,t.isNullOrUndefined)(i.ajaxSettings.uploadUrl)||this.setProperties({ajaxSettings:{uploadUrl:i.ajaxSettings.uploadUrl}},!0),(0,t.isNullOrUndefined)(i.ajaxSettings.downloadUrl)||this.setProperties({ajaxSettings:{downloadUrl:i.ajaxSettings.downloadUrl}},!0),(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)},i.prototype.localeSetModelOption=function(t){this.uploadObj.locale=t.locale,e.prototype.refresh.call(this)},i.prototype.destroy=function(){this.isDestroyed||(this.refreshing||this.notify(Jt,{}),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),(0,t.removeClass)([this.element],[xt,se,ne]),this.element.innerHTML="",this.breadCrumbBarNavigation=null,this.activeElements=null,this.virtualDragElement=null,this.visitedItem=null,e.prototype.destroy.call(this),this.virtualizationModule=null,this.navigationpaneModule=null,this.toolbarModule=null,this.contextmenuModule=null,this.largeiconsviewModule=null,this.detailsviewModule=null,this.breadcrumbbarModule=null,this.viewElem=null,this.dragSelectElement=null,this.dragSelectedItems=null)},i.prototype.createFolder=function(e){this.notify(Vi,{action:"createFolder"});var t=[fn(this)];(this.itemData=t,e)?/[/\\|*?"<>:]/.test(e)?Xa(this,"Error",{files:null,error:{code:"402",message:jn(this,"Validation-Invalid").replace("{0}",'"'+e+'"'),fileExists:null}}):ra(t[0])?ma(this,e):ia(this,t[0],Bi):ha(this)},i.prototype.deleteFiles=function(e){this.notify(Vi,{action:"deleteFiles",ids:e})},i.prototype.disableToolbarItems=function(e){!(0,t.isNullOrUndefined)(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!1)},i.prototype.downloadFiles=function(e){this.notify(Vi,{action:"downloadFiles",ids:e})},i.prototype.enableToolbarItems=function(e){!(0,t.isNullOrUndefined)(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!0)},i.prototype.enableMenuItems=function(e){(0,t.isNullOrUndefined)(e)||(0,t.isNullOrUndefined)(this.contextmenuModule)||(0,t.isNullOrUndefined)(this.contextmenuModule.contextMenu)||this.contextmenuModule.enableItems(e,!0,!0)},i.prototype.disableMenuItems=function(e){(0,t.isNullOrUndefined)(e)||(0,t.isNullOrUndefined)(this.contextmenuModule)||(0,t.isNullOrUndefined)(this.contextmenuModule.contextMenu)||this.contextmenuModule.disableItem(e)},i.prototype.getMenuItemIndex=function(e){return this.contextmenuModule?this.contextmenuModule.getItemIndex(e):-1},i.prototype.getToolbarItemIndex=function(e){return this.toolbarModule?this.toolbarModule.getItemIndex(e):-1},i.prototype.filterFiles=function(e){this.filterData=e||null,this.setProperties({selectedItems:[]},!0),this.notify(ri,{}),this.isFiltered=!0,""!==this.breadcrumbbarModule.searchObj.element.value&&(this.breadcrumbbarModule.searchObj.element.value=""),ba(this,_t)},i.prototype.getSelectedFiles=function(){return this.notify(Ui,{}),this.itemData},i.prototype.openFile=function(e){this.notify(Vi,{action:"openFile",id:e})},i.prototype.refreshFiles=function(){cn(this)},i.prototype.refreshLayout=function(){this.adjustHeight(),this.notify(ti,{})},i.prototype.selectAll=function(){this.notify(Vi,{action:"selectAll"})},i.prototype.traverseBackward=function(){if(this.pathNames.length>1&&""===this.breadcrumbbarModule.searchObj.element.value&&!this.isFiltered){this.pathId.pop(),this.pathNames.pop();var e=this.pathNames.slice(1).join("/");e=""===e?"/":"/"+e+"/",this.setProperties({path:e},!0),ga(this,Yt,this.path);var t=this.pathId[this.pathId.length-1];this.notify(xi,{module:"treeview",selectedNode:t})}},i.prototype.clearSelection=function(){this.notify(Vi,{action:"clearSelection"})},i.prototype.renameFile=function(e,t){this.notify(Vi,{action:"renameFile",id:e,newName:t})},i.prototype.uploadFiles=function(){var e=[fn(this)];this.itemData=e,da(this)},i.prototype.closeDialog=function(){pa(this)},i.prototype.setRtl=function(e){e?this.addCssClass(null,xt):this.addCssClass(xt,null),this.uploadObj&&(this.uploadDialogObj.enableRtl=e,this.uploadObj.enableRtl=e)},Ps([(0,t.Complex)({},a)],i.prototype,"ajaxSettings",void 0),Ps([(0,t.Property)([])],i.prototype,"fileSystemData",void 0),Ps([(0,t.Property)(!1)],i.prototype,"allowDragAndDrop",void 0),Ps([(0,t.Property)(!0)],i.prototype,"allowMultiSelection",void 0),Ps([(0,t.Property)(!0)],i.prototype,"showItemCheckBoxes",void 0),Ps([(0,t.Complex)({},S)],i.prototype,"contextMenuSettings",void 0),Ps([(0,t.Property)("")],i.prototype,"cssClass",void 0),Ps([(0,t.Complex)({},v)],i.prototype,"detailsViewSettings",void 0),Ps([(0,t.Property)(!0)],i.prototype,"enableHtmlSanitizer",void 0),Ps([(0,t.Property)(!1)],i.prototype,"enablePersistence",void 0),Ps([(0,t.Property)(!1)],i.prototype,"enableVirtualization",void 0),Ps([(0,t.Property)("400px")],i.prototype,"height",void 0),Ps([(0,t.Property)("LargeIcons")],i.prototype,"view",void 0),Ps([(0,t.Complex)({},j)],i.prototype,"navigationPaneSettings",void 0),Ps([(0,t.Property)("/")],i.prototype,"path",void 0),Ps([(0,t.Property)(null)],i.prototype,"popupTarget",void 0),Ps([(0,t.Complex)({},f)],i.prototype,"searchSettings",void 0),Ps([(0,t.Property)()],i.prototype,"selectedItems",void 0),Ps([(0,t.Property)(!0)],i.prototype,"showFileExtension",void 0),Ps([(0,t.Property)(null)],i.prototype,"rootAliasName",void 0),Ps([(0,t.Property)(!1)],i.prototype,"showHiddenItems",void 0),Ps([(0,t.Property)(!0)],i.prototype,"showThumbnail",void 0),Ps([(0,t.Property)("Ascending")],i.prototype,"sortOrder",void 0),Ps([(0,t.Property)("name")],i.prototype,"sortBy",void 0),Ps([(0,t.Property)(null)],i.prototype,"sortComparer",void 0),Ps([(0,t.Property)(!1)],i.prototype,"enableRangeSelection",void 0),Ps([(0,t.Complex)({},l)],i.prototype,"toolbarSettings",void 0),Ps([(0,t.Collection)([],h)],i.prototype,"toolbarItems",void 0),Ps([(0,t.Complex)({},E)],i.prototype,"uploadSettings",void 0),Ps([(0,t.Property)("100%")],i.prototype,"width",void 0),Ps([(0,t.Event)()],i.prototype,"fileLoad",void 0),Ps([(0,t.Event)()],i.prototype,"fileOpen",void 0),Ps([(0,t.Event)()],i.prototype,"beforeDownload",void 0),Ps([(0,t.Event)()],i.prototype,"beforeImageLoad",void 0),Ps([(0,t.Event)()],i.prototype,"beforePopupClose",void 0),Ps([(0,t.Event)()],i.prototype,"beforePopupOpen",void 0),Ps([(0,t.Event)()],i.prototype,"beforeSend",void 0),Ps([(0,t.Event)()],i.prototype,"created",void 0),Ps([(0,t.Event)()],i.prototype,"beforeFolderCreate",void 0),Ps([(0,t.Event)()],i.prototype,"folderCreate",void 0),Ps([(0,t.Event)()],i.prototype,"destroyed",void 0),Ps([(0,t.Event)()],i.prototype,"beforeDelete",void 0),Ps([(0,t.Event)()],i.prototype,"delete",void 0),Ps([(0,t.Event)()],i.prototype,"beforeRename",void 0),Ps([(0,t.Event)()],i.prototype,"rename",void 0),Ps([(0,t.Event)()],i.prototype,"beforeMove",void 0),Ps([(0,t.Event)()],i.prototype,"move",void 0),Ps([(0,t.Event)()],i.prototype,"search",void 0),Ps([(0,t.Event)()],i.prototype,"fileDragStart",void 0),Ps([(0,t.Event)()],i.prototype,"fileDragging",void 0),Ps([(0,t.Event)()],i.prototype,"fileDragStop",void 0),Ps([(0,t.Event)()],i.prototype,"fileDropped",void 0),Ps([(0,t.Event)()],i.prototype,"fileSelection",void 0),Ps([(0,t.Event)()],i.prototype,"fileSelect",void 0),Ps([(0,t.Event)()],i.prototype,"menuClick",void 0),Ps([(0,t.Event)()],i.prototype,"menuOpen",void 0),Ps([(0,t.Event)()],i.prototype,"menuClose",void 0),Ps([(0,t.Event)()],i.prototype,"failure",void 0),Ps([(0,t.Event)()],i.prototype,"popupClose",void 0),Ps([(0,t.Event)()],i.prototype,"popupOpen",void 0),Ps([(0,t.Event)()],i.prototype,"success",void 0),Ps([(0,t.Event)()],i.prototype,"toolbarClick",void 0),Ps([(0,t.Event)()],i.prototype,"toolbarCreate",void 0),Ps([(0,t.Event)()],i.prototype,"uploadListCreate",void 0),i=n=Ps([t.NotifyPropertyChanges],i)}(t.Component),Rs=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 Cs.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.root=e.parent.root?e.parent.root:e.parent,e.toolbarObj.appendTo("#"+e.parent.element.id+L)}))},e.prototype.getItemIndex=function(e){for(var t=this.getId(e),i=0;i<this.items.length;i++)if(this.items[i].id===t)return i;return-1},e.prototype.getItems=function(e){var t=e.slice();return this.parent.isDevice&&this.parent.allowMultiSelection&&t.push("SelectAll"),this.parent.toolbarItems.length>0&&(t=this.parent.toolbarItems.map((function(e){return e.name}))),t},e.prototype.onClicked=function(e){var i=this;if(!(0,t.isNullOrUndefined)(e.item)&&e.item.id){var n,a=e.item.id.substr((this.parent.element.id+"_tb_").length);"refresh"===a||"newfolder"===a||"upload"===a?(n=[fn(this.parent)],this.parent.itemData=n):(this.parent.notify(Ii,{}),n=this.parent.itemData);var s={cancel:!1,fileDetails:n,item:e.item};this.parent.trigger("toolbarClick",s,(function(s){var r,o;if(!s.cancel)switch(a){case"sortby":(o=(0,t.closest)(e.originalEvent.target,"."+ue))&&o.classList.contains("e-toolbar-popup")&&(e.cancel=!0);break;case"newfolder":ha(i.parent);break;case"cut":mn(i.parent);break;case"copy":gn(i.parent);break;case"delete":for(var l=0;l<n.length;l++)if(!sa(n[l]))return void ia(i.parent,n[l],Hi);Xa(i.parent,"Delete");break;case"details":i.parent.notify(ui,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[]),Oa(i.parent,r,i.parent.path,"details");break;case"paste":i.parent.folderPath="",kn(i.parent);break;case"refresh":cn(i.parent);break;case"download":Zn(i.parent);break;case"rename":sa(n[0])?(i.parent.notify(gi,{}),Xa(i.parent,"Rename")):ia(i.parent,n[0],Hi);break;case"upload":da(i.parent);break;case"selectall":i.parent.notify(oi,{});break;case"selection":i.parent.notify(li,{})}}))}},e.prototype.toolbarCreateHandler=function(){var e=this;if(!(0,t.isNullOrUndefined)((0,t.select)("#"+this.getId("SortBy"),this.parent.element))){var i=[{id:this.getPupupId("name"),text:jn(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?ve:""},{id:this.getPupupId("size"),text:jn(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?ve:""},{id:this.getPupupId("date"),text:jn(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?ve:""},{separator:!0},{id:this.getPupupId("ascending"),text:jn(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?be:""},{id:this.getPupupId("descending"),text:jn(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?be:""},{id:this.getPupupId("none"),text:jn(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?be:""}];this.buttonObj=new Ds.DropDownButton({items:i,cssClass:Nn(this.parent,ae),select:Pn.bind(this,this.parent),enableHtmlSanitizer:this.parent.enableHtmlSanitizer,enableRtl:this.parent.enableRtl,iconCss:ht}),this.buttonObj.isStringTemplate=!0,this.buttonObj.appendTo("#"+this.getId("SortBy"))}if(!(0,t.isNullOrUndefined)((0,t.select)("#"+this.getId("View"),this.parent.element))){var n='<span class="'+ft+" "+Je+'"></span>',a='<span class="'+gt+" "+Je+'"></span>',s=[{id:this.getPupupId("large"),text:jn(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?"":be},{id:this.getPupupId("details"),text:jn(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?be:""}];this.layoutBtnObj=new Ds.DropDownButton({iconCss:"Details"===this.parent.view?ft:gt,cssClass:Nn(this.parent,"e-caret-hide "+ae),items:s,select:this.layoutChange.bind(this),enableRtl:this.parent.enableRtl,content:'<span class="e-tbar-btn-text">'+jn(this.parent,"View")+"</span>",beforeItemRender:function(t){var i=t.item.iconCss,s=t.item.text===jn(e.parent,"View-LargeIcons"),r=i?" e-menu-icon "+i:"";t.element.innerHTML='<span class="'+r+'"></span>'+(s?a:n)+t.item.text;var o=t.element.firstChild;o&&""===o.className&&t.element.removeChild(o)}}),this.layoutBtnObj.isStringTemplate=!0,this.layoutBtnObj.appendTo("#"+this.getId("View"))}this.hideItems(this.default,!0),this.hideStatus(),this.parent.portals&&this.toolbarObj.portals&&(this.parent.portals=this.parent.portals.concat(this.toolbarObj.portals),this.parent.renderReactTemplates());for(var r=(0,t.selectAll)(".e-btn",this.toolbarObj.element),o=function(e){r[e].onkeydown=function(e){13!==e.keyCode||e.target.classList.contains("e-fe-popup")||e.preventDefault()},r[e].onkeyup=function(t){13!==t.keyCode||t.target.classList.contains("e-fe-popup")||r[e].click()}},l=0;l<r.length;l++)o(l);this.parent.refreshLayout()},e.prototype.updateSortByButton=function(){if(this.buttonObj)for(var e=this.buttonObj.items,t=0;t<e.length;t++)e[t].id===this.getPupupId("name")?e[t].iconCss="name"===this.parent.sortBy?ve:"":e[t].id===this.getPupupId("size")?e[t].iconCss="size"===this.parent.sortBy?ve:"":e[t].id===this.getPupupId("date")?"dateModified"===this.parent.sortBy||"dateCreated"===this.parent.sortBy?e[t].iconCss=this.parent.sortBy==this.parent.sortBy?ve:"":e[t].iconCss="_fm_modified"===this.parent.sortBy?ve:"":e[t].id===this.getPupupId("ascending")?e[t].iconCss="Ascending"===this.parent.sortOrder?be:"":e[t].id===this.getPupupId("descending")?e[t].iconCss="Descending"===this.parent.sortOrder?be:"":e[t].id===this.getPupupId("none")&&(e[t].iconCss="None"===this.parent.sortOrder?be:"")},e.prototype.getPupupId=function(e){return this.parent.element.id+"_ddl_"+e.toLowerCase()},e.prototype.layoutChange=function(e){"Details"===this.parent.view?e.item.id===this.getPupupId("large")&&dn(this.parent,"LargeIcons"):e.item.id===this.getPupupId("details")&&dn(this.parent,"Details")},e.prototype.toolbarItemData=function(e){var t=[],i="Both";this.parent.isMobile&&(i="Overflow");for(var n=0;n<e.length;n++){var a=void 0,s=void 0;this.parent.toolbarItems.length>0&&(s=this.getItemModel(this.parent.toolbarItems[parseInt(n.toString(),10)]));var r=this.getId(e[n]),o=jn(this.parent,e[n]),l=jn(this.parent,"Tooltip-"+e[n]);switch(e[n]){case"|":a={type:"Separator"};break;case"Upload":a={id:r,text:o,tooltipText:l,prefixIcon:tt,showTextOn:i};break;case"SortBy":var h='<span class="e-tbar-btn-text e-tbar-ddb-text">'+o+"</span>";s&&s.text&&(h='<span class="e-tbar-btn-text e-tbar-ddb-text">'+s.text+"</span>"),a={id:r,tooltipText:l,template:'<button id="'+r+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1">'+h+"</button>"};break;case"Refresh":a={id:r,text:o,tooltipText:l,prefixIcon:dt,showTextOn:i};break;case"Selection":a={id:r,text:o,tooltipText:l,suffixIcon:bt,overflow:"Show",align:"Right"};break;case"View":var d=void 0;d=s&&s.text?s.text:jn(this.parent,"View"),a={id:r,tooltipText:l,prefixIcon:"Details"===this.parent.view?ft:gt,overflow:"Show",align:"Right",text:o,showTextOn:"Overflow",template:'<button id="'+r+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1" aria-label='+d+"></button>"};break;case"Details":a={id:r,tooltipText:l,prefixIcon:lt,overflow:"Show",align:"Right",text:o,showTextOn:"Overflow"};break;case"NewFolder":a={id:r,text:o,tooltipText:l,prefixIcon:ot,showTextOn:i};break;case"Cut":a={id:r,text:o,tooltipText:l,prefixIcon:it,showTextOn:i};break;case"Copy":a={id:r,text:o,tooltipText:l,prefixIcon:nt,showTextOn:i};break;case"Paste":a={id:r,text:o,tooltipText:l,prefixIcon:at,showTextOn:i};break;case"Delete":a={id:r,text:o,tooltipText:l,prefixIcon:st,showTextOn:i};break;case"Rename":a={id:r,text:o,tooltipText:l,prefixIcon:rt,showTextOn:i};break;case"Download":a={id:r,text:o,tooltipText:l,prefixIcon:ct,showTextOn:i};break;case"SelectAll":a={id:r,text:o,tooltipText:l,prefixIcon:pt,showTextOn:i};break;default:a={id:r,text:o,tooltipText:l,template:""}}if(this.parent.toolbarItems.length>0&&s){var p=Object.assign({},a,s);t.push(p)}else t.push(a)}return t},e.prototype.getItemModel=function(e){var t={};return e.id&&(t.id=e.id),e.text&&(t.text=e.text),e.tooltipText&&(t.tooltipText=e.tooltipText),e.prefixIcon&&(t.prefixIcon=e.prefixIcon),e.cssClass&&(t.cssClass=e.cssClass),"Both"!==e.showTextOn&&(t.showTextOn=e.showTextOn),e.template&&(t.template=e.template),e.disabled&&(t.disabled=e.disabled),"auto"!==e.width&&(t.width=e.width),e.suffixIcon&&(t.suffixIcon=e.suffixIcon),"Left"!==e.align&&(t.align=e.align),"None"!==e.overflow&&(t.overflow=e.overflow),e.htmlAttributes&&(t.htmlAttributes=e.htmlAttributes),"Button"!==e.type&&(t.type=e.type),!0!==e.visible&&(t.visible=e.visible),e.showAlwaysInPopup&&(t.showAlwaysInPopup=e.showAlwaysInPopup),-1!==e.tabIndex&&(t.tabIndex=e.tabIndex),t},e.prototype.getId=function(e){return this.parent.element.id+"_tb_"+e.toLowerCase()},e.prototype.addEventListener=function(){this.parent.on(At,this.onPropertyChanged,this),this.parent.on(ri,this.onSelectionChanged,this),this.parent.on(di,this.onLayoutChange,this),this.parent.on(vi,this.showPaste,this),this.parent.on(yi,this.hidePaste,this),this.parent.on(Jt,this.destroy,this),this.parent.on(pi,this.updateSortByButton,this)},e.prototype.reRenderToolbar=function(e){var t=this,i=[];if(this.parent.toolbarItems.length>0?i=this.parent.toolbarItems.map((function(e){return e.name})):void 0!==e.newProp.toolbarSettings.items&&(i=e.newProp.toolbarSettings.items.map((function(e){return e.trim()}))),i.length>0){this.items=this.toolbarItemData(this.getItems(i));var n={items:this.items};this.parent.trigger("toolbarCreate",n,(function(e){t.buttonObj&&t.buttonObj.destroy(),t.layoutBtnObj&&t.layoutBtnObj.destroy(),t.items=e.items,t.toolbarObj.items=t.items,t.toolbarObj.dataBind(),t.toolbarCreateHandler()}))}},e.prototype.onSelectionChanged=function(){this.hideStatus(),this.hideItems(this.single,!0),this.hideItems(this.selection,!1),1===this.parent.selectedItems.length?(this.hideItems(this.single,!1),this.hideItems(this.selection,!0)):this.parent.selectedItems.length>1&&(this.hideItems(this.multiple,!1),this.hideItems(this.selection,!0));var e=(0,t.select)("#"+this.getId("Selection"),this.toolbarObj.element);if(this.parent.selectedItems.length>0&&e&&!this.parent.enableVirtualization){var i=void 0;i=1===this.parent.selectedItems.length?this.parent.selectedItems.length+" "+jn(this.parent,"Item-Selection"):this.parent.selectedItems.length+" "+jn(this.parent,"Items-Selection"),(0,t.select)(".e-tbar-btn-text",e).textContent=i,this.toolbarObj.hideItem(e.parentElement,!1)}},e.prototype.hideItems=function(e,i){for(var n=0;n<e.length;n++){var a=(0,t.select)("#"+this.getId(e[n]),this.parent.element);a&&this.toolbarObj.hideItem(a.parentElement,i)}},e.prototype.hideStatus=function(){var e=(0,t.select)("#"+this.getId("Selection"),this.toolbarObj.element);e&&this.toolbarObj.hideItem(e.parentElement,!0)},e.prototype.showPaste=function(){this.hideItems(["Paste"],!1)},e.prototype.hidePaste=function(){this.hideItems(["Paste"],!0)},e.prototype.onLayoutChange=function(){if(this.layoutBtnObj){this.layoutBtnObj.iconCss="Details"===this.parent.view?ft:gt;for(var e=this.layoutBtnObj.items,t=0;t<e.length;t++)e[t].id===this.getPupupId("large")?e[t].iconCss="LargeIcons"===this.parent.view?be:"":e[t].id===this.getPupupId("details")&&(e[t].iconCss="Details"===this.parent.view?be:"")}},e.prototype.removeEventListener=function(){this.parent.off(At,this.onPropertyChanged),this.parent.off(ri,this.onSelectionChanged),this.parent.off(di,this.onLayoutChange),this.parent.off(vi,this.showPaste),this.parent.off(yi,this.hidePaste),this.parent.off(Jt,this.destroy),this.parent.off(pi,this.updateSortByButton)},e.prototype.getModuleName=function(){return"toolbar"},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++){switch(i[t]){case"cssClass":this.buttonObj&&(this.buttonObj.cssClass=Nn(this.parent,ae)),this.layoutBtnObj&&(this.layoutBtnObj.cssClass=Nn(this.parent,"e-caret-hide "+ae));break;case"height":case"width":this.toolbarObj.refreshOverflow();break;case"toolbarSettings":case"toolbarItems":this.reRenderToolbar(e)}}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.buttonObj&&this.buttonObj.destroy(),this.layoutBtnObj&&this.layoutBtnObj.destroy(),this.toolbarObj.destroy(),this.parent.refreshLayout())},e.prototype.enableItems=function(e,i){for(var n=0;n<e.length;n++){var a=(0,t.select)("#"+this.getId(e[n]),this.parent.element);a&&this.toolbarObj.enableItems(a.parentElement,i)}},e}(),Ms=function(){function e(e){this.filemanagerInstance=e,this.largeIconInstance=e.largeiconsviewModule}return e.prototype.setUIVirtualization=function(){var e=this.largeIconInstance.items,i=e.slice(0,1),n=Os.ListBase.createListFromJson(t.createElement,i,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call((0,t.selectAll)("."+fe,n)),this.largeIconInstance.element.appendChild(n),0!==this.itemList.length&&this.largeIconInstance.element.querySelector("."+Pe)&&this.largeIconInstance.element.removeChild(this.largeIconInstance.element.querySelector("."+Pe)),this.itemCount=this.getItemCount(Object.keys(this.largeIconInstance.allItems).length),this.largeIconInstance.element.firstChild.remove(),this.largeIconInstance.items=e.slice(0,this.itemCount)},e.prototype.setUlElementHeight=function(){this.lastRowCount=(this.largeIconInstance.allItems.length-this.itemCount)%this.rowItemCount?(this.largeIconInstance.allItems.length-this.itemCount)%this.rowItemCount:this.rowItemCount,this.topElement=this.filemanagerInstance.createElement("div"),this.topElement.classList.add("e-virtual-top"),this.largeIconInstance.element.firstElementChild.insertBefore(this.topElement,this.largeIconInstance.element.firstElementChild.firstChild),this.bottomElement=this.filemanagerInstance.createElement("div"),this.bottomElement.classList.add("e-virtual-bottom"),this.largeIconInstance.element.firstElementChild.insertBefore(this.bottomElement,null);var e=parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue("margin-bottom"),10);this.listItemHeight=this.largeIconInstance.itemList[0].getBoundingClientRect().height+e,this.totalHeight=Object.keys(this.largeIconInstance.allItems).length/this.rowItemCount*this.listItemHeight,this.topElement.style.height="0px",this.bottomElement.style.height=this.totalHeight+"px",this.topElementHeight=0,this.bottomElementHeight=this.totalHeight,this.listDiff=0,this.renderedCount=this.itemCount},e.prototype.getItemCount=function(e){var i=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-right"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-left"),10);this.rowItemCount=Math.floor(parseFloat((0,t.formatUnit)(this.largeIconInstance.element.firstElementChild.clientWidth))/(this.itemList[0].offsetWidth+i));var n=this.rowItemCount*Math.round(parseFloat((0,t.formatUnit)(this.largeIconInstance.element.clientHeight))/this.itemList[0].offsetHeight);return(n>e||0===n)&&(n=e),n},e.prototype.wireScrollEvent=function(e){e?t.EventHandler.remove(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll):t.EventHandler.add(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll,this)},e.prototype.onVirtualUiScroll=function(){var e;this.scrollPosition=(0,t.isNullOrUndefined)(this.scrollPosition)?0:this.scrollPosition;var i=this.getscrollerHeight(0);if(this.topElementHeight=this.listItemHeight*Math.floor(i/this.listItemHeight),this.bottomElementHeight=this.totalHeight-this.topElementHeight,e=i<=this.totalHeight?[this.topElementHeight,this.bottomElementHeight]:[this.totalHeight,0],this.topElementHeight=e[0],this.bottomElementHeight=e[1],this.topElementHeight!==parseFloat(this.topElement.style.height))if(this.topElement.style.height=this.topElementHeight+"px",this.bottomElement.style.height=this.bottomElementHeight+"px",i>this.scrollPosition){var n=Math.round(this.topElementHeight/this.listItemHeight-this.listDiff);this.onNormalScroll(n,!0)}else{n=Math.round(this.listDiff-this.topElementHeight/this.listItemHeight);this.onNormalScroll(n,!1)}this.listDiff=Math.round(this.topElementHeight/this.listItemHeight),this.scrollPosition=i,this.largeIconInstance.itemList=Array.prototype.slice.call((0,t.selectAll)("."+fe,this.largeIconInstance.element)),this.itemCount=this.itemCount!==this.largeIconInstance.itemList.length?this.largeIconInstance.itemList.length:this.itemCount,this.largeIconInstance.items=this.largeIconInstance.allItems.slice(this.renderedCount-this.itemCount,this.renderedCount)},e.prototype.getscrollerHeight=function(e){return this.largeIconInstance.element.firstElementChild.scrollTop-e<=0?0:this.largeIconInstance.element.firstElementChild.scrollTop-e},e.prototype.onNormalScroll=function(e,t){for(var i=0;i<e;i++)this.updateUI(t)},e.prototype.updateUI=function(e){var i=this;if(e){if(this.items=this.largeIconInstance.allItems.slice(this.renderedCount,this.renderedCount+this.rowItemCount),this.items.length>0){var n=Os.ListBase.createListFromJson(t.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call((0,t.selectAll)("."+fe,n)),this.itemList.forEach((function(e){i.largeIconInstance.element.firstElementChild.insertBefore(e,i.bottomElement)})),this.renderedCount=this.largeIconInstance.allItems.length>=this.renderedCount+this.rowItemCount?this.renderedCount+this.rowItemCount:this.renderedCount+this.lastRowCount;for(var a=0;a<this.rowItemCount;a++)(0,t.detach)(this.topElement.nextElementSibling)}}else{var s=void 0,r=void 0;this.renderedCount===this.largeIconInstance.allItems.length?(s=this.renderedCount-(this.itemCount-this.rowItemCount+this.lastRowCount),this.renderedCount=this.renderedCount-this.lastRowCount<this.itemCount?this.itemCount:this.renderedCount-this.lastRowCount,r=!0):(s=this.renderedCount-this.itemCount,this.renderedCount=this.renderedCount-this.rowItemCount<this.itemCount?this.itemCount:this.renderedCount-this.rowItemCount);var o=s-this.rowItemCount>0?s-this.rowItemCount:0;if(this.items=this.largeIconInstance.allItems.slice(o,s),this.items.length>0){n=Os.ListBase.createListFromJson(t.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call((0,t.selectAll)("."+fe,n));for(var l=this.itemList.length;l>0;l--)this.largeIconInstance.element.firstElementChild.insertBefore(this.itemList[l-1],this.topElement.nextElementSibling);for(a=0;a<(r?this.lastRowCount:this.rowItemCount);a++)(0,t.detach)(this.bottomElement.previousElementSibling)}}},e.prototype.getModuleName=function(){return"virtualization"},e.prototype.destroy=function(){this.filemanagerInstance.isDestroyed||(0,t.isNullOrUndefined)(this.largeIconInstance.element.firstElementChild)||this.wireScrollEvent(!0)},e}(),ks=function(){function e(e){this.removeNodes=[],this.moveNames=[],this.previousSelected=[],this.isDrag=!1,this.isPathDragged=!1,this.isRenameParent=!1,this.isRightClick=!1,this.isSameNodeClicked=!1,this.isNodeExpandCalled=!1,this.renameParent=null,this.isNodeClickCalled=!1,this.restrictSelecting=!1,this.parent=e,this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",del:"delete",ctrlX:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"ctrl+v",ctrlShiftN:"ctrl+shift+n",shiftF10:"shift+F10",f2:"f2"}}return e.prototype.onInit=function(){if((0,t.isNullOrUndefined)(this.treeObj)){var e=(0,t.getValue)(this.parent.pathId[0],this.parent.feParent);(0,t.setValue)("_fm_icon","e-fe-folder",e);var i={},n=(0,t.getValue)("id",e);(0,t.isNullOrUndefined)(n)||(0,t.setValue)("data-id",n,i),sa(e)||(0,t.setValue)("class",na(e),i),(0,t.isNullOrUndefined)(i)||(0,t.setValue)("_fm_htmlAttr",i,e),this.treeObj=new Cs.TreeView({fields:{dataSource:[e],id:"_fm_id",parentID:"_fm_pId",expanded:"_fm_expanded",selected:"_fm_selected",text:"name",hasChildren:"hasChild",iconCss:"_fm_icon",htmlAttributes:"_fm_htmlAttr",tooltip:"name"},enableHtmlSanitizer:this.parent.enableHtmlSanitizer,sortOrder:this.parent.navigationPaneSettings.sortOrder,nodeSelecting:this.onNodeSelecting.bind(this),nodeSelected:this.onNodeSelected.bind(this),nodeExpanding:this.onNodeExpand.bind(this),nodeClicked:this.onNodeClicked.bind(this),allowEditing:!0,nodeEditing:this.onNodeEditing.bind(this),drawNode:this.onDrowNode.bind(this),enableRtl:this.parent.enableRtl,dataBound:this.addDragDrop.bind(this)}),this.treeObj.isStringTemplate=!0,this.treeObj.appendTo("#"+this.parent.element.id+F),this.wireEvents()}},e.prototype.addDragDrop=function(){var e=this;!this.parent.isMobile&&this.treeObj&&(this.parent.allowDragAndDrop&&(0,t.isNullOrUndefined)(this.dragObj)?this.dragObj=new t.Draggable(this.treeObj.element,{cursorAt:this.parent.dragCursorPosition,dragTarget:"."+Pt,distance:5,dragArea:this.parent.element,drag:Yn.bind(this,this.parent),dragStart:function(t){zn(e.parent,t,e.dragObj)},dragStop:Bn.bind(this,this.parent),enableTailMode:!0,enableAutoScroll:!1,helper:this.dragHelper.bind(this)}):!this.parent.allowDragAndDrop&&this.dragObj&&(this.dragObj.destroy(),this.dragObj=null))},e.prototype.dragHelper=function(e){var i=e.sender.target;if(!i.classList.contains(Pt))return null;var n=(0,t.closest)(i,"li");return this.parent.dragPath="",this.parent.dragData=[],this.parent.activeElements=[],this.parent.activeElements=[n],this.parent.dragNodes=[],on(this.parent,n),this.parent.dragData=this.getTreeData(n),this.parent.dragPath=this.getDragPath(n,this.parent.dragData[0].name),this.parent.dragNodes.push(this.parent.dragData[0].name),Hn(this.parent),this.parent.virtualDragElement},e.prototype.getDragPath=function(e,t){return An(this.getDropPath(e,t))},e.prototype.getDropPath=function(e,t){var i=e.getAttribute("data-id");return Xi(e,this.parent.hasId?i:t,this.parent.hasId)},e.prototype.onDrowNode=function(e){var t={element:e.node,fileDetails:e.nodeData,module:"NavigationPane"};this.parent.trigger("fileLoad",t)},e.prototype.addChild=function(e,i,n){var a=Sn(e),s=this.getTreeData(i);if(a.length>0&&s.length>0&&(null==a[0].filterPath||(0,t.isNullOrUndefined)(s[0])&&null==s[0].filterPath||a[0].filterPath!==s[0].filterPath)){for(var r=0,o=a;r<a.length;){o[parseInt(r.toString(),10)]._fm_icon="e-fe-folder";var l={},h=(0,t.getValue)("id",o[r]);(0,t.isNullOrUndefined)(h)||(0,t.setValue)("data-id",h,l),sa(o[r])||(0,t.setValue)("class",na(o[r]),l),(0,t.isNullOrUndefined)(l)||(0,t.setValue)("_fm_htmlAttr",l,o[r]),r++}var d=(0,t.select)('[data-uid="'+i+'"]',this.treeObj.element),p=(0,t.select)("ul",d);(0,t.isNullOrUndefined)(p)&&this.treeObj.addNodes(a,i,null,n)}},e.prototype.onNodeSelecting=function(e){if(!e.isInteracted&&!this.isRightClick&&!this.isSameNodeClicked&&!this.isPathDragged&&!this.isRenameParent||this.restrictSelecting)return this.restrictSelecting=!1,void(this.isNodeClickCalled=!1);if(!this.renameParent){this.parent.activeModule="navigationpane";var i=this.getTreeData((0,t.getValue)("id",e.nodeData));if(e.node.getAttribute("data-uid")!==this.parent.pathId[this.parent.pathId.length-1]&&!this.isRightClick&&!this.isNodeClickCalled||this.isSameNodeClicked||this.isPathDragged){if(this.isNodeClickCalled=!1,!this.isSameNodeClicked){this.isSameNodeClicked=!0;var n={action:e.action,fileDetails:i[0],isInteracted:e.isInteracted};this.parent.trigger("fileSelect",n)}if(!this.isRightClick){var a={cancel:!1,fileDetails:i[0],module:"NavigationPane"};this.parent.trigger("fileOpen",a),e.cancel=a.cancel}e.cancel&&(this.restrictSelecting=!!this.isNodeClickCalled&&this.previousSelected[0]!==e.node.getAttribute("data-uid"),this.isNodeClickCalled=!0,this.isSameNodeClicked=!1,this.isPathDragged=!1,this.previousSelected=this.treeObj.selectedNodes,this.treeObj.setProperties({selectedNodes:[e.node.getAttribute("data-uid")]}))}else if(this.previousSelected[0]!==e.node.getAttribute("data-uid")){n={action:e.action,fileDetails:i[0],isInteracted:this.isNodeClickCalled};this.parent.trigger("fileSelect",n)}}},e.prototype.openFileOnContextMenuClick=function(e){var t=this.treeObj.getTreeData(e);this.parent.selectedItems=[],this.parent.itemData=t,this.activeNode=e,this.parent.activeModule="navigationpane";var i={cancel:!1,fileDetails:t[0],module:"NavigationPane"};this.parent.trigger("fileOpen",i),this.isNodeClickCalled=!0,i.cancel||(Qi(e,this.parent.itemData[0],this.parent),ga(this.parent,this.isPathDragged?Di:Yt,this.parent.path),this.parent.visitedItem=e,this.isPathDragged=this.isRenameParent=this.isRightClick=!1,this.treeObj.setProperties({selectedNodes:[e.getAttribute("data-uid")]}))},e.prototype.onNodeSelected=function(e){if(this.parent.breadcrumbbarModule&&this.parent.breadcrumbbarModule.searchObj&&!this.renameParent&&(this.parent.breadcrumbbarModule.searchObj.element.value="",this.parent.isFiltered=!1,this.isNodeClickCalled=!1),this.parent.searchedItems=[],e.isInteracted||this.isRightClick||this.isSameNodeClicked||this.isPathDragged||this.isRenameParent){this.activeNode=e.node,this.parent.activeModule="navigationpane";var i=this.getTreeData((0,t.getValue)("id",e.nodeData));this.parent.selectedItems=[],this.parent.itemData=i;var n=this.parent.path;!this.isRightClick&&this.isSameNodeClicked?Qi(e.node,this.parent.itemData[0],this.parent):(this.parent.pathId=$i(e.node),this.parent.visitedItem=e.node),e.node.querySelector("."+Ot)&&null===e.node.querySelector("."+fe)&&(this.expandNodeTarget="add"),n!==this.parent.path&&(!this.isRightClick&&this.isSameNodeClicked&&ga(this.parent,this.isPathDragged?Di:Yt,this.parent.path),this.parent.visitedItem=e.node),this.isPathDragged=this.isRenameParent=this.isRightClick=this.isSameNodeClicked=!1}else this.parent.pathId=$i(e.node)},e.prototype.onPathDrag=function(e){this.isPathDragged=!0,this.selectResultNode(e[0])},e.prototype.onNodeExpand=function(e){if((e.isInteracted||this.isDrag)&&null===e.node.querySelector("."+fe)){this.isNodeExpandCalled=!0;var i=(0,t.getValue)("text",e.nodeData),n=e.node.getAttribute("data-id"),a=!(0,t.isNullOrUndefined)(n),s=(0,t.isNullOrUndefined)(n)?i:n,r=Xi(e.node,s,a);this.expandNodeTarget=e.node.getAttribute("data-uid"),this.parent.expandedId=this.expandNodeTarget,this.parent.itemData=this.getTreeData((0,t.getValue)("id",e.nodeData)),this.parent.pathId.push((0,t.getValue)("id",e.nodeData)),ga(this.parent,ci,r)}},e.prototype.onNodeExpanded=function(e){this.addChild(e.files,this.expandNodeTarget,!1),this.parent.expandedId=null,this.isNodeExpandCalled=!1},e.prototype.onNodeClicked=function(e){if(this.parent.activeModule="navigationpane",this.previousSelected=this.treeObj.selectedNodes,this.activeNode=e.node,3===e.event.which&&e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0])this.isRightClick=!0,this.isNodeClickCalled=!0,this.treeObj.setProperties({selectedNodes:[e.node.getAttribute("data-uid")]});else if(e.node.getAttribute("data-uid")===this.treeObj.selectedNodes[0]&&0!==this.parent.selectedItems.length){this.parent.setProperties({selectedItems:[]},!0);var t="LargeIcons"===this.parent.view?"largeiconsview":"detailsview";this.parent.notify(At,{module:t,newProp:{selectedItems:[]}})}else e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0]||this.isNodeClickCalled||this.isNodeExpandCalled||(3===e.event.which&&(this.isRightClick=!0),this.isSameNodeClicked=!0,this.isNodeClickCalled=!0)},e.prototype.onNodeEditing=function(e){(0,t.isNullOrUndefined)(e.innerHtml)||(e.cancel=!0)},e.prototype.onPathChanged=function(e){this.parent.isCut=!1;var i=(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feFiles);if("add"===this.expandNodeTarget){var n=(0,t.select)('[data-uid="'+this.treeObj.selectedNodes[0]+'"]',this.treeObj.element),a=(0,t.isNullOrUndefined)(n)?null:(0,t.select)("."+me,n);(0,t.isNullOrUndefined)(a)&&this.addChild(e.files,this.treeObj.selectedNodes[0],!0),this.expandNodeTarget=""}(0,t.isNullOrUndefined)(i)&&(0,t.setValue)(this.parent.pathId[this.parent.pathId.length-1],e.files,this.parent.feFiles),this.parent.uploadObj.directoryUpload&&!this.parent.hasId&&this.updateTree(e)},e.prototype.updateTree=function(e){if(this.treeObj){var t=this.treeObj.selectedNodes[0];this.updateTreeNode(e,t)}},e.prototype.updateTreeNode=function(e,t){var i=-1!==this.treeObj.expandedNodes.indexOf(t);this.removeChildNodes(t),this.addChild(e.files,t,!i)},e.prototype.removeChildNodes=function(e){var i=(0,t.select)('[data-uid="'+e+'"]',this.treeObj.element),n=(0,t.select)("."+me,i),a=n?Array.prototype.slice.call(n.children):null;a&&this.treeObj.removeNodes(a)},e.prototype.onOpenEnd=function(e){var t=this.parent.pathId[this.parent.pathId.length-1];this.treeObj.expandAll(this.treeObj.selectedNodes),this.treeObj.setProperties({selectedNodes:[t]}),this.expandNodeTarget="add",this.onPathChanged(e)},e.prototype.onOpenInit=function(e){"navigationpane"===this.parent.activeModule&&e.target.querySelector("."+Ot)&&this.treeObj.expandAll(this.treeObj.selectedNodes)},e.prototype.onInitialEnd=function(e){this.onInit(),this.addChild(e.files,(0,t.getValue)("_fm_id",e.cwd),!1)},e.prototype.onFinalizeEnd=function(e){this.onInit();var i=(0,t.getValue)("_fm_id",e.cwd);this.addChild(e.files,i,!1),this.treeObj.setProperties({selectedNodes:[this.parent.pathId[this.parent.pathId.length-1]]})},e.prototype.onCreateEnd=function(e){this.updateTree(e)},e.prototype.onSelectedData=function(){"navigationpane"===this.parent.activeModule&&this.updateItemData()},e.prototype.onDeleteInit=function(){if("navigationpane"===this.parent.activeModule){this.updateActionData();var e=(0,t.getValue)("name",this.parent.itemData[0]);Ia(this.parent,[e],this.parent.path,"delete")}},e.prototype.onDeleteEnd=function(e){if("navigationpane"===this.parent.activeModule){var i=this.treeObj.selectedNodes[0],n=(0,t.select)('[data-uid="'+i+'"]',this.treeObj.element),a=(0,t.closest)(n,"."+me).parentElement;this.treeObj.selectedNodes=[a.getAttribute("data-uid")],this.treeObj.dataBind()}this.updateTree(e)},e.prototype.onRefreshEnd=function(e){this.updateTree(e)},e.prototype.onRenameInit=function(){"navigationpane"===this.parent.activeModule&&this.updateRenameData()},e.prototype.onRenameEndParent=function(e){var i=this.renameParent?this.renameParent:this.parent.pathId[this.parent.pathId.length-1];if(this.updateTreeNode(e,i),this.parent.expandedId=null,this.renameParent)this.renameParent=null;else{var n=[];if(this.parent.hasId)n=new Yi.DataManager(this.treeObj.getTreeData()).executeLocal((new Yi.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new Yi.DataManager(this.treeObj.getTreeData()).executeLocal((new Yi.Query).where(this.treeObj.fields.text,"equal",this.parent.renameText,!1));a.length>0&&(n=new Yi.DataManager(a).executeLocal((new Yi.Query).where("_fm_pId","equal",i,!1)))}if(n.length>0){var s=this.previousSelected.length>0&&0!==this.treeObj.getTreeData(this.previousSelected[0]).length?this.previousSelected[0]:(0,t.getValue)(this.treeObj.fields.id,n[0]);this.treeObj.selectedNodes=[s],this.treeObj.dataBind(),this.updateItemData()}}},e.prototype.onRenameEnd=function(e){if(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered){var i=this.treeObj.getTreeData(),n=[];if(this.parent.hasId)n=new Yi.DataManager(i).executeLocal((new Yi.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new Yi.DataManager(i).executeLocal((new Yi.Query).where(this.treeObj.fields.text,"equal",this.parent.currentItemText,!1));a.length>0&&(n=new Yi.DataManager(a).executeLocal((new Yi.Query).where("filterPath","equal",this.parent.filterPath,!1)))}n.length>0&&(this.renameParent=(0,t.getValue)(this.treeObj.fields.parentID,n[0]),this.parent.expandedId=this.renameParent,this.parent.itemData=this.getTreeData(this.renameParent),ga(this.parent,mi,this.parent.filterPath.replace(/\\/g,"/")))}else this.updateTree(e)},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++){switch(i[t]){case"allowDragAndDrop":this.addDragDrop();break;case"navigationPaneSettings":ga(this.parent,Ut,this.parent.path),e.oldProp.navigationPaneSettings.sortOrder!==e.newProp.navigationPaneSettings.sortOrder&&(this.treeObj.sortOrder=e.newProp.navigationPaneSettings.sortOrder)}}},e.prototype.onDownLoadInit=function(){this.doDownload()},e.prototype.onSelectionChanged=function(e){this.treeObj.setProperties({selectedNodes:[e.selectedNode]})},e.prototype.onClearPathInit=function(e){this.removeChildNodes(e.selectedNode)},e.prototype.onDragEnd=function(e){if(wa(this.parent)){this.moveNames=[];for(var i=this.parent.dragData,n=0;n<i.length;n++)!1===(0,t.getValue)("isFile",i[n])&&this.moveNames.push((0,t.getValue)("_fm_id",i[n]))}var a=[];a=this.parent.isPasteError||this.parent.isSearchDrag?this.getMoveNames(e.files,this.parent.isSearchDrag,this.parent.dragPath):this.moveNames,this.treeObj.removeNodes(a)},e.prototype.getMoveNames=function(e,i,n){for(var a=[],s=0;s<e.length;s++)if(!e[s].isFile&&!this.parent.hasId){var r=e[s].previousName;if(i){var o=(n+=e[s].previousName).lastIndexOf("/");r=n.substring(o+1),n=n.substring(0,o+1)}for(var l=new Yi.DataManager(this.treeObj.getTreeData()).executeLocal((new Yi.Query).where(this.treeObj.fields.text,"equal",r,!1)),h=0;h<l.length;h++){var d=(0,t.getValue)("filterPath",l[h]);if((d=d.replace(/\\/g,"/"))===n){a.push((0,t.getValue)(this.treeObj.fields.id,l[h]));break}}}return a},e.prototype.onCutEnd=function(e){var t=[];this.parent.isPasteError||this.parent.isSearchCut?this.moveNames=this.getMoveNames(e.files,this.parent.isSearchCut,this.parent.targetPath):t=this.moveNames,this.treeObj.removeNodes(t)},e.prototype.selectResultNode=function(e){if(this.parent.hasId){var i=this.treeObj.getTreeData().filter((function(t){return t.name===e.name}))[0];this.treeObj.selectedNodes=[(0,t.getValue)("_fm_id",i)],this.treeObj.dataBind()}else{var n=(0,t.getValue)("filterPath",e),a=(0,t.getValue)("name",e),s=new Yi.DataManager(this.treeObj.getTreeData()).executeLocal((new Yi.Query).where(this.treeObj.fields.text,"equal",a,!1));if(s.length>0){var r=new Yi.DataManager(s).executeLocal((new Yi.Query).where("filterPath","equal",n,!1));if(r.length>0){var o=(0,t.getValue)(this.treeObj.fields.id,r[0]);this.treeObj.selectedNodes=[o],this.treeObj.dataBind()}}}},e.prototype.onDropPath=function(e){this.onpasteEnd(e),this.selectResultNode(this.parent.dropData),this.parent.isDropEnd=!this.parent.isPasteError},e.prototype.onpasteEnd=function(e){var i=[];if(this.parent.hasId)i=new Yi.DataManager(this.treeObj.getTreeData()).executeLocal((new Yi.Query).where("id","equal",(0,t.getValue)("id",e.cwd),!1));else{var n=new Yi.DataManager(this.treeObj.getTreeData()).executeLocal((new Yi.Query).where(this.treeObj.fields.text,"equal",(0,t.getValue)("name",e.cwd),!1));n.length>0&&(i=new Yi.DataManager(n).executeLocal((new Yi.Query).where("filterPath","equal",(0,t.getValue)("filterPath",e.cwd),!1)))}if(i.length>0){var a=(0,t.getValue)(this.treeObj.fields.id,i[0]),s=-1===this.treeObj.expandedNodes.indexOf(a);this.removeChildNodes(a),this.addChild(e.files,a,s)}this.parent.expandedId=null,this.onPathChanged(e),this.parent.isDragDrop&&this.checkDropPath(e)},e.prototype.checkDropPath=function(e){(!wa(this.parent)||this.parent.path!==this.parent.dropPath&&"navigationpane"!==this.parent.targetModule)&&(-1===this.parent.dropPath.indexOf(Fn(this.parent,e))?(this.parent.isDropEnd=!1,Vn(this.parent)):this.parent.isDropEnd=!this.parent.isPasteError)},e.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&this.updateItemData(),this.moveNames=[];for(var e=this.parent.isDragDrop?this.parent.dragData:this.parent.actionRecords,i=0;i<e.length;i++)!1===(0,t.getValue)("isFile",e[i])&&this.moveNames.push((0,t.getValue)("_fm_id",e[i]))},e.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.getTreeData(this.treeObj.selectedNodes[0]),this.parent.activeElements=[this.activeNode])},e.prototype.addEventListener=function(){this.parent.on(At,this.onPropertyChanged,this),this.parent.on(Mi,this.onDownLoadInit,this),this.parent.on(Ft,this.onInitialEnd,this),this.parent.on(Ut,this.onFinalizeEnd,this),this.parent.on(Yt,this.onPathChanged,this),this.parent.on(Di,this.onpasteEnd,this),this.parent.on(Si,this.onCutEnd,this),this.parent.on(wi,this.onpasteInit,this),this.parent.on(ci,this.onNodeExpanded,this),this.parent.on(Vt,this.onCreateEnd,this),this.parent.on(Ii,this.onSelectedData,this),this.parent.on(zt,this.onDeleteInit,this),this.parent.on(qt,this.onDeleteEnd,this),this.parent.on(Wt,this.onRefreshEnd,this),this.parent.on(xi,this.onSelectionChanged,this),this.parent.on(ai,this.onOpenInit,this),this.parent.on(si,this.onOpenEnd,this),this.parent.on(Jt,this.destroy,this),this.parent.on(gi,this.onRenameInit,this),this.parent.on(bi,this.onRenameEnd,this),this.parent.on(mi,this.onRenameEndParent,this),this.parent.on(hi,this.onClearPathInit,this),this.parent.on(Oi,this.oncutCopyInit,this),this.parent.on(ki,this.onDropInit,this),this.parent.on(fi,this.onMenuItemData,this),this.parent.on(Li,this.onDragEnd,this),this.parent.on(Fi,this.onDragging,this),this.parent.on(Ti,this.onDropPath,this),this.parent.on(ui,this.onDetailsInit,this),this.parent.on(Bt,this.onPathDrag,this)},e.prototype.removeEventListener=function(){this.parent.off(Ft,this.onInitialEnd),this.parent.off(Mi,this.onDownLoadInit),this.parent.off(Ut,this.onFinalizeEnd),this.parent.off(Ii,this.onSelectedData),this.parent.off(At,this.onPropertyChanged),this.parent.off(Yt,this.onPathChanged),this.parent.off(Di,this.onpasteEnd),this.parent.off(Si,this.onCutEnd),this.parent.off(wi,this.onpasteInit),this.parent.off(xi,this.onSelectionChanged),this.parent.off(ci,this.onNodeExpanded),this.parent.off(Vt,this.onCreateEnd),this.parent.off(Wt,this.onRefreshEnd),this.parent.off(ai,this.onOpenInit),this.parent.off(si,this.onOpenEnd),this.parent.off(Jt,this.destroy),this.parent.off(gi,this.onRenameInit),this.parent.off(bi,this.onRenameEnd),this.parent.off(mi,this.onRenameEndParent),this.parent.off(hi,this.onClearPathInit),this.parent.off(zt,this.onDeleteInit),this.parent.off(qt,this.onDeleteEnd),this.parent.off(Oi,this.oncutCopyInit),this.parent.off(ki,this.onDropInit),this.parent.off(Li,this.onDragEnd),this.parent.off(Fi,this.onDragging),this.parent.off(Ti,this.onDropPath),this.parent.off(ui,this.onDetailsInit),this.parent.off(fi,this.onMenuItemData),this.parent.off(Bt,this.onPathDrag)},e.prototype.onDetailsInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.getTreeData(this.treeObj.selectedNodes[0]);this.parent.itemData=e}},e.prototype.onMenuItemData=function(e){if(this.parent.activeModule===this.getModuleName()){var i=(0,t.closest)(e.target,"li");this.parent.itemData=this.getTreeData(i.getAttribute("data-uid"))}},e.prototype.onDragging=function(e){var i=(0,t.closest)(e.target,"li");if(i.classList.contains("e-node-collapsed")){this.isDrag=!0;var n=parseInt(i.getAttribute("aria-level"),10);this.treeObj.expandAll([i.getAttribute("data-uid")],n+1),this.isDrag=!1}},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=(0,t.closest)(e.target,"li");this.parent.dropData=this.getTreeData(i)[0],this.parent.dropPath=this.getDropPath(i,(0,t.getValue)("name",this.parent.dropData))}},e.prototype.getModuleName=function(){return"navigationpane"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.treeObj&&(this.unWireEvents(),this.treeObj.destroy()))},e.prototype.wireEvents=function(){this.keyboardModule=new t.KeyboardEvents(this.treeObj.element,{keyAction:this.keyDown.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},e.prototype.unWireEvents=function(){this.keyboardModule.destroy()},e.prototype.keyDown=function(e){switch(e.action){case"altEnter":this.parent.notify(ui,{}),Oa(this.parent,[],this.parent.path,"details");break;case"esc":nn(this.parent);break;case"del":this.parent.pathId[0]!==this.activeNode.getAttribute("data-uid")&&(this.updateItemData(),sa(this.parent.itemData[0])?(this.removeNodes=[],Xa(this.parent,"Delete")):ia(this.parent,this.parent.itemData[0],Hi));break;case"ctrlC":gn(this.parent);break;case"ctrlV":this.parent.folderPath="",kn(this.parent);break;case"ctrlX":mn(this.parent);break;case"shiftF10":if(this.updateItemData(),!la(this.parent.itemData[0]))return void ia(this.parent,this.parent.itemData[0],Wi);0!==this.parent.selectedItems.length&&this.doDownload();break;case"f2":if(0===this.parent.selectedItems.length){var t=this.getTreeData(this.treeObj.selectedNodes[0])[0];sa(t)?(this.updateRenameData(),Xa(this.parent,"Rename")):ia(this.parent,t,Hi)}}},e.prototype.getTreeData=function(e){for(var i=this.treeObj.getTreeData(e),n=0;n<i.length;n++)(0,t.isNullOrUndefined)((0,t.getValue)("hasChild",i[n]))&&(0,t.setValue)("hasChild",!1,i[n]);return i},e.prototype.updateRenameData=function(){this.updateItemData(),this.parent.currentItemText=(0,t.getValue)("name",this.parent.itemData[0])},e.prototype.updateItemData=function(){var e=this.getTreeData(this.treeObj.selectedNodes[0])[0];this.parent.itemData=[e],this.parent.isFile=!1},e.prototype.updateActionData=function(){this.updateItemData(),Qi((0,t.select)('[data-uid="'+this.parent.pathId[this.parent.pathId.length-1]+'"]',this.treeObj.element),this.parent.itemData[0],this.parent);var e=An(this.parent.path);this.parent.setProperties({path:e},!0),this.parent.pathId.pop(),this.parent.pathNames.pop()},e.prototype.doDownload=function(){var e=An(this.parent.path),i=this.treeObj.selectedNodes[0]===this.parent.pathId[0]?"":(0,t.getValue)("name",this.parent.itemData[0]);Ga(this.parent,e,[i])},e}(),Ls=function(){function e(e){this.isInteracted=!0,this.interaction=!0,this.isPasteOperation=!1,this.isColumnRefresh=!1,this.dragObj=null,this.startIndex=null,this.firstItemIndex=null,this.isSelectionUpdate=!1,this.currentSelectedItem=[],this.count=0,this.isRendered=!0,this.isLoaded=!1,this.isNameWidth=!1,this.isMultiSelect=!1,this.pasteOperation=!1,this.uploadOperation=!1,fa.Grid.Inject(fa.Resize,fa.ContextMenu,fa.Sort,fa.VirtualScroll),this.parent=e,this.element=(0,t.select)("#"+this.parent.element.id+U,this.parent.element),this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",tab:"tab",moveDown:"downarrow",ctrlEnd:"ctrl+end",ctrlHome:"ctrl+home",ctrlDown:"ctrl+downarrow",ctrlLeft:"ctrl+leftarrow",ctrlRight:"ctrl+rightarrow",shiftEnd:"shift+end",shiftHome:"shift+home",shiftDown:"shift+downarrow",shiftUp:"shift+uparrow",ctrlUp:"ctrl+uparrow",csEnd:"ctrl+shift+end",csHome:"ctrl+shift+home",csDown:"ctrl+shift+downarrow",csUp:"ctrl+shift+uparrow",space:"space",ctrlSpace:"ctrl+space",shiftSpace:"shift+space",csSpace:"ctrl+shift+space",end:"end",home:"home",moveUp:"uparrow",del:"delete",ctrlX:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"ctrl+v",ctrlShiftN:"ctrl+shift+n",shiftdel:"shift+delete",ctrlD:"ctrl+d",f2:"f2",ctrlA:"ctrl+a",enter:"enter",back:"backspace"}}return e.prototype.render=function(e){var i=this;if(this.parent.enablePersistence){var n=window.localStorage.getItem("grid"+this.parent.element.id+"_grid");if(!(0,t.isNullOrUndefined)(n)){var a=JSON.parse(n);!(0,t.isNullOrUndefined)(a)&&Object.keys(a).length>0&&"sortSettings"in a&&(delete a.sortSettings,window.localStorage.setItem("grid"+this.parent.element.id+"_grid",JSON.stringify(a)))}}if((0,Gi.showSpinner)(this.parent.element),"Details"===this.parent.view){(0,t.removeClass)([this.parent.element],oe);var s=On(this.parent,e.files);this.checkNameWidth();var r=this.getColumns(),o=void 0,l=!(0,t.isNullOrUndefined)(r)&&-1!==r.findIndex((function(e){return e.field===i.parent.sortBy}));this.parent.isMobile||!l?o=[]:"None"!==this.parent.sortOrder&&(o=[{direction:this.parent.sortOrder,field:this.parent.sortBy}]),this.gridObj=new fa.Grid({dataSource:s,allowSorting:!0,rowSelecting:this.onSelection.bind(this,"select"),rowDeselecting:this.onSelection.bind(this,"unselect"),rowSelected:this.onSelected.bind(this),rowDeselected:this.onDeSelection.bind(this),allowResizing:this.parent.detailsViewSettings.columnResizing,selectionSettings:{type:this.parent.allowMultiSelection?"Multiple":"Single",checkboxMode:"ResetOnRowClick"},enableRtl:this.parent.enableRtl,pageSettings:{pageSize:20},enableVirtualization:this.parent.enableVirtualization,enablePersistence:this.parent.enablePersistence,enableVirtualMaskRow:!0,sortSettings:{allowUnsort:!1,columns:o},columns:r,recordDoubleClick:this.DblClickEvents.bind(this),beforeDataBound:this.onBeforeDataBound.bind(this),dataBound:this.onDataBound.bind(this),rowDataBound:this.onRowDataBound.bind(this),actionBegin:this.onActionBegin.bind(this),headerCellInfo:this.onHeaderCellInfo.bind(this),width:"100%",height:this.parent.enableVirtualization?this.getGridHeight():"auto",beforeCopy:function(e){e.cancel=!0},load:function(){this.focusModule.destroy()},locale:this.parent.locale}),this.parent.isReact&&(this.gridObj.isReact=!0,this.gridObj.portals=[],this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this)),this.gridObj.isStringTemplate=!0,this.gridObj.appendTo("#"+this.parent.element.id+U),0!==this.parent.selectedItems.length&&this.parent.enableVirtualization&&this.parent.enablePersistence&&(this.isLoaded=!0),this.wireEvents(),this.adjustHeight(),this.emptyArgs=e}},e.prototype.reactTemplateRender=function(e){this.parent.portals=e,this.parent.portals&&this.parent.toolbarModule&&this.parent.toolbarModule.toolbarObj&&this.parent.toolbarModule.toolbarObj.portals&&(this.parent.portals=this.parent.portals.concat(this.parent.toolbarModule.toolbarObj.portals)),this.parent.notify("renderReactTemplate",this.parent.portals),this.parent.renderReactTemplates()},e.prototype.getGridHeight=function(){var e=(0,t.select)("#"+this.parent.element.id+Q,this.parent.element),i=(0,t.select)("#"+this.parent.element.id+X,this.parent.element);return e.offsetHeight-i.offsetHeight-36},e.prototype.checkNameWidth=function(){var e=this.parent.detailsViewSettings.columns;this.isNameWidth=!1;for(var i=0;i<e.length;i++)if("name"===e[i].field)return void(this.isNameWidth=!(0,t.isNullOrUndefined)(e[i].width))},e.prototype.adjustWidth=function(e,t){if(!this.isNameWidth||"name"!==t)for(var i=0;i<e.length;i++)if(e[i].field===t){var n=void 0;n=""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===t?"120px":"180px":"auto":this.element.clientWidth<=500?"120px":"auto",e[i].width=n}},e.prototype.getColumns=function(){var e,i=this.parent.enableHtmlSanitizer;if(this.parent.isMobile)e=[{field:"name",headerText:jn(this.parent,"Name"),width:"auto",minWidth:120,headerTextAlign:"Left",template:(0,t.initializeCSPTemplate)((function(e){return'<div class="e-fe-text">'+(i?t.SanitizeHtmlHelper.sanitize(e.name):e.name)+'</div><div class="e-fe-date">'+e._fm_modified+'</div><span class="e-fe-size">'+e.size+"</span>"}))}];else{e=(0,t.extend)([],this.parent.detailsViewSettings.columns,null,!0),this.adjustWidth(e,"name");for(var n=function(n,s){if(e[n].headerText=jn(a.parent,e[n].headerText),"name"===e[n].field&&!(0,t.isNullOrUndefined)(e[n].template)&&"function"!=typeof e[n].template){var r=e[n].template;e[n].template=(0,t.initializeCSPTemplate)((function(e){var n=i?t.SanitizeHtmlHelper.sanitize(e.name):e.name;return r.replace(/\${name}/g,n)}))}},a=this,s=0,r=e.length;s<r;s++)n(s)}var o=this.parent.isMobile||this.parent.isBigger?"54":"46",l={field:"type",width:o,minWidth:o,template:(0,t.initializeCSPTemplate)((function(e){return'<span class="e-fe-icon '+e._fm_iconClass+'"></span>'})),allowResizing:!1,allowSorting:!0,customAttributes:{class:"e-fe-grid-icon"},headerTemplate:(0,t.initializeCSPTemplate)((function(){return"<span class='e-fe-icon e-fe-folder'></span>"}))};if(e.unshift(l),this.parent.showItemCheckBoxes){var h=this.parent.isBigger?"36":"26",d={type:"checkbox",width:h,minWidth:h,customAttributes:{class:"e-fe-checkbox"},allowResizing:!1,allowSorting:!1};this.parent.isMobile?e.push(d):e.unshift(d)}for(s=0,r=e.length;s<r;s++)e[s].disableHtmlEncode=!this.parent.enableHtmlSanitizer;if(this.parent.enableRangeSelection){e.push({field:"name",visible:!1,customAttributes:{class:"e-drag-text"}})}return e},e.prototype.adjustHeight=function(){if(this.gridObj){var e=(0,t.select)("#"+this.parent.element.id+Q,this.parent.element),i=(0,t.select)("#"+this.parent.element.id+X,this.parent.element),n=(0,t.select)("."+We,this.parent.element),a=e.offsetHeight-i.offsetHeight-n.offsetHeight;this.gridObj.height=a,this.gridObj.dataBind()}},e.prototype.renderCheckBox=function(){this.gridObj.columns=this.getColumns(),this.isColumnRefresh=!0,this.gridObj.refreshColumns()},e.prototype.onRowDataBound=function(e){var i=(0,t.select)(".e-fe-grid-name",e.row);if(!i)for(var n=this.parent.detailsViewSettings.columns,a=0;a<n.length;a++)if("name"===n[a].field){i=e.row.children[this.parent.allowMultiSelection?a+2:a+1];break}if(i&&i.setAttribute("title",(0,t.getValue)("name",e.data)),this.parent.isLayoutChange&&this.parent.isCut&&"move"===this.parent.fileAction&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length&&-1!==this.parent.selectedNodes.indexOf((0,t.getValue)("name",e.data))&&sn(e.row),!this.parent.showFileExtension&&(0,t.getValue)("isFile",e.data)){var s=(0,t.getValue)("name",e.data),r=e.row.querySelector('[title= "'+s+'"]');if(r){var o=(0,t.getValue)("name",e.data),l=(0,t.getValue)("type",e.data);-1!==o.indexOf(l)&&(r.innerHTML=o.substr(0,o.length-l.length))}}if(void 0!==(0,t.getValue)("size",e.data)&&e.row.querySelector(".e-fe-size")){var h=e.row.querySelector(".e-fe-size"),d=void 0;if((0,t.getValue)("isFile",e.data)){var p=(0,t.getValue)("size",e.data),c=new t.Internationalization(this.parent.locale),u=void 0;for(n=this.parent.detailsViewSettings.columns,a=0;a<n.length;a++)if("size"===n[a].field){u=(0,t.isNullOrUndefined)(n[a].format)?"n":n[a].format.toString();break}d=c.formatNumber(p/1024,{format:u})+" "+jn(this.parent,"KB")}else d="";h.innerHTML=d}if(this.parent.isMobile&&void 0!==(0,t.getValue)("_fm_modified",e.data)&&e.row.querySelector(".e-fe-date")){var f=e.row.querySelector(".e-fe-date"),g=(c=new t.Internationalization(this.parent.locale),n=this.parent.detailsViewSettings.columns,void 0);for(a=0;a<n.length;a++)if("dateModified"===n[a].field){g=n[a].format;break}var m=c.formatDate(new Date((0,t.getValue)("_fm_modified",e.data)),g);f.innerHTML=m}var b=e.row.querySelector("."+xe);b&&b.classList.add("e-small"),sa(e.data)||(e.row.className+=" "+na(e.data));var v={element:e.row,fileDetails:e.data,module:"DetailsView"};this.parent.trigger("fileLoad",v)},e.prototype.onActionBegin=function(e){if("sorting"===e.requestType){if(this.parent.setProperties({sortOrder:e.direction},!0),this.parent.setProperties({sortBy:e.columnName},!0),0!==this.parent.selectedItems.length){this.sortItem=!0;var i=this.gridObj.getSelectedRowIndexes(),n=i.length;for(this.sortSelectedNodes=[];n>0;){var a=this.gridObj.getRowsObject()[i[n-1]].data;this.sortSelectedNodes.push((0,t.getValue)(this.parent.hasId?"id":"name",a)),n--}}this.parent.notify(pi,{})}},e.prototype.onHeaderCellInfo=function(e){var t=e.node.querySelector("."+xe);t&&t.classList.add("e-small")},e.prototype.onBeforeDataBound=function(e){var t=this;(0,Gi.showSpinner)(this.parent.element);var i=this.parent.detailsViewSettings.columns.find((function(e){return e.field===t.parent.sortBy}));if(i&&!("sortComparer"in i)){var n=On(this.parent,this.parent.enableVirtualization?e.result:this.gridObj.dataSource);e.result=n}},e.prototype.onDataBound=function(){if(this.createDragObj(),(0!==this.parent.selectedItems.length&&!this.parent.enableVirtualization||this.isLoaded)&&this.selectRecords(this.parent.selectedItems),!0===this.isPasteOperation&&!(0,t.isNullOrUndefined)(this.gridObj.getDataRows())&&this.gridObj.getDataRows().length>0&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.parent.pasteNodes),this.isPasteOperation=!1)),this.parent.createdItem&&(this.selectRecords([(0,t.getValue)(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null),this.parent.layoutSelectedItems.length&&this.selectRecords(this.parent.layoutSelectedItems),this.parent.renamedItem&&(this.addSelection(this.parent.renamedItem),this.parent.renamedItem=null),!0===this.sortItem&&(this.selectRecords(this.sortSelectedNodes),this.sortItem=!1),this.isSelectionUpdate&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.currentSelectedItem),this.isSelectionUpdate=!1)),!0===this.uploadOperation&&(this.count++,this.selectRecords(this.parent.uploadItem),this.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[])),this.gridObj.currentViewData.length*this.gridObj.getRowHeight()<this.gridObj.height){(i=this.gridObj.getHeaderContent()).style.paddingRight="",i.style.paddingLeft="",(0,t.select)(".e-headercontent",i).style.borderRightWidth="0",(e=this.gridObj.getContent().querySelector(".e-content")).style.overflowY="",e.classList.add("e-scrollShow")}else{var e,i=this.gridObj.getHeaderContent();this.parent.enableRtl?i.style.paddingLeft="16px":i.style.paddingRight="16px",(e=this.gridObj.getContent().querySelector(".e-content")).classList.remove("e-scrollShow")}this.isRendered=!0,this.parent.isLayoutChange=!1,(0,Gi.hideSpinner)(this.parent.element),this.checkEmptyDiv(this.emptyArgs),this.isInteracted=!!this.isLoaded||this.isInteracted,this.isLoaded=!1},e.prototype.selectRecords=function(e){for(var i=this.gridObj.getCurrentViewRecords(),n=[],a=0,s=i.length;a<s;a++){var r=this.parent.hasId?(0,t.getValue)("id",i[a]):In(this.parent,i[a]);if(-1!==e.indexOf(r))n.push(a);else if(!this.parent.showFileExtension&&!this.parent.hasId&&r.includes(".")){var o=r.split(".").slice(0,-1).join(".");-1!==e.indexOf(o)&&n.push(a)}}0!==n.length&&(this.gridObj.selectRows(n),this.addFocus(this.gridObj.selectedRowIndex))},e.prototype.addSelection=function(e){var i=this.gridObj.getCurrentViewRecords(),n=[];if(this.parent.hasId)n=new Yi.DataManager(i).executeLocal((new Yi.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new Yi.DataManager(i).executeLocal((new Yi.Query).where("name","equal",(0,t.getValue)("name",e),!1));a.length>0&&(n=new Yi.DataManager(a).executeLocal((new Yi.Query).where("filterPath","equal",this.parent.filterPath,!1)))}if(n.length>0){var s=i.indexOf(n[0]);this.gridObj.selectRows([s])}},e.prototype.onSortColumn=function(){"None"!==this.parent.sortOrder?this.gridObj.sortModule.sortColumn(this.parent.sortBy,this.parent.sortOrder):this.gridObj.dataSource=On(this.parent,this.gridObj.dataSource),0!==this.element.querySelector(".e-content").scrollTop&&this.gridObj.freezeRefresh()},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var i=0,n=Object.keys(e.newProp);i<n.length;i++){switch(n[i]){case"allowDragAndDrop":this.createDragObj();break;case"height":this.adjustHeight();break;case"detailsViewSettings":if(!(0,t.isNullOrUndefined)(this.gridObj)){this.checkNameWidth();var a=this.getColumns();this.gridObj.columns=a,this.gridObj.allowResizing=this.parent.detailsViewSettings.columnResizing,this.gridObj.dataBind(),this.gridObj.refreshColumns()}break;case"selectedItems":if(this.interaction=!1,0!==this.parent.selectedItems.length){if(!this.parent.allowMultiSelection){var s=this.parent.selectedItems.slice(this.parent.selectedItems.length-1);this.parent.setProperties({selectedItems:s},!0)}this.selectRecords(this.parent.selectedItems),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)}else(0,t.isNullOrUndefined)(this.gridObj)||(this.gridObj.clearSelection(),this.interaction=!0);break;case"showFileExtension":case"showHiddenItems":ga(this.parent,Yt,this.parent.path);break;case"showItemCheckBoxes":case"allowMultiSelection":(0,t.isNullOrUndefined)(this.gridObj)||(this.currentSelectedItem=this.parent.selectedItems,this.gridObj.selectionSettings.type=e.newProp.allowMultiSelection?"Multiple":"Single",this.isSelectionUpdate=!0,this.renderCheckBox());break;case"view":dn(this.parent,"Details");break;case"width":this.onDetailsResize()}}},e.prototype.onPathChanged=function(e){this.parent.isCut=!1;var i=this.parent.detailsViewSettings.columns.find((function(e){return"filterPath"===e.field}));(""===this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.gridObj||!(0,t.isNullOrUndefined)(i)&&!(0,t.isNullOrUndefined)(i.hideAtMedia)&&""!==i.hideAtMedia)&&(this.parent.searchedItems=[],this.parent.isFiltered?this.updatePathColumn():this.removePathColumn(!1)),rn(this.parent),"Details"===this.parent.view&&(this.isInteracted=!1,(0,Gi.showSpinner)(this.parent.element),this.parent.setProperties({selectedItems:[]},!0),this.gridObj.dataSource=On(this.parent,e.files),this.gridObj.freezeRefresh(),this.parent.isReact&&this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this),this.wireClickEvent(!0)),this.emptyArgs=e},e.prototype.updatePathColumn=function(){var e=this.gridObj.columns.length,t=JSON.parse(JSON.stringify(this.gridObj.columns));if(t[e-1].field&&"filterPath"!==t[e-1].field&&!this.parent.isMobile){var i={field:"filterPath",headerText:jn(this.parent,"Path"),minWidth:180,width:"auto"};this.gridObj.columns.push(i),this.adjustWidth(this.gridObj.columns,"filterPath"),this.adjustWidth(this.gridObj.columns,"name"),this.isColumnRefresh=!0,this.gridObj.refreshColumns()}},e.prototype.checkEmptyDiv=function(e){var i=On(this.parent,e.files);if(0!==i.length||(0,t.isNullOrUndefined)(this.element.querySelector("."+Xe))){if(0!==i.length&&this.element.querySelector("."+Pe))if(this.element.querySelector("."+Xe).querySelector("."+Pe)){var n=this.element.querySelector("."+Xe).querySelector("."+Pe);this.element.querySelector("."+Xe).removeChild(n)}else this.element.removeChild(this.element.querySelector("."+Pe))}else Dn(this.parent,this.element,e)},e.prototype.onOpenInit=function(){if("detailsview"===this.parent.activeModule){var e=this.gridObj.getSelectedRecords()[0];this.openContent(e)}},e.prototype.DblClickEvents=function(e){var t;this.gridObj.selectRows([e.rowIndex]),e.rowData&&(t=JSON.parse(JSON.stringify(e.rowData)),this.openContent(t))},e.prototype.openContent=function(e){var i=this;if(aa(e)){var n={cancel:!1,fileDetails:e,module:"DetailsView"};this.parent.trigger("fileOpen",n,(function(n){if(!n.cancel){var a=(0,t.getValue)("name",e);if((0,t.getValue)("isFile",e)){if(bn(e)===Ae){var s=vn(i.parent,e);vs(i.parent,a,s)}}else{if(""!==i.parent.breadcrumbbarModule.searchObj.element.value||i.parent.isFiltered)Mn(i.parent,e);else{var r=(0,t.getValue)("id",e);i.parent.oldPath=i.parent.path;var o=i.parent.path+((0,t.isNullOrUndefined)(r)?a:r)+"/";i.parent.setProperties({path:o},!0),i.parent.pathNames.push(a),i.parent.pathId.push((0,t.getValue)("_fm_id",e)),i.parent.itemData=[e],un(i.parent)}i.parent.isFiltered=!1}i.element.focus(),i.parent.enableVirtualization&&i.parent.element.querySelector("#"+i.parent.element.id+B).focus()}}))}else ia(this.parent,e,_i)},e.prototype.onLayoutChange=function(e){"Details"===this.parent.view&&(this.parent.enableVirtualization&&this.parent.setProperties({selectedItems:[]},!0),this.gridObj?this.isLoaded=!0:this.render(e),this.parent.isFiltered&&(this.updatePathColumn(),this.parent.setProperties({selectedItems:[]},!0)),this.gridObj.dataSource=On(this.parent,e.files),this.parent.notify(Ci,{}),this.gridObj.element.classList.remove(jt),this.isInteracted=!1,this.gridObj.clearSelection(),""!==this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.onSearchFiles(e),this.adjustHeight(),this.gridObj.sortSettings.columns.length>0&&this.gridObj.sortSettings.columns[0].field!==this.parent.sortBy&&"None"!==this.parent.sortOrder&&this.gridObj.sortColumn(this.parent.sortBy,this.parent.sortOrder))},e.prototype.onSearchFiles=function(e){"Details"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(ri,{}),this.parent.isLayoutChange||(this.parent.layoutSelectedItems=[]),this.updatePathColumn(),this.parent.searchedItems=e.files,this.onPathChanged(e))},e.prototype.removePathColumn=function(e){var i=this.gridObj.columns.length,n=JSON.parse(JSON.stringify(this.gridObj.columns)),a=this.parent.detailsViewSettings.columns.some((function(e){return"filterPath"===e.field}));n[i-1].field&&"filterPath"===n[i-1].field&&!a&&((0,t.isNullOrUndefined)(this.gridObj.sortSettings.columns[0])||"filterPath"!==this.gridObj.sortSettings.columns[0].field||("None"!==this.parent.sortOrder?this.gridObj.sortColumn("name",this.parent.sortOrder):this.gridObj.dataSource=On(this.parent,this.gridObj.dataSource),this.parent.notify(pi,{})),this.gridObj.columns.pop(),e||(this.isColumnRefresh=!0,this.gridObj.refreshColumns()))},e.prototype.onFinalizeEnd=function(e){"Details"===this.parent.view&&(this.gridObj?this.onPathChanged(e):this.render(e))},e.prototype.onCreateEnd=function(e){"Details"===this.parent.view&&this.onPathChanged(e)},e.prototype.onRenameInit=function(){"detailsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},e.prototype.onSelectedData=function(){"detailsview"===this.parent.activeModule&&(this.parent.itemData=this.gridObj.getSelectedRecords())},e.prototype.onDeleteInit=function(){"detailsview"===this.parent.activeModule&&Ia(this.parent,this.parent.selectedItems,this.parent.path,"delete")},e.prototype.onDeleteEnd=function(e){"Details"===this.parent.view&&(this.onPathChanged(e),this.parent.setProperties({selectedItems:[]},!0))},e.prototype.onRefreshEnd=function(e){"Details"===this.parent.view&&(this.isInteracted=!1,this.removePathColumn(!1),this.gridObj.dataSource=On(this.parent,e.files),this.emptyArgs=e)},e.prototype.onHideLayout=function(){"Details"!==this.parent.view&&this.gridObj&&this.gridObj.element.classList.add(jt)},e.prototype.onSelectAllInit=function(){"Details"===this.parent.view&&(this.isInteracted=!1,this.parent.allowMultiSelection?this.gridObj.selectionModule.selectRowsByRange(0,this.gridObj.getRows().length):this.gridObj.selectRow(this.gridObj.getRows().length-1),this.isInteracted=!0,this.interaction=!0)},e.prototype.onClearAllInit=function(){"Details"===this.parent.view&&(this.removeSelection(),this.interaction=!0)},e.prototype.onSelectionChanged=function(){(0,t.removeClass)([this.element],Mt),this.parent.selectedItems.length>0&&(0,t.addClass)([this.element],Mt)},e.prototype.onLayoutRefresh=function(){"Details"===this.parent.view&&this.adjustHeight()},e.prototype.onBeforeRequest=function(){this.isRendered=!1},e.prototype.onAfterRequest=function(){this.isRendered=!0},e.prototype.onUpdateSelectionData=function(){"Details"===this.parent.view&&(this.parent.itemData=this.gridObj.getSelectedRecords())},e.prototype.addEventListener=function(){this.parent.on(Ut,this.onFinalizeEnd,this),this.parent.on(Jt,this.destroy,this),this.parent.on(di,this.onLayoutChange,this),this.parent.on(Yt,this.onPathChanged,this),this.parent.on(Vt,this.onCreateEnd,this),this.parent.on(ki,this.onDropInit,this),this.parent.on(ui,this.onDetailsInit,this),this.parent.on(Wt,this.onRefreshEnd,this),this.parent.on(ni,this.onSearchFiles,this),this.parent.on(Vi,this.onMethodCall,this),this.parent.on(ii,this.onActionFailure,this),this.parent.on(At,this.onPropertyChanged,this),this.parent.on(zt,this.onDeleteInit,this),this.parent.on(qt,this.onDeleteEnd,this),this.parent.on(Ii,this.onSelectedData,this),this.parent.on(gi,this.onRenameInit,this),this.parent.on(bi,this.onPathChanged,this),this.parent.on(ai,this.onOpenInit,this),this.parent.on(Ni,this.onSortColumn,this),this.parent.on(si,this.onPathChanged,this),this.parent.on(_t,this.onPathChanged,this),this.parent.on(wi,this.onPasteInit,this),this.parent.on(Ci,this.onHideLayout,this),this.parent.on(oi,this.onSelectAllInit,this),this.parent.on(li,this.onClearAllInit,this),this.parent.on(Pi,this.onPathColumn,this),this.parent.on(ri,this.onSelectionChanged,this),this.parent.on(Qt,this.onBeforeRequest,this),this.parent.on(Zt,this.onAfterRequest,this),this.parent.on(Di,this.onpasteEnd,this),this.parent.on(Oi,this.oncutCopyInit,this),this.parent.on(fi,this.onMenuItemData,this),this.parent.on(Kt,this.onDetailsResizeHandler,this),this.parent.on(Gt,this.onDetailsResize,this),this.parent.on(ti,this.onLayoutRefresh,this),this.parent.on(Ti,this.onDropPath,this),this.parent.on(Ui,this.onUpdateSelectionData,this)},e.prototype.removeEventListener=function(){this.parent.off(Ut,this.onFinalizeEnd),this.parent.off(Jt,this.destroy),this.parent.off(di,this.onLayoutChange),this.parent.off(Yt,this.onPathChanged),this.parent.off(wi,this.onPasteInit),this.parent.off(Vt,this.onCreateEnd),this.parent.off(Wt,this.onRefreshEnd),this.parent.off(ni,this.onSearchFiles),this.parent.off(Vi,this.onMethodCall),this.parent.off(ii,this.onActionFailure),this.parent.off(At,this.onPropertyChanged),this.parent.off(gi,this.onRenameInit),this.parent.off(bi,this.onPathChanged),this.parent.off(_t,this.onPathChanged),this.parent.off(ai,this.onOpenInit),this.parent.off(Ni,this.onSortColumn),this.parent.off(si,this.onPathChanged),this.parent.off(Ci,this.onHideLayout),this.parent.off(oi,this.onSelectAllInit),this.parent.off(li,this.onClearAllInit),this.parent.off(zt,this.onDeleteInit),this.parent.off(qt,this.onDeleteEnd),this.parent.off(Pi,this.onPathColumn),this.parent.off(ri,this.onSelectionChanged),this.parent.off(Qt,this.onBeforeRequest),this.parent.off(Zt,this.onAfterRequest),this.parent.off(Di,this.onpasteEnd),this.parent.off(Oi,this.oncutCopyInit),this.parent.off(ki,this.onDropInit),this.parent.off(Ii,this.onSelectedData),this.parent.off(ui,this.onDetailsInit),this.parent.off(fi,this.onMenuItemData),this.parent.off(Kt,this.onDetailsResizeHandler),this.parent.off(Gt,this.onDetailsResize),this.parent.off(ti,this.onLayoutRefresh),this.parent.off(Ti,this.onDropPath),this.parent.off(Ui,this.onUpdateSelectionData)},e.prototype.onActionFailure=function(){this.interaction=!0},e.prototype.onMenuItemData=function(e){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=[this.gridObj.getRowInfo(e.target).rowData])},e.prototype.onPasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""!==this.parent.folderPath?this.gridObj.getSelectedRecords():[fn(this.parent)])},e.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.parent.itemData=this.gridObj.getSelectedRecords():this.parent.itemData=[(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},e.prototype.dragHelper=function(e){var t,i,n=e.sender.target.closest("tr.e-row");return n?(n.getElementsByClassName("e-fe-text")[0]?t=this.parent.hasId?this.gridObj.getRowInfo(n).rowData.id:n.getElementsByClassName("e-fe-text")[0].innerText:n.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling&&(t=this.parent.hasId?this.gridObj.getRowInfo(n).rowData.id:n.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling.innerText),n&&!n.querySelector(".e-active")&&this.selectRecords([t]),on(this.parent,n),this.parent.activeElements=[],this.parent.dragData=[],this.parent.dragData=this.gridObj.getSelectedRecords(),0===this.parent.dragData.length&&n&&(i=this.gridObj.getRowInfo(n)),i&&this.parent.dragData.push(i.rowData),this.parent.dragPath=this.parent.path,this.parent.activeElements=this.gridObj.getSelectedRows(),Hn(this.parent),this.parent.virtualDragElement):null},e.prototype.onDetailsResize=function(){if("Details"===this.parent.view&&!this.parent.isMobile&&!(0,t.isNullOrUndefined)(this.gridObj))for(var e=this.gridObj.getHeaderContent().querySelector(".e-headercontent").firstChild.childNodes[0],i=this.gridObj.getContent().querySelector(".e-content .e-table").children[0],n=this.gridObj.getColumns(),a=0;a<n.length;a++)(!this.isNameWidth&&"name"===n[a].field||"filterPath"===n[a].field)&&(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===n[a].field?(e.children[a].style.width="120px",i.children[a].style.width="120px"):(e.children[a].style.width="180px",i.children[a].style.width="180px"):this.element.clientWidth>680&&(e.children[a].style.width="auto",i.children[a].style.width="auto"):this.element.clientWidth<=500?(e.children[a].style.width="120px",i.children[a].style.width="120px"):this.element.clientWidth>500&&(e.children[a].style.width="auto",i.children[a].style.width="auto"))},e.prototype.onDetailsResizeHandler=function(){this.onDetailsResize(),"Details"!==this.parent.view||this.parent.isMobile||(0,t.isNullOrUndefined)(this.gridObj)||this.adjustHeight()},e.prototype.createDragObj=function(){var e=this;this.gridObj&&(this.parent.allowDragAndDrop&&(0,t.isNullOrUndefined)(this.dragObj)?this.dragObj=new t.Draggable(this.gridObj.element,{cursorAt:this.parent.dragCursorPosition,distance:5,enableTailMode:!0,dragArea:this.parent.element,dragTarget:"."+je,drag:Yn.bind(this,this.parent),dragStart:function(t){zn(e.parent,t,e.dragObj)},dragStop:Bn.bind(this,this.parent),enableAutoScroll:!1,helper:this.dragHelper.bind(this)}):!this.parent.allowDragAndDrop&&this.dragObj&&(this.dragObj.destroy(),this.dragObj=null))},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=(0,t.getValue)(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent);if(e.target.closest("tr")){var n;n=this.gridObj.getRowInfo(e.target).rowData,this.parent.dropPath=n.isFile?this.parent.path:yn(this.parent,n,this.parent.path),this.parent.dropData=n.isFile?i:n}else this.parent.dropPath=this.parent.path,this.parent.dropData=i}},e.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.gridObj.getSelectedRecords(),this.parent.activeElements=this.gridObj.getSelectedRows())},e.prototype.onpasteEnd=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,(this.parent.path===this.parent.destinationPath||this.parent.path===Fn(this.parent,e)||this.parent.hasId)&&this.onPathChanged(e))},e.prototype.onDropPath=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},e.prototype.getModuleName=function(){return"detailsview"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.gridObj&&(this.parent.isReact&&this.gridObj.off("reactTemplateRender",this.reactTemplateRender),this.unWireEvents(),this.gridObj.destroy()))},e.prototype.updateType=function(e){var i=(0,t.select)("."+Te,e);this.parent.isFile=!!(0,t.isNullOrUndefined)(i)},e.prototype.onSelection=function(e,t){var i={action:e,fileDetails:t.data,isInteracted:this.interaction,cancel:!1,target:t.target};if(this.parent.trigger("fileSelection",i),t.cancel=i.cancel,!this.isMultiSelect){if(this.isMultiSelect=!0,(t.isShiftPressed||t.isCtrlPressed)&&!this.parent.allowMultiSelection&&t.target&&t.target.parentElement&&!t.target.parentElement.classList.contains("e-checkbox-wrapper")){t.cancel=!0;var n=t&&t.rowIndexes?t.rowIndexes[t.rowIndexes.length-1]:t.rowIndex;this.gridObj.selectRow(n)}this.isMultiSelect=!1}},e.prototype.onSelected=function(e){this.parent.activeModule="detailsview",this.parent.isLayoutChange&&!this.parent.isFiltered||this.selectedRecords(),this.parent.notify(ri,{}),1===this.gridObj.getSelectedRowIndexes().length&&(this.firstItemIndex=this.gridObj.selectedRowIndex),this.gridObj.element.setAttribute("tabindex","-1"),this.triggerSelect("select",e);var i=this.gridObj.getRowByIndex(this.gridObj.selectedRowIndex);if(this.updateType(i),!(0,t.isNullOrUndefined)(i)&&!(0,t.isNullOrUndefined)(i.querySelector(".e-checkselect"))){if(1!==this.gridObj.getSelectedRowIndexes().length){var n=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2],a=this.gridObj.getRowByIndex(n);(0,t.isNullOrUndefined)(a)||a.querySelector(".e-checkselect").setAttribute("tabindex","-1")}i.querySelector(".e-rowcell.e-fe-checkbox").removeAttribute("tabindex")}(0,t.isNullOrUndefined)(this.gridObj)||(0,t.isNullOrUndefined)(this.gridObj.element.querySelector(".e-checkselectall"))||this.gridObj.element.querySelector(".e-checkselectall").setAttribute("tabindex","-1");var s=this.gridObj.getSelectedRowIndexes();if(!this.parent.allowMultiSelection)for(var r=0;r<s.length;r++)s[r]===this.gridObj.selectedRowIndex?this.gridObj.getRowByIndex(s[r]).setAttribute("tabindex","0"):this.gridObj.getRowByIndex(s[r]).removeAttribute("tabindex");var o=s.length;if(this.parent.enableVirtualization)this.parent.currentItemText=(0,t.getValue)("name",e.data);else if(o>0){var l=this.gridObj.getRowsObject()[s[o-1]].data;this.parent.currentItemText=(0,t.getValue)("name",l)}var h=(0,t.getValue)("rowIndexes",e),d=(0,t.getValue)("enableSelectMultiTouch",this.gridObj.selectionModule);this.parent.isDevice&&(0,t.isNullOrUndefined)(h)&&e.target&&!d&&!e.target.closest(".e-headercell")&&(this.parent.isFile=(0,t.getValue)("isFile",e.data),this.parent.isFile||this.openContent(e.data)),this.parent.visitedItem=e.row,this.parent.enableVirtualization&&e.isHeaderCheckboxClicked||this.addFocus(this.gridObj.selectedRowIndex),this.parent.isLayoutChange||(this.isInteracted=!0)},e.prototype.onPathColumn=function(){"Details"!==this.parent.view||(0,t.isNullOrUndefined)(this.gridObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||this.removePathColumn(!1)},e.prototype.selectedRecords=function(){this.parent.setProperties({selectedItems:[]},!0);for(var e=this.gridSelectNodes(),t=0;t<e.length;){var i=e[t],n=Qn(this.parent,i);this.parent.selectedItems.push(n),t++}this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)},e.prototype.onDeSelection=function(e){if(!this.parent.allowMultiSelection&&(0,t.isNullOrUndefined)(e.data)){var i=this.gridObj.getRowByIndex(e.rowIndex);(0,t.isNullOrUndefined)(i)||i.removeAttribute("tabindex")}else if(this.gridObj.getSelectedRowIndexes().length>1){var n=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2],a=this.gridObj.getRowByIndex(n);(0,t.isNullOrUndefined)(a)||a.querySelector(".e-checkselect").removeAttribute("tabindex")}-1===this.gridObj.selectedRowIndex&&this.gridObj.element.setAttribute("tabindex","0"),this.isInteracted?(this.selectedRecords(),0===this.parent.selectedItems.length&&((0,t.setValue)("enableSelectMultiTouch",!1,this.gridObj.selectionModule),(0,t.removeClass)([this.parent.element],oe)),this.parent.notify(ri,{}),this.triggerSelect("unselect",e),this.parent.visitedItem=null):this.isInteracted=!0},e.prototype.triggerSelect=function(e,t){var i={action:e,fileDetails:t.data,isInteracted:this.interaction};this.parent.trigger("fileSelect",i),this.interaction=!0},e.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new t.KeyboardEvents(this.gridObj.element,{keyAction:this.keyupHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new t.KeyboardEvents(this.element,{keyAction:this.keydownHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),t.EventHandler.add(this.gridObj.element,"blur",this.removeFocus,this),t.EventHandler.add(this.parent.element,"focusout",this.onBlur,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),this.keyboardModule.destroy(),this.keyboardDownModule.destroy(),t.EventHandler.remove(this.gridObj.element,"blur",this.removeFocus),t.EventHandler.remove(this.parent.element,"focusout",this.onBlur)},e.prototype.wireClickEvent=function(e){var i=this;if(e){var n=this.gridObj.getContent();this.clickObj=new t.Touch(n,{tap:function(e){1===e.tapCount&&e.originalEvent.target.classList.contains("e-content")&&i.onClearAllInit()},tapHold:function(e){if(i.parent.isDevice){e.originalEvent.preventDefault(),i.parent.allowMultiSelection&&((0,t.setValue)("enableSelectMultiTouch",i.parent.allowMultiSelection,i.gridObj.selectionModule),(0,t.addClass)([i.parent.element],oe));var n=e.originalEvent.target;if(n){var a=(0,t.closest)(n,"."+je),s=i.gridObj.getRows().indexOf(a);i.gridObj.selectRow(s)}}}})}else this.clickObj&&this.clickObj.destroy()},e.prototype.removeSelection=function(){(0,t.removeClass)([this.parent.element],oe),this.gridObj.clearSelection(),this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(ri,{}),-1===this.gridObj.selectedRowIndex&&(this.startIndex=null),this.isInteracted=!0},e.prototype.removeFocus=function(){this.addFocus(null)},e.prototype.onBlur=function(e){if((null===e.relatedTarget||(0,t.closest)(e.relatedTarget,".e-grid")===e.relatedTarget)&&!(0,t.isNullOrUndefined)(this.gridObj.element))for(var i=this.gridObj.element.querySelectorAll("th"),n=0;n<i.length;n++)i[n].classList.contains("e-focus")&&this.addFocus(null)},e.prototype.getFocusedItemIndex=function(){return(0,t.isNullOrUndefined)(this.getFocusedItem())?null:parseInt(this.getFocusedItem().getAttribute("aria-rowindex"),10)-1},e.prototype.keydownHandler=function(e){if(this.isRendered)switch(e.action){case"end":case"home":case"space":case"ctrlSpace":case"shiftSpace":case"csSpace":case"ctrlA":case"enter":case"altEnter":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"esc":case"del":case"shiftdel":case"ctrlC":case"ctrlV":case"ctrlX":case"f2":case"moveDown":case"moveUp":case"ctrlD":e.preventDefault()}},e.prototype.keyupHandler=function(e){if(this.isRendered){e.preventDefault();var i,n,a,s=e.action,r=On(this.parent,this.gridObj.dataSource),o=r.length,l=this.getFocusedItemIndex(),h=this.gridObj.selectedRowIndex,d=this.gridObj.getSelectedRowIndexes();switch(s){case"altEnter":this.parent.notify(ui,{}),Oa(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":nn(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"enter":if(-1===this.gridObj.selectedRowIndex&&!0===this.gridObj.allowSorting){if(!e.target.classList.contains("e-fe-grid-icon")){var p=e.target.getElementsByClassName("e-ascending").length?"Descending":"Ascending",c=this.gridObj.getColumnByUid(e.target.querySelector(".e-headercelldiv").getAttribute("e-mappinguid")).field;this.gridObj.sortColumn(c,p),(0,t.isNullOrUndefined)(this.getFocusedItem().nextSibling)||this.getFocusedItem().nextSibling.setAttribute("tabindex","0")}break}if(i=this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data){var u=JSON.parse(JSON.stringify(i));this.openContent(u)}break;case"ctrlC":gn(this.parent);break;case"ctrlV":this.parent.folderPath="",kn(this.parent);break;case"ctrlX":mn(this.parent);break;case"ctrlD":this.doDownload();break;case"f2":this.performRename();break;case"ctrlA":if(!(0,t.isNullOrUndefined)(r[0])&&this.parent.allowMultiSelection){var f=this.gridObj.getContent().querySelector(".e-content"),g=f.scrollTop,m=this.gridObj.selectedRowIndex;this.gridObj.selectionModule.selectRowsByRange(0,r.length-1),f.scrollTop=g,-1!==m&&this.addFocus(m)}break;case"ctrlHome":case"tab":if(!(0,t.isNullOrUndefined)(r[0]))if(this.parent.allowMultiSelection||"ctrlHome"!==e.action){if(-1!==this.gridObj.selectedRowIndex&&"tab"===e.action)return;this.addHeaderFocus(e)}else this.gridObj.selectRow(0);break;case"ctrlEnd":(0,t.isNullOrUndefined)(r[0])||(this.parent.allowMultiSelection?this.addFocus(o-1):this.gridObj.selectRow(o-1));break;case"shiftHome":case"shiftEnd":case"csHome":case"csEnd":this.parent.allowMultiSelection?(0,t.isNullOrUndefined)(r[0])||((0,t.isNullOrUndefined)(h)||-1===h?"csHome"===e.action||"shiftHome"===e.action?this.gridObj.selectRow(0):this.gridObj.selectionModule.selectRowsByRange(0,r.length-1):this.checkRowsKey(r,h,null,e)):this.gridObj.selectRow("shiftHome"===e.action||"csHome"===e.action?0:r.length-1);break;case"space":case"csSpace":case"shiftSpace":case"ctrlSpace":this.spaceSelection(d,l,h,e);break;case"csUp":case"csDown":case"shiftUp":case"shiftDown":this.shiftMoveMethod(r,h,l,d,e);break;case"ctrlUp":case"ctrlDown":this.parent.allowMultiSelection?this.ctrlMoveFunction(r,e,h):this.moveFunction(r,e,h);break;case"home":n=[(0,t.getValue)(this.parent.hasId?"id":"name",r[0])],this.parent.setProperties({selectedItems:n},!0),this.selectRecords(n);break;case"moveUp":case"moveDown":this.moveFunction(r,e,h);break;case"end":a=[(0,t.getValue)(this.parent.hasId?"id":"name",r[o-1])],this.parent.setProperties({selectedItems:a},!0),this.selectRecords(a);break;case"back":this.parent.traverseBackward()}}},e.prototype.gridSelectNodes=function(){return this.gridObj.getSelectedRecords()},e.prototype.doDownload=function(){if(0!==this.parent.selectedItems.length){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!la(e[t]))return void ia(this.parent,e[t],Wi);Ga(this.parent,this.parent.path,this.parent.selectedItems)}},e.prototype.performDelete=function(){if(this.parent.selectedItems&&this.parent.selectedItems.length>0){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!sa(e[t]))return void ia(this.parent,e[t],Hi);Xa(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),$n(this.parent))},e.prototype.updateRenameData=function(){var e=this.gridSelectNodes()[0];Xn(this.parent,e)},e.prototype.shiftMoveMethod=function(e,t,i,n,a){this.parent.allowMultiSelection?-1!==t||"csUp"!==a.action&&"csDown"!==a.action?-1===t||i===t||("csUp"===a.action||"csDown"===a.action)&&this.isSelected(n,i)?this.shiftSelectedItem(t,n,e,a):this.shiftSelectFocusItem(t,i,n,a):this.ctrlMoveFunction(e,a,t):this.moveFunction(e,a,t)},e.prototype.moveFunction=function(e,i,n){!(0,t.isNullOrUndefined)(this.getFocusedItem())&&this.parent.allowMultiSelection?"moveDown"===i.action?this.gridObj.selectRow(this.getFocusedItemIndex()+1):this.gridObj.selectRow(this.getFocusedItemIndex()-1):(0,t.isNullOrUndefined)(n)||-1===n?(0,t.isNullOrUndefined)(e[0])||this.gridObj.selectRow(0):"moveDown"===i.action||"ctrlDown"===i.action||"shiftDown"===i.action||"csDown"===i.action?this.gridObj.selectRow(n+(n!==e.length-1?1:0)):this.gridObj.selectRow(n-(0!==n?1:0))},e.prototype.spaceSelection=function(e,i,n,a){if(this.isSelected(e,i)||-1===n||"shiftSpace"!==a.action&&"csSpace"!==a.action)if((0,t.isNullOrUndefined)(this.getFocusedItem())||i===n)if(-1!==n&&"ctrlSpace"===a.action&&this.parent.allowMultiSelection){var s=n;e.pop(),this.gridObj.selectRows(e),this.addFocus(s)}else"shiftSpace"===a.action&&this.gridObj.selectRow(n);else e.push(this.getFocusedItemIndex()),this.gridObj.selectRows(e);else i<n?this.gridObj.selectionModule.selectRowsByRange(i,n):this.gridObj.selectionModule.selectRowsByRange(n,i)},e.prototype.ctrlMoveFunction=function(e,i,n){var a;if((0,t.isNullOrUndefined)(this.getFocusedItem()))(0,t.isNullOrUndefined)(n)||-1===n?(0,t.isNullOrUndefined)(e[0])||(a=0):a="ctrlDown"===i.action||"csDown"===i.action?n+(n<e.length?1:0):n-(n<1?0:1);else{var s=this.getFocusedItemIndex();a="ctrlDown"===i.action||"csDown"===i.action?s+(s<e.length-1?1:0):s-(s<1?0:1)}this.addFocus(a)},e.prototype.checkRowsKey=function(e,i,n,a){"Uncheck"===this.gridObj.checkAllRows||"Intermediate"===this.gridObj.checkAllRows?"csHome"!==a.action&&"csEnd"!==a.action?((0,t.isNullOrUndefined)(this.startIndex)&&this.firstItemIndex!==i&&(this.firstItemIndex=i),"shiftEnd"===a.action?this.gridObj.selectionModule.selectRowsByRange(this.firstItemIndex,e.length-1):this.gridObj.selectionModule.selectRowsByRange(0,this.firstItemIndex),this.startIndex=i):"csEnd"===a.action?this.gridObj.selectRows(this.InnerItems((0,t.isNullOrUndefined)(i)?0:i,(0,t.isNullOrUndefined)(n)?e.length-1:n,a)):(0,t.isNullOrUndefined)(i)?this.gridObj.selectRow(0):this.gridObj.selectRows(this.InnerItems((0,t.isNullOrUndefined)(n)?0:n,i,a)):this.gridObj.selectionModule.selectRow("shiftHome"===a.action||"csHome"===a.action?0:e.length-1)},e.prototype.InnerItems=function(e,t,i){var n=this.gridObj.getSelectedRowIndexes();if("csEnd"===i.action)for(var a=e+1;a<=t;a++)n.push(a);else for(a=t-1;e<=a;a--)n.push(a);return n},e.prototype.shiftSelectFocusItem=function(e,i,n,a){var s=i+("shiftDown"===a.action||"csDown"===a.action?1:-1),r=(0,t.isNullOrUndefined)(this.startIndex)?e:n[0];r===s?this.gridObj.selectRow(r):r<s?"shiftDown"===a.action||"csDown"===a.action?this.gridObj.selectionModule.selectRowsByRange(r,s):this.gridObj.selectionModule.selectRowsByRange(s,r):"shiftDown"===a.action||"csDown"===a.action?this.gridObj.selectionModule.selectRowsByRange(s,r):this.gridObj.selectionModule.selectRowsByRange(r,s),this.startIndex=this.gridObj.selectedRowIndex},e.prototype.addFocus=function(e){var i=this.getFocusedItem(),n=this.gridObj.getRowByIndex(e);i&&(i.removeAttribute("tabindex"),(0,t.removeClass)([i],[we,De])),(0,t.isNullOrUndefined)(n)||(this.gridObj.element.setAttribute("tabindex","-1"),n.setAttribute("tabindex","0"),n.focus(),(0,t.addClass)([n],[we,De]))},e.prototype.addHeaderFocus=function(e){var i,n=(0,t.select)(".e-row",this.element);this.gridObj.element.setAttribute("tabindex","-1"),!(0,t.isNullOrUndefined)(e.target)&&e.target.classList.contains("e-defaultcursor")?(this.addFocus(0),i=e.target.nextElementSibling):(0,t.isNullOrUndefined)(this.gridObj.element.querySelector(".e-focus"))||"TH"!==this.gridObj.element.querySelector(".e-focus").tagName?i=(0,t.select)("th.e-fe-grid-icon",this.element):(i=this.gridObj.element.querySelector(".e-focus").nextElementSibling,this.addFocus(0)),(0,t.isNullOrUndefined)(i)||(i.setAttribute("tabindex","0"),i.focus(),(0,t.addClass)([i],[we,De]),n.setAttribute("tabindex","0"),0===n.tabIndex&&0===i.tabIndex&&(0,t.removeClass)([n],[we,De]))},e.prototype.getFocusedItem=function(){return(0,t.select)("."+De,this.element)},e.prototype.isSelected=function(e,t){for(var i=!1,n=0;n<=e.length-1;n++)if(e[n]===t){i=!0;break}return i},e.prototype.shiftSelectedItem=function(e,i,n,a){-1===e?this.gridObj.selectRow(0):(0,t.isNullOrUndefined)(this.startIndex)&&a.shiftKey?(this.startIndex=this.gridObj.selectedRowIndex,this.gridObj.selectRows([e,"shiftDown"===a.action||"csDown"===a.action?e+(e!==n.length-1?1:0):e-(0!==e?1:0)])):"shiftDown"===a.action||"shiftUp"===a.action?("shiftDown"===a.action&&-1===i.indexOf(e+1)?e!==n.length-1&&i.push(e+1):"shiftUp"===a.action&&-1===i.indexOf(e-1)?0!==e&&i.push(e-1):i.pop(),this.gridObj.selectRows(i)):"csDown"===a.action?this.isSelected(i,this.getFocusedItemIndex()+1)?this.addFocus(this.getFocusedItemIndex()+1):(i.push(this.getFocusedItemIndex()+1),this.gridObj.selectRows(i)):this.isSelected(i,this.getFocusedItemIndex()-1)?this.addFocus(this.getFocusedItemIndex()-1):(i.push(this.getFocusedItemIndex()-1),this.gridObj.selectRows(i))},e.prototype.onMethodCall=function(e){if("Details"===this.parent.view)switch((0,t.getValue)("action",e)){case"deleteFiles":this.deleteFiles((0,t.getValue)("ids",e));break;case"downloadFiles":this.downloadFiles((0,t.getValue)("ids",e));break;case"openFile":this.openFile((0,t.getValue)("id",e));break;case"createFolder":this.interaction=!1;break;case"renameFile":this.interaction=!1,this.renameFile((0,t.getValue)("id",e),(0,t.getValue)("newName",e));break;case"selectAll":this.interaction=!1,this.onSelectAllInit();break;case"clearSelection":this.interaction=!1,this.onClearAllInit()}},e.prototype.getRecords=function(e){var i=this.gridObj.getCurrentViewRecords(),n=[],a=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),s=this.parent.hasId?"id":"name";if(this.parent.hasId||!a)for(var r=0,o=i.length;r<o;r++)-1!==e.indexOf((0,t.getValue)(s,i[r]))&&n.push(i[r]);else for(r=0,o=i.length;r<o;r++){var l=(0,t.getValue)("filterPath",i[r])+(0,t.getValue)("name",i[r]);-1!==e.indexOf(l)&&n.push(i[r])}return n},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="detailsview",(0,t.isNullOrUndefined)(e))this.performDelete();else{var i=this.getRecords(e);if(0!==i.length){for(var n=[],a=[],s=0;s<i.length;s++)n[s]=i[s],a[s]=Qn(this.parent,n[s]);ea(this.parent,n,a)}}},e.prototype.downloadFiles=function(e){if((0,t.isNullOrUndefined)(e))this.doDownload();else{var i=this.getRecords(e);if(0!==i.length){for(var n=[],a=[],s=0;s<i.length;s++)n[s]=i[s],a[s]=Qn(this.parent,n[s]);ta(this.parent,n,a)}}},e.prototype.openFile=function(e){if(!(0,t.isNullOrUndefined)(e)){var i=this.getRecords([e]);i.length>0&&this.openContent(i[0])}},e.prototype.renameFile=function(e,i){if(this.parent.activeModule="detailsview",(0,t.isNullOrUndefined)(e))this.performRename();else{var n=this.getRecords([e]);n.length>0&&(Xn(this.parent,n[0]),(0,t.isNullOrUndefined)(i)?$n(this.parent):sa(this.parent.itemData[0])?va(this.parent,this.parent.path,i):ia(this.parent,this.parent.itemData[0],Hi))}},e}()})(),u})()));
|