芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/cloud.pulsehost.co.uk/static/js/1762.app.2705c658b1f51a52f463.min.js
"use strict";(self.webpackChunkafterlogic_aurora_platform=self.webpackChunkafterlogic_aurora_platform||[]).push([[1762],{"17yT":(e,t,s)=>{var i=s("a7T2"),o=s("M4cL"),n=s("p09A"),r=s("sdEb"),a=s("9kOp"),l=s("teN/"),h=s("H20a"),d=s("KC/L"),c=s("Tt1R"),u=s("REt5"),p=s("mGms"),m=["image/jpeg","image/jpg","image/png","image/gif","text/html","text/plain","text/css","text/rfc822-headers","message/delivery-status","application/x-httpd-php","application/javascript"],g=[];function f(){this.id=n.observable(""),this.index=n.observable(0),this.fileName=n.observable(""),this.tempName=n.observable(""),this.extension=n.observable(""),this.fileName.subscribe((function(e){this.id(e),this.extension(u.getFileExtension(e))}),this),this.displayName=n.computed((function(){return this.fileName()}),this),this.size=n.observable(0),this.friendlySize=n.computed((function(){return this.size()>0?h.getFriendlySize(this.size()):""}),this),this.hash=n.observable(""),this.thumbUrlInQueue=n.observable(""),this.thumbUrlInQueueSubscribtion=this.thumbUrlInQueue.subscribe((function(){this.getInThumbQueue()}),this),this.thumbnailSrc=n.observable(""),this.thumbnailLoaded=n.observable(!1),this.mimeType=n.observable(""),this.uploadUid=n.observable(""),this.uploaded=n.observable(!1),this.uploadError=n.observable(!1),this.downloading=n.observable(!1),this.bHasHtmlEmbed=!1,this.otherTemplates=n.observableArray([]),this.visibleCancelButton=n.observable(!0),this.cancelButtonTooltip=h.i18n("COREWEBCLIENT/ACTION_CANCEL"),this.statusText=n.observable(""),this.statusTooltip=n.computed((function(){return this.uploadError()?this.statusText():""}),this),this.progressPercent=n.observable(0),this.visibleProgress=n.observable(!1),this.uploadStarted=n.observable(!1),this.uploadStarted.subscribe((function(){this.uploadStarted()?(this.uploaded(!1),this.visibleProgress(!0),this.progressPercent(20)):(this.progressPercent(100),this.visibleProgress(!1),this.uploaded(!0))}),this),this.downloading.subscribe((function(){this.downloading()?this.visibleProgress(!0):(this.visibleProgress(!1),this.progressPercent(0))}),this),this.allowDrag=n.observable(!1),this.allowUpload=n.observable(!1),this.allowPublicLink=n.observable(!1),this.bIsSecure=n.observable(!1),this.sHeaderText="",this.oActionsData={view:{Text:h.i18n("COREWEBCLIENT/ACTION_VIEW_FILE"),HandlerName:"viewFile"},download:{Text:h.i18n("COREWEBCLIENT/ACTION_DOWNLOAD_FILE"),HandlerName:"downloadFile",Tooltip:n.computed((function(){var e=h.i18n("COREWEBCLIENT/INFO_CLICK_TO_DOWNLOAD_FILE",{FILENAME:this.fileName(),SIZE:this.friendlySize()});return""===this.friendlySize()&&(e=e.replace(" ()","")),e}),this)}},this.allowActions=n.observable(!0),this.iconAction=n.observable("download"),this.cssClasses=n.computed((function(){return this.getCommonClasses().join(" ")}),this),this.actions=n.observableArray([]),this.firstAction=n.computed((function(){return this.actions().length>1?this.actions()[0]:""}),this),this.secondAction=n.computed((function(){return 1===this.actions().length?this.actions()[0]:this.actions().length>1?this.actions()[1]:""}),this),this.subFiles=n.observableArray([]),this.subFilesExpanded=n.observable(!1),this.sUploadSubFolder="",this.bIsHidden=!1}o("html").hasClass("pdf")&&(m.push("application/pdf"),m.push("application/x-pdf")),f.prototype.addAction=function(e,t,s){t?this.actions.unshift(e):this.actions.push(e),this.actions(i.compact(this.actions())),s&&(this.oActionsData[e]=s)},f.prototype.removeAction=function(e){this.actions(i.without(this.actions(),e))},f.prototype.getMainAction=function(){return this.actions()[0]},f.prototype.hasAction=function(e){return-1!==i.indexOf(this.actions(),e)},f.prototype.getActionText=function(e){return this.hasAction(e)&&this.oActionsData[e]&&("string"==typeof this.oActionsData[e].Text||i.isFunction(this.oActionsData[e].Text))?i.isFunction(this.oActionsData[e].Text)?this.oActionsData[e].Text():this.oActionsData[e].Text:""},f.prototype.getActionUrl=function(e){return this.hasAction(e)&&this.oActionsData[e]&&this.oActionsData[e].Url||""},f.prototype.executeAction=function(e){var t=this.hasAction(e)&&this.oActionsData[e];t&&(i.isFunction(t.Handler)?t.Handler():"string"==typeof t.HandlerName&&i.isFunction(this[t.HandlerName])&&this[t.HandlerName]())},f.prototype.getTooltip=function(e){var t=this.hasAction(e)&&this.oActionsData[e]?this.oActionsData[e].Tooltip:"";return"string"==typeof t?t:i.isFunction(t)?t():""},f.prototype.getCommonClasses=function(){var e=[];return(this.allowUpload()&&!this.uploaded()||this.downloading())&&e.push("incomplete"),this.uploadError()?e.push("fail"):e.push("success"),e},f.prototype.parse=function(e){this.fileName(d.pString(e.FileName)),this.tempName(d.pString(e.TempName)),""===this.tempName()&&this.tempName(this.fileName()),this.mimeType(d.pString(e.MimeType)),this.size(e.EstimatedSize?d.pInt(e.EstimatedSize):d.pInt(e.SizeInBytes)),this.hash(d.pString(e.Hash)),this.parseActions(e),this.uploadUid(this.hash()),this.uploaded(!0),i.isFunction(this.additionalParse)&&this.additionalParse(e)},f.prototype.parseActions=function(e){this.thumbUrlInQueue(""!==d.pString(e.ThumbnailUrl)?d.pString(e.ThumbnailUrl)+"/"+Math.random():""),this.commonParseActions(e),this.commonExcludeActions()},f.prototype.commonExcludeActions=function(){this.isViewSupported()||this.removeAction("view")},f.prototype.commonParseActions=function(e){i.each(e.Actions,(function(e,t){this.oActionsData[t]||(this.oActionsData[t]={}),this.oActionsData[t].Url=d.pString(e.url),this.actions.push(t)}),this)},f.addViewExtensions=function(e){i.isArray(e)&&(g=i.union(g,e))},f.prototype.isViewSupported=function(){return-1!==o.inArray(this.mimeType(),m)||-1!==o.inArray(d.pString(this.extension()).toLowerCase(),g)},f.prototype.getInThumbQueue=function(){""===this.thumbUrlInQueue()||this.linked&&(!this.linked||this.linked())||l.thumbQueue(this.thumbUrlInQueue(),this.thumbnailSrc)},f.prototype.downloadFile=function(e){var t=this.getActionUrl("download"),s={File:this,CancelDownload:!1};t.length>0&&"#"!==t&&(e||a.broadcastEvent("AbstractFileModel::FileDownload::before",s),s.CancelDownload||(i.isFunction(s.CustomDownloadHandler)?s.CustomDownloadHandler():(t+="/"+r().unix(),c.downloadByUrl(t,"eml"===this.extension()))))},f.prototype.viewFile=function(e,t){u.calmEvent(t),this.viewCommonFile()},f.prototype.viewCommonFile=function(e){var t=null,s=null;d.isNonEmptyString(e)||(e=c.getAppPath()+this.getActionUrl("view")),e.length>0&&"#"!==e&&(s={sUrl:e+="/"+r().unix(),index:this.index(),hash:this.hash(),continueView:!0},a.broadcastEvent("AbstractFileModel::FileView::before",s),s.continueView&&(t=p.open(s.sUrl,s.sUrl,!1))&&t.focus())},f.prototype.eventDragStart=function(e,t){var s=t.originalEvent||t;return e&&s&&s.dataTransfer&&s.dataTransfer.setData&&s.dataTransfer.setData("DownloadURL",this.generateTransferDownloadUrl()),!0},f.prototype.generateTransferDownloadUrl=function(){var e=this.getActionUrl("download");return"http"!==e.substr(0,4)&&(e=c.getAppPath()+e),this.mimeType()+":"+this.fileName()+":"+e},f.prototype.onUploadSelect=function(e,t,s){s||(this.fileName(d.pString(t.FileName)),this.mimeType(d.pString(t.Type)),this.size(d.pInt(t.Size))),this.uploadUid(e),this.uploaded(!1),this.statusText(""),this.progressPercent(0),this.visibleProgress(!1),this.sUploadSubFolder=d.pString(t.Folder),this.bIsHidden=""!==this.sUploadSubFolder},f.prototype.onUploadStart=function(){this.visibleProgress(!0)},f.prototype.onUploadProgress=function(e,t){t>0&&(this.progressPercent(Math.ceil(e/t*100)),this.visibleProgress(!0))},f.prototype.onDownloadProgress=function(e,t){t>0&&(this.progressPercent(Math.ceil(e/t*100)),this.visibleProgress(this.progressPercent()<100))},f.prototype.onUploadComplete=function(e,t,s){var i=!(t&&s&&!s.ErrorCode&&s.Result&&!s.Result.Error),o=s&&s.ErrorCode&&s.ErrorCode===Enums.Errors.CanNotUploadFileLimit?h.i18n("COREWEBCLIENT/ERROR_UPLOAD_SIZE"):h.i18n("COREWEBCLIENT/ERROR_UPLOAD_UNKNOWN");this.progressPercent(0),this.visibleProgress(!1),this.uploaded(!0),this.uploadError(i),this.statusText(i?o:h.i18n("COREWEBCLIENT/REPORT_UPLOAD_COMPLETE")),i||(this.fillDataAfterUploadComplete(s,e),setTimeout(function(e){return function(){e.statusText("")}}(this),3e3))},f.prototype.fillDataAfterUploadComplete=function(e,t){},f.prototype.onImageLoad=function(e,t){""===this.thumbUrlInQueue()||this.thumbnailLoaded()||(this.thumbnailLoaded(!0),l.thumbQueue(this.thumbUrlInQueue()))},f.prototype.stopDownloading=function(){this.downloading(!1)},f.prototype.startDownloading=function(){this.downloading(!0)},e.exports=f},a6uM:(e,t,s)=>{var i=s("a7T2"),o=s("vsHO");function n(){this.aCollection=[]}n.prototype.parse=function(e){var t=e?e["@Collection"]:[];this.aCollection=[],i.isArray(t)&&(this.aCollection=i.map(t,(function(e){var t=new o;return t.parse(e),t})))},n.prototype.addCollection=function(e){i.each(e,(function(e){i.find(this.aCollection,(function(t){return e.sEmail===t.sEmail}))||this.aCollection.push(e)}),this)},n.prototype.excludeCollection=function(e){i.each(e,(function(e){this.aCollection=i.filter(this.aCollection,(function(t){return e.sEmail.toLowerCase()!==t.sEmail.toLowerCase()}))}),this)},n.prototype.getFirstEmail=function(){return this.aCollection.length>0?this.aCollection[0].getEmail():""},n.prototype.getFirstName=function(){return this.aCollection.length>0?this.aCollection[0].getName():""},n.prototype.getFirstDisplay=function(){return this.aCollection.length>0?this.aCollection[0].getDisplay():""},n.prototype.getDisplay=function(e,t){return i.map(this.aCollection,(function(s){return e&&t===s.sEmail?e:s.getDisplay(e)})).join(", ")},n.prototype.getFull=function(){return i.map(this.aCollection,(function(e){return e.getFull()})).join(", ")},n.prototype.getEmails=function(){return i.map(this.aCollection,(function(e){return e.getEmail()}))},e.exports=n},vsHO:(e,t,s)=>{var i=s("p09A"),o=s("kG5I"),n=s("KC/L");function r(){this.sName="",this.sEmail="",this.sDisplay="",this.sFull="",this.loaded=i.observable(!1),this.found=i.observable(!1)}r.prototype.parse=function(e){null!==e&&(this.sName=n.pString(e.DisplayName),this.sEmail=n.pString(e.Email),this.sDisplay=this.sName.length>0?this.sName:this.sEmail,this.sFull=o.getFullEmail(this.sName,this.sEmail))},r.prototype.getEmail=function(){return this.sEmail},r.prototype.getName=function(){return this.sName},r.prototype.getDisplay=function(){return this.sDisplay},r.prototype.getFull=function(){return this.sFull},e.exports=r},H2Cq:(e,t,s)=>{const i=s("a7T2"),o={setCursorAtTheEnd:function(e){if(document.createRange){const t=document.createRange();t.selectNodeContents(e),t.collapse(!1);const s=window.getSelection();s.removeAllRanges(),s.addRange(t),e.focus(),t.detach()}},getSelectionRanges:function(){const e=[];if(window.getSelection){const t=window.getSelection(),s=t.rangeCount;for(let i=0;i
{var i,o,n=s("H20a"),r=s("oUN1"),a=s("hT1I"),l=s("OfVV"),h={getDownloadLink:function(e,t,s){return t.length>0?"?/Download/"+e+"/DownloadFile/"+t+"/"+(s?"0/"+s:""):""},getIframeWrappwer:function(e,t){return"?/Raw/Iframe/"+e+"/"+window.encodeURIComponent(t)+"/"}};h.thumbQueue=(i={},o={},function(e,t){t?!(e in o)||o[e]>0?(e in o||(o[e]=2,i[e]=[]),o[e]--,t(e)):i[e].push({imageSrc:e,imageSrcObserver:t}):i[e]&&i[e].length&&(i[e][0].imageSrcObserver(i[e][0].imageSrc),i[e].shift())}),h.showErrorIfAttachmentSizeLimit=function(e,t){var s=n.i18n("COREWEBCLIENT/ERROR_UPLOAD_SIZE_DETAILED",{FILENAME:e,MAXSIZE:n.getFriendlySize(l.AttachmentSizeLimit)});return l.AttachmentSizeLimit>0&&t>l.AttachmentSizeLimit&&(r.showPopup(a,[s]),!0)},e.exports=h},"7xgn":(e,t,s)=>{var i=s("a7T2"),o=s("p09A"),n=s("KC/L"),r=s("9kOp").isNewTab()&&window.opener?window.opener.MainTabMailMethods:null,a=s("W66n"),l=s("EFhx"),h=s("QaEg"),d=s("CPab"),c=s("oFXy"),u=s("FSu3"),p=s("P7A8"),m=s("U1iB"),g=s("ce4k");function f(){this.collection=o.observableArray([]),this.unifiedMailboxAccounts=o.computed((function(){return c.AllowUnifiedInbox?i.filter(this.collection(),(function(e){return e.includeInUnifiedMailbox()})):[]}),this),this.unifiedInboxAllowed=o.computed((function(){return this.unifiedMailboxAccounts().length>1}),this),this.unifiedInboxReady=o.observable(!1)}f.prototype.getAccountByHash=function(e){return i.find(this.collection(),(function(t){return t.hash()===e}),this)},f.prototype.changeCurrentAccountByHash=function(e){var t=this.getAccountByHash(e);t&&t.id()!==this.currentId()&&this.changeCurrentAccount(t.id(),!1)},f.prototype.changeCurrentAccount=function(e,t){var s=this.getCurrent(),i=this.getAccount(e);i&&this.currentId()!==e?(s&&s.isCurrent(!1),this.currentId(e),i.isCurrent(!0)):s||this.currentId(0),t&&a.setHash(d.getMailbox())},f.prototype.changeEditedAccountByHash=function(e){var t=this.getAccountByHash(e);t&&t.id()!==this.editedId()&&this.changeEditedAccount(t.id())},f.prototype.changeEditedAccount=function(e){var t=this.getEdited(),s=this.getAccount(e);s&&this.editedId()!==e?(t&&t.isEdited(!1),this.editedId(e),s.isEdited(!0)):t||this.editedId(0)},f.prototype.getDefaultFriendlyName=function(){var e=this.getCurrent(),t=i.find(e&&e.identities()||[],(function(e){return e.isDefault()}))||e;return t?t.friendlyName()||t.email():""},f.prototype.getIdentityByHash=function(e){var t=null;return i.each(this.collection(),(function(s){t||(t=i.find(s.identities()||[],(function(t){return t.hash()===e})))}),this),t},f.prototype.getFetcherByHash=function(e){var t=null;return i.each(this.collection(),(function(s){t||(t=i.find(s.fetchers(),(function(t){return t.hash()===e})))}),this),t},f.prototype.getAliasByHash=function(e){var t=null;return i.each(this.collection(),(function(s){t||(t=i.find(s.aliases()||[],(function(t){return t.hash()===e})))}),this),t},f.prototype.parse=function(e){i.isArray(e)&&(this.collection(i.map(e,(function(e){return new u(e)}))),this.initObservables(this.collection().length>0?this.collection()[0].id():0))},f.prototype.initObservables=function(e){var t=this.getAccount(e);t&&(t.isCurrent(!0),t.isEdited(!0)),this.currentId=o.observable(e),this.editedId=o.observable(e)},f.prototype.hasAccount=function(){return this.collection().length>0},f.prototype.getAccount=function(e){return i.find(this.collection(),(function(t){return t.id()===e}),this)},f.prototype.getDefault=function(){return i.find(this.collection(),(function(e){return e.bDefault}),this)},f.prototype.getCurrent=function(){return this.getAccount(this.currentId())},f.prototype.getEdited=function(){return this.getAccount(this.editedId())},f.prototype.getEmail=function(e){e=e||this.currentId();var t="",s=this.getAccount(e);return s&&(t=s.email()),t},f.prototype.addAccount=function(e){this.collection.push(e)},f.prototype.deleteAccount=function(e){this.collection.remove((function(t){return t.id()===e}));var t=this.collection().length>0?this.collection()[0].id():0;this.changeCurrentAccount(t,!1),this.changeEditedAccount(t)},f.prototype.hasAccountWithId=function(e){return!!i.find(this.collection(),(function(t){return t.id()===e}),this)},f.prototype.populateFetchersIdentities=function(){this.populateFetchers(),this.populateIdentities(),this.populateAliases()},f.prototype.populateFetchers=function(){c.AllowFetchers&&l.send(c.FetchersServerModuleName,"GetFetchers",{AccountID:this.editedId()},this.onGetFetchersResponse,this)},f.prototype.populateAliases=function(e){c.AllowAliases&&l.send(c.AliasesServerModuleName,"GetAliases",{AccountID:this.editedId()},(function(t,s){this.onGetAliasesResponse(t,s),i.isFunction(e)&&e()}),this)},f.prototype.onGetFetchersResponse=function(e,t){var s={};n.isNonEmptyArray(e.Result)&&i.each(e.Result,(function(e){var t=new p;t.parse(e),s[t.accountId()]||(s[t.accountId()]=[]),s[t.accountId()].push(t)})),i.each(this.collection(),(function(e){var t=n.isNonEmptyArray(s[e.id()])?s[e.id()]:[];e.fetchers(t)}),this)},f.prototype.onGetAliasesResponse=function(e,t){var s={};e.Result&&n.isNonEmptyArray(e.Result.ObjAliases)&&i.each(e.Result.ObjAliases,(function(e){var t=new m;t.parse(e),s[t.accountId()]||(s[t.accountId()]=[]),s[t.accountId()].push(t)})),i.each(this.collection(),(function(e){var t=n.isNonEmptyArray(s[e.id()])?s[e.id()]:[];e.aliases(t)}),this)},f.prototype.populateIdentities=function(e){c.AllowIdentities&&this.collection().length>=1&&h.send("GetIdentities",null,(function(t,s){this.onGetIdentitiesResponse(t,s),i.isFunction(e)&&e()}),this)},f.prototype.onGetIdentitiesResponse=function(e,t){var s={};n.isNonEmptyArray(e.Result)&&i.each(e.Result,(function(e){var t,i=new g;i.parse(e),t=i.accountId(),s[t]||(s[t]=[]),s[t].push(i)})),i.each(this.collection(),(function(e){var t=s[e.id()],o=new g;e.bAllowUseIdentities&&n.isNonEmptyArray(t)||(t=[]),o.parse({AccountPart:!0,Default:!i.find(t,(function(e){return e.isDefault()})),Email:e.email(),FriendlyName:e.friendlyName(),IdAccount:e.id(),EntityId:0,Signature:e.signature(),UseSignature:e.useSignature()}),t.unshift(o),e.identities(t)}))},f.prototype.populateIdentitiesFromSourceAccount=function(e){e&&i.each(this.collection(),(function(t){var s=e.getAccount(t.id());s&&(t.fetchers(s.fetchers()),t.identities(s.identities()),t.signature(s.signature()),t.useSignature(s.useSignature()))}))},f.prototype.getAccountsEmails=function(){return i.uniq(i.map(this.collection(),(function(e){return e.email()})))},f.prototype.getAllFullEmails=function(){var e=[];return i.each(this.collection(),(function(t){t&&(n.isNonEmptyArray(t.identities())?i.each(t.identities(),(function(t){e.push(t.fullEmail())})):e.push(t.fullEmail()),i.each(t.fetchers(),(function(t){t.isEnabled()&&t.isOutgoingEnabled()&&""!==t.fullEmail()&&e.push(t.fullEmail())})))})),e},f.prototype.getCurrentFetchersAndFiltersFolderNames=function(){var e=this.getCurrent(),t=[];return e&&(e.filters()&&i.each(e.filters().collection(),(function(e){t.push(e.folder())}),this),i.each(e.fetchers(),(function(e){t.push(e.folder())}),this)),t},f.prototype.getAttendee=function(e){var t=[],s="";return i.each(this.collection(),(function(e){t=e.isCurrent()?i.union([e.email()],e.getFetchersIdentitiesEmails(),t):i.union(t,[e.email()],e.getFetchersIdentitiesEmails())})),t=i.uniq(t),i.each(t,i.bind((function(t){""===s&&i.find(e,(function(e){return e===t}))===t&&(s=t)}),this)),s};var b=new f;window.auroraAppData.Mail&&i.isArray(window.auroraAppData.Mail.Accounts)?b.parse(window.auroraAppData.Mail.Accounts):b.parse([]),r&&b.populateIdentitiesFromSourceAccount(r.getAccountList()),e.exports=b},QaEg:(e,t,s)=>{const i=s("a7T2"),o=s("H20a"),n=s("KC/L"),r=s("EFhx"),a=s("9kOp"),l=s("skxT"),h=s("oFXy");r.registerAbortRequestHandler(h.ServerModuleName,(function(e,t){var s=e.Parameters,i=t.Parameters;switch(e.Method){case"MoveMessages":case"DeleteMessages":return"GetRelevantFoldersInformation"===t.Method||"GetUnifiedRelevantFoldersInformation"===t.Method||"GetMessage"===t.Method||"GetUnifiedMailboxMessages"===t.Method||"GetMessagesByFolders"===t.Method||"GetMessages"===t.Method&&i.Folder===s.Folder;case"GetMessages":case"GetUnifiedMailboxMessages":return"GetUnifiedMailboxMessages"===t.Method||"GetMessagesByFolders"===t.Method||"GetMessages"===t.Method&&i.Folder===s.Folder;case"SetMessagesSeen":case"SetMessageFlagged":return"GetRelevantFoldersInformation"===t.Method||"GetUnifiedRelevantFoldersInformation"===t.Method||"GetUnifiedMailboxMessages"===t.Method||"GetMessagesByFolders"===t.Method||"GetMessages"===t.Method&&i.Folder===s.Folder;case"SetAllMessagesSeen":case"ClearFolder":return"GetRelevantFoldersInformation"===t.Method||"GetUnifiedRelevantFoldersInformation"===t.Method||"GetMessages"===t.Method&&i.Folder===s.Folder;case"GetRelevantFoldersInformation":return"GetRelevantFoldersInformation"===t.Method&&s.AccountID===i.AccountID||"GetUnifiedRelevantFoldersInformation"===t.Method;case"GetMessagesFlags":return"GetMessagesFlags"===t.Method}return!1})),e.exports={getOpenedRequest:function(e){r.getOpenedRequest("Mail",e)},hasOpenedRequests:function(e){return r.hasOpenedRequests("Mail",e||"")},hasInternetConnectionProblem:function(){return r.hasInternetConnectionProblem()},registerOnAllRequestsClosedHandler:r.registerOnAllRequestsClosedHandler,send:function(e,t,d,c){var u=s("F0Fd");t&&!t.AccountID&&"GetUnifiedMailboxMessages"!==e&&(t.AccountID=u.currentAccountId()),r.send(h.ServerModuleName,e,t,(function(e,t){if(!e.Result&&4002===e.ErrorCode&&a.getUserRole()!==Enums.UserRole.Anonymous){var r=s("7xgn"),h=e.ErrorMessage.split(":"),u=n.pInt(h.shift()),p=r.getAccount(u),m=h.join(":");if(p&&p.bDefault)e={Result:!1,ErrorCode:Enums.Errors.AuthError},a.logoutAndGotoLogin();else if(p){p.passwordMightBeIncorrect(!0);var g=o.i18n("MAILWEBCLIENT/ERROR_CREDENTIALS_INCORRECT",{EMAIL:p.email()});m&&(g+=" ("+m+")"),l.showError(g,!0),e={Result:!1,ErrorCode:Enums.Errors.NotDisplayedError}}}i.isFunction(d)&&d.apply(c,[e,t])}),null)}}},Qskt:(e,t,s)=>{const i=s("a7T2"),o=s("M4cL"),n=s("9kOp"),r=s("dfnr"),a=s("H2Cq"),l=s("KC/L"),h=s("/5GA");function d(e){this.oOptions=i.extend({creaId:"creaId",fontNameArray:["Tahoma"],defaultFontName:"Tahoma",defaultFontSize:3,alwaysTryUseImageWhilePasting:!0,dropableArea:null,isRtl:!1,onChange:function(){},onCursorMove:function(){},onFocus:function(){},onBlur:function(){},onUrlIn:function(){},onUrlOut:function(){},onImageSelect:function(){},onImageBlur:function(){},onItemOver:null,onItemOut:null,openInsertLinkDialog:function(){},onUrlClicked:!1},void 0===e?{}:e)}d.prototype.oOptions={},d.prototype.$container=null,d.prototype.$editableArea=null,d.prototype.aEditableAreaHtml=[],d.prototype.iUndoRedoPosition=0,d.prototype.bEditable=!1,d.prototype.bFocused=!1,d.prototype.aSizes=[{inNumber:1,inPixels:10},{inNumber:2,inPixels:13},{inNumber:3,inPixels:16},{inNumber:4,inPixels:18},{inNumber:5,inPixels:24},{inNumber:6,inPixels:32},{inNumber:7,inPixels:48}],d.prototype.bInUrl=!1,d.prototype.oCurrLink=null,d.prototype.oCurrImage=null,d.prototype.bInImage=!1,d.prototype.sBasicFontName="",d.prototype.sBasicFontSize="",d.prototype.sBasicDirection="",d.prototype.start=function(e){function t(e){return/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/.test(e)}function s(e){return!!e.match(/^[A-Z0-9\"!#\$%\^\{\}`~&'\+\-=_\.]+@[A-Z0-9\.\-]+$/i)}this.aRanges=null,this.$container=o("#"+this.oOptions.creaId),this.$editableArea=o("
").addClass("crea-content-editable").prop("contentEditable","true").appendTo(this.$container);var r=this;this.$editableArea.on("focus",(function(){r.bFocused=!0})),this.$editableArea.on("blur",(function(){r.bFocused=!1})),this.$editableArea.on("click","img",(function(e){var t=o(this);r.bInImage=!0,r.oCurrImage=t,r.oOptions.onImageSelect(t,e),e.stopPropagation()})),this.$editableArea.on("click",(function(e){r.bInImage=!1,r.oCurrImage=null,r.oOptions.onImageBlur()})),null!==r.oOptions.onItemOver&&this.$editableArea.on("mouseover",(function(e){r.oOptions.onItemOver(e)})),null!==r.oOptions.onItemOver&&this.$editableArea.on("mouseout",(function(e){r.oOptions.onItemOut(e)})),this.$editableArea.on("cut paste",(function(){r.editableSave(),i.defer((function(){r.editableSave()}))})),this.$editableArea.on("paste",(function(e){if((e=e.originalEvent||e).clipboardData){var i=e.clipboardData.getData("text/plain"),o=e.clipboardData.getData("text/html");if(r.oOptions.alwaysTryUseImageWhilePasting&&r.pasteImage(e))e.preventDefault();else if(t(i))e.preventDefault(),r.execCom("insertHTML",'
'+i.replaceAll("&","&")+"
");else if(s(i))e.preventDefault(),r.execCom("insertHTML",'
'+i.replaceAll("&","&")+"
");else if(""!==o){const t=h.preparePastedHtml(o);t&&(e.preventDefault(),r.execCom("insertHTML",t))}}})),this.$editableArea.on("keydown",(function(e){var i=e.keyCode||e.which||e.charCode||0,o=e.ctrlKey||e.metaKey,n=e.altKey,a=e.shiftKey,l="";if(a&&o&&i===Enums.Key.z||o&&i===Enums.Key.y)e.preventDefault(),r.editableRedo();else if(o&&!n&&i===Enums.Key.z)e.preventDefault(),r.editableUndo();else if(!o||i!==Enums.Key.k&&i!==Enums.Key.b&&i!==Enums.Key.i&&i!==Enums.Key.u)n||a||o||i!==Enums.Key.Del&&i!==Enums.Key.Backspace||r.editableSave();else switch(e.preventDefault(),i){case Enums.Key.k:t(l=r.getSelectedText())?r.insertLink(l):s(l)?r.insertLink("mailto:"+l):r.oOptions.openInsertLinkDialog();break;case Enums.Key.b:r.bold();break;case Enums.Key.i:r.italic();break;case Enums.Key.u:r.underline()}})),this.$editableArea.on("keyup",(function(e){var t=e.keyCode||e.which||e.charCode||0,s=e.ctrlKey||e.metaKey,i=e.altKey,o=e.shiftKey;i||o||s||(t===Enums.Key.Space||t===Enums.Key.Enter||t===Enums.Key.Del||t===Enums.Key.Backspace?r.editableSave():r.oOptions.onChange())})),this.initContentEditable(),this.setEditable(e),n.broadcastEvent("MailWebclient::StartCrea::after",{EditableArea:this.$editableArea,InsertHtmlHandler:this.insertHtml.bind(this)})},d.prototype.clearUndoRedo=function(){this.aEditableAreaHtml=[],this.iUndoRedoPosition=0},d.prototype.isUndoAvailable=function(){return this.iUndoRedoPosition>0},d.prototype.clearRedo=function(){this.aEditableAreaHtml=this.aEditableAreaHtml.slice(0,this.iUndoRedoPosition+1)},d.prototype.editableSave=function(){var e=this.$editableArea.html(),t=i.last(this.aEditableAreaHtml);e!==(t?t[0]:"")&&(this.clearRedo(),this.aEditableAreaHtml.push([e,this.getCaretPos(this.$editableArea[0])]),this.iUndoRedoPosition=this.aEditableAreaHtml.length-1,this.oOptions.onChange())},d.prototype.editableUndo=function(){var e=this.$editableArea.html(),t=this.aEditableAreaHtml[this.iUndoRedoPosition];e!==(t?t[0]:"")&&this.editableSave(),this.iUndoRedoPosition>0&&(this.iUndoRedoPosition--,this.$editableArea.html(this.aEditableAreaHtml[this.iUndoRedoPosition]),this.setCaretPos(this.$editableArea[0],this.aEditableAreaHtml[this.iUndoRedoPosition][1]))},d.prototype.editableRedo=function(){this.iUndoRedoPosition
0&&((i=(s=t.getRangeAt(0)).cloneRange()).selectNodeContents(e),i.setEnd(s.startContainer,s.startOffset),n={start:o=i.toString().length,end:o+s.toString().length}):document.selection&&document.body.createTextRange&&(s=document.selection.createRange(),(i=document.body.createTextRange()).moveToElementText(e),"function"==typeof i.setEndPoint&&i.setEndPoint("EndToStart",s),n={start:o=i.text.length,end:o+s.text.length}),n},d.prototype.setCaretPos=function(e,t){if(window.getSelection&&document.createRange){var s=[e],i={},o={},n=!1,r=!1,a=0,l=0,h=0,d=document.createRange();for(d.setStart(e,0),d.collapse(!0),i=s.pop();!r&&i;){if(3===i.nodeType)l=a+i.length,!n&&t.start>=a&&t.start<=l&&(d.setStart(i,t.start-a),n=!0),n&&t.end>=a&&t.end<=l&&(d.setEnd(i,t.end-a),r=!0),a=l;else for(h=i.childNodes.length;h--;)s.push(i.childNodes[h]);i=s.pop()}(o=window.getSelection()).removeAllRanges(),o.addRange(d)}else if(document.selection&&document.body.createTextRange){var c=document.body.createTextRange();c.moveToElementText(e),c.collapse(!0),c.moveEnd("character",t.end),c.moveStart("character",t.start),c.select()}},d.prototype.setTabIndex=function(e){e&&this.$editableArea.attr("tabindex",e)},d.prototype.initContentEditable=function(){this.$editableArea.bind({mousemove:i.bind(this.storeSelectionPosition,this),mouseup:i.bind(this.onCursorMove,this),keydown:i.bind(this.onButtonPressed,this),keyup:i.bind(this.onCursorMove,this),click:i.bind(this.onClickWith,this),focus:this.oOptions.onFocus,blur:this.oOptions.onBlur}),window.File&&window.FileReader&&window.FileList&&this.oOptions.enableDrop&&this.$editableArea.bind({dragover:i.bind(this.onDragOver,this),dragleave:i.bind(this.onDragLeave,this),drop:i.bind(this.onFileSelect,this)});var e=this,t=i.debounce((function(){e.oCurrLink=null,e.bInUrl=!1,e.oOptions.onUrlOut()}),300);o("html, body").on("scroll",t)},d.prototype.onCursorMove=function(e){var t=-1;window.event?t=window.event.keyCode:e&&(t=e.which),13===t&&this.breakQuotes(e),17===t&&this.$editableArea.find("a").css("cursor","inherit"),8===t&&this.uniteWithNextQuote(e),46===t&&r.chrome&&this.uniteWithPrevQuote(e),this.storeSelectionPosition(),this.oOptions.onCursorMove()},d.prototype.onClickWith=function(e){e.ctrlKey&&"A"===e.target.nodeName&&window.open(e.target.href,"_blank"),this.checkAnchorNode()},d.prototype.onButtonPressed=function(e){var t=-1;window.event?t=window.event.keyCode:e&&(t=e.which),17===t&&this.$editableArea.find("a").css("cursor","pointer")},d.prototype.onFileSelect=function(e){if(e=(e&&e.originalEvent?e.originalEvent:e)||window.event){e.stopPropagation(),e.preventDefault();var t=null,s=null,i=e.files||(e.dataTransfer?e.dataTransfer.files:null),o=this;i&&1===i.length&&this.checkIsImage(i[0])&&(s=i[0],(t=new window.FileReader).onload=function(e){o.insertImage(e.target.result)},t.readAsDataURL(s))}},d.prototype.onDragLeave=function(){this.$editableArea.removeClass("editorDragOver")},d.prototype.onDragOver=function(e){e.stopPropagation(),e.preventDefault(),this.$editableArea.addClass("editorDragOver")},d.prototype.pasteImage=function(e){var t=e.clipboardData&&e.clipboardData.items,s=this,o=!1;return window.File&&window.FileReader&&window.FileList&&t&&i.each(t,(function(e){if(s.checkIsImage(e)&&e.getAsFile){var t=null,i=e.getAsFile();i&&((t=new window.FileReader).onload=function(e){s.insertImage(e.target.result)},t.readAsDataURL(i),o=!0)}})),o},d.prototype.checkIsImage=function(e){return e&&e.type&&0===e.type.indexOf("image/")},d.prototype.setPlainText=function(e){"string"!=typeof e&&(e=""),this.$editableArea&&(this.editableSave(),this.$editableArea.empty().text(e).css("white-space","pre"),this.editableSave())},d.prototype.setText=function(e){if("string"!=typeof e&&(e=""),this.$editableArea){0===e.length&&(e="
");const t=this.prepareHtmlWithoutWrappers(e);this.$editableArea.empty().append(t).css("white-space","normal"),this.clearUndoRedo(),this.editableSave()}},d.prototype.prepareHtmlWithoutWrappers=function(e){let t=o(e),s=!1;for(;1===t.length&&("html"===t.data("x-div-type")||"body"===t.data("x-div-type"));)t=t.children(),s=!0;if(1===t.length&&"font-wrapper"===t.data("crea"))return this.setBasicStyles(t.css("font-family"),t.css("font-size"),t.css("direction")),t.html();if(this.setBasicStyles(this.oOptions.defaultFontName,this.convertFontSizeToPixels(this.oOptions.defaultFontSize),this.oOptions.isRtl?"rtl":"ltr"),s){let e="";return t.each(((t,s)=>{e+=s.outerHTML})),e}return e},d.prototype.setBasicStyles=function(e,t,s){this.sBasicFontName=e,this.sBasicFontSize=t,this.sBasicDirection=s,this.$editableArea.css({"font-family":this.getFontNameWithFamily(this.sBasicFontName),"font-size":this.sBasicFontSize,direction:this.sBasicDirection})},d.prototype.getPlainText=function(){var e="";return this.$editableArea&&(e=this.$editableArea.html().replace(/([^>]{1})
/gi,"$1\n").replace(/