UNPKG

@barsanovinray/jscore

Version:

barsa novin ray javascript core module

2 lines 1.36 MB
/*! For license information please see core.js.LICENSE.txt */ (()=>{var __webpack_modules__={3084:(t,e,n)=>{n(14691),n(2007),n(14431),n(82633),n(81798),n(11953),n(69747),n(25281)},37388:(t,e,n)=>{n(80024),n(89216),n(58033),n(52170),n(20760),n(84771),n(30660),n(52949),n(96150),n(36199)},79585:(t,e,n)=>{n(75705),n(35898),n(83735),n(42092),n(91293),n(76e3),n(86307),n(30867),n(49050),n(53570),n(7226),n(18505),n(18548),n(62376),n(95944),n(67362),n(16099),n(68849),n(43877),n(75548),n(92901),n(93753),n(75524),n(38905),n(41807),n(11322),n(86168),n(21190),n(60974),n(11151),n(16308),n(15405),n(90762),n(29567),n(2011),n(84773),n(25102),n(33593),n(64278),n(3212),n(5370),n(6608),n(54066),n(4796),n(8260),n(303),n(77505),n(35366),n(89575),n(74642),n(41369),n(62124),n(73127),n(83925),n(23005),n(16765),n(42095),n(70589),n(16935),n(50632),n(74918),n(49365),n(32775),n(31551),n(7260),n(41248),n(73593),n(7191),n(66155),n(91401),n(59135),n(45968),n(74123),n(35721),n(38993),n(51904),n(64810),n(67534),n(77062),n(98979),n(94198),n(47613),n(50610),n(81568),n(57778),n(11881),n(13413),n(87230),n(97578),n(86141),n(71707),n(74803),n(94421),n(27921),n(49277),n(3674),n(48385),n(8035),n(68326),n(43187),n(39301),n(69179),n(76141),n(98864),n(38790),n(20203),n(49843),n(92505),n(18042),n(65681),n(10729),n(24746),n(30547),n(39684),n(78459),n(35548),n(53622),n(37536),n(29778),n(20161),n(89969),n(26290),n(90568),n(66925),n(40682),n(51356),n(65051),n(86756),n(16321),n(24439),n(61091),n(42878),n(35897),n(84205),n(6054),n(23459),n(27232),n(76303),n(54356),n(38012),n(33883),n(88337),n(31265),n(12884),n(97647),n(80497),n(9275),n(96524),n(93669),n(4128),n(44365),n(81409),n(42113),n(72995),n(19502),n(54982),n(17689),n(17301),n(3631),n(12558),n(3934),n(97963),n(82253),n(57054),n(9397),n(17325),n(68835),n(10502),n(33747),n(4367),n(50491),n(91141),n(35836),n(4024),n(13513),n(45652),n(78519),n(81771),n(99326),n(49619),n(38714),n(45252),n(99970),n(76811),n(36115),n(25214),n(72426),n(44666),n(9991),n(21710),n(56714),n(58849),n(21715),n(82326),n(79968),n(75081),n(62367),n(68714),n(32673),n(44940),n(19376),n(54202),n(6689),n(59535),n(25029),n(28537),n(20565),n(41894),n(15231),n(78095),n(98318),n(31725),n(15069),n(16167),n(98776),n(2122),n(94191),n(31649),n(89172),n(63167),n(23843),n(18538),n(14036),n(35854),n(80890),n(57501),n(58259),n(21807),n(60842),n(26744),n(36124),n(46082),n(46439),n(15623),n(430),n(39129),n(92064),n(7310),n(96570),n(64625),n(62080),n(68446),n(81283),n(80137),n(77595),n(98914),n(44943),n(32157),n(11458),n(2298),n(90325),n(4914),n(56456),n(30407),n(16636),n(26028),n(2227),n(79772),n(55453),n(65854),n(42105),n(30450),n(26156),n(24026),n(92485),n(72021),n(85558),n(48436),n(43011),n(47657),n(95795),n(74879),n(37568),n(13434),n(45888),n(18581),n(21142),n(24258),n(61881),n(96327),n(9140),n(6022),n(68517),n(37941),n(46e3),n(34898),n(84975),n(20060),n(13182),n(80994),n(32707),n(13625),n(75530),n(3044),n(81047),n(52644),n(17375),n(77171),n(12369),n(40358),n(70977),n(63256),n(67839),n(36380),n(63868),n(49168),n(26721),n(94135),n(37977),n(97790),n(49297),n(98425),n(88392),n(33463),n(98372),n(17861),n(70827),n(85250),n(34034),n(61704),n(82009),n(67477),n(45159),n(27133),n(65158),n(81176),n(79252),n(78821),n(54613),n(67224),n(35942),n(65777),n(21993),n(49058),n(4462),n(15340),n(17736),n(33693),n(31350),n(33459),n(18013),n(8107),n(26804),n(95887),n(16869),n(18480),n(65785),n(98219),n(17205),n(37054),n(48613),n(70745),n(84876),n(33459),n(25223),n(83868),n(7256)},69747:()=>{Common.Cs.Define("Bw.App","Bw.Wrapper",{singleton:!0,HandlerEvent:function(t,e,n){Ul.ApplicationCtrlr.on(t,e,n)},FireEvent:function(t,e,n){Ul.ApplicationCtrlr.FireEvent(t,e,n)},GetActiveSystem:function(){var t=Ul.ApplicationCtrlr.GetSelectedSystem();return Bw._wrap(t)},GetSystemById:function(t){var e=Ul.ApplicationCtrlr.GetSystemCtrlrById(t);return Bw._wrap(e)},GetSystemByName:function(t){var e=Ul.ApplicationCtrlr.GetSystemCtrlrByName(t);return Bw._wrap(e)},GetActiveReport:function(){var t=Ul.ApplicationCtrlr.GetSelectedSystem().GetSelectedUlv();return Bw._wrap(t)},SelectSystemById:function(t){Ul.ApplicationCtrlr.SelectSystem(t)},RunDynamicCommandByFolderId:function(t){Common.CustomCodeManager.RunDynamicCommand(t)},GetCurrentSystemNavigator:function(){return Bw.App.GetActiveSystem()._System.SystemData.Navigator}})},14691:()=>{Common.Cs.Define("Bw","",{singleton:!0,dictionary:{},FormHandler:null,ShowFormPanelControl:function(t){Bw.FormHandler&&Bw.FormHandler.ShowFormPanelControl(t)},HideRibbonAndNavigator:function(){window.document.body.classList.add("anonymous_hide_container")},_getWrapper:function(t){return t instanceof Common.MetaObjectWeb?Bw.Mo:t instanceof Common.MetaObjectListWeb?Bw.MoList:t instanceof Ul.FormPanelCtrlr?Bw.Form:t instanceof Ul.FieldInfoBaseCtrlr?Bw.Field:t instanceof Ul.UlvMainCtrlr?Bw.Report:t instanceof Ul.SystemCtrlr?Bw.System:void 0},_wrap:function(t){if(0==Ext.isObject(t)&&0==Ext.isArray(t)||t instanceof Bw.Wrapper)return t;if(Ext.isNotEmpty(t.$Wrapper))return t.$Wrapper;if(Ext.isArray(t)){var e=[];return t.forEach((function(t){e.push(Bw._wrap(t))})),e}var n=Bw._getWrapper(t);if(n){var r=new n(t);return t.$Wrapper=r,r}return t},_unwrap:function(t){if(t instanceof Bw.Wrapper)return t.Unwrap();if(Ext.isArray(t)){var e=[];return t.forEach((function(t){e.push(Bw._unwrap(t))})),e}return t},ExecuteDynamicCommand:function(t,e){var n={command:{Id:t},DynamicSetting:e,Mo:e};Common.CustomCodeManager.RunDynamicCommand(t,n)},EditHome:function(){Bw.TilesService&&Bw.TilesService.setEditHome(!0)},RestartStructure:function(t){Bw.Msg.Wait(25e3,"بازآوری","",""),Common.Ajax.GetServerData("Command.RestartStructure",null,(function(e){Bw.Msg.Wait(500,"انجام شد","","",(function(){Bw.Msg.Hide()})),"function"==typeof t?t(e):Bw.Reload()}))},EnableWorkflowTestPerformer:function(){Common.Ajax.GetServerData("Command.EnableWorkflowTestPerformer",null,(function(t){}))},SetShellbarSubtitle:function(){},GetWindowSize:function(){var t=document.body.getBoundingClientRect().width;return t<600?"small":t>599&&t<1024?"medium":t>1023&&t<1440?"large":"extra-large"},Logout:function(){Ul.ApplicationCtrlr.Logout()},SetCultureByDisplayName:function(t){var e=null,n=LoginFormData.Cultures;Object.keys(n).forEach((function(r){n[r]==t&&(e=r)})),null!=e&&LoginForm.Language!=e&&LoginForm.setCulture(e)},Reload:function(){window.location.reload()},LocationHref:function(){return window.location.href},Origin:function(){return window.location.origin},Login:function(t,e){var n=e.onSuccess,r=e.onError,i=t;new Date,Common.Ajax.GetServerData_Sync("/api/auth/login",i,(function(t){Common.LogManager.StartServerCall("Login"),LoginAction.ReceiveLoginResult(t,n,r)}),null,(function(t){if("function"==typeof r)return r(t),!0}),null)},ForgetpasswordSendOTP:function(t,e){Common.Ajax.GetServerData("/api/auth/forgetPassword_SendSms",t,e.onSuccess,e.onError,null,this,!0)},ForgetpasswordVerifyOTP:function(t,e){Common.Ajax.GetServerData("/api/auth/forgetPassword_Verify",t,e.onSuccess,e.onError,null,this,!0)},ChangePassword:function(t,e){var n=e.onSuccess,r=e.onError;return Ext.isEmpty(t.newPassword)||Ext.isEmpty(t.newPassword2)||Ext.isEmpty(t.oldPassword)?r(BBB.AlertCompleteFormData):t.newPassword!==t.newPassword2?r(BBB.AlertChangePasswordConfirmationAreNotTheSameDescription):t.oldPassword===t.newPassword?r(BBB.AlertChangePasswordOldNewPasswordAreTheSameDescription):void Common.Ajax.GetServerData_Sync("System94.ChangePassword",t,(function(t){n(t)}),null,(function(t){r(t)}),!0)},ExecuteReport:function(t,e,n,r){return Common.Async.DORETURNPARAMETER(),Common.Ajax.GetServerData("List94.GetUnifiedList",t,e,n,r,this)},ExecuteReport_Sync:function(t,e,n){return Common.Ajax.GetServerData_Sync("List94.GetUnifiedList",t,e,this,n,!0)},NavigateTo:function(t){window.document.location.href=t},Navigate:function(t,e,n){},RunBlMethod:function(){var t=Array.prototype.slice.call(arguments),e=t[0],n=t.slice(1);Bw._unwrapParameters(n);var r=Common.Ajax.RunBlMethod_Server({method:e,parameters:n});return Ext.isObject(r)?r=Bw._makeItObjectAndWrapIt(r):Ext.isArray(r)&&(r=r.map((function(t){return Bw._makeItObjectAndWrapIt(t)}))),r},GetItem:function(t){return this.dictionary[t]},SetItem:function(t,e){this.dictionary[t]=e},RemoveItem:function(t){delete this.dictionary[t]},RunBlMethodAsync:function(t){t=Ext.value(t,{}),Bw._unwrapParameters(t.Parameters),Common.Ajax.RunBlMethod_Async({method:t.Method,parameters:t.Parameters},t.SuccessFn,t.FailFn,t.Scope,t.doReturn)},RunBlMethodWithProgress:function(t){Common.ProgressHelper.RunBlMethodWithProgress(t)},_makeItObjectAndWrapIt:function(t){var e=Common.Util.TryGetValue(t,"$Type");return e&&(t.xtype=e,t=Ext.create(t)),Bw._wrap(t)},RunServiceMethod:function(t,e,n,r,i,o){var a;return Bw._unwrapParameters(e),1==n?a=Common.Ajax.GetServerData_Sync(t,e,r,o,i):Common.Ajax.GetServerData(t,e,r,i,null,o),a},_minifyObject:function(t){var e;return Ext.isObject(t)?t instanceof Common.MetaObjectListWeb?(e=[],t.ForEach((function(t){e.push(t.GetChangedObject())}))):e=Ext.isFunction(t.GetChangedObject)?t.GetChangedObject():t:e=t,e},_unwrapParameters:function(t){if(Ext.isArray(t))for(var e=0;e<t.length;e++)1==Ext.isArray(t[e])&&this._unwrapParameters(t[e]),0!=Ext.isObject(t[e])&&(t[e]instanceof Bw.Wrapper&&(t[e]=Bw._unwrap(t[e])),t[e]=this._minifyObject(t[e]));else if(Ext.isObject(t))for(var n in t)0!=Ext.isObject(t[n])&&(t[n]instanceof Bw.Wrapper&&(t[n]=Bw._unwrap(t[n])),t[n]=this._minifyObject(t[n]))},_unwrapParameters11111:function(t){if(Ext.isArray(t))for(var e=0;e<t.length;e++)1==Ext.isArray(t[e])&&this._unwrapParameters(t[e]),0!=Ext.isObject(t[e])&&(t[e]instanceof Bw.Wrapper&&(t[e]=Bw._unwrap(t[e])),Ext.isFunction(t[e].GetChangedObject)&&(t[e]=t[e].GetChangedObject()));else if(Ext.isObject(t))for(var n in t)0!=Ext.isObject(t[n])&&(t[n]instanceof Bw.Wrapper&&(t[n]=Bw._unwrap(t[n])),Ext.isFunction(t[n].GetChangedObject)&&(t[n]=t[n].GetChangedObject()))},StartWorkflow:function(t,e){Common.Async.DORETURNPARAMETER();var n={workflowDefId:t.WorkflowDefId,systemName:t.SystemName,workflowName:t.WorkflowName,startActivityName:t.StartActivityName,startObjectId:t.StartObjectId};Ul.WorkflowPanelCtrlr.StartWorkflow(n,e)},IsEmpty:function(t){return Ext.isEmpty(t)},IsNotEmpty:function(t){return!Ext.isEmpty(t)},IsEmptyOrZero:function(t){return Ext.isEmpty(t)||0==t||"0"==t},NewLine:function(){return"<br>"},Decode:function(t){return Ext.decode(t)},TryGetValue:function(t,e,n){return Common.Util.TryGetValue(t,e,n)},Value:function(t,e){return Ext.value(t,defaultvalue)},TryGetId:function(t){return t instanceof Bw.Mo?t.GetId():Ext.isObject(t)?t.Id:(Ext.isString(t),t)},Waterfall:function(t,e,n){Common.Async.Waterfall(t,e,n)},GetChangedMo:function(t){return(t=Bw._unwrap(t))instanceof Common.MetaObjectWeb?t=t.GetChangedObject():Ext.isObject(t)&&Common.Util.TryGetValue(t,"$Type")&&(t=(t=Common.MetaObjectWeb.CreateMo(t)).GetChangedObject()),t},Defer:function(t,e,n){Ext.defer(t,e,n)}}),Common.Cs.Define("Bw.Wrapper","",{_isWrapper:!0,_Object:null,constructor:function(t){this.callParent(arguments),this._Object=t},Unwrap:function(){return this._Object},UnwrapDeleteWrapper:function(){return delete this._Object.$Wrapper,this._Object},statics:{_isWrapper:!0}}),Common.Cs.Define("Bw.File","",{singleton:!0,Download:function(t){var e={Url:null,FileId:null,Field:null,Index:0,UseAgent:!1,ViewInBrowser:!1,ConvertTo:null,IsReadOnly:!1,Tag:null};if(e=Common.Merger.Merge(e,t),Ext.isEmpty(e.Url)){if(Ext.isEmpty(e.FileId)&&(e.FileId=this._getFileIdOfField(e.Field,e.Index)),Ext.isEmpty(e.FileId))return void Bw.Msg.Error("شناسه فایل یافت نشد.");Common.File.OpenFile(e.FileId,e.ViewInBrowser,e.Field,e.IsReadOnly,e.UseAgent,e.ConvertTo,e.Tag)}else this.DownloadFile(e.Url)},MailMergeField:function(t,e,n,r,i){t=Bw._unwrap(t),Common.File.MailMerge(t,e,n,r)},_getFileIdOfField:function(t,e){if(!Ext.isEmpty(t)){var n=(t=Bw._unwrap(t)).GetValue();if(!(Ext.isEmpty(n.Files)||(e=Ext.value(e,0),n.Files.length<e+1)))return n.Files[e].Id}},DownloadFile:function(t){t=Ul.ApplicationCtrlr.Const.FileWordPath+"FileDownload.aspx?download_Url="+t+"&viewInBrowser=false",window.open(t,"_blank")},DownloadByFileContent:function(t,e,n){Common.File._openFileInWindow(t,e,n)},ShowFlash:function(t,e,n,r){e=null==e?900:e,n=null==n?600:n,new Ext.Window({title:r,maximizable:!0,animateTarget:Ext.getBody(),closable:!0,modal:!0,border:!0,plain:!0,width:e,height:n,tools:[],layout:"fit",html:'<object type="application/x-shockwave-flash" data="'+t+'"style="width:100%;height:100%;" </object>'}).show()},DownloadFile1:function(t){this.DownloadFile(t)},OpenWord:function(t,e,n,r,i){i&&(Ul.NotificationManager.OnPublishFileWordUpdatedCallback=function(t){i.Refresh(!0),i.Adapter.RaiseValueChangedEvent()});var o=Bw.RunBlMethod("GetInvariantId",n),a=Bw.RunBlMethod("GetInvariantId",e),s=Bw.RunBlMethod("GetInvariantId",r),l=Bw.RunBlMethod("GetUserId"),u=window.location.host,c=window.location.protocol+"//"+u+"/api/addin/GetFile/"+t+"/"+a+"/"+o+"/"+s+"/-1/"+l+"/a.docx";window.open("ms-word:ofe|u|"+c,"_self")},OpenWord2:function(t,e,n,r){var i={objectId:t,fieldId:e,fileId:n};Common.Ajax.GetServerData("Command.GetWebDavUrl",i,(function(t){var e=t.Data+"/Addin",n=window.location.host,i=window.location.protocol;e="ms-word:ofe|u|"+"{0}/{1}{2}/{3}/{4}".format(i,n,"/WebDav",e,r),window.open(e,"_self")}))}}),Common.Cs.Define("Bw.Async","",{singleton:!0,Waterfall:function(t,e){Common.Async.Waterfall("Bw.Async.Waterfall",t,e)},Each:function(t,e,n){Common.Async.Each("Bw.Async.Each",t,e,n)}})},14431:()=>{Common.Cs.Define("Bw.Field","Bw.Wrapper",{_Field:null,constructor:function(t){this.callParent(arguments),this._Field=t},GetHostForm:function(){return Bw._wrap(this._Field.ParentFormPanel)},Calculate:function(){this._Field.ParentFormPanel.CalculateFields(this._Field.Setting.ControlFieldDefId)},CalculateRelatedFields:function(){this._Field.ParentFormPanel.CalculateRelatedFields(this._Field.Setting.ControlFieldDefId,null)},VisibleTime:function(t){var e=this.GetSetting();e.ShowTime1=t,this.SetConfig(e)},GetLabelCaption:function(){return this._Field.GetLabelCaption()},GetControlId:function(){return this._Field.GetControlId()},VisibleDate:function(t){var e=this.GetSetting();e.ShowDate1=t,this.SetConfig(e)},ChangeDecimalPrecision:function(t){var e=this.GetSetting(),n=parseInt(t);isNaN(n)||(e.DecimalPrecision=t,this.SetConfig(e))},ChangeFieldConfig:function(t){this._Field.ChangeFieldConfig&&this._Field.ChangeFieldConfig(t)},SetConfig:function(t){this.ChangeFieldConfig(t)},GetValue:function(){var t=this._Field.GetValue();return Bw._wrap(t)},SetValue:function(t,e){t=Bw._unwrap(t),this._Field.SetValue(t,e)},Clear:function(t){this._Field.Clear(t)},GetValueCaption:function(){return this._Field.GetCaption()},AddList:function(t){this.RefreshList(t,null,null)},RefreshList:function(t,e,n){this._Field.UlvMainCtrlr&&(e=Bw._unwrap(e),n=Bw._unwrap(n),t=Bw._unwrap(t),this._Field.UlvMainCtrlr.RefreshRowsByMos(t,e,n))},Focus:function(t){this._Field.SetFocus(t)},GetEnable:function(){return this._Field.GetEnable()},SetEnable:function(t){this._Field.SetEnable(t)},GetVisible:function(){return this._Field.GetVisible()},SetVisible:function(t,e){this._Field.ParentFormPanel.IsAutoInlineEdit||this._Field.SetVisible(t,e)},GetReadOnly:function(){return this._Field.GetReadOnly()},SetReadOnly:function(t){this._Field.SetReadOnly(t)},GetMandatory:function(){return this._Field.GetMandatory()},SetMandatory:function(t){this._Field.SetMandatory(t)},GetBold:function(){return this._Field.GetBold()},SetBold:function(t){this._Field.SetBold(t)},Refresh:function(t){this._Field.Refresh(t)},GetSetting:function(){return this._Field.Setting},GetInnerReport:function(){var t=this._Field.UlvMainCtrlr;return Bw._wrap(t)},GetInnerSubForm:function(){return Bw._wrap(this._Field.FormPanelCtrlr)},ShowUploadWindow:function(){this._Field.ShowUploadWindow()},Download:function(t){this._Field.Download&&this._Field.Download(t)},RaiseValueChanged:function(){this._Field.RaiseValueChangedEvent()}}),Bw.Field.prototype.GetParentForm=Bw.Field.prototype.GetHostForm,Bw.Field.prototype.GetForm=Bw.Field.prototype.GetHostForm,Bw.Field.prototype.GetReport=Bw.Field.prototype.GetInnerReport,Bw.Field.prototype.GetSubForm=Bw.Field.prototype.GetInnerSubForm,Bw.Field.prototype.GetCaption=Bw.Field.prototype.GetValueCaption},2007:()=>{var t;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t,n,r){return(n=function(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!==e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}Common.Cs.Define("Bw.Form","Bw.Wrapper",(n(t={_Form:null,constructor:function(t){this.callParent(arguments),this._Form=t,this.IsInlineEdit=this._Form.IsAutoInlineEdit},On:function(t,e,n,r){(r=r||{}).single=void 0===r.Single||r.Single,r.delay=void 0!==r.Delay?r.Delay:null,this._Form.on(t,(function(){var t=Bw._wrap(arguments[0]),r=t.GetMo();return e.call(this,n,{Form:t,Mo:r})}),n,r)},CloseSideNavigator:function(){this._Form.CloseSideNavigator()},WorkflowChoiceSelect:function(t){this._Form.WorkflowChoiceSelect(t)},ExecuteChoiceDef:function(t){this._Form.ExecuteChoiceDef(t)},WizardNextStep:function(){this._Form.WizardNextStep()},WizardPreviousStep:function(){this._Form.WizardPreviousStep()},Refresh:function(){this._Form.Refresh()},Save:function(t){t||(t={}),"false !important"==t.Reload?t.Reload=!1:(t.Reload=Ext.value(t.Reload,!1),t.Reload=!0),Common.Async.ExecCallback(this._Form.Save.bind(this._Form,t.Reload),t.SuccessFn,t.FailFn,t.Scope,"Bw.Form.Save")},SaveAndClone:function(t){t=Ext.value(t,{}),Common.Async.ExecCallback(this._Form.SaveAndClone.bind(this._Form),t.SuccessFn,t.FailFn,t.Scope,"Bw.Form.SaveAndClone")},SaveAndNew:function(t){t=Ext.value(t,{}),Common.Async.ExecCallback(this._Form.SaveAndNew.bind(this._Form),t.SuccessFn,t.FailFn,t.Scope,"Bw.Form.SaveAndNew")},SaveAndClose:function(t){t=Ext.value(t,{}),Common.Async.ExecCallback(this._Form.SaveAndClose.bind(this._Form),t.SuccessFn,t.FailFn,t.Scope,"Bw.Form.SaveAndClose")},Destroy:function(){this._Form.Destroy()},Reload:function(t){t=Ext.value(t,{}),Ext.isNotEmpty(t.NewMoId)&&(this._Form._moId=t.NewMoId),Ext.isNotEmpty(t.IsReadOnly)&&(this._Form._isReadOnly=t.IsReadOnly,this._Form.FormRequestParams.IsReadOnly=t.IsReadOnly),Common.Async.ExecCallback(this._Form.Reload.bind(this._Form),t.SuccessFn,t.FailFn,t.Scope,"Bw.Form.Reload")},Relayout:function(t){t=Ext.value(t,!0),this._Form.SetLayoutDirty(!0),this._Form.Relayout(t)},Delete:function(t){t=Ext.value(t,{}),Common.Async.ExecCallback(this._Form.Delete.bind(this._Form),t.SuccessFn,t.FailFn,t.Scope,"Bw.Form.Delete")},Close:function(t){if(1==(t=Ext.value(t,{})).NoSave)Common.Async.ExecCallback(this._Form.ForceClose.bind(this._Form),t.SuccessFn,t.FailFn,t.Scope,"Bw.Form.Close");else{var e=!(1==t.ForceSave);Common.Async.ExecCallback(this._Form.Close.bind(this._Form,e),t.SuccessFn,t.FailFn,t.Scope,"Bw.Form.Close")}},SetValue:function(t){this._Form.SetValue(t)},SetIsChanged:function(t){this._Form.IsChanged=t},GetIsChanged:function(t){return this._Form.IsChanged},GetFieldByDbName:function(t){var e=this._Form.GetFieldlByName(t);return Bw._wrap(e)},GetField:function(t){var e=this._Form.GetFieldByCaption(t);return Bw._wrap(e)},GetFieldValue:function(t){return this.GetField(t).GetValue()},SetFieldValueSilent:function(t,e,n){var r=this._Form,i=r.Mo,o=Bw._unwrap(e);i.SetFValueByCaption(t,o),r.GetFieldByCaption(t).SetValue(o,n,!0)},SetGroupVisible:function(t,e,n){this._Form.SetGroupVisible(t,e,n)}},"SetFieldValueSilent",(function(t,e,n){var r=this._Form,i=r.Mo,o=Bw._unwrap(e);i.SetFValueByCaption(t,o);var a=r.GetFieldByCaption(t);a.SetValue(o,n,!0),r._fieldCtrlrValueChanged(a)})),n(t,"GetMo",(function(){var t=this._Form.Mo;return Bw._wrap(t)})),n(t,"GetSetting",(function(){return this._Form.Setting})),n(t,"SetTabOrderList",(function(t){Ext.isString(t)&&(t=t.split(",")),this._Form.Setting.View.TabOrders=t;var e=Common.Util.TryGetValue(this._Form,"Adapter.Control.Focusable");e&&e.InitializeChildren()})),n(t,"CalculateFields",(function(t){Ext.isString(t.FieldCaptions)&&(t.FieldCaptions=t.FieldCaptions.split(","));var e=t.FieldCaptions.map((function(t){t=t.trim();var e=this.GetField(t);if(e)return e.GetSetting().ControlFieldDefId}),this);Common.Async.ExecCallback(this._Form.CalculateFields.bind(this._Form,e),t.SuccessFn,t.FailFn,t.Scope,"Bw.Form.CalculateFields")})),n(t,"GetReport",(function(){return Bw._wrap(this._Form.UlvMainCtrlr)})),n(t,"GetReadOnly",(function(){var t=this.GetSetting();return Common.Util.TryGetValue(t,"View.IsReadOnly",!1)})),n(t,"ShowInfoBar",(function(t){this._Form.ShowInfoBar(t.Id,t.Text,t.Type,t.Buttons,t.Handler,t.Icon)})),n(t,"HideInfoBar",(function(t){this._Form.HideInfoBar(t)})),n(t,"GetParentForm",(function(){var t=Common.Util.TryGetValue(this._Form,"ParentMoProvider.FieldCtrlr.ParentFormPanel");return Bw._wrap(t)})),n(t,"ForEachField",(function(t,e){e=Ext.value(e,this),this._Form.EachControl((function(n){var r=Bw._wrap(n);return t.call(e,r)}),e)})),n(t,"GetHostField",(function(){return Bw._wrap(this._Form.HostField)})),n(t,"statics",{Show:function(t){var e,n=t.UlvMainCtrlr,r=t.ParentReport,i=t.SuccessFn,o=t.FailFn,a=t.OkClickFn,s=t.CancelClickFn,l=t.FormSetting,u=Ext.value(t.EventHandlers,{}),c=t.Scope,h=t.RetrunMoAfterSave,d=t.IsModeless;delete t.UlvMainCtrlr,delete t.ParentReport,delete t.SuccessFn,delete t.FailFn,delete t.OkClickFn,delete t.CancelClickFn,delete t.FormSetting,delete t.EventHandlers,delete t.Scope,delete t.RetrunMoAfterSave,delete t.IsModeless,(n=n||r)&&(n=Bw._unwrap(n),t.Relation=Common.Util.TryGetValue(n,"Setting.Extra.Relation")),Ext.isObject(t.Mo)&&(t.Mo=Bw._unwrap(t.Mo),e=t.Mo,t.Mo instanceof Common.MetaObjectWeb==0&&(t.Mo=Common.MetaObjectWeb.CreateMo(t.Mo)),t.Mo=t.Mo.GetChangedObject());var f=new Ul.FormRequestParams(t),m=new Ul.FormPanelCtrlr({UlvMainCtrlr:n,FormRequestParams:f,_isReadOnly:f.IsReadOnly,_forceReturnMoAfterSave:h,IsModeless:d});if(c=Ext.value(c,m),a&&(u[Ul.FormPanelCtrlr.EventEnum.OkClick]=a.bind(c)),s&&(u[Ul.FormPanelCtrlr.EventEnum.CancelClick]=s.bind(c)),i&&(u[Ul.FormPanelCtrlr.EventEnum.AfterReady]=i.bind(c)),e&&1==t.DontLoadFromServer&&(e=Common.MetaObjectWeb.CreateMo(e),u[Ul.FormPanelCtrlr.EventEnum.AfterLoad]=function(t,n){n.Form._Form.Mo=Common.MetaObjectWeb.CreateMo(e)}.bind(c)),u){var p=[];for(var C in u)"Scope"==C?c=u.Scope:p.push({Event:C,Handler:u[C]});p.forEach((function(t){m.on(t.Event,(function(){var e={Form:Bw._wrap(this),Mo:Bw._wrap(this.Mo)};t.Handler.apply(c,[m,e])}))}))}return l?(m.Setting=l,Common.Async.ExecCallback(m.ShowFormWindow_WithoutLoad.bind(m),null,o,c,"Bw.Form.Show")):Common.Async.ExecCallback(m.ShowFormWindow.bind(m),null,o,c,"Bw.Form.Show"),m}}),t))},82633:()=>{Common.Cs.Define("Bw.Mo","Bw.Wrapper",{_Mo:null,constructor:function(t){this.callParent(arguments),this._Mo=t,this.Id=t.Id},GetId:function(){return this._Mo.Id},GetTypeDefId:function(){return this._Mo.GetTypeDefId()},GetMoCaption:function(){return this._Mo.GetCaption()},SetConditionalFormats:function(t){Ext.isArray(t)?this._Mo.$StyleIndex=t:this._Mo.$StyleIndex=[t]},GetValue:function(t){var e=this._Mo.GetFValue(t);return Bw._wrap(e)},SetStyleIndex:function(t,e){var n=this._Mo.$StyleIndex;n=void 0===n?[]:n,e?n=n.filter((function(e){return e!=t})):n.findIndex((function(e){return e==t}))||(n=n.push(t)),this._Mo.$StyleIndex=n},GetCaption:function(t){return this._Mo.GetFCaption(t)},SetValue:function(t,e){return e=Bw._unwrap(e),this._Mo.SetFValue(t,e)},GetValueByCaption:function(t){return this._Mo.GetFValueByCaption(t)},SetValueByCaption:function(t,e){return this._Mo.SetFValueByCaption(t,e)},SetAllFieldsChanged:function(){this._Mo.SetAllFieldsChanged()},IsNew:function(){return this._Mo.IsNew()},IsModified:function(){return this._Mo.IsModified()},IsFieldChanged:function(t){return this._Mo.IsFieldChanged(t)},IsFieldChangedByCaption:function(t){var e=this._Mo.$FieldDict[t];return this._Mo.IsFieldChanged(e)},GetCaptionOfField:function(){},statics:{CreateByTypeDef:function(t,e){var n;0!=e&&(n=Common.MetaObjectWeb.StateEnum.New);var r=new Common.MetaObjectWeb({$TypeDefId:t,$State:n});return new Bw._wrap(r)},CreateByData:function(t){var e=Common.MetaObjectWeb.CreateMo(t);return new Bw._wrap(e)}}}),Common.Cs.Define("Bw.MoList","Bw.Wrapper",{_MoList:null,constructor:function(t){this.callParent(arguments),this._MoList=t},GetMoById:function(t){return Bw._wrap(this._MoList.GetMoById(t))},GetMoByIndex:function(t){return Bw._wrap(this._MoList.GetMoByIndex(t))},ForEach:function(t,e){for(var n=0,r=this.GetCount();n<r;n++){var i=this.GetMoByIndex(n);if(0==t.call(e,i,n,this._MoList.MoDataList))break}},AddMo:function(t){return t=Bw._unwrap(t),this._MoList.AddMo(t)},RemoveMo:function(t,e,n){return this._MoList.RemoveMo(t,e,n)},RemoveAll:function(t,e){return this._MoList.RemoveAll(t,e)},Find:function(t,e,n){var r=[];return e=Ext.value(e,this),this.ForEach((function(i){if(1==t.call(e,i)&&(r.push(i),1==n))return!1})),r.length>0&&n&&(r=r[0]),r},GetCount:function(){return this._MoList.GetCount()},FindByFieldValue:function(){return Bw._wrap(this._MoList.FindByFieldValue.call(this._MoList,arguments))},GetIdList:function(){return this._MoList.GetIdList()},ConvertToArray:function(){return Bw._wrap(this._MoList.ConvertToArray())},statics:{CreateFromMoArray:function(t){if(!Ext.isEmpty(t)){0==Ext.isArray(t)&&(t=[t]),t=Bw._unwrap(t);var e=Common.MetaObjectListWeb.CreateFromMoArray(t);return Bw._wrap(e)}}}}),Bw.Mo.prototype.FilterByFieldValue=Bw.Mo.prototype.FindByFieldValue,Bw.Mo.prototype.Filter=Bw.Mo.prototype.Find},81798:()=>{Bw.Msg=Ul.MsgBox,Bw.Toast=Ul.Toast,Bw.Async=Common.Async},11953:()=>{Common.Cs.Define("Bw.Report","Bw.Wrapper",{_Ulv:null,constructor:function(t){this.callParent(arguments),this._Ulv=t},MatrixSaveList:function(){this._Ulv.MatrixSaveList()},ShowColumns:function(t){this._Ulv.ShowColumns(t)},HideColumns:function(t){this._Ulv.HideColumns(t)},OrderColumns:function(t){this._Ulv.OrderColumns(t)},SetColumnsSecondHeader:function(t,e){this._Ulv.SetColumnsSecondHeader(t,e)},DirtyColumns:function(t,e){this._Ulv.DirtyColumns(t,e)},ClearAllDirty:function(){this._Ulv.ClearAllDirty()},CollapseAllGroups:function(){this._Ulv.CollapseAllGroups()},ExpandAllGroups:function(){this._Ulv.ExpandAllGroups()},DirtyRow:function(t,e){this._Ulv.DirtyRow(t,e)},SetColumnsReadOnly:function(t,e){this._Ulv.SetColumnsReadOnly(t,e)},GetPathOfNodeInTree:function(t){var e=[];return this.GetData().ConvertToArray().forEach(function(n){0==e.length&&this._getParentHeir(n,t,e)&&e.push(n)}.bind(this)),e},_getParentHeir:function(t,e,n){if(t.GetId()==e.Id)return!0;if(t._Mo.$Children){var r=null;if(t._Mo.$Children.forEach(function(i){var o=new Bw.Mo(i);this._getParentHeir(o,e,n)&&null==r&&(n.push(o),r=t)}.bind(this)),null!=r)return!0}},SetColumnHeaderText:function(t,e){var n=Common.Util.TryGetValue(this._Ulv,"Adapter.Control._ulvViewer");n&&n.getColumnModel().setColumnHeader(t,e)},SetColumnHeaderTextByCaption:function(t,e){var n=this.GetColumnIndexByCaption(t);-1!=n&&this.SetColumnHeaderText(n,e)},GetColumnIndexByCaption:function(t){var e=Common.Util.TryGetValue(this._Ulv,"Adapter.Control._ulvViewer");if(e){var n=e.getColumnModel();if(null==n.config)return-1;for(var r=0;r<n.config.length;r++)if(n.config[r].header==t)return r}return-1},ShowMo:function(t){if(t.Unwrap){var e=t.Unwrap();this._Ulv.ShowMo(e)}else this._Ulv.ShowMo(t)},SelectItem:function(t){this._Ulv.SelectItem(t)},ClearAllSelected:function(){this._Ulv.ClearAllSelected()},ExitInlineEdit:function(){this._Ulv.ExitInlineEdit()},GetPrevSelectedId:function(){return this._Ulv.GetPrevSelectedId()},GetSelectedMo:function(){var t=this._Ulv.GetSelectedMetaObject();return Bw._wrap(t)},GetSelectedMoArray:function(){var t=this._Ulv.GetSelectedMetaObjectList();return Bw._wrap(t)},EnableCommand:function(t,e){var n=null;this._Ulv.CommandBarCtrlr.AllCommandList.forEach((function(e){t==e.Text&&(n=e.Id)})),null!=n&&this._Ulv.CommandBarCtrlr.EnableCommand(n,e,!0)},GetSelectedMoList:function(){var t=this._Ulv.GetSelectedMetaObjectList(),e=Common.MetaObjectListWeb.CreateFromMoArray(t);return Bw._wrap(e)},RefreshRowsByMosSimple:function(t,e,n){t=Bw._unwrap(t),e=Bw._unwrap(e),n=Bw._unwrap(n),this._Ulv.RefreshRowsByMosSimple(t,e,n)},RefreshRowsNoSelectionChange:function(t,e,n){t=Bw._unwrap(t),e=Bw._unwrap(e),n=Bw._unwrap(n),this._Ulv.RefreshRowsByMosNoSelectionChange(t,e,n)},RefreshRows:function(t,e,n){t=Bw._unwrap(t),e=Bw._unwrap(e),n=Bw._unwrap(n),this._Ulv.RefreshRowsByMos(t,e,n)},RefreshRowsByServer:function(t){var e=this._Ulv.UlvParams;e.RequestedMoIds=Common.MetaObjectListWeb.GetMoIdListFromArgument(t);var n=e.Flags;e.Flags={DataRows:!0},Bw.ExecuteReport({ulvParams:e},function(t){e.RequestedMoIds=null,e.Flags=n,this.RefreshRows(null,t.Data.MoDataList,null,!1,!0)}.bind(this),(function(){e.RequestedMoIds=null,e.Flags=n}))},GetData:function(){var t=this._Ulv.GetValue();return Bw._wrap(t)},GetSetting:function(){return this._Ulv.Setting},Reload:function(t){t=Ext.value(t,{}),Common.Async.ExecCallback(this._Ulv.Reload.bind(this._Ulv),t.SuccessFn,t.FailFn,t.Scope,"Bw.Report.Reload")},GetHostField:function(){return Bw._wrap(this._Ulv.FieldCtrlr)},GetHostForm:function(){return Bw._wrap(this._Ulv.FieldCtrlr.ParentFormPanel)},statics:{Show:function(t){if(!t.ShowInSystemContainer){var e=new Ul.UlvFormMultiSelectCtrlr;if(e.ShowOkCancelButtons=!0,e.HideToolbar=Ext.value(t.HideToolbar,!0),e.ShowSecondPanel=Ext.value(t.IsMutliSelect,!1),e.ShowSecondPanel=e.ShowSecondPanel||Ext.value(t.IsMultiSelect,!1),e.FormTitle=t.FormTitle,t.MoList&&(t.RequestedMoIds=t.MoList.GetIdList()),Bw.IsNotEmpty(t.ParameterValues)){for(var n=t.ParameterValues,r=0;r<n.length;r++)(n[r]instanceof Bw.Mo||n[r]instanceof Common.MetaObjectWeb)&&(n[r]=n[r].Id);t.ParameterValues=n}if(e._ulvParams1=new Ul.UlvParams({ReportId:t.ReportId,ReportName:t.ReportName,FolderId:t.FolderId,TypeDefId:t.TypeDefId,IsReadOnly:t.IsReadOnly,SearchMo:Bw.GetChangedMo(t.SearchMo),ParentMo:Bw.GetChangedMo(t.ParentMo),RequestedMoIds:t.RequestedMoIds,ParameterValues:t.ParameterValues,RelationFieldId:t.RelationFieldId,UsageEnum:Ul.UlvMainCtrlr.UlvUsageEnum.SelectionForm,SelectionEnum:t.IsMutliSelect?Ul.UlvMainCtrlr.UlvSelectionEnum.CheckList:Ul.UlvMainCtrlr.UlvSelectionEnum.Single,ColumnRequestEnum:Common.Enums.ColumnRequestEnum.All,Flags:t.HideSearchPanel?{SearchPanel:Common.Enums.DefaultableBoolean.False}:null,NoSelect:t.NoSelect,ShowAsPrintReport:t.ShowAsPrintReport}),t.GivenMoList&&(e._givenMoList=t.GivenMoList),t.CallBackFn){var i=Ext.value(t.Scope,null),o=t.CallBackFn;t.CallBackFn=function(t){o.call(i,Bw._wrap(t))}}e.ShowForm(t.CallBackFn)}},ShowInside:function(t,e){if(new Ul.UlvParams({Size:t.Size,ReportId:t.ReportId,ReportName:t.ReportName,FolderId:t.FolderId,TypeDefId:t.TypeDefId,IsReadOnly:t.IsReadOnly,SearchMo:Bw.GetChangedMo(t.SearchMo),ParentMo:Bw.GetChangedMo(t.ParentMo),RequestedMoIds:t.RequestedMoIds,ParameterValues:t.ParameterValues,RelationFieldId:t.RelationFieldId,UsageEnum:Ul.UlvMainCtrlr.UlvUsageEnum.SelectionForm,SelectionEnum:t.IsMutliSelect?Ul.UlvMainCtrlr.UlvSelectionEnum.CheckList:Ul.UlvMainCtrlr.UlvSelectionEnum.Single,ColumnRequestEnum:Common.Enums.ColumnRequestEnum.All,Flags:t.HideSearchPanel?{SearchPanel:Common.Enums.DefaultableBoolean.False}:null}),t.CallBackFn){var n=Ext.value(t.Scope,null),r=t.CallBackFn;t.CallBackFn=function(t){r.call(n,Bw._wrap(t))}}var i=new Ul.UlvMainCtrlr;Common.Async.Waterfall("Ul.UlvFormMultiSelectCtrlr._createFirstUlv",[i.Load.bind(i,t),function(t){Common.Async.DORETURNPARAMETER();var n=Ext.get(e).createChild({tag:"div",style:"display:inline;"});i.Adapter.Control.layout="fit",i.Adapter.Control.render(n),t()}.bind(this)],(function(t,e){Common.Async.Finalize(t,e)}))}}}),Bw.Report.ShowForm=Bw.Report.Show,Bw.Report.prototype.GetForm=Bw.Report.prototype.GetHostForm,Bw.Report.prototype.GetField=Bw.Report.prototype.GetHostField},25281:()=>{Common.Cs.Define("Bw.System","Bw.Wrapper",{_System:null,constructor:function(t){this.callParent(arguments),this._System=t},GetActiveReport:function(){var t=this._System.GetSelectedUlv();return Bw._wrap(t)},GetSetting:function(){return this._System.SystemData},ExecRibbonCommand:function(t){return this._System.ExecRibbonCommand(t)},SelectReportById:function(t){this._System.SelectNavItem(t)},SelectReportByName:function(t){this._System.SelectNavItemByName(t)},GetReportByNameInNavigator:function(t){var e=this._System.GetReportByNameInNavigator(t);return Bw._wrap(e)}})},41807:()=>{},27921:()=>{Common.Cs.Define("BarsaHelpDeskPost","Ul.DataViewTemplateManager",{Template:['<div class="afp-body afp-font-normal"> '," ",' <div class="afp-namerow afp-bottomborder"> ',' <div class="afp-font-title afp-title"> '," {[this.GetCaption(this.GetParentMo(), 'عنوان')]} "," </div> ",' <div class="afl-faint1 afl-font-smaller afl-border1 "> '," {[this.GetCaption(this.GetParentMo(), 'محصول')]} "," </div> "," <tpl if=\"this.IsNotEmpty(this.GetCaption(this.GetParentMo(), 'منشا'))\"> ",' <div class="afl-faint1 afl-font-smaller afl-border1 "> '," {[this.GetCaption(this.GetParentMo(), 'منشا')]} "," </div> "," </tpl> "," </div> "," ",' <tpl for="."> ',' <div class="afp-row dataview_row afp-bottomborder" data-id="{[this.GetMoId(values)]}"> '," <a id={[this.GetMoId(values)]}></a> ",' <div class="afp-row-title"> ',' <div class=" afp-avatar "> ',' <div class="afp-avatar-text" style="background-color:{[this.GetColorFromName(this.GetCaption(values, \'شخص ثبت كننده\'), 36)]};"> '," {[this.GetInitialsFromName(this.GetCaption(values, 'شخص ثبت كننده'), 36)]} "," </div> "," </div> ",' <div class="afp-sender-container"> ',' <div class="afp-sender-name afp-font-title"> '," {[this.GetCaption(values, 'شخص ثبت كننده')]} "," </div> ",' <div class="afp-sender-org afp-font-normal"> '," ( {[this.GetCaption(values, 'مركز ثبت كننده')]} ) "," </div> ",' <div class="afp-sender-date afp-faint1"> '," {[this.FormatDateSmart(this.GetValue(values, 'تاريخ ايجاد'))]} "," </div> ",' <div class="afp-button-container " style="border: red 1px"> ',' <tpl for="this.GetCommands()"> ',' <button class="afp-butn dataview_button" data-id="{values.Data.FieldDef.Id}">{Text}</button> '," </tpl> "," </div> "," </div> "," </div> ",' <div class="afp-row-main"> '," <tpl if=\"this.IsNotEmpty(this.GetValue(values, 'پست مبدا'))\"> ",' <div class="afp-row-origin-container afp-font-smaller" > ',' <div class="afp-row-origin-header"> '," {[this.GetCaption(values, 'ثبت كننده پست مبدا')]} ",' <a href="#{[this.GetId(values, \'پست مبدا\')]}"><i class="far fa-level-up-alt"></i></a> '," </div> ",' <div class="afp-row-origin-post" > '," {[this.GetCaption(values, 'پست مبدا')]} "," </div> "," </div> ",' <div style="margin-right:30px;"> '," {[this.GetCaption(values, 'شرح')]} "," </div> "," </tpl> "," <tpl if=\"this.IsEmpty(this.GetValue(values, 'پست مبدا'))\"> "," {[this.GetCaption(values, 'شرح')]} "," </tpl> "," </div> "," <tpl if=\"this.IsNotEmpty(this.GetValue(values, 'پيوست'))\"> ",' <div class="afp-attach"> '," <tpl for=\"this.GetValue(values, 'پيوست').Files\"> ",' <div class="afp-attach-item" data-id="{Id}" ',' data-size="1"> ',' <img class="afp-attach-icon" src="AttDefIcon.png" /> ',' <span class="afp-attach-filename" data-id="{Id}">{FileName}</span>'," </div> "," </tpl> "," </div> "," </tpl> "," </div> "," </tpl> "," ","</div> "],_avatarColors:["#1abc9c","#2ecc71","#3498db","#9b59b6","#34495e","#16a085","#27ae60","#2980b9","#8e44ad","#2c3e50","#f1c40f","#e67e22","#e74c3c","#ecf0f1","#95a5a6","#f39c12","#d35400","#c0392b","#bdc3c7","#7f8c8d"],HascommandAccess:function(t){return!0},GetUserName:function(t){var e=[];return t.A_Creator_FName&&e.push(t.A_Creator_FName),t.A_Creator_LName&&e.push(t.A_Creator_LName),Ext.util.Format.htmlEncode(e.join(" "))},OnRender:function(t){this.callParent(arguments),$(".afp-attach-item").click(this._onAttachmentClick.bind(this)),$(".afp-row-origin-header a").click(this._onAnchorClick.bind(this))},GetRowClass:function(){return".afp-row"},_onAttachmentClick:function(t){var e=t.currentTarget.getAttribute("data-id");Common.File.OpenFile(e,!1,this.FieldCtrlr,!1,!1)},_onAnchorClick:function(t){var e=t.currentTarget.getAttribute("href"),n=$(e);Ext.isNotEmpty(n)&&n[0].scrollIntoView({behavior:"smooth",block:"start"})},GetAvatarLetter:function(t,e){t=t||"?",e=e||60;var n,r,i,o,a=this.GetInitialsFromName(t);return window.devicePixelRatio&&(e*=window.devicePixelRatio),n=a.charCodeAt(0)%this._avatarColors.length,(r=document.createElement("canvas")).width=e,r.height=e,(i=r.getContext("2d")).fillStyle=this._avatarColors[n-1],i.fillRect(0,0,r.width,r.height),i.font=Math.round(r.width/2)+"px Arial",i.textAlign="center",i.fillStyle="#FFF",i.fillText(a,e/2,e/1.5),o=r.toDataURL(),r=null,o},GetInitialsFromName:function(t){t=t||"";var e=String(t).toUpperCase().split(" ");return 1==e.length?e[0]?e[0].charAt(0):"?":e[0].charAt(0)+"‌‌"+e[1].charAt(0)},GetColorFromName:function(t){var e=this.GetInitialsFromName(t).charCodeAt(0)%this._avatarColors.length;return this._avatarColors[e]}})},94421:()=>{Common.Cs.Define("BarsaForumTicket","Ul.DataViewTemplateManager",{Template:['<div class="afl-body afl-font-normal"> ',' <div class="afl-col"> ',' <div class="afl-colavatar"></div> ',' <div class="afl-colparent">عنوان</div> ',' <div class="afl-colreplies">پاسخ ها</div> ',' <div class="afl-collastreplies">آخرین پیام</div> '," </div> "," ",' <tpl for="."> ',' <div class="afl-row dataview_row"> ',' <div class=" afl-rowavatar afl-padding"> ',' <div class="afl-avatar-text" style="background-color:{[this.GetColorFromName(this.GetValue(values, \'ثبت كننده\'), 36)]};"> '," {[this.GetInitialsFromName(this.GetValue(values, 'ثبت كننده'), 36)]} "," </div> "," </div> ",' <div class=" afl-rowparent "> ',' <div class=" afl-rowmain afl-padding"> ',' <div class="afl-font-larger"> '," {[this.GetValue(values, 'عنوان')]} "," </div> ",' <div class="afl-faint1 afl-font-smaller afl-border1 "> '," {[this.GetCaption(values, 'محصول')]} "," </div> "," <tpl if=\"this.IsNotEmpty(this.GetCaption(values, 'منشا'))\"> ",' <div class="afl-faint1 afl-font-smaller afl-border1 "> '," {[this.GetCaption(values, 'منشا')]} "," </div> "," </tpl> ",' <span class="afl-faint1 afl-font-smaller"> '," {[this.GetValue(values, 'ثبت كننده')]} "," </span> ",' <span class="afl-faint2 afl-font-smaller" style="display: inline-block">'," {[this.FormatDateSmart(this.GetValue(values, 'تاريخ ايجاد'))]} "," </span> "," </div> "," </div> ",' <div class=" afl-rowstat afl-vpair afl-padding"> ',' <div class="afl-hpair afl-replies "> ',' <span class="afl-hpair-1 afl-faint1">پاسخ ها:</span> ',' <span class="afl-hpair-2 "> '," {[this.GetValue(values, 'تعداد پاسخ')]} "," </span> "," </div> ",' <div class="afl-hpair afl-hide-cond1"> ',' <span class="afl-faint1">دیده ها:</span> '," <span class=\"\">{[this.GetValue(values, 'تعداد بار ديده شده')]}</span> "," </div> "," </div> ",' <div class=" afl-rowlastpost afl-vpair afl-padding afl-alignreverse"> ',' <div class="afl-hide-cond1">علی احدی</div> ',' <div class="afl-faint1">'," 16 اردیبهشت 97 "," </div> "," </div> "," </div> "," </tpl> "," ","</div> "],_avatarColors:["#1abc9c","#2ecc71","#3498db","#9b59b6","#34495e","#16a085","#27ae60","#2980b9","#8e44ad","#2c3e50","#f1c40f","#e67e22","#e74c3c","#ecf0f1","#95a5a6","#f39c12","#d35400","#c0392b","#bdc3c7","#7f8c8d"],HascommandAccess:function(t){return!0},GetUserName:function(t){var e=[];return t.A_Creator_FName&&e.push(t.A_Creator_FName),t.A_Creator_LName&&e.push(t.A_Creator_LName),Ext.util.Format.htmlEncode(e.join(" "))},OnRender:function(t){$(".af-btn").click(this._onBtnClick.bind(this))},OnRenderRow:function(t){$(t).click(this._onBtnClick.bind(this))},_onBtnClick:function(t){var e=t.currentTarget.getAttribute("CommandName");Ext.defer((function(){this.DataViewControl.GeneralClickHandler(e,t)}),200,this)},GetAvatarLetter:function(t,e){t=t||"?",e=e||60;var n,r,i,o,a=this.GetInitialsFromName(t);return window.devicePixelRatio&&(e*=window.devicePixelRatio),n=a.charCodeAt(0)%this._avatarColors.length,(r=document.createElement("canvas")).width=e,r.height=e,(i=r.getContext("2d")).fillStyle=this._avatarColors[n-1],i.fillRect(0,0,r.width,r.height),i.font=Math.round(r.width/2)+"px Arial",i.textAlign="center",i.fillStyle="#FFF",i.fillText(a,e/2,e/1.5),o=r.toDataURL(),r=null,o},GetInitialsFromName:function(t){t=t||"";var e=String(t).toUpperCase().split(" ");return 1==e.length?e[0]?e[0].charAt(0):"?":e[0].charAt(0)+"‌‌"+e[1].charAt(0)},GetColorFromName:function(t){var e=this.GetInitialsFromName(t)