@osovitny/anatoly 2.0.25 → 2.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/bundles/osovitny-anatoly.umd.js +1803 -1638
  2. package/bundles/osovitny-anatoly.umd.js.map +1 -1
  3. package/bundles/osovitny-anatoly.umd.min.js +2 -2
  4. package/bundles/osovitny-anatoly.umd.min.js.map +1 -1
  5. package/esm2015/lib/core/convert.js +1 -5
  6. package/esm2015/lib/core/core.module.js +7 -8
  7. package/esm2015/lib/core/go/base-go.service.js +4 -4
  8. package/esm2015/lib/core/interceptors/httpInterceptor.js +2 -2
  9. package/esm2015/lib/core/localization/localization.service.js +3 -3
  10. package/esm2015/lib/core/localization/localizationSettings.module.js +3 -3
  11. package/esm2015/lib/core/notifications/services/notification-service.js +1 -1
  12. package/esm2015/lib/core/services/appcontext.service.js +12 -12
  13. package/esm2015/lib/core/services/idle.service.js +65 -0
  14. package/esm2015/lib/core/services/web-storage.service.js +65 -0
  15. package/esm2015/lib/data/consts.js +2 -2
  16. package/esm2015/lib/data/data.module.js +6 -6
  17. package/esm2015/lib/data/services/notifications/notifications-api-service.js +45 -0
  18. package/esm2015/lib/ui/components/billing/buyaccess-button.component.js +9 -9
  19. package/esm2015/lib/ui/components/billing/upgrade-plan-button.component.js +7 -7
  20. package/esm2015/lib/ui/components/html-editor/base-html-editor.component.js +19 -19
  21. package/esm2015/lib/ui/components/loading/loading.component.js +49 -0
  22. package/esm2015/lib/ui/components/spinner/spinner.component.js +73 -0
  23. package/esm2015/lib/ui/pipes/filesize.pipe.js +41 -0
  24. package/esm2015/lib/ui/pipes/replace-text.pipe.js +36 -0
  25. package/esm2015/lib/ui/pipes/safeHtml.pipe.js +36 -0
  26. package/esm2015/lib/ui/ui.module.js +19 -13
  27. package/esm2015/public-api.js +57 -9
  28. package/fesm2015/osovitny-anatoly.js +1450 -1287
  29. package/fesm2015/osovitny-anatoly.js.map +1 -1
  30. package/lib/core/convert.d.ts +0 -4
  31. package/lib/core/go/base-go.service.d.ts +1 -1
  32. package/lib/core/services/appcontext.service.d.ts +2 -2
  33. package/lib/core/services/idle.service.d.ts +13 -0
  34. package/lib/core/services/web-storage.service.d.ts +17 -0
  35. package/lib/data/services/notifications/notifications-api-service.d.ts +9 -0
  36. package/lib/ui/components/billing/buyaccess-button.component.d.ts +3 -3
  37. package/lib/ui/components/billing/upgrade-plan-button.component.d.ts +1 -1
  38. package/lib/ui/components/html-editor/base-html-editor.component.d.ts +2 -2
  39. package/lib/ui/components/loading/loading.component.d.ts +10 -0
  40. package/lib/ui/components/spinner/spinner.component.d.ts +22 -0
  41. package/lib/ui/pipes/filesize.pipe.d.ts +5 -0
  42. package/lib/ui/pipes/replace-text.pipe.d.ts +4 -0
  43. package/lib/ui/pipes/safeHtml.pipe.d.ts +7 -0
  44. package/lib/ui/ui.module.d.ts +2 -3
  45. package/osovitny-anatoly.metadata.json +1 -1
  46. package/package.json +1 -1
  47. package/public-api.d.ts +53 -8
  48. package/esm2015/lib/core/alerts.js +0 -145
  49. package/esm2015/lib/core/consts/index.js +0 -21
  50. package/esm2015/lib/core/index.js +0 -37
  51. package/esm2015/lib/core/localization/index.js +0 -26
  52. package/esm2015/lib/data/index.js +0 -26
  53. package/esm2015/lib/ui/index.js +0 -43
  54. package/lib/core/alerts.d.ts +0 -12
  55. package/lib/core/consts/index.d.ts +0 -2
  56. package/lib/core/index.d.ts +0 -13
  57. package/lib/core/localization/index.d.ts +0 -4
  58. package/lib/data/index.d.ts +0 -5
  59. package/lib/ui/index.d.ts +0 -16
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("sweetalert2"),require("@angular/core"),require("@angular/common"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs"),require("ngx-toastr"),require("uuid"),require("@ngx-translate/core"),require("date-fns"),require("date-fns/locale/en-US"),require("@angular/router"),require("@angular/forms"),require("angular-froala-wysiwyg"),require("@ngx-translate/http-loader")):"function"==typeof define&&define.amd?define("@osovitny/anatoly",["exports","sweetalert2","@angular/core","@angular/common","@angular/common/http","rxjs/operators","rxjs","ngx-toastr","uuid","@ngx-translate/core","date-fns","date-fns/locale/en-US","@angular/router","@angular/forms","angular-froala-wysiwyg","@ngx-translate/http-loader"],e):e(((t=t||self).osovitny=t.osovitny||{},t.osovitny.anatoly={}),t.Swal,t.ng.core,t.ng.common,t.ng.common.http,t.rxjs.operators,t.rxjs,t.i1,t.uuid,t.i1$1,t.dateFns,t.enUS,t.ng.router,t.ng.forms,t.angularFroalaWysiwyg,t.httpLoader)}(this,(function(t,e,n,r,o,i,a,s,l,u,c,p,d,f,h,g){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e,p=p&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p;var m=JSON.parse(document.getElementById("contextInitState").getAttribute("data-contextinitstate")),y=JSON.parse(document.getElementById("appCoreSettings").getAttribute("data-appcoresettings"));function v(t,e){if(t)throw new Error(e+" has already been loaded. Import "+e+" modules in the AppModule only.")}var b=function(){function t(){}return t.Info=function(t){e.fire({title:"Information",text:t,icon:"info",confirmButtonText:"OK"})},t.Warning=function(t){e.fire({title:"Warning",text:t,icon:"warning",confirmButtonText:"OK"})},t.Error=function(t){e.fire({title:"Error",text:t,icon:"error",confirmButtonText:"OK"})},t.NotImplemented=function(){this.Warning("Not Implemented Yet")},t.ErrorOccurred=function(){this.Error("Sorry, an unexpected error occurred")},t.AreYouSure=function(t,n,r,o,i,a){void 0!==n&&null!=n||(n="Are you sure?"),e.fire({title:n,text:t,icon:"warning",confirmButtonText:r,cancelButtonText:o,showCancelButton:!0}).then((function(t){t.value?i&&i():t.dismiss!==e.DismissReason.cancel&&t.dismiss!==e.DismissReason.close||a&&a()}))},t.Success=function(t,n,r){void 0!==n&&null!=n||(n="Success"),t||(t="Operation was successful"),e.fire({title:n,text:t,icon:"success",confirmButtonText:"OK"}).then((function(){r&&r()}))},t.Cancel=function(t){t||(t="Operation has been cancled"),e.fire({title:"Cancelled",text:t,icon:"info"})},t.NotificationCancel=function(t,n){void 0!==n&&null!=n||(n="Canceled"),t||(t="Operation has been canceled"),e.mixin({toast:!0,position:"top-end",showConfirmButton:!1,timer:3e3,timerProgressBar:!0}).fire({title:n,text:t,icon:"info"})},t.NotificationSuccess=function(t,n){void 0!==n&&null!=n||(n="Success"),t||(t="Operation was successful"),e.mixin({toast:!0,position:"top-end",showConfirmButton:!1,timer:3e3,timerProgressBar:!0}).fire({title:n,text:t,icon:"success"})},t}(),I=function(t,e){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/router"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs"),require("@ngx-translate/core"),require("date-fns"),require("date-fns/locale/en-US"),require("@angular/common"),require("@ngx-translate/http-loader"),require("sweetalert2"),require("ngx-toastr"),require("uuid"),require("@angular/forms"),require("@angular/platform-browser"),require("angular-froala-wysiwyg")):"function"==typeof define&&define.amd?define("@osovitny/anatoly",["exports","@angular/core","@angular/router","@angular/common/http","rxjs/operators","rxjs","@ngx-translate/core","date-fns","date-fns/locale/en-US","@angular/common","@ngx-translate/http-loader","sweetalert2","ngx-toastr","uuid","@angular/forms","@angular/platform-browser","angular-froala-wysiwyg"],e):e(((t=t||self).osovitny=t.osovitny||{},t.osovitny.anatoly={}),t.ng.core,t.ng.router,t.ng.common.http,t.rxjs.operators,t.rxjs,t.i1$1,t.dateFns,t.enUS,t.ng.common,t.httpLoader,t.Swal,t.i1$2,t.uuid,t.ng.forms,t.ng.platformBrowser,t.angularFroalaWysiwyg)}(this,(function(t,e,n,r,o,i,a,s,u,c,l,p,d,f,h,g,m){"use strict";u=u&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u,p=p&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p;var y=JSON.parse(document.getElementById("contextInitState").getAttribute("data-contextinitstate")),v=JSON.parse(document.getElementById("appCoreSettings").getAttribute("data-appcoresettings")),b=function(){function t(t,e){this.route=t,this.router=e}return t.prototype.locationReload=function(){window.location.reload()},t}();function S(t,e){if(t)throw new Error(e+" has already been loaded. Import "+e+" modules in the AppModule only.")}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,5 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function S(t,e){function n(){this.constructor=t}I(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function x(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function C(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(w(arguments[e]));return t}Object.create;var P=function(){function t(){}return t.prototype.logError=function(t){console.error(t)},t.prototype.logInformation=function(t){console.info(t)},t}();P.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new P},token:P,providedIn:"root"}),P.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],P.ctorParameters=function(){return[]};var L=function(){function t(t){this.http=t,this.baseUrl=""}return t.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},t.prototype.get=function(t,e,n){n||(n="json");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.get(r,{responseType:n}).pipe(i.map((function(t){return t})))},t.prototype.post=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t;return this.http.post(r,e,{responseType:n})},t.prototype.postQS=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.post(r,null,{responseType:n})},t.prototype.delete=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.delete(r,{responseType:n})},t.prototype.getById=function(t){return this.get("getById",{id:t})},t.prototype.getAll=function(t){return this.get("getall",t).pipe(i.map((function(t){return t})))},t.prototype.getJsonFile=function(t,e,n){e||(e="/dist/jsons"),n||(n="1.0");var r=e+"/"+t+"?"+n;return this.http.get(r).pipe(i.map((function(t){return t})))},t}();L.decorators=[{type:n.Injectable}],L.ctorParameters=function(){return[{type:o.HttpClient}]};var z=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.current=null,n.successes=[],n.subscription=null,n.baseUrl="/api/appContext",n}return S(e,t),e.prototype.getCurrent=function(t){var e=this;void 0!==t&&(null==this.current?(this.successes.push(t),null==this.subscription&&(this.subscription=this.get("GetCurrentContext",null).subscribe((function(t){e.dataReceived(t)}),(function(t){})))):t(this.current))},e.prototype.dataReceived=function(t){this.current=t;for(var e=0;e<this.successes.length;e++){(0,this.successes[e])(t)}this.successes=[],this.subscription.unsubscribe(),this.subscription=null,this.current=null},e.prototype.isUserSignedIn=function(){return m.isUserSignedIn},e.prototype.isUserAdmin=function(){return m.isUserAdmin},e}(L);z.decorators=[{type:n.Injectable}],z.ctorParameters=function(){return[{type:o.HttpClient}]};var O=function(t){function e(){var e=t.call(this,!1)||this;return e.counter=0,e.isFreezed=!1,e}return S(e,t),e.prototype.show=function(){this.counter++;var t=this;setTimeout((function(){t.counter>0&&t.next(!0)}),1e3)},e.prototype.hide=function(){this.counter<=0||(this.counter--,0==this.counter&&this.next(!1))},e.prototype.freeze=function(t){var e=this;void 0===t&&(t=1e3),this.isFreezed=!0;setTimeout((function(){e.isFreezed=!1}),t)},e}(a.BehaviorSubject);O.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new O},token:O,providedIn:"root"}),O.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],O.ctorParameters=function(){return[]};var T=function(){function t(){}return t.newGuid=function(){return l.v4()},t}(),N=function(){function t(t){this.toastrService=t,this._sessionNotifications=new a.BehaviorSubject([]),this._serverNotifications=new a.BehaviorSubject([]),this.sessionNotifications$=this._sessionNotifications.asObservable(),this.serverNotifications$=this._serverNotifications.asObservable()}return t.prototype.addSessionNotification=function(t,e){var n={id:T.newGuid(),isNew:!0,isSession:!0,text:t,type:e,createdDate:new Date(Date.now()).toISOString()};this.addSessionNotificationToList(n)},t.prototype.addSessionNotificationToList=function(t){this.sessionNotifications=C([t],this.sessionNotifications)},t.prototype.removeNotification=function(t,e){e?this.sessionNotifications=this.sessionNotifications.filter((function(e){return e.id!==t})):this.serverNotifications=this.serverNotifications.filter((function(e){return e.id!==t}))},t.prototype.success=function(t,e,n,r){void 0===r&&(r=!0),t=V.getLocalizedValue(t,e,"OperationSuccessFull"),n=V.getLocalizedValue(n),this.toastrService.success(t,n,{timeOut:3e3,progressBar:!0}),r&&this.addSessionNotification(t,"success")},t.prototype.info=function(t,e,n){t=V.getLocalizedValue(t,e),n=V.getLocalizedValue(n),this.toastrService.info(t,n,{timeOut:3e3,progressBar:!0})},t.prototype.warning=function(t,e,n){t=V.getLocalizedValue(t,e),n=V.getLocalizedValue(n),this.toastrService.warning(t,n,{timeOut:3e3,progressBar:!0})},t.prototype.error=function(t,e,n,r){void 0===r&&(r=!0),t=V.getLocalizedValue(t,e,"ErrorOccured"),n=V.getLocalizedValue(n),this.toastrService.error(t,n,{timeOut:3e3,progressBar:!0}),r&&this.addSessionNotification(t,"error")},t.prototype.cancel=function(t,e,n){t=V.getLocalizedValue(t,e,"OperationCancelled"),n=V.getLocalizedValue(n),this.toastrService.info(t,n,{timeOut:3e3,progressBar:!0})},Object.defineProperty(t.prototype,"sessionNotifications",{get:function(){return this._sessionNotifications.getValue()},set:function(t){this._sessionNotifications.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"serverNotifications",{get:function(){return this._serverNotifications.getValue()},set:function(t){this._serverNotifications.next(t)},enumerable:!1,configurable:!0}),t}();N.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new N(n.ɵɵinject(s.ToastrService))},token:N,providedIn:"root"}),N.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],N.ctorParameters=function(){return[{type:s.ToastrService}]};var E,D=[P,N,z,O],U=function(t,e){this.injector=t,v(e,"AnatolyCoreModule"),E=this.injector};U.decorators=[{type:n.NgModule,args:[{imports:[r.CommonModule],exports:[],providers:C(D)}]}],U.ctorParameters=function(){return[{type:n.Injector},{type:U,decorators:[{type:n.Optional},{type:n.SkipSelf}]}]};var A=function(){function t(){}return t.toLocalizedDateTime=function(t){return t?new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())):null},t}(),B=function(){function t(t){this.translate=t,this.setSupportedLanguages(["en"])}return t.prototype.format=function(t,e){return t.replace(/{(\d+)}/g,(function(t,n){return void 0!==e[n]?e[n]:t}))},t.prototype.configureTranslationSettings=function(t){return t.setDefaultLang("en"),"en"},t.prototype.getBrowserLanguage=function(){return this.translate.getBrowserLang()},t.prototype.getDatefnsLocale=function(){var t;switch(this.getBrowserLanguage()){case"en":t={locale:p};break;default:t={locale:p}}return t},t.prototype.setDefaultLanguage=function(t){this.translate.setDefaultLang(t)},t.prototype.setSupportedLanguages=function(t){this.translate.addLangs(t)},t.prototype.updateLanguage=function(t){this.translate.use(t)},t.prototype.getLocalizedValue=function(t,e){var n=this.translate.instant(t);return e&&0!==e.length?this.format(n,e):n},t.prototype.getLocalizedDate=function(t){return c.isValid(new Date(t))?c.format(new Date(t),y.DATE_FORMATS.angular,this.dateFnsLocale):"Invalid Date"},t.prototype.getLocalizedDateTime=function(t){var e=new Date(t);if(c.isValid(e)){var n=A.toLocalizedDateTime(e);return c.format(n,y.DATE_FORMATS.angularWithTime,this.dateFnsLocale)}return"Invalid Date"},t.prototype.getLocalizedDistanceToNowInWords=function(t){return c.isValid(new Date(t))?c.formatDistanceToNow(new Date(t),this.dateFnsLocale):"Invalid Date"},t.prototype.getLocalizedDistanceInWords=function(t,e){return c.isValid(new Date(t))&&c.isValid(new Date(e))?c.formatDistance(new Date(t),new Date(e),this.dateFnsLocale):"Invalid Date"},t}();B.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new B(n.ɵɵinject(u.TranslateService))},token:B,providedIn:"root"}),B.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],B.ctorParameters=function(){return[{type:u.TranslateService}]};var V=function(){function t(){}return t.getValueByNameInQS=function(e){return t.getValueByName(location.search,e)},t.getValueByName=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))},t.copyToClipBoard=function(t,e){t.preventDefault();var n=document.createElement("textarea");n.style.position="fixed",n.style.left="0",n.style.top="0",n.style.opacity="0",n.value=e,document.body.appendChild(n),n.focus(),n.select(),document.execCommand("copy"),document.body.removeChild(n)},t.downloadFile=function(t,e){var n=document.createElement("a");n.download=t,n.href=e,n.click()},Object.defineProperty(t,"localizationService",{get:function(){return E.get(B)},enumerable:!1,configurable:!0}),t.getLocalizedValue=function(t,e,n){return!t&&n?this.localizationService.getLocalizedValue(n):t?this.localizationService.getLocalizedValue(t,e):t},t.downloadBlobFile=function(e,n){if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(e,n);else{var r=window.URL.createObjectURL(e);t.downloadFile(n,r)}},t}(),j=function(){function t(){this.subs=[]}return t.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.subs=this.subs.concat(t)},Object.defineProperty(t.prototype,"sink",{set:function(t){this.subs.push(t)},enumerable:!1,configurable:!0}),t.prototype.unsubscribe=function(){this.subs.forEach((function(t){return t&&t.unsubscribe()})),this.subs=[]},t}(),q=function(){function t(t,e){this.route=t,this.router=e}return t.prototype.locationReload=function(){window.location.reload()},t}();q.decorators=[{type:n.Injectable}],q.ctorParameters=function(){return[{type:d.ActivatedRoute},{type:d.Router}]};var R=function(){function t(t){this.injector=t}return t.prototype.handleError=function(t){throw this.injector.get(P).logError(t),t},t}();R.decorators=[{type:n.Injectable}],R.ctorParameters=function(){return[{type:n.Injector}]};var F=function(){function t(t,e){this.loadingService=t,this.loggingService=e,this.longRunningExceptionsList=[],this.autoCDNSASTokenUrls=["chunks","resources"],this.externalSiteUrls=["azurewebsites.net"]}return t.prototype.intercept=function(t,e){var n,r,a,s,l,u,c=this,p=y.IsCDNEnabled,d=y.CDNSASToken,f=this.loadingService.isFreezed,h=!f,g=t.url.toLowerCase(),m=t.url;if(!f)try{for(var v=x(this.longRunningExceptionsList),b=v.next();!b.done;b=v.next()){var I=b.value;if(g.indexOf(this.longRunningExceptionsList[I])>=0){h=!1;break}}}catch(t){n={error:t}}finally{try{b&&!b.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}if(p)try{for(var S=x(this.autoCDNSASTokenUrls),w=S.next();!w.done;w=S.next()){I=w.value;if(g.indexOf(this.autoCDNSASTokenUrls[I])>=0){t=t.clone({url:m+d});break}}}catch(t){a={error:t}}finally{try{w&&!w.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}try{for(var C=x(this.externalSiteUrls),P=C.next();!P.done;P=C.next()){I=P.value;if(g.indexOf(this.externalSiteUrls[I])>=0){!0;break}}}catch(t){l={error:t}}finally{try{P&&!P.done&&(u=C.return)&&u.call(C)}finally{if(l)throw l.error}}if(g.indexOf("/api/")>-1){var L="",z=(new Date).getTime().toString();L=g.indexOf("?")>-1?m+"&t="+z:m+"?t="+z,t=t.clone({url:L})}return t=t.clone({headers:t.headers.set("Accept","application/json")}),this.onRequestStart(h),e.handle(t).pipe(i.tap((function(t){t instanceof o.HttpResponse&&c.onRequestEnd(h)}),(function(t){c.onRequestEnd(h),c.loggingService.logError(t)})))},t.prototype.onRequestStart=function(t){t&&this.loadingService.show()},t.prototype.onRequestEnd=function(t){t&&this.loadingService.hide()},t}();F.decorators=[{type:n.Injectable}],F.ctorParameters=function(){return[{type:O},{type:P}]};var k=function(t){function e(e){var n=t.call(this,[])||this;return n.http=e,n.baseReadUrl="",n.data=[],n}return S(e,t),e.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},e.prototype.read=function(e,n,r){var o=this;if(this.data.length)return t.prototype.next.call(this,this.data);var a=this.baseReadUrl;void 0===e&&(e=this.savedReadParams),e&&(a=this.baseReadUrl+""+this.serializeParams(e),this.savedReadParams=e),this.http.get(a).pipe(i.map((function(t){return t}))).subscribe((function(e){t.prototype.next.call(o,e),n&&n()}),(function(t){r&&r(t)}))},e}(a.BehaviorSubject);k.decorators=[{type:n.Injectable}],k.ctorParameters=function(){return[{type:o.HttpClient}]};var M=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl="",n}return S(e,t),e.prototype.reset=function(){this.data=[]},e.prototype.resetItem=function(e){if(e){var n=this.data.find((function(t){return t.Id===e.Id}));Object.assign(n,e),t.prototype.next.call(this,this.data)}},e.prototype.save=function(t,e,n){var r=this,o=e?"add":"update";this.reset(),this.post(o,t).subscribe((function(){}),(function(){r.read()}),(function(){r.read(),n&&n()}))},e.prototype.remove=function(t,e){var n=this;this.reset(),this.post("remove",t).subscribe((function(){}),(function(){n.read()}),(function(){n.read(),e&&e()}))},e.prototype.post=function(t,e){var n=this.baseUrl+""+t+this.serializeParams(e);return this.http.post(n,e).pipe(i.map((function(t){return t})))},e}(k);M.decorators=[{type:n.Injectable}],M.ctorParameters=function(){return[{type:o.HttpClient}]};var G="api/billing",_=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl=G,n}return S(e,t),e.prototype.requestNewSubscription=function(t,e,n){this.postQS("requestNewSubscription",{requestedPlan:t}).subscribe((function(t){}),(function(t){n&&n()}),(function(){e&&e()}))},e.prototype.cancelRequestedSubscription=function(t,e){this.postQS("cancelRequestedSubscription",null).subscribe((function(t){}),(function(t){e&&e()}),(function(){t&&t()}))},e.prototype.buyAccess=function(t,e,n){this.postQS("buyAccess",{requestedPlan:t}).subscribe((function(t){}),(function(t){n&&n()}),(function(){e&&e()}))},e}(L);_.decorators=[{type:n.Injectable}],_.ctorParameters=function(){return[{type:o.HttpClient}]};var H=function(t){v(t,"AnatolyDataModule")};H.decorators=[{type:n.NgModule,args:[{imports:[r.CommonModule],providers:[_]}]}],H.ctorParameters=function(){return[{type:H,decorators:[{type:n.Optional},{type:n.SkipSelf}]}]};var K=function(){function t(t,e){this.appcontext=t,this.api=e,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t.prototype.onBuyPlan=function(){var t="Requested plan: "+this.plantitle+" ",e=this;b.AreYouSure(t,"Buying access","Confirm change","Cancel",(function(){e.api.buyAccess(e.plan,(function(){b.Success("Access Granted",null,(function(){window.location.reload()}))}))}))},t}();K.decorators=[{type:n.Component,args:[{selector:"anatoly-buyaccess-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="plan != currentPlan && currentPlan == 1" (click)="onBuyPlan()">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n'}]}],K.ctorParameters=function(){return[{type:z},{type:_}]},K.propDecorators={plan:[{type:n.Input}],plantitle:[{type:n.Input}]};var Y=function(){function t(t){this.appcontext=t,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle="",this.requestedPlan=0,this.requestedPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString,t.requestedPlan=e.account.requestedBillingPlan,t.requestedPlanTitle=e.account.requestedBillingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t}();Y.decorators=[{type:n.Component,args:[{selector:"anatoly-subscribe-plan-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="requestedPlan != null && requestedPlan != 0 && plan == requestedPlan">\r\n Requested\r\n </button>\r\n\r\n <anatoly-upgrade-plan-button *ngIf="plan != currentPlan && plan != requestedPlan"\r\n [currentplantitle]="currentPlanTitle"\r\n [requestedplan]=plan\r\n [requestedplantitle]="plantitle">\r\n </anatoly-upgrade-plan-button>\r\n </div>\r\n</div>\r\n'}]}],Y.ctorParameters=function(){return[{type:z}]},Y.propDecorators={plan:[{type:n.Input}],plantitle:[{type:n.Input}]};var W=function(){function t(t){this.api=t}return t.prototype.onUpgradePlan=function(){var t="Current plan: "+this.currentplantitle+" New plan: "+this.requestedplantitle,e=this;b.AreYouSure(t,"Change billing plan","Confirm change","Cancel",(function(){e.api.requestNewSubscription(e.requestedplan,(function(){b.Success("Your request for changing plan has been sent.",null,(function(){window.location.reload()}))}))}))},t}();W.decorators=[{type:n.Component,args:[{selector:"anatoly-upgrade-plan-button",template:'<button class="btn btn-block btn-primary" (click)="onUpgradePlan()">\r\n Upgrade\r\n</button>\r\n'}]}],W.ctorParameters=function(){return[{type:_}]},W.propDecorators={currentplantitle:[{type:n.Input}],requestedplan:[{type:n.Input}],requestedplantitle:[{type:n.Input}]};var Q=function(){};Q.decorators=[{type:n.Component,args:[{selector:"anatoly-signin-button",template:'<a href="identity/signIn" class="{{classbtn}}">Sign In</a>\r\n'}]}],Q.ctorParameters=function(){return[]},Q.propDecorators={classbtn:[{type:n.Input}]};var J=function(){};J.decorators=[{type:n.Component,args:[{selector:"anatoly-signout-button",template:'<a href="identity/signOut" class="{{classbtn}}">Sign Out</a>\r\n'}]}],J.ctorParameters=function(){return[]},J.propDecorators={classbtn:[{type:n.Input}]};var X=function(){};X.decorators=[{type:n.Component,args:[{selector:"anatoly-signup-button",template:'<a href="identity/signup" class="{{classbtn}}">Sign Up</a>\r\n'}]}],X.propDecorators={classbtn:[{type:n.Input}]};var Z=function(){function t(){}return t.prototype.ngOnInit=function(){null==this.title&&(this.title="")},t}();Z.decorators=[{type:n.Component,args:[{selector:"anatoly-content-header",template:'<h2 class="page-header">\r\n {{title}}\r\n \x3c!--<small>Optional {{title}}</small>--\x3e\r\n</h2>\r\n'}]}],Z.propDecorators={title:[{type:n.Input}]};var tt=function(){function t(){}return t.prototype.getQSId=function(){var t=V.getValueByNameInQS("id");return void 0===t||""==t?null:t},t}(),et=function(t){function e(){var e=t.call(this)||this;return e.formSubmitted=!1,e}return S(e,t),e.prototype.isActionAdding=function(){var t=V.getValueByNameInQS("id");return void 0===t||""==t},e.prototype.getEntityId=function(){return this.getQSId()},e.prototype.isControlValid=function(t,e){return void 0===e&&(e=null),!this.isControlInvalid(t,e)},e.prototype.isControlInvalid=function(t,e){if(void 0===e&&(e=null),void 0===t||""==t)return!1;var n=e||this.formGroup;return!!n&&(!!n.get(t)&&(this.formSubmitted&&n.get(t).invalid||n.get(t).touched&&n.get(t).invalid))},e.prototype.getFormValue=function(t,e){return void 0===e&&(e=null),(e||this.formGroup).controls[t].value},e.prototype.setFormValue=function(t,e,n){void 0===n&&(n=null),(n||this.formGroup).controls[t].setValue(e)},e.prototype.getFormGroupValue=function(t,e,n){return void 0===n&&(n=null),(n||this.formGroup).controls[t].get(e).value},e.prototype.setFormGroupValue=function(t,e,n,r){void 0===r&&(r=null),(r||this.formGroup).controls[t].get(e).setValue(n)},e}(tt);et.propDecorators={formGroup:[{type:n.Input}],formSubmitted:[{type:n.Input}]};var nt={placeholderText:"Edit Your Content Here",charCounterCount:!0,heightMin:100,toolbarInline:!1,toolbarButtons:{moreText:{buttons:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle"]},moreParagraph:{buttons:["alignLeft","alignCenter","formatOLSimple","alignRight","alignJustify","formatOL","formatUL","paragraphFormat","paragraphStyle","lineHeight","outdent","indent","quote"]},moreRich:{buttons:["insertLink","insertImage","insertTable","emoticons","fontAwesome","specialCharacters","embedly"]},moreMisc:{buttons:["selectAll","clearFormatting","html","undo","redo","fullscreen"],align:"right"}},imageUploadURL:"/api/HtmlEditor/UploadImage",imageAllowedTypes:["jpeg","jpg","png"],imageUploadParams:{uploadType:"",uploadParentId:""}},rt=function(t){function e(){var e=t.call(this)||this;return e.froalaEditorInitialized=!1,e.afterInitializedActions=[],e.editorLabelText="Html",e.editorOptions={},e}return S(e,t),e.prototype.ngOnInit=function(){var t=this.editorOptions;"string"==typeof this.editorOptions&&(t=JSON.parse(this.editorOptions));var e=$.extend({},nt,t),n=y.froalaEditorKey;n&&(e=$.extend({},e,JSON.parse('{ "key": "'+n+'" }'))),e.events&&e.events.initialized&&(e.events.initialized.overridden=!1),this.options=e},e.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){t.froalaEditorInitialized=!0,t.onInitialized()}),300)},e.prototype.onInitialized=function(){var t=this.afterInitializedActions;if(this.afterInitializedActions=[],t)for(var e=0;e<t.length;e++)t[e]()},e.prototype.getEditor=function(){return this.froalaEditor?this.froalaEditor.getEditor():null},e.prototype.doAfterInitialized=function(t){var e=this;this.froalaEditorInitialized?t(e):this.afterInitializedActions.push((function(){t(e)}))},e.prototype.initializeControl=function(t){this.froalaEditor=t,this.froalaEditor.initialize()},e.prototype.setUploadParams=function(t,e){this.doAfterInitialized((function(n){var r=n.getEditor();void 0!==r&&null!=r&&(r.opts.imageUploadParams.uploadType=t,r.opts.imageUploadParams.uploadParentId=e)}))},e}(et);rt.propDecorators={editorLabelText:[{type:n.Input}],editorOptions:[{type:n.Input}]};var ot=function(t){function e(){return t.call(this)||this}return S(e,t),e.prototype.setHtml=function(t){this.doAfterInitialized((function(e){var n=e.getEditor();void 0!==n&&null!=n&&n.html.set(t)}))},e.prototype.getHtml=function(){var t=this.getEditor();if(void 0!==t&&null!=t)return t.html.get(!1)},e}(rt);ot.decorators=[{type:n.Component,args:[{selector:"anatoly-html-editor",template:'<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n</div>'}]}],ot.ctorParameters=function(){return[]};var it=function(t){function e(){var e=t.call(this)||this;return e.editorFormKey="html",e}return S(e,t),e.prototype.setFormValueAfterInitialized=function(t,e){this.doAfterInitialized((function(n){n.setFormValue(t,e)}))},e}(rt);it.decorators=[{type:n.Component,args:[{selector:"anatoly-forms-html-editor",template:'<div [formGroup]="formGroup">\r\n <div class="form-group" [ngClass]="{\'has-error\': isControlInvalid(editorFormKey) }">\r\n <label class="control-label">{{ editorLabelText }}</label>\r\n <textarea [formControlName]="editorFormKey"\r\n [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]="formGroup"\r\n [formSubmitted]="formSubmitted"\r\n [controlName]="editorFormKey"\r\n [controlTitle]="editorLabelText">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n'}]}],it.ctorParameters=function(){return[]},it.propDecorators={editorFormKey:[{type:n.Input}]};var at=function(t){function e(){return t.call(this)||this}return S(e,t),e.prototype.getFormValidationMessages=function(){var t=this,e=[];return Object.keys(this.formGroup.controls).forEach((function(n){var r=t.formGroup.controls[n];null!=r.controls?Object.keys(r.controls).forEach((function(n){var o=r.controls[n];t.getValidationMessages(o,t.getControlName(o,n)).forEach((function(t){return e.push(t)}))})):t.getValidationMessages(r,t.getControlName(r,n)).forEach((function(t){return e.push(t)}))})),e},e.prototype.getValidationMessages=function(t,e){var n=t.path||e,r=[];if(t.errors)for(var o in t.errors)if(t.errors.hasOwnProperty(o))switch(o){case"required":r.push(n+" is required");break;case"minlength":r.push(n+" must be at least "+t.errors.minlength.requiredLength+" characters");break;case"pattern":r.push(n+" contains illegal characters");break;case"format":r.push(n+" format mismatch");break;case"maxlength":r.push(n+" must have maximum "+t.errors.maxlength.requiredLength+" characters");break;case"specialcharacters":r.push(n+" contains special characters")}return r},e.prototype.getControlName=function(t,e){var n=this.getControlTitle(t);return n||e},e.prototype.getControlTitle=function(t){if(null==t?void 0:t.nativeElement){var e=this.getTitleAttribute(t.nativeElement);if(e)return e}},e.prototype.getTitleAttribute=function(t){var e,n,r,o,i,a,s;switch(t.tagName){case"KENDO-TIMEPICKER":case"KENDO-DATEPICKER":s=null===(o=null===(r=null===(n=null===(e=t.children[0])||void 0===e?void 0:e.children[0])||void 0===n?void 0:n.children[0])||void 0===r?void 0:r.children[0])||void 0===o?void 0:o.getAttribute("title");break;case"KENDO-NUMERICTEXTBOX":s=null===(a=null===(i=t.children[0])||void 0===i?void 0:i.children[0])||void 0===a?void 0:a.getAttribute("title");break;default:s=t.getAttribute("title")}return s},e}(et),st=function(t){function e(){var e=t.call(this)||this;return e.visible=!1,e.customerrors=[],e.viewtype=0,e}return S(e,t),e.prototype.getErrors=function(){if(1==this.viewtype)return this.customerrors;var t=this.getFormValidationMessages();if(0==this.viewtype)return t;var e=[];return t.length>0&&e.push.apply(e,C(t)),this.customerrors.length>0&&e.push.apply(e,C(this.customerrors)),e},e}(at);st.decorators=[{type:n.Component,args:[{selector:"anatoly-form-validation-summary",template:'<div class="callout callout-danger" *ngIf="visible">\r\n <h6 class="box-title">There are problems with the form</h6>\r\n <ul>\r\n <li *ngFor="let error of getErrors()"><span>{{error}}</span></li>\r\n </ul>\r\n</div>\r\n\r\n'}]}],st.ctorParameters=function(){return[]},st.propDecorators={visible:[{type:n.Input}],customerrors:[{type:n.Input}],viewtype:[{type:n.Input}]};var lt=function(t){function e(){return t.call(this)||this}return S(e,t),e}(at);lt.decorators=[{type:n.Component,args:[{selector:"anatoly-item-validation-summary",template:'<ul class="list-unstyled" *ngIf="isControlInvalid(controlName)">\r\n <li *ngFor="let error of getValidationMessages(formGroup.get(controlName), controlTitle)">\r\n <span class="help-block">{{ error }}</span>\r\n </li>\r\n</ul>\r\n\r\n'}]}],lt.ctorParameters=function(){return[]},lt.propDecorators={controlName:[{type:n.Input}],controlTitle:[{type:n.Input}]};var ut=function(){function t(t,e){this.el=t,this.control=e}return t.prototype.ngOnInit=function(){this.control.control.nativeElement=this.el.nativeElement},t}();ut.decorators=[{type:n.Directive,args:[{selector:"[formControl], [formControlName]"}]}],ut.ctorParameters=function(){return[{type:n.ElementRef},{type:f.NgControl}]};var ct=h.FroalaEditorModule.forRoot(),pt=h.FroalaViewModule.forRoot(),dt=function(){};dt.decorators=[{type:n.NgModule,args:[{imports:[r.CommonModule,f.ReactiveFormsModule,f.FormsModule,ct,pt],exports:[Y,W,K,Q,X,J,st,lt,ot,it,Z,ut],declarations:[Y,W,K,Q,X,J,st,lt,ot,it,Z,ut]}]}];var ft=function(){function t(t){this.localizeService=t}return t.prototype.transform=function(t,e,n){if(t)return e||(e="t"),"t"===e?this.localizeService.getLocalizedValue(t):"d"===e?this.localizeService.getLocalizedDate(t):"dt"===e?this.localizeService.getLocalizedDateTime(t):"dis2now"===e?this.localizeService.getLocalizedDistanceToNowInWords(t):"dis"===e?this.localizeService.getLocalizedDistanceInWords(t,n):t},t}();ft.decorators=[{type:n.Pipe,args:[{name:"localize"}]}],ft.ctorParameters=function(){return[{type:B}]};var ht=function(){};ht.decorators=[{type:n.NgModule,args:[{imports:[u.TranslateModule],exports:[u.TranslateModule,ft],declarations:[ft],providers:[]}]}];var gt=u.TranslateModule.forRoot({loader:{provide:u.TranslateLoader,useFactory:function(t){return new g.TranslateHttpLoader(t,y.resourcesUrl+"/",".json")},deps:[o.HttpClient]}}),mt=function(){};mt.decorators=[{type:n.NgModule,args:[{imports:[gt],providers:[{provide:n.APP_INITIALIZER,useFactory:function(t,e,n){return function(){return new Promise((function(o){n.get(r.LOCATION_INITIALIZED,Promise.resolve(null)).then((function(){var n=e.configureTranslationSettings(t);t.use(n).subscribe((function(){}),(function(){o(null)}),(function(){o(null)}))}))}))}},deps:[u.TranslateService,B,n.Injector],multi:!0}],exports:[]}]}];var yt=function(){function t(){}return t.success=function(t,n,r,o){t=V.getLocalizedValue(t,n,"OperationSuccessFull"),r=V.getLocalizedValue(r,null,"Success"),e.fire({text:t,title:r,icon:"success",confirmButtonText:V.getLocalizedValue("Ok")}).then((function(){o&&o()}))},t.info=function(t,n,r){t=V.getLocalizedValue(t,n),r=V.getLocalizedValue(r,null,"Info"),e.fire({text:t,title:r,icon:"info",confirmButtonText:V.getLocalizedValue("Ok")})},t.warning=function(t,n,r){t=V.getLocalizedValue(t,n),r=V.getLocalizedValue(r,null,"Warning"),e.fire({text:t,title:r,icon:"warning",confirmButtonText:V.getLocalizedValue("Ok")})},t.error=function(t,n,r){t=V.getLocalizedValue(t,n,"ErrorOccured"),r=V.getLocalizedValue(r,null,"Error"),e.fire({text:t,title:r,icon:"error",confirmButtonText:V.getLocalizedValue("Ok")})},t.cancel=function(t,n,r){t=V.getLocalizedValue(t,n,"OperationCancelled"),r=V.getLocalizedValue(r,null,"Cancelled"),e.fire({text:t,title:r,icon:"info"})},t.notImplemented=function(){this.warning("Not Implemented Yet")},t.areYouSure=function(t,n,r,o,i,a){t=V.getLocalizedValue(t),n=V.getLocalizedValue(n,null,"AreYouSure"),e.fire({text:t,title:n,icon:"warning",confirmButtonText:V.getLocalizedValue(r),cancelButtonText:V.getLocalizedValue(o),showCancelButton:!0}).then((function(t){t.value?i&&i():t.dismiss!=e.DismissReason.cancel&&t.dismiss!=e.DismissReason.close||a&&a()}))},t}();t.Alerts=yt,t.AnatolyCoreModule=U,t.AnatolyDataModule=H,t.AnatolyHttpInterceptor=F,t.AnatolyUIModule=dt,t.AppContextService=z,t.AppCoreSettings=y,t.BaseApiService=L,t.BaseComponent=tt,t.BaseEditComponent=et,t.BaseGoService=q,t.BaseGridEditService=M,t.BaseGridReadService=k,t.BillingApiService=_,t.BuyAccessButtonComponent=K,t.ContentHeaderComponent=Z,t.ContextInitState=m,t.FormValidationSummaryComponent=st,t.FormsHtmlEditorComponent=it,t.GlobalErrorHandler=R,t.Guid=T,t.HtmlEditorComponent=ot,t.ItemValidationSummaryComponent=lt,t.LoadingService=O,t.LocalizationModule=ht,t.LocalizationService=B,t.LocalizationSettingsModule=mt,t.LocalizePipe=ft,t.LoggingService=P,t.NativeElementDirective=ut,t.SignInButtonComponent=Q,t.SignOutButtonComponent=J,t.SignUpButtonComponent=X,t.Subs=j,t.SubscribePlanButtonComponent=Y,t.UpgradePlanButtonComponent=W,t.Utils=V,t.ValidationSummaryComponent=at,t.throwIfAlreadyLoaded=v,Object.defineProperty(t,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */b.decorators=[{type:e.Injectable}],b.ctorParameters=function(){return[{type:n.ActivatedRoute},{type:n.Router}]};var I=function(t,e){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function C(t,e){function n(){this.constructor=t}I(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function P(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function x(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(w(arguments[e]));return t}Object.create;var z=function(t){function e(){var e=t.call(this,!1)||this;return e.counter=0,e.isFreezed=!1,e}return C(e,t),e.prototype.show=function(){this.counter++;var t=this;setTimeout((function(){t.counter>0&&t.next(!0)}),1e3)},e.prototype.hide=function(){this.counter<=0||(this.counter--,0==this.counter&&this.next(!1))},e.prototype.freeze=function(t){var e=this;void 0===t&&(t=1e3),this.isFreezed=!0;setTimeout((function(){e.isFreezed=!1}),t)},e}(i.BehaviorSubject);z.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new z},token:z,providedIn:"root"}),z.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],z.ctorParameters=function(){return[]};var L=function(){function t(){}return t.prototype.logError=function(t){console.error(t)},t.prototype.logInformation=function(t){console.info(t)},t}();L.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new L},token:L,providedIn:"root"}),L.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],L.ctorParameters=function(){return[]};var T=function(){function t(t,e){this.loadingService=t,this.loggingService=e,this.longRunningExceptionsList=[],this.autoCDNSASTokenUrls=["chunks","resources"],this.externalSiteUrls=["azurewebsites.net"]}return t.prototype.intercept=function(t,e){var n,i,a,s,u,c,l=this,p=v.IsCDNEnabled,d=v.CDNSASToken,f=this.loadingService.isFreezed,h=!f,g=t.url.toLowerCase(),m=t.url;if(!f)try{for(var y=P(this.longRunningExceptionsList),b=y.next();!b.done;b=y.next()){var S=b.value;if(g.indexOf(this.longRunningExceptionsList[S])>=0){h=!1;break}}}catch(t){n={error:t}}finally{try{b&&!b.done&&(i=y.return)&&i.call(y)}finally{if(n)throw n.error}}if(p)try{for(var I=P(this.autoCDNSASTokenUrls),C=I.next();!C.done;C=I.next()){S=C.value;if(g.indexOf(this.autoCDNSASTokenUrls[S])>=0){t=t.clone({url:m+d});break}}}catch(t){a={error:t}}finally{try{C&&!C.done&&(s=I.return)&&s.call(I)}finally{if(a)throw a.error}}try{for(var w=P(this.externalSiteUrls),x=w.next();!x.done;x=w.next()){S=x.value;if(g.indexOf(this.externalSiteUrls[S])>=0){!0;break}}}catch(t){u={error:t}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(u)throw u.error}}if(g.indexOf("/api/")>-1){var z="",L=(new Date).getTime().toString();z=g.indexOf("?")>-1?m+"&t="+L:m+"?t="+L,t=t.clone({url:z})}return t=t.clone({headers:t.headers.set("Accept","application/json")}),this.onRequestStart(h),e.handle(t).pipe(o.tap((function(t){t instanceof r.HttpResponse&&l.onRequestEnd(h)}),(function(t){l.onRequestEnd(h),l.loggingService.logError(t)})))},t.prototype.onRequestStart=function(t){t&&this.loadingService.show()},t.prototype.onRequestEnd=function(t){t&&this.loadingService.hide()},t}();T.decorators=[{type:e.Injectable}],T.ctorParameters=function(){return[{type:z},{type:L}]};var O=function(){function t(){}return t.toLocalizedDateTime=function(t){return t?new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())):null},t}(),E=function(){function t(t){this.translate=t,this.setSupportedLanguages(["en"])}return t.prototype.format=function(t,e){return t.replace(/{(\d+)}/g,(function(t,n){return void 0!==e[n]?e[n]:t}))},t.prototype.configureTranslationSettings=function(t){return t.setDefaultLang("en"),"en"},t.prototype.getBrowserLanguage=function(){return this.translate.getBrowserLang()},t.prototype.getDatefnsLocale=function(){var t;switch(this.getBrowserLanguage()){case"en":t={locale:u};break;default:t={locale:u}}return t},t.prototype.setDefaultLanguage=function(t){this.translate.setDefaultLang(t)},t.prototype.setSupportedLanguages=function(t){this.translate.addLangs(t)},t.prototype.updateLanguage=function(t){this.translate.use(t)},t.prototype.getLocalizedValue=function(t,e){var n=this.translate.instant(t);return e&&0!==e.length?this.format(n,e):n},t.prototype.getLocalizedDate=function(t){return s.isValid(new Date(t))?s.format(new Date(t),v.DATE_FORMATS.angular,this.dateFnsLocale):"Invalid Date"},t.prototype.getLocalizedDateTime=function(t){var e=new Date(t);if(s.isValid(e)){var n=O.toLocalizedDateTime(e);return s.format(n,v.DATE_FORMATS.angularWithTime,this.dateFnsLocale)}return"Invalid Date"},t.prototype.getLocalizedDistanceToNowInWords=function(t){return s.isValid(new Date(t))?s.formatDistanceToNow(new Date(t),this.dateFnsLocale):"Invalid Date"},t.prototype.getLocalizedDistanceInWords=function(t,e){return s.isValid(new Date(t))&&s.isValid(new Date(e))?s.formatDistance(new Date(t),new Date(e),this.dateFnsLocale):"Invalid Date"},t}();E.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new E(e.ɵɵinject(a.TranslateService))},token:E,providedIn:"root"}),E.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],E.ctorParameters=function(){return[{type:a.TranslateService}]};var N=function(){function t(t){this.localizeService=t}return t.prototype.transform=function(t,e,n){if(t)return e||(e="t"),"t"===e?this.localizeService.getLocalizedValue(t):"d"===e?this.localizeService.getLocalizedDate(t):"dt"===e?this.localizeService.getLocalizedDateTime(t):"dis2now"===e?this.localizeService.getLocalizedDistanceToNowInWords(t):"dis"===e?this.localizeService.getLocalizedDistanceInWords(t,n):t},t}();function D(t){return new l.TranslateHttpLoader(t,v.resourcesUrl+"/",".json")}function V(t,e,n){return function(){return new Promise((function(r){n.get(c.LOCATION_INITIALIZED,Promise.resolve(null)).then((function(){var n=e.configureTranslationSettings(t);t.use(n).subscribe((function(){}),(function(){r(null)}),(function(){r(null)}))}))}))}}N.decorators=[{type:e.Pipe,args:[{name:"localize"}]}],N.ctorParameters=function(){return[{type:E}]};var U=a.TranslateModule.forRoot({loader:{provide:a.TranslateLoader,useFactory:D,deps:[r.HttpClient]}}),j=function(){};j.decorators=[{type:e.NgModule,args:[{imports:[U],providers:[{provide:e.APP_INITIALIZER,useFactory:V,deps:[a.TranslateService,E,e.Injector],multi:!0}],exports:[]}]}];var A=function(){};A.decorators=[{type:e.NgModule,args:[{imports:[a.TranslateModule],exports:[a.TranslateModule,N],declarations:[N],providers:[]}]}];var B=function(){function t(t){this.injector=t}return t.prototype.handleError=function(t){throw this.injector.get(L).logError(t),t},t}();B.decorators=[{type:e.Injectable}],B.ctorParameters=function(){return[{type:e.Injector}]};var k=function(){function t(t){this.http=t,this.baseUrl=""}return t.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},t.prototype.get=function(t,e,n){n||(n="json");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.get(r,{responseType:n}).pipe(o.map((function(t){return t})))},t.prototype.post=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t;return this.http.post(r,e,{responseType:n})},t.prototype.postQS=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.post(r,null,{responseType:n})},t.prototype.delete=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.delete(r,{responseType:n})},t.prototype.getById=function(t){return this.get("getById",{id:t})},t.prototype.getAll=function(t){return this.get("getall",t).pipe(o.map((function(t){return t})))},t.prototype.getJsonFile=function(t,e,n){e||(e="/dist/jsons"),n||(n="1.0");var r=e+"/"+t+"?"+n;return this.http.get(r).pipe(o.map((function(t){return t})))},t}();k.decorators=[{type:e.Injectable}],k.ctorParameters=function(){return[{type:r.HttpClient}]};var F=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.current=null,n.successes=[],n.subscription=null,n.baseUrl="/api/appContext",n}return C(e,t),e.prototype.getCurrent=function(t){var e=this;void 0!==t&&(null==this.current?(this.successes.push(t),null==this.subscription&&(this.subscription=this.get("GetCurrentContext",null).subscribe((function(t){e.dataReceived(t)}),(function(t){})))):t(this.current))},e.prototype.dataReceived=function(t){this.current=t;for(var e=0;e<this.successes.length;e++){(0,this.successes[e])(t)}this.successes=[],this.subscription.unsubscribe(),this.subscription=null,this.current=null},e.prototype.isUserSignedIn=function(){return y.isUserSignedIn},e.prototype.isUserAdmin=function(){return y.isUserAdmin},e}(k);F.decorators=[{type:e.Injectable}],F.ctorParameters=function(){return[{type:r.HttpClient}]};var q=function(){function t(){}return t.newGuid=function(){return f.v4()},t}(),M=function(){function t(t){this.toastrService=t,this._sessionNotifications=new i.BehaviorSubject([]),this._serverNotifications=new i.BehaviorSubject([]),this.sessionNotifications$=this._sessionNotifications.asObservable(),this.serverNotifications$=this._serverNotifications.asObservable()}return t.prototype.addSessionNotification=function(t,e){var n={id:q.newGuid(),isNew:!0,isSession:!0,text:t,type:e,createdDate:new Date(Date.now()).toISOString()};this.addSessionNotificationToList(n)},t.prototype.addSessionNotificationToList=function(t){this.sessionNotifications=x([t],this.sessionNotifications)},t.prototype.removeNotification=function(t,e){e?this.sessionNotifications=this.sessionNotifications.filter((function(e){return e.id!==t})):this.serverNotifications=this.serverNotifications.filter((function(e){return e.id!==t}))},t.prototype.success=function(t,e,n,r){void 0===r&&(r=!0),t=G.getLocalizedValue(t,e,"OperationSuccessFull"),n=G.getLocalizedValue(n),this.toastrService.success(t,n,{timeOut:3e3,progressBar:!0}),r&&this.addSessionNotification(t,"success")},t.prototype.info=function(t,e,n){t=G.getLocalizedValue(t,e),n=G.getLocalizedValue(n),this.toastrService.info(t,n,{timeOut:3e3,progressBar:!0})},t.prototype.warning=function(t,e,n){t=G.getLocalizedValue(t,e),n=G.getLocalizedValue(n),this.toastrService.warning(t,n,{timeOut:3e3,progressBar:!0})},t.prototype.error=function(t,e,n,r){void 0===r&&(r=!0),t=G.getLocalizedValue(t,e,"ErrorOccured"),n=G.getLocalizedValue(n),this.toastrService.error(t,n,{timeOut:3e3,progressBar:!0}),r&&this.addSessionNotification(t,"error")},t.prototype.cancel=function(t,e,n){t=G.getLocalizedValue(t,e,"OperationCancelled"),n=G.getLocalizedValue(n),this.toastrService.info(t,n,{timeOut:3e3,progressBar:!0})},Object.defineProperty(t.prototype,"sessionNotifications",{get:function(){return this._sessionNotifications.getValue()},set:function(t){this._sessionNotifications.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"serverNotifications",{get:function(){return this._serverNotifications.getValue()},set:function(t){this._serverNotifications.next(t)},enumerable:!1,configurable:!0}),t}();M.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new M(e.ɵɵinject(d.ToastrService))},token:M,providedIn:"root"}),M.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],M.ctorParameters=function(){return[{type:d.ToastrService}]};var R=function(e,n){this.injector=e,S(n,"AnatolyCoreModule"),t.InjectorInstance=this.injector};R.decorators=[{type:e.NgModule,args:[{imports:[c.CommonModule],exports:[],providers:[L,M,F,z]}]}],R.ctorParameters=function(){return[{type:e.Injector},{type:R,decorators:[{type:e.Optional},{type:e.SkipSelf}]}]};var G=function(){function e(){}return e.getValueByNameInQS=function(t){return e.getValueByName(location.search,t)},e.getValueByName=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))},e.copyToClipBoard=function(t,e){t.preventDefault();var n=document.createElement("textarea");n.style.position="fixed",n.style.left="0",n.style.top="0",n.style.opacity="0",n.value=e,document.body.appendChild(n),n.focus(),n.select(),document.execCommand("copy"),document.body.removeChild(n)},e.downloadFile=function(t,e){var n=document.createElement("a");n.download=t,n.href=e,n.click()},Object.defineProperty(e,"localizationService",{get:function(){return t.InjectorInstance.get(E)},enumerable:!1,configurable:!0}),e.getLocalizedValue=function(t,e,n){return!t&&n?this.localizationService.getLocalizedValue(n):t?this.localizationService.getLocalizedValue(t,e):t},e.downloadBlobFile=function(t,n){if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,n);else{var r=window.URL.createObjectURL(t);e.downloadFile(n,r)}},e}(),H=function(){function t(){}return t.success=function(t,e,n,r){t=G.getLocalizedValue(t,e,"OperationSuccessFull"),n=G.getLocalizedValue(n,null,"Success"),p.fire({text:t,title:n,icon:"success",confirmButtonText:G.getLocalizedValue("Ok")}).then((function(){r&&r()}))},t.info=function(t,e,n){t=G.getLocalizedValue(t,e),n=G.getLocalizedValue(n,null,"Info"),p.fire({text:t,title:n,icon:"info",confirmButtonText:G.getLocalizedValue("Ok")})},t.warning=function(t,e,n){t=G.getLocalizedValue(t,e),n=G.getLocalizedValue(n,null,"Warning"),p.fire({text:t,title:n,icon:"warning",confirmButtonText:G.getLocalizedValue("Ok")})},t.error=function(t,e,n){t=G.getLocalizedValue(t,e,"ErrorOccured"),n=G.getLocalizedValue(n,null,"Error"),p.fire({text:t,title:n,icon:"error",confirmButtonText:G.getLocalizedValue("Ok")})},t.cancel=function(t,e,n){t=G.getLocalizedValue(t,e,"OperationCancelled"),n=G.getLocalizedValue(n,null,"Cancelled"),p.fire({text:t,title:n,icon:"info"})},t.notImplemented=function(){this.warning("Not Implemented Yet")},t.areYouSure=function(t,e,n,r,o,i){t=G.getLocalizedValue(t),e=G.getLocalizedValue(e,null,"AreYouSure"),p.fire({text:t,title:e,icon:"warning",confirmButtonText:G.getLocalizedValue(n),cancelButtonText:G.getLocalizedValue(r),showCancelButton:!0}).then((function(t){t.value?o&&o():t.dismiss!=p.DismissReason.cancel&&t.dismiss!=p.DismissReason.close||i&&i()}))},t}(),_=function(){function t(){this.expired$=new i.Subject}return t.prototype.startWatching=function(t){var e=this;return this.idle$=i.merge(i.fromEvent(document,"mousemove"),i.fromEvent(document,"click"),i.fromEvent(document,"mousedown"),i.fromEvent(document,"keypress"),i.fromEvent(document,"DOMMouseScroll"),i.fromEvent(document,"mousewheel"),i.fromEvent(document,"touchmove"),i.fromEvent(document,"MSPointerMove"),i.fromEvent(window,"mousemove"),i.fromEvent(window,"resize")),this.timeOutMilliSeconds=1e3*t,this.idleSubscription=this.idle$.subscribe((function(t){e.resetTimer()})),this.startTimer(),this.expired$},t.prototype.startTimer=function(){var t=this;this.timer$=i.timer(this.timeOutMilliSeconds,this.timeOutMilliSeconds).subscribe((function(e){t.expired$.next(!0)}))},t.prototype.resetTimer=function(){this.timer$.unsubscribe(),this.startTimer()},t.prototype.stopTimer=function(){this.timer$.unsubscribe(),this.idleSubscription.unsubscribe()},t.prototype.restartIdleTimer=function(){var t=this;this.timer$.unsubscribe(),this.idleSubscription.unsubscribe(),this.idleSubscription=this.idle$.subscribe((function(e){t.resetTimer()})),this.startTimer()},t}();_.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new _},token:_,providedIn:"root"}),_.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}];var K=function(){function t(t){this.currentClientKey=v.SERVICES_CONF.selectedClientID,this.storage="local"===t||"localStorage"===t?localStorage:sessionStorage}return t.prototype.setItem=function(t,e){this.storage.setItem(this.currentClientKey+t,e)},t.prototype.setObject=function(t,e){this.storage.setItem(this.currentClientKey+t,JSON.stringify(e))},t.prototype.getItem=function(t){return this.storage.getItem(this.currentClientKey+t)},t.prototype.getObject=function(t){return JSON.parse(this.storage.getItem(this.currentClientKey+t)||"{}")},t.prototype.remove=function(t){this.storage.removeItem(this.currentClientKey+t)},t}(),W=function(t){function e(){return t.call(this,"localStorage")||this}return C(e,t),e}(K);W.decorators=[{type:e.Injectable}],W.ctorParameters=function(){return[]};var Y=function(t){function e(){return t.call(this,"sessionStorage")||this}return C(e,t),e}(K);Y.decorators=[{type:e.Injectable}],Y.ctorParameters=function(){return[]};var Q=function(){function t(){this.subs=[]}return t.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.subs=this.subs.concat(t)},Object.defineProperty(t.prototype,"sink",{set:function(t){this.subs.push(t)},enumerable:!1,configurable:!0}),t.prototype.unsubscribe=function(){this.subs.forEach((function(t){return t&&t.unsubscribe()})),this.subs=[]},t}(),J=function(t){function e(e){var n=t.call(this,[])||this;return n.http=e,n.baseReadUrl="",n.data=[],n}return C(e,t),e.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},e.prototype.read=function(e,n,r){var i=this;if(this.data.length)return t.prototype.next.call(this,this.data);var a=this.baseReadUrl;void 0===e&&(e=this.savedReadParams),e&&(a=this.baseReadUrl+""+this.serializeParams(e),this.savedReadParams=e),this.http.get(a).pipe(o.map((function(t){return t}))).subscribe((function(e){t.prototype.next.call(i,e),n&&n()}),(function(t){r&&r(t)}))},e}(i.BehaviorSubject);J.decorators=[{type:e.Injectable}],J.ctorParameters=function(){return[{type:r.HttpClient}]};var X=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl="",n}return C(e,t),e.prototype.reset=function(){this.data=[]},e.prototype.resetItem=function(e){if(e){var n=this.data.find((function(t){return t.Id===e.Id}));Object.assign(n,e),t.prototype.next.call(this,this.data)}},e.prototype.save=function(t,e,n){var r=this,o=e?"add":"update";this.reset(),this.post(o,t).subscribe((function(){}),(function(){r.read()}),(function(){r.read(),n&&n()}))},e.prototype.remove=function(t,e){var n=this;this.reset(),this.post("remove",t).subscribe((function(){}),(function(){n.read()}),(function(){n.read(),e&&e()}))},e.prototype.post=function(t,e){var n=this.baseUrl+""+t+this.serializeParams(e);return this.http.post(n,e).pipe(o.map((function(t){return t})))},e}(J);X.decorators=[{type:e.Injectable}],X.ctorParameters=function(){return[{type:r.HttpClient}]};var Z={billingApiPath:"api/billing",notificationsApiPath:"api/notifications"},tt=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl=Z.notificationsApiPath,n}return C(e,t),e.prototype.retrieveNotifications=function(){return this.get("retrieveNotifications")},e}(k);tt.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new tt(e.ɵɵinject(r.HttpClient))},token:tt,providedIn:"root"}),tt.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],tt.ctorParameters=function(){return[{type:r.HttpClient}]};var et=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl=Z.billingApiPath,n}return C(e,t),e.prototype.requestNewSubscription=function(t,e,n){this.postQS("requestNewSubscription",{requestedPlan:t}).subscribe((function(t){}),(function(t){n&&n()}),(function(){e&&e()}))},e.prototype.cancelRequestedSubscription=function(t,e){this.postQS("cancelRequestedSubscription",null).subscribe((function(t){}),(function(t){e&&e()}),(function(){t&&t()}))},e.prototype.buyAccess=function(t,e,n){this.postQS("buyAccess",{requestedPlan:t}).subscribe((function(t){}),(function(t){n&&n()}),(function(){e&&e()}))},e}(k);et.decorators=[{type:e.Injectable}],et.ctorParameters=function(){return[{type:r.HttpClient}]};var nt=function(t){S(t,"AnatolyDataModule")};nt.decorators=[{type:e.NgModule,args:[{imports:[c.CommonModule],providers:[et]}]}],nt.ctorParameters=function(){return[{type:nt,decorators:[{type:e.Optional},{type:e.SkipSelf}]}]};var rt=function(){function t(t,e){this.appcontext=t,this.api=e,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t.prototype.onBuyPlan=function(){var t="Requested plan: "+this.plantitle+" ",e=this;H.areYouSure(t,"Buying access","Confirm change","Cancel",(function(){e.api.buyAccess(e.plan,(function(){H.success("Access Granted",null,null,(function(){window.location.reload()}))}))}))},t}();rt.decorators=[{type:e.Component,args:[{selector:"anatoly-buyaccess-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="plan != currentPlan && currentPlan == 1" (click)="onBuyPlan()">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n'}]}],rt.ctorParameters=function(){return[{type:F},{type:et}]},rt.propDecorators={plan:[{type:e.Input}],plantitle:[{type:e.Input}]};var ot=function(){function t(t){this.appcontext=t,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle="",this.requestedPlan=0,this.requestedPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString,t.requestedPlan=e.account.requestedBillingPlan,t.requestedPlanTitle=e.account.requestedBillingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t}();ot.decorators=[{type:e.Component,args:[{selector:"anatoly-subscribe-plan-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="requestedPlan != null && requestedPlan != 0 && plan == requestedPlan">\r\n Requested\r\n </button>\r\n\r\n <anatoly-upgrade-plan-button *ngIf="plan != currentPlan && plan != requestedPlan"\r\n [currentplantitle]="currentPlanTitle"\r\n [requestedplan]=plan\r\n [requestedplantitle]="plantitle">\r\n </anatoly-upgrade-plan-button>\r\n </div>\r\n</div>\r\n'}]}],ot.ctorParameters=function(){return[{type:F}]},ot.propDecorators={plan:[{type:e.Input}],plantitle:[{type:e.Input}]};var it=function(){function t(t){this.api=t}return t.prototype.onUpgradePlan=function(){var t="Current plan: "+this.currentplantitle+" New plan: "+this.requestedplantitle,e=this;H.areYouSure(t,"Change billing plan","Confirm change","Cancel",(function(){e.api.requestNewSubscription(e.requestedplan,(function(){H.success("Your request for changing plan has been sent.",null,null,(function(){window.location.reload()}))}))}))},t}();it.decorators=[{type:e.Component,args:[{selector:"anatoly-upgrade-plan-button",template:'<button class="btn btn-block btn-primary" (click)="onUpgradePlan()">\r\n Upgrade\r\n</button>\r\n'}]}],it.ctorParameters=function(){return[{type:et}]},it.propDecorators={currentplantitle:[{type:e.Input}],requestedplan:[{type:e.Input}],requestedplantitle:[{type:e.Input}]};var at=function(){function t(){}return t.prototype.ngOnInit=function(){null==this.title&&(this.title="")},t}();at.decorators=[{type:e.Component,args:[{selector:"anatoly-content-header",template:'<h2 class="page-header">\r\n {{title}}\r\n \x3c!--<small>Optional {{title}}</small>--\x3e\r\n</h2>\r\n'}]}],at.propDecorators={title:[{type:e.Input}]};var st={placeholderText:"Edit Your Content Here",charCounterCount:!0,heightMin:100,toolbarInline:!1,toolbarButtons:{moreText:{buttons:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle"]},moreParagraph:{buttons:["alignLeft","alignCenter","formatOLSimple","alignRight","alignJustify","formatOL","formatUL","paragraphFormat","paragraphStyle","lineHeight","outdent","indent","quote"]},moreRich:{buttons:["insertLink","insertImage","insertTable","emoticons","fontAwesome","specialCharacters","embedly"]},moreMisc:{buttons:["selectAll","clearFormatting","html","undo","redo","fullscreen"],align:"right"}},imageUploadURL:"/api/HtmlEditor/UploadImage",imageAllowedTypes:["jpeg","jpg","png"],imageUploadParams:{uploadType:"",uploadParentId:""}},ut=function(){function t(){}return t.prototype.getQSId=function(){var t=G.getValueByNameInQS("id");return void 0===t||""==t?null:t},t}(),ct=function(t){function e(){var e=t.call(this)||this;return e.formSubmitted=!1,e}return C(e,t),e.prototype.isActionAdding=function(){var t=G.getValueByNameInQS("id");return void 0===t||""==t},e.prototype.getEntityId=function(){return this.getQSId()},e.prototype.isControlValid=function(t,e){return void 0===e&&(e=null),!this.isControlInvalid(t,e)},e.prototype.isControlInvalid=function(t,e){if(void 0===e&&(e=null),void 0===t||""==t)return!1;var n=e||this.formGroup;return!!n&&(!!n.get(t)&&(this.formSubmitted&&n.get(t).invalid||n.get(t).touched&&n.get(t).invalid))},e.prototype.getFormValue=function(t,e){return void 0===e&&(e=null),(e||this.formGroup).controls[t].value},e.prototype.setFormValue=function(t,e,n){void 0===n&&(n=null),(n||this.formGroup).controls[t].setValue(e)},e.prototype.getFormGroupValue=function(t,e,n){return void 0===n&&(n=null),(n||this.formGroup).controls[t].get(e).value},e.prototype.setFormGroupValue=function(t,e,n,r){void 0===r&&(r=null),(r||this.formGroup).controls[t].get(e).setValue(n)},e}(ut);ct.propDecorators={formGroup:[{type:e.Input}],formSubmitted:[{type:e.Input}]};var lt=function(t){function e(){var e=t.call(this)||this;return e.froalaEditorInitialized=!1,e.afterInitializedActions=[],e.editorLabelText="Html",e.editorOptions={},e}return C(e,t),e.prototype.ngOnInit=function(){var t=this.editorOptions;"string"==typeof this.editorOptions&&(t=JSON.parse(this.editorOptions));var e=$.extend({},st,t),n=v.froalaEditorKey;n&&(e=$.extend({},e,JSON.parse('{ "key": "'+n+'" }'))),e.events&&e.events.initialized&&(e.events.initialized.overridden=!1),this.options=e},e.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){t.froalaEditorInitialized=!0,t.onInitialized()}),300)},e.prototype.onInitialized=function(){var t=this.afterInitializedActions;if(this.afterInitializedActions=[],t)for(var e=0;e<t.length;e++)t[e]()},e.prototype.getEditor=function(){return this.froalaEditor?this.froalaEditor.getEditor():null},e.prototype.doAfterInitialized=function(t){var e=this;this.froalaEditorInitialized?t(e):this.afterInitializedActions.push((function(){t(e)}))},e.prototype.initializeControl=function(t){this.froalaEditor=t,this.froalaEditor.initialize()},e.prototype.setUploadParams=function(t,e){this.doAfterInitialized((function(n){var r=n.getEditor();void 0!==r&&null!=r&&(r.opts.imageUploadParams.uploadType=t,r.opts.imageUploadParams.uploadParentId=e)}))},e}(ct);lt.propDecorators={editorLabelText:[{type:e.Input}],editorOptions:[{type:e.Input}]};var pt=function(t){function e(){var e=t.call(this)||this;return e.editorFormKey="html",e}return C(e,t),e.prototype.setFormValueAfterInitialized=function(t,e){this.doAfterInitialized((function(n){n.setFormValue(t,e)}))},e}(lt);pt.decorators=[{type:e.Component,args:[{selector:"anatoly-forms-html-editor",template:'<div [formGroup]="formGroup">\r\n <div class="form-group" [ngClass]="{\'has-error\': isControlInvalid(editorFormKey) }">\r\n <label class="control-label">{{ editorLabelText }}</label>\r\n <textarea [formControlName]="editorFormKey"\r\n [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]="formGroup"\r\n [formSubmitted]="formSubmitted"\r\n [controlName]="editorFormKey"\r\n [controlTitle]="editorLabelText">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n'}]}],pt.ctorParameters=function(){return[]},pt.propDecorators={editorFormKey:[{type:e.Input}]};var dt=function(t){function e(){return t.call(this)||this}return C(e,t),e.prototype.setHtml=function(t){this.doAfterInitialized((function(e){var n=e.getEditor();void 0!==n&&null!=n&&n.html.set(t)}))},e.prototype.getHtml=function(){var t=this.getEditor();if(void 0!==t&&null!=t)return t.html.get(!1)},e}(lt);dt.decorators=[{type:e.Component,args:[{selector:"anatoly-html-editor",template:'<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n</div>'}]}],dt.ctorParameters=function(){return[]};var ft=function(){};ft.decorators=[{type:e.Component,args:[{selector:"anatoly-signin-button",template:'<a href="identity/signIn" class="{{classbtn}}">Sign In</a>\r\n'}]}],ft.ctorParameters=function(){return[]},ft.propDecorators={classbtn:[{type:e.Input}]};var ht=function(){};ht.decorators=[{type:e.Component,args:[{selector:"anatoly-signout-button",template:'<a href="identity/signOut" class="{{classbtn}}">Sign Out</a>\r\n'}]}],ht.ctorParameters=function(){return[]},ht.propDecorators={classbtn:[{type:e.Input}]};var gt=function(){};gt.decorators=[{type:e.Component,args:[{selector:"anatoly-signup-button",template:'<a href="identity/signup" class="{{classbtn}}">Sign Up</a>\r\n'}]}],gt.propDecorators={classbtn:[{type:e.Input}]};var mt=function(){function t(t){this.loadingService=t,this.subs=new Q,this.show=!1}return t.prototype.ngOnInit=function(){var t=this;this.subs.sink=this.loadingService.subscribe((function(e){t.show=e}))},t.prototype.ngOnDestroy=function(){this.subs.unsubscribe()},t}();mt.decorators=[{type:e.Component,args:[{selector:"anatoly-loading",template:'<div *ngIf="show">\r\n <span id="pnlLoading" class="k-icon k-i-loading"></span>\r\n</div>\r\n'}]}],mt.ctorParameters=function(){return[{type:z}]};var yt={spinnerLine:"spinner-line-material",ChasingDots:"spinner-chasing-dots",CubeGrid:"spinner-cube-grid",DoubleBounce:"spinner-double-bounce",RotatingPlane:"spinner-rotationg-plane",SpinnerPulse:"spinner-spinner-pulse",ThreeBounce:"spinner-three-bounce",WanderingCubes:"spinner-wandering-cubes",Wave:"spinner-wave"},vt=function(){function t(t,e){var r=this;this.router=t,this.document=e,this.isSpinnerVisible=!0,this.spinnerSpinKit=yt,this.backgroundColor="#007CB0",this.spinner=yt.spinnerLine,this.router.events.subscribe((function(t){t instanceof n.NavigationStart?r.isSpinnerVisible=!0:(t instanceof n.NavigationEnd||t instanceof n.NavigationCancel||t instanceof n.NavigationError)&&(r.isSpinnerVisible=!1)}),(function(){r.isSpinnerVisible=!1}))}return t.prototype.ngOnDestroy=function(){this.isSpinnerVisible=!1},t}();vt.decorators=[{type:e.Component,args:[{selector:"spinner",template:'<div id="spinner-loader" *ngIf="isSpinnerVisible">\r\n <div class="loader-bg">\r\n <div class="spinner-line-material" [class.colored]="!backgroundColor" *ngIf="spinner === spinnerSpinKit.spinnerLine">\r\n <div class="spinner-child spinner-bounce1" [style.background-color]=\'backgroundColor\'></div>\r\n </div>\r\n </div>\r\n</div>\r\n',encapsulation:e.ViewEncapsulation.None}]}],vt.ctorParameters=function(){return[{type:n.Router},{type:Document,decorators:[{type:e.Inject,args:[c.DOCUMENT]}]}]},vt.propDecorators={backgroundColor:[{type:e.Input}],spinner:[{type:e.Input}]};var bt=function(){function t(t,e){this.el=t,this.control=e}return t.prototype.ngOnInit=function(){this.control.control.nativeElement=this.el.nativeElement},t}();bt.decorators=[{type:e.Directive,args:[{selector:"[formControl], [formControlName]"}]}],bt.ctorParameters=function(){return[{type:e.ElementRef},{type:h.NgControl}]};var St=function(){function t(){}return t.prototype.transform=function(t,e,n){return t?t.replace(new RegExp(e,"g"),n):t},t}();St.decorators=[{type:e.Pipe,args:[{name:"replaceText"}]}];var It=function(){function t(){this.units=["Bytes","KB","MB","GB","TB","PB"]}return t.prototype.transform=function(t,e){if(void 0===t&&(t=0),void 0===e&&(e=0),isNaN(parseFloat(String(t)))||!isFinite(t))return"";for(var n=0;t>=1024;)t/=1024,n++;return t.toFixed(+e)+" "+this.units[n]},t}();It.decorators=[{type:e.Pipe,args:[{name:"filesize"}]}];var Ct=function(){function t(t){this.sanitized=t}return t.prototype.transform=function(t){return this.sanitized.bypassSecurityTrustHtml(t)},t}();Ct.decorators=[{type:e.Pipe,args:[{name:"safeHtml"}]}],Ct.ctorParameters=function(){return[{type:g.DomSanitizer}]};var Pt=function(t){function e(){return t.call(this)||this}return C(e,t),e.prototype.getFormValidationMessages=function(){var t=this,e=[];return Object.keys(this.formGroup.controls).forEach((function(n){var r=t.formGroup.controls[n];null!=r.controls?Object.keys(r.controls).forEach((function(n){var o=r.controls[n];t.getValidationMessages(o,t.getControlName(o,n)).forEach((function(t){return e.push(t)}))})):t.getValidationMessages(r,t.getControlName(r,n)).forEach((function(t){return e.push(t)}))})),e},e.prototype.getValidationMessages=function(t,e){var n=t.path||e,r=[];if(t.errors)for(var o in t.errors)if(t.errors.hasOwnProperty(o))switch(o){case"required":r.push(n+" is required");break;case"minlength":r.push(n+" must be at least "+t.errors.minlength.requiredLength+" characters");break;case"pattern":r.push(n+" contains illegal characters");break;case"format":r.push(n+" format mismatch");break;case"maxlength":r.push(n+" must have maximum "+t.errors.maxlength.requiredLength+" characters");break;case"specialcharacters":r.push(n+" contains special characters")}return r},e.prototype.getControlName=function(t,e){var n=this.getControlTitle(t);return n||e},e.prototype.getControlTitle=function(t){if(null==t?void 0:t.nativeElement){var e=this.getTitleAttribute(t.nativeElement);if(e)return e}},e.prototype.getTitleAttribute=function(t){var e,n,r,o,i,a,s;switch(t.tagName){case"KENDO-TIMEPICKER":case"KENDO-DATEPICKER":s=null===(o=null===(r=null===(n=null===(e=t.children[0])||void 0===e?void 0:e.children[0])||void 0===n?void 0:n.children[0])||void 0===r?void 0:r.children[0])||void 0===o?void 0:o.getAttribute("title");break;case"KENDO-NUMERICTEXTBOX":s=null===(a=null===(i=t.children[0])||void 0===i?void 0:i.children[0])||void 0===a?void 0:a.getAttribute("title");break;default:s=t.getAttribute("title")}return s},e}(ct),wt=function(t){function e(){var e=t.call(this)||this;return e.visible=!1,e.customerrors=[],e.viewtype=0,e}return C(e,t),e.prototype.getErrors=function(){if(1==this.viewtype)return this.customerrors;var t=this.getFormValidationMessages();if(0==this.viewtype)return t;var e=[];return t.length>0&&e.push.apply(e,x(t)),this.customerrors.length>0&&e.push.apply(e,x(this.customerrors)),e},e}(Pt);wt.decorators=[{type:e.Component,args:[{selector:"anatoly-form-validation-summary",template:'<div class="callout callout-danger" *ngIf="visible">\r\n <h6 class="box-title">There are problems with the form</h6>\r\n <ul>\r\n <li *ngFor="let error of getErrors()"><span>{{error}}</span></li>\r\n </ul>\r\n</div>\r\n\r\n'}]}],wt.ctorParameters=function(){return[]},wt.propDecorators={visible:[{type:e.Input}],customerrors:[{type:e.Input}],viewtype:[{type:e.Input}]};var xt=function(t){function e(){return t.call(this)||this}return C(e,t),e}(Pt);xt.decorators=[{type:e.Component,args:[{selector:"anatoly-item-validation-summary",template:'<ul class="list-unstyled" *ngIf="isControlInvalid(controlName)">\r\n <li *ngFor="let error of getValidationMessages(formGroup.get(controlName), controlTitle)">\r\n <span class="help-block">{{ error }}</span>\r\n </li>\r\n</ul>\r\n\r\n'}]}],xt.ctorParameters=function(){return[]},xt.propDecorators={controlName:[{type:e.Input}],controlTitle:[{type:e.Input}]};var zt=m.FroalaEditorModule.forRoot(),Lt=m.FroalaViewModule.forRoot(),Tt=function(){};Tt.decorators=[{type:e.NgModule,args:[{imports:[c.CommonModule,h.ReactiveFormsModule,h.FormsModule,zt,Lt],exports:[ot,it,rt,ft,gt,ht,wt,xt,dt,pt,at,vt,mt,bt,Ct,St,It],declarations:[ot,it,rt,ft,gt,ht,wt,xt,dt,pt,at,vt,mt,bt,Ct,St,It]}]}],t.Alerts=H,t.AnatolyCoreModule=R,t.AnatolyDataModule=nt,t.AnatolyHttpInterceptor=T,t.AnatolyUIModule=Tt,t.AppContextService=F,t.AppCoreSettings=v,t.BaseApiService=k,t.BaseComponent=ut,t.BaseEditComponent=ct,t.BaseGoService=b,t.BaseGridEditService=X,t.BaseGridReadService=J,t.BaseHtmlEditorComponent=lt,t.BillingApiService=et,t.BuyAccessButtonComponent=rt,t.ContentHeaderComponent=at,t.ContextInitState=y,t.Convert=O,t.DefaultEditorOptions=st,t.FileSizePipe=It,t.FormValidationSummaryComponent=wt,t.FormsHtmlEditorComponent=pt,t.FroalaEditorModuleWithProviders=zt,t.FroalaViewModuleWithProviders=Lt,t.GlobalErrorHandler=B,t.Guid=q,t.HtmlEditorComponent=dt,t.IdleService=_,t.ItemValidationSummaryComponent=xt,t.LoadingComponent=mt,t.LoadingService=z,t.LocalStorageService=W,t.LocalizationModule=A,t.LocalizationService=E,t.LocalizationSettingsModule=j,t.LocalizePipe=N,t.LoggingService=L,t.NativeElementDirective=bt,t.NotificationService=M,t.NotificationsApiService=tt,t.ReplaceTextPipe=St,t.SafeHtmlPipe=Ct,t.SessionStorageService=Y,t.SignInButtonComponent=ft,t.SignOutButtonComponent=ht,t.SignUpButtonComponent=gt,t.SpinnerComponent=vt,t.Subs=Q,t.SubscribePlanButtonComponent=ot,t.TranslateModuleAtRoot=U,t.UpgradePlanButtonComponent=it,t.Urls={notificationsSocketUrl:"/hubs/notifications"},t.Utils=G,t.ValidationSummaryComponent=Pt,t.consts=Z,t.customTranslateLoaderFactory=D,t.localizationInitializerFactory=V,t.throwIfAlreadyLoaded=S,Object.defineProperty(t,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=osovitny-anatoly.umd.min.js.map