").text(n)),u.lockfiles({files:[A]}),u.request({data:Object.assign({cmd:f,name:n,target:I},j||{}),notify:{type:f,cnt:1},preventFail:!0,syncOnFail:!0,navigate:{toast:t}}).fail(function(e){u.unlockfiles({files:[A]}),H=!0,E.show().prev().remove(),u.error(e,{modal:!0,close:function(){setTimeout(P,120)}})}).done(function(n){if(n&&n.added&&n.added[0]){var o=n.added[0],r=o.hash,s=(v.find("#"+u[y](r)),{directory:{cmd:"open",msg:"cmdopendir"},text:{cmd:"edit",msg:"cmdedit"},"default":{cmd:"open",msg:"cmdopen"}});x&&k&&u.one(f+"done",function(){u.exec("paste",r)}),k||(Object.assign(i,a||s[o.mime]||s[o.mime.split("/")[0]]||s[e.inArray(o.mime,u.resources.mimes.text)!==-1?"text":"none"]||s["default"]),Object.assign(t,i.cmd?{incwd:{msg:u.i18n(["complete",u.i18n("cmd"+h)]),action:i},inbuffer:{msg:u.i18n(["complete",u.i18n("cmd"+h)]),action:i}}:{inbuffer:{msg:u.i18n(["complete",u.i18n("cmd"+h)])}}))}T.resolve(n)})}).fail(function(){T.reject()})}}).on("dragenter dragleave dragover drop",function(e){e.stopPropagation()}),P=function(){var e=u.splitFileExtention(E.val())[0];H||!u.UA.Mobile||u.UA.iOS||(D.on("click close",U).elfinderoverlay("show"),i.css("z-index",D.css("z-index")+1)),H=!1,!u.enabled()&&u.enable(),E.trigger("focus").trigger("select"),E[0].setSelectionRange&&E[0].setSelectionRange(0,e.length)},R=function(){F.trigger("scrolltoview",{blink:!1})},q=function(){T&&"pending"===T.state()&&T.reject()},H=!1;return u.isCommandEnabled(f,I)&&F.length?(e.isPlainObject(p.nextAction)&&(a=Object.assign({},p.nextAction)),b?(o=e("#"+u[y](I)),s=u.res("class","navcollapse"),l=u.res("class","navexpand"),c=u.res("class","navarrow"),d=u.res("class","navsubtree"),F.closest("."+d).show(),o.hasClass(s)||(r=o.attr("class"),o.addClass(s+" "+l+" elfinder-subtree-loaded")),o.is("."+s+":not(."+l+")")&&o.children("."+c).trigger("click").data("dfrd").done(function(){E.val()===O.name&&E.val(u.uniqueName(p.prefix,I)).trigger("select").trigger("focus")}),n=F.contents().filter(function(){return 3==this.nodeType&&e(this).parent().attr("id")===u.navHash2Id(O.hash)}),n.replaceWith(E.val(O.name))):(C&&m.removeClass("elfinder-cwd-wrapper-empty"),n=F.find(".elfinder-cwd-filename"),i=n.parent(),F.css("position","relative").addClass("ui-front"),w?n.css("max-height","none"):(t=i.width(),i.width(t-15).parent("td").css("overflow","visible")),n.empty().append(E.val(O.name))),u.bind("resize",R).one("open",q),E.trigger("keyup"),P(),T):T.reject()}},blink:function(e,t){var n,i={slowonce:function(){e.hide().delay(250).fadeIn(750).delay(500).fadeOut(3500)},lookme:function(){e.show().fadeOut(500).fadeIn(750)}};t=t||"slowonce",n=i[t]||i.lookme,e.stop(!0,!0),n()}},e.fn.dialogelfinder=function(t){var n,i="elfinderPosition",a="elfinderDestroyOnClose";if(this.not(".elfinder").each(function(){var n=(e(document),e('")),o=(e(' ').appendTo(n).on("click",function(e){e.preventDefault(),o.dialogelfinder("close")}),e(this).addClass("dialogelfinder").css("position","absolute").hide().appendTo("body").draggable({handle:".dialogelfinder-drag",containment:"window",stop:function(){o.trigger("resize"),r.trigger("resize")}}).elfinder(t).prepend(n)),r=o.elfinder("instance");o.width(parseInt(o.width())||840).data(a,!!t.destroyOnClose).find(".elfinder-toolbar").removeClass("ui-corner-top"),t.position&&o.data(i,t.position),t.autoOpen!==!1&&e(this).dialogelfinder("open")}),"open"==t)n=e(this),pos=n.data(i)||{top:parseInt(e(document).scrollTop()+(e(window).height()This cannot be undone!",confirmRepl:"Replace old file with new one? (If it contains folders, it will be merged. To backup and replace, select Backup.)",confirmRest:"Replace existing item with the item in trash?",confirmConvUTF8:"Not in UTF-8
Convert to UTF-8?
Contents become UTF-8 by saving after conversion.",confirmNonUTF8:"Character encoding of this file couldn't be detected. It need to temporarily convert to UTF-8 for editting.
Please select character encoding of this file.",confirmNotSave:"It has been modified.
Losing work if you do not save changes.",confirmTrash:"Are you sure you want to move items to trash bin?",apllyAll:"Apply to all",name:"Name",size:"Size",perms:"Permissions",modify:"Modified",kind:"Kind",read:"read",write:"write",noaccess:"no access",and:"and",unknown:"unknown",selectall:"Select all items",selectfiles:"Select item(s)",selectffile:"Select first item",selectlfile:"Select last item",viewlist:"List view",viewicons:"Icons view",places:"Places",calc:"Calculate",path:"Path",aliasfor:"Alias for",locked:"Locked",dim:"Dimensions",files:"Files",folders:"Folders",items:"Items",yes:"yes",no:"no",link:"Link",searcresult:"Search results",selected:"selected items",about:"About",shortcuts:"Shortcuts",help:"Help",webfm:"Web file manager",ver:"Version",protocolver:"protocol version",homepage:"Project home",docs:"Documentation",github:"Fork us on GitHub",twitter:"Follow us on Twitter",facebook:"Join us on Facebook",team:"Team",chiefdev:"chief developer",developer:"developer",contributor:"contributor",maintainer:"maintainer",translator:"translator",icons:"Icons",dontforget:"and don't forget to take your towel",shortcutsof:"Shortcuts disabled",dropFiles:"Drop files here",or:"or",selectForUpload:"Select files",moveFiles:"Move items",copyFiles:"Copy items",restoreFiles:"Restore items",rmFromPlaces:"Remove from places",aspectRatio:"Aspect ratio",scale:"Scale",width:"Width",height:"Height",resize:"Resize",crop:"Crop",rotate:"Rotate","rotate-cw":"Rotate 90 degrees CW","rotate-ccw":"Rotate 90 degrees CCW",degree:"°",netMountDialogTitle:"Mount network volume",protocol:"Protocol",host:"Host",port:"Port",user:"User",pass:"Password",confirmUnmount:"Are you sure to unmount $1?",dropFilesBrowser:"Drop or Paste files from browser",dropPasteFiles:"Drop files, Paste URLs or images(clipboard) here",encoding:"Encoding",locale:"Locale",searchTarget:"Target: $1",searchMime:"Search by input MIME Type",owner:"Owner",group:"Group",other:"Other",execute:"Execute",perm:"Permission",mode:"Mode",emptyFolder:"Folder is empty",emptyFolderDrop:"Folder is empty\\A Drop to add items",emptyFolderLTap:"Folder is empty\\A Long tap to add items",quality:"Quality",autoSync:"Auto sync",moveUp:"Move up",getLink:"Get URL link",selectedItems:"Selected items ($1)",folderId:"Folder ID",offlineAccess:"Allow offline access",reAuth:"To re-authenticate",nowLoading:"Now loading...",openMulti:"Open multiple files",openMultiConfirm:"You are trying to open the $1 files. Are you sure you want to open in browser?",emptySearch:"Search results is empty in search target.",editingFile:"It is editing a file.",hasSelected:"You have selected $1 items.",hasClipboard:"You have $1 items in the clipboard.",incSearchOnly:"Incremental search is only from the current view.",reinstate:"Reinstate",complete:"$1 complete",contextmenu:"Context menu",pageTurning:"Page turning",volumeRoots:"Volume roots",reset:"Reset",bgcolor:"Background color",colorPicker:"Color picker","8pxgrid":"8px Grid",enabled:"Enabled",disabled:"Disabled",emptyIncSearch:"Search results is empty in current view.\\A Press [Enter] to expand search target.",emptyLetSearch:"First letter search results is empty in current view.",textLabel:"Text label",minsLeft:"$1 mins left",openAsEncoding:"Reopen with selected encoding",saveAsEncoding:"Save with the selected encoding",selectFolder:"Select folder",firstLetterSearch:"First letter search",presets:"Presets",tooManyToTrash:"It's too many items so it can't into trash.",TextArea:"TextArea",folderToEmpty:'Empty the folder "$1".',filderIsEmpty:'There are no items in a folder "$1".',preference:"Preference",language:"Language",clearBrowserData:"Initialize the settings saved in this browser",toolbarPref:"Toolbar settings",charsLeft:"... $1 chars left.",sum:"Sum",roughFileSize:"Rough file size",autoFocusDialog:"Focus on the element of dialog with mouseover",select:"Select",selectAction:"Action when select file",useStoredEditor:"Open with the editor used last time",selectinvert:"Invert selection",renameMultiple:"Are you sure you want to rename $1 selected items like $2?
This cannot be undone!",batchRename:"Batch rename",plusNumber:"+ Number",asPrefix:"Add prefix",asSuffix:"Add suffix",changeExtention:"Change extention",columnPref:"Columns settings (List view)",reflectOnImmediate:"All changes will reflect immediately to the archive.",reflectOnUnmount:"Any changes will not reflect until un-mount this volume.",unmountChildren:"The following volume(s) mounted on this volume also unmounted. Are you sure to unmount it?",selectionInfo:"Selection Info",hashChecker:"Algorithms to show the file hash",infoItems:"Info Items (Selection Info Panel)",pressAgainToExit:"Press again to exit.",toolbar:"Toolbar",workspace:"Work Space",dialog:"Dialog",all:"All",kindUnknown:"Unknown",kindRoot:"Volume Root",kindFolder:"Folder",kindSelects:"Selections",kindAlias:"Alias",kindAliasBroken:"Broken alias",kindApp:"Application",kindPostscript:"Postscript document",kindMsOffice:"Microsoft Office document",kindMsWord:"Microsoft Word document",kindMsExcel:"Microsoft Excel document",kindMsPP:"Microsoft Powerpoint presentation",kindOO:"Open Office document",kindAppFlash:"Flash application",kindPDF:"Portable Document Format (PDF)",kindTorrent:"Bittorrent file",kind7z:"7z archive",kindTAR:"TAR archive",kindGZIP:"GZIP archive",kindBZIP:"BZIP archive",kindXZ:"XZ archive",kindZIP:"ZIP archive",kindRAR:"RAR archive",kindJAR:"Java JAR file",kindTTF:"True Type font",kindOTF:"Open Type font",kindRPM:"RPM package",kindText:"Text document",kindTextPlain:"Plain text",kindPHP:"PHP source",kindCSS:"Cascading style sheet",kindHTML:"HTML document",kindJS:"Javascript source",kindRTF:"Rich Text Format",kindC:"C source",kindCHeader:"C header source",kindCPP:"C++ source",kindCPPHeader:"C++ header source",kindShell:"Unix shell script",kindPython:"Python source",kindJava:"Java source",kindRuby:"Ruby source",kindPerl:"Perl script",kindSQL:"SQL source",kindXML:"XML document",kindAWK:"AWK source",kindCSV:"Comma separated values",kindDOCBOOK:"Docbook XML document",kindMarkdown:"Markdown text",kindImage:"Image",kindBMP:"BMP image",kindJPEG:"JPEG image",kindGIF:"GIF Image",kindPNG:"PNG Image",kindTIFF:"TIFF image",kindTGA:"TGA image",kindPSD:"Adobe Photoshop image",kindXBITMAP:"X bitmap image",kindPXM:"Pixelmator image",kindAudio:"Audio media",kindAudioMPEG:"MPEG audio",kindAudioMPEG4:"MPEG-4 audio",kindAudioMIDI:"MIDI audio",kindAudioOGG:"Ogg Vorbis audio",kindAudioWAV:"WAV audio",AudioPlaylist:"MP3 playlist",kindVideo:"Video media",kindVideoDV:"DV movie",kindVideoMPEG:"MPEG movie",kindVideoMPEG4:"MPEG-4 movie",kindVideoAVI:"AVI movie",kindVideoMOV:"Quick Time movie",kindVideoWM:"Windows Media movie",kindVideoFlash:"Flash movie",kindVideoMKV:"Matroska movie",kindVideoOGG:"Ogg movie"}}),e.fn.elfinderbutton=function(t){return this.each(function(){var n,i,a="class",o=t.fm,r=o.res(a,"disabled"),s=o.res(a,"active"),l=o.res(a,"hover"),c="elfinder-button-menu-item",d="elfinder-button-menu-item-selected",p=e(''+t.title+""),u=e(this).addClass("ui-state-default elfinder-button").attr("title",t.title).append('',p).on("mouseenter mouseleave",function(e){!u.hasClass(r)&&u["mouseleave"==e.type?"removeClass":"addClass"](l)}).on("click",function(e){u.hasClass(r)||(n&&t.variants.length>=1?(n.is(":hidden")&&o.getUI().click(),e.stopPropagation(),n.css(f()).slideToggle({duration:100,done:function(e){o[n.is(":visible")?"toFront":"toHide"](n)}})):o.exec(t.name,m(),{_userAction:!0,_currentType:"toolbar",_currentNode:u}))}),h=function(){o.toHide(n)},f=function(){var e=o.getUI().offset(),t=u.offset();return{top:t.top-e.top,left:t.left-e.left}},m=function(){var e,t=o.selected();return t.length||(t=(e=o.cwd())?[o.cwd().hash]:void 0),t};p.hide(),t.button=u,Array.isArray(t.variants)&&(u.addClass("elfinder-menubutton"),n=e('').hide().appendTo(o.getUI()).on("mouseenter mouseleave","."+c,function(){e(this).toggleClass(l)}).on("click","."+c,function(i){var a=e(this).data("value");i.preventDefault(),i.stopPropagation(),u.removeClass(l),o.toHide(n),"undefined"==typeof a&&(a={}),"object"==typeof a&&(a._userAction=!0),o.exec(t.name,m(),a)}).on("close",h),o.bind("disable select",h).getUI().on("click",h),t.change(function(){n.html(""),e.each(t.variants,function(i,a){n.append(e(''+a[1]+"
").data("value",a[0]).addClass(a[0]==t.value?d:""))})})),t.change(function(){i&&cancelAnimationFrame(i),i=requestAnimationFrame(function(){t.disabled()?u.removeClass(s+" "+l).addClass(r):(u.removeClass(r),u[t.active()?"addClass":"removeClass"](s)),t.syncTitleOnChange&&(p.html(t.title),u.attr("title",t.title))})}).change()})},e.fn.elfindercontextmenu=function(t){return this.each(function(){var n,i,a,o,r,s,l,c=(e(this),"elfinder-contextmenu-item"),d="elfinder-contextsubmenu-item",p="elfinder-contextmenu-extra-icon",u=t.res("class","hover"),h={distance:8,start:function(){f.data("drag",!0).data("touching")&&f.find("."+u).removeClass(u)},stop:function(){f.data("draged",!0).removeData("drag")}},f=e(this).addClass("touch-punch ui-helper-reset ui-front ui-widget ui-state-default ui-corner-all elfinder-contextmenu elfinder-contextmenu-"+t.direction).hide().on("touchstart",function(e){f.data("touching",!0).children().removeClass(u)}).on("touchend",function(e){f.removeData("touching")}).on("mouseenter mouseleave","."+c,function(t){e(this).toggleClass(u,!("mouseenter"!==t.type&&(f.data("draged")||!f.data("submenuKeep")))),f.data("draged")&&f.data("submenuKeep")&&f.find(".elfinder-contextmenu-sub:visible").parent().addClass(u)}).on("mouseenter mouseleave","."+p,function(t){e(this).parent().toggleClass(u,"mouseleave"===t.type)}).on("mouseenter mouseleave","."+c+",."+d,function(t){var n=function(t,n){e.each(n?r:a,function(e,i){if(t[0]===i)return(n?r:a)._cur=e,n?s=t:o=t,!1})};if(t.originalEvent){var i=e(this),l=function(){o&&!o.children("div.elfinder-contextmenu-sub:visible").length&&o.removeClass(u)};"mouseenter"===t.type?i.hasClass(d)?(s&&s.removeClass(u),o&&(r=o.find("div."+d)),n(i,!0)):(l(),n(i)):i.hasClass(d)?(s=null,r=null):(l(),function(e){setTimeout(function(){e===o&&(o=null)},250)}(o))}}).on("contextmenu",function(){return!1}).on("mouseup",function(){setTimeout(function(){f.removeData("draged")},100)}).draggable(h),m="ltr"==t.direction?"left":"right",g=Object.assign({},t.options.contextmenu),v='{label}
',b=function(n,i,a,o){var r="",s="",l="";return o&&(o.className&&(r=" "+o.className),o.iconClass&&(l=o.iconClass,i=""),o.iconImg&&(s=" style=\"background:url('"+t.escape(o.iconImg)+"') 0 0 no-repeat;background-size:contain;\"")),e(v.replace("{icon}",i?"elfinder-button-icon-"+i:l?l:"").replace("{label}",n).replace("{style}",s).replace("{className}",r)).on("click",function(e){e.stopPropagation(),e.preventDefault(),a()})},y=function(e){return{backgroundImage:'url("'+e+'")',backgroundRepeat:"no-repeat",backgroundSize:"contain"}},w=function(){var n="touchstart.contextmenuAutoToggle";f.data("hideTm")&&clearTimeout(f.data("hideTm")),f.is(":visible")&&f.on("touchstart",function(e){e.originalEvent.touches.length>1||(f.stop(),t.toFront(f),f.data("hideTm")&&clearTimeout(f.data("hideTm")))}).data("hideTm",setTimeout(function(){f.is(":visible")&&(i.find(".elfinder-cwd-file").off(n),i.find(".elfinder-cwd-file.ui-selected").one(n,function(t){if(!(t.originalEvent.touches.length>1)){var a=e(t.target);return!f.first().length||a.is("input:checkbox")||a.hasClass("elfinder-cwd-select")?void i.find(".elfinder-cwd-file").off(n):(k(t.originalEvent.touches[0].pageX,t.originalEvent.touches[0].pageY),!1)}}).one("unselect."+t.namespace,function(){i.find(".elfinder-cwd-file").off(n)}),f.fadeOut({duration:300,fail:function(){f.css("opacity","1").show()},done:function(){t.toHide(f)}}))},4500))},x=function(n){var i=n.keyCode,l=e.ui.keyCode.ESCAPE,c=e.ui.keyCode.ENTER,p=e.ui.keyCode.LEFT,h=e.ui.keyCode.RIGHT,f=e.ui.keyCode.UP,m=e.ui.keyCode.DOWN,g="ltr"===t.direction?h:p,v=g===h?p:h;e.inArray(i,[l,c,p,h,f,m])!==-1&&(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),i==l||i===v?o&&r&&s?(s.trigger("mouseleave").trigger("submenuclose"),o.addClass(u),r=null,s=null):i==l&&C():i==f||i==m?r?(s&&s.trigger("mouseleave"),i==m&&(!s||r.length<=++r._cur)?r._cur=0:i==f&&(!s||--r._cur<0)&&(r._cur=r.length-1),s=r.eq(r._cur).trigger("mouseenter")):(r=null,o&&o.trigger("mouseleave"),i==m&&(!o||a.length<=++a._cur)?a._cur=0:i==f&&(!o||--a._cur<0)&&(a._cur=a.length-1),o=a.eq(a._cur).addClass(u)):!o||i!=c&&i!==g||(o.hasClass("elfinder-contextmenu-group")?s?i==c&&s.click():(o.trigger("mouseenter"),r=o.find("div."+d),r._cur=0,s=r.first().addClass(u)):i==c&&o.click()))},k=function(i,a,c){var d,p=f.outerWidth(),u=f.outerHeight(),h=n.attr("style"),g=n.offset(),v=n.width(),b=n.height(),y=t.UA.Mobile?40:2,k=t.UA.Mobile?20:2,i=i-(g?g.left:0),a=a-(g?g.top:0),c=Object.assign(c||{},{
top:Math.max(0,a+k+u1&&f.append('"),a=e(),e.each(g[i]||[],function(g,w){var x,k,z,T,A,I;if("|"===w)return void(s&&(l=!0));if(r[w]?(k=r[w],z=!0):k=w,x=t.getCommand(k),!x||v||t.searchStatus.state&&x.disableOnSearch||(x.__disabled=x._disabled,x._disabled=!(x.alwaysEnabled||!!t._commands[k]&&!(e.inArray(w,h)!==-1||z&&h[k])),e.each(x.linkedCmds,function(e,n){var i;(i=t.getCommand(n))&&(i.__disabled=i._disabled,i._disabled=!(i.alwaysEnabled||!!t._commands[n]&&!h[n]))})),x&&!x._disabled&&x.getstate(o)!=-1){if(x.variants){if(!x.variants.length)return;T=b(x.title,x.className?x.className:x.name,function(){}),A=e('').hide().appendTo(T.append('')),I=function(e){if(e){var i=n.attr("style");n.width(n.width()),A.css({top:"-1000px",left:"auto",right:"auto"});var a,o,r,s=T.offset(),l=s.left,c=s.top,d=T.outerWidth(),p=A.outerWidth(!0),u=A.outerHeight(!0),h=n.offset(),g=h.left+n.width(),v=h.top+n.height();r=l+d+p-g,a=l>p&&r>0?t.UA.Mobile?10-p:d-r:d,"right"===m&&l0&&c0?30-u:5,f.find(".elfinder-contextmenu-sub:visible").hide(),A.css({top:o}).css(m,a).show(),n.attr("style",i)}else A.hide()},T.addClass("elfinder-contextmenu-group").on("mouseleave",".elfinder-contextmenu-sub",function(e){f.data("draged")||f.removeData("submenuKeep")}).on("submenuclose",".elfinder-contextmenu-sub",function(e){I(!1)}).on("click","."+d,function(n){var a,r;n.stopPropagation(),f.data("draged")||(r=e(this),x.keepContextmenu?(r.removeClass(u),T.addClass(u)):f.hide(),a=r.data("exec"),"undefined"==typeof a&&(a={}),"object"==typeof a&&(a._userAction=!0,a._currentType=i,a._currentNode=r),!x.keepContextmenu&&C(),t.exec(x.name,o,a))}).on("touchend",function(e){f.data("drag")||(I(!0),f.data("submenuKeep",!0))}).on("mouseenter mouseleave",function(t){f.data("touching")||(T.data("timer")&&(clearTimeout(T.data("timer")),T.removeData("timer")),e(t.target).closest(".elfinder-contextmenu-sub",f).length||("mouseleave"===t.type?f.data("submenuKeep")||T.data("timer",setTimeout(function(){T.removeData("timer"),I(!1)},250)):T.data("timer",setTimeout(function(){T.removeData("timer"),I(!0)},a.find("div.elfinder-contextmenu-sub:visible").length?250:0))))}),e.each(x.variants,function(t,n){var i,a="|"===n?'':e(''+n[1]+"
").data("exec",n[0]);"undefined"!=typeof n[2]&&(i=e("").addClass("elfinder-button-icon elfinder-contextmenu-icon"),/\//.test(n[2])?i.css(y(n[2])):i.addClass("elfinder-button-icon-"+n[2]),a.prepend(i).addClass(d+"-icon")),A.append(a)})}else T=b(x.title,x.className?x.className:x.name,function(){f.data("draged")||(!x.keepContextmenu&&C(),t.exec(x.name,o,{_userAction:!0,_currentType:i,_currentNode:T}))}),x.extra&&x.extra.node?(e('').append(x.extra.node).appendTo(T),e(x.extra.node).trigger("ready",{targets:o})):T.remove("."+p);x.extendsCmd&&T.children("span.elfinder-button-icon").addClass("elfinder-button-icon-"+x.extendsCmd),l&&f.append(''),f.append(T),s=!0,l=!1}x&&"undefined"!=typeof x.__disabled&&(x._disabled=x.__disabled,delete x.__disabled,e.each(x.linkedCmds,function(e,n){var i;(i=t.getCommand(n))&&(i._disabled=i.__disabled,delete i.__disabled)}))}),a=f.children("div."+c)},T=function(t){A="raw",e.each(t,function(e,t){var n;"|"===t?f.append(''):t.label&&"function"==typeof t.callback&&(n=b(t.label,t.icon,function(){f.data("draged")||(!t.remain&&C(),t.callback())},t.options||null),f.append(n))}),a=f.children("div."+c)},A=null,I=null;t.one("load",function(){n=t.getUI(),i=t.getUI("cwd"),t.bind("contextmenu",function(n){var a,o=n.data,r={};o.type&&"files"!==o.type&&i.trigger("unselectall"),C(),o.type&&o.targets?(t.trigger("contextmenucreate",o),z(o.type,o.targets),t.trigger("contextmenucreatedone",o)):o.raw&&T(o.raw),f.children().length&&(a=o.prevNode||null,a&&(f.data("prevNode",f.prev()),a.after(f)),o.fitHeight&&(r={maxHeight:Math.min(t.getUI().height(),e(window).height()),overflowY:"auto"},f.draggable("destroy").removeClass("ui-draggable")),k(o.x,o.y,r),o.opened&&"function"==typeof o.opened&&o.opened.call(f))}).one("destroy",function(){f.remove()}).bind("disable",C).bind("select",function(e){"files"===A&&(!e.data||e.data.selected.toString()!==I.toString())&&C()})}).shortcut({pattern:"mac"===t.OS?"ctrl+m":"contextmenu shift+f10",description:"contextmenu",callback:function(n){n.stopPropagation(),n.preventDefault(),e(document).one("contextmenu."+t.namespace,function(e){e.preventDefault(),e.stopPropagation()});var i,a,o,r,s=t.selected();s.length?(i="files",a=s,r=e("#"+t.cwdHash2Id(s[0]))):(i="cwd",a=[t.cwd().hash],o=t.getUI("workzone").offset()),r&&r.length||(r=t.getUI("workzone")),o=r.offset(),o.top+=r.height()/2,o.left+=r.width()/2,t.trigger("contextmenu",{type:i,targets:a,x:o.left,y:o.top})}})})},e.fn.elfindercwd=function(t,n){return this.not(".elfinder-cwd").each(function(){var i,a,o,r=t.UA.Mobile,s="list"==t.viewType,l="select."+t.namespace,c="unselect."+t.namespace,d="disable."+t.namespace,p="enable."+t.namespace,u="class",h=t.res(u,"cwdfile"),f="."+h+(n.oldSchool?":not(.elfinder-cwd-parent)":""),m="ui-selected",g=t.res(u,"disabled"),v=t.res(u,"draggable"),b=t.res(u,"droppable"),y=t.res(u,"hover"),w=t.res(u,"active"),x=t.res(u,"adroppable"),k=h+"-tmp",C=t.options.loadTmbs>0?t.options.loadTmbs:5,z="",T={},A=[],I=[],S=void 0,O=[],j="",F=function(){for(var e="",t=0;t{'+O[t]+"}";return e},D=function(){return'{marker}{name} '+M+" | "+F()+"
"},M=e.map(n.showSelectCheckboxUA,function(e){return!(!t.UA[e]&&!e.match(/^all$/i))||null}).length?'':"",U=!1,E=null,P={icon:'",row:""},R=t.res("tpl","perms"),q=t.res("tpl","lock"),H=t.res("tpl","symlink"),_={id:function(e){return t.cwdHash2Id(e.hash)},name:function(e){var n=t.escape(e.i18||e.name);return!s&&(n=n.replace(/([_.])/g,"$1")),n},nametitle:function(e){return t.escape(e.i18||e.name)},permsclass:function(e){return t.perms2class(e)},perm:function(e){return t.formatPermissions(e)},dirclass:function(e){var i="directory"==e.mime?"directory":"";return e.isroot&&(i+=" isroot"),e.csscls&&(i+=" "+t.escape(e.csscls)),n.getClass&&(i+=" "+n.getClass(e)),i},style:function(e){return e.icon?t.getIconStyle(e):""},mime:function(e){return t.mime2class(e.mime)},size:function(e){return"directory"!==e.mime||e.size?t.formatSize(e.size):"-"},date:function(e){return t.formatDate(e)},kind:function(e){return t.mime2kind(e)},mode:function(e){return e.perm?t.formatFileMode(e.perm):""},modestr:function(e){return e.perm?t.formatFileMode(e.perm,"string"):""},modeoct:function(e){return e.perm?t.formatFileMode(e.perm,"octal"):""},modeboth:function(e){return e.perm?t.formatFileMode(e.perm,"both"):""},marker:function(e){return(e.alias||"symlink-broken"==e.mime?H:"")+(e.read&&e.write?"":R)+(e.locked?q:"")},tooltip:function(e){var n=t.formatDate(e)+(e.size>0?" ("+t.formatSize(e.size)+")":""),i="";return i=z&&e.path?t.escape(e.path.replace(/\/[^\/]*$/,"")):e.tooltip?t.escape(e.tooltip).replace(/\r/g,"
"):"",s&&(i+=(i?"
":"")+t.escape(e.i18||e.name)),i?i+"
"+n:n}},N={},L=function(n,a){var o,r,s;if(n&&!N[n]&&("undefined"==typeof i&&(e("#elfinderAddBadgeStyle"+t.namespace).length&&e("#elfinderAddBadgeStyle"+t.namespace).remove(),i=e('').insertBefore(e("head").children(":first")).get(0).sheet||null),i)){if(n=n.toLowerCase(),s=n.split("/"),r=t.escape(t.mimeTypes[n]||(a.replace(/.bac?k$/i,"").match(/\.([^.]+)$/)||["",""])[1])){o=".elfinder-cwd-icon-"+s[0].replace(/(\.|\+)/g,"-"),"undefined"!=typeof s[1]&&(o+=".elfinder-cwd-icon-"+s[1].replace(/(\.|\+)/g,"-"));try{i.insertRule(o+':before{content:"'+r.toLowerCase()+'"}',0)}catch(l){}}N[n]=!0}},W=function(e){return e.mime&&"directory"!==e.mime&&!N[e.mime]&&L(e.mime,e.name),P[s?"row":"icon"].replace(/\{([a-z0-9_]+)\}/g,function(n,i){return _[i]?_[i](e,t):e[i]?e[i]:""})},B=e(),$=!1,K=function(t,n){function i(e,t){return e[t+"All"]("[id]:not(."+g+"):not(.elfinder-cwd-parent):first")}var a,o,r,d,p,u=e.ui.keyCode,h=t==u.LEFT||t==u.UP,f=Oe.find("[id]."+m);if(f.length)if(a=f.filter(h?":first":":last"),r=i(a,h?"prev":"next"),r.length)if(s||t==u.LEFT||t==u.RIGHT)o=r;else if(d=a.position().top,p=a.position().left,o=a,h){do o=o.prev("[id]");while(o.length&&!(o.position().topd&&o.position().left>=p));o.hasClass(g)&&(o=i(o,"prev")),o.length||(r=Oe.find("[id]:not(."+g+"):last"),r.position().top>d&&(o=r))}else o=a;else o=B.length?h?B.prev():B:Oe.find("[id]:not(."+g+"):not(.elfinder-cwd-parent):"+(h?"last":"first"));o&&o.length&&!o.hasClass("elfinder-cwd-parent")&&(a&&n?o=a.add(a[h?"prevUntil":"nextUntil"]("#"+o.attr("id"))).add(o):f.trigger(c),o.trigger(l),te(o.filter(h?":first":":last")),ee())},V={},X=function(n){e("#"+t.cwdHash2Id(n)).trigger(l)},J=!1,G=function(){t.cwd().hash;M&&De.find("input").prop("checked",!0),t.lazy(function(){var n;Oe.find("[id]:not(."+m+"):not(.elfinder-cwd-parent)").trigger(l),t.maxTargets&&(S||I).length>t.maxTargets?(n=e.map(S||I,function(e){return t.file(e)||null}),n=n.slice(0,t.maxTargets),V={},e.each(n,function(e,t){V[t.hash]=!0}),t.toast({mode:"warning",msg:t.i18n(["errMaxTargets",t.maxTargets])})):V=t.arrayFlip(S||I,!0),ee(),M&&De.data("pending",!1)},0,{repaint:!0})},Y=function(e){var t=e||{};M&&De.find("input").prop("checked",!1),Object.keys(V).length&&($=!1,V={},Oe.find("[id]."+m).trigger(c),M&&Oe.find("input:checkbox").prop("checked",!1)),!t.notrigger&&ee(),M&&De.data("pending",!1),Oe.removeClass("elfinder-cwd-allselected")},Q=function(){var n={};J?Y():Object.keys(V).length?(e.each(S||I,function(i,a){var o=e("#"+t.cwdHash2Id(a));V[a]?o.length&&o.trigger(c):(n[a]=!0,o.length&&o.trigger(l))}),V=n,ee()):G()},Z=void 0,ee=function(){var e=Object.keys(V),n={selected:e};J=e.length&&e.length===(S||I).length&&(!t.maxTargets||e.length<=t.maxTargets),M&&(De.find("input").prop("checked",J),Oe[J?"addClass":"removeClass"]("elfinder-cwd-allselected")),J?n.selectall=!0:e.length||(n.unselectall=!0),t.trigger("select",n)},te=function(e,n){if(e.length){var i=e.position().top,a=e.outerHeight(!0),o=je.scrollTop(),r=je.get(0).clientHeight,l=fe?fe.outerHeight(!0):0;i+l+a>o+r?je.scrollTop(parseInt(i+l+a-r)):i"),p=function(n){var i,a,p,u=n||null,h=[],f=!1,g={},v="self"===t.option("tmbUrl"),b=!ie.renderd;i=ne.splice(0,ue+(u||0)/(ie.hpi||1)),ie.renderd+=i.length,ne.length||(Fe.hide(),je.off(re,he)),a=[],h=e.map(i,function(e){return e.hash&&e.name?("directory"==e.mime&&(f=!0),(e.tmb||v&&0===e.mime.indexOf("image/"))&&(g[e.hash]=e.tmb),T[e.hash]&&a.push(e.hash),W(e)):null}),d.empty().append(h.join("")),f&&!r&&ye(d),p=[],Object.keys(V).length&&d.find("[id]:not(."+m+"):not(.elfinder-cwd-parent)").each(function(){V[t.cwdId2Hash(this.id)]&&p.push(e(this))}),o.append(c?d:d.children()),p.length&&(e.each(p,function(e,t){t.trigger(l)}),ee()),a.length&&t.trigger("lockfiles",{files:a}),!ie.hpi&&Ae(o,i.length),s&&(Oe.find("thead").show(),ge({fitWidth:!E})),Object.keys(g).length&&Object.assign(ie.attachTmbs,g),b&&(r||Oe.data("selectable")||Oe.selectable(le).data("selectable",!0),de(!0)),!se&&je.trigger(re)};ie.renderd||(ie.rendering=!0,je.scrollTop(0),i=t.cwd().phash,p(),n.oldSchool&&i&&!z&&pe(i),s&&(E&&ve(),ge({fitWidth:!0})),ie.itemH=(s?o.find("tr:first"):o.find("[id]:first")).outerHeight(!0),t.trigger("cwdrender"),ie.rendering=!1),!ie.rendering&&ne.length?(a=je.height()+je.scrollTop()+t.options.showThreshold+ie.row-ie.renderd*ie.hpi)>0&&(ie.rendering=!0,t.lazy(function(){p(a),ie.rendering=!1})):Ue()}},fe=null,me=t.UA.CSS.positionSticky&&t.UA.CSS.widthMaxContent,ge=function(i){if(n.listView.fixedHeader){var a,o,r,s,l,c,d,p,u,h,f,m,g,v=function(){var e,n;n="ltr"===t.direction?"left":"right",e=("ltr"===t.direction?je.scrollLeft():r.outerWidth(!0)-je.width()-je.scrollLeft())*-1,o.css(n)!==e&&o.css(n,e)},b=i||{};if(l=Oe.find("tbody"),p=l.children("tr:first"),p.length&&p.is(":visible")){if(r=l.parent(),fe?(s=e("#"+t.namespace+"-cwd-thead"),d=s.children("tr:first")):(g=!0,l.addClass("elfinder-cwd-fixheader"),s=Oe.find("thead").attr("id",t.namespace+"-cwd-thead"),d=s.children("tr:first"),c=d.outerHeight(!0),Oe.css("margin-top",c-parseInt(r.css("padding-top"))),me?(fe=e('').addClass(Oe.attr("class")).append(e("").append(s)),Oe.after(fe),je.on("resize.fixheader",function(e){e.stopPropagation(),ge({fitWidth:!0})})):(o=e("").addClass(Oe.attr("class")).append(e("").append(s)),fe=e("").addClass(je.attr("class")+" elfinder-cwd-fixheader").removeClass("ui-droppable native-droppable").css(je.position()).css({height:c,width:Oe.outerWidth()}).append(o),"rtl"===t.direction&&fe.css("left",je.data("width")-je.width()+"px"),v(),je.after(fe).on("scroll.fixheader resize.fixheader",function(e){v(),"resize"===e.type&&(e.stopPropagation(),fe.css(je.position()),je.data("width",je.css("overflow","hidden").width()),je.css("overflow","auto"),ge())}))),g||b.fitWidth||Math.abs(p.outerWidth()-d.outerWidth())>2){a=O.length+1;for(var y=0;y").on("load",function(){t.find(".elfinder-cwd-icon").addClass(n.className).css("background-image","url('"+n.url+"')")}).attr("src",n.url)},o=function(n,o){var r,s,l=e("#"+t.cwdHash2Id(n));l.length&&("1"!=o?(r=t.file(n),r.tmb!==o&&(r.tmb=o),s=t.tmb(r),i?l.find(".elfinder-cwd-icon").addClass(s.className).css("background-image","url('"+s.url+"')"):a(l,s),delete ie.attachTmbs[n]):i?xe([n]):ie.tmbLoading[n]||ie.getTmbs.push(n))};e.isPlainObject(n)&&Object.keys(n).length&&(Object.assign(ie.attachTmbs,n),e.each(n,o),i||!ie.getTmbs.length||Object.keys(ie.tmbLoading).length||xe())},xe=function(n){var i=[],a=!1;return t.oldAPI?void t.request({data:{cmd:"tmb",current:t.cwd().hash},preventFail:!0}).done(function(e){e.images&&Object.keys(e.images).length&&we(e.images),e.tmb&&xe()}):(n?(a=!0,i=n.splice(0,C)):i=ie.getTmbs.splice(0,C),void(i.length&&(a||ce[i[0]]||ce[i[i.length-1]])&&(e.each(i,function(e,t){ie.tmbLoading[t]=!0}),t.request({data:{cmd:"tmb",targets:i},preventFail:!0}).done(function(t){var o,r=[];t.images&&((o=Object.keys(t.images).length)?(o");if(u>ue)Se(),V=t.arrayFlip(e.map(n,function(e){return e.hash}),!0),ee();else{for(u&&Pe.removeClass("elfinder-cwd-wrapper-empty");u--;)a=n[u],o=a.hash,e("#"+t.cwdHash2Id(o)).length||((l=f(a))&&!l.length&&(l=null),!l&&(d=m(a))>=0?ne.splice(d,0,a):(v.empty().append(W(a)),"directory"===a.mime&&!r&&ye(v),c=g?v:v.children(),l?l.before(c):p.append(c)),e("#"+t.cwdHash2Id(o)).length&&a.tmb&&(h[o]=a.tmb));s&&(ve(),ge({fitWidth:!E})),Ae(p),Object.keys(h).length&&Object.assign(ie.attachTmbs,h)}},Ce=function(n){var i,a,o,r,l=n.length,c=t.searchStatus.state>1,d=t.getCommand(t.currentReqCmd)||{};if(!t.cwd().hash&&!d.noChangeDirOnRemovedCwd)return e.each(A.reverse(),function(e,n){if(t.file(n))return r=!0,t.one(t.currentReqCmd+"done",function(){!t.cwd().hash&&t.exec("open",n)}),!1}),void(!r&&!t.cwd().hash&&t.exec("open",t.roots[Object.keys(t.roots)[0]]));for(;l--;){if(i=n[l],(a=e("#"+t.cwdHash2Id(i))).length)try{a.remove(),--ie.renderd}catch(p){t.debug("error",p)}else(o=ae(i))!==-1&&ne.splice(o,1);V[i]&&delete V[i],c&&(o=e.inArray(i,I))!==-1&&I.splice(o,1)}c&&t.trigger("cwdhasheschange",I),s&&(ve(),ge({fitWidth:!E}))},ze=function(){for(var e="",n="",i=0;i'+e+"";return n},Te=function(e){var t,n;e.height||(t=s?Oe.find("tbody"):Oe,n=t.find(s?"tr:first":"[id]:first"),e.height=n.outerHeight(!0),s||(e.width=n.outerWidth(!0)))},Ae=function(e,n){var i,e=e||(s?Oe.find("tbody"):Oe),a=qe[t.viewType],o=1;ne.length>0&&(ie.hpi?s||(o=Math.floor(e.width()/a.width)):(Te(a),s?ie.row=ie.hpi=a.height:(o=Math.floor(e.width()/a.width),ie.row=a.height,ie.hpi=ie.row/o)),i=Math.ceil((ne.length+(n||0))/o),s&&fe&&++i,Fe.css({top:ie.row*i+"px"}).show())},Ie={contextmenu:function(e){return e.preventDefault(),void 0!==Oe.data("longtap")?void e.stopPropagation():void t.trigger("contextmenu",{type:"cwd",targets:[t.cwd().hash],x:e.pageX,y:e.pageY})},touchstart:function(e){e.originalEvent.touches.length>1||(Oe.data("longtap")!==!1&&(je.data("touching",{x:e.originalEvent.touches[0].pageX,y:e.originalEvent.touches[0].pageY}),Oe.data("tmlongtap",setTimeout(function(){Oe.data("longtap",!0),t.trigger("contextmenu",{type:"cwd",targets:[t.cwd().hash],x:je.data("touching").x,y:je.data("touching").y})},500))),Oe.data("longtap",null))},touchend:function(e){"touchmove"===e.type?(!je.data("touching")||Math.abs(je.data("touching").x-e.originalEvent.touches[0].pageX)+Math.abs(je.data("touching").y-e.originalEvent.touches[0].pageY)>4)&&je.data("touching",null):requestAnimationFrame(function(){Oe.removeData("longtap")}),clearTimeout(Oe.data("tmlongtap"))},click:function(e){Oe.data("longtap")&&(e.preventDefault(),e.stopPropagation())}},Se=function(){t.lazy(function(){var n;Pe.append(De).removeClass("elfinder-cwd-wrapper-empty elfinder-search-result elfinder-incsearch-result elfinder-letsearch-result"),(t.searchStatus.state>1||t.searchStatus.ininc)&&Pe.addClass("elfinder-search-result"+(t.searchStatus.ininc?" elfinder-"+("/"===z.substr(0,1)?"let":"inc")+"search-result":"")),ie.attachThumbJob&&ie.attachThumbJob._abort(),Oe.data("selectable")&&Oe.selectable("disable").selectable("destroy").removeData("selectable"),t.trigger("cwdinit"),B=e();try{Oe.empty()}catch(i){Oe.html("")}fe&&(je.off("scroll.fixheader resize.fixheader"),fe.remove(),fe=null),Oe.removeClass("elfinder-cwd-view-icons elfinder-cwd-view-list").addClass("elfinder-cwd-view-"+(s?"list":"icons")).attr("style","").css("height","auto"),Fe.hide(),je[s?"addClass":"removeClass"]("elfinder-cwd-wrapper-list")._padding=parseInt(je.css("padding-top"))+parseInt(je.css("padding-bottom")),t.UA.iOS&&je.removeClass("overflow-scrolling-touch").addClass("overflow-scrolling-touch"),s&&(Oe.html(""),n=e('| '+t.getColumnName("name")+" | "+ze()+"
"),Oe.find("thead").hide().append(n.on("contextmenu."+t.namespace,Ie.contextmenu).on("touchstart."+t.namespace,"td",Ie.touchstart).on("touchmove."+t.namespace+" touchend."+t.namespace+" mouseup."+t.namespace,"td",Ie.touchend).on("click."+t.namespace,"td",Ie.click)).find("td:first").append(De),e.fn.sortable&&n.addClass("touch-punch touch-punch-keep-default").sortable({axis:"x",distance:8,items:"> .sortable-item",start:function(t,n){e(n.item[0]).data("dragging",!0),n.placeholder.width(n.helper.removeClass("ui-state-hover").width()).removeClass("ui-state-active").addClass("ui-state-hover").css("visibility","visible")},update:function(n,i){var a,o,r=e(i.item[0]).attr("class").split(" ")[0].replace("elfinder-cwd-view-th-","");O=e.map(e(this).children(),function(t){var n=e(t).attr("class").split(" ")[0].replace("elfinder-cwd-view-th-","");return o||(r===n?o=!0:a=n),"name"===n?null:n}),P.row=D(),t.storage("cwdCols",O),a=".elfinder-col-"+a+":first",r=".elfinder-col-"+r+":first",t.lazy(function(){Oe.find("tbody tr").each(function(){var t=e(this);t.children(a).after(t.children(r))})})},stop:function(t,n){setTimeout(function(){e(n.item[0]).removeData("dragging")},100)}}),n.find("td").addClass("touch-punch").resizable({handles:"ltr"===t.direction?"e":"w",start:function(t,n){var i=Oe.find("td.elfinder-col-"+n.element.attr("class").split(" ")[0].replace("elfinder-cwd-view-th-","")+":first");n.element.data("dragging",!0).data("resizeTarget",i).data("targetWidth",i.width()),U=!0,"fixed"!==Oe.find("table").css("table-layout")&&(Oe.find("tbody tr:first td").each(function(){e(this).width(e(this).width())}),Oe.find("table").css("table-layout","fixed"))},resize:function(e,t){t.element.data("resizeTarget").width(t.element.data("targetWidth")-(t.originalSize.width-t.size.width))},stop:function(n,i){U=!1,ge({fitWidth:!0}),E={},Oe.find("tbody tr:first td").each(function(){var t=e(this).attr("class").split(" ")[0].replace("elfinder-col-","");E[t]=e(this).width()}),t.storage("cwdColWidth",E),setTimeout(function(){i.element.removeData("dragging")},100)}}).find(".ui-resizable-handle").addClass("ui-icon ui-icon-grip-dotted-vertical")),ne=e.map(S||I,function(e){return t.file(e)||null}),ne=t.sortFiles(ne),S?S=e.map(ne,function(e){return e.hash}):I=e.map(ne,function(e){return e.hash}),ie={renderd:0,attachTmbs:{},getTmbs:[],tmbLoading:{},lazyOpts:{tm:0}},Pe[ne.length<1?"addClass":"removeClass"]("elfinder-cwd-wrapper-empty"),je.off(re,he).on(re,he).trigger(re),t.cwd().write?(je[t.isCommandEnabled("upload")?"addClass":"removeClass"]("native-droppable"),je.droppable(t.isCommandEnabled("paste")?"enable":"disable")):je.removeClass("native-droppable").droppable("disable").removeClass("ui-state-disabled")})},Oe=e(this).addClass("ui-helper-clearfix elfinder-cwd").attr("unselectable","on").on("click."+t.namespace,f,function(n){var i,a,o,r,s,d=this.id?e(this):e(this).parents("[id]:first"),p=e(n.target);if(M&&(p.is("input:checkbox")||p.hasClass("elfinder-cwd-select")))return n.stopPropagation(),n.preventDefault(),d.trigger(d.hasClass(m)?c:l),ee(),void requestAnimationFrame(function(){p.prop("checked",d.hasClass(m))});if(Oe.data("longtap"))return void n.stopPropagation();if(j||(j=d.attr("id"),setTimeout(function(){j=""},500)),n.shiftKey&&(i=d.prevAll(Z||"."+m+":first"),a=d.nextAll(Z||"."+m+":first"),o=i.length,r=a.length),n.shiftKey&&(o||r))s=o?d.prevUntil("#"+i.attr("id")):d.nextUntil("#"+a.attr("id")),s.add(d).trigger(l);else if(n.ctrlKey||n.metaKey)d.trigger(d.hasClass(m)?c:l);else{if(je.data("touching")&&d.hasClass(m))return je.data("touching",null),void t.dblclick({file:t.cwdId2Hash(this.id)});Y({notrigger:!0}),d.trigger(l)}ee()}).on("dblclick."+t.namespace,f,function(n){if(j){var i=t.cwdId2Hash(j);n.stopPropagation(),this.id!==j&&(e(this).trigger(c),e("#"+j).trigger(l),ee()),t.dblclick({file:i})}}).on("touchstart."+t.namespace,f,function(n){if(!(n.originalEvent.touches.length>1)){var i,a=this.id?e(this):e(this).parents("[id]:first"),o=e(n.target),r=n.target.nodeName;if("INPUT"===r&&"text"===n.target.type||"TEXTAREA"===r)return void n.stopPropagation();if(a.find("input:text,textarea").length)return n.stopPropagation(),void n.preventDefault();je.data("touching",{x:n.originalEvent.touches[0].pageX,y:n.originalEvent.touches[0].pageY}),M&&(o.is("input:checkbox")||o.hasClass("elfinder-cwd-select"))||(i=a.prevAll("."+m+":first").length+a.nextAll("."+m+":first").length,Oe.data("longtap",null),(Object.keys(V).length||s&&"TD"!==n.target.nodeName||!s&&this!==n.target)&&(Oe.data("longtap",!1),a.addClass(y),a.data("tmlongtap",setTimeout(function(){Oe.data("longtap",!0),a.trigger(l),ee(),t.trigger("contextmenu",{type:"files",targets:t.selected(),x:n.originalEvent.touches[0].pageX,y:n.originalEvent.touches[0].pageY})},500))))}}).on("touchmove."+t.namespace+" touchend."+t.namespace,f,function(n){var i,a=e(n.target);if(!M||!a.is("input:checkbox")&&!a.hasClass("elfinder-cwd-select")){if("INPUT"==n.target.nodeName||"TEXTAREA"==n.target.nodeName)return void n.stopPropagation();i=this.id?e(this):e(this).parents("[id]:first"),clearTimeout(i.data("tmlongtap")),"touchmove"===n.type?(je.data("touching",null),i.removeClass(y)):(je.data("touching")&&!Oe.data("longtap")&&i.hasClass(m)&&(n.preventDefault(),je.data("touching",null),t.dblclick({file:t.cwdId2Hash(this.id)})),requestAnimationFrame(function(){Oe.removeData("longtap")}))}}).on("mouseenter."+t.namespace,f,function(n){if(!se){var i=e(this),a=null,o=s?i:i.children("div.elfinder-cwd-file-wrapper,div.elfinder-cwd-filename");if(!(r||i.data("dragRegisted")||i.hasClass(k)||o.hasClass(v)||o.hasClass(g))){
diff --git a/php/elFinder.class.php b/php/elFinder.class.php
index 5fac17cd9..ae176515e 100644
--- a/php/elFinder.class.php
+++ b/php/elFinder.class.php
@@ -31,7 +31,7 @@ class elFinder {
*
* @var integer
*/
- protected static $ApiRevision = 37;
+ protected static $ApiRevision = 38;
/**
* Storages (root dirs)