@seniorsistemas/angular-components 16.5.1 → 16.5.3

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 (55) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +8919 -8838
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/dynamic-form/components/lookup/lookup.component.d.ts +6 -2
  6. package/components/dynamic-form/components/lookup/models/default-filter.d.ts +4 -0
  7. package/components/dynamic-form/components/lookup/models/index.d.ts +1 -0
  8. package/components/dynamic-form/configurations/fields/lookup-field.d.ts +2 -0
  9. package/components/dynamic-form/index.d.ts +1 -0
  10. package/components/password-strength/index.d.ts +3 -1
  11. package/components/password-strength/password-strength.component.d.ts +1 -1
  12. package/components/password-strength/password-strength.directive.d.ts +1 -1
  13. package/components/profile-picture-picker/index.d.ts +1 -1
  14. package/components/profile-picture-picker/models/index.d.ts +1 -0
  15. package/components/profile-picture-picker/profile-picture-picker.component.d.ts +2 -3
  16. package/esm2015/components/dynamic-form/components/fields/lookup/lookup-field.component.js +2 -2
  17. package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +31 -4
  18. package/esm2015/components/dynamic-form/components/lookup/models/default-filter.js +1 -0
  19. package/esm2015/components/dynamic-form/components/lookup/models/index.js +1 -0
  20. package/esm2015/components/dynamic-form/configurations/fields/lookup-field.js +1 -1
  21. package/esm2015/components/dynamic-form/dynamic-form.module.js +2 -2
  22. package/esm2015/components/dynamic-form/index.js +1 -1
  23. package/esm2015/components/password-strength/index.js +4 -2
  24. package/esm2015/components/password-strength/password-strength.component.js +2 -2
  25. package/esm2015/components/password-strength/password-strength.directive.js +2 -2
  26. package/esm2015/components/password-strength/password-strength.module.js +1 -1
  27. package/esm2015/components/profile-picture-picker/index.js +2 -2
  28. package/esm2015/components/profile-picture-picker/models/index.js +1 -1
  29. package/esm2015/components/profile-picture-picker/profile-picture-picker.component.js +3 -3
  30. package/esm2015/public-api.js +38 -38
  31. package/esm2015/seniorsistemas-angular-components.js +52 -1
  32. package/esm5/components/dynamic-form/components/fields/lookup/lookup-field.component.js +2 -2
  33. package/esm5/components/dynamic-form/components/lookup/lookup.component.js +32 -4
  34. package/esm5/components/dynamic-form/components/lookup/models/default-filter.js +1 -0
  35. package/esm5/components/dynamic-form/components/lookup/models/index.js +1 -0
  36. package/esm5/components/dynamic-form/configurations/fields/lookup-field.js +1 -1
  37. package/esm5/components/dynamic-form/dynamic-form.module.js +2 -2
  38. package/esm5/components/dynamic-form/index.js +1 -1
  39. package/esm5/components/password-strength/index.js +4 -2
  40. package/esm5/components/password-strength/password-strength.component.js +2 -2
  41. package/esm5/components/password-strength/password-strength.directive.js +2 -2
  42. package/esm5/components/password-strength/password-strength.module.js +1 -1
  43. package/esm5/components/profile-picture-picker/index.js +2 -2
  44. package/esm5/components/profile-picture-picker/models/index.js +1 -1
  45. package/esm5/components/profile-picture-picker/profile-picture-picker.component.js +3 -3
  46. package/esm5/public-api.js +38 -38
  47. package/esm5/seniorsistemas-angular-components.js +52 -1
  48. package/fesm2015/seniorsistemas-angular-components.js +8134 -8107
  49. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  50. package/fesm5/seniorsistemas-angular-components.js +8928 -8900
  51. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  52. package/package.json +1 -1
  53. package/public-api.d.ts +37 -37
  54. package/seniorsistemas-angular-components.d.ts +51 -0
  55. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("primeng/breadcrumb"),require("@angular/router"),require("rxjs"),require("rxjs/operators"),require("primeng/tieredmenu"),require("primeng/tooltip"),require("primeng/dom"),require("primeng/calendar"),require("@codemirror/view"),require("@codemirror/state"),require("@codemirror/lint"),require("@codemirror/language"),require("@lezer/generator"),require("@codemirror/highlight"),require("@codemirror/autocomplete"),require("@seniorsistemas/senior-platform-data"),require("@ngx-translate/core"),require("@codemirror/tooltip"),require("@codemirror/gutter"),require("@angular/animations"),require("@angular/forms"),require("@angular/common/http"),require("angular2-hotkeys"),require("bignumber.js"),require("primeng/autocomplete"),require("primeng/dialog"),require("primeng/table"),require("@seniorsistemas/ng2-currency-mask"),require("moment"),require("ngx-cookie-service"),require("ng2-currency-mask"),require("primeng/button"),require("primeng/checkbox"),require("primeng/chips"),require("primeng/dropdown"),require("primeng/fieldset"),require("primeng/inputmask"),require("primeng/inputtext"),require("primeng/inputtextarea"),require("primeng/keyfilter"),require("primeng/multiselect"),require("primeng/inputswitch"),require("primeng/panel"),require("primeng/radiobutton"),require("primeng/progressbar"),require("@angular/platform-browser"),require("cropperjs"),require("element-resize-detector"),require("@angular/cdk/a11y"),require("primeng/scrollpanel"),require("primeng/sidebar"),require("primeng/api"),require("primeng/confirmdialog")):"function"==typeof define&&define.amd?define("@seniorsistemas/angular-components",["exports","@angular/core","@angular/common","primeng/breadcrumb","@angular/router","rxjs","rxjs/operators","primeng/tieredmenu","primeng/tooltip","primeng/dom","primeng/calendar","@codemirror/view","@codemirror/state","@codemirror/lint","@codemirror/language","@lezer/generator","@codemirror/highlight","@codemirror/autocomplete","@seniorsistemas/senior-platform-data","@ngx-translate/core","@codemirror/tooltip","@codemirror/gutter","@angular/animations","@angular/forms","@angular/common/http","angular2-hotkeys","bignumber.js","primeng/autocomplete","primeng/dialog","primeng/table","@seniorsistemas/ng2-currency-mask","moment","ngx-cookie-service","ng2-currency-mask","primeng/button","primeng/checkbox","primeng/chips","primeng/dropdown","primeng/fieldset","primeng/inputmask","primeng/inputtext","primeng/inputtextarea","primeng/keyfilter","primeng/multiselect","primeng/inputswitch","primeng/panel","primeng/radiobutton","primeng/progressbar","@angular/platform-browser","cropperjs","element-resize-detector","@angular/cdk/a11y","primeng/scrollpanel","primeng/sidebar","primeng/api","primeng/confirmdialog"],t):t(((e=e||self).seniorsistemas=e.seniorsistemas||{},e.seniorsistemas["angular-components"]={}),e.ng.core,e.ng.common,e.breadcrumb,e.ng.router,e.rxjs,e.rxjs.operators,e.tieredmenu,e.tooltip,e.dom,e.calendar,e.view,e.state,e.lint,e.language,e.generator,e.highlight,e.autocomplete$1,e.seniorPlatformData,e.core$1,e.tooltip$1,e.gutter,e.ng.animations,e.ng.forms,e.ng.common.http,e.angular2Hotkeys,e.BigNumber,e.autocomplete$2,e.dialog,e.table,e.ng2CurrencyMask,e.moment_,e.ngxCookieService,e.ng2CurrencyMask$1,e.button,e.checkbox,e.chips,e.dropdown,e.fieldset,e.inputmask,e.inputtext,e.inputtextarea,e.keyfilter,e.multiselect,e.inputswitch,e.panel,e.radiobutton,e.progressbar,e.ng.platformBrowser,e.Cropper,e.elementResizeDetectorMaker_,e.ng.cdk.a11y,e.scrollpanel,e.sidebar,e.api,e.confirmdialog)}(this,(function(e,t,n,o,i,r,a,s,l,p,c,d,u,m,f,h,g,b,v,y,x,w,C,I,_,k,T,S,E,F,L,M,O,R,D,A,P,N,z,V,B,U,j,H,$,G,q,W,K,Y,X,Z,J,Q,ee,te){"use strict";var ne="default"in T?T.default:T;Y=Y&&Object.prototype.hasOwnProperty.call(Y,"default")?Y.default:Y;
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("primeng/breadcrumb"),require("@angular/router"),require("rxjs"),require("rxjs/operators"),require("primeng/tieredmenu"),require("primeng/tooltip"),require("primeng/dom"),require("primeng/calendar"),require("@angular/animations"),require("@angular/forms"),require("@angular/common/http"),require("angular2-hotkeys"),require("bignumber.js"),require("primeng/autocomplete"),require("primeng/dialog"),require("primeng/table"),require("@seniorsistemas/ng2-currency-mask"),require("@seniorsistemas/senior-platform-data"),require("moment"),require("ngx-cookie-service"),require("ng2-currency-mask"),require("primeng/button"),require("primeng/checkbox"),require("primeng/chips"),require("primeng/dropdown"),require("primeng/fieldset"),require("primeng/inputmask"),require("primeng/inputtext"),require("primeng/inputtextarea"),require("primeng/keyfilter"),require("primeng/multiselect"),require("primeng/inputswitch"),require("primeng/panel"),require("primeng/radiobutton"),require("primeng/progressbar"),require("@angular/platform-browser"),require("@ngx-translate/core"),require("cropperjs"),require("element-resize-detector"),require("@angular/cdk/a11y"),require("primeng/scrollpanel"),require("primeng/sidebar"),require("primeng/api"),require("primeng/confirmdialog"),require("@codemirror/view"),require("@codemirror/state"),require("@codemirror/lint"),require("@codemirror/language"),require("@lezer/generator"),require("@codemirror/highlight"),require("@codemirror/autocomplete"),require("@codemirror/tooltip"),require("@codemirror/gutter")):"function"==typeof define&&define.amd?define("@seniorsistemas/angular-components",["exports","@angular/core","@angular/common","primeng/breadcrumb","@angular/router","rxjs","rxjs/operators","primeng/tieredmenu","primeng/tooltip","primeng/dom","primeng/calendar","@angular/animations","@angular/forms","@angular/common/http","angular2-hotkeys","bignumber.js","primeng/autocomplete","primeng/dialog","primeng/table","@seniorsistemas/ng2-currency-mask","@seniorsistemas/senior-platform-data","moment","ngx-cookie-service","ng2-currency-mask","primeng/button","primeng/checkbox","primeng/chips","primeng/dropdown","primeng/fieldset","primeng/inputmask","primeng/inputtext","primeng/inputtextarea","primeng/keyfilter","primeng/multiselect","primeng/inputswitch","primeng/panel","primeng/radiobutton","primeng/progressbar","@angular/platform-browser","@ngx-translate/core","cropperjs","element-resize-detector","@angular/cdk/a11y","primeng/scrollpanel","primeng/sidebar","primeng/api","primeng/confirmdialog","@codemirror/view","@codemirror/state","@codemirror/lint","@codemirror/language","@lezer/generator","@codemirror/highlight","@codemirror/autocomplete","@codemirror/tooltip","@codemirror/gutter"],t):t(((e=e||self).seniorsistemas=e.seniorsistemas||{},e.seniorsistemas["angular-components"]={}),e.ng.core,e.ng.common,e.breadcrumb,e.ng.router,e.rxjs,e.rxjs.operators,e.tieredmenu,e.tooltip,e.dom,e.calendar,e.ng.animations,e.ng.forms,e.ng.common.http,e.angular2Hotkeys,e.BigNumber,e.autocomplete$1,e.dialog,e.table,e.ng2CurrencyMask,e.seniorPlatformData,e.moment_,e.ngxCookieService,e.ng2CurrencyMask$1,e.button,e.checkbox,e.chips,e.dropdown,e.fieldset,e.inputmask,e.inputtext,e.inputtextarea,e.keyfilter,e.multiselect,e.inputswitch,e.panel,e.radiobutton,e.progressbar,e.ng.platformBrowser,e.core$1,e.Cropper,e.elementResizeDetectorMaker_,e.ng.cdk.a11y,e.scrollpanel,e.sidebar,e.api,e.confirmdialog,e.view,e.state,e.lint,e.language,e.generator,e.highlight,e.autocomplete$2,e.tooltip$1,e.gutter)}(this,(function(e,t,n,o,i,r,a,s,l,p,c,d,u,m,f,h,g,b,v,y,x,w,C,I,_,k,T,S,E,F,L,M,O,R,D,A,P,N,z,V,B,U,j,H,$,G,q,W,K,Y,X,Z,J,Q,ee,te){"use strict";var ne="default"in h?h.default:h;B=B&&Object.prototype.hasOwnProperty.call(B,"default")?B.default:B;
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -13,5 +13,5 @@
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
15
  ***************************************************************************** */
16
- var oe=function(e,t){return(oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function ie(e,t){function n(){this.constructor=e}oe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var re=function(){return(re=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function ae(e,t,n,o){var i,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(r<3?i(a):r>3?i(t,n,a):i(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a}function se(e,t){return function(n,o){t(n,o,e)}}function le(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{l(o.next(e))}catch(e){r(e)}}function s(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))}function pe(e,t){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function ce(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function de(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function ue(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(de(arguments[t]));return e}var me,fe,he,ge=function(){function e(e,t){var n=this;this.activatedRoute=e,this.router=t,this.targetHomeUrl="_self",this.ngUnsubscribe=new r.Subject,this.router.events.pipe(a.takeUntil(this.ngUnsubscribe),a.filter((function(e){return e instanceof i.NavigationEnd}))).subscribe((function(){return n.onNavigationEnd()}))}return e.prototype.onNavigationEnd=function(){var e=this.activatedRoute.root,t=this.getValidChildren(e);this.title=this.getCurrentTitle(t),this.home=this.getCurrentHome(t),this.items=this.getCurrentItems(t)},e.prototype.getValidChildren=function(e){var t=this,n=e.routeConfig&&e.routeConfig.path&&e.routeConfig.component&&e.outlet===i.PRIMARY_OUTLET;return e.children.reduce((function(e,n){return ue(e,t.getValidChildren(n))}),n?[e]:[])},e.prototype.getCurrentTitle=function(e){var t=e[e.length-1];if(t&&t.routeConfig)return this.getTitle(t)},e.prototype.getCurrentHome=function(e){var t;return this.homeUrl?t={url:this.homeUrl,icon:"fa fa-home",target:this.targetHomeUrl}:e.length&&(t=re(re({},this.getMenuItem(e[0],1===e.length)),{icon:"fa fa-home"})),t},e.prototype.getCurrentItems=function(e){var t=this;if(e.length){var n=this.homeUrl?e:e.slice(1);return n.length?n.map((function(n,o){return t.getMenuItem(n,o===e.length-1)})):void 0}},e.prototype.getMenuItem=function(e,t){void 0===t&&(t=!1);var n=this.getTitle(e),o=e.pathFromRoot;return{label:n,routerLink:o.slice(0,o.indexOf(e)+1).reduce((function(e,t){return ue(e,t.snapshot.url.map((function(e){return e.path})))}),["/"]),queryParams:e.snapshot.queryParams,routerLinkActiveOptions:{exact:!0},disabled:t}},e.prototype.getTitle=function(e){var t=e.snapshot,n=e.routeConfig,o=t.data.routeTitle;if(!o)throw new Error("No routeTitle defined for the route /"+n.path);return o},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},e.ctorParameters=function(){return[{type:i.ActivatedRoute},{type:i.Router}]},ae([t.Input()],e.prototype,"homeUrl",void 0),ae([t.Input()],e.prototype,"targetHomeUrl",void 0),e=ae([t.Component({selector:"s-breadcrumb",template:'<h1 class="sds-page-title">{{title}}</h1>\n<p-breadcrumb [home]="home" [model]="items"></p-breadcrumb>'})],e)}(),be=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,o.BreadcrumbModule,i.RouterModule],declarations:[ge],exports:[ge,i.RouterModule]})],e)}();(me=e.ButtonPriority||(e.ButtonPriority={})).Default="default",me.Primary="primary",me.Secondary="secondary",me.Link="link",(fe=e.ButtonSize||(e.ButtonSize={})).Default="default",fe.Small="small",function(e){e.rotate="rotate"}(he||(he={}));var ve=function(){function n(){this.minWidth="40px",this.id="s-button-"+o.nextId++,this.caret=!0,this.baseZIndex=0,this.disabled=!1,this.auxiliary=!1,this.type="button",this.priority=e.ButtonPriority.Primary,this.model=[],this.size=e.ButtonSize.Default,this.onClick=new t.EventEmitter}var o;return o=n,n.prototype.ngOnInit=function(){var e=this;this.onClick.subscribe((function(t){e.model&&e.model.length&&(e.menu.model=e.model,e.menu.toggle(t))}))},n.prototype.validateSlideButton=function(){return this.slide&&(this.priority==e.ButtonPriority.Default||this.priority==e.ButtonPriority.Link)&&this.label.length},n.prototype.isOpen=function(){return this.model&&this.model.length&&this.menu.visible},n.prototype.ngOnChanges=function(e){var t=this.iconClass,n=this.label,o=this.model&&this.model.length;(n||t&&o)&&(this.minWidth="80px"),n&&t&&o&&(this.minWidth="100px")},n.prototype.updateTooltipZIndex=function(){this.tooltipZIndex=this.baseZIndex+ ++p.DomHandler.zindex},n.prototype.isRotateAnimation=function(){return this.animation===he.rotate},n.nextId=0,ae([t.HostBinding("style.min-width")],n.prototype,"minWidth",void 0),ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"label",void 0),ae([t.Input()],n.prototype,"tooltip",void 0),ae([t.Input()],n.prototype,"iconClass",void 0),ae([t.Input()],n.prototype,"rightIconClass",void 0),ae([t.Input()],n.prototype,"caret",void 0),ae([t.Input()],n.prototype,"styleClass",void 0),ae([t.Input()],n.prototype,"baseZIndex",void 0),ae([t.Input()],n.prototype,"disabled",void 0),ae([t.Input()],n.prototype,"auxiliary",void 0),ae([t.Input()],n.prototype,"type",void 0),ae([t.Input()],n.prototype,"priority",void 0),ae([t.Input()],n.prototype,"model",void 0),ae([t.Input()],n.prototype,"size",void 0),ae([t.Input()],n.prototype,"slide",void 0),ae([t.Input()],n.prototype,"animation",void 0),ae([t.Output()],n.prototype,"onClick",void 0),ae([t.ViewChild(s.TieredMenu,{static:!0})],n.prototype,"menu",void 0),n=o=ae([t.Component({selector:"s-button",template:'<p-tieredMenu [id]="id + \'-menu\'" [popup]="true" appendTo="body" [baseZIndex]="baseZIndex"></p-tieredMenu>\n\n<button\n [id]="id"\n [type]="type"\n [class]="styleClass"\n [ngClass]="{\n \'s-button-auxiliary\': auxiliary,\n \'s-button-with-icon\': iconClass,\n \'s-button-with-text\': label,\n \'s-button-empty\': !iconClass && !label,\n \'s-button-size-default\': size === \'default\',\n \'s-button-size-small\': size === \'small\',\n \'s-button-priority-default\': priority === \'default\',\n \'s-button-priority-primary\': priority === \'primary\',\n \'s-button-priority-secondary\': priority === \'secondary\',\n \'s-button-priority-link\': priority === \'link\',\n \'s-button-multiple\': (caret && (model && model.length)) || rightIconClass,\n \'s-button-active\': isOpen(),\n \'s-button--slide\': validateSlideButton(),\n \'s-button--rotate-animation\': isRotateAnimation()\n }"\n [disabled]="disabled"\n [pTooltip]="tooltip"\n tooltipPosition="top"\n showDelay="500"\n [tooltipZIndex]="tooltipZIndex"\n (click)="onClick.emit($event)"\n (mouseenter)="updateTooltipZIndex()"\n>\n <span \n *ngIf="iconClass" \n [class]="iconClass" \n [ngClass]="{ \n \'s-button-icon\': true,\n \'s-button-icon-margin-right\': !label && model && model.length\n }" \n aria-hidden="true">\n </span>\n <span \n *ngIf="label" \n class="s-button-text"\n [ngClass]="{\n \'s-button-icon-margin-right\': !!rightIconClass || (model && model.length),\n \'s-button-icon-margin-left\': !!iconClass\n }">\n {{ label }}\n </span>\n <ng-content></ng-content>\n <span \n *ngIf="rightIconClass" \n [class]="rightIconClass" \n [ngClass]="{ \'s-button-right-icon\': true }" \n aria-hidden="true">\n </span>\n <span\n *ngIf="caret && (model && model.length)" \n class="fa fa-fw fa-caret-down"\n aria-hidden="true">\n </span>\n</button>\n',styles:['button{-ms-flex-align:center;align-items:center;border-radius:4px;border:1px solid;cursor:pointer;font-family:"Open Sans",sans-serif;font-size:14px;height:34px;max-width:100%;min-width:40px;outline:0;overflow:visible;padding:5px 10px;position:relative;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;text-decoration:none;text-transform:none;vertical-align:bottom;transition:background-color .2s ease-out,color .2s ease-out,border-color .2s ease-out}button:disabled{opacity:.5;filter:Alpha(Opacity=50);background-image:none}button:disabled,button:disabled *{cursor:text!important}button.s-button-auxiliary{border-radius:20px}button.s-button-size-small{padding:0 20px;height:25px}button.s-button-with-icon.s-button-multiple,button.s-button-with-text{min-width:80px}button.s-button-with-icon.s-button-with-text.s-button-multiple{min-width:100px}button .s-button-icon,button .s-button-menu-icon,button .s-button-right-icon,button.s-button-with-icon.s-button-multiple:not(.s-button-with-text) .s-button-icon{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}button.s-button-multiple .s-button-text{display:-ms-flexbox;display:flex;-ms-flex-pack:left;justify-content:left;-ms-flex-align:left;align-items:left}button.s-button-with-icon .s-button-text{display:-ms-flexbox;display:flex;-ms-flex-pack:right;justify-content:right;-ms-flex-align:right;align-items:right}.s-button-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.s-button-menu-icon{right:10px;transition:transform .2s ease-out}.s-button-icon-margin-left{margin-left:10px}.s-button-icon-margin-right{margin-right:10px}.s-button-active .s-button-menu-icon{transform:rotateX(180deg)}button,button.s-button-priority-primary{background-color:#428bca;border-color:#428bca}button .s-button-icon,button .s-button-menu-icon,button .s-button-right-icon,button .s-button-text,button.s-button-priority-primary .s-button-icon,button.s-button-priority-primary .s-button-menu-icon,button.s-button-priority-primary .s-button-right-icon,button.s-button-priority-primary .s-button-text{color:#fff}button.s-button-priority-primary:hover,button:hover{background-color:#2a6496}button.s-button-priority-primary:focus,button:focus{background-color:#2a6496;border-color:#22dce6}button.s-button-active:not(:disabled),button.s-button-priority-primary.s-button-active:not(:disabled),button.s-button-priority-primary:active:not(:disabled),button:active:not(:disabled){background-color:#245682;border-color:#245682}button.s-button-priority-secondary{background-color:#7892a1;border-color:#7892a1}button.s-button-priority-secondary .s-button-icon,button.s-button-priority-secondary .s-button-menu-icon,button.s-button-priority-secondary .s-button-right-icon,button.s-button-priority-secondary .s-button-text{color:#fff}button.s-button-priority-secondary:hover{background-color:#546b79}button.s-button-priority-secondary:focus{background-color:#546b79;border-color:#22dce6}button.s-button-priority-secondary.s-button-active:not(:disabled),button.s-button-priority-secondary:active:not(:disabled){background-color:#495e6a;border-color:#495e6a}button.s-button-priority-default{background-color:#fff;border-color:#ccc}button.s-button-priority-default .s-button-icon,button.s-button-priority-default .s-button-menu-icon,button.s-button-priority-default .s-button-right-icon,button.s-button-priority-default .s-button-text{color:#333}button.s-button-priority-default:hover{background-color:#d9d9d9}button.s-button-priority-default:focus{background-color:#d9d9d9;border-color:#22dce6}button.s-button-priority-default.s-button-active:not(:disabled),button.s-button-priority-default:active:not(:disabled){background-color:#ccc;border-color:#ccc}button.s-button-priority-link{background-color:transparent;border-color:transparent}button.s-button-priority-link .s-button-icon,button.s-button-priority-link .s-button-menu-icon,button.s-button-priority-link .s-button-right-icon,button.s-button-priority-link .s-button-text{color:#428bca}button.s-button-priority-link:hover{background-color:transparent}button.s-button-priority-link:hover .s-button-icon,button.s-button-priority-link:hover .s-button-menu-icon,button.s-button-priority-link:hover .s-button-right-icon,button.s-button-priority-link:hover .s-button-text{color:#2a6496}button.s-button-priority-link:focus{border-color:#22dce6;background-color:transparent}button.s-button-priority-link:focus .s-button-icon,button.s-button-priority-link:focus .s-button-menu-icon,button.s-button-priority-link:focus .s-button-right-icon,button.s-button-priority-link:focus .s-button-text{color:#2a6496}button.s-button-priority-link.s-button-active:not(:disabled),button.s-button-priority-link:active:not(:disabled){background-color:transparent;border-color:transparent}button.s-button-priority-link.s-button-active:not(:disabled) .s-button-icon,button.s-button-priority-link.s-button-active:not(:disabled) .s-button-menu-icon,button.s-button-priority-link.s-button-active:not(:disabled) .s-button-right-icon,button.s-button-priority-link.s-button-active:not(:disabled) .s-button-text,button.s-button-priority-link:active:not(:disabled) .s-button-icon,button.s-button-priority-link:active:not(:disabled) .s-button-menu-icon,button.s-button-priority-link:active:not(:disabled) .s-button-right-icon,button.s-button-priority-link:active:not(:disabled) .s-button-text{color:#245682}.s-button--slide.s-button-with-icon.s-button-multiple,.s-button--slide.s-button-with-text{min-width:40px}.s-button--slide .s-button-text{position:absolute;opacity:0;width:0}.s-button--slide:hover .s-button-text{transition:1s;position:relative;opacity:1;width:auto}.s-button--slide:hover.s-button--rotate-animation .s-button-icon,.s-button--slide:hover.s-button--rotate-animation .s-button-right-icon{transition:1.5s;transform:rotate(360deg)}']})],n)}(),ye=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,i.RouterModule,s.TieredMenuModule,l.TooltipModule],declarations:[ve],exports:[ve]})],e)}(),xe=function(){function e(e,t){this.host=e,this.renderer=t,this.SELECTORS='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',this.slotChar="_",this.autoClear=!1,this.firstTime=!0}return e.prototype.setListeners=function(){var e=this;this.input=this.host.inputfieldViewChild.nativeElement,this.value=this.input.value,this.focusListener=this.renderer.listen(this.input,"focus",(function(){e.onInputFocus()})),this.blurListener=this.renderer.listen(this.input,"blur",(function(t){e.onInputBlur(t)})),this.keydownListener=this.renderer.listen(this.input,"keydown",(function(t){e.onKeyDown(t)})),this.keypressListener=this.renderer.listen(this.input,"keypress",(function(t){e.onKeyPress(t)})),this.inputListener=this.renderer.listen(this.input,"input",(function(t){e.onInputChange(t)})),this.pasteListener=this.renderer.listen(this.input,"paste",(function(t){e.handleInputChange(t)}))},e.prototype.ngOnInit=function(){var e=navigator.userAgent;this.androidChrome=/chrome/i.test(e)&&/android/i.test(e),this.createMaskFromDateFormat(),this.initMask()},Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(e){this._mask=e,this.initMask(),this.writeValue("")},enumerable:!0,configurable:!0}),e.prototype.writeValue=function(e){this.value=e,this.input&&(null==this.value?this.input.value="":this.input.value=this.value,this.checkVal(),this.focusText=this.input.value,this.updateFilledState())},e.prototype.onInputBlur=function(e){if(this.checkVal(),this.updateFilledState(),this.value!=this.focusText){!this.input.disabled&&(void 0===this.value||null===this.value||this.value.indexOf(this.slotChar)>=0)&&(this.value="",e.target.value="",this.host.updateModel(null)),this.updateModel(e);var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1),this.input.dispatchEvent(t)}},e.prototype.onKeyDown=function(e){if(!this.host.readonlyInput){var t,n,o,i=e.which||e.keyCode,r=/iphone/i.test(navigator.userAgent);this.oldVal=this.input.value,8===i||46===i||r&&127===i?(n=(t=this.caret()).begin,(o=t.end)-n==0&&(n=46!==i?this.seekPrev(n):o=this.seekNext(n-1),o=46===i?this.seekNext(o):o),this.clearBuffer(n,o),this.shiftL(n,o-1),this.updateModel(e),e.preventDefault()):13===i?(this.onInputBlur(e),this.updateModel(e)):27===i&&(this.input.value=this.focusText,this.caret(0,this.checkVal()),this.updateModel(e),e.preventDefault())}},e.prototype.onKeyPress=function(e){var t=this;if(!this.host.readonlyInput){var n,o,i,r=e.which||e.keyCode,a=this.caret();if(!(e.ctrlKey||e.altKey||e.metaKey||r<32||r>34&&r<41)){if(r&&13!==r){if(a.end-a.begin!=0&&(this.clearBuffer(a.begin,a.end),this.shiftL(a.begin,a.end-1)),(n=this.seekNext(a.begin-1))<this.len&&(o=String.fromCharCode(r),this.tests[n].test(o)))if(this.shiftR(n),this.buffer[n]=o,this.writeBuffer(),i=this.seekNext(n),/android/i.test(navigator.userAgent)){setTimeout((function(){t.caret(i)}),0)}else this.caret(i);e.preventDefault()}this.updateModel(e),this.updateFilledState()}}},e.prototype.checkVal=function(e){var t,n,o=this.input.value,i=-1,r=0;for(t=0;t<this.len;t++)if(this.tests[t]){for(this.buffer[t]=this.getPlaceholder(t);r++<o.length;)if(n=o.charAt(r-1),this.tests[t].test(n)){this.buffer[t]=n,i=t;break}if(r>o.length){this.clearBuffer(t+1,this.len);break}}else this.buffer[t]===o.charAt(r)&&r++,t<this.partialPosition&&(i=t);return e?this.writeBuffer():i+1<this.partialPosition?this.autoClear||this.buffer.join("")===this.defaultBuffer?(this.input.value&&(this.input.value=""),this.clearBuffer(0,this.len)):this.writeBuffer():(this.writeBuffer(),this.input.value=this.input.value.substring(0,i+1)),this.partialPosition?t:this.firstNonMaskPos},e.prototype.onInputFocus=function(){var e,t=this;this.host.readonlyInput||(clearTimeout(this.caretTimeoutId),this.focusText=this.input.value,e=this.checkVal(),this.caretTimeoutId=setTimeout((function(){t.input===document.activeElement&&(t.writeBuffer(),e==t.mask.replace("?","").length?t.caret(0,e):t.caret(e))}),10))},e.prototype.onInputChange=function(e){this.androidChrome?this.handleAndroidInput(e):this.handleInputChange(e)},e.prototype.handleInputChange=function(e){var t=this;this.host.readonlyInput||setTimeout((function(){var n=t.checkVal(!0);t.caret(n),t.updateModel(e)}),0)},e.prototype.updateModel=function(e){var t=e.target.value;null===t&&void 0===t||(this.value=t,this.host.onUserInput(e))},e.prototype.updateFilledState=function(){this.filled=this.input&&""!=this.input.value},e.prototype.focus=function(){this.input.focus()},e.prototype.initMask=function(){this.tests=[],this.partialPosition=this.mask.length,this.len=this.mask.length,this.firstNonMaskPos=null,this.defs={9:"[0-9]"};for(var e=this.mask.split(""),t=0;t<e.length;t++){"?"==(n=e[t])?(this.len--,this.partialPosition=t):this.defs[n]?(this.tests.push(new RegExp(this.defs[n])),null===this.firstNonMaskPos&&(this.firstNonMaskPos=this.tests.length-1),t<this.partialPosition&&(this.lastRequiredNonMaskPos=this.tests.length-1)):this.tests.push(null)}this.buffer=[];for(t=0;t<e.length;t++){var n;"?"!=(n=e[t])&&(this.defs[n]?this.buffer.push(this.getPlaceholder(t)):this.buffer.push(n))}this.defaultBuffer=this.buffer.join("")},e.prototype.caret=function(e,t){var n,o,i;if(this.input.offsetParent&&this.input===document.activeElement)return"number"!=typeof e?(this.input.setSelectionRange?(o=this.input.selectionStart,i=this.input.selectionEnd):document.selection&&document.selection.createRange&&(i=(o=0-(n=document.selection.createRange()).duplicate().moveStart("character",-1e5))+n.text.length),{begin:o,end:i}):(o=e,i="number"==typeof t?t:o,void(this.input.setSelectionRange?this.input.setSelectionRange(o,i):this.input.createTextRange&&((n=this.input.createTextRange()).collapse(!0),n.moveEnd("character",i),n.moveStart("character",o),n.select())))},e.prototype.getPlaceholder=function(e){return e<this.slotChar.length?this.slotChar.charAt(e):this.slotChar.charAt(0)},e.prototype.seekNext=function(e){for(;++e<this.len&&!this.tests[e];);return e},e.prototype.seekPrev=function(e){for(;--e>=0&&!this.tests[e]&&!this.tests[e];);return e},e.prototype.shiftL=function(e,t){var n,o;if(!(e<0)){for(o=this.seekNext(t),n=e;n<this.len;n++)if(this.tests[n]){if(!(o<this.len&&this.tests[n].test(this.buffer[o])))break;this.buffer[n]=this.buffer[o],this.buffer[o]=this.getPlaceholder(o),o=this.seekNext(o)}this.writeBuffer(),this.caret(Math.max(this.firstNonMaskPos,e))}},e.prototype.shiftR=function(e){var t,n,o,i=this.getPlaceholder(e);for(t=e;t<this.len;t++)if(this.tests[t]){if(n=this.seekNext(t),o=this.buffer[t],this.buffer[t]=i,!(n<this.len&&this.tests[n].test(o)))break;i=o}},e.prototype.handleAndroidInput=function(e){var t=this,n=this.input.value,o=this.caret();if(this.oldVal&&this.oldVal.length&&this.oldVal.length>n.length){for(this.checkVal(!0);o.begin>0&&!this.tests[o.begin-1];)o.begin--;if(0===o.begin)for(;o.begin<this.firstNonMaskPos&&!this.tests[o.begin];)o.begin++;setTimeout((function(){if(t.caret(o.begin,o.begin),t.isCompleted()){var e=n.replace(t.slotChar,"");t.updateCalendarValue(e)}}),0)}else{for(this.checkVal(!0);o.begin<this.len&&!this.tests[o.begin];)o.begin++;setTimeout((function(){if(t.caret(o.begin,o.begin),t.isCompleted()){var e=n.replace(t.slotChar,"");t.updateCalendarValue(e)}}),0)}},e.prototype.updateCalendarValue=function(e){var t=this.host.parseValueFromString(e);this.host.isSelectable(t.getDate(),t.getMonth(),t.getFullYear(),!1)&&(this.host.updateModel(e),this.host.updateUI())},e.prototype.clearBuffer=function(e,t){var n;for(n=e;n<t&&n<this.len;n++)this.tests[n]&&(this.buffer[n]=this.getPlaceholder(n))},e.prototype.writeBuffer=function(){this.input.value=this.buffer.join("")},e.prototype.createMaskFromDateFormat=function(){var e=this.host,t=this.autoClear?"?":"";if(!e.timeOnly){var n=e.dateFormat;t+=(n=n.replace(/y/g,"yy")).replace(/[^/*,.\-+\[\]\\]/g,"9"),e.showTime&&(t+=" ")}(e.showTime||e.timeOnly)&&(t+="99:99",e.showSeconds&&(t+=":99")),this._mask=t,this.initMask()},e.prototype.isCompleted=function(){for(var e=this.firstNonMaskPos;e<=this.lastRequiredNonMaskPos;e++)if(this.tests[e]&&this.buffer[e]===this.getPlaceholder(e))return!1;return!0},e.prototype.ngAfterViewChecked=function(){this.host.inputfieldViewChild&&this.firstTime&&(this.firstTime=!1,this.setListeners(),this.input.type="tel")},e.prototype.ngOnDestroy=function(){this.focusListener&&this.focusListener(),this.blurListener&&this.blurListener(),this.keydownListener&&this.keydownListener(),this.keypressListener&&this.keypressListener(),this.inputListener&&this.inputListener(),this.pasteListener&&this.pasteListener()},e.prototype.onKeydownEventTest=function(e){var t=this;if("Tab"==e.key){var n,o=document.querySelectorAll(this.SELECTORS),i=!1,r=!0;o.forEach((function(o){if(!e.shiftKey&&i&&o.id)return t.focusableElement(o.id,r),i=!1,void e.preventDefault();var a=window.document.activeElement.tagName;if(e.shiftKey&&o.id&&"INPUT"===o.tagName&&"BUTTON"==a&&(n=o.id,r=!1),o.id===t.host.inputId){if(n)return t.focusableElement(n,r),e.preventDefault(),void(r=!0);i=!0}else e.shiftKey&&o.id&&(n=o.id)}))}},e.prototype.focusableElement=function(e,t){window.document.getElementById(e).focus(),t&&this.host.hideOverlay()},e.ctorParameters=function(){return[{type:c.Calendar},{type:t.Renderer2}]},ae([t.Input()],e.prototype,"slotChar",void 0),ae([t.Input()],e.prototype,"autoClear",void 0),ae([t.HostListener("keydown",["$event"])],e.prototype,"onKeydownEventTest",null),e=ae([t.Directive({selector:"p-calendar[sCalendarMask]"})],e)}(),we=function(){function e(){}return e=ae([t.NgModule({declarations:[xe],imports:[n.CommonModule],exports:[xe]})],e)}();(e.Languages||(e.Languages={})).TaxCalculation="TaxCalculation",(e.Themes||(e.Themes={})).SDSLight="SDSLight";var Ce,Ie,_e,ke,Te,Se,Ee=function(){function e(){}return e.getLinter=function(t){var n=e._LINTERS.get(t);if(n)return n()},e._LINTERS=new Map([]),e}(),Fe=function(){function t(){this.$onCoreFinishLoad=new r.ReplaySubject(1),this.$onCodeChange=new r.Subject,this.$onCodeValidityChange=new r.Subject,this._completionItems=[],this._lastCodeEmitted=""}return t.prototype.changeEditorOptions=function(e){if(e){if("object"!=typeof e)throw new Error("Editor's options must be an EditorOptions object");this.validateLanguage(e.language),this.validateTheme(e.theme),this.setLinter(e.language),this.setCoreEditorOptions(e)}},t.prototype.changeCode=function(e){var t=this.getSafeCode(e);t!==this._lastCodeEmitted&&this.setCode(t)},t.prototype.getOnCoreFinishLoadObservable=function(){return this.$onCoreFinishLoad.asObservable()},t.prototype.getOnCodeChangeObservable=function(){return this.$onCodeChange.asObservable()},t.prototype.getOnCodeValidityChangeObservable=function(){return this.$onCodeValidityChange.asObservable()},t.prototype.notifyCoreFinishLoad=function(){this.$onCoreFinishLoad.next()},t.prototype.notifyCodeChange=function(e){var t=this.getSafeCode(e);t!==this._lastCodeEmitted&&(this._lastCodeEmitted=t,this.$onCodeChange.next(t),this.validateCode(t))},t.prototype.updateCompletionItems=function(e){this._completionItems=e||[],this.validateCode(this._lastCodeEmitted)},t.prototype.setLinter=function(e){this._linter=Ee.getLinter(e)},t.prototype.validateCode=function(e){return le(this,void 0,void 0,(function(){var t;return pe(this,(function(n){switch(n.label){case 0:return this._linter?[4,this._linter.lint(e,this._completionItems)]:[3,2];case 1:t=n.sent(),this.highlightCode(t),this.notifyCodeValidityChange(!t.length),n.label=2;case 2:return[2]}}))}))},t.prototype.notifyCodeValidityChange=function(e){e!==this._lastCodeValidityEmitted&&(this._lastCodeValidityEmitted=e,this.$onCodeValidityChange.next(e))},t.prototype.validateLanguage=function(t){var n=Object.values(e.Languages);if(t&&!n.includes(t))throw new Error('The informed language "'+t+'" is not supported')},t.prototype.validateTheme=function(t){var n=Object.values(e.Themes);if(t&&!n.includes(t))throw new Error('The informed theme "'+t+'" is not supported')},t.prototype.getSafeCode=function(e){return"string"==typeof e?e:""},t}(),Le=function(){function e(e){this.coreFacade=e,this._ngUnsubscribe=new r.Subject,this.codeChange=new t.EventEmitter,this.isCodeValidChange=new t.EventEmitter,this.onCodeChange=new t.EventEmitter,this.onComponentFinishLoad=new t.EventEmitter}return Object.defineProperty(e.prototype,"editorOptions",{set:function(e){this.coreFacade.changeEditorOptions(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"code",{set:function(e){this.coreFacade.changeCode(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.coreFacade.initCore(),this.setupCoreListeners()},e.prototype.ngAfterViewInit=function(){this.setCoreWrapperElement()},e.prototype.ngOnDestroy=function(){this.coreFacade.destroyCore(),this._ngUnsubscribe.next(),this._ngUnsubscribe.complete()},e.prototype.setCoreWrapperElement=function(){this.coreFacade.setCoreWrapperElement(this.coreWrapperElement.nativeElement)},e.prototype.setupCoreListeners=function(){var e=this;this.coreFacade.getOnCoreFinishLoadObservable().pipe(a.take(1)).subscribe((function(){return e.onComponentFinishLoad.emit()})),this.coreFacade.getOnCodeChangeObservable().pipe(a.takeUntil(this._ngUnsubscribe)).subscribe((function(t){e.codeChange.emit(t),e.onCodeChange.emit(t)})),this.coreFacade.getOnCodeValidityChangeObservable().pipe(a.takeUntil(this._ngUnsubscribe)).subscribe((function(t){e.isCodeValidChange.emit(t)}))},e.ctorParameters=function(){return[{type:Fe}]},ae([t.ViewChild("coreWrapper")],e.prototype,"coreWrapperElement",void 0),ae([t.Input()],e.prototype,"editorOptions",null),ae([t.Input()],e.prototype,"code",null),ae([t.Output()],e.prototype,"codeChange",void 0),ae([t.Input()],e.prototype,"isCodeValid",void 0),ae([t.Output()],e.prototype,"isCodeValidChange",void 0),ae([t.Output()],e.prototype,"onCodeChange",void 0),ae([t.Output()],e.prototype,"onComponentFinishLoad",void 0),e=ae([t.Component({selector:"s-code-editor",template:'<div #coreWrapper class="core-wrapper"></div>',styles:[".core-wrapper{height:100%}"]})],e)}();!function(e){e.ASC="ASC",e.DESC="DESC"}(Ce||(Ce={})),function(e){e.ENTITY="ENTITY",e.STRING="STRING",e.INTEGER="INTEGER",e.DOUBLE="DOUBLE",e.LONG="LONG",e.BIGDECIMAL="BIGDECIMAL",e.UUID="UUID",e.DATE="DATE",e.DATETIME="DATETIME",e.LOCALDATETIME="LOCALDATETIME",e.TIME="TIME",e.BOOLEAN="BOOLEAN",e.LIST="LIST",e.ENUM="ENUM",e.CUSTOM_EXPRESSION="CUSTOM_EXPRESSION",e.PUBLIC_EXPRESSION="PUBLIC_EXPRESSION"}(Ie||(Ie={})),function(e){e[e.ListContextMetadataById=0]="ListContextMetadataById",e[e.ListExpressionMetadata=1]="ListExpressionMetadata",e[e.ListFacadeMetadataNames=2]="ListFacadeMetadataNames",e[e.GetFacadeMetadataByPath=3]="GetFacadeMetadataByPath"}(_e||(_e={})),function(e){e.Keyword="keyword",e.Context="context",e.Expression="expression",e.UserExpression="userExpression",e.Entity="entity",e.FinalValue="finalValue"}(ke||(ke={})),function(e){e.SE="SE",e.SENAO="SENAO",e.CONTENHA="CONTENHA",e.ENTAO="ENTAO",e.FIM_SE="FIM_SE",e.NAO="NAO",e.E="E",e.OU="OU"}(Te||(Te={}));var Me=f.LRLanguage.define({parser:h.buildParser('\n@top Script { statement+ }\n\nstatement[@isGroup=Statement] {\n Keyword |\n String |\n Number\n}\n\n@tokens {\n String { \'"\' (![\\n"])* \'"\'? }\n\n Number { std.digit+ }\n\n identifierChar { std.asciiLetter | $[_$¡-􏿿] }\n\n word { identifierChar (identifierChar | std.digit)* }\n\n identifier { word }\n}\n\nKeyword {\n kw<"SE">\n kw<"ENTAO">\n kw<"FIM_SE">\n kw<"SENAO">\n kw<"NAO">\n kw<"CONTENHA">\n kw<"OU">\n kw<"E">\n}\n\nkw<term> { @specialize[@name={term}]<identifier, term> }\n\n@detectDelim\n').configure({props:[g.styleTags((Se={},Se[Object.values(Te).join(" ")]=g.tags.keyword,Se.String=g.tags.string,Se.Number=g.tags.number,Se))]})});function Oe(e){return le(this,void 0,void 0,(function(){return pe(this,(function(t){return[2,e.json()]}))}))}function Re(e){return le(this,void 0,void 0,(function(){var t;return pe(this,(function(n){switch(n.label){case 0:return[4,e.blob()];case 1:return[4,n.sent().text()];case 2:return t=n.sent(),[2,JSON.parse(t)]}}))}))}var De,Ae=function(){function e(){}return e.GET=function(e,t){return void 0===t&&(t={}),le(this,void 0,void 0,(function(){var n;return pe(this,(function(o){switch(o.label){case 0:return[4,this.interceptRequest(e,re(re({},t),{method:"GET"}))];case 1:return n=o.sent(),[2,this.formatResponse(n)]}}))}))},e.POST=function(e,t,n){return void 0===n&&(n={}),le(this,void 0,void 0,(function(){var o,i;return pe(this,(function(r){switch(r.label){case 0:return(o=new Headers(n.headers)).append("Content-Type","application/json"),o.append("Accept","application/json"),[4,this.interceptRequest(e,re(re({},n),{method:"POST",body:JSON.stringify(t),headers:o}))];case 1:return i=r.sent(),[2,this.formatResponse(i)]}}))}))},e.interceptRequest=function(e,t){return void 0===t&&(t={}),le(this,void 0,void 0,(function(){var n,o,i,r,a;return pe(this,(function(s){switch(s.label){case 0:return s.trys.push([0,4,,5]),e.includes("://")?[3,3]:[4,v.service.getRestUrl()];case 1:return n=s.sent(),[4,v.user.getAuthHeader()];case 2:return o=s.sent(),(i=new Headers(t.headers)).append("Authorization",o),r=new Request(n+e,re(re({},t),{headers:i})),[2,fetch(r)];case 3:return[2,fetch(e,t)];case 4:throw a=s.sent(),new Error("Error fetching requested URL: "+a);case 5:return[2]}}))}))},e.formatResponse=function(t){return le(this,void 0,void 0,(function(){var n,o,i,r;return pe(this,(function(a){switch(a.label){case 0:return n=t.headers.get("content-type"),(o=e._responseFormatterMap.get(n))?[4,o(t)]:[3,2];case 1:return r=a.sent(),[3,3];case 2:r={},a.label=3;case 3:if(i=r,t.ok)return[2,i];throw new Error(JSON.stringify(i))}}))}))},e._responseFormatterMap=new Map([["application/json",Oe],["application/octet-stream",Re]]),e}(),Pe=function(){function e(){}return e.translate=function(t){var n,o;if(null==t)return"";var i=""+e._TRANSLATION_PREFIX+t;return null!==(o=(null!==(n=Object.values(e._translations)[0])&&void 0!==n?n:{})[i])&&void 0!==o?o:i},e.setTranslations=function(t){e._translations=null!=t?t:{}},e.setTranslationsPrefix=function(t){var n=null!=t?t:{},o=n.domain+"."+n.service+".";e._TRANSLATION_PREFIX=o},e._translations={},e._TRANSLATION_PREFIX="",e}(),Ne=new t.InjectionToken("hostProjectConfigs"),ze=function(){function e(){}var n;return n=e,e.forRoot=function(e){return{ngModule:n,providers:[{provide:Ne,useValue:e}]}},e=n=ae([t.NgModule({})],e)}(),Ve=function(){function e(e,t){this.translate=e,this.hostProjectConfigs=t,this.factoryTranslations(this.translate,this.hostProjectConfigs)}return e.prototype.factoryTranslations=function(e,t){Pe.setTranslations(e.translations),Pe.setTranslationsPrefix(t)},e.ctorParameters=function(){return[{type:y.TranslateService},{type:void 0,decorators:[{type:t.Inject,args:[Ne]}]}]},e=ae([t.NgModule(),se(1,t.Inject(Ne))],e)}();!function(e){e[e.Error=0]="Error",e[e.Info=1]="Info",e[e.Warning=2]="Warning"}(De||(De={}));var Be=new Map([[De.Error,"error"],[De.Info,"info"],[De.Warning,"warning"]]);var Ue=function(){function e(){}return e.listContextMetadataById=function(t,n){return le(this,void 0,void 0,(function(){return pe(this,(function(o){return[2,Ae.POST(e.BASE_URL+"/queries/listContextMetadataById",t,{signal:n})]}))}))},e.listExpressionMetadata=function(t,n){return le(this,void 0,void 0,(function(){return pe(this,(function(o){return[2,Ae.POST(e.BASE_URL+"/queries/listExpressionMetadata",t,{signal:n})]}))}))},e.listFacadeMetadataNames=function(t,n){return le(this,void 0,void 0,(function(){return pe(this,(function(o){return[2,Ae.POST(e.BASE_URL+"/queries/listFacadeMetadataNames",t,{signal:n})]}))}))},e.getFacadeMetadataByPath=function(t,n){return le(this,void 0,void 0,(function(){return pe(this,(function(o){return[2,Ae.POST(e.BASE_URL+"/queries/getFacadeMetadataByPath",t,{signal:n})]}))}))},e.BASE_URL="platform/rule_metadata",e}();var je,He,$e=null;function Ge(){return[u.StateField.define({create:We,update:function(e,t){return We(t.state)},provide:function(e){return x.showTooltip.compute([e],(function(t){return t.field(e)}))}}),d.EditorView.theme({".s-code-editor-taxCalculation-autocomplete-ul":{padding:".75rem !important"},".s-code-editor-taxCalculation-autocomplete-li":{cursor:"default !important","line-height":"1.375em !important"}})]}function qe(e){$e=e,mt.updateEditorView()}function We(e){if($e){var t=$e.outerHTML,n={pos:e.selection.ranges[0].head,create:function(){return{dom:Ke(t)}}};return $e=null,n}}function Ke(e){var t=document.createElement("div");return t.className="cm-tooltip-autocomplete cm-tooltip",t.innerHTML='\n <ul class="s-code-editor-taxCalculation-autocomplete-ul">\n <li class="s-code-editor-taxCalculation-autocomplete-li">\n '+e+"\n </li>\n </ul>\n\n ",t}function Ye(){var e;je||((e=document.createElement("span")).innerText=Pe.translate("core_language_tax_calculation_fetching_suggestions"),je=e),qe(je)}function Xe(){var e;He||((e=document.createElement("span")).innerText=Pe.translate("core_language_tax_calculation_no_suggestions"),He=e),qe(He)}var Ze=function(){function e(){}return e.setConfigs=function(t){e.CONFIGS=JSON.parse(JSON.stringify(t))},e.getConfigs=function(){return e.CONFIGS},e.CONFIGS={contexts:[]},e}();function Je(e){return'"\\'+e+'"'}var Qe,et="core_language_tax_calculation";function tt(e){if(!function(e){var t;return((null===(t=e.match(/"/g))||void 0===t?void 0:t.length)||0)%2!=0}(e.state.doc.toString().substring(0,e.pos))){if(Qe){var t=re({},Qe),n=e.state.doc.toString().length;return t.from=t.from>n?n:t.from,Qe=null,t}!function(e){var t=new AbortController;setTimeout((function(){t.signal.aborted||(Ye(),function(e,t){var n,o,i,r;le(this,void 0,void 0,(function(){var a,s,l,p;return pe(this,(function(c){return a=null!==(r=null===(o=null===(n=null==e?void 0:e.state)||void 0===n?void 0:n.doc)||void 0===o?void 0:o.toString().substring(0,null!==(i=null==e?void 0:e.pos)&&void 0!==i?i:0))&&void 0!==r?r:"",s=function(e){var t,n;return null==e?"":(null!==(n=null===(t=e.match(/(#|\.|)\w*$/))||void 0===t?void 0:t[0])&&void 0!==n?n:"").replace(".","").trim()}(a),l=function(e,t){var n,o;if(null==e)return"";var i=e.substring(0,e.length-t);return(null!==(o=null===(n=i.match(/(\w*\.)*$/))||void 0===n?void 0:n[0])&&void 0!==o?o:"").replace(/\.$/,"")}(a,s.length),p=function(e,t,n){var o,i=function(){var e,t=Ze.getConfigs();if(!(null===(e=t.contexts)||void 0===e?void 0:e.length))throw new Error("In order to use the TaxCalculation Language's autocomplete, one must inform at least one context by using the 'TaxCalculationLanguageConfigs.setConfigs()'");return t}(),r=[];if(""===e)r.push({requestType:_e.ListContextMetadataById,request:Ue.listContextMetadataById({id:i.contexts},n)}),r.push({requestType:_e.ListExpressionMetadata,request:Ue.listExpressionMetadata({context:i.contexts,subcontext:null!==(o=i.subContexts)&&void 0!==o?o:[],name:t,pageRequest:{offset:0,size:20}},n)});else if(e.includes(".")){var a=e.split(".");r.push({requestType:_e.GetFacadeMetadataByPath,request:Ue.getFacadeMetadataByPath({context:a[0],entityName:a[1],fields:void 0===a[2]?void 0:a.slice(2)},n)})}else r.push({requestType:_e.ListFacadeMetadataNames,request:Ue.listFacadeMetadataNames({context:[e],name:t,pageRequest:{offset:0,size:30}},n)});return r.map((function(e){return function(e){return le(this,void 0,void 0,(function(){var t,n;return pe(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=[re({},e)],n={},[4,e.request];case 1:return[2,re.apply(void 0,t.concat([(n.response=o.sent(),n)]))];case 2:return o.sent(),[3,3];case 3:return[2]}}))}))}(e)}))}(l,s,t.signal),Promise.all(p).then((function(n){if(!t.signal.aborted){var o=function(e,t){return e.filter((function(e){return e.label.toLowerCase().startsWith(t.toLowerCase())}))}([].concat(function(e){return""!==e?[]:[{label:Te.SE,apply:"SE ()\nENTAO\n\tacao\nFIM_SE"},{label:Te.SENAO,apply:"SENAO\n\tacao"},{label:Te.CONTENHA,apply:"CONTENHA(condicao)"},{label:Te.ENTAO,apply:"ENTAO\n\tacao"},{label:Te.FIM_SE,apply:"FIM_SE "},{label:Te.NAO,apply:"NAO "},{label:Te.E,apply:"E "},{label:Te.OU,apply:"OU "}].map((function(e){return re(re({},e),{detail:Pe.translate(et+"_keyword"),type:ke.Keyword})}))}(l),function(e){var t,n,o=e.find((function(e){return(null==e?void 0:e.requestType)===_e.ListContextMetadataById}));if(o)return(null!==(n=null===(t=o.response)||void 0===t?void 0:t.contextMetadata)&&void 0!==n?n:[]).map((function(e){return{label:e.name,detail:Pe.translate(et+"_context"),apply:e.name,type:ke.Context}}));return[]}(n),function(e){var t,n,o=e.find((function(e){return(null==e?void 0:e.requestType)===_e.ListExpressionMetadata}));if(o)return(null!==(n=null===(t=o.response)||void 0===t?void 0:t.expressionMetadata)&&void 0!==n?n:[]).map((function(e){return{label:e.name,detail:Pe.translate(et+"_"+(e.type===Ie.PUBLIC_EXPRESSION?"senior_expression":"user_expression")),apply:e.name,info:e.description,type:e.type===Ie.PUBLIC_EXPRESSION?ke.Expression:ke.UserExpression}}));return[]}(n),function(e){var t,n,o,i,r,a=e.find((function(e){return(null==e?void 0:e.requestType)===_e.ListFacadeMetadataNames}));if(a)return(null!==(n=null===(t=a.response)||void 0===t?void 0:t.facadeMetadataNames)&&void 0!==n?n:[]).map((function(e){return{label:e.name,detail:Pe.translate(et+"_entity"),apply:e.name,type:ke.Entity}}));var s=e.find((function(e){return(null==e?void 0:e.requestType)===_e.GetFacadeMetadataByPath}));if(s)return(null!==(r=null===(i=null===(o=s.response)||void 0===o?void 0:o.facadeMetadata)||void 0===i?void 0:i.fields)&&void 0!==r?r:[]).map((function(e){return{label:e.name,detail:Pe.translate(et+"_"+(e.type===Ie.ENTITY?"entity":"field")),apply:e.name,type:e.type===Ie.ENTITY?ke.Entity:ke.FinalValue}}));return[]}(n)),s);if(o.length){var i=function(e){return e.sort((function(e,t){return rt.indexOf(e.type)-rt.indexOf(t.type)}))}(function(e,t){return e.map((function(e){return re(re({},e),{apply:it(t,""+e.apply)})}))}(o,s));Qe={from:e.pos,filter:!1,options:i},b.startCompletion(mt.getEditorView())}else Xe()}})),[2]}))}))}(e,t))}),500),nt=mt.getEditorView().contentDOM,ot=function(){nt.removeEventListener("keydown",ot),nt.removeEventListener("click",ot),t.abort()},nt.addEventListener("keydown",ot),nt.addEventListener("click",ot)}(e)}}var nt,ot=function(){};function it(e,t){return function(n,o,i,r){var a=i-e.length;n.dispatch({changes:{from:a,to:r,insert:t},selection:{anchor:a+t.length},userEvent:"input.complete",annotations:b.pickedCompletion.of(o)})}}var rt=[ke.Keyword,ke.Context,ke.UserExpression,ke.Expression,ke.Entity,ke.FinalValue];function at(){return new f.LanguageSupport(Me,[[b.autocompletion({override:[tt]}),[Ge()],[Ge()],d.EditorView.theme({".cm-completionIcon":{"font-family":"'Font Awesome 5 Pro'","font-weight":"900"},".cm-completionIcon-keyword::after":{content:Je("f084")},".cm-completionIcon-context::after":{content:Je("f466")},".cm-completionIcon-expression::after":{content:Je("f505")},".cm-completionIcon-userExpression::after":{content:Je("f4ff")},".cm-completionIcon-entity::after":{content:Je("f126")},".cm-completionIcon-finalValue::after":{content:Je("f192")}})]])}var st=function(){function t(){}return t.getLanguage=function(e){var n=t._LANGUAGES.get(e);return n?n():[]},t._LANGUAGES=new Map([[e.Languages.TaxCalculation,at]]),t}();var lt=g.HighlightStyle.define([{tag:g.tags.keyword,color:"#008080"},{tag:g.tags.string,color:"#9C3A3A"},{tag:g.tags.number,color:"#400753"}]);var pt={"font-family":"'Noto Sans Mono', 'sans-serif'","font-style":"normal","font-size":"1rem"};function ct(){return[[d.EditorView.theme({"&.cm-editor.cm-focused":{outline:"none"}}),[d.EditorView.baseTheme({"&.cm-editor":{height:"100%"}})],[d.EditorView.theme({".cm-scroller":re(re({},pt),{"letter-spacing":"0","line-height":"1.5em","font-variation-settings":"'wght' 400",color:"#333333"}),".cm-tooltip.cm-tooltip-autocomplete > ul":re(re({},pt),{"font-variation-settings":"'wght' 300",color:"#697882"}),".cm-tooltip.cm-tooltip-autocomplete > ul .cm-completionLabel":{"line-height":"1.5em","font-variation-settings":"'wght' 500"},".cm-tooltip.cm-tooltip-autocomplete > ul .cm-completionDetail":{"font-size":"0.875em","font-style":"normal","margin-left":"0.75rem"}})],[w.lineNumbers(),d.EditorView.theme({".cm-gutters":{"background-color":"#fff",color:"#428BCA","border-right":"none"},".cm-gutter":{padding:"0 2rem 0 2rem"}})],[d.EditorView.baseTheme({".cm-tooltip":{border:"none !important","border-radius":"4px","background-color":"#E5EAEA !important"},".cm-tooltip.cm-tooltip-autocomplete > ul[role='listbox']":{padding:"1rem"},".cm-tooltip.cm-tooltip-autocomplete > ul .cm-completionDetail":{"margin-left":".75rem"},".cm-tooltip.cm-tooltip-autocomplete > ul .cm-completionDetail::before":{content:"'[ '"},".cm-tooltip.cm-tooltip-autocomplete > ul .cm-completionDetail::after":{content:"' ]'"},".cm-tooltip.cm-tooltip-autocomplete > ul .cm-completionIcon":{"padding-right":0,"margin-right":".475rem",width:"1rem"},".cm-tooltip-autocomplete ul li[aria-selected]":{"border-radius":"4px","background-color":"#5D96A2 !important",color:"#fff !important"},".cm-tooltip.cm-completionInfo.cm-completionInfo-right":{"border-radius":"3px","box-shadow":"0 2px 4px -1px rgb(0 0 0 / 20%), 0 4px 5px 0 rgb(0 0 0 / 14%), 0 1px 10px 0 rgb(0 0 0 / 12%)",background:"#495057 !important",color:"#fff",padding:".5rem",left:"101.6%"},".cm-tooltip.cm-completionInfo.cm-completionInfo-right::before":{content:"''",position:"absolute",width:0,height:0,top:".8125rem",left:"-.25rem","margin-top":"-.25rem","border-color":"transparent","border-style":"solid","border-right-color":"#495057","border-width":".25rem .25rem .25rem 0"}})]],lt]}var dt,ut=function(){function t(){}return t.getTheme=function(e){var n=t._THEMES.get(e);return n?n():[]},t._THEMES=new Map([[e.Themes.SDSLight,ct]]),t}(),mt=function(e){function t(){var t=e.call(this)||this;return t._codeReceivedBeforeViewCreation="",t._editorOptionsReceivedBeforeViewCreation=[],t}return ie(t,e),t.getEditorView=function(){return t._editorView},t.updateEditorView=function(){for(var e,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];(e=t._editorView).dispatch.apply(e,ue(n))},t.prototype.setCoreWrapperElement=function(e){this.createEditorView(e)},t.prototype.setCode=function(e){this.changeEditorContent(e)},t.prototype.initCore=function(){this.setObservablesListeners()},t.prototype.destroyCore=function(){this._codeReceivedBeforeViewCreation="",t._editorView=null,t._ngUnsubscribe.next(),t._ngUnsubscribe.complete()},t.prototype.setCoreEditorOptions=function(e){var n=st.getLanguage(e.language),o=ut.getTheme(e.theme);t._editorView?t.updateEditorView({effects:u.StateEffect.reconfigure.of([n,o,this.getCodeChangeListenerExtension()])}):this._editorOptionsReceivedBeforeViewCreation=[n,o]},t.prototype.highlightCode=function(e){var n=function(e,t){return e.map((function(e){var n,o;return{from:e.start||0,to:e.end||t,message:null!==(n=e.message)&&void 0!==n?n:"",severity:null!==(o=Be.get(e.severity))&&void 0!==o?o:"error"}}))}(e,t._editorView.state.doc.length);t.updateEditorView(m.setDiagnostics(t._editorView.state,n))},t.prototype.setObservablesListeners=function(){var e=this;t.$onCompletionItemsUpdate.pipe(a.takeUntil(t._ngUnsubscribe)).subscribe((function(t){return e.updateCompletionItems(t)}))},t.prototype.createEditorView=function(e){t._editorView=new d.EditorView({parent:e,state:u.EditorState.create({doc:this._codeReceivedBeforeViewCreation,extensions:[this._editorOptionsReceivedBeforeViewCreation,this.getCodeChangeListenerExtension()]})}),this.notifyCoreFinishLoad()},t.prototype.getCodeChangeListenerExtension=function(){var e=this;return d.EditorView.updateListener.of((function(t){return t.docChanged&&e.notifyCodeChange(t.state.doc.toString())}))},t.prototype.changeEditorContent=function(e){t._editorView?t.updateEditorView({changes:{from:0,to:t._editorView.state.doc.length,insert:e}}):this._codeReceivedBeforeViewCreation=e},t.$onCompletionItemsUpdate=new r.Subject,t._ngUnsubscribe=new r.Subject,t._editorView=null,t}(Fe),ft=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,Ve],declarations:[Le],exports:[Le],providers:[{provide:Fe,useClass:mt}]})],e)}(),ht=function(){function e(){this.buttonId="s-collapse-button-"+n.nextId++,this.expandedLabel="Mostrar menos",this.collapsedLabel="Mostrar mais",this.disabled=!1,this.collapse=!0,this.collapsed=!0}var n;return n=e,e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){e.collapse&&this.onCollapse(e.collapse.currentValue)},e.prototype.toggle=function(){this.animating||(this.animating=!0,this.collapsed=!this.collapsed)},e.prototype.onToggleDone=function(){this.animating=!1},e.prototype.onCollapse=function(e){this.animating||(this.animating=!0,this.collapsed=e)},e.nextId=0,ae([t.Input()],e.prototype,"buttonId",void 0),ae([t.Input()],e.prototype,"expandedLabel",void 0),ae([t.Input()],e.prototype,"collapsedLabel",void 0),ae([t.Input()],e.prototype,"disabled",void 0),ae([t.Input()],e.prototype,"collapse",void 0),e=n=ae([t.Component({selector:"s-collapse-link",template:'<div *ngIf="!collapsed" @collapseContent (@collapseContent.done)="onToggleDone()">\n <ng-content></ng-content>\n</div>\n\n<button [id]="buttonId" type="button" class="s-collapse-button" (click)="toggle()" [disabled]="disabled">\n <span class="s-button-icon fa" [ngClass]="{\'fa-caret-down\': collapsed, \'fa-caret-up\': !collapsed}"\n aria-hidden="true"></span>\n <span class="s-button-text">{{ collapsed ? collapsedLabel : expandedLabel }}</span>\n</button>\n',animations:[C.trigger("collapseContent",[C.state("void",C.style({height:0,opacity:0})),C.state("*",C.style({height:"*",opacity:1})),C.transition("void <=> *",C.animate("400ms cubic-bezier(0.86, 0, 0.07, 1)"))])],styles:['button.s-collapse-button{-ms-flex-align:center;align-items:center;cursor:pointer;font-family:"Open Sans",sans-serif;font-size:14px;height:34px;max-width:100%;min-width:40px;outline:0;overflow:visible;padding:5px 20px;position:relative;text-decoration:none;text-transform:none;vertical-align:bottom;background-color:transparent;border-color:transparent}button.s-collapse-button:disabled{opacity:.5;filter:Alpha(Opacity=50);background-image:none}button.s-collapse-button:disabled,button.s-collapse-button:disabled *{cursor:text!important}button.s-collapse-button:focus,button.s-collapse-button:hover{background-color:rgba(26,26,26,0);border-color:rgba(26,26,26,0)}button.s-collapse-button.s-button-active:not(:disabled),button.s-collapse-button:active:not(:disabled){background-color:rgba(0,0,0,0);border-color:transparent}button.s-collapse-button .s-button-icon{left:10px;margin-top:-.5em;position:absolute;top:50%;width:20px}button.s-collapse-button .s-button-icon,button.s-collapse-button .s-button-text{color:#428bca}button.s-collapse-button .s-button-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;margin-left:10px;margin-right:10px}']})],e)}(),gt=function(){function e(){}return e=ae([t.NgModule({declarations:[ht],exports:[ht],imports:[n.CommonModule]})],e)}(),bt=function(){function e(){this.id="s-control-errors-"+n.nextId++,this.errorMessages={}}var n;return n=e,e.prototype.getErrorMessagesList=function(){var e=this;return this.control&&this.control.dirty?Object.keys(this.control.errors||{}).map((function(t){return e.errorMessages[t]})):[]},e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"control",void 0),ae([t.Input()],e.prototype,"errorMessages",void 0),ae([t.Input()],e.prototype,"form",void 0),e=n=ae([t.Component({selector:"s-control-errors",template:'<ng-container *ngFor="let errorMessage of getErrorMessagesList()">\n <div *ngIf="errorMessage" class="error-message">{{ errorMessage }}</div>\n</ng-container>\n',styles:[".error-message{color:#c13018;margin-top:5px;font-size:12px}"]})],e)}(),vt=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,I.FormsModule,I.ReactiveFormsModule],declarations:[bt],exports:[bt]})],e)}();(dt=e.FieldType||(e.FieldType={})).Autocomplete="Autocomplete",dt.Binary="Binary",dt.Boolean="Boolean",dt.Chips="Chips",dt.Date="Date",dt.DateTime="DateTime",dt.LocalDateTime="LocalDateTime",dt.Double="Double",dt.Enum="Enum",dt.Blob="Blob",dt.Integer="Integer",dt.Lookup="Lookup",dt.Money="Money",dt.Radio="Radio",dt.String="String",dt.Text="Text",dt.Time="Time",dt.Number="Number",dt.Custom="Custom",dt.Password="Password";var yt,xt=function(e){var t=e.sm,n=void 0===t?12:t,o=e.md,i=void 0===o?6:o,r=e.lg,a=void 0===r?6:r,s=e.xl,l=void 0===s?6:s;this.sm=n,this.md=i,this.lg=a,this.xl=l},wt=function(e){var t=this;this.required=e.required||function(){return!1},this.visible=e.visible||function(){return!0},this.id=e.id,this.name=e.name,this.label=e.label,this.infoSign=e.infoSign,this.tooltip=e.tooltip,this.placeholder=e.placeholder||"",this.showClear=e.showClear||!1,this.type=e.type,this.size=new xt(e.size||{}),this.errorMessages=e.errorMessages,this.bottomTemplate=e.bottomTemplate,this.gridClass=Object.keys(this.size).map((function(e){return"ui-"+e+"-"+t.size[e]})),this.defaultValue=e.defaultValue,this.representedBy=e.representedBy},Ct=function(t){function n(n){var o=t.call(this,re(re({},n),{type:e.FieldType.Autocomplete}))||this;return o.suggestions=[],Object.assign(o,n),o.suggestionsObservable.subscribe((function(e){return o.suggestions=e})),o}return ie(n,t),n}(wt),It=function(e){var t=this;void 0===e&&(e={}),this.hourFormat="24",this.dateFormat="dd/mm/yy",this.firstDayOfWeek=0,this.today="Hoje",this.clear="Limpar",this.dayNames=["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],this.dayNamesShort=["Dom","Seg","Ter","Qua","Qui","Sex","Sab"],this.dayNamesMin=["D","S","T","Q","Q","S","S"],this.monthNamesShort=["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],this.monthNames=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],Object.keys(e).forEach((function(n){return t[n]=e[n]||t[n]}))},_t=function(e){void 0===e&&(e={}),this.thousandsSeparator=".",this.decimalSeparator=",",this.currencySymbol="R$",Object.assign(this,e)},kt=function(e){var t=this;void 0===e&&(e={}),this.calendar=new It,this.number=new _t,Object.keys(e).forEach((function(n){return t[n]=e[n]||t[n]}))},Tt=new It,St=new _t,Et=new kt,Ft=M,Lt=function(){function e(e,t){this.http=e,this.cookieService=t,this.localeOptionsAddress="https://cdn.senior.com.br/primeng/locales",this.localeOptionsVersion="3.0.0"}return e.prototype.get=function(){var e=this;return this.localeOptions?r.of(this.localeOptions):this.getLocaleConfig().pipe(a.tap((function(t){return e.localeOptions=t})))},e.prototype.getLocale=function(){var e=this;return this.locale?r.of(this.locale):r.from(this.getUserData()).pipe(a.map((function(t){return e.locale=t.locale||t.tenantLocale||"pt-BR",e.locale})))},e.prototype.getUserData=function(){try{return r.of(JSON.parse(this.cookieService.get("com.senior.token")))}catch(e){return console.warn("Unable to obtain user locale from cookie, calling getUser"),v.user.getUserData()}},e.prototype.getLocaleConfig=function(){var e=this;return this.getLocale().pipe(a.switchMap((function(t){return Ft.locale(t),e.http.get(e.localeOptionsAddress+"/"+e.localeOptionsVersion+"/"+t+".json").pipe(a.map((function(e){return new kt(e)})))})),a.catchError((function(e){return console.warn("Error getting locale configuration. Using fallback.",e),r.of(new kt)})))},e.ctorParameters=function(){return[{type:_.HttpClient},{type:O.CookieService}]},e=ae([t.Injectable()],e)}(),Mt=function(){function e(e){this.localeService=e}return e.prototype.transform=function(e,t){return null!=e?this.applyMask(e,t):r.of(e)},e.prototype.applyMask=function(e,t){return this.localeService.get().pipe(a.map((function(n){var o,i,r,a,s,l,p,c,d,u,m,f={prefix:null!==(r=null!==(o=null==t?void 0:t.prefix)&&void 0!==o?o:null===(i=null==n?void 0:n.number)||void 0===i?void 0:i.currencySymbol)&&void 0!==r?r:"R$",thousandsSeparator:null!==(l=null!==(a=null==t?void 0:t.thousandsSeparator)&&void 0!==a?a:null===(s=null==n?void 0:n.number)||void 0===s?void 0:s.thousandsSeparator)&&void 0!==l?l:".",decimalSeparator:null!==(d=null!==(p=null==t?void 0:t.decimalSeparator)&&void 0!==p?p:null===(c=null==n?void 0:n.number)||void 0===c?void 0:c.decimalSeparator)&&void 0!==d?d:",",scale:null!==(u=null==t?void 0:t.scale)&&void 0!==u?u:2,allowNegative:null===(m=null==t?void 0:t.allowNegative)||void 0===m||m},h=!new ne(e).isNaN();return L.applyMask(e,f,h)})))},e.ctorParameters=function(){return[{type:Lt}]},e=ae([t.Pipe({name:"localizedBignumber"})],e)}(),Ot=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),n.prototype.transform=function(t,n){return e.prototype.transform.call(this,t,n)},n=ae([t.Pipe({name:"localizedBignumberImpure",pure:!1})],n)}(Mt),Rt=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.scale=2,n}return ie(t,e),t}(_t),Dt=function(){function e(e){this.localeService=e}return e.prototype.transform=function(e,t){return t||(t=new Rt),null!=e?this.applyMask(e,t):r.of(e)},e.prototype.applyMask=function(e,t){return this.localeService.get().pipe(a.map((function(n){var o=re(re({},n.number),t),i=o.scale,r=o.currencySymbol,a=o.thousandsSeparator,s=o.decimalSeparator,l=Number(e).toFixed(i),p=l.replace(/[^0-9]/g,""),c=p.slice(0,p.length-i).replace(/^0*/g,"").replace(/\B(?=(\d{3})+(?!\d))/g,a)||"0",d=p.slice(p.length-i),u=i?c+s+d:c,m=!Number(p);return""+(l.includes("-")&&!m?"-":"")+r+u})))},e.ctorParameters=function(){return[{type:Lt}]},e=ae([t.Pipe({name:"localizedCurrency"})],e)}(),At=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),n.prototype.transform=function(t,n){return void 0===n&&(n=new Rt),e.prototype.transform.call(this,t,n)},n=ae([t.Pipe({name:"localizedCurrencyImpure",pure:!1})],n)}(Dt),Pt=M,Nt=function(){function e(e){this.localeService=e}return e.prototype.transform=function(e,t){return void 0===t&&(t="L LTS"),this.localeService.get().pipe(a.map((function(){return e?Pt(e).format(t):e})))},e.ctorParameters=function(){return[{type:Lt}]},e=ae([t.Pipe({name:"localizedDate"})],e)}(),zt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),n=ae([t.Pipe({name:"localizedDateImpure",pure:!1})],n)}(Nt),Vt=function(){function e(e){this.localeService=e}return e.prototype.transform=function(e,t){return r.from(this.localeService.getLocale()).pipe(a.map((function(n){var o=Number(e);if(e||!isNaN(o))return new Intl.NumberFormat(n,{minimumFractionDigits:t||0}).format(Number(e))})))},e.ctorParameters=function(){return[{type:Lt}]},e=ae([t.Pipe({name:"localizedNumber"})],e)}(),Bt=M,Ut=function(){function e(e){this.localeService=e}return e.prototype.transform=function(e,t){return void 0===t&&(t="LTS"),this.localeService.get().pipe(a.map((function(){return e?Bt(e,"HH:mm:ss").format(t):e})))},e.ctorParameters=function(){return[{type:Lt}]},e=ae([t.Pipe({name:"localizedTime"})],e)}(),jt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),n=ae([t.Pipe({name:"localizedTimeImpure",pure:!1})],n)}(Ut),Ht=function(){function e(){}var o;return o=e,e.forRoot=function(){return{ngModule:o,providers:[Lt,Dt,Nt,Ut,Vt,At,zt,jt,Mt,Ot]}},e.forChild=function(){return{ngModule:o}},e=o=ae([t.NgModule({imports:[n.CommonModule],exports:[Dt,Nt,Ut,Vt,At,zt,jt,Mt,Ot],declarations:[Dt,Nt,Ut,Vt,At,zt,jt,Mt,Ot]})],e)}(),$t=function(e){function t(t){var n,o,i=e.call(this,t)||this;return i.allowNegative=null===(n=t.allowNegative)||void 0===n||n,i.numberLocaleOptions=t.numberLocaleOptions||new _t,i.browserAutocomplete=t.browserAutocomplete,i.precision=t.precision,i.scale=null!==(o=t.scale)&&void 0!==o?o:2,i.alignTo=i.scale?L.AlignmentOptions.RIGHT:L.AlignmentOptions.LEFT,i.mask=t.mask,i.leftAddon=t.leftAddon,i.rightAddon=t.rightAddon,i.onBlur=t.onBlur,i.onFocus=t.onFocus,i.onComplete=t.onComplete,i.onInput=t.onInput,i}return ie(t,e),t}(wt),Gt=function(e){function t(t){var n=e.call(this,t)||this;return n.accept=t.accept,n.files=t.files||[],n.chooseLabel=t.chooseLabel,n.removeLabel=t.removeLabel,n.cancelLabel=t.cancelLabel,n.successTooltip=t.successTooltip,n.multiple=t.multiple,n.onUploadFile=t.onUploadFile,n.onRemoveFile=t.onRemoveFile,n.onCancelUpload=t.onCancelUpload,n.onDownloadFile=t.onDownloadFile,n}return ie(t,e),t}(wt),qt=function(e){this.true=e.true,this.false=e.false,this.empty=e.empty,this.clear=e.clear},Wt=function(e){function t(t){var n=e.call(this,t)||this;return n.verticalAlignment=t.verticalAlignment,n.optionsLabel=new qt(t.optionsLabel),n.representedBy="radio",n.onBlur=t.onBlur,n.onFocus=t.onFocus,n.onClick=t.onClick,n}return ie(t,e),t}(wt),Kt=function(e){function t(t){var n=e.call(this,t)||this;return n.onChange=t.onChange,n.representedBy="switch",n}return ie(t,e),t}(wt),Yt=function(t){function n(n){var o=t.call(this,n)||this;if(o.view=n.view||"date",o.minDate=n.minDate,o.maxDate=n.maxDate,o.defaultDate=n.defaultDate,o.appendTo=n.appendTo,o.showOnFocus="boolean"!=typeof n.showOnFocus||n.showOnFocus,o.calendarLocaleOptions=n.calendarLocaleOptions||new It,o.onBlur=n.onBlur,o.onFocus=n.onFocus,o.onSelect=n.onSelect,o.onInput=n.onInput,o.onClose=n.onClose,o.onTodayClick=n.onTodayClick,o.onClearClick=n.onClearClick,o.onMonthChange=n.onMonthChange,o.onYearChange=n.onYearChange,o.selectionMode=n.selectionMode||"single",o.rangeSeparator=n.rangeSeparator||"-",o.showSeconds=n.showSeconds,null===o.showSeconds||void 0===o.showSeconds)switch(o.type){case e.FieldType.DateTime:case e.FieldType.LocalDateTime:case e.FieldType.Time:o.showSeconds=!0}return o}return ie(n,t),n}(wt),Xt=function(e){function t(t){var n=e.call(this,t)||this;return n.keyFilter=t.keyFilter,n.onAdd=t.onAdd,n.onRemove=t.onRemove,n.onChipClick=t.onChipClick,n.onFocus=t.onFocus,n.onBlur=t.onBlur,n}return ie(t,e),t}(wt);(yt=e.NumberAlignmentOption||(e.NumberAlignmentOption={})).RIGHT="right",yt.LEFT="left";var Zt,Jt=function(n){function o(){var t=null!==n&&n.apply(this,arguments)||this;return t.precision=15,t.scale=0,t.decimalSeparator=",",t.thousandsSeparator=".",t.alignTo=e.NumberAlignmentOption.LEFT,t.allowNegative=!0,t.regex=/\d/,t}var i;return ie(o,n),i=o,o.prototype.ngOnInit=function(){this.updateVariables(),n.prototype.ngOnInit.call(this)},o.prototype.ngOnChanges=function(e){!(e.placeholder&&e.placeholder.currentValue)&&this.scale&&(this.placeholder="0"+this.decimalSeparator+"".padEnd(this.scale,"0")),(e.scale||e.decimalSeparator||e.thousandsSeparator||e.alignTo||e.precision||e.allowNegative)&&this.updateVariables()},o.prototype.updateVariables=function(){this.options={align:this.alignTo,decimal:this.decimalSeparator,thousands:this.thousandsSeparator,precision:this.scale||0,prefix:"",suffix:"",allowNegative:this.allowNegative},this.calculateMaxLength()},o.prototype.calculateMaxLength=function(){var e=this.decimalSeparator.length,t=this.thousandsSeparator.length,n=this.precision+(this.scale?e:0);n+=Math.ceil((this.precision-(this.scale?this.scale:0))/3-1)*t,this.maxLength=n},o.prototype.handleKeypress=function(e){var t=e.key;this.thousandsSeparator.includes(t)||this.decimalSeparator.includes(t)||"-".includes(t)||this.regex.test(t)||"Enter".toUpperCase()===t.toUpperCase()?n.prototype.handleKeypress.call(this,e):e.preventDefault()},ae([t.Input()],o.prototype,"precision",void 0),ae([t.Input()],o.prototype,"scale",void 0),ae([t.Input()],o.prototype,"decimalSeparator",void 0),ae([t.Input()],o.prototype,"thousandsSeparator",void 0),ae([t.Input()],o.prototype,"alignTo",void 0),ae([t.Input()],o.prototype,"allowNegative",void 0),ae([t.Input(),t.HostBinding("attr.placeholder")],o.prototype,"placeholder",void 0),ae([t.HostBinding("attr.maxLength")],o.prototype,"maxLength",void 0),o=i=ae([t.Directive({selector:"input[sNumberInput]",providers:[{provide:I.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return i})),multi:!0}]})],o)}(R.CurrencyMaskDirective),Qt=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[Jt],exports:[Jt]})],e)}(),en=function(t){function n(n){var o=t.call(this,n)||this;return o.numberLocaleOptions=n.numberLocaleOptions||new _t,o.browserAutocomplete=n.browserAutocomplete,o.precision=n.precision,o.alignTo=n.alignTo||e.NumberAlignmentOption.LEFT,o.mask=n.mask,o.leftAddon=n.leftAddon,o.rightAddon=n.rightAddon,o.onBlur=n.onBlur,o.onFocus=n.onFocus,o.onComplete=n.onComplete,o.onInput=n.onInput,o}return ie(n,t),n}(wt),tn=function(t){function n(n){var o=t.call(this,n)||this;return o.numberLocaleOptions=n.numberLocaleOptions||new _t,o.alignTo=n.alignTo||e.NumberAlignmentOption.RIGHT,o.scale=n.scale||0===n.scale?n.scale:2,o}return ie(n,t),n}(en),nn=function(e){function t(t){var n=e.call(this,t)||this;return n.numberLocaleOptions=t.numberLocaleOptions||new _t,n}return ie(t,e),t}(tn),on=function(t){function n(n){var o=t.call(this,re(re({},n),{type:e.FieldType.Lookup}))||this;return o.multiple=!1,o.searchTitle="Pesquisa avançada",o.searchEmptyTitle="Nenhum registro encontrado",o.filterLabel="Filtrar",o.filterTitle="Filtros",o.clearLabel="Limpar",o.cancelLabel="Cancelar",o.selectLabel="Selecionar",o.recordLabel=" registro",o.recordsLabel=" registros",o.emptyFieldLabel="Não informado",o.autocompleteForceSelection=!0,o.onSelect=function(e){},o.onUnselect=function(e){},Object.assign(o,n),o.suggestionsObservable.subscribe((function(e){return o.lookupSuggestions=e})),o.searchObservable.pipe(a.delay(0)).subscribe((function(e){var t=e.totalRecords,n=e.gridData,i=e.searchTotalRecordsLabel;o._gridData=n,o._searchTotalRecords=t,o._searchTotalRecordsLabel=i})),o}return ie(n,t),Object.defineProperty(n.prototype,"gridData",{get:function(){return this._gridData},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"searchTotalRecords",{get:function(){return this._searchTotalRecords},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"searchTotalRecordsLabel",{get:function(){return this._searchTotalRecordsLabel},enumerable:!0,configurable:!0}),n}(wt),rn=function(e){function t(t){var n=e.call(this,t)||this;return n.verticalAlignment=t.verticalAlignment,n.options=t.options,n.onBlur=t.onBlur,n.onFocus=t.onFocus,n.onClick=t.onClick,n}return ie(t,e),t}(wt),an=function(e){this.label=e.label,this.value=e.value},sn=function(e){function t(t){var n=e.call(this,t)||this;return n.appendTo=t.appendTo,n.dataKey=t.dataKey,n.optionLabel=t.optionLabel,n.autoDisplayFirst=t.autoDisplayFirst,n.options=t.options,n.multiple=t.multiple,n.multipleSelectedLabel=t.multipleSelectedLabel||"{0} registros selecionados",n.onClick=t.onClick,n.onChange=t.onChange,n.emptyMessage=t.emptyMessage,n}return ie(t,e),t}(wt),ln=function(e){this.label=e.label,this.value=e.value},pn=function(e){function t(t){var n=e.call(this,t)||this;return n.cols=t.cols,n.rows=t.rows,n.keyFilter=t.keyFilter,n.style=t.style,n}return ie(t,e),t}(wt),cn=function(e){function t(t){var n=e.call(this,t)||this;return n.mask=t.mask,n.inputType=t.inputType,n.keyFilter=t.keyFilter,n.leftAddon=t.leftAddon,n.rightAddon=t.rightAddon,n.maxLength=t.maxLength||9999999,n.browserAutocomplete=t.browserAutocomplete,n.style=t.style,n.onBlur=t.onBlur,n.onFocus=t.onFocus,n.onComplete=t.onComplete,n.onInput=t.onInput,n}return ie(t,e),t}(wt),dn=function(e){function t(t){var n=e.call(this,t)||this;return n.inputType=t.inputType,n.keyFilter=t.keyFilter,n.leftAddon=t.leftAddon,n.rightAddon=t.rightAddon,n.maxLength=t.maxLength||9999999,n.passwordStrength=t.passwordStrength,n.passwordStrengthOptions=t.passwordStrengthOptions,n.style=t.style,n.onBlur=t.onBlur,n.onFocus=t.onFocus,n.onComplete=t.onComplete,n.onInput=t.onInput,n}return ie(t,e),t}(wt),un=function(t){switch(t.type){case e.FieldType.Enum:return new sn(t);case e.FieldType.Autocomplete:return new Ct(t);case e.FieldType.Money:return new nn(t);case e.FieldType.Integer:return new en(t);case e.FieldType.Double:return new tn(t);case e.FieldType.Number:return new $t(t);case e.FieldType.String:case e.FieldType.Binary:return new cn(t);case e.FieldType.Password:return new dn(t);case e.FieldType.Text:return new pn(t);case e.FieldType.Boolean:return"switch"===t.representedBy?new Kt(t):new Wt(t);case e.FieldType.Date:case e.FieldType.DateTime:case e.FieldType.LocalDateTime:case e.FieldType.Time:return new Yt(t);case e.FieldType.Lookup:return new on(t);case e.FieldType.Radio:return new rn(t);case e.FieldType.Chips:return new Xt(t);case e.FieldType.Blob:return new Gt(t);case e.FieldType.Custom:return new(0,t.CustomFieldClass)(function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(t,["CustomFieldClass"]))}},mn=function(e,t){this.label=e,this.value=t},fn=function(){function n(e){this.hotkeysService=e,this.id="s-lookup-"+o.nextId++,this.autocompleteForceSelection=!0,this.disabled=!1,this.showSearch=!0,this.lookupAppendTo="body",this.searchTitle="Pesquisa avançada",this.searchEmptyTitle="Nenhum registro encontrado",this.searchFields=[],this.filterTitle="Filtros",this.filterLabel="Filtrar",this.clearLabel="Limpar",this.cancelLabel="Cancelar",this.selectLabel="Selecionar",this.emptyFieldLabel="Não informado",this.recordLabel=" registro",this.recordsLabel=" registros",this.onLookupRequest=new t.EventEmitter,this.onSearchRequest=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.onKeyUp=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onUnselect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.dialogVisible=!1,this.collapsed=!1,this.selected=[],this.transitionOptions="400ms cubic-bezier(0.86, 0, 0.07, 1)",this.ngUnsubscribe=new r.Subject,this.originalFormValues={}}var o;return o=n,n.prototype.ngOnInit=function(){var t=this;this.searchGridFields||(this.searchGridFields=this.searchFields.map((function(e){return new un(re({},e))}))),this.searchFields=this.searchFields.map((function(e){return new un(re(re({},e),{size:{sm:12,md:12,lg:12,xl:12}}))})),this.searchGridFields=this.searchGridFields.map((function(n){n.width=t.getColWidth(n.label);var o=new It(re({},n.calendarLocaleOptions));if(null==o?void 0:o.dateFormat){switch(n.type){case e.FieldType.Date:o.dateFormat=t._convertToMomentDateFormat(o.dateFormat);break;case e.FieldType.Time:o.dateFormat=t._convertToMomentHourFormat(o.hourFormat,o.dateFormat)}n.calendarLocaleOptions=o}return n}));var n=this.searchFields.reduce((function(e,n){return e[n.name]=new I.FormControl(n.defaultValue),t.originalFormValues[n.name]=n.defaultValue,e}),{});this.formGroupDialog=new I.FormGroup(n),this.onSearchRequest.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){return t.loading=!0})),this.onSelect.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){return t.onChange(t.value)})),this.onUnselect.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){return t.onChange(t.value)})),this.onClear.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){!t.multiple&&t.value&&t.onChange(null)})),this.onFocus.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){t.onTouched()})),this.onBlur.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(e){var n=t.value&&t.value[t.lookupDisplayField],o=e.target.value;if(!t.multiple&&n&&n!=o){e.target.value="",t.onChange("")}}))},n.prototype._convertToMomentHourFormat=function(e,t){return"dd/mm/yy"===t?"LTS":"12"===e?t.replace(/\bH\b/,"h").replace(/\bHH\b/,"hh"):"24"===e?t.replace(/\bh\b/,"H").replace(/\bhh\b/,"HH"):t},n.prototype._convertToMomentDateFormat=function(e){return e.replace(/\bd\b/,"D").replace(/\bdd\b/,"DD").replace(/\bo\b/,"DDD").replace(/\boo\b/,"DDDD").replace(/\bM\b/,"MMM").replace(/\bMM\b/,"MMMM").replace(/\bm\b/,"M").replace(/\bmm\b/,"MM").replace(/\by\b/,"YY").replace(/\byy\b/,"YYYY")},n.prototype.ngAfterViewInit=function(){this.autocomplete.onOverlayAnimationDone=function(e){}},n.prototype.ngOnChanges=function(e){this.dialogVisible&&e.searchGridData&&(this.loading=!1),this._setFocusFilter()},n.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},n.prototype.getGridData=function(){return this.searchGridData},n.prototype.getLookupSuggestions=function(){return this.lookupSuggestions},n.prototype.makeSearchRequestParams=function(e){var t=this.formGroupDialog.getRawValue(),n=re(re({},e),{filterData:t}),o=e.multiSortMeta;return this.multiSortMeta=o||this.multiSortMeta,n},n.prototype.lazyLoadGrid=function(e){var t=this.makeSearchRequestParams(e);this.onSearchRequest.next(t)},n.prototype.lazyLoadLookup=function(e){this.onLookupRequest.next(e.query)},n.prototype.showDialog=function(){this.searchGridData=void 0,this.onTouched(),this.hotkeysService.pause(ue(this.hotkeysService.hotkeys)),this.setHotkeys();var e=[];this.multiple&&this.value?e=e.concat(this.value):this.value&&(e=[this.value]),this.selected=e,this.loading=!0,this.dialogVisible=!0},n.prototype.hideDialog=function(){var e=this.autocomplete,t=e.inputEL,n=e.multiInputEL;this.dialogVisible=!1,this.collapsed=!1,this.hotkeysService.unpause(ue(this.hotkeysService.pausedHotkeys)),this.multiple?n.nativeElement.focus():t.nativeElement.focus()},n.prototype.search=function(){this.resetTable(),this.collapsed=!0,this.dialog.moveOnTop()},n.prototype.clear=function(){this.formGroupDialog.reset(this.originalFormValues),this.resetTable()},n.prototype.resetTable=function(){this.table.reset()},n.prototype.select=function(){if(this.selected.length){var e=this.selected&&(this.multiple?this.selected:this.selected[0]);this.value=e,this.onSelect.next(e),this.hideDialog()}},n.prototype.onSelectionChange=function(e){e&&(Array.isArray(e)?this.selected=e:this.selected=[e])},n.prototype.registerOnChange=function(e){var t=this;this.onChange=function(n){t.writeValue(n),e(n)}},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.writeValue=function(e){this.value=e},n.prototype.setDisabledState=function(e){this.disabled=e},n.prototype.getFieldValue=function(e,t){return t.split(".").reduce((function(e,t){return void 0===e[t]?"":e[t]}),e)},n.prototype.getLabelForValue=function(e,t){if(!t)return e;var n=t.find((function(t){return t.value===e}));return n?n.label:e},n.prototype.isBooleanValue=function(e,t){var n=this.getFieldValue(e,t);return!0===n||!1===n},n.prototype.getBooleanLabel=function(e,t,n){var o=this.getFieldValue(e,t);return!0===o?n.true:!1===o?n.false:this.emptyFieldLabel},n.prototype.isNumber=function(e,t){return!new ne(this.getFieldValue(e,t)).isNaN()},n.prototype.setHotkeys=function(){var e=this;[this.newHotkey("alt+shift+l",this.clear.bind(this)),this.newHotkey("alt+shift+f",this.search.bind(this)),this.newHotkey("alt+shift+c",this.hideDialog.bind(this)),this.newHotkey("alt+shift+s",this.select.bind(this))].forEach((function(t){return e.hotkeysService.add(t)}))},n.prototype.newHotkey=function(e,t){return new k.Hotkey(e,(function(){return t(),!1}),["INPUT","SELECT","TEXTAREA"])},n.prototype.filterToggle=function(){this.animating||(this.animating=!0,this.collapsed=!this.collapsed)},n.prototype.onToggleDone=function(){this.animating=!1},n.prototype.getColWidth=function(e){var t=e.length;return t<14.286?"14.286em":t+"em"},n.prototype.getScale=function(e){return this.isFunction(e)?e():e},n.prototype.isFunction=function(e){return e instanceof Function},n.prototype.getIntegerMaskConfig=function(e){var t;return{scale:0,thousandsSeparator:null===(t=e.numberLocaleOptions)||void 0===t?void 0:t.thousandsSeparator,prefix:""}},n.prototype.getDoubleMaskConfig=function(e){var t,n;return{scale:this.getScale(e.scale),decimalSeparator:null===(t=e.numberLocaleOptions)||void 0===t?void 0:t.decimalSeparator,thousandsSeparator:null===(n=e.numberLocaleOptions)||void 0===n?void 0:n.thousandsSeparator,prefix:""}},n.prototype.getMoneyMaskConfig=function(e){var t,n,o;return{scale:this.getScale(e.scale),decimalSeparator:null===(t=e.numberLocaleOptions)||void 0===t?void 0:t.decimalSeparator,thousandsSeparator:null===(n=e.numberLocaleOptions)||void 0===n?void 0:n.thousandsSeparator,prefix:null===(o=e.numberLocaleOptions)||void 0===o?void 0:o.currencySymbol}},n.prototype.getNumberMaskConfig=function(e){var t,n,o;return{scale:this.getScale(e.scale),decimalSeparator:null===(t=e.numberLocaleOptions)||void 0===t?void 0:t.decimalSeparator,thousandsSeparator:null===(n=e.numberLocaleOptions)||void 0===n?void 0:n.thousandsSeparator,prefix:null===(o=e.numberLocaleOptions)||void 0===o?void 0:o.currencySymbol}},n.prototype.onTableRowDoubleClick=function(e){this.selected=[e],this.select()},n.prototype._setFocusFilter=function(){var e,t,n;if(this.dialogVisible&&!this.collapsed){var o=null===(n=null===(t=null===(e=this.dialog)||void 0===e?void 0:e.contentViewChild)||void 0===t?void 0:t.nativeElement)||void 0===n?void 0:n.getElementsByTagName("input")[0];o&&o.focus()}},n.nextId=0,n.ctorParameters=function(){return[{type:k.HotkeysService}]},ae([t.Input()],n.prototype,"formControlName",void 0),ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"autocompleteForceSelection",void 0),ae([t.Input()],n.prototype,"multiple",void 0),ae([t.Input()],n.prototype,"dataKey",void 0),ae([t.Input()],n.prototype,"required",void 0),ae([t.Input()],n.prototype,"disabled",void 0),ae([t.Input()],n.prototype,"showSearch",void 0),ae([t.Input()],n.prototype,"lookupSuggestions",void 0),ae([t.Input()],n.prototype,"lookupDisplayField",void 0),ae([t.Input()],n.prototype,"lookupDisplayFieldTooltip",void 0),ae([t.Input()],n.prototype,"lookupEmptyMessage",void 0),ae([t.Input()],n.prototype,"lookupAppendTo",void 0),ae([t.Input()],n.prototype,"searchTitle",void 0),ae([t.Input()],n.prototype,"searchEmptyTitle",void 0),ae([t.Input()],n.prototype,"searchEmptyDescription",void 0),ae([t.Input()],n.prototype,"searchGridData",void 0),ae([t.Input()],n.prototype,"searchTotalRecords",void 0),ae([t.Input()],n.prototype,"searchFields",void 0),ae([t.Input()],n.prototype,"searchGridFields",void 0),ae([t.Input()],n.prototype,"multiSortMeta",void 0),ae([t.Input()],n.prototype,"filterTitle",void 0),ae([t.Input()],n.prototype,"filterLabel",void 0),ae([t.Input()],n.prototype,"clearLabel",void 0),ae([t.Input()],n.prototype,"cancelLabel",void 0),ae([t.Input()],n.prototype,"selectLabel",void 0),ae([t.Input()],n.prototype,"emptyFieldLabel",void 0),ae([t.Input()],n.prototype,"recordLabel",void 0),ae([t.Input()],n.prototype,"recordsLabel",void 0),ae([t.Input()],n.prototype,"placeholder",void 0),ae([t.Input()],n.prototype,"searchTotalRecordsLabel",void 0),ae([t.Input()],n.prototype,"sortableColumnsDisabled",void 0),ae([t.Input()],n.prototype,"lookupRowProps",void 0),ae([t.Output()],n.prototype,"onLookupRequest",void 0),ae([t.Output()],n.prototype,"onSearchRequest",void 0),ae([t.Output()],n.prototype,"onFocus",void 0),ae([t.Output()],n.prototype,"onBlur",void 0),ae([t.Output()],n.prototype,"onKeyUp",void 0),ae([t.Output()],n.prototype,"onSelect",void 0),ae([t.Output()],n.prototype,"onUnselect",void 0),ae([t.Output()],n.prototype,"onClear",void 0),ae([t.ViewChild(F.Table,{static:!1})],n.prototype,"table",void 0),ae([t.ViewChild(E.Dialog,{static:!1})],n.prototype,"dialog",void 0),ae([t.ViewChild(S.AutoComplete,{static:!1})],n.prototype,"autocomplete",void 0),n=o=ae([t.Component({selector:"s-lookup",template:'<div [ngClass]="{ inputgroup: showSearch }">\n <p-autoComplete\n #autocomplete\n [(ngModel)]="value"\n [disabled]="disabled"\n [dataKey]="dataKey"\n [multiple]="multiple"\n [inputId]="id + \'-autocomplete\'"\n [forceSelection]="autocompleteForceSelection"\n [suggestions]="getLookupSuggestions()"\n (completeMethod)="lazyLoadLookup($event)"\n (onSelect)="onSelect.next($event)"\n (onBlur)="onBlur.next($event)"\n (onFocus)="onFocus.next($event)"\n (onUnselect)="onUnselect.next($event)"\n (onClear)="onClear.next($event)"\n (onKeyUp)="onKeyUp.next($event)"\n [field]="lookupDisplayField"\n [emptyMessage]="lookupEmptyMessage"\n [dropdown]="!showSearch"\n [appendTo]="lookupAppendTo"\n [placeholder]="placeholder || \' \'"\n [autoHighlight]="true"\n inputStyleClass="mousetrap">\n <ng-template let-item pTemplate="selectedItem">\n <span\n class="ui-autocomplete-token-label ng-tns-c65-43 ng-star-inserted"\n [sTooltip]="lookupDisplayFieldTooltip ? item[lookupDisplayField] : null"\n tooltipPosition="top">\n {{item[lookupDisplayField]}}\n </span>\n </ng-template>\n </p-autoComplete>\n <button\n *ngIf="showSearch"\n pButton\n type="button"\n icon="fa fa-search"\n class="button-addon"\n [disabled]="disabled"\n (click)="showDialog()">\n </button>\n</div>\n<p-dialog\n appendTo="body"\n styleClass="s-lookup-modal"\n [header]="searchTitle"\n [(visible)]="dialogVisible"\n [modal]="true"\n (onHide)="hideDialog()"\n [blockScroll]="true"\n [focusOnShow]="true"\n [draggable]="false"\n [resizable]="false"\n #dialog>\n <div\n *ngIf="dialogVisible"\n class="s-lookup-modal-container">\n <div\n *ngIf="searchFields && searchFields.length"\n class="filter"\n [@collapseContent]="collapsed \n ? { value: \'hidden\', params: { transitionParams: transitionOptions } }\n : { value: \'visible\', params: { transitionParams: transitionOptions } }"\n (@collapseContent.done)="onToggleDone()">\n <form\n [formGroup]="formGroupDialog"\n novalidate\n autocomplete="off">\n <div\n *ngIf="!collapsed"\n class="form-content"\n [@childCollapseContent]="collapsed\n ? { value: \':leave\', params: { transitionParams: transitionOptions } }\n : { value: \':enter\', params: { transitionParams: transitionOptions } }">\n <div class="filter-title sds-section-title">{{ filterTitle }}</div>\n <div class="form-fields">\n <s-dynamic-form\n [fields]="searchFields"\n [form]="formGroupDialog">\n </s-dynamic-form>\n </div>\n <div class="ui-g">\n <div class="ui-g-12">\n <s-button\n [id]="id + \'-filter-button\'"\n type="submit"\n [label]="filterLabel"\n (onClick)="search()"\n sTooltip="(ALT + SHIFT + F)"\n tooltipPosition="top"\n showDelay="500">\n </s-button>\n <s-button\n [id]="id + \'-clear-button\'"\n type="button"\n [label]="clearLabel"\n (onClick)="clear()"\n priority="link"\n sTooltip="(ALT + SHIFT + L)"\n tooltipPosition="top"\n showDelay="500">\n </s-button>\n </div>\n </div>\n </div>\n </form>\n </div>\n <div\n *ngIf="searchFields && searchFields.length"\n class="filter-toggle">\n <div class="filter-toggle--start-border-mask"></div>\n <button\n [id]="id + \'-filter-toggle-button\'"\n type="button"\n (click)="filterToggle()">\n <span\n class="fa"\n [ngClass]="{\'fa-chevron-left\': !collapsed, \'fa-chevron-right\': collapsed}"\n aria-hidden="true">\n </span>\n </button>\n <div class="filter-toggle--end-border-mask"></div>\n </div>\n <div\n class="content"\n [ngClass]="{\'empty-content\': !searchTotalRecords && !loading}">\n <s-empty-state\n [id]="id + \'-empty-state\'"\n *ngIf="!searchTotalRecords && !loading"\n [title]="searchEmptyTitle"\n [description]="searchEmptyDescription"\n iconClass="fa fa-search">\n </s-empty-state>\n <p-table\n [dataKey]="dataKey"\n [value]="getGridData()"\n [columns]="searchGridFields"\n [lazy]="true"\n [scrollable]="true"\n [paginator]="true"\n sortMode="multiple"\n [totalRecords]="searchTotalRecords"\n [rows]="10"\n [selection]="selected"\n (onLazyLoad)="lazyLoadGrid($event)"\n *sLoadingState="loading"\n [multiSortMeta]="multiSortMeta"\n [attr.data-hidden]="!searchTotalRecords && !loading"\n [selectionMode]="multiple ? \'multiple\' : \'single\'"\n (selectionChange)="onSelectionChange($event)">\n <ng-template pTemplate="colgroup" let-columns>\n <colgroup>\n <col\n *ngIf="multiple"\n style="width: 50px" />\n <col\n *ngFor="let col of columns"\n [style.width]="col.width" />\n </colgroup>\n </ng-template>\n <ng-template pTemplate="header" let-columns>\n <tr>\n <th\n *ngIf="multiple"\n style="width: 50px">\n <s-table-header-checkbox\n [useAllObject]="lookupRowProps ? false : true"\n [rowProps]="lookupRowProps">\n </s-table-header-checkbox>\n </th>\n <th\n [style.width]="col.width"\n *ngFor="let col of columns"\n [pSortableColumn]="col.name"\n [pSortableColumnDisabled]="sortableColumnsDisabled?.includes(col.name)">\n <div class="senior-header">\n <span class="senior-header-title">{{ col.label }}</span>\n <p-sortIcon\n [field]="col.name"\n *ngIf="!sortableColumnsDisabled?.includes(col.name)">\n </p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template\n pTemplate="body"\n let-rowData\n let-columns\n let-rowIndex="rowIndex">\n <tr\n sNavigation\n [pSelectableRow]="rowData"\n [pSelectableRowIndex]="rowIndex"\n sDoubleClick (onDoubleClick)="onTableRowDoubleClick(rowData)">\n <td\n *ngIf="multiple"\n style="width: 50px"\n tabindex="0">\n <p-tableCheckbox\n [value]="rowData"\n [pSelectableRow]="rowData">\n </p-tableCheckbox>\n </td>\n <td\n [style.width]="col[\'width\']"\n *ngFor="let col of searchGridFields"\n [ngSwitch]="col.type"\n tabindex="0">\n <ng-container *ngSwitchCase="\'Boolean\'">\n <ng-container *ngIf="isBooleanValue(rowData, col.name); else emptyTemplate">\n <span>{{ getBooleanLabel(rowData, col.name, col.optionsLabel) }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Date\'">\n <ng-container *ngIf="getFieldValue(rowData, col.name); else emptyTemplate">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate: col.calendarLocaleOptions?.dateFormat || "L" | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'DateTime\'">\n <ng-container *ngIf="getFieldValue(rowData, col.name); else emptyTemplate">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'LocalDateTime\'">\n <ng-container *ngIf="getFieldValue(rowData, col.name); else emptyTemplate">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Time\'">\n <ng-container *ngIf="getFieldValue(rowData, col.name); else emptyTemplate">\n <span>{{ getFieldValue(rowData, col.name) | localizedTime: col.calendarLocaleOptions?.dateFormat || "LTS" | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Integer\'">\n <ng-container *ngIf="isNumber(rowData, col.name); else emptyTemplate">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getIntegerMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Double\'">\n <ng-container *ngIf="isNumber(rowData, col.name); else emptyTemplate">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getDoubleMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Money\'">\n <ng-container *ngIf="isNumber(rowData, col.name); else emptyTemplate">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getMoneyMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Number\'">\n <ng-container *ngIf="isNumber(rowData, col.name); else emptyTemplate">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getNumberMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Enum\'">\n <ng-container\n *ngIf="getLabelForValue(getFieldValue(rowData, col.name), col.options); else emptyTemplate"\n >\n <span> {{ getLabelForValue(getFieldValue(rowData, col.name), col.options) }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf="col.mask && col.mask()">\n <ng-container *ngIf="(isNumber(rowData, col.name) || getFieldValue(rowData, col.name))">\n <span>{{ getFieldValue(rowData, col.name) | sMaskFormatter: col.mask() }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf="!(col.mask && col.mask())">\n <ng-container *ngIf="(isNumber(rowData, col.name) || getFieldValue(rowData, col.name)); else emptyTemplate">\n <span>{{ getFieldValue(rowData, col.name) }}</span>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="paginatorright">\n <span [attr.data-hidden]="loading">\n {{\n searchTotalRecordsLabel ||\n searchTotalRecords?.toString() + (searchTotalRecords === 1 ? recordLabel : recordsLabel)\n }}\n </span>\n </ng-template>\n </p-table>\n </div>\n </div>\n <p-footer>\n <s-button\n [id]="id + \'-select-button\'"\n type="button"\n [label]="selectLabel"\n (onClick)="select()"\n sTooltip="(ALT + SHIFT + S)"\n tooltipPosition="top"\n showDelay="500"\n [disabled]="!selected?.length">\n </s-button>\n <s-button\n [id]="id + \'-cancel-button\'"\n type="button"\n priority="link"\n [label]="cancelLabel"\n (onClick)="hideDialog()"\n sTooltip="(ALT + SHIFT + C)"\n tooltipPosition="top"\n showDelay="500">\n </s-button>\n </p-footer>\n</p-dialog>\n<ng-template #emptyTemplate>\n <span [ngClass]="\'sds-empty-value\'">{{ emptyFieldLabel }}</span>\n</ng-template>\n',providers:[{provide:I.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return o})),multi:!0}],encapsulation:t.ViewEncapsulation.None,animations:[C.trigger("collapseContent",[C.state("hidden",C.style({width:"10px",padding:0})),C.state("visible",C.style({width:"*"})),C.transition("visible <=> hidden",[C.group([C.query("@childCollapseContent",C.animateChild()),C.animate("{{transitionParams}}")])])]),C.trigger("childCollapseContent",[C.state(":leave",C.style({opacity:0})),C.state(":enter",C.style({opacity:1})),C.transition("* <=> *",C.animate("{{transitionParams}}"))])],styles:["s-lookup.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-lookup .ui-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}s-lookup .inputgroup p-autocomplete+button,s-lookup p-autocomplete .ui-autocomplete-dropdown.ui-button{background-color:#fff;border-color:#ccc;border-width:1px 1px 1px 0;color:#333;min-height:34px;height:auto!important;min-width:auto;width:34px!important;overflow:hidden;border-top-left-radius:0;border-bottom-left-radius:0}.ui-fluid s-lookup .inputgroup,s-lookup p-autocomplete span.ui-autocomplete-multiple{display:-ms-flexbox;display:flex}.ui-fluid s-lookup .inputgroup p-autocomplete{display:inline-block}.ui-fluid s-lookup .inputgroup p-autocomplete,.ui-fluid s-lookup p-autocomplete .ui-autocomplete-input{width:calc(100% - 34px)}.ui-fluid s-lookup .inputgroup p-autocomplete .ui-autocomplete-input{width:100%}s-lookup .inputgroup p-autocomplete+button:enabled:hover,s-lookup .inputgroup p-autocomplete+button:focus{background-color:#e6e6e6;border-color:#ccc}s-lookup .inputgroup p-autocomplete .ui-widget .ui-inputtext{border-right-width:1px;border-right-style:solid}s-lookup .ui-autocomplete-input-token,s-lookup .ui-autocomplete-input-token input{width:100%}s-lookup .ui-autocomplete .ui-autocomplete-token{max-width:100%}s-lookup .ui-autocomplete .ui-autocomplete-token-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body .s-lookup-modal.ui-dialog .ui-dialog-content{padding:0;margin-bottom:0;max-height:none}s-lookup .ui-table-scrollable-body{min-width:100%}.s-lookup-modal{height:80%!important;max-width:100%!important;max-height:inherit!important;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column}.s-lookup-modal .ui-dialog-content{height:auto!important;-ms-flex:1;flex:1;overflow:auto}.s-lookup-modal .ui-dialog-footer,.s-lookup-modal .ui-dialog-header{-ms-flex-negative:0;flex-shrink:0;border-radius:0 0 4px 4px}.s-lookup-modal .s-lookup-modal-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%}.s-lookup-modal .s-lookup-modal-container .filter{position:relative;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;width:85%;background-color:rgba(229,234,234,.5);height:100%;padding:.571rem}.s-lookup-modal .s-lookup-modal-container .filter form{width:100%;height:100%}.s-lookup-modal .s-lookup-modal-container .filter form .form-content{height:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.s-lookup-modal .s-lookup-modal-container .filter form .form-content .filter-title{padding-left:.5rem}.s-lookup-modal .s-lookup-modal-container .filter form .form-content .form-fields{overflow-y:auto}.s-lookup-modal .s-lookup-modal-container .filter-toggle{-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;width:34px;border-radius:0 4px 4px 0}.s-lookup-modal .s-lookup-modal-container .filter-toggle button{-ms-flex-align:center;align-items:center;position:relative;background-color:rgba(229,234,234,.5);height:34px;width:100%;border:1px solid #e5eaea;outline:0;border-left:none;border-radius:0 4px 4px 0;cursor:pointer;text-decoration:none;text-transform:none;padding:7px;transition:background-color .2s ease-out,color .2s ease-out,border-color .2s ease-out}.s-lookup-modal .s-lookup-modal-container .filter-toggle button:focus,.s-lookup-modal .s-lookup-modal-container .filter-toggle button:hover{background-color:rgba(201,211,211,.5);border-color:#c9d3d3}.s-lookup-modal .s-lookup-modal-container .filter-toggle--start-border-mask{height:15px;border-left:1px solid #e5eaea}.s-lookup-modal .s-lookup-modal-container .filter-toggle--end-border-mask{height:calc(100% - 49px);border-left:1px solid #e5eaea}.s-lookup-modal .s-lookup-modal-container .content{-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:auto;flex-basis:auto;overflow-x:auto;padding:.5rem}.s-lookup-modal .s-lookup-modal-container .content.empty-content{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.s-lookup-modal .s-lookup-modal-container .content .s-loading-state-container,.s-lookup-modal .s-lookup-modal-container .content .s-loading-state-container .contents{height:100%}.s-lookup-modal .s-lookup-modal-container .content p-table{position:relative;height:100%}.s-lookup-modal .s-lookup-modal-container .content p-table .ui-table{height:100%}.s-lookup-modal .s-lookup-modal-container .content p-table .ui-table .ui-table-scrollable-wrapper{height:calc(100% - 60px)}.s-lookup-modal .s-lookup-modal-container .content p-table .ui-table .ui-table-scrollable-wrapper .ui-table-scrollable-view{height:100%}.s-lookup-modal .s-lookup-modal-container .content p-table .ui-table .ui-table-scrollable-wrapper .ui-table-scrollable-view .ui-table-scrollable-body{position:relative;height:calc(100% - 60px)}@media (max-width:767px){.s-lookup-modal{border:none!important;top:0!important;left:0!important;width:100%!important;height:100%!important}}@media (min-width:768px){.s-lookup-modal{width:80%!important}.s-lookup-modal .s-lookup-modal-container .filter{width:40%}}@media (min-width:1200px){.s-lookup-modal{width:60%!important}.s-lookup-modal .s-lookup-modal-container .filter{width:30%}}"]})],n)}(),hn=function(){function e(){}return e.prototype.isFunction=function(e){return e instanceof Function},e.prototype.trigger=function(e){return e()},e}();(Zt=e.DynamicType||(e.DynamicType={})).Autocomplete="Autocomplete",Zt.Binary="Binary",Zt.Boolean="Boolean",Zt.Chips="Chips",Zt.Date="Date",Zt.DateTime="DateTime",Zt.LocalDateTime="LocalDateTime",Zt.Double="Double",Zt.Enum="Enum",Zt.Fieldset="Fieldset",Zt.Integer="Integer",Zt.Lookup="Lookup",Zt.Money="Money",Zt.Radio="Radio",Zt.Row="Row",Zt.Section="Section",Zt.String="String",Zt.Text="Text",Zt.Time="Time",Zt.Number="Number",Zt.Password="Password";var gn,bn=function(e){function t(t){return e.call(this,t)||this}return ie(t,e),t}((function(e){Object.assign(this,re({},e))})),vn=function(e){Object.assign(this,re({},e))},yn=function(e){function t(t){var n=e.call(this,t)||this;return Object.assign(n,re({},t)),n}return ie(t,e),t}(vn),xn=function(e){function t(t){return e.call(this,t)||this}return ie(t,e),t}(vn),wn=function(t){var n=t.type,o=t.representedBy;switch(n){case e.DynamicType.Autocomplete:return new Ct(t);case e.DynamicType.Binary:case e.DynamicType.String:return new cn(t);case e.DynamicType.Password:return new dn(t);case e.DynamicType.Boolean:return"switch"===o?new Kt(t):new Wt(t);case e.DynamicType.Chips:return new Xt(t);case e.DynamicType.Date:case e.DynamicType.DateTime:case e.DynamicType.LocalDateTime:case e.DynamicType.Time:return new Yt(t);case e.DynamicType.Double:return new tn(t);case e.DynamicType.Enum:return new sn(t);case e.DynamicType.Fieldset:return new yn(t);case e.DynamicType.Integer:return new en(t);case e.DynamicType.Number:return new $t(t);case e.DynamicType.Lookup:return new on(t);case e.DynamicType.Money:return new nn(t);case e.DynamicType.Radio:return new rn(t);case e.DynamicType.Row:return new bn(t);case e.DynamicType.Section:return new xn(t);case e.DynamicType.Text:return new pn(t)}},Cn=function(){function e(){this.errorMessages={}}return ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"configs",void 0),ae([t.Input()],e.prototype,"fields",void 0),ae([t.Input()],e.prototype,"form",void 0),ae([t.Input()],e.prototype,"errorMessages",void 0),e=ae([t.Component({selector:"s-dynamic-form",template:'<div *ngIf="configs; else templateFields">\n <ng-container *ngFor="let config of configs">\n <ng-container *sDynamicForm="{ id: id, config: config, group: form, errorMessages: errorMessages }"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #templateFields>\n <s-dynamic-field [id]="id" [fields]="fields" [form]="form" [errorMessages]="errorMessages"></s-dynamic-field>\n</ng-template>\n',encapsulation:t.ViewEncapsulation.None,styles:['label.required:after{content:" *";color:#c13018}']})],e)}(),In=function(){function e(){this.id="s-empty-state-"+n.nextId++,this.iconClass="fa fa-inbox",this.showPrimaryAction=!0,this.showSecondaryAction=!0,this.primaryModel=[],this.primaryAction=new t.EventEmitter,this.secondaryAction=new t.EventEmitter}var n;return n=e,e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"iconClass",void 0),ae([t.Input()],e.prototype,"title",void 0),ae([t.Input()],e.prototype,"description",void 0),ae([t.Input()],e.prototype,"showPrimaryAction",void 0),ae([t.Input()],e.prototype,"showSecondaryAction",void 0),ae([t.Input()],e.prototype,"primaryActionLabel",void 0),ae([t.Input()],e.prototype,"secondaryActionLabel",void 0),ae([t.Input()],e.prototype,"primaryModel",void 0),ae([t.Output()],e.prototype,"primaryAction",void 0),ae([t.Output()],e.prototype,"secondaryAction",void 0),e=n=ae([t.Component({selector:"s-empty-state",template:'<div [id]="id" class="container">\n <div [id]="id + \'-icon\'" class="icon">\n <i [attr.class]="iconClass ? iconClass : \'fa fa-cogs\'" aria-hidden="true"></i>\n </div>\n <div [id]="id + \'-title\'" class="title">{{title}}</div>\n <div [id]="id + \'-description\'" class="description" *ngIf="description">\n <p>{{description}}</p>\n </div>\n <div [id]="id + \'-actions\'" class="actions" *ngIf="showPrimaryAction && primaryActionLabel">\n <s-button [id]="id + \'-primary-action\'" type="button" [label]="primaryActionLabel"\n [model]="primaryModel" (click)="primaryAction.next()"></s-button>\n <s-button [id]="id + \'-secondary-action\'" *ngIf="showSecondaryAction && secondaryActionLabel" id="secondaryAction" type="button"\n [label]="secondaryActionLabel" priority="link" (click)="secondaryAction.next()"></s-button>\n </div>\n</div>',styles:[".container{width:100%;text-align:center}.title{font-weight:700;margin-bottom:10px}.description{margin-bottom:15px;color:#999;padding:0 20px;text-align:center}.description>p{margin:auto;max-width:400px;max-height:80px;overflow:hidden}.icon{color:#d8d8d8;font-size:6em}.actions{text-align:center;width:100%}"]})],e)}(),_n=function(){function e(e){this.cookieService=e,this.iconClass="fa fa-exclamation-triangle"}return e.prototype.goBack=function(){var e=this.cookieService.get("com.senior.portal.url");window.open(e,"_top")},e.nextId=0,e.ctorParameters=function(){return[{type:O.CookieService}]},ae([t.Input()],e.prototype,"iconClass",void 0),ae([t.Input()],e.prototype,"title",void 0),ae([t.Input()],e.prototype,"description",void 0),ae([t.Input()],e.prototype,"primaryActionLabel",void 0),e=ae([t.Component({selector:"s-empty-state-go-back",template:'<s-empty-state \n [iconClass]="iconClass" \n [title]="title" \n [description]="description" \n (primaryAction)="goBack()"\n [primaryActionLabel]="primaryActionLabel">\n</s-empty-state>'})],e)}(),kn=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,ye],providers:[O.CookieService],declarations:[In,_n],exports:[In,_n]})],e)}();(gn=e.ValidateErrors||(e.ValidateErrors={})).MAX_FILE_SIZE="MAX_FILE_SIZE",gn.MAX_FILE_LIMIT="MAX_FILE_LIMIT",gn.UNSUPPORTED_EXTENSION="UNSUPPORTED_EXTENSION";var Tn,Sn={SM_MIN:0,SM_MAX:767,MD_MIN:768,MD_MAX:991,LG_MIN:992,LG_MAX:1199,XL_MIN:1200,XL_MAX:1/0},En=function(){function e(){throw new Error("Classe não deve ser instanciada.")}return e.addClass=function(e,t){e.nativeElement.className=e.nativeElement.className+" "+t},e.removeClass=function(e,t){e.nativeElement.className.includes(t)&&(e.nativeElement.className=e.nativeElement.className.replace(t,""))},e.exportCSV=function(e,t,n,o){var i=this;void 0===e&&(e=[]),void 0===t&&(t=[]),void 0===n&&(n=";"),void 0===o&&(o="download");var r="\ufeff";e.filter((function(e){return e.exportable&&e.field})).forEach((function(t,o){r+='"'+(t.header||t.field)+'"',o<e.length-1&&(r+=n)})),t.forEach((function(t){r+="\n",e.filter((function(e){return e.exportable&&e.field})).forEach((function(o,a){var s;Array.isArray(o.field)?s=o.field.map((function(e){return i.resolveFieldData(t,e)})).flat().filter((function(e){return null!=e})).join(o.separator):s=i.resolveFieldData(t,o.field);s=null!=s?String(s).replace(/"/g,'""'):"",r+='"'+s+'"',a<e.length-1&&(r+=n)}))}));var a=new Blob([r],{type:"text/csv;charset=utf-8;"});if(window.navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(a,o+".csv");else{var s=document.createElement("a");s.style.display="none",document.body.appendChild(s),void 0!==s.download?(s.setAttribute("href",URL.createObjectURL(a)),s.setAttribute("download",o+".csv"),s.click()):(r="data:text/csv;charset=utf-8,"+r,window.open(encodeURI(r))),document.body.removeChild(s)}},e.resolveFieldData=function(e,t){if(e&&t){if(this.isFunction(t))return t(e);if(-1==t.indexOf("."))return e[t];for(var n=t.split("."),o=e,i=0,r=n.length;i<r;++i){if(null==o)return null;o=o[n[i]]}return o}return null},e.isFunction=function(e){return!!(e&&e.constructor&&e.call&&e.apply)},e}(),Fn=function(){function n(e){this.sanitizer=e,this.id="s-file-upload-"+o.nextId++,this.chooseLabel="Anexar arquivos",this.removeLabel="Remover",this.cancelLabel="Cancelar",this.successTooltip="Arquivo anexado com sucesso",this.supportedExtensions=[],this.ariaLabelProgress="Carregando arquivo",this.disabled=!1,this.uploadHandler=new t.EventEmitter,this.removeFile=new t.EventEmitter,this.cancelUpload=new t.EventEmitter,this.downloadFile=new t.EventEmitter,this.validateErrors=new t.EventEmitter,this._files=[],this.ngUsubscribe=new r.Subject,this.inputValue=""}var o;return o=n,Object.defineProperty(n.prototype,"files",{get:function(){return this._files},set:function(e){var t=this;this._files=e.map((function(e){return t.isImage(e)&&(e.objectURL=t.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(e))),e}))},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){this.supportedExtensions=this.supportedExtensions.map((function(e){return e.replace(".","").toLowerCase()}))},n.prototype.ngOnDestroy=function(){this.ngUsubscribe.next(),this.ngUsubscribe.complete()},n.prototype.ngAfterContentInit=function(){this.update()},n.prototype.onResize=function(){this.update()},n.prototype.onFileSelect=function(t){var n,o,i=[];if(this.multiple||(this.files=[]),this.isFileLimitExceeded(t))return this.validateErrors.emit({files:t,validation:e.ValidateErrors.MAX_FILE_LIMIT}),void this.clearFileInput();try{for(var r=ce(t),a=r.next();!a.done;a=r.next()){var s=a.value;this.isUnsupportedFileExtension(s)?this.validateErrors.emit({files:[s],validation:e.ValidateErrors.UNSUPPORTED_EXTENSION}):this.isFileSizeExceeded(s)?this.validateErrors.emit({files:[s],validation:e.ValidateErrors.MAX_FILE_SIZE}):i.push(s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}i.length&&(this.files=this.files.concat(i),this.uploadHandler.emit({files:i})),this.clearFileInput()},n.prototype.onRemoveFile=function(e){var t=this.files.indexOf(e);this.files.splice(t,1).length&&this.removeFile.emit({file:e})},n.prototype.onCancelUpload=function(e){this.files.splice(e,1).length&&this.cancelUpload.emit(e),this.clearFileInput()},n.prototype.onDowloadFile=function(e){this.downloadFile.emit({index:e,anchor:this.anchor})},n.prototype.update=function(){var e=window.innerWidth;this.isSmallDevice=e<=Sn.SM_MAX},n.prototype.isImage=function(e){return/^image\//.test(e.type)},n.prototype.isFileLimitExceeded=function(e){return!!this.fileLimit&&this.files.length+e.length>this.fileLimit},n.prototype.isFileSizeExceeded=function(e){return!!this.maxFileSize&&e.size>this.maxFileSize},n.prototype.isUnsupportedFileExtension=function(e){var t;if(null===(t=this.supportedExtensions)||void 0===t?void 0:t.length){var n=e.name.split(".").pop().toLowerCase();return!this.supportedExtensions.includes(n)}return!1},n.prototype.clearFileInput=function(){this.inputUpload.nativeElement.value=null},n.nextId=0,n.ctorParameters=function(){return[{type:K.DomSanitizer}]},ae([t.ViewChild("inputUpload",{static:!1})],n.prototype,"inputUpload",void 0),ae([t.ViewChild("anchor",{static:!1})],n.prototype,"anchor",void 0),ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"chooseLabel",void 0),ae([t.Input()],n.prototype,"removeLabel",void 0),ae([t.Input()],n.prototype,"cancelLabel",void 0),ae([t.Input()],n.prototype,"successTooltip",void 0),ae([t.Input()],n.prototype,"multiple",void 0),ae([t.Input()],n.prototype,"accept",void 0),ae([t.Input()],n.prototype,"supportedExtensions",void 0),ae([t.Input()],n.prototype,"ariaLabelFileName",void 0),ae([t.Input()],n.prototype,"maxFileSize",void 0),ae([t.Input()],n.prototype,"fileLimit",void 0),ae([t.Input()],n.prototype,"ariaLabelProgress",void 0),ae([t.Input()],n.prototype,"ariaLabelSuccess",void 0),ae([t.Input()],n.prototype,"ariaLabelError",void 0),ae([t.Input()],n.prototype,"ariaLabelRemove",void 0),ae([t.Input()],n.prototype,"formGroup",void 0),ae([t.Input()],n.prototype,"disabled",void 0),ae([t.Input()],n.prototype,"files",null),ae([t.Output()],n.prototype,"uploadHandler",void 0),ae([t.Output()],n.prototype,"removeFile",void 0),ae([t.Output()],n.prototype,"cancelUpload",void 0),ae([t.Output()],n.prototype,"downloadFile",void 0),ae([t.Output()],n.prototype,"validateErrors",void 0),ae([t.HostListener("window:resize")],n.prototype,"onResize",null),n=o=ae([t.Component({selector:"s-file-upload",template:'<div\n [id]="id"\n class="s-fileupload">\n <div class="s-fileupload-choose">\n <input\n #inputUpload\n [id]="id+\'input-upload\'"\n type="file"\n name="file"\n [accept]="accept"\n [multiple]="multiple"\n (change)="onFileSelect($event.dataTransfer\n ? $event.dataTransfer.files\n : $event.target.files)"> \n <s-button\n [id]="id + \'upload-button\'"\n [label]="chooseLabel"\n (onClick)="inputUpload.click()"\n priority="primary"\n [disabled]="disabled || !!formGroup?.disabled"\n [auxiliary]="false">\n </s-button>\n </div>\n\n <section\n *ngIf="files.length" \n [id]="id + \'fileupload-list\'"\n class="s-fileupload-list"\n role="grid">\n <ng-container *ngFor="let file of files; let i = index">\n <div\n class="s-fileupload-list-file"\n role="row">\n <div\n [id]="id + \'-file-\' + i + \'-name\'"\n class="s-fileupload-list-file-name"\n role="gridcell">\n <ng-container *ngTemplateOutlet="file.savedFile || file.progress === 100\n ? descriptionUrl\n : description; context: {\n $implicit: file,\n index: i\n }">\n </ng-container>\n </div>\n <div\n class="s-fileupload-list-file-status"\n role="gridcell">\n <p-progressBar\n *ngIf="file.isUploading && !isSmallDevice"\n [style]="{ \'width\': \'250px\', \'background-color\': \'#d8d8d8\', \'border-radius\': \'0px\', \'height\': \'14px\'}"\n [value]="file.progress"\n [showValue]="false"\n role="alert"\n [attr.aria-label]="ariaLabelProgress">\n </p-progressBar>\n <span\n *ngIf="file.isUploading && isSmallDevice" \n [id]="id + \'-file-\' + i + \'-spin\'"\n class="fas fa-circle-notch fa-spin"\n [attr.aria-label]="ariaLabelProgress">\n </span>\n <span\n *ngIf="!file.isUploading && !file.error && file.progress === 100"\n [id]="id + \'-file-\' + i + \'-check\'"\n class="fas fa-check"\n role="alert"\n [attr.aria-label]="ariaLabelSuccess || successTooltip"\n [pTooltip]="successTooltip"\n tooltipPosition="top"\n showDelay="500"\n [appendTo]="\'body\'">\n </span>\n <span\n *ngIf="file.error?.message" \n [id]="id + \'-file-\' + i + \'-error\'"\n class="fas fa-times"\n role="alert"\n [pTooltip]="file.error?.message"\n tooltipPosition="top"\n showDelay="500"\n [appendTo]="\'body\'">\n </span>\n </div>\n <div\n class="s-fileupload-list-file-actions"\n role="gridcell">\n <a\n *ngIf="file.isUploading"\n [id]="id + \'-file-\' + i + \'-cancel\'"\n class="s-fileupload-list-file-actions-action"\n (click)="onCancelUpload(i)">\n {{cancelLabel}}\n </a>\n <a\n *ngIf="!file.isUploading && !(disabled || !!formGroup?.disabled)"\n role="button"\n tabindex="0"\n [id]="id + \'-file-\' + i + \'-remove\'"\n class="s-fileupload-list-file-actions-action"\n (click)="onRemoveFile(file)"\n [attr.aria-label]="ariaLabelRemove || removeLabel">\n {{removeLabel}}\n </a>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template\n #descriptionUrl\n let-file\n let-i = index>\n <a\n [id]="id + \'-file-\' + i + \'-name-link\'"\n tabindex="0"\n (click)="onDowloadFile(i)"\n [attr.aria-label]="ariaLabelFileName || file.name">{{file.name}}\n </a>\n <a\n style="display: none;"\n [href]="file.objectURL"\n target="_blank"\n download\n #anchor>\n </a>\n</ng-template>\n\n<ng-template\n #description\n let-file>\n <span\n tabindex="0"\n [attr.aria-label]="ariaLabelFileName || file.name">\n {{file.name}}\n </span>\n</ng-template>\n',styles:[".s-fileupload .s-fileupload-choose{position:relative;margin:15px 0;width:-webkit-max-content;width:max-content}.s-fileupload input[type=file]{display:none}.s-fileupload-list{border:1px solid #ccc}.s-fileupload-list-file:not(:first-child){border-top:1px solid #ccc}.s-fileupload-list .s-fileupload-list-file{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;padding:15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name>a{cursor:pointer;text-decoration:none}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.s-fileupload-list .s-fileupload-list-file .fas.fa-circle-notch{color:#d8d8d8;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-check{color:#0c9348;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-times{color:#c13018;font-size:12px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin-top:15px;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;width:100%}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action{text-decoration:none;color:#428bca}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :focus,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :visited,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action:hover{text-decoration:none}@media (min-width:768px){.s-fileupload-list .s-fileupload-list-file{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{width:auto;-ms-flex-positive:2;flex-grow:2}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{margin:0 15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin:0;width:auto}}"]})],n)}(),Ln=function(){function e(){}return e=ae([t.NgModule({declarations:[Fn],imports:[n.CommonModule,ye,l.TooltipModule,W.ProgressBarModule],exports:[Fn]})],e)}();(Tn=e.TooltipPosition||(e.TooltipPosition={})).Top="top",Tn.Bottom="bottom",Tn.Left="left",Tn.Right="right";var Mn,On,Rn=function(){function n(){this.tooltip="",this.position=e.TooltipPosition.Top,this.left=0,this.top=0,this.visible=!1,this.escape=!1}return n=ae([t.Component({template:'<div\n class="tooltip"\n [ngClass]="[\'tooltip--\' + position]"\n [class.tooltip--visible]="visible"\n [ngStyle]="{\n \'left\': left + \'px\',\n \'top\': top + \'px\'\n }">\n <ng-template\n *ngIf="escape;\n then escapeTemplate;\n else noEscapeTemplate">\n </ng-template> \n</div>\n\n<ng-template #noEscapeTemplate>\n <span\n class="tooltip__content"\n [innerHTML]="tooltip">\n </span>\n</ng-template>\n\n<ng-template #escapeTemplate>\n <span class="tooltip__content">\n {{ tooltip }}\n </span>\n</ng-template>',styles:['.tooltip{background-color:#000;border-radius:2px;color:#fff;font-family:"Open Sans",sans-serif;font-size:14px;font-weight:400;line-height:21px;margin-top:5px;opacity:0;padding:8px;position:fixed;transform:translateX(-50%);text-align:center;max-width:150px;word-wrap:break-word;z-index:99999}.tooltip--visible{opacity:1;transition:opacity .3s}.tooltip::before{content:"";height:0;position:absolute;width:0}.tooltip--bottom{margin-top:8px;transform:translateX(-50%)}.tooltip--bottom::before{border:5px solid transparent;border-bottom:5px solid #000;left:calc(50% - 5px);top:-10px}.tooltip--top{margin-bottom:8px;transform:translate(-50%,-100%)}.tooltip--top::before{border:5px solid transparent;border-top:5px solid #000;left:calc(50% - 5px);bottom:-10px}.tooltip--left{margin-right:28px;transform:translate(calc(-100% - 7px),-50%)}.tooltip--left::before{border:5px solid transparent;border-left:5px solid #000;right:-10px;bottom:calc(50% - 5px)}.tooltip--right{margin-left:7px;transform:translateY(-50%)}.tooltip--right::before{border:5px solid transparent;border-right:5px solid #000;left:-10px;bottom:calc(50% - 5px)}']})],n)}();!function(e){e.Pressing="pressing",e.Tap="tap"}(Mn||(Mn={})),function(e){e.Focus="focus",e.Hover="hover"}(On||(On={}));var Dn,An,Pn=function(){function n(t,n,o,i){this.elementRef=t,this.appRef=n,this.componentFactoryResolver=o,this.injector=i,this.position=e.TooltipPosition.Top,this.showDelay=500,this.tooltipEvent=On.Hover,this.escape=!1,this.visible=!0,this.mobileBehavior=Mn.Pressing,this.componentRef=null}return n.prototype.ngOnInit=function(){this.validatePosition()},n.prototype.ngOnDestroy=function(){this.destroy()},n.prototype.onClick=function(){this.tooltipEvent!==On.Hover||navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/iPhone/i)||this.destroy()},n.prototype.onDocumentTouchStart=function(){this.tooltipEvent===On.Hover&&this.destroy()},n.prototype.onFocus=function(){this.tooltipEvent===On.Focus&&this.createTootip()},n.prototype.onBlur=function(){this.tooltipEvent===On.Focus&&this.destroy()},n.prototype.onMouseEnter=function(){this.tooltipEvent===On.Hover&&this.createTootip()},n.prototype.onMouseLeave=function(){this.tooltipEvent===On.Hover&&this.setHideTooltipTimeout()},n.prototype.onTouchStart=function(){this.tooltipEvent===On.Hover&&(window.clearTimeout(this.touchTimeout),this.touchTimeout=window.setTimeout(this.createTootip.bind(this),this.mobileBehavior===Mn.Pressing?this.showDelay:0))},n.prototype.onTouchEnd=function(){this.tooltipEvent===On.Hover&&this.mobileBehavior===Mn.Pressing&&(window.clearTimeout(this.touchTimeout),this.setHideTooltipTimeout())},n.prototype.validatePosition=function(){if(![e.TooltipPosition.Top,e.TooltipPosition.Right,e.TooltipPosition.Bottom,e.TooltipPosition.Left].includes(this.position))throw this.position=e.TooltipPosition.Top,new Error("Tooltip "+this.position+" position is unexpected")},n.prototype.setHideTooltipTimeout=function(){this.destroy()},n.prototype.createTootip=function(){var e;if(null===this.componentRef&&(null===(e=this.tooltip)||void 0===e?void 0:e.length)){var t=this.componentFactoryResolver.resolveComponentFactory(Rn);this.componentRef=t.create(this.injector),this.appRef.attachView(this.componentRef.hostView);var n=this.componentRef.hostView.rootNodes[0];document.body.appendChild(n),this.setTooltipComponentProperties(),this.showTimeout=window.setTimeout(this.showTooltip.bind(this),this.showDelay),this.displayTime&&window.setTimeout(this.destroy.bind(this),this.displayTime)}},n.prototype.showTooltip=function(){null!==this.componentRef&&(this.componentRef.instance.visible=!0)},n.prototype.setTooltipComponentProperties=function(){if(null!==this.componentRef){this.componentRef.instance.tooltip=this.tooltip,this.componentRef.instance.escape=this.escape;for(var t=this.elementRef.nativeElement.getBoundingClientRect(),n=t.left,o=t.right,i=t.top,r=t.bottom,a=r-i,s=o-n,l=!1,p=[];!l;){if(p.includes(e.TooltipPosition.Top)&&p.includes(e.TooltipPosition.Bottom)&&p.includes(e.TooltipPosition.Left)&&p.includes(e.TooltipPosition.Right))throw this.destroy(),new Error("No space to show tooltip");switch(this.position){case e.TooltipPosition.Top:if(p.includes(e.TooltipPosition.Top)){this.position=e.TooltipPosition.Left;break}if(i<=a+150){this.position=e.TooltipPosition.Bottom,p.push(e.TooltipPosition.Top),l=!1;break}this.componentRef.instance.left=Math.round(s/2+n),this.componentRef.instance.top=Math.round(i-20-5),l=!0;break;case e.TooltipPosition.Bottom:if(p.includes(e.TooltipPosition.Bottom)){this.position=e.TooltipPosition.Left;break}if(document.body.clientHeight-r<=a+150){this.position=e.TooltipPosition.Top,p.push(e.TooltipPosition.Bottom);break}this.componentRef.instance.left=Math.round(s/2+n),this.componentRef.instance.top=Math.round(r+20),l=!0;break;case e.TooltipPosition.Left:if(p.includes(e.TooltipPosition.Left)){this.position=e.TooltipPosition.Top;break}if(n<=s+150){this.position=e.TooltipPosition.Right,p.push(e.TooltipPosition.Left),l=!1;break}this.componentRef.instance.left=Math.round(n-20),this.componentRef.instance.top=Math.round(i+a/2-5),l=!0;break;case e.TooltipPosition.Right:if(p.includes(e.TooltipPosition.Right)){this.position=e.TooltipPosition.Top;break}if(document.body.clientWidth-o<=s+150){this.position=e.TooltipPosition.Left,p.push(e.TooltipPosition.Right),l=!1;break}this.componentRef.instance.left=Math.round(o+20),this.componentRef.instance.top=Math.round(i+a/2-5),l=!0}this.componentRef.instance.position=this.position}}},n.prototype.destroy=function(){null!==this.componentRef&&(window.clearTimeout(this.showTimeout),this.appRef.detachView(this.componentRef.hostView),this.componentRef.destroy(),this.componentRef=null)},n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ApplicationRef},{type:t.ComponentFactoryResolver},{type:t.Injector}]},ae([t.Input("sTooltip")],n.prototype,"tooltip",void 0),ae([t.Input("tooltipPosition")],n.prototype,"position",void 0),ae([t.Input()],n.prototype,"showDelay",void 0),ae([t.Input()],n.prototype,"displayTime",void 0),ae([t.Input()],n.prototype,"tooltipEvent",void 0),ae([t.Input()],n.prototype,"escape",void 0),ae([t.Input()],n.prototype,"visible",void 0),ae([t.Input()],n.prototype,"mobileBehavior",void 0),ae([t.HostListener("click"),t.HostListener("keydown")],n.prototype,"onClick",null),ae([t.HostListener("document:touchstart")],n.prototype,"onDocumentTouchStart",null),ae([t.HostListener("focus")],n.prototype,"onFocus",null),ae([t.HostListener("blur")],n.prototype,"onBlur",null),ae([t.HostListener("mouseenter")],n.prototype,"onMouseEnter",null),ae([t.HostListener("mouseleave")],n.prototype,"onMouseLeave",null),ae([t.HostListener("touchstart")],n.prototype,"onTouchStart",null),ae([t.HostListener("touchend")],n.prototype,"onTouchEnd",null),n=ae([t.Directive({selector:"[sTooltip]"})],n)}(),Nn=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[Rn,Pn],exports:[Pn]})],e)}(),zn=function(){function e(){}return e=ae([t.Component({selector:"s-info-sign-component",template:'<span class="info-sign">\n <span *ngTemplateOutlet="templateRef"></span>\n <i\n class="info-sign__icon fa fa-info-circle"\n aria-hidden="true"\n [sTooltip]="tooltip"\n [escape]="false"\n tooltipPosition="top"\n [displayTime]="5000"\n mobileBehavior="tap"\n showDelay="0">\n </i>\n</span>',styles:[".info-sign{-ms-flex-align:baseline;align-items:baseline;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start}.info-sign .info-sign__icon{padding:0 12px}"]})],e)}(),Vn=function(){function e(e,t,n){this.templateRef=e,this.viewContainer=t,this.componentFactoryResolver=n}return e.prototype.ngOnInit=function(){if(!this.componentRef&&this.sInfoSign){this.viewContainer.clear();var e=this.componentFactoryResolver.resolveComponentFactory(zn);this.componentRef=this.viewContainer.createComponent(e),this.componentRef.instance.templateRef=this.templateRef,this.componentRef.instance.tooltip=this.sInfoSign}else this.componentRef&&this.sInfoSign?this.componentRef.instance.tooltip=this.sInfoSign:(this.viewContainer.clear(),this.viewContainer.createEmbeddedView(this.templateRef))},e.prototype.ngOnDestroy=function(){this.componentRef&&this.componentRef.destroy()},e.ctorParameters=function(){return[{type:t.TemplateRef},{type:t.ViewContainerRef},{type:t.ComponentFactoryResolver}]},ae([t.Input()],e.prototype,"sInfoSign",void 0),e=ae([t.Directive({selector:"[sInfoSign]"})],e)}(),Bn=function(){function e(){}return e=ae([t.NgModule({imports:[Nn,n.CommonModule],declarations:[Vn,zn],exports:[Vn],entryComponents:[zn]})],e)}(),Un=function(){function e(){this.id="s-loading-state-"+n.nextId++,this.BLOCK_TIMEOUT_VALUE=300,this.UNBLOCK_TIMEOUT_VALUE=200}var n;return n=e,Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,e?this.block():this.unblock()},enumerable:!0,configurable:!0}),e.prototype.block=function(){var e=this;this.unblockTimeoutId&&(clearTimeout(this.unblockTimeoutId),this.unblockTimeoutId=void 0),this.blockTimeoutId||(this.blockTimeoutId=setTimeout((function(){e.blocking=!0,e.blockTimeoutId=void 0}),this.BLOCK_TIMEOUT_VALUE))},e.prototype.unblock=function(){var e=this;this.blockTimeoutId&&(clearTimeout(this.blockTimeoutId),this.blockTimeoutId=void 0),this.unblockTimeoutId||(this.unblockTimeoutId=setTimeout((function(){e.blocking=!1,e.unblockTimeoutId=void 0}),this.UNBLOCK_TIMEOUT_VALUE))},e.prototype.ngOnDestroy=function(){this.blockTimeoutId&&clearTimeout(this.blockTimeoutId),this.unblockTimeoutId&&clearTimeout(this.unblockTimeoutId)},e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"blockWindow",void 0),ae([t.Input()],e.prototype,"loading",null),e=n=ae([t.Component({selector:"s-loading-state",template:'<div\n [id]="id"\n class="s-loading-state-container"\n [ngClass]="{\'loading\': loading, \'blocking\': blocking, \'fullscreen\': blockWindow}">\n <div\n [id]="id + \'-loader\'"\n class="loader">\n <div\n [id]="id + \'-spinner\'"\n class="spinner">\n <div class="bounce bounce-1"></div>\n <div class="bounce bounce-2"></div>\n <div class="bounce bounce-3"></div>\n </div>\n <div\n [id]="id + \'-overlay\'"\n class="overlay">\n </div>\n </div>\n <div\n [id]="id + \'-contents\'"\n class="contents">\n <ng-container *ngTemplateOutlet="contents || originalContent"></ng-container>\n <ng-template #originalContent>\n <ng-content></ng-content>\n </ng-template>\n </div>\n</div>',styles:[".s-loading-state-container{position:relative}.s-loading-state-container>.loader{height:100%;opacity:0;position:absolute;transition:opacity .2s ease-out,display .2s ease-out;visibility:hidden;width:100%}.s-loading-state-container>.loader>.overlay{background-color:#fff;height:100%;opacity:.8;transition:opacity .2s ease-out,display .2s ease-out;width:100%}.s-loading-state-container>.loader>.spinner{display:table;left:50%;position:absolute;text-align:center;top:calc(50% - 9px);transform:translate(-50%);vertical-align:middle;z-index:2}.s-loading-state-container.blocking>.loader,.s-loading-state-container.loading>.loader{visibility:visible}.s-loading-state-container.blocking>.loader,.s-loading-state-container.blocking>.loader>.overlay,.s-loading-state-container.loading>.loader,.s-loading-state-container.loading>.loader>.overlay{cursor:wait;z-index:1}.s-loading-state-container.blocking>.contents,.s-loading-state-container.loading>.contents{z-index:0!important}.s-loading-state-container.loading>.loader>.spinner>.bounce{animation:1.2s ease-out infinite bounce;background-color:#333;border-radius:100%;display:inline-block;height:10px;width:10px}.s-loading-state-container.loading>.loader>.spinner>.bounce+.bounce{margin-left:15px}.s-loading-state-container.loading>.loader>.spinner>.bounce.bounce-1{animation-delay:0s}.s-loading-state-container.loading>.loader>.spinner>.bounce.bounce-2{animation-delay:.1s}.s-loading-state-container.loading>.loader>.spinner>.bounce.bounce-3{animation-delay:.2s}.s-loading-state-container.blocking.loading>.loader{opacity:1}.s-loading-state-container.fullscreen>.loader{left:0;position:fixed;top:0;z-index:1005}@keyframes bounce{100%,80%{transform:scale(1)}90%{transform:scale(1.8)}}::ng-deep .s-loading-state-container.loading.blocking s-loading-state .s-loading-state-container>.loader{opacity:0;visibility:hidden}::ng-deep .s-loading-state-container.loading.blocking s-loading-state .s-loading-state-container>.contents{z-index:0!important}"]})],e)}(),jn=function(){function e(e,t,n,o){this.target=e,this.template=t,this.componentFactoryResolver=n,this.cdr=o,this._loading=!1}return Object.defineProperty(e.prototype,"sLoadingState",{get:function(){return this._loading},set:function(e){this._loading=e,this.loaderComponent&&(this.loaderComponent.instance.loading=e)},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.createComponent()},e.prototype.createComponent=function(){var e=this.componentFactoryResolver.resolveComponentFactory(Un);this.loaderComponent=this.target.createComponent(e),this.loaderComponent.instance.contents=this.template,this.loaderComponent.instance.loading=this.sLoadingState,this.cdr.detectChanges()},e.prototype.ngOnDestroy=function(){this.loaderComponent.destroy()},e.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:t.ComponentFactoryResolver},{type:t.ChangeDetectorRef}]},ae([t.Input()],e.prototype,"sLoadingState",null),e=ae([t.Directive({selector:"[sLoadingState]"})],e)}(),Hn=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[Un,jn],exports:[Un,jn],entryComponents:[Un]})],e)}(),$n=function(){function e(){this.decimalSeparator=",",this.thousandsSeparator=".",this.precision=2}var n;return n=e,e.prototype.ngOnInit=function(){this.numberRegex="^((\\+?)|(-?))([0-9]{1,3})+((\\"+this.thousandsSeparator+"[0-9]{3,3})|((\\"+this.thousandsSeparator+"[0-9]{3,3})+(\\"+this.thousandsSeparator+"[0-9]{3,3}))|((\\"+this.thousandsSeparator+"[0-9]{3,3})+(\\"+this.decimalSeparator+"[0-9]{1,2}))|(\\"+this.decimalSeparator+"[0-9]{1,"+this.precision+"}))?$"},e.prototype.validate=function(e){return e.value&&!String(e.value).match(new RegExp(this.numberRegex,"g"))?{invalidNumber:!0}:null},ae([t.Input()],e.prototype,"decimalSeparator",void 0),ae([t.Input()],e.prototype,"thousandsSeparator",void 0),ae([t.Input()],e.prototype,"precision",void 0),e=n=ae([t.Directive({selector:"input[sLocalizedNumberInput]",providers:[{provide:I.NG_VALIDATORS,useExisting:t.forwardRef((function(){return n})),multi:!0}]})],e)}(),Gn=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[$n],exports:[$n]})],e)}(),qn=function(){function e(){this.defs={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z]|[0-9]"}}return e.prototype.transform=function(e,t){for(var n,o=[],i=0,r=t.split(""),a=[],s=t.includes("?"),l=0;l<r.length;l++){var p=r[l];if("?"!=p)if(this.defs[p]){var c=this.defs[p],d=e.charAt(i);if(!new RegExp(c).test(d))throw new Error("Value doesn't match mask format");i<r.length&&(o.push(e.charAt(i)),i++)}else o.push(p),s&&l>n&&a.push(l);else n=l}if(o[o.length-1]!==e.charAt(e.length-1)&&a.length){var u=o.join(""),m=void 0,f=void 0,h=void 0,g=void 0;for(l=0;l<a.length;l++){var b=a[l];m=u.substr(0,b-1),f=u.substr(b-1,1),h=u.substr(b,1),g=u.substr(b+1),u=""+m+h+f+g}return""+u+e.substr(e.length-a.length)}return o.join("")},e=ae([t.Pipe({name:"sMaskFormatter"})],e)}(),Wn=function(){function e(){}return e=ae([t.NgModule({exports:[qn],declarations:[qn]})],e)}(),Kn=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.precision=15,t.scale=0,t.decimalSeparator=",",t.alignTo=L.AlignmentOptions.LEFT,t.allowNegative=!0,t}var o;return ie(n,e),o=n,n.prototype.ngOnInit=function(){this.updateVariables(),e.prototype.ngOnInit.call(this)},n.prototype.ngOnChanges=function(e){!(e.placeholder&&e.placeholder.currentValue)&&this.scale&&(this.placeholder="0"+this.decimalSeparator+"".padEnd(this.scale,"0")),(e.scale||e.decimalSeparator||e.thousandsSeparator||e.alignTo||e.precision||e.allowNegative)&&this.updateVariables()},n.prototype.onKeypress=function(e){var t=e.code;"Minus"===t||"NumpadSubtract"===t?this.allowNegative&&(this.maxLength=this._maxLength+1):"Equal"!==t&&"NumpadAdd"!==t||(this.maxLength=this._maxLength)},n.prototype.updateVariables=function(){var e;this.options={align:this.alignTo,decimalSeparator:this.decimalSeparator,thousandsSeparator:null!==(e=this.thousandsSeparator)&&void 0!==e?e:".",scale:this.scale||0,prefix:"",suffix:"",allowNegative:this.allowNegative},this.calculateMaxLength()},n.prototype.calculateMaxLength=function(){var e,t,n=this.decimalSeparator.length,o=null!==(t=null===(e=this.thousandsSeparator)||void 0===e?void 0:e.length)&&void 0!==t?t:1,i=this.precision+(this.scale?n:0);i+=Math.ceil((this.precision-(this.scale?this.scale:0))/3-1)*o,this._maxLength=i,this.maxLength=i},ae([t.Input()],n.prototype,"precision",void 0),ae([t.Input()],n.prototype,"scale",void 0),ae([t.Input()],n.prototype,"decimalSeparator",void 0),ae([t.Input()],n.prototype,"thousandsSeparator",void 0),ae([t.Input()],n.prototype,"alignTo",void 0),ae([t.Input()],n.prototype,"allowNegative",void 0),ae([t.Input(),t.HostBinding("attr.placeholder")],n.prototype,"placeholder",void 0),ae([t.HostBinding("attr.maxLength")],n.prototype,"maxLength",void 0),ae([t.HostListener("keypress",["$event"])],n.prototype,"onKeypress",null),n=o=ae([t.Directive({selector:"input[sBignumberInput]",providers:[{provide:I.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return o})),multi:!0}]})],n)}(L.CurrencyMaskDirective),Yn=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[Kn],exports:[Kn]})],e)}(),Xn=function(){function e(e,t){var o=this;this.table=e,this.tableService=t,this.id="s-table-header-checkbox-"+n.nextId++,this.ngUnsubscribe=new r.Subject,this.table.tableService.valueSource$.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){o.checked=o.updateCheckedState()})),this.table.tableService.selectionSource$.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){o.checked=o.updateCheckedState()}))}var n;return n=e,e.prototype.ngOnInit=function(){this.checked=this.updateCheckedState()},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next()},e.prototype.onFocus=function(){this.hasFocus=!0},e.prototype.onBlur=function(){this.hasFocus=!1},e.prototype.isDisabled=function(){return this.disabled||!this.table.value||!this.table.value.length},e.prototype.onClick=function(){this.disabled||this.table.value&&this.table.value.length>0&&this.onToggleCheckbox(!this.checked)},e.prototype.updateCheckedState=function(){var e;return this.table.filteredValue?(e=this.table.filteredValue)&&e.length>0&&this.table.selection&&this.table.selection.length>0&&this.isAllFilteredValuesChecked():(e=this.table.value)&&e.length>0&&this.table.selection&&this.table.selection.length>0&&this.isAllValuesChecked()},e.prototype.onToggleCheckbox=function(e){var t=this,n=this.table,o=n.filteredValue,i=n.value,r=n.dataKey,a=e?o?o.slice():i.slice():[];if(e){var s=a.filter((function(e){return!t.table._selection.find((function(t){return e[r]===t[r]}))})).map((function(e){if(t.useAllObject)return e;var n={};return t.rowProps?t.rowProps.forEach((function(t){return n[t]=e[t]})):n[r]=e[r],n}));this.table._selection=ue(this.table._selection,s)}else i.forEach((function(e){t.table._selection=t.table._selection.filter((function(t){return t[r]!==e[r]}))}));this.table.updateSelectionKeys(),this.table.selectionChange.emit(this.table._selection),this.tableService.onSelectionChange(),this.table.isStateful()&&this.table.saveState()},e.prototype.isAllFilteredValuesChecked=function(){var e,t;if(this.table.filteredValue){try{for(var n=ce(this.table.filteredValue),o=n.next();!o.done;o=n.next()){var i=o.value;if(!this.table.isSelected(i))return!1}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return!0}return!1},e.prototype.isAllValuesChecked=function(){var e,t;if(this.table.value){try{for(var n=ce(this.table.value),o=n.next();!o.done;o=n.next()){var i=o.value;if(!this.table.isSelected(i))return!1}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return!0}return!1},e.nextId=0,e.ctorParameters=function(){return[{type:F.Table},{type:F.TableService}]},ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"disabled",void 0),ae([t.Input()],e.prototype,"rowProps",void 0),ae([t.Input()],e.prototype,"useAllObject",void 0),e=n=ae([t.Component({selector:"s-table-header-checkbox",template:'\n <div class="ui-chkbox ui-widget" (click)="onClick()">\n <div class="ui-helper-hidden-accessible">\n <input type="checkbox" [checked]="checked" (focus)="onFocus()" (blur)="onBlur()" [disabled]="isDisabled()">\n </div>\n <div [ngClass]="{\'ui-chkbox-box ui-widget ui-state-default\':true,\n \'ui-state-active\':checked, \'ui-state-disabled\': isDisabled(), \'ui-state-focus\': hasFocus}">\n <span [id]="id" class="ui-chkbox-icon ui-clickable" [ngClass]="{\'pi pi-check\':checked}"></span>\n </div>\n </div>\n '})],e)}(),Zn=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],exports:[Xn],declarations:[Xn]})],e)}(),Jn=function(){function e(){}return e.prototype.onKeyDown=function(e){switch(e.key){case"Right":case"ArrowRight":this.isRow(e.target)?this.focusFirstColFromCurrentRow(e.target):this.isCol(e.target)&&this.focusNextSelectableCol(e.target),e.preventDefault();break;case"Left":case"ArrowLeft":this.isRow(e.target)?this.focusLastColFromPrevRow(e.target):this.isCol(e.target)&&this.focusPrevSelectableCol(e.target),e.preventDefault();break;case"Up":case"ArrowUp":this.isRow(e.target)?this.setPrevRowFocus(e.target):this.isCol(e.target)&&this.setAboveColFocus(e.target),e.preventDefault();break;case"Down":case"ArrowDown":this.isRow(e.target)?this.setNextRowFocus(e.target):this.isCol(e.target)&&this.setUnderColFocus(e.target),e.preventDefault()}},e.prototype.focusLastColFromPrevRow=function(e){var t=this.findPrevSelectableRow(e);t&&t.lastElementChild.focus()},e.prototype.focusFirstColFromCurrentRow=function(e){var t=e.firstElementChild;t&&t.focus()},e.prototype.focusNextSelectableCol=function(e){var t=e.nextElementSibling;if(!t){var n=e.parentElement;return this.setNextRowFocus(n)}t.focus()},e.prototype.focusPrevSelectableCol=function(e){var t=e.previousElementSibling;if(!t)return e.parentElement.focus();t.focus()},e.prototype.setAboveColFocus=function(e){var t=e.cellIndex,n=e.parentElement,o=this.findPrevSelectableRow(n);o&&o.cells[t].focus()},e.prototype.setUnderColFocus=function(e){var t=e.cellIndex,n=e.parentElement,o=this.findNextSelectableRow(n);o&&o.cells[t].focus()},e.prototype.setNextRowFocus=function(e){var t=this.findNextSelectableRow(e);t&&t.focus()},e.prototype.setPrevRowFocus=function(e){var t=this.findPrevSelectableRow(e);t&&t.focus()},e.prototype.isRow=function(e){return"tr"===e.tagName.toLocaleLowerCase()},e.prototype.isCol=function(e){return"td"===e.tagName.toLocaleLowerCase()},e.prototype.findPrevSelectableRow=function(e){var t=e.previousElementSibling;return t||null},e.prototype.findNextSelectableRow=function(e){var t=e.nextElementSibling;return t||null},ae([t.HostListener("keydown",["$event"])],e.prototype,"onKeyDown",null),e=ae([t.Directive({selector:"[sNavigation]"})],e)}(),Qn=function(e){function n(t){var n=e.call(this,t)||this;return n.dt=t,n}return ie(n,e),n.prototype.onKeydown=function(e){if(this.isEnabled())switch(e.key){case"Enter":this.dt.toggleRow(this.data,e),e.preventDefault();break;default:e.preventDefault()}},n.ctorParameters=function(){return[{type:F.Table}]},ae([t.Input("sRowToggler")],n.prototype,"data",void 0),ae([t.HostListener("keydown",["$event"])],n.prototype,"onKeydown",null),n=ae([t.Directive({selector:"[sRowToggler]"})],n)}(F.RowToggler),eo=function(){function e(e,n){this.el=e,this.host=n,this.sTableFrozenPosition="left",this.isTableVisible=!1,this.onColumnsChanged=new t.EventEmitter,this.table=n,this.table.styleClass=(this.table.styleClass||"")+" s-table-frozen-position",this.setUpTableEvents(),window.addEventListener("resize",this.handleWindowResize.bind(this));var o=(new Date).getTime(),i=document.getElementsByTagName("head")[0];this.resetRowHeightClassName="resetTableRowsHeight_"+o;var r=document.createElement("style");r.innerHTML="."+this.resetRowHeightClassName+" tbody > tr, ."+this.resetRowHeightClassName+" thead > tr { height: auto; }",i.appendChild(r),this.fixBodyRowClassName="fixTableBodyRowsHeight_"+o,this.styleFixBodyRowHeight=document.createElement("style"),this.styleFixBodyRowHeight.innerHTML="."+this.fixBodyRowClassName+" tbody > tr { height: auto; }",i.appendChild(this.styleFixBodyRowHeight),this.fixHeadRowClassName="fixTableHeadRowsHeight_"+o,this.styleFixHeadRowHeight=document.createElement("style"),this.styleFixHeadRowHeight.innerHTML="."+this.fixHeadRowClassName+" thead > tr { height: auto; }",i.appendChild(this.styleFixHeadRowHeight);var a=document.createElement("style");a.innerHTML=".s-table-frozen-position .ui-table-frozen-view .sds-expanded-row > td { visibility: hidden; }",i.appendChild(a)}return Object.defineProperty(e.prototype,"sTableFrozenValue",{set:function(e){var t=this;setTimeout((function(){t.synchronizeRowHeight(),t.setUpRowResizeMonitoring()}))},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){"left"!==this.sTableFrozenPosition&&(this.applyStylesForTable(),this.setUpColumnMonitoring())},e.prototype.ngAfterContentChecked=function(){!this.isTableVisible&&this.table.el.nativeElement.offsetParent?(this.isTableVisible=!0,this.synchronizeRowHeight()):this.isTableVisible&&!this.table.el.nativeElement.offsetParent&&(this.isTableVisible=!1)},e.prototype.ngOnDestroy=function(){window.removeEventListener("resize",this.handleWindowResize.bind(this)),this.tableHeadObservable&&this.tableHeadObservable.disconnect(),this.rowExpandedObserver&&this.rowExpandedObserver.disconnect()},e.prototype.setUpTableEvents=function(){var e=this;this.table.onColResize.subscribe((function(){e.handleColResize()})),this.table.onRowExpand.subscribe((function(){e.setUpRowResizeMonitoring()}))},e.prototype.setUpRowResizeMonitoring=function(){var e=this;this.rowExpandedObserver&&this.rowExpandedObserver.disconnect(),this.rowExpandedObserver=new window.ResizeObserver((function(){e.applyHeightForExpandedRows()})),setTimeout((function(){var t=e.el.nativeElement.querySelectorAll(".ui-table-frozen-view .sds-expanded-row > td"),n=e.el.nativeElement.querySelectorAll(".ui-table-unfrozen-view .sds-expanded-row > td");t.forEach((function(t,o){var i=n[o],r=i.getBoundingClientRect().height;t.innerHTML='<div style="height: '+r+'px"></div>',t.style.padding="0px",e.rowExpandedObserver.observe(i)}))}))},e.prototype.setUpColumnMonitoring=function(){var e=this;this.tableHeadObservable=new MutationObserver((function(){e.synchronizeRowHeight(),e.onColumnsChanged.emit(null)})),ue(this.el.nativeElement.getElementsByTagName("thead")).forEach((function(t){e.tableHeadObservable.observe(t,{subtree:!0,childList:!0})}))},e.prototype.applyHeightForExpandedRows=function(){var e=this.el.nativeElement.querySelectorAll(".ui-table-frozen-view .sds-expanded-row > td"),t=this.el.nativeElement.querySelectorAll(".ui-table-unfrozen-view .sds-expanded-row > td");e.forEach((function(e,n){var o=t[n].getBoundingClientRect().height,i=e.getBoundingClientRect().height;Math.abs(o-i)>1&&(e.style.height=o+"px",e.innerHTML="<div></div>")}))},e.prototype.applyStylesForTable=function(){var e=this.el.nativeElement.querySelector(".ui-table-scrollable-wrapper");if(e){e.style.display="flex",e.style.flexDirection="row";var t=this.el.nativeElement.querySelector(".ui-table-frozen-view");if(t){t.style.order="1",t.style.borderRight="none",t.style.borderLeft="1px solid #dddddd",t.style.boxShadow="-5px 0 5px -5px #cccccc";var n=this.el.nativeElement.querySelector(".ui-table-unfrozen-view");n?n.style.position="unset":console.warn("Unable to find unfrozen element from table. Is the table configured with frozen template?")}else console.warn("Unable to find frozen element from table. Is the table configured with frozen template?")}else console.warn("Unable to find scroll-wrapper element from table. Is the table configured with frozen template?")},e.prototype.handleWindowResize=function(){this.synchronizeRowHeight()},e.prototype.handleColResize=function(){this.synchronizeRowHeight()},e.prototype.synchronizeRowHeight=function(){var e=ue(this.el.nativeElement.getElementsByClassName("ui-table-scrollable-body")).map((function(e){return ue(e.childNodes).find((function(e){return"TABLE"===e.tagName}))}));this.recalculateDefaultRowHeight(e),this.applyMaxRowHeight(e);var t=ue(this.el.nativeElement.getElementsByClassName("ui-table-scrollable-header-box")).map((function(e){return ue(e.childNodes).find((function(e){return"TABLE"===e.tagName}))}));this.recalculateDefaultRowHeight(t),this.applyMaxRowHeight(t,!0)},e.prototype.recalculateDefaultRowHeight=function(e){var t,n;try{for(var o=ce(e),i=o.next();!i.done;i=o.next()){var r=i.value;r.classList.remove(this.fixBodyRowClassName),r.classList.remove(this.fixHeadRowClassName),r.classList.add(this.resetRowHeightClassName)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.applyMaxRowHeight=function(e,t){var n,o,i,r,a,s,l,p;void 0===t&&(t=!1);var c=[];try{for(var d=ce(e),u=d.next();!u.done;u=d.next()){var m=u.value;try{for(var f=(i=void 0,ce(m.rows)),h=f.next();!h.done;h=f.next()){var g=h.value;g.classList.contains("sds-expanded-row")||c.push(g.getBoundingClientRect().height)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}if(c.length){var b=Math.max.apply(Math,ue(c));if(t){this.styleFixHeadRowHeight.innerHTML="."+this.fixHeadRowClassName+" thead > tr { height: "+b+"px; }";try{for(var v=ce(e),y=v.next();!y.done;y=v.next()){(m=y.value).classList.remove(this.resetRowHeightClassName),m.classList.add(this.fixHeadRowClassName)}}catch(e){a={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}}else{this.styleFixBodyRowHeight.innerHTML="."+this.fixBodyRowClassName+" tbody > tr { height: "+b+"px; }";try{for(var x=ce(e),w=x.next();!w.done;w=x.next()){(m=w.value).classList.remove(this.resetRowHeightClassName),m.classList.add(this.fixBodyRowClassName)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(p=x.return)&&p.call(x)}finally{if(l)throw l.error}}}}},e.ctorParameters=function(){return[{type:t.ElementRef},{type:F.Table}]},ae([t.Input()],e.prototype,"sTableFrozenPosition",void 0),ae([t.Input()],e.prototype,"sTableFrozenValue",null),e=ae([t.Directive({selector:"[sTableFrozenPosition]"})],e)}();(Dn=e.EnumColumnFieldType||(e.EnumColumnFieldType={})).STRING="STRING",Dn.NUMBER="NUMBER",Dn.BOOLEAN="BOOLEAN",Dn.DATE="DATE",Dn.CURRENCY="CURRENCY",Dn.ENUM="ENUM",Dn.LOOKUP="LOOKUP",Dn.LINK="LINK",Dn.TOKENS="TOKENS",(An=e.EnumBadgeColors||(e.EnumBadgeColors={})).RED="sds-semantic-red",An.ORANGE="sds-semantic-orange",An.YELLOW="sds-semantic-yellow",An.GREEN="sds-semantic-green",An.BLUE="sds-semantic-blue";var to,no,oo=function(){function n(e,t,n){this.viewContainerRef=e,this.translate=t,this.hostProjectConfigs=n,this.formattedColumns=[]}return n.prototype.ngOnChanges=function(e){this.validateComponentAttributes(e),this.createColumnsTemplate(e)},n.prototype.validateComponentAttributes=function(e){var t,n,o;if(!(null===(t=e.columns)||void 0===t?void 0:t.currentValue))throw new Error("The 'columns' attribute must be informed!");if(!(null===(n=e.rowValue)||void 0===n?void 0:n.currentValue))throw new Error("The 'rowValue' attribute must be informed!");if(!(null===(o=e.locale)||void 0===o?void 0:o.currentValue))throw new Error("The 'locale' attribute must be informed!")},n.prototype.createColumnsTemplate=function(e){var t=this;this.viewContainerRef.clear();var n=e.columns.currentValue,o=e.rowValue.currentValue,i=e.locale.currentValue;n.forEach((function(e){return t.formattedColumns.push(t.getColumnValue(e,o,i))})),this.viewContainerRef.createEmbeddedView(this.columnsTemplate)},n.prototype.getColumnSeparator=function(e){return e.separator?e.separator:" - "},n.prototype.getTranslationPrefix=function(e){return e.prefix?e.prefix:this.hostProjectConfigs.domain+"."+this.hostProjectConfigs.service+"."},n.prototype.isAttributeValueInvalid=function(e){return null==e||this.isArray(e)&&!e.length},n.prototype.getFormattedColumnValue=function(t,n,o,i,r){return r===t.attributes.length?i:t.type===e.EnumColumnFieldType.TOKENS?[].concat.apply([],n.filter((function(e){return e!==i}))):o},n.prototype.getAttributeValue=function(e,t){var n;return e.split("/").forEach((function(e){n||e.split(".").forEach((function(e,o){t&&(0===o?n=t[e]:n&&(n=n[e]))}))})),n},n.prototype.getNumberConfigs=function(e,t){return re(re({},t.number),{scale:null!==e.scale&&void 0!==e.scale?this.getColumnScale(e.scale):t.number.scale,prefix:t.number.currencySymbol+" "})},n.prototype.getDateFormat=function(e,t){return e.dateFormat?e.dateFormat:t.calendar.dateFormat},n.prototype.getColumnValue=function(t,n,o){var i=this,r=this.getTranslationPrefix(t),a=this.getColumnSeparator(t),s=this.translate.instant(r+"empty_label"),l=t.style,p={"sds-badge":!1},c=t.attributes.map((function(a){var l,c=i.getAttributeValue(a,n);if(i.isAttributeValueInvalid(c))return s;var d=i.getNumberConfigs(t,o);switch(t.type){case e.EnumColumnFieldType.ENUM:return(null===(l=t.badgeConfigs)||void 0===l?void 0:l.length)&&(p=i.getBadgeClass(c,t.badgeConfigs)),i.translate.instant(t.enumPrefix+c.toString().toLowerCase());case e.EnumColumnFieldType.CURRENCY:return L.applyMask(c,d,i.isNumber(c));case e.EnumColumnFieldType.DATE:var u=i.getDateFormat(t,o);return M(c).format(u);case e.EnumColumnFieldType.BOOLEAN:var m=c?"yes":"no";return i.translate.instant(r+m);case e.EnumColumnFieldType.NUMBER:return d.prefix="",L.applyMask(c,d,i.isNumber(c));case e.EnumColumnFieldType.TOKENS:return i.getTokens(c);default:return c}})),d=c.join(a),u=d.split(a).filter((function(e){return e===s})).length;return{style:l,columnValue:this.getFormattedColumnValue(t,c,d,s,u),badgeClass:p,separator:a,uninformed:s,type:t.type,tooltip:this.getColumnTooltip(t.tooltip),infoSign:this.getColumnInfoSign(t.infoSign),onLinkClick:t.onLinkClick,onColumnClick:t.onColumnClick}},n.prototype.getBadgeClass=function(e,t){var n,o={"sds-badge":!0};return o[null===(n=t.find((function(t){return t.enumValue===e})))||void 0===n?void 0:n.color.valueOf()]=!0,o},n.prototype.getColumnScale=function(e){return"function"==typeof e?e(this.rowValue):e},n.prototype.getColumnInfoSign=function(e){return null!=e?"function"==typeof e?e(this.rowValue):e:null},n.prototype.getColumnTooltip=function(e){return null!=e?"function"==typeof e?e(this.rowValue):e:""},n.prototype.isNumber=function(e){return!new ne(e).isNaN()},n.prototype.getTokens=function(e){if(!this.isArray(e))throw new Error("To use tokens an array must be informed");if(!this.isValidTokenArray(e))throw new Error("Not a valid token array. Must be a primitive values array or an objects with label attribute array");return this.isLabelObjectArray(e)?e:e.filter((function(e){return null!=e})).map((function(e){return{label:"symbol"==typeof e?e.toString():""+e}}))},n.prototype.isValidTokenArray=function(e){return this.isPrimitiveValuesArray(e)||this.isLabelObjectArray(e)},n.prototype.isPrimitiveValuesArray=function(e){return e.filter((function(e){return e!==Object(e)})).length===e.length},n.prototype.isLabelObjectArray=function(e){return e.filter((function(e){return null!==(null==e?void 0:e.label)&&void 0!==(null==e?void 0:e.label)})).length===e.length},n.prototype.isArray=function(e){return Array.isArray(e)},n.prototype.getSplittedString=function(e){var t=e.columnValue,n=e.separator,o=e.uninformed;if("string"==typeof t){var i=t.split(n);return i.map((function(e,t){var r=i.length-1===t;return{value:e,isUninformed:e===o,separator:r?"":n}}))}return null},n.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:y.TranslateService},{type:void 0,decorators:[{type:t.Inject,args:[Ne]}]}]},ae([t.ViewChild("columnsTemplate",{static:!0})],n.prototype,"columnsTemplate",void 0),ae([t.Input()],n.prototype,"columns",void 0),ae([t.Input()],n.prototype,"rowValue",void 0),ae([t.Input()],n.prototype,"locale",void 0),n=ae([t.Component({template:'<ng-template #columnsTemplate>\n <td *ngFor="let column of formattedColumns"\n [ngStyle]="column.style"\n (click)="column.onColumnClick ? column.onColumnClick(rowValue) : null">\n\n <div *ngIf="column.type !== \'TOKENS\' || !isArray(column.columnValue); else tokensTemplate">\n <span *ngIf="column.type !== \'LINK\'"\n [sTooltip]="column.tooltip"\n [escape]="false"\n [ngClass]="column.badgeClass">\n <ng-container *ngTemplateOutlet="columnValueTemplate"></ng-container> \n </span>\n\n <a *ngIf="column.type === \'LINK\'"\n [sTooltip]="column.tooltip"\n [escape]="false"\n (click)="column.onLinkClick ? column.onLinkClick(rowValue) : null">\n <ng-container *ngTemplateOutlet="columnValueTemplate"></ng-container> \n </a>\n\n <ng-template #columnValueTemplate>\n <span *ngFor="let value of getSplittedString(column)">\n <span [ngClass]="{ \'sds-empty-value\': value.isUninformed }">{{value.value}}</span>\n <span>{{value.separator}}</span>\n </span>\n <ng-container *ngIf="!!column.infoSign">\n <span *sInfoSign="column.infoSign"></span>\n </ng-container>\n </ng-template>\n </div>\n\n <ng-template #tokensTemplate>\n <s-token-list\n [tokens]="column.columnValue"\n [hidePointerEvents]="true"\n >\n </s-token-list>\n <ng-container *ngIf="!!column.infoSign">\n <span *sInfoSign="column.infoSign"></span>\n </ng-container>\n </ng-template>\n </td>\n</ng-template>\n',selector:"s-table-columns",styles:[":host{display:none}"]}),se(2,t.Inject(Ne))],n)}(),io=function(){function e(){this.id="s-token-list-"+n.nextId++,this.removableTokens=!1,this.hidePointerEvents=!1,this.tokenSelected=new t.EventEmitter,this.tokenRemoved=new t.EventEmitter}var n;return n=e,e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"tokens",void 0),ae([t.Input()],e.prototype,"removableTokens",void 0),ae([t.Input()],e.prototype,"hidePointerEvents",void 0),ae([t.Output()],e.prototype,"tokenSelected",void 0),ae([t.Output()],e.prototype,"tokenRemoved",void 0),e=n=ae([t.Component({selector:"s-token-list",template:'<div\n [id]="id"\n class="token-list">\n <ng-container *ngFor="let token of tokens">\n <span\n [id]="token.id"\n class="token"\n [ngClass]="{ \'no-pointer-events\': hidePointerEvents }">\n <a\n [id]="(token.id || \'token\') + \'-label\'"\n class="token-label"\n (click)="tokenSelected.next(token)">\n {{ token.label }}\n </a>\n <span\n *ngIf="removableTokens && !token.notRemovable"\n [id]="token.id + \'-remove\'"\n class="token-icon fa fa-fw fa-close"\n (click)="tokenRemoved.next(token)">\n </span>\n </span>\n </ng-container>\n</div>',styles:['.no-pointer-events{pointer-events:none}.token-list{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:100%;padding:0 10px;text-transform:none}.token-list .token{-ms-flex-align:center;align-items:center;background-color:#ccc;border-radius:4px;color:#333;display:-ms-flexbox;display:flex;font:400 12px/150% "Open Sans",sans-serif;margin:2px 5px 0 0;max-width:100%;padding:2px 8px}.token-list .token-label{max-width:50ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.token-list .token:focus,.token-list .token:hover{background-color:#e5eaea}.token-list .token a{text-decoration:none;color:#333}']})],e)}(),ro=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[io],exports:[io]})],e)}(),ao=function(){function e(e,t){this.translate=e,this.hostProjectConfigs=t,this.enableExportSelectedRecords=!0}return e.prototype.ngOnChanges=function(e){var t;(null===(t=e.totalRecords)||void 0===t?void 0:t.currentValue)&&(this.totalRecordsText=this.translate.instant(this.getTranslatePrefix()+"total_records",{value:e.totalRecords.currentValue}))},e.prototype.getTranslatePrefix=function(){return this.hostProjectConfigs.domain+"."+this.hostProjectConfigs.service+"."},e.prototype.getTooltipText=function(){return this.translate.instant(this.getTranslatePrefix()+"export_to_csv")},e.prototype.getActions=function(){var e,t=this,n=[{id:"exportCurrentPage",label:this.translate.instant(this.getTranslatePrefix()+"export_current_page"),command:function(){return t.exportCurrentPage()}}];if(this.enableExportSelectedRecords&&n.push({id:"exportSelected",label:this.translate.instant(this.getTranslatePrefix()+"export_selected_records"),command:function(){return t.exportSelectedRecords()}}),this.loadAllRecords&&n.push({id:"exportAll",label:this.translate.instant(this.getTranslatePrefix()+"export_all_records"),command:function(){return t.exportAllRecords()}}),null===(e=this.customActions)||void 0===e?void 0:e.length){var o=this.customActions.map((function(e,t){return{id:"customAction_"+t,label:e.label,command:e.command}}));n.push.apply(n,ue(o))}return n},e.prototype.validateComponent=function(){if(!this.table)throw new Error("Table component not defined")},e.prototype.getColumnsToExport=function(){return ue(this.table.columns).map((function(e){var t,n={header:e.header,exportable:!0,field:e.field,separator:null!==(t=e.separator)&&void 0!==t?t:" - ",enumPrefix:e.enumPrefix};return!1===e.exportable&&(n.exportable=!1),e.attributes&&e.attributes.length&&(1===e.attributes.length?n.field=e.attributes[0]:n.field=e.attributes),n}))},e.prototype.getCurrentPageRowsToExport=function(e){return this.mapColumnsTranslations(e,this.table.value)},e.prototype.getSelectedRowsToExport=function(e){return this.mapColumnsTranslations(e,this.table.selection)},e.prototype.getPropertyValue=function(e,t){return t.split(".").reduce((function(e,t){return void 0===e[t]?void 0:e[t]}),e)},e.prototype.setPropertyValue=function(e,t,n){this.recursionSetValue(e,t.split("."),n)},e.prototype.recursionSetValue=function(e,t,n){var o=t[0];return 1===t.length?(e[o]=n,e):(e[o]=this.recursionSetValue((null==e?void 0:e[o])||{},t.slice(1),n),e)},e.prototype.mapColumnsTranslations=function(e,t){var n=this,o=e.filter((function(e){return e.enumPrefix}));return o.length?ue(t).map((function(e){var t=re({},e);return o.forEach((function(o){(Array.isArray(o.field)?o.field:[o.field]).forEach((function(i){var r=n.getPropertyValue(e,i);if(null!=r){var a=n.translateValue(o,r);n.setPropertyValue(t,i,a)}}))})),t})):t},e.prototype.translateValue=function(e,t){var n=t.toString().toLowerCase(),o=e.enumPrefix+n,i=this.translate.instant(o);if(o===i&&n.length>1&&(o=""+e.enumPrefix+n.substring(0,1)+"_"+n.substr(1),i=this.translate.instant(o)),o===i){var r=this.convertToSnakeCase(t.toString());o=""+e.enumPrefix+r,i=this.translate.instant(o)}return i},e.prototype.convertToSnakeCase=function(e){return e.replace(/([A-Z])/g,(function(e,t){return"_"+t.toLowerCase()})).replace(/^_/,"")},e.prototype.getExportFileName=function(){var e;return(null!==(e=this.exportFileName)&&void 0!==e?e:"download")+"_"+M(new Date).format("DD-MM-YYYY[_]HH:mm")},e.prototype.exportCurrentPage=function(){this.validateComponent();var e=this.getColumnsToExport(),t=this.getCurrentPageRowsToExport(e);En.exportCSV(e,t,void 0,this.getExportFileName())},e.prototype.exportSelectedRecords=function(){this.validateComponent();var e=this.getColumnsToExport(),t=this.getSelectedRowsToExport(e);En.exportCSV(e,t,void 0,this.getExportFileName())},e.prototype.exportAllRecords=function(){return le(this,void 0,void 0,(function(){var e,t,n;return pe(this,(function(o){switch(o.label){case 0:return this.validateComponent(),[4,this.loadAllRecords()];case 1:return e=o.sent(),t=this.getColumnsToExport(),n=this.mapColumnsTranslations(t,e),En.exportCSV(t,n,void 0,this.getExportFileName()),[2]}}))}))},e.ctorParameters=function(){return[{type:y.TranslateService},{type:void 0,decorators:[{type:t.Inject,args:[Ne]}]}]},ae([t.Input()],e.prototype,"totalRecords",void 0),ae([t.Input()],e.prototype,"exportFileName",void 0),ae([t.Input()],e.prototype,"table",void 0),ae([t.Input()],e.prototype,"loadAllRecords",void 0),ae([t.Input()],e.prototype,"enableExportSelectedRecords",void 0),ae([t.Input()],e.prototype,"customActions",void 0),ae([t.Output()],e.prototype,"totalRecordsText",void 0),e=ae([t.Component({template:'<div class="paging-container">\n <span class="total-records">\n {{totalRecordsText}}\n </span>\n <s-button class="export-button" \n priority="default" \n iconClass="fa fa-fw fa-file-export" \n [disabled]="false" \n [auxiliary]="true" \n [tooltip]="getTooltipText()" \n [model]="getActions()"></s-button>\n</div>\n',selector:"s-table-paging",styles:[".paging-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.export-button{margin-left:6px}"]}),se(1,t.Inject(Ne))],e)}(),so=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,Nn,ro,y.TranslateModule,ye,Bn],exports:[Qn,Jn,oo,eo,ao],declarations:[Qn,Jn,oo,eo,ao]})],e)}(),lo=function(){function e(){}return ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),e=ae([t.Component({template:'<div\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500">\n <s-lookup\n [id]="(field.id || field.name)"\n [multiple]="field.multiple"\n [formControl]="formControl"\n [placeholder]="field.placeholder"\n [lookupSuggestions]="field.suggestions"\n [dataKey]="field.dataKey"\n (onLookupRequest)="field.onSearch($event)"\n [lookupDisplayField]="field.displayField"\n [showSearch]="false"\n [lookupAppendTo]="field.appendTo"\n (onSelect)="field.onSelect ? field.onSelect($event) : null"\n (onUnselect)="field.onUnselect ? field.onUnselect($event) : null"\n (onClear)="field.onClear ? field.onClear($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n [lookupEmptyMessage]="field.emptyMessage">\n </s-lookup>\n</div>\n'})],e)}(),po=function(){function e(){}return e.prototype.onClear=function(){this.formControl.reset()},ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),e=ae([t.Component({template:'<ng-container *ngIf="field.verticalAlignment;else horizontalAlignment">\n <div class="ui-g">\n <div class="ui-g-12">\n <p-radioButton\n [name]="field.name"\n [value]="true"\n [label]="field.optionsLabel.true"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-1\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton>\n </div>\n <div class="ui-g-12">\n <p-radioButton\n [name]="field.name"\n [value]="false"\n [label]="field.optionsLabel.false"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-2\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton>\n </div>\n <div\n *ngIf="!field.showClear && !field.required()"\n class="ui-g-12">\n <p-radioButton \n [name]="field.name"\n [value]="null"\n [label]="field.optionsLabel.empty"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-3\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton> \n </div>\n <div>\n <s-button\n *ngIf="field.showClear && !field.required() && !formControl.disabled"\n [label]="field.optionsLabel.clear || \'Clear selection\'"\n (onClick)="onClear()"\n priority="link">\n </s-button>\n </div>\n\n </div>\n</ng-container>\n\n<ng-template #horizontalAlignment>\n <div class="ui-g">\n <p-radioButton\n [name]="field.name"\n [value]="true"\n [label]="field.optionsLabel.true"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-1\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton>\n \n <p-radioButton\n [name]="field.name"\n [value]="false"\n [label]="field.optionsLabel.false"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-2\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton>\n\n <p-radioButton\n *ngIf="!field.showClear && !field.required()"\n [name]="field.name"\n [value]="null"\n [label]="field.optionsLabel.empty"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-3\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton>\n\n <s-button\n *ngIf="field.showClear && !field.required() && !formControl.disabled"\n style="margin-left: 40px;"\n [label]="field.optionsLabel.clear || \'Clear selection\'"\n (onClick)="onClear()"\n priority="link">\n </s-button>\n </div>\n</ng-template>\n'})],e)}(),co=function(){function e(){}return ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),ae([t.Input()],e.prototype,"showTime",void 0),ae([t.Input()],e.prototype,"timeOnly",void 0),e=ae([t.Component({template:'<div\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500">\n \x3c!-- Remover as propriedades [showTransitionOptions] e [hideTransitionOptions] quando atualizar para o PrimeNG v10, esses atributos foram\n usados para remover um bug ocasionado pela animação do componente p-calendar, bug explicado nas issues: #ERPROM-5534, #ERPROM-8248 e #DSN-1045. --\x3e\n <p-calendar\n #calendar\n sCalendarMask\n [inputId]="(field.id || field.name)"\n [name]="field.name"\n [showIcon]="true"\n [timeOnly]="timeOnly"\n [selectionMode]="field.selectionMode"\n [rangeSeparator]="field.rangeSeparator"\n [showTime]="showTime"\n [showSeconds]="field.showSeconds"\n [showOnFocus]="field.showOnFocus"\n [formControl]="formControl"\n [icon]="timeOnly ? \'fa fa-clock\' : \'fa fa-calendar\'"\n [minDate]="field.minDate"\n [maxDate]="field.maxDate"\n [defaultDate]="field.defaultDate"\n [locale]="field.calendarLocaleOptions"\n [dateFormat]="field.calendarLocaleOptions.dateFormat"\n [hourFormat]="field.calendarLocaleOptions.hourFormat"\n [view]="field.view"\n [placeholder]="field.placeholder"\n inputStyleClass="mousetrap"\n [appendTo]="field.appendTo"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event): null"\n (onSelect)="field.onSelect ? field.onSelect($event) : null"\n (onClose)="field.onClose ? field.onClose($event) : null"\n (onTodayClick)="field.onTodayClick ? field.onTodayClick($event) : null"\n (onClearClick)="field.onClearClick ? field.onClearClick($event) : null"\n (onMonthChange)="field.onMonthChange ? field.onMonthChange($event) : null"\n (onYearChange)="field.onYearChange ? field.onYearChange($event) : null"\n [showTransitionOptions]="\'0ms\'"\n [hideTransitionOptions]="\'0ms\'">\n </p-calendar>\n</div>\n'})],e)}(),uo=function(){function e(){}return ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),e=ae([t.Component({template:'<p-chips\n *ngIf="field.keyFilter"\n [inputId]="(field.id || field.name)"\n [formControl]="formControl"\n [placeholder]="field.placeholder"\n [allowDuplicate]="false"\n [addOnTab]="true"\n [addOnBlur]="true"\n (onAdd)="field.onAdd ? field.onAdd($event) : null"\n (onRemove)="field.onRemove ? field.onRemove($event) : null"\n (onChipClick)="field.onChipClick ? field.onChipClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n [pKeyFilter]="field.keyFilter">\n</p-chips>\n\n<p-chips\n *ngIf="!field.keyFilter"\n [inputId]="(field.id || field.name)"\n [formControl]="formControl"\n [placeholder]="field.placeholder"\n [allowDuplicate]="false"\n [addOnTab]="true"\n [addOnBlur]="true"\n (onAdd)="field.onAdd ? field.onAdd($event) : null"\n (onRemove)="field.onRemove ? field.onRemove($event) : null"\n (onChipClick)="field.onChipClick ? field.onChipClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n</p-chips>\n'})],e)}(),mo=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),ae([t.Input()],n.prototype,"field",void 0),ae([t.Input()],n.prototype,"formControl",void 0),n=ae([t.Component({template:'<div class="ui-inputgroup">\n <span\n *ngIf="field.numberLocaleOptions.currencySymbol"\n class="ui-inputgroup-addon">\n {{ field.numberLocaleOptions.currencySymbol }}\n </span>\n <input\n *ngIf="!field.mask"\n type="text"\n [id]="(field.id || field.name)"\n [name]="field.name"\n [formControl]="formControl"\n sNumberInput\n [precision]="isFunction(field.precision) ? trigger(field.precision) : field.precision"\n [scale]="isFunction(field.scale) ? trigger(field.scale) : field.scale"\n [decimalSeparator]="field.numberLocaleOptions.decimalSeparator"\n [thousandsSeparator]="field.numberLocaleOptions.thousandsSeparator"\n [alignTo]="field.alignTo"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n pInputText\n [autocomplete]="field.browserAutocomplete ? \'on\' : \'off\'"\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="field.onFocus ? field.onFocus($event): null" />\n <p-inputMask\n *ngIf="field.mask"\n type="text"\n [inputId]="(field.id || field.name)"\n [name]="field.name"\n [formControl]="formControl"\n [mask]="field.mask"\n [placeholder]="field.placeholder"\n slotChar="_"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500"\n styleClass="mousetrap"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event): null"\n (onComplete)="field.onComplete ? field.onComplete($event) : null"\n (onInput)="field.onInput ? field.onInput($event) : null" >\n </p-inputMask>\n</div>\n'})],n)}(hn),fo=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),ae([t.Input()],n.prototype,"field",void 0),ae([t.Input()],n.prototype,"formControl",void 0),n=ae([t.Component({template:'<s-file-upload [id]="(field.id || field.name)" [accept]="field.accept" [files]="field.files" [multiple]="field.multiple"\n [chooseLabel]="field.chooseLabel" [removeLabel]="field.removeLabel" [cancelLabel]="field.cancelLabel"\n [successTooltip]="field.successTooltip" (uploadHandler)="field.onUploadFile($event, field)"\n (removeFile)="field.onRemoveFile($event, field)" (cancelUpload)="field.onCancelUpload($event, field)"\n (downloadFile)="field.onDownloadFile($event, field)" [formGroup]="formControl"> \n</s-file-upload>\n'})],n)}(hn),ho=function(){function e(){}return ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),e=ae([t.Component({template:'<div\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500">\n <s-lookup\n [id]="(field.id || field.name)"\n [multiple]="field.multiple"\n [formControl]="formControl"\n [lookupSuggestions]="field.lookupSuggestions"\n [dataKey]="field.dataKey"\n [placeholder]="field.placeholder"\n [searchFields]="field.searchFields"\n [searchGridFields]="field.searchGridFields"\n [searchGridData]="field.gridData"\n (onLookupRequest)="field.onLookupRequest($event)"\n (onSearchRequest)="field.onSearchRequest($event)"\n [lookupDisplayField]="field.lookupDisplayField"\n [searchTotalRecords]="field.searchTotalRecords"\n [searchTotalRecordsLabel]="field.searchTotalRecordsLabel"\n [searchTitle]="field.searchTitle"\n [selectLabel]="field.selectLabel"\n [searchEmptyTitle]="field.searchEmptyTitle"\n [filterLabel]="field.filterLabel"\n [filterTitle]="field.filterTitle"\n [clearLabel]="field.clearLabel"\n [cancelLabel]="field.cancelLabel"\n [emptyFieldLabel]="field.emptyFieldLabel "\n (onSelect)="field.onSelect($event)"\n (onUnselect)="field.onUnselect($event)"\n (onClear)="field.onClear ? field.onClear($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n [lookupAppendTo]="field.appendTo"\n [lookupEmptyMessage]="field.emptyMessage"\n [recordLabel]="field.recordLabel"\n [recordsLabel]="field.recordsLabel"\n [autocompleteForceSelection]="field.autocompleteForceSelection">\n </s-lookup>\n</div>\n'})],e)}(),go=function(n){function o(){var e=null!==n&&n.apply(this,arguments)||this;return e.onInput=new t.EventEmitter,e.onFocus=new t.EventEmitter,e.onComplete=new t.EventEmitter,e.ngUnsubscribe=new r.Subject,e}return ie(o,n),o.prototype.ngOnInit=function(){var e=this;this.onFocus.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onFocus&&e.field.onFocus(t)})),this.onInput.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onInput&&e.field.onInput(t)})),this.onComplete.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onComplete&&e.field.onComplete(t)}))},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},Object.defineProperty(o.prototype,"numberAlignmentOption",{get:function(){return e.NumberAlignmentOption},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"fieldType",{get:function(){return e.FieldType},enumerable:!0,configurable:!0}),ae([t.Input()],o.prototype,"field",void 0),ae([t.Input()],o.prototype,"formControl",void 0),ae([t.Output()],o.prototype,"onInput",void 0),ae([t.Output()],o.prototype,"onFocus",void 0),ae([t.Output()],o.prototype,"onComplete",void 0),o=ae([t.Component({template:'<p-inputMask\n *ngIf="field.mask; else noMask"\n type="text"\n [inputId]="(field.id || field.name)"\n [name]="field.name"\n [mask]="isFunction(field.mask) ? field.mask() : field.mask"\n [placeholder]="field.placeholder"\n slotChar="_"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500"\n styleClass="mousetrap"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n (onFocus)="onFocus.next($event)"\n (onComplete)="onComplete.next($event)"\n (onInput)="onInput.next($event)"\n [formControl]="formControl" >\n</p-inputMask>\n<ng-template #noMask>\n <ng-container>\n <div class="ui-inputgroup">\n <ng-container *ngIf="field.leftAddon">\n <span class="ui-inputgroup-addon">\n <span *ngIf="field.leftAddon.label">{{field.leftAddon.label}}</span>\n <span *ngIf="!field.leftAddon.label" [ngClass]="field.leftAddon.icon"></span>\n </span>\n </ng-container>\n\n <ng-container *ngTemplateOutlet="field.type === fieldType.Double && field.alignTo === numberAlignmentOption.LEFT ? localizedNumber : input"></ng-container>\n\n <ng-container *ngIf="field.rightAddon">\n <span class="ui-inputgroup-addon">\n <span *ngIf="field.rightAddon.label">{{field.rightAddon.label}}</span>\n <span *ngIf="!field.rightAddon.label" [ngClass]="field.rightAddon.icon"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n<ng-template #input>\n <input\n [id]="(field.id || field.name)"\n type="text"\n [name]="field.name"\n sNumberInput\n [precision]="isFunction(field.precision) ? trigger(field.precision) : field.precision"\n [scale]="isFunction(field.scale) ? trigger(field.scale) : field.scale"\n [decimalSeparator]="field.numberLocaleOptions.decimalSeparator"\n [thousandsSeparator]="field.numberLocaleOptions.thousandsSeparator"\n [alignTo]="field.alignTo"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n pInputText\n [autocomplete]="field.browserAutocomplete ? \'on\' : \'off\'"\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="onFocus.next($event)"\n [formControl]="formControl" />\n</ng-template>\n<ng-template #localizedNumber>\n <input\n [id]="(field.id || field.name)"\n type="text"\n [name]="field.name"\n sLocalizedNumberInput\n [precision]="isFunction(field.precision) ? trigger(field.precision) : field.precision"\n [decimalSeparator]="field.numberLocaleOptions.decimalSeparator"\n [thousandsSeparator]="field.numberLocaleOptions.thousandsSeparator"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n pInputText\n [autocomplete]="field.browserAutocomplete ? \'on\' : \'off\'"\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="onFocus.next($event)"\n [formControl]="formControl" />\n</ng-template>\n',encapsulation:t.ViewEncapsulation.None,styles:["s-number-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-number-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]})],o)}(hn),bo=function(){function e(){this.onClick=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.ngUnsubscribe=new r.Subject}return e.prototype.ngOnInit=function(){var e=this;this.onFocus.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onFocus&&e.field.onFocus(t)})),this.onClick.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onClick&&e.field.onClick(t)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),ae([t.Output()],e.prototype,"onClick",void 0),ae([t.Output()],e.prototype,"onFocus",void 0),e=ae([t.Component({template:'<ng-container *ngIf="field.verticalAlignment;else horizontalAlignment">\n <div class="ui-g">\n <div\n *ngFor="let option of field.options; let i = index"\n class="ui-g-12">\n <ng-container\n [ngTemplateOutlet]="radioButton"\n [ngTemplateOutletContext]="{option: option, index: i}">\n </ng-container>\n </div>\n </div>\n</ng-container>\n\n<ng-template #horizontalAlignment>\n <div class="ui-g">\n <ng-container\n *ngFor="let option of field.options; let i = index"\n [ngTemplateOutlet]="radioButton"\n [ngTemplateOutletContext]="{option: option, index: i}">\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #radioButton let-option="option" let-i="index">\n <p-radioButton\n [name]="field.name"\n [value]="option.value"\n [label]="option.label"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-\' + i"\n [sTooltip]="field.tooltip"\n (onClick)="onClick.next($event)"\n (onFocus)="onFocus.next($event)"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton>\n</ng-template>\n'})],e)}(),vo=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),ae([t.Input()],n.prototype,"field",void 0),ae([t.Input()],n.prototype,"formControl",void 0),n=ae([t.Component({template:'<p-dropdown\n *ngIf="!field.multiple"\n [inputId]="(field.id || field.name)"\n [name]="field.name"\n [options]="isFunction(field.options) ? field.options() : field.options"\n [placeholder]="field.placeholder || \' \'"\n [formControl]="formControl"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500"\n [showClear]="field.showClear"\n dataKey="{{field.dataKey}}"\n optionLabel="{{field.optionLabel}}"\n [autoDisplayFirst]="field.autoDisplayFirst"\n [appendTo]="field.appendTo || \'body\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onChange)="field.onChange ? field.onChange($event) : null">\n</p-dropdown>\n<p-multiSelect\n *ngIf="field.multiple"\n [formControl]="formControl"\n [name]="field.name"\n [inputId]="(field.id || field.name)"\n [options]="isFunction(field.options) ? field.options() : field.options"\n [defaultLabel]="field.placeholder"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [emptyFilterMessage]="field.emptyMessage || \'Nenhum registro encontrado\'"\n [showDelay]="500"\n [selectedItemsLabel]="field.multipleSelectedLabel"\n [appendTo]="field.appendTo || \'body\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onChange)="field.onChange ? field.onChange($event) : null">\n</p-multiSelect>\n\n'})],n)}(hn),yo=function(){function e(){}return ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),e=ae([t.Component({template:'<textarea\n [id]="(field.id || field.name)"\n *ngIf="!field.keyFilter"\n pInputTextarea\n [rows]="field.rows"\n [cols]="field.cols"\n [formControl]="formControl"\n style="resize: vertical;"\n [ngStyle]="field.style"\n></textarea>\n<textarea\n [id]="(field.id || field.name)"\n *ngIf="field.keyFilter"\n pInputTextarea\n [rows]="field.rows"\n [cols]="field.cols"\n [formControl]="formControl"\n style="resize: vertical;"\n [pKeyFilter]="field.keyFilter"\n [ngStyle]="field.style"\n></textarea>\n'})],e)}(),xo=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.onInput=new t.EventEmitter,n.onFocus=new t.EventEmitter,n.onComplete=new t.EventEmitter,n.ngUnsubscribe=new r.Subject,n}return ie(n,e),n.prototype.ngOnInit=function(){var e=this;this.onFocus.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onFocus&&e.field.onFocus(t)})),this.onInput.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onInput&&e.field.onInput(t)})),this.onComplete.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onComplete&&e.field.onComplete(t)}))},n.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},ae([t.Input()],n.prototype,"field",void 0),ae([t.Input()],n.prototype,"formControl",void 0),ae([t.Output()],n.prototype,"onInput",void 0),ae([t.Output()],n.prototype,"onFocus",void 0),ae([t.Output()],n.prototype,"onComplete",void 0),n=ae([t.Component({template:'<p-inputMask\n *ngIf="field.mask; else noMask"\n [type]="field.inputType || \'text\'"\n [inputId]="(field.id || field.name)"\n [name]="field.name"\n [mask]="isFunction(field.mask) ? field.mask() : field.mask"\n [placeholder]="field.placeholder"\n slotChar="_"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500"\n styleClass="mousetrap"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n (onFocus)="onFocus.next($event)"\n (onComplete)="onComplete.next($event)"\n (onInput)="onInput.next($event)"\n [formControl]="formControl">\n</p-inputMask>\n<ng-template #noMask>\n <ng-container>\n <div class="ui-inputgroup">\n <ng-container *ngIf="field.leftAddon">\n <span class="ui-inputgroup-addon">\n <span *ngIf="field.leftAddon.label">{{field.leftAddon.label}}</span>\n <span *ngIf="!field.leftAddon.label" [ngClass]="field.leftAddon.icon"></span>\n </span>\n </ng-container>\n <ng-container *ngTemplateOutlet="field.keyFilter ? inputKeyFilter : input"></ng-container>\n <ng-container *ngIf="field.rightAddon">\n <span class="ui-inputgroup-addon">\n <span *ngIf="field.rightAddon.label">{{field.rightAddon.label}}</span>\n <span *ngIf="!field.rightAddon.label" [ngClass]="field.rightAddon.icon"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n<ng-template #input>\n <input\n [type]="field.inputType || \'text\'"\n [id]="(field.id || field.name)"\n [name]="field.name"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n [maxLength]="field.maxLength"\n pInputText\n [autocomplete]="field.browserAutocomplete ? \'on\' : \'off\'"\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="onFocus.next($event)"\n (input)="onInput.next($event)"\n [formControl]="formControl"\n [ngStyle]="field.style" />\n</ng-template>\n<ng-template #inputKeyFilter>\n <input\n #inputText\n [type]="field.inputType || \'text\'"\n [id]="(field.id || field.name)"\n [name]="field.name"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n [maxLength]="field.maxLength"\n pInputText\n [autocomplete]="field.browserAutocomplete ? \'on\' : \'off\'"\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="onFocus.next($event)"\n (input)="onInput.next($event)"\n [pKeyFilter]="field.keyFilter"\n [formControl]="formControl"\n [ngStyle]="field.style" />\n</ng-template>\n',encapsulation:t.ViewEncapsulation.None,styles:["s-text-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-text-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]})],n)}(hn),wo=function(){function e(){}return e.prototype.ngOnInit=function(){},e.prototype.getErrorMessages=function(e){return e?this.isFunction(e)?e():e:this.errorMessages},e.prototype.isFunction=function(e){return e instanceof Function},ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"config",void 0),ae([t.Input()],e.prototype,"group",void 0),ae([t.Input()],e.prototype,"errorMessages",void 0),e=ae([t.Component({template:'\n <div class="ui-fluid" [formGroup]="group">\n <div class="ui-g">\n <ng-container *ngFor="let field of config.fields">\n <div [ngClass]="field.gridClass" *ngIf="field.visible()">\n <label\n [for]="field.name"\n [ngClass]="{ \'required\': field.required() }"\n *sInfoSign="field.infoSign"\n >\n {{ field.label }}\n </label>\n <ng-container *sDynamicForm="{ id: id, config: field, group: group}"></ng-container>\n <s-control-errors [form]="group" [control]="group.controls[field.name]"\n [errorMessages]="getErrorMessages(field.errorMessages)"></s-control-errors>\n </div>\n </ng-container>\n </div>\n '})],e)}(),Co=function(){function e(){}return ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"config",void 0),ae([t.Input()],e.prototype,"group",void 0),ae([t.Input()],e.prototype,"errorMessages",void 0),e=ae([t.Component({selector:"s-fieldset",template:'\n <p-fieldset [toggleable]="true" (onBeforeToggle)="config.beforeToggle ? config.beforeToggle($event) : \'null\'"\n (onAfterToggle)="config.afterToggle ? config.afterToggle($event) : \'null\'">\n <p-header>{{config.header}}</p-header>\n <ng-container *ngFor="let conf of config.configs">\n <ng-container *sDynamicForm="{ id: id, config: conf, group: group, errorMessages: errorMessages }"></ng-container>\n </ng-container>\n </p-fieldset>\n '})],e)}(),Io=function(){function e(){}return ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"config",void 0),ae([t.Input()],e.prototype,"group",void 0),ae([t.Input()],e.prototype,"errorMessages",void 0),e=ae([t.Component({template:'\n <h3 class="sds-section-title">{{config.header}}</h3>\n <ng-container *ngFor="let conf of config.configs">\n <ng-container *sDynamicForm="{ id: id, config: conf, group: group, errorMessages: errorMessages }"></ng-container>\n </ng-container>\n '})],e)}(),_o=function(){function e(){}return e.prototype.ngOnInit=function(){},e.prototype.getErrorMessages=function(e){return e?this.isFunction(e)?re(re({},this.errorMessages),e()):re(re({},this.errorMessages),e):this.errorMessages},e.prototype.isFunction=function(e){return e instanceof Function},ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"fields",void 0),ae([t.Input()],e.prototype,"form",void 0),ae([t.Input()],e.prototype,"errorMessages",void 0),e=ae([t.Component({selector:"s-dynamic-field",template:'\n <div class="ui-fluid" [formGroup]="form">\n <div class="ui-g">\n <ng-container *ngFor="let field of fields">\n <div [ngClass]="field.gridClass" *ngIf="field.visible()">\n <span *ngIf="field.label"><label [for]="field.name"\n [ngClass]="{ \'required\': field.required() }" *sInfoSign="field.infoSign">{{ field.label }}</label></span>\n <ng-container *sDynamicForm="{ id: id, config: field, group: form}"></ng-container>\n <s-control-errors [form]="form" [control]="form.controls[field.name]"\n [errorMessages]="getErrorMessages(field.errorMessages)"></s-control-errors>\n <ng-template *ngIf="field?.bottomTemplate" [ngTemplateOutlet]="field.bottomTemplate"></ng-template>\n </div>\n </ng-container>\n </div>\n </div>\n '})],e)}();!function(e){e.Row="Row"}(to||(to={})),function(e){e.Fieldset="Fieldset",e.Section="Section"}(no||(no={}));var ko,To,So=function(n){function o(){var e=null!==n&&n.apply(this,arguments)||this;return e.onInput=new t.EventEmitter,e.onFocus=new t.EventEmitter,e.onComplete=new t.EventEmitter,e.ngUnsubscribe=new r.Subject,e}return ie(o,n),o.prototype.ngOnInit=function(){var e=this;this.onFocus.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onFocus&&e.field.onFocus(t)})),this.onInput.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onInput&&e.field.onInput(t)})),this.onComplete.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onComplete&&e.field.onComplete(t)}))},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},Object.defineProperty(o.prototype,"fieldType",{get:function(){return e.FieldType},enumerable:!0,configurable:!0}),ae([t.Input()],o.prototype,"field",void 0),ae([t.Input()],o.prototype,"formControl",void 0),ae([t.Output()],o.prototype,"onInput",void 0),ae([t.Output()],o.prototype,"onFocus",void 0),ae([t.Output()],o.prototype,"onComplete",void 0),o=ae([t.Component({template:'<p-inputMask\n *ngIf="field.mask; else noMask"\n type="text"\n [inputId]="(field.id || field.name)"\n [name]="field.name"\n [mask]="isFunction(field.mask) ? field.mask() : field.mask"\n [placeholder]="field.placeholder"\n slotChar="_"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500"\n styleClass="mousetrap"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n (onFocus)="onFocus.next($event)"\n (onComplete)="onComplete.next($event)"\n (onInput)="onInput.next($event)"\n [formControl]="formControl">\n</p-inputMask>\n\n<ng-template #noMask>\n <ng-container>\n <div class="ui-inputgroup">\n <ng-container *ngIf="field.leftAddon">\n <span class="ui-inputgroup-addon">\n <span *ngIf="field.leftAddon.label">{{field.leftAddon.label}}</span>\n <span *ngIf="!field.leftAddon.label" [ngClass]="field.leftAddon.icon"></span>\n </span>\n </ng-container>\n\n <input\n [id]="(field.id || field.name)"\n type="text"\n [name]="field.name"\n sBignumberInput\n [allowNegative]="field.allowNegative"\n [precision]="isFunction(field.precision) ? trigger(field.precision) : field.precision"\n [scale]="isFunction(field.scale) ? trigger(field.scale) : field.scale"\n [decimalSeparator]="field.numberLocaleOptions.decimalSeparator"\n [thousandsSeparator]="field.numberLocaleOptions.thousandsSeparator"\n [alignTo]="field.alignTo"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n pInputText\n [autocomplete]="field.browserAutocomplete ? \'on\' : \'off\'"\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="onFocus.next($event)"\n [formControl]="formControl" />\n <ng-container *ngIf="field.rightAddon">\n <span class="ui-inputgroup-addon">\n <span *ngIf="field.rightAddon.label">{{field.rightAddon.label}}</span>\n <span *ngIf="!field.rightAddon.label" [ngClass]="field.rightAddon.icon"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>',encapsulation:t.ViewEncapsulation.None,styles:["s-number-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-number-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]})],o)}(hn),Eo=function(){function e(){}return ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),e=ae([t.Component({template:'<div class="ui-g">\n <p-inputSwitch\n [id]="(field.id || field.name)"\n [name]="field.name"\n [formControl]="formControl"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n (onChange)="field.onChange ? field.onChange($event) : null">\n </p-inputSwitch>\n</div>'})],e)}(),Fo=function(){function e(){this.onInput=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.onComplete=new t.EventEmitter,this.ngUnsubscribe=new r.Subject}return e.prototype.ngOnInit=function(){var e=this;this.onFocus.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onFocus&&e.field.onFocus(t)})),this.onInput.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onInput&&e.field.onInput(t)})),this.onComplete.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onComplete&&e.field.onComplete(t)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),ae([t.Output()],e.prototype,"onInput",void 0),ae([t.Output()],e.prototype,"onFocus",void 0),ae([t.Output()],e.prototype,"onComplete",void 0),e=ae([t.Component({template:'<input\n type="password"\n [id]="(field.id || field.name)"\n [name]="field.name"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n [maxLength]="field.maxLength"\n pInputText\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="onFocus.next($event)"\n (input)="onInput.next($event)"\n [formControl]="formControl"\n [ngStyle]="field.style"\n [sPasswordStrength]="field.passwordStrength"\n [psDescription]="field.passwordStrengthOptions?.description"\n [psWeakTitle]="field.passwordStrengthOptions?.weakTitle"\n [psMediumTitle]="field.passwordStrengthOptions?.mediumTitle"\n [psStrongTitle]="field.passwordStrengthOptions?.strongTitle"\n [psValidation]="field.passwordStrengthOptions?.validation" />',encapsulation:t.ViewEncapsulation.None,styles:["s-text-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-text-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]})],e)}(),Lo=function(e){var t=e.group,n=e.errorMessages;this.group=t,this.errorMessages=n},Mo=function(t){function n(e){var n=e.group,o=e.field,i=e.errorMessages,r=t.call(this,{group:n,errorMessages:i})||this;return r.field=o,r.setFieldPropertiesByType(),r}return ie(n,t),n.prototype.setFieldPropertiesByType=function(){this.field.type!==e.FieldType.Integer&&this.field.type!==e.FieldType.Double||(this.field.numberLocaleOptions.currencySymbol="")},n.prototype.createComponent=function(e,t){var n=e.resolveComponentFactory(this.getComponent()),o=t.createComponent(n);return o.instance.field=this.field,o.instance.formControl=this.group.controls[this.field.name],o.instance.errorMessages=this.errorMessages,this.setVariablesByType(o),o},n.prototype.setVariablesByType=function(t){this.field.type==e.FieldType.Time&&(t.instance.timeOnly=!0),[e.FieldType.LocalDateTime,e.FieldType.DateTime,e.FieldType.Time].includes(this.field.type)&&(t.instance.showTime=!0)},n.prototype.updateVariables=function(e){e.instance.field=this.field,e.instance.formControl=this.group.controls[this.field.name],this.setVariablesByType(e)},n.prototype.getComponent=function(){switch(this.field.type){case e.FieldType.Autocomplete:return lo;case e.FieldType.Binary:case e.FieldType.String:return xo;case e.FieldType.Boolean:return"switch"===this.field.representedBy?Eo:po;case e.FieldType.Chips:return uo;case e.FieldType.Date:case e.FieldType.DateTime:case e.FieldType.LocalDateTime:case e.FieldType.Time:return co;case e.FieldType.Number:case e.FieldType.Integer:case e.FieldType.Double:return So;case e.FieldType.Enum:return vo;case e.FieldType.Lookup:return ho;case e.FieldType.Money:return mo;case e.FieldType.Radio:return bo;case e.FieldType.Text:return yo;case e.FieldType.Password:return Fo;case e.FieldType.Blob:return fo;case e.FieldType.Custom:return this.field.CustomFieldComponentClass;default:throw new Error("Trying to use an unsupported type ("+this.field.type+").")}},n}(Lo),Oo=function(e){function t(t){var n=t.group,o=t.config,i=t.errorMessages,r=e.call(this,{group:n,errorMessages:i})||this;return r.config=o,r}return ie(t,e),t.prototype.createComponent=function(e,t){var n=e.resolveComponentFactory(this.getComponent()),o=t.createComponent(n);return o.instance.config=this.config,o.instance.group=this.group,o},t.prototype.updateVariables=function(e){e.instance.structure=this.config,e.instance.group=this.group},t.prototype.getComponent=function(){switch(this.config.type){case no.Fieldset:return Co;case no.Section:return Io;default:throw new Error("Trying to use an unsupported type ("+this.config.type+").")}},t}(Lo),Ro=function(e){function t(t){var n=t.group,o=t.config,i=t.errorMessages,r=e.call(this,{group:n,errorMessages:i})||this;return r.config=o,r}return ie(t,e),t.prototype.createComponent=function(e,t){var n=e.resolveComponentFactory(this.getComponent()),o=t.createComponent(n);return o.instance.config=this.config,o.instance.group=this.group,o.instance.errorMessages=this.errorMessages,o},t.prototype.updateVariables=function(e){e.instance.config=this.config,e.instance.group=this.group},t.prototype.getComponent=function(){switch(this.config.type){case to.Row:return wo;default:throw new Error("Trying to use an unsupported type ("+this.config.type+").")}},t}(Lo),Do=function(){function n(e,t){this.resolver=e,this.container=t}return Object.defineProperty(n.prototype,"sDynamicForm",{set:function(e){var t=e.id,n=e.config,o=e.group,i=e.errorMessages;this.id=t,this.config=n,this.group=o,this.errorMessages=i},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){if(this.isField())!this.config.id&&this.id&&(this.config.id=this.id+"-"+this.config.name),this.directiveConfig=new Mo({group:this.group,field:this.config,errorMessages:this.errorMessages});else if(this.isStructure())this.directiveConfig=new Oo({group:this.group,config:this.config,errorMessages:this.errorMessages});else{if(!this.isGrid())throw new Error("Trying to use an unsupported type ("+this.config.type+").");this.directiveConfig=new Ro({group:this.group,config:this.config,errorMessages:this.errorMessages})}this.component=this.directiveConfig.createComponent(this.resolver,this.container),this.component.instance.id=this.id,this.component.instance.errorMessages=this.errorMessages},n.prototype.ngOnChanges=function(){this.component&&(this.directiveConfig.updateVariables(this.component),this.component.instance.errorMessages=this.errorMessages)},n.prototype.isField=function(){return e.FieldType[this.config.type]},n.prototype.isStructure=function(){return no[this.config.type]},n.prototype.isGrid=function(){return to[this.config.type]},n.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ViewContainerRef}]},ae([t.Input()],n.prototype,"sDynamicForm",null),n=ae([t.Directive({selector:"[sDynamicForm]"})],n)}(),Ao=function(){function e(){this.sLongPressDelay=500,this.sLongPress=new t.EventEmitter,this.mouseUp=new r.Subject,this.mouseDown=new r.Subject,this.ngUnsubscribe=new r.Subject}return e.prototype.onMouseUp=function(e){this.mouseUp.next(e)},e.prototype.onMouseDown=function(e){this.mouseDown.next(e)},e.prototype.ngOnInit=function(){var e=this;this.mouseDown.pipe(a.debounceTime(this.sLongPressDelay),a.takeUntil(this.mouseUp),a.repeat(),a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){return e.sLongPress.emit(t)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},ae([t.Input()],e.prototype,"sLongPressDelay",void 0),ae([t.Output()],e.prototype,"sLongPress",void 0),ae([t.HostListener("mouseup",["$event"]),t.HostListener("touchend",["$event"])],e.prototype,"onMouseUp",null),ae([t.HostListener("mousedown",["$event"]),t.HostListener("touchstart",["$event"])],e.prototype,"onMouseDown",null),e=ae([t.Directive({selector:"[sLongPress]"})],e)}(),Po=function(){function e(){this.onDoubleClick=new t.EventEmitter,this._timeout=null,this._DOUBLE_CLICK_DELAY=500}return e.prototype.onClick=function(e){this.handleOnClickEvent(e)},e.prototype.handleOnClickEvent=function(e){var t=this;this._timeout?(this.clearTimeout(),this.onDoubleClick.emit(e)):this._timeout=setTimeout((function(){return t.clearTimeout()}),this._DOUBLE_CLICK_DELAY)},e.prototype.clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},ae([t.Output()],e.prototype,"onDoubleClick",void 0),ae([t.HostListener("click",["$event"])],e.prototype,"onClick",null),e=ae([t.Directive({selector:"[sDoubleClick]"})],e)}(),No=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[Ao,Po],exports:[Ao,Po]})],e)}();(ko=e.PasswordStrengths||(e.PasswordStrengths={})).VeryWeak="Very_weak",ko.Weak="weak",ko.Medium="medium",ko.Strong="strong",(To=e.PasswordStrengthPositions||(e.PasswordStrengthPositions={})).Top="top",To.Right="right",To.Left="left";var zo,Vo=function(){function n(){this.weakTitle="Fraca",this.mediumTitle="Médio",this.strongTitle="Forte",this.position=e.PasswordStrengthPositions.Right,this.left=0,this.top=0,this.visible=!1}return n.prototype.ngOnInit=function(){this.title=this.weakTitle},n.prototype.setPasswordStrengthPosition=function(){var t=document.querySelector(".password-strength");switch(this.position){case e.PasswordStrengthPositions.Top:t.classList.add("password-strength--top");break;case e.PasswordStrengthPositions.Right:t.classList.add("password-strength--right");break;case e.PasswordStrengthPositions.Left:t.classList.add("password-strength--left")}},n.prototype.updateIndicators=function(t){var n,o=document.querySelector("#strength-indicator-1"),i=document.querySelector("#strength-indicator-2"),r=document.querySelector("#strength-indicator-3"),a=[],s=[o,i,r];switch(t){case e.PasswordStrengths.VeryWeak:this.title=this.weakTitle;break;case e.PasswordStrengths.Weak:this.title=this.weakTitle,n="strength-indicator--weak",a.push(o);break;case e.PasswordStrengths.Medium:this.title=this.mediumTitle,n="strength-indicator--medium",a.push(o),a.push(i);break;case e.PasswordStrengths.Strong:this.title=this.strongTitle,n="strength-indicator--strong",a.push(o),a.push(i),a.push(r)}s.forEach((function(e){e.classList.remove("strength-indicator--weak","strength-indicator--medium","strength-indicator--strong")})),a.forEach((function(e){e.classList.add(n)}))},ae([t.Input()],n.prototype,"weakTitle",void 0),ae([t.Input()],n.prototype,"mediumTitle",void 0),ae([t.Input()],n.prototype,"strongTitle",void 0),ae([t.Input()],n.prototype,"description",void 0),n=ae([t.Component({template:'<div\n class="password-strength"\n [ngStyle]="{\n \'left\': left + \'px\',\n \'top\': top + \'px\'\n }"\n [ngClass]="[\'password-strength--\' + position]">\n <span class="title">{{ title }}</span>\n <div class="strength-indicators">\n <span class="strength-indicator" id="strength-indicator-1"></span>\n <span class="strength-indicator" id="strength-indicator-2"></span>\n <span class="strength-indicator" id="strength-indicator-3"></span>\n </div>\n <span class="content">{{ description }}</span>\n</div>',styles:['.password-strength{position:fixed;transform:translateX(-50%);background-color:#fff;border-radius:2px;box-shadow:0 0 5px 1px #ccc;padding:10px;width:232px;z-index:99999}.password-strength::after{content:"";position:absolute}.password-strength .title{font-family:"Open Sans",sans-serif;font-size:14px;font-weight:700;line-height:150%}.password-strength .strength-indicators{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:10px 0}.password-strength .strength-indicators .strength-indicator{background-color:#ccc;border-radius:2px;display:inline-block;height:3px;width:64px}.password-strength .strength-indicators .strength-indicator--weak{background-color:#c13018}.password-strength .strength-indicators .strength-indicator--medium{background-color:#fcbf10}.password-strength .strength-indicators .strength-indicator--strong{background-color:#0c9348}.password-strength .content{font-family:"Open Sans",sans-serif;font-size:12px;font-weight:400;line-height:150%}.password-strength--top{transform:translate(-50%,-100%)}.password-strength--top::after{top:100%;right:calc(50% - 4px);border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #fff}.password-strength--right{transform:translateY(-50%)}.password-strength--right::after{bottom:calc(50% - 8px);left:-8px;border-top:8px solid transparent;border-right:8px solid #fff;border-bottom:8px solid transparent}.password-strength--left{transform:translate(-100%,-50%)}.password-strength--left::after{bottom:calc(50% - 8px);right:-8px;border-top:8px solid transparent;border-left:8px solid #fff;border-bottom:8px solid transparent}']})],n)}(),Bo=function(){function n(t,n,o,i){this.elementRef=t,this.appRef=n,this.componentFactoryResolver=o,this.injector=i,this.enabled=!0,this.position=e.PasswordStrengthPositions.Right,this.componentRef=null}return n.prototype.ngOnInit=function(){this.validateProperties()},n.prototype.onFocus=function(){var t,n,o,i=null!==(t=this.elementRef.nativeElement.value)&&void 0!==t?t:"";i?(this.createPasswordStrength(),null===(n=this.componentRef)||void 0===n||n.instance.updateIndicators(this.validation(i))):null===(o=this.componentRef)||void 0===o||o.instance.updateIndicators(e.PasswordStrengths.VeryWeak)},n.prototype.onBlur=function(){this.destroyPasswordStrength()},n.prototype.createPasswordStrength=function(){if(this.enabled&&null===this.componentRef){var e=this.componentFactoryResolver.resolveComponentFactory(Vo);this.componentRef=e.create(this.injector),this.appRef.attachView(this.componentRef.hostView);var t=this.componentRef.hostView.rootNodes[0];document.body.appendChild(t),this.setPasswordStrengthComponentProperties(),this.showPasswordStrength()}},n.prototype.showPasswordStrength=function(){null!==this.componentRef&&(this.componentRef.instance.visible=!0)},n.prototype.setPasswordStrengthComponentProperties=function(){if(null!=this.componentRef){this.componentRef.instance.position=this.position,this.componentRef.instance.weakTitle=this.weakTitle,this.componentRef.instance.mediumTitle=this.mediumTitle,this.componentRef.instance.strongTitle=this.strongTitle,this.componentRef.instance.description=this.description;for(var t=this.elementRef.nativeElement.getBoundingClientRect(),n=t.top,o=t.right,i=t.bottom,r=t.left,a=i-n,s=o-r,l=!1,p=[];!l;){if(p.includes(e.PasswordStrengthPositions.Top)&&p.includes(e.PasswordStrengthPositions.Right)&&p.includes(e.PasswordStrengthPositions.Left))throw this.destroyPasswordStrength(),new Error("No space to show password strength");switch(this.position){case e.PasswordStrengthPositions.Top:var c=n,d=document.body.clientWidth-o,u=r;if(c<=a+150||d<50||u<50){this.position=e.PasswordStrengthPositions.Right,p.push(e.PasswordStrengthPositions.Top);break}this.componentRef.instance.top=Math.round(n-20),this.componentRef.instance.left=Math.round(s/2+r),l=!0;break;case e.PasswordStrengthPositions.Right:if((d=document.body.clientWidth-o)<=s+150){this.position=e.PasswordStrengthPositions.Left,p.push(e.PasswordStrengthPositions.Right);break}this.componentRef.instance.top=Math.round(n+a/2),this.componentRef.instance.left=Math.round(o+20),l=!0;break;case e.PasswordStrengthPositions.Left:if((u=r)<=s+150){this.position=e.PasswordStrengthPositions.Top,p.push(e.PasswordStrengthPositions.Left);break}this.componentRef.instance.top=Math.round(n+a/2),this.componentRef.instance.left=Math.round(r-20),l=!0}this.componentRef.instance.position=this.position}}},n.prototype.validateProperties=function(){if(this.validation=this.validation||this.defaultValidator,!this.description)throw new Error("Description is required")},n.prototype.destroyPasswordStrength=function(){null!==this.componentRef&&(this.appRef.detachView(this.componentRef.hostView),this.componentRef.destroy(),this.componentRef=null)},n.prototype.defaultValidator=function(t){var n=0,o=[new RegExp("(?=.*\\d)"),new RegExp("(?=.*[a-z])"),new RegExp("(?=.*[A-Z])"),new RegExp("(?=.*[!@#$%&*.\\-=+^~])")];return t.length>=6&&n++,o.forEach((function(e){e.test(t)&&n++})),n<1?e.PasswordStrengths.VeryWeak:n<4?e.PasswordStrengths.Weak:n<5?e.PasswordStrengths.Medium:e.PasswordStrengths.Strong},n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ApplicationRef},{type:t.ComponentFactoryResolver},{type:t.Injector}]},ae([t.Input("sPasswordStrength")],n.prototype,"enabled",void 0),ae([t.Input("psValidation")],n.prototype,"validation",void 0),ae([t.Input("psPosition")],n.prototype,"position",void 0),ae([t.Input("psWeakTitle")],n.prototype,"weakTitle",void 0),ae([t.Input("psMediumTitle")],n.prototype,"mediumTitle",void 0),ae([t.Input("psStrongTitle")],n.prototype,"strongTitle",void 0),ae([t.Input("psDescription")],n.prototype,"description",void 0),ae([t.HostListener("keyup"),t.HostListener("focus")],n.prototype,"onFocus",null),ae([t.HostListener("blur")],n.prototype,"onBlur",null),n=ae([t.Directive({selector:"[sPasswordStrength]"})],n)}(),Uo=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[Vo,Bo],exports:[Bo]})],e)}(),jo=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,I.FormsModule,I.ReactiveFormsModule,Nn,B.InputTextModule,A.CheckboxModule,c.CalendarModule,V.InputMaskModule,N.DropdownModule,Qt,Yn,Gn,vt,Ht,S.AutoCompleteModule,H.MultiSelectModule,D.ButtonModule,ye,G.PanelModule,E.DialogModule,q.RadioButtonModule,F.TableModule,kn,Hn,k.HotkeyModule,P.ChipsModule,we,U.InputTextareaModule,q.RadioButtonModule,j.KeyFilterModule,z.FieldsetModule,Zn,Ln,so,Bn,Wn,k.HotkeyModule.forRoot(),No,$.InputSwitchModule,Uo],declarations:[lo,po,co,uo,mo,Cn,_o,Do,Co,fo,fn,ho,go,So,bo,wo,Io,vo,yo,xo,Eo,Fo],exports:[Cn,fn],entryComponents:[lo,po,co,uo,mo,Co,fo,ho,go,So,bo,wo,Io,vo,yo,xo,Fo,Eo],providers:[k.HotkeysService]})],e)}(),Ho=function(){function e(e){this.http=e}return e.prototype.getCustomFields=function(e,t,n,o){var i={entityId:{domain_:e,service_:t,id:n}};return this.http.post(o,i)},e.prototype.getFileLocationUrl=function(e,t){return this.http.post(t,e)},e.prototype.uploadTempFile=function(e,t){return this.http.put(e,t,{reportProgress:!0,observe:"events",headers:{"Content-Type":t.type}})},e.prototype.requestAccess=function(e,t){return this.http.post(t,{objectId:e})},e.prototype.getFile=function(e){return this.http.get(e,{responseType:"blob"})},e.ctorParameters=function(){return[{type:_.HttpClient}]},e=ae([t.Injectable()],e)}();!function(e){e.String="String",e.Boolean="Boolean",e.Integer="Integer",e.Double="Double",e.Date="Date",e.DateTime="DateTime",e.LocalDateTime="LocalDateTime",e.Time="Time",e.Money="Money",e.Blob="Blob",e.Binary="Binary",e.Any="Any",e.Enum="Enum"}(zo||(zo={}));var $o=M,Go=function(){function n(e,t,n,o,i){this.customFieldsService=e,this.localeService=t,this.sanitizer=n,this.translateService=o,this.controlContainer=i,this.customFieldsEndpoint="platform/field_customization/queries/getEntity",this.fileLocationEndpoint="platform/field_customization/actions/requestUpload",this.requestAccessEndpoint="platform/field_customization/actions/requestAccess",this.fields=[],this.ready=!1,this.ngUsubscribe=new r.Subject}var o;return o=n,Object.defineProperty(n.prototype,"parentForm",{get:function(){return this.controlContainer.control},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentControl",{get:function(){return this.parentForm.get("custom")},enumerable:!0,configurable:!0}),n.prototype.registerOnChange=function(e){var t=this;this.onChange=e,this.formGroup.valueChanges.subscribe((function(){return t.onChange(t.parseFieldsValues())}))},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.writeValue=function(e){if(this.ready){var t=this.parseValuesForFields(e);this.formGroup.patchValue(t),this.value=t,this.createFilesIfSetFormValuesAfterInit()}else this.formGroup.patchValue(e||{}),this.value=e},n.prototype.setDisabledState=function(e){e?this.formGroup.disable():this.formGroup.enable()},n.prototype.getCustomFields=function(){return this.entityObject&&this.entityObject.entity_?r.of(this.entityObject):this.customFieldsService.getCustomFields(this.domain,this.service,this.entity,this.customFieldsEndpoint)},n.prototype.ngOnInit=function(){var e=this;if(!this.domain)throw new Error("You need to specify the custom-fields domain!");if(!this.service)throw new Error("You need to specify the custom-fields service!");if(!this.entity)throw new Error("You need to specify the custom-fields entity!");this.formGroup=new I.FormGroup({});var t=[this.getCustomFields(),this.localeService.get()];r.forkJoin(t).pipe(a.takeUntil(this.ngUsubscribe),a.finalize((function(){e.formGroup.markAsPristine(),e.parentControl.markAsPristine()}))).subscribe((function(t){var n=de(t,2),o=n[0],i=n[1],r={};if(r[zo.String]={},r[zo.Boolean]={defaultValue:!1},r[zo.Integer]={},r[zo.Double]={defaultMask:""},r[zo.Money]={},r[zo.Date]={},r[zo.DateTime]={},r[zo.LocalDateTime]={},r[zo.Time]={},r[zo.Blob]={},r[zo.Enum]={},r[zo.Binary]={},r[zo.Any]={},o&&o.entity_){var a=o.entity_,s=a.active,l=a.fields;s&&(l.filter((function(e){return e.customizable&&e.customization&&e.customization.active})).forEach((function(t){var n=e.getFormField(t,i),o=t.type;t.type===zo.Blob&&e.value&&e.value[n.name]&&e.createBlobToFileUpload(n);var a=t.customization.validationRegex,s=[zo.Boolean,zo.Money,zo.Date,zo.DateTime,zo.LocalDateTime,zo.Time],l=[];a&&!s.includes(o)&&l.push(I.Validators.pattern(a)),o!==zo.Integer||n.mask||l.push(I.Validators.pattern(/^\-?\d*$/)),n.required()&&l.push(I.Validators.required);var p=new I.FormControl({value:r[o].defaultValue,disabled:e.formGroup.disabled},l);e.formGroup.addControl(n.name,p),e.fields.push(n)})),e.createFieldCustomization(l),e.formGroup.patchValue(e.parseValuesForFields(e.value)),e.ready=!0)}}))},n.prototype.ngOnDestroy=function(){this.ngUsubscribe.next(),this.ngUsubscribe.complete()},n.prototype.validate=function(){var e=this,t={};return Object.keys(this.formGroup.controls).forEach((function(n){var o=e.formGroup.get(n).errors;o&&(t[n]=o)})),t},n.prototype.parseValuesForFields=function(t){var n=re({},t);return this.fields.forEach((function(o){var i=o.type,r=o.name,a=t&&t[r];if(i===e.FieldType.Boolean){var s="string"==typeof a,l=!s&&"boolean"!=typeof a;n[r]=l?null:s?"true"===a:a}if(a)switch(i){case e.FieldType.Date:case e.FieldType.DateTime:n[r]=$o(a).toDate();break;case e.FieldType.LocalDateTime:n[r]=$o(a,"YYYY-MM-DD[T]HH:mm:ss.SSS").toDate();break;case e.FieldType.Time:n[r]=$o(a,"HH:mm:ss").toDate()}})),n},n.prototype.createFilesIfSetFormValuesAfterInit=function(){var t=this;this.hasUploaded||this.fields.filter((function(t){return t.type===e.FieldType.Blob})).forEach((function(e){t.formGroup.get(e.name).value&&t.createBlobToFileUpload(e)}))},n.prototype.parseFieldsValues=function(){var t=this,n={};return this.fields.forEach((function(o){var i=o.type,r=o.name,a=o.mask,s=o.scale,l=t.formGroup.get(r).value;if(l)switch(i){case e.FieldType.Number:a&&(l=new ne(l).toFixed(s).toString());break;case e.FieldType.Date:l=$o(l).format("YYYY-MM-DD");break;case e.FieldType.DateTime:l=$o(l).format();break;case e.FieldType.LocalDateTime:l=$o(l).format("YYYY-MM-DD[T]HH:mm:ss.SSS");break;case e.FieldType.Time:l=$o(l).format("HH:mm:ss")}null===l||Number.isNaN(l)?t.isTypeNumberOrEnum(i)&&(n[r]=o.multiple?[]:null):n[r]=l})),this.hasBlob&&(n.fieldCustomization=this.formGroup.get("fieldCustomization").value),n},n.prototype.isTypeNumberOrEnum=function(t){return[e.FieldType.Number,e.FieldType.Enum].includes(t)},n.prototype.getFormField=function(t,n){var o,i,r;switch(t.type){case zo.Blob:r=this.getBlobParameters();break;case zo.Boolean:r=this.getBooleanParameters();break;case"Enumeration":case zo.Enum:t.type=e.FieldType.Enum,r=this.getEnumParameters(t);break;case zo.Money:r={type:e.FieldType.Number,leftAddon:{label:null!==(i=null===(o=null==n?void 0:n.number)||void 0===o?void 0:o.currencySymbol)&&void 0!==i?i:"R$"}};break;case zo.Double:r={type:e.FieldType.Number};break;case zo.Integer:r={type:e.FieldType.Number,scale:0};break;default:r={}}return new un(re({name:t.id,label:t.customization.label,tooltip:t.customization.tooltip,infoSign:t.customization.infoSign,type:t.type,mask:t.customization.mask,required:function(){return t.customization.mandatory},calendarOptions:n.calendar,currencyOptions:n.number},r))},n.prototype.getEnumParameters=function(e){return{showClear:!0,multiple:e.customization.customEnumeration.multiple,options:e.customization.customEnumeration.values.map((function(e){return{label:e.value,value:e.key}}))}},n.prototype.getBooleanParameters=function(){return{optionsLabel:{true:this.getTranslateLabel("true_label"),false:this.getTranslateLabel("false_label"),empty:this.getTranslateLabel("empty_label")}}},n.prototype.getBlobParameters=function(){var e=this;return{size:{sm:12,md:12,lg:12,xl:12},accept:"image/*, application/*, text/*",chooseLabel:this.getTranslateLabel("choose_label"),removeLabel:this.getTranslateLabel("remove_label"),cancelLabel:this.getTranslateLabel("cancel_label"),successTooltip:this.getTranslateLabel("success_tooltip"),multiple:!1,onUploadFile:function(t,n){e.hasUploaded=!0,e.uploadFile(t,n)},onRemoveFile:function(t,n){e.removeFile(t,n)},onCancelUpload:function(t,n){e.cancelUpload(t,n)},onDownloadFile:function(t,n){e.downloadFile(t,n)}}},n.prototype.createFieldCustomization=function(e){this.hasBlob=!!e.filter((function(e){return e.type===zo.Blob})).length,this.hasBlob&&this.formGroup.addControl("fieldCustomization",new I.FormArray([new I.FormGroup({domain:new I.FormControl(this.domain),service:new I.FormControl(this.service),entity:new I.FormControl(this.entity),toDelete:new I.FormControl({value:{},disabled:!1}),toInsert:new I.FormControl({value:{},disabled:!1})})]))},n.prototype.createBlobToFileUpload=function(e){var t=this.value[e.name]?this.value[e.name]:this.formGroup.get(e.name).value,n={name:t.substring(t.lastIndexOf("/")+1),objectId:t,savedFile:!0};e.files=[n]},n.prototype.downloadFile=function(e,t){var n=this,o=e.index,i=e.anchor,r=t.files[o];r.objectURL?i.nativeElement.click():this.customFieldsService.requestAccess(r.objectId,this.requestAccessEndpoint).pipe(a.takeUntil(this.ngUsubscribe)).subscribe((function(e){var s=e.fileName,l=e.uri;n.customFieldsService.getFile(l).pipe(a.takeUntil(n.ngUsubscribe)).subscribe((function(e){var a=new File([e],s);a.objectURL=n.sanitizer.bypassSecurityTrustUrl(l),i.nativeElement.setAttribute("href",l),a.objectId=r.objectId,a.savedFile=!0,t.files[o]=a,t.files=ue(t.files),i.nativeElement.click()}))}))},n.prototype.uploadFile=function(e,t){var n=this,o=e.files,i=this.fields.find((function(e){return e.name===t.name}));i.files&&i.files.length&&this.removeFile({file:i.files[0]},i),i.files=o;for(var s=function(e){var t=o[e];t.savedFile||t.progress||(t.isUploading=!0,l.formGroup.get(i.name).setValidators(function(e){return function(){return e.isUploading?{isUploading:!0}:null}}(t)),l.formGroup.get(i.name).updateValueAndValidity(),l.customFieldsService.getFileLocationUrl({domain:l.domain,service:l.service,entityName:l.entity,field:i.name,fileName:t.name},l.fileLocationEndpoint).pipe(a.takeUntil(l.ngUsubscribe),a.catchError((function(t){return r.of(n.defaltCatchError(i,t,e))}))).subscribe((function(o){var s=o.location,l=o.version,p=o.objectId;t.version=l,t.objectId=p,t.uploadSubscribe=n.customFieldsService.uploadTempFile(s,t).pipe(a.takeUntil(n.ngUsubscribe),a.catchError((function(t){return r.of(n.defaltCatchError(i,t,e))})),a.finalize((function(){t.isUploading=!1}))).subscribe((function(e){var o,r=e.type;if(n.uploadCanceled)n.uploadCanceled&&r===_.HttpEventType.Response&&(n.uploadCanceled=!1);else if(r===_.HttpEventType.UploadProgress)t.progress=100*Math.round(e.loaded/e.total);else if(r===_.HttpEventType.Response){t.objectURL=n.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(t));var a={objectId:p,name:t.name,version:t.version},s=n.formGroup.get("fieldCustomization").value[0].toInsert;n.formGroup.get("fieldCustomization").value[0].toInsert=re(re({},s),((o={})[i.name]=a,o)),n.formGroup.get(i.name).setValue(t.objectId+"/"+t.name),n.formGroup.get(i.name).clearValidators(),n.formGroup.get(i.name).updateValueAndValidity(),i.files=[t]}})),i.files=[t]})))},l=this,p=0;p<o.length;p++)s(p)},n.prototype.removeFile=function(e,t){var n,o=e.file,i=this.fields.find((function(e){return e.name===t.name}));if(i.files=[],o.objectId){var r=o.savedFile?""+o.objectId:o.objectId+"/"+o.name,a=this.formGroup.get("fieldCustomization").value[0].toDelete;delete this.formGroup.get("fieldCustomization").value[0].toInsert[i.name],this.formGroup.get("fieldCustomization").value[0].toDelete=re(re({},a),((n={})[i.name]=ue(a[i.name]||[],[r]),n))}this.formGroup.get(i.name).clearValidators(),this.formGroup.get(i.name).setValue(""),this.formGroup.get(i.name).updateValueAndValidity()},n.prototype.cancelUpload=function(e,t){this.uploadCanceled=!0;var n=this.fields.find((function(e){return e.name===t.name}));n.files[e].uploadSubscribe.unsubscribe(),n.files=[],delete this.formGroup.get("fieldCustomization").value[0].toInsert[n.name],this.formGroup.get(n.name).clearValidators(),this.formGroup.get(n.name).setValue(""),this.formGroup.get(n.name).updateValueAndValidity()},n.prototype.defaltCatchError=function(e,t,n){var o,i=e.files;return i[n].error=t,i[n].isUploading=!1,e.files=ue(i),this.formGroup.get(e.name).setValidators([(o=i[n],function(){return o.error?{uploadError:!0}:null})]),this.formGroup.get(e.name).updateValueAndValidity(),r.throwError(new Error("error in upload file. Details: "+t.message))},n.prototype.getTranslateLabel=function(e){return this.translateService.instant(this.domain+"."+this.service+"."+e)},n.ctorParameters=function(){return[{type:Ho},{type:Lt},{type:K.DomSanitizer},{type:y.TranslateService},{type:I.ControlContainer,decorators:[{type:t.Optional}]}]},ae([t.Input()],n.prototype,"domain",void 0),ae([t.Input()],n.prototype,"service",void 0),ae([t.Input()],n.prototype,"entity",void 0),ae([t.Input()],n.prototype,"invalidErrorLabel",void 0),ae([t.Input()],n.prototype,"entityObject",void 0),ae([t.Input()],n.prototype,"customFieldsEndpoint",void 0),ae([t.Input()],n.prototype,"fileLocationEndpoint",void 0),ae([t.Input()],n.prototype,"requestAccessEndpoint",void 0),ae([t.Input()],n.prototype,"requiredErrorMessage",void 0),n=o=ae([t.Component({selector:"s-custom-fields",template:'<s-dynamic-form [fields]="fields" [form]="formGroup" [errorMessages]="{pattern: invalidErrorLabel, required: requiredErrorMessage}"></s-dynamic-form>',providers:[{provide:I.NG_VALUE_ACCESSOR,useExisting:o,multi:!0},{provide:I.NG_VALIDATORS,useExisting:o,multi:!0}]}),se(4,t.Optional())],n)}();var qo,Wo=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,I.FormsModule,I.ReactiveFormsModule,_.HttpClientModule,Ht,jo,y.TranslateModule],declarations:[Go],exports:[Go],providers:[Ho,y.TranslateService]})],e)}(),Ko=function(){function e(){}return e.prototype.ngAfterViewInit=function(){this.table.bindDocumentEditListener=this.bindDocument.bind(this)},e.prototype.isFromOverlayTrigger=function(e){return e.path.some((function(e){return e.className&&e.className.includes("ng-trigger-overlayAnimation")}))},e.prototype.isFromModal=function(e){return e.path.some((function(e){return e.className&&e.className.includes("s-lookup")}))},e.prototype.bindDocument=function(){var e=this;this.table.documentEditListener||(this.table.documentEditListener=function(t){e.isFromOverlayTrigger(t)||e.isFromModal(t)||!e.table.editingCell||e.table.editingCellClick||!e.table.isEditingCellValid()||(p.DomHandler.removeClass(e.table.editingCell,"ui-editing-cell"),e.table.editingCell=null,e.table.unbindDocumentEditListener()),e.table.editingCellClick=!1},document.addEventListener("click",this.table.documentEditListener))},ae([t.Input()],e.prototype,"table",void 0),e=ae([t.Directive({selector:"p-table[sEditableOverlay]"})],e)}(),Yo=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[Ko],exports:[Ko]})],e)}();(qo=e.ThumbnailSize||(e.ThumbnailSize={})).Small="small",qo.Medium="medium",qo.Large="large";var Xo,Zo=function(){function e(){}return e.prototype.getBinaryFile=function(e){var t=this;return new Promise((function(n){var o=t.getOrientation.bind(t),i=new XMLHttpRequest;i.addEventListener("load",(function(){if(4===i.readyState&&(200==i.status||0===i.status)){var e=o(i.response);i=null,n(e)}})),i.addEventListener("error",(function(){throw i=null,new Error("Não foi possível carregar a imagem")})),i.open("GET",e.src,!0),i.responseType="arraybuffer",i.send(null)}))},e.prototype.getOrientation=function(e){var t=new DataView(e);if(65496!=t.getUint16(0,!1))return-2;for(var n=t.byteLength,o=2;o<n;){var i=t.getUint16(o,!1);if(o+=2,65505==i){if(1165519206!=t.getUint32(o+=2,!1))return-1;var r=18761==t.getUint16(o+=6,!1);o+=t.getUint32(o+4,r);var a=t.getUint16(o,r);o+=2;for(var s=0;s<a;s++)if(274==t.getUint16(o+12*s,r))return t.getUint16(o+12*s+8,r)}else{if(65280!=(65280&i))break;o+=t.getUint16(o,!1)}}return-1},e=ae([t.Injectable()],e)}(),Jo=function(){function n(t){this.thumbnailService=t,this.fallback=!1,this.id="s-thumbnail-"+o.nextId++,this.size=e.ThumbnailSize.Medium,this.iconClass="far fa-image",this.hasAction=!1,this.actionIconClass="fas fa-camera",this.isTile=!1,this.isBrand=!1,this.ngUnsubscribe=new r.Subject}var o;return o=n,n.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},n.prototype.ngAfterViewInit=function(){var e=this;this.imgEl&&this.imgEl.nativeElement.addEventListener("load",(function(){r.from(e.thumbnailService.getBinaryFile(e.imgEl.nativeElement)).pipe(a.takeUntil(e.ngUnsubscribe)).subscribe((function(t){return e.orientation=t}))}))},n.nextId=0,n.ctorParameters=function(){return[{type:Zo}]},ae([t.ViewChild("img",{static:!1})],n.prototype,"imgEl",void 0),ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"size",void 0),ae([t.Input()],n.prototype,"imageSource",void 0),ae([t.Input()],n.prototype,"imageFallback",void 0),ae([t.Input()],n.prototype,"imageAlt",void 0),ae([t.Input()],n.prototype,"iconClass",void 0),ae([t.Input()],n.prototype,"hasAction",void 0),ae([t.Input()],n.prototype,"actionIconClass",void 0),ae([t.Input()],n.prototype,"isTile",void 0),ae([t.Input()],n.prototype,"isBrand",void 0),n=o=ae([t.Component({selector:"s-thumbnail",template:'<div\n [id]="id"\n class="thumbnail-container thumbnail-container--{{size}}"\n [ngClass]="{\n \'thumbnail-container--with-action\': hasAction,\n \'thumbnail-container--brand\': isBrand\n }">\n <div\n [id]="id + \'-image-container\'"\n *ngIf="imageSource || imageFallback"\n class="image-container"\n [ngClass]="{\n \'image-container--rounded\': !isBrand\n }">\n <img\n #img\n [id]="id + \'-image\'"\n (error)="fallback = true"\n [src]="imageSource"\n [alt]="imageAlt"\n *ngIf="!fallback"\n [ngClass]="{\n \'smallThumbnail\': isTile,\n \'exif-orientation-2\': orientation == 2,\n \'exif-orientation-3\': orientation == 3,\n \'exif-orientation-4\': orientation == 4,\n \'exif-orientation-5\': orientation == 5,\n \'exif-orientation-6\': orientation == 6,\n \'exif-orientation-7\': orientation == 7,\n \'exif-orientation-8\': orientation == 8\n }"/>\n\n <img\n #img\n [id]="id + \'-image-fallback\'"\n (error)="imageFallback = undefined"\n [src]="imageFallback"\n [alt]="imageAlt"\n *ngIf="fallback && imageFallback"\n [ngClass]="{\n \'smallThumbnail\': isTile,\n \'exif-orientation-2\': orientation == 2,\n \'exif-orientation-3\': orientation == 3,\n \'exif-orientation-4\': orientation == 4,\n \'exif-orientation-5\': orientation == 5,\n \'exif-orientation-6\': orientation == 6,\n \'exif-orientation-7\': orientation == 7,\n \'exif-orientation-8\': orientation == 8\n }"/>\n\n <i\n *ngIf="fallback && !imageFallback"\n ngClass="far fa-image"\n class="fallback-img-color">\n </i>\n </div>\n <div\n [id]="id + \'-action-icon-container\'"\n *ngIf="hasAction"\n class="action-icon-container action-icon-container--{{size}}">\n <span\n [id]="id + \'-action-icon\'"\n [class]="actionIconClass"\n aria-hidden="true">\n </span>\n </div>\n <div\n [id]="id + \'-icon-container\'"\n *ngIf="!imageSource && !imageFallback"\n class="icon-container icon-container--{{size}}"\n [ngClass]="{\'image-container--rounded\': !isBrand}">\n <span\n [id]="id + \'-icon\'"\n [class]="iconClass"\n aria-hidden="true">\n </span>\n </div>\n\n <ng-content></ng-content>\n</div>\n',styles:[":host{display:inline-block}.thumbnail-container{color:#fff;position:relative;text-align:center}.thumbnail-container--large{font-size:50px;height:100px;width:100px}.thumbnail-container--large.thumbnail-container--brand{width:200px}.thumbnail-container--medium{font-size:40px;height:70px;width:70px}.thumbnail-container--medium.thumbnail-container--brand{width:140px}.thumbnail-container--small{font-size:22px;height:40px;width:40px}.thumbnail-container--small.thumbnail-container--brand{width:80px}.thumbnail-container--with-action{cursor:pointer}.action-icon-container{background-color:#428bca;border-radius:50%;bottom:0;position:absolute;right:0}.action-icon-container--large,.action-icon-container--medium{font-size:10pt;height:25px;padding:3px;width:25px}.action-icon-container--small{font-size:6pt;height:16px;padding:2px;width:16px}.icon-container,.image-container{-ms-flex-align:center;align-items:center;height:100%;overflow:hidden;width:100%}.icon-container--rounded,.image-container--rounded{border-radius:50%}.smallThumbnail{height:40px!important}.icon-container{background-color:#ccc;color:#fff}.icon-container--large{line-height:98px}.icon-container--medium{line-height:68px}.icon-container--small{line-height:38px}.image-container{-ms-flex-align:center;align-items:center;background-color:#ccc;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.image-container img{width:100%}.image-container img.exif-orientation-2{transform:rotateY(180deg)}.image-container img.exif-orientation-3{transform:rotate(180deg)}.image-container img.exif-orientation-4{transform:rotate(180deg) rotateY(180deg)}.image-container img.exif-orientation-5{transform:rotate(270deg) rotateY(180deg)}.image-container img.exif-orientation-6{transform:rotate(90deg)}.image-container img.exif-orientation-7{transform:rotate(90deg) rotateY(180deg)}.image-container img.exif-orientation-8{transform:rotate(270deg)}.fallback-img-color{color:#fff}"]})],n)}();(Xo=e.GlobalSearchSizeEnum||(e.GlobalSearchSizeEnum={})).STANDARD="STANDARD",Xo.MEDIUM="MEDIUM",Xo.SMALL="SMALL";var Qo,ei=function(){function n(){this.id="s-global-search-dropdown-item-"+o.nextId++,this.size=e.GlobalSearchSizeEnum.STANDARD,this.buttonClick=new t.EventEmitter}var o;return o=n,n.prototype.isStandardSize=function(){return this.size===e.GlobalSearchSizeEnum.STANDARD},n.prototype.isMediumSize=function(){return this.size===e.GlobalSearchSizeEnum.MEDIUM},n.prototype.isSmallSize=function(){return this.size===e.GlobalSearchSizeEnum.SMALL},n.prototype.getImageSize=function(){return this.isStandardSize()?"medium":"small"},n.nextId=0,ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"primaryLabel",void 0),ae([t.Input()],n.prototype,"secondaryEmptyLabel",void 0),ae([t.Input()],n.prototype,"tertiaryEmptyLabel",void 0),ae([t.Input()],n.prototype,"imageSource",void 0),ae([t.Input()],n.prototype,"imageAlt",void 0),ae([t.Input()],n.prototype,"iconClass",void 0),ae([t.Input()],n.prototype,"secondaryLabel",void 0),ae([t.Input()],n.prototype,"tertiaryLabel",void 0),ae([t.Input()],n.prototype,"size",void 0),ae([t.Input()],n.prototype,"template",void 0),ae([t.Output()],n.prototype,"buttonClick",void 0),ae([t.ContentChild(Jo,{static:!0})],n.prototype,"thumbnailComponent",void 0),ae([t.ViewChild(t.TemplateRef,{static:!0})],n.prototype,"content",void 0),n=o=ae([t.Component({selector:"s-global-search-dropdown-item",template:'<ng-template>\n <div class="{{isSmallSize() ? \'ui-g container\' : \'container\'}}">\n <ng-content select="s-thumbnail"></ng-content>\n <s-thumbnail [id]="id + \'-thumbnail\'"\n *ngIf="!thumbnailComponent && (imageSource || iconClass) && !isSmallSize()" [imageSource]="imageSource"\n [imageAlt]="imageAlt || primaryLabel" [iconClass]="iconClass" [size]="getImageSize()"></s-thumbnail>\n\n <div class="global-search-item__container {{!isSmallSize() ? \'global-search-item__container--width-60\' : \'\'}}">\n <div #titleTemplate>\n <ng-content select="[titleTemplate]"></ng-content>\n </div>\n <s-button styleClass="no-padding" class="{{isSmallSize() ? \'ui-g-6 no-padding\' : \'\'}}" [id]="id + \'-title\'"\n *ngIf="!titleTemplate.children.length" priority="link" [pTooltip]="primaryLabel" [label]="primaryLabel"\n size="small" (onClick)="buttonClick.emit($event)">\n </s-button>\n\n <div #labelTemplate>\n <ng-content select="[labelTemplate]"></ng-content>\n </div>\n <span [id]="id + \'-label\'" [ngClass]="{\'ui-g-6 global-search-item__text-align--right\': isSmallSize(), \'global-search-item__italic\' : !secondaryLabel}"\n class="label" *ngIf="!labelTemplate.children.length"\n [pTooltip]="secondaryLabel" tooltipPosition="top" showDelay="500">{{ secondaryLabel ? secondaryLabel : secondaryEmptyLabel }}</span>\n\n <div #descriptionTemplate>\n <ng-content select="[descriptionTemplate]"></ng-content>\n </div>\n <span [id]="id + \'-description\'" class="description"\n [ngClass]="{\'global-search-item__italic\' : !secondaryLabel}"\n *ngIf=" !descriptionTemplate.children.length && !isMediumSize() && !isSmallSize()"\n [pTooltip]="tertiaryLabel" tooltipPosition="top" showDelay="500">{{ tertiaryLabel ? tertiaryLabel : tertiaryEmptyLabel }}</span>\n </div>\n <div class="global-search-item__container--width-40 global-search__dropdown--template" *ngIf="!isSmallSize()">\n <ng-container *ngTemplateOutlet="template"></ng-container>\n </div>\n </div>\n</ng-template>\n',styles:[".container{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:100%;border-bottom:1px solid #ccc;padding:15px 5px;margin:0 10px}::ng-deep .no-padding{padding:0!important;min-width:0!important}::ng-deep .s-button-with-text{min-width:0!important}.global-search-item__italic{font-style:italic}.global-search-item__container{margin-left:10px;width:100%}.global-search-item__container,.global-search-item__container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.global-search-item__container .label{color:#333;display:block}.global-search-item__container .description{color:#999;display:block}.global-search-item__container--width-60{width:60%}.global-search-item__container--width-40{width:40%}.global-search-item__text-align--right{text-align:right;padding:2px 0 0 15px}.global-search__dropdown--template{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:right!important}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.global-search-item__container{-ms-flex:1;flex:1}}@media (max-width:767px){.global-search-item__container,.global-search-item__container span{white-space:normal}}.global-search-item__container:only-child{margin-left:0}"]})],n)}(),ti=function(){function e(e){this.cdr=e,this.id="s-global-search-"+ei.nextId++,this.delay=500,this.isLoading=!1,this.showFooter=!0,this.onSearch=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.onShowMore=new t.EventEmitter,this.wasSearched=!1,this.isModalLoading=!1,this.expanded=!0}return e.prototype.onChange=function(){var e=this,t=this.search;setTimeout((function(){e.search===t&&(e.canShowGlobalSearchActive(),e.onSearch.emit(e.search))}),this.delay)},e.prototype.focusIn=function(){this.onFocus.emit(!0)},e.prototype.focusOut=function(){this.onFocus.emit(!1)},e.prototype.showMore=function(){this.onShowMore.emit()},e.prototype.removeActiveClassByGlobalSearch=function(){En.removeClass(this.globalSearch,"global-search__input-active")},e.prototype.close=function(){this.search=null,this.wasSearched=!1,this.dropdownItens=null,this.isModalLoading=!1,this.removeActiveClassByGlobalSearch()},e.prototype.canShowGlobalSearchActive=function(){this.wasSearched=!!this.search,this.search?En.addClass(this.globalSearch,"global-search__input-active"):(this.removeActiveClassByGlobalSearch(),this.close()),this.cdr.detectChanges()},e.nextId=0,e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},ae([t.ViewChild("globalSearch",{static:!1})],e.prototype,"globalSearch",void 0),ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"delay",void 0),ae([t.Input()],e.prototype,"totalItensLabel",void 0),ae([t.Input()],e.prototype,"showMoreLabel",void 0),ae([t.Input()],e.prototype,"placeholder",void 0),ae([t.Input()],e.prototype,"isLoading",void 0),ae([t.Input()],e.prototype,"totalElements",void 0),ae([t.Input()],e.prototype,"emptyTitle",void 0),ae([t.Input()],e.prototype,"emptyDescription",void 0),ae([t.Input()],e.prototype,"emptyIcon",void 0),ae([t.Input()],e.prototype,"showFooter",void 0),ae([t.ContentChildren(ei)],e.prototype,"dropdownItens",void 0),ae([t.Output()],e.prototype,"onSearch",void 0),ae([t.Output()],e.prototype,"onFocus",void 0),ae([t.Output()],e.prototype,"onShowMore",void 0),e=ae([t.Component({selector:"s-global-search",template:'<div class="ui-inputgroup">\n <input #globalSearch class="global-search__input" [(ngModel)]="search" (ngModelChange)="onChange()" pInputText\n [placeholder]="placeholder" (focus)="focusIn()" (blur)="focusOut()">\n <span class="ui-inputgroup-addon global-search__span"><em class="fas fa-search"></em></span>\n <div class="global-search__modal" *ngIf="wasSearched">\n <div *sLoadingState="isLoading && !isModalLoading" class="global-search__loader">\n <div class="global-search__container" *ngIf="dropdownItens && dropdownItens.length > 0 || isLoading">\n <div *ngIf="dropdownItens && dropdownItens.length > 0">\n <div class="global-search__modal--total-itens-title">\n <span class="ui-g-11 no-space">{{totalItensLabel}}</span>\n <span class="ui-g-1 no-space global-search__modal--total-itens-title-icon" (click)="close()"><em\n class="fas fa-times"></em></span>\n </div>\n <div class="no-space global-search__dropdown--itens"\n [@expandableContent]="expanded">\n <ng-container *ngFor="let item of dropdownItens">\n <div class="s-object-card-field no-space global-search__dropdown--itens-container">\n <ng-container *ngTemplateOutlet="item.content"></ng-container>\n </div>\n </ng-container>\n </div>\n <div *ngIf="showFooter" class="ui-g-12 global-search__modal--footer">\n <s-button class="global-search__show-more" (click)="showMore()" priority="link">\n {{showMoreLabel}}\n </s-button>\n </div>\n </div>\n </div>\n <s-empty-state *ngIf="(!dropdownItens || dropdownItens.length==0) && !isLoading" [title]="emptyTitle"\n [description]="emptyDescription" ngClass="global-search__empty-state--icon"\n [iconClass]="(emptyIcon ? emptyIcon : \'fas fa-search\')">\n </s-empty-state>\n </div>\n </div>\n <div *ngIf="wasSearched" class="global-search__background" (click)="close()"></div>\n</div>\n',animations:[C.trigger("expandableContent",[C.state("*",C.style({height:"0"})),C.state("false",C.style({height:"0"})),C.state("true",C.style({height:"*"})),C.transition("* => true",C.animate("200ms ease-out")),C.transition("false <=> true",C.animate("200ms ease-out"))])],styles:[".global-search__input{border-radius:20px 0 0 20px;width:136px;cursor:pointer;padding:0 0 0 15px;transition:.3s}.ui-inputtext{min-height:25px!important;height:25px!important}.global-search__span{transition:.3s;background:0 0!important;border-left:none;border-radius:0 20px 20px 0!important;padding:1px 15px 0 0!important;height:25px!important}.global-search__input:active,.global-search__input:focus{width:466px;cursor:default;transition:.3s;border-top:1px solid #428bca;border-left:1px solid #428bca;border-bottom:1px solid #428bca}.global-search__input:active,.global-search__input:focus+.global-search__span{transition:.3s;border-left:none;border-top:1px solid #428bca!important;border-right:1px solid #428bca!important;border-bottom:1px solid #428bca!important}.global-search__input-active{width:466px;cursor:default;transition:.3s}.global-search__modal{box-shadow:0 2px 8px 0 rgba(0,0,0,.4);border-radius:5px;width:500px;background:#fff;position:absolute;margin-top:60px;z-index:6;min-height:50px}::ng-deep .global-search__loader{border-radius:5px!important;width:100%}.global-search__container{min-height:50px;width:100%}.global-search__modal--total-itens-title{padding:15px;color:#333;border-bottom:1px solid #ccc;font-weight:600;height:50px}.global-search__modal--footer{height:50px;border-top:1px solid #ccc}.global-search__dropdown--itens{max-height:510px;overflow:auto}.global-search__dropdown--itens-container:hover{background:#dbe0e4}.global-search__modal--total-itens-title-icon{text-align:right;cursor:pointer}.global-search__background{background:rgba(0,0,0,.4);width:100%;height:calc(100vh - 70px);position:absolute;left:0;margin-top:50px;z-index:5;cursor:pointer}.no-space{padding:0;margin:0}.global-search__show-more{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}body .global-search__show-more--button{color:#428bca!important}.modal{position:absolute;left:1%;width:98%;height:calc(100vh - 90px)}.global-search__empty-state--icon{margin:42px 134px}::ng-deep .global-search__empty-state--icon .container .icon{font-size:40px}::ng-deep .s-button-priority-link{color:#428bca}@media all and (max-width:900px){.global-search__modal{top:20px;width:98%;left:1%}.global-search__input-active,.global-search__input:active,.global-search__input:focus{position:absolute;width:calc(100% - 70px);left:2%}body .global-search__dropdown--itens{max-height:100%;overflow:auto}}@media all and (max-width:767px){.global-search__modal{top:15px}.global-search__input-active,.global-search__input:active,.global-search__input:focus{width:calc(100% - 55px)}}@media all and (max-width:600px){.global-search__modal--itens{height:calc(100vh - 100px);background:#fff}.global-search__input-active,.global-search__input:active,.global-search__input:focus{position:absolute;width:calc(100% - 53px);left:2%}body .global-search__dropdown--itens{max-height:100%;overflow:auto}.global-search__dropdown--itens{max-height:100%;background:#fff}.global-search__modal--footer{background:#fff;height:50px}.global-search__modal{top:17px;border-radius:0;margin-top:55px;box-shadow:none;left:0;width:100%}}"]})],e)}(),ni=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[Jo],exports:[Jo],providers:[Zo]})],e)}(),oi=function(){function e(e){this.el=e,this.onScroll=new t.EventEmitter}return e.prototype.scroll=function(){this.el.nativeElement.scrollTop>this.el.nativeElement.scrollHeight-this.el.nativeElement.offsetHeight-2&&this.onScroll.emit()},e.ctorParameters=function(){return[{type:t.ElementRef}]},ae([t.Output()],e.prototype,"onScroll",void 0),ae([t.HostListener("scroll")],e.prototype,"scroll",null),e=ae([t.Directive({selector:"[sInfiniteScroll]"})],e)}(),ii=function(){function e(){}return e=ae([t.NgModule({declarations:[oi],imports:[n.CommonModule],exports:[oi]})],e)}(),ri=function(){function e(){}return e=ae([t.NgModule({declarations:[ti,ei],imports:[n.CommonModule,B.InputTextModule,I.FormsModule,I.ReactiveFormsModule,l.TooltipModule,ni,ye,Hn,ii,kn],exports:[ti,ei,l.TooltipModule,ni,ye,Hn,kn],entryComponents:[ti,ei]})],e)}(),ai=function(){function e(){}return e=ae([t.Component({selector:"s-header",template:"<ng-content></ng-content>"})],e)}(),si=function(){function e(){}return e=ae([t.Component({selector:"s-footer",template:"<ng-content></ng-content>"})],e)}(),li=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[ai,si],exports:[ai,si]})],e)}(),pi=function(){function e(){this.id="s-image-cropper-"+n.nextId++,this.visible=!1,this.header="Recortar imagem",this.cropLabel="Recortar",this.selectAnotherLabel="Trocar",this.removeLabel="Remover",this.cancelLabel="Cancelar",this.emptyStateTitle="Selecione uma foto, em seguida você poderá ajustá-la",this.emptyStateActionLabel="Escolher imagem",this.emptyStateIconClass="fa fa-picture-o",this.aspectRatio=NaN,this.rounded=!1,this.allowSelectAnother=!0,this.allowRemove=!0,this.allowCancel=!0,this.visibleChange=new t.EventEmitter,this.changeImage=new t.EventEmitter,this.croppedImage=new t.EventEmitter,this.croppedCanvas=new t.EventEmitter,this.removedImage=new t.EventEmitter,this.cancel=new t.EventEmitter}var n;return n=e,e.prototype.ngOnInit=function(){this.imageSource&&this.initCropper()},e.prototype.ngOnChanges=function(e){e.imageSource&&e.imageSource.currentValue&&this.initCropper()},e.prototype.initCropper=function(){this.cropper&&this.cropper.destroy(),this.image.nativeElement.src=this.imageSource,this.cropper=new Y(this.image.nativeElement,{aspectRatio:this.rounded?1:this.aspectRatio,guides:!1,dragMode:"move",minCropBoxHeight:2,minCropBoxWidth:2,toggleDragModeOnDblclick:!1})},e.prototype.getRoundedCanvas=function(e){var t=document.createElement("canvas"),n=t.getContext("2d"),o=e.width,i=e.height;return t.width=o,t.height=i,n.imageSmoothingEnabled=!0,n.drawImage(e,0,0,o,i),n.globalCompositeOperation="destination-in",n.beginPath(),n.arc(o/2,i/2,Math.min(o,i)/2,0,2*Math.PI,!0),n.fill(),t},e.prototype.onCropImage=function(){if(this.imageSource){var e=this.rounded?this.getRoundedCanvas(this.cropper.getCroppedCanvas()):this.cropper.getCroppedCanvas();this.croppedCanvas.emit(e),this.croppedImage.emit(e.toDataURL())}else this.croppedImage.emit(),this.croppedCanvas.emit();this.visibleChange.emit(!1)},e.prototype.onChangeImage=function(){this.changeImage.emit()},e.prototype.onRemoveImage=function(){this.imageSource=void 0,this.removedImage.emit()},e.prototype.onCancel=function(){this.visibleChange.emit(!1),this.cancel.emit()},e.prototype.onModalVisibleChange=function(e){e||this.onCancel(),this.visibleChange.emit(e)},e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"visible",void 0),ae([t.Input()],e.prototype,"header",void 0),ae([t.Input()],e.prototype,"cropLabel",void 0),ae([t.Input()],e.prototype,"selectAnotherLabel",void 0),ae([t.Input()],e.prototype,"removeLabel",void 0),ae([t.Input()],e.prototype,"cancelLabel",void 0),ae([t.Input()],e.prototype,"emptyStateTitle",void 0),ae([t.Input()],e.prototype,"emptyStateActionLabel",void 0),ae([t.Input()],e.prototype,"emptyStateIconClass",void 0),ae([t.Input()],e.prototype,"aspectRatio",void 0),ae([t.Input()],e.prototype,"rounded",void 0),ae([t.Input()],e.prototype,"allowSelectAnother",void 0),ae([t.Input()],e.prototype,"allowRemove",void 0),ae([t.Input()],e.prototype,"allowCancel",void 0),ae([t.Input()],e.prototype,"imageSource",void 0),ae([t.Output()],e.prototype,"visibleChange",void 0),ae([t.Output()],e.prototype,"changeImage",void 0),ae([t.Output()],e.prototype,"croppedImage",void 0),ae([t.Output()],e.prototype,"croppedCanvas",void 0),ae([t.Output()],e.prototype,"removedImage",void 0),ae([t.Output()],e.prototype,"cancel",void 0),ae([t.ViewChild("image",{static:!0})],e.prototype,"image",void 0),ae([t.ContentChild(ai,{static:!0})],e.prototype,"headerSection",void 0),ae([t.ContentChild(si,{static:!0})],e.prototype,"footerSection",void 0),e=n=ae([t.Component({selector:"s-image-cropper",template:'<div [id]="id">\n <p-dialog\n styleClass="s-image-cropper {{rounded ? \'s-image-cropper--rounded\' : \'\'}}"\n [header]="headerSection ? \'\' : header"\n [visible]="visible"\n (visibleChange)="onModalVisibleChange($event)"\n [modal]="true"\n [blockScroll]="true"\n [draggable]="false"\n [resizable]="false"\n [closeOnEscape]="allowCancel"\n [closable]="allowCancel"\n appendTo="body">\n\n <p-header *ngIf="headerSection">\n <ng-content select="s-header"></ng-content>\n </p-header>\n\n <s-empty-state\n [id]="id + \'-empty-state\'"\n *ngIf="!imageSource"\n [title]="emptyStateTitle"\n [iconClass]="emptyStateIconClass"\n [primaryActionLabel]="emptyStateActionLabel"\n (primaryAction)="onChangeImage()">\n </s-empty-state>\n\n <div [attr.data-hidden]="!imageSource" class="image-container">\n <img\n [id]="id + \'-cropper\'"\n #image\n [src]="imageSource || \'\'"\n alt="cropped image"/>\n </div>\n\n <p-footer>\n <div class="ui-fluid" *ngIf="!footerSection">\n <div class="ui-g button-container">\n\n <div *ngIf="allowCancel" class="ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2">\n <s-button\n [id]="id + \'-cancel-button\'"\n type="button"\n priority="link"\n [label]="cancelLabel"\n (onClick)="onCancel()">\n </s-button>\n </div>\n\n <div *ngIf="imageSource && allowRemove" class="ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2">\n <s-button\n [id]="id + \'-remove-button\'"\n type="button"\n priority="secondary"\n [label]="removeLabel"\n (onClick)="onRemoveImage()">\n </s-button>\n </div>\n\n <div *ngIf="imageSource && allowSelectAnother" class="ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2">\n <s-button\n [id]="id + \'-select-another-button\'"\n type="button"\n priority="secondary"\n [label]="selectAnotherLabel"\n (onClick)="onChangeImage()">\n </s-button>\n </div>\n\n <div class="ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2">\n <s-button\n [id]="id + \'-crop-button\'"\n type="button"\n [label]="cropLabel"\n (onClick)="onCropImage()">\n </s-button>\n </div>\n </div>\n </div>\n\n <ng-content select="s-footer" *ngIf="footerSection"></ng-content>\n </p-footer>\n </p-dialog>\n</div>',encapsulation:t.ViewEncapsulation.None,styles:['/*!\n * Cropper.js v1.4.1\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2018-07-15T09:54:43.167Z\n */.cropper-container{-moz-user-select:none;-ms-touch-action:none;-ms-user-select:none;-webkit-user-select:none;direction:ltr;font-size:0;line-height:0;position:relative;touch-action:none;user-select:none}.cropper-container img{display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:rgba(51,153,255,.75) solid 1px;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.33333%;left:0;top:33.33333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.33333%;top:0;width:33.33333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}','.s-image-cropper{border-radius:0!important;height:80%!important;max-width:100%!important;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column}.s-image-cropper .ui-dialog-content{overflow:hidden;height:auto!important;-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.s-image-cropper .ui-dialog-footer,.s-image-cropper .ui-dialog-header{-ms-flex-negative:0;flex-shrink:0;direction:ltr}.s-image-cropper .image-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100%}.s-image-cropper img{max-width:100%;max-height:100%}.s-image-cropper .button-container{-ms-flex-flow:wrap-reverse;flex-flow:wrap-reverse;-ms-flex-pack:end;justify-content:flex-end}.s-image-cropper .cropper-view-box{outline:#fff dashed 2px}.s-image-cropper .cropper-line{opacity:0}.s-image-cropper .cropper-point{background-color:#fff;opacity:1;height:15px;width:15px;border-radius:50%}.s-image-cropper .cropper-point.point-e{right:-8.5px;top:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-n{top:-8.5px;left:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-w{left:-8.5px;top:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-s{bottom:-8.5px;left:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-ne{right:-8.5px;top:-8.5px}.s-image-cropper .cropper-point.point-nw{left:-8.5px;top:-8.5px}.s-image-cropper .cropper-point.point-sw{left:-8.5px;bottom:-8.5px}.s-image-cropper .cropper-point.point-se{right:-8.5px;bottom:-8.5px}.s-image-cropper--rounded .cropper-face,.s-image-cropper--rounded .cropper-view-box{border-radius:50%}.s-image-cropper--rounded .cropper-view-box{outline:rgba(255,255,255,.3) dashed 1px}.s-image-cropper--rounded .cropper-view-box:after{border:2px dashed #fff;border-radius:50%;content:"";height:100%;left:0;position:absolute;top:0;width:100%}@media (max-width:767px){.s-image-cropper{border:none!important;top:0!important;left:0!important;width:100%!important;height:100%!important}}@media (min-width:768px){.s-image-cropper{width:80%!important}}@media (min-width:1200px){.s-image-cropper{width:60%!important}}']})],e)}(),ci=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,E.DialogModule,ye,kn,li],declarations:[pi],exports:[pi,li],entryComponents:[pi]})],e)}(),di=function(){function e(e,t,n){this.componentFactoryResolver=e,this.appRef=t,this.injector=n}return e.prototype.show=function(e){var t=this;this.activeCropper&&this.destroy(this.activeCropper);var n={componentRef:this.componentFactoryResolver.resolveComponentFactory(pi).create(this.injector),ngUnsubscribe:new r.Subject};this.activeCropper=n,this.appRef.attachView(n.componentRef.hostView);var o=n.componentRef.hostView.rootNodes[0];document.body.appendChild(o),this.configureInstance(n,e),n.componentRef.instance.visible=!0,n.componentRef.instance.visibleChange.pipe(a.takeUntil(this.activeCropper.ngUnsubscribe),a.delay(1e3)).subscribe((function(e){e||t.destroy(n)}))},e.prototype.configureInstance=function(e,t){var n=e.componentRef.instance;t&&Object.keys(t).forEach((function(o){var i=t[o];"function"!=typeof i?n[o]=i:"function"==typeof i&&n[o].pipe(a.takeUntil(e.ngUnsubscribe)).subscribe((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t[o].apply(t,ue(e))}))})),n.visibleChange.pipe(a.takeUntil(e.ngUnsubscribe)).subscribe((function(e){return n.visible=e}))},e.prototype.destroy=function(e){e.ngUnsubscribe.next(),e.ngUnsubscribe.complete(),this.appRef.detachView(e.componentRef.hostView),e.componentRef.destroy()},e.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ApplicationRef},{type:t.Injector}]},e=ae([t.Injectable()],e)}(),ui=function(){function e(){this.id="s-object-card-field-"+n.nextId++,this.buttonClick=new t.EventEmitter}var n;return n=e,e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"imageSource",void 0),ae([t.Input()],e.prototype,"imageAlt",void 0),ae([t.Input()],e.prototype,"iconClass",void 0),ae([t.Input()],e.prototype,"label",void 0),ae([t.Input()],e.prototype,"description",void 0),ae([t.Input()],e.prototype,"buttonLabel",void 0),ae([t.Input()],e.prototype,"buttonModel",void 0),ae([t.Output()],e.prototype,"buttonClick",void 0),ae([t.ContentChild(Jo,{static:!0})],e.prototype,"thumbnailComponent",void 0),ae([t.ViewChild(t.TemplateRef,{static:!0})],e.prototype,"content",void 0),e=n=ae([t.Component({selector:"s-object-card-field",template:'<ng-template>\n <div class="container">\n <ng-content select="s-thumbnail"></ng-content>\n <s-thumbnail\n [id]="id + \'-thumbnail\'"\n *ngIf="!thumbnailComponent && (imageSource || iconClass)"\n [imageSource]="imageSource"\n [imageAlt]="imageAlt || label"\n [iconClass]="iconClass"\n size="small"\n ></s-thumbnail>\n\n <div class="info-container">\n <div #labelTemplate><ng-content select="[labelTemplate]"></ng-content></div>\n <span\n [id]="id + \'-label\'"\n *ngIf="!labelTemplate.children.length"\n class="label"\n [pTooltip]="label"\n tooltipPosition="top"\n showDelay="500"\n >{{ label }}</span\n >\n\n <div #descriptionTemplate><ng-content select="[descriptionTemplate]"></ng-content></div>\n <span\n [id]="id + \'-description\'"\n *ngIf="!descriptionTemplate.children.length"\n class="description"\n [pTooltip]="description"\n tooltipPosition="top"\n showDelay="500"\n >{{ description }}</span\n >\n\n <s-button\n [id]="id + \'-button\'"\n *ngIf="buttonLabel"\n styleClass="object-card-button"\n priority="link"\n [label]="buttonLabel"\n [model]="buttonModel"\n size="small"\n (onClick)="buttonClick.emit($event)"\n ></s-button>\n </div>\n </div>\n</ng-template>\n',styles:[".container{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:100%}.info-container{margin-left:10px}.info-container,.info-container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.info-container .label{color:#999;display:block}.info-container .description{display:block}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.info-container{-ms-flex:1;flex:1}}@media (max-width:767px){.info-container,.info-container span{white-space:normal}}.info-container:only-child{margin-left:0}"]})],e)}(),mi=function(){function n(){this.id="s-object-card-main-"+o.nextId++,this.iconClass="fa fa-picture-o",this.hasThumbnail=!0,this.hasDescription=!0,this.isBrand=!1,this.buttonClick=new t.EventEmitter,this._thumbnailSize=e.ThumbnailSize.Medium}var o;return o=n,Object.defineProperty(n.prototype,"thumbnailSize",{get:function(){return this._thumbnailSize},set:function(e){this._thumbnailSize=e,this.thumbnailComponent&&(this.thumbnailComponent.size=e)},enumerable:!0,configurable:!0}),n.prototype.onResize=function(){this.update()},n.prototype.ngAfterContentInit=function(){this.update()},n.prototype.update=function(){var t=window.innerWidth;this.thumbnailSize=t<=Sn.SM_MAX?e.ThumbnailSize.Small:e.ThumbnailSize.Medium},n.nextId=0,ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"imageSource",void 0),ae([t.Input()],n.prototype,"imageFallback",void 0),ae([t.Input()],n.prototype,"imageAlt",void 0),ae([t.Input()],n.prototype,"iconClass",void 0),ae([t.Input()],n.prototype,"hasThumbnail",void 0),ae([t.Input()],n.prototype,"hasDescription",void 0),ae([t.Input()],n.prototype,"isBrand",void 0),ae([t.Input()],n.prototype,"label",void 0),ae([t.Input()],n.prototype,"description",void 0),ae([t.Input()],n.prototype,"buttonLabel",void 0),ae([t.Input()],n.prototype,"buttonModel",void 0),ae([t.Output()],n.prototype,"buttonClick",void 0),ae([t.ContentChild(Jo,{static:!0})],n.prototype,"thumbnailComponent",void 0),ae([t.HostListener("window:resize")],n.prototype,"onResize",null),n=o=ae([t.Component({selector:"s-object-card-main",template:'<ng-container *ngIf="hasThumbnail">\n <ng-content select="s-thumbnail"></ng-content>\n <s-thumbnail\n [id]="id + \'-thumbnail\'"\n [imageSource]="imageSource"\n [imageFallback]="imageFallback"\n [imageAlt]="imageAlt || label"\n [iconClass]="iconClass"\n [size]="thumbnailSize"\n *ngIf="!thumbnailComponent"\n [isBrand]="isBrand"\n ></s-thumbnail>\n</ng-container>\n\n<ng-container *ngIf="hasDescription">\n <div class="info-container">\n <div #labelTemplate><ng-content select="[labelTemplate]"></ng-content></div>\n <span\n [id]="id + \'-label\'"\n *ngIf="!labelTemplate.children.length"\n class="label"\n [pTooltip]="label"\n tooltipPosition="top"\n showDelay="500"\n >{{ label }}</span\n >\n\n <div #descriptionTemplate><ng-content select="[descriptionTemplate]"></ng-content></div>\n <span\n [id]="id + \'-description\'"\n *ngIf="!descriptionTemplate.children.length"\n class="description"\n [pTooltip]="description"\n tooltipPosition="top"\n showDelay="500"\n >{{ description }}</span\n >\n <s-button\n [id]="id + \'-button\'"\n *ngIf="buttonLabel"\n styleClass="object-card-button"\n priority="link"\n [label]="buttonLabel"\n [model]="buttonModel"\n size="small"\n (onClick)="buttonClick.emit($event)"\n ></s-button>\n </div>\n</ng-container>\n',styles:[":host{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;min-height:70px}.info-container{margin-left:10px;-ms-flex:1;flex:1}.info-container,.info-container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.info-container .label{display:block;font-weight:700}.info-container .description{color:#999;display:block}@media (max-width:767px){.info-container,.info-container span{white-space:normal}}"]})],n)}(),fi=X,hi=function(){function e(e,o){this.cdr=e,this.elementRef=o,this.id="s-object-card-"+n.nextId++,this.expanded=!1,this.expandTooltip="Abrir painel",this.collapseTooltip="Fechar painel",this.fieldsMinWidth=200,this.expandedChange=new t.EventEmitter,this.maxVisibleFields=0}var n;return n=e,e.prototype.ngAfterViewInit=function(){var e=this;this.update(),this.cdr.detectChanges(),this.fields.changes.subscribe((function(){e.update()})),fi({strategy:"scroll"}).listenTo(this.elementRef.nativeElement,(function(){return e.update()}))},e.prototype.update=function(){var e,t,n,o=window.innerWidth,i=this.elementRef.nativeElement.offsetWidth,r=.3*i>260?.3*i:260,a=this.fieldsMinWidth,s=this.elementRef.nativeElement.getElementsByClassName("s-object-card-field");try{for(var l=ce(s),p=l.next();!p.done;p=l.next()){p.value.style.minWidth=this.fieldsMinWidth+"px"}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}(n=o<=Sn.SM_MAX?0:Math.floor((i-r)/a))&&n<this.fields.length&&(n=Math.floor((i-r-50)/a)),this.maxVisibleFields=n,n>=this.fields.length&&this.expanded&&this.collapse()},e.prototype.toggle=function(){this.expanded?this.collapse():this.expand()},e.prototype.expand=function(){this.expanded=!0,this.expandedChange.emit(this.expanded)},e.prototype.collapse=function(){this.expanded=!1,this.expandedChange.emit(this.expanded)},e.prototype.getExpandedFieldWidth=function(){var e=this.elementRef.nativeElement.offsetWidth;return 12/(e<=Sn.SM_MAX?1:e<=Sn.MD_MAX?2:e<=Sn.LG_MAX?4:6)},e.nextId=0,e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:t.ElementRef}]},ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"expanded",void 0),ae([t.Input()],e.prototype,"expandTooltip",void 0),ae([t.Input()],e.prototype,"collapseTooltip",void 0),ae([t.Input()],e.prototype,"fieldsMinWidth",void 0),ae([t.Output()],e.prototype,"expandedChange",void 0),ae([t.ContentChild(mi,{static:!0})],e.prototype,"main",void 0),ae([t.ContentChildren(ui,{descendants:!0})],e.prototype,"fields",void 0),e=n=ae([t.Component({selector:"s-object-card",template:'<div [id]="id" class="container">\n <div\n [id]="id + \'-main-container\'"\n class="main-container"\n [ngClass]="{\n \'with-hidden-fields\': fields.length > maxVisibleFields,\n \'with-visible-fields\': fields.length && maxVisibleFields\n }"\n >\n <div class="object-content">\n <div class="s-object-card-main"><ng-content select="s-object-card-main"></ng-content></div>\n\n <div class="divider" *ngIf="maxVisibleFields && fields.length"></div>\n\n <div *ngFor="let field of (fields.toArray() | slice: 0:maxVisibleFields)" class="s-object-card-field">\n <ng-container *ngTemplateOutlet="field.content"></ng-container>\n </div>\n </div>\n\n <div\n [id]="id + \'-expand-icon-container\'"\n class="expand-icon-container"\n (click)="toggle()"\n [pTooltip]="expanded ? collapseTooltip : expandTooltip"\n tooltipPosition="top"\n [showDelay]="500"\n >\n <span [id]="id + \'-expand-icon\'" class="expand-icon fa" [ngClass]="{ \'fa-minus\': expanded, \'fa-plus\': !expanded }"></span>\n </div>\n </div>\n\n <div [id]="id + \'-expandable-container\'" [@expandableContent]="expanded" class="expandable-container">\n <div class="ui-g ui-g-12">\n <ng-container *ngFor="let field of (fields.toArray() | slice: maxVisibleFields:fields.length)">\n <div class="ui-g-{{getExpandedFieldWidth()}}">\n <div class="s-object-card-field"><ng-container *ngTemplateOutlet="field.content"></ng-container></div>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n',animations:[C.trigger("expandableContent",[C.state("*",C.style({height:"0"})),C.state("false",C.style({height:"0"})),C.state("true",C.style({height:"*"})),C.transition("* => true",C.animate("200ms ease-out")),C.transition("false <=> true",C.animate("200ms ease-out"))])],styles:[":host{display:block}.container{margin-bottom:20px}.main-container{display:-ms-flexbox;display:flex}.expandable-container,.main-container{background-color:#fff;border:1px solid #ccc;position:relative;overflow:hidden;width:100%}.expandable-container{border-top:none;box-shadow:inset 0 6px 4px -4px #ddd;margin-top:-1px}.expand-icon-container{display:none;text-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;width:25px;position:absolute;right:15px;height:25px;top:calc(50% - 12px)}.expand-icon{-ms-flex:1;flex:1}.object-content{display:-ms-flexbox;display:flex;width:100%}.s-object-card-main{-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:1;flex-grow:1;overflow:hidden;padding:15px}.main-container.with-visible-fields .s-object-card-main{max-width:30%}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.main-container.with-visible-fields .s-object-card-main{width:20%}}.s-object-card-field{overflow:hidden;height:100%}.main-container .s-object-card-field{padding:15px}.main-container .divider{width:1px;-ms-flex-negative:0;flex-shrink:0;background-color:#ccc;margin:15px -1px 15px 0}.main-container.with-hidden-fields .object-content{width:calc(100% - 35px)}.main-container.with-hidden-fields .expand-icon-container{display:-ms-flexbox;display:flex}::ng-deep .object-card-button{padding-left:0!important;padding-right:10px!important;border:none!important;height:auto!important;min-width:auto!important;text-align:left!important}@media (max-width:767px){.s-object-card-main{max-width:calc(100% - 50px)}}"]})],e)}(),gi=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule,ni,ye],declarations:[hi,mi,ui],exports:[ni,hi,mi,ui]})],e)}(),bi=function(){function e(){this.id="s-product-header-"+n.nextId++,this.baseZIndex=0}var n;return n=e,e.prototype.ngAfterViewInit=function(){this.container.nativeElement.style.zIndex=String(this.baseZIndex+ ++p.DomHandler.zindex)},e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"header",void 0),ae([t.Input()],e.prototype,"baseZIndex",void 0),ae([t.ViewChild("headerContainer",{static:!1})],e.prototype,"container",void 0),e=n=ae([t.Component({selector:"s-product-header",template:'<div [id]="id" class="box">\n <div #headerContainer class="sds-container header">\n <h1 class="title">{{header}}</h1>\n <div class="content">\n <ng-content></ng-content>\n </div>\n </div>\n</div>',styles:[".box{position:relative;width:100%;height:70px}.header{padding-top:15px;padding-bottom:15px;position:fixed;width:100%;top:0;left:0;height:70px;background-color:#fff;border-bottom:1px solid #ddd;box-shadow:0 1px 2px #ddd;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}.title{color:#999;font-weight:400;font-size:16pt;margin-right:15px;min-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content{display:-ms-flexbox;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]})],e)}(),vi=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule,ni],declarations:[bi],exports:[bi,ni]})],e)}(),yi=function(){function e(e){this.focusTrapFactory=e,this.id="s-sidebar-"+n.nextId++,this.visible=!1,this.baseZIndex=0,this.largeSized=!1,this.visibleChange=new t.EventEmitter}var n;return n=e,e.prototype.onShow=function(){p.DomHandler.addClass(document.body,"ui-overflow-hidden-sidebar"),this.focusTrapFactory.create(this.innerSidebar.containerViewChild.nativeElement,!1).focusInitialElementWhenReady()},e.prototype.onHide=function(){p.DomHandler.removeClass(document.body,"ui-overflow-hidden-sidebar")},e.prototype.close=function(e){p.DomHandler.removeClass(document.body,"ui-overflow-hidden-sidebar"),this.visibleChange.emit(!1),e.preventDefault()},e.nextId=0,e.ctorParameters=function(){return[{type:Z.FocusTrapFactory}]},ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"visible",void 0),ae([t.Input()],e.prototype,"header",void 0),ae([t.Input()],e.prototype,"baseZIndex",void 0),ae([t.Input()],e.prototype,"largeSized",void 0),ae([t.Output()],e.prototype,"visibleChange",void 0),ae([t.ViewChild(Q.Sidebar,{static:!0})],e.prototype,"innerSidebar",void 0),ae([t.ContentChild(ai,{static:!0})],e.prototype,"headerSection",void 0),ae([t.ContentChild(si,{static:!0})],e.prototype,"footerSection",void 0),e=n=ae([t.Component({selector:"s-sidebar",template:'<p-sidebar [id]="id" [visible]="visible" (visibleChange)="visibleChange.emit($event)" [blockScroll]="true" [baseZIndex]="baseZIndex"\n [modal]="true" [dismissible]="false" [showCloseIcon]="false" position="right" appendTo="body"\n [styleClass]="largeSized ? \'s-sidebar-panel s-sidebar-panel-lg\' : \'s-sidebar-panel\'" (onShow)="onShow()" (onHide)="onHide()">\n\n <div [id]="id + \'-container\'" class="s-sidebar-container">\n\n <a href="#" role="button" class="s-sidebar-close" (click)="close($event)"><span class="fa fa-times" aria-hidden="true"></span></a>\n\n <div [id]="id + \'-header\'" class="s-sidebar-header" *ngIf="header && !headerSection">\n <s-header>\n <h2 class="sds-panel-title">{{header}}</h2>\n </s-header>\n </div>\n\n <div [id]="id + \'-header\'" class="s-sidebar-header" *ngIf="headerSection">\n <ng-content select="s-header"></ng-content>\n </div>\n\n <p-scrollPanel [id]="id + \'-content-container\'" class="s-sidebar-content-container" styleClass="s-sidebar-content">\n <ng-content></ng-content>\n </p-scrollPanel>\n\n <div [id]="id + \'-footer\'" class="s-sidebar-footer" *ngIf="footerSection">\n <ng-content select="s-footer"></ng-content>\n </div>\n\n </div>\n\n</p-sidebar>\n',encapsulation:t.ViewEncapsulation.None,styles:[".ui-overflow-hidden-sidebar{overflow:hidden}body .ui-sidebar.s-sidebar-panel{width:50%;padding:0}@media (max-width:767px){body .ui-sidebar.s-sidebar-panel{width:100%}}@media (min-width:768px){body .ui-sidebar.s-sidebar-panel{width:75%}}@media (min-width:992px){body .ui-sidebar.s-sidebar-panel{width:50%}body .ui-sidebar.s-sidebar-panel.s-sidebar-panel-lg{width:75%}}body .ui-sidebar.s-sidebar-panel .s-sidebar-container{height:100%;width:100%;padding:20px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column}body .ui-sidebar.s-sidebar-panel .s-sidebar-close{position:absolute;right:20px;top:20px;color:#333}body .ui-sidebar.s-sidebar-panel .s-sidebar-header{border-bottom:1px solid #ccc;padding-bottom:15px;padding-right:20px;margin-bottom:15px;-ms-flex-negative:0;flex-shrink:0}body .ui-sidebar.s-sidebar-panel .s-sidebar-content-container{-ms-flex:1;flex:1;overflow:hidden}body .ui-sidebar.s-sidebar-panel .s-sidebar-content{height:100%}body .ui-sidebar.s-sidebar-panel .s-sidebar-footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;-ms-flex-negative:0;flex-shrink:0}body .ui-sidebar.s-sidebar-panel p-scrollpanel{padding-top:30px}body .ui-sidebar.s-sidebar-panel .s-sidebar-header+p-scrollpanel{padding-top:0}p-scrollPanel{display:block}"]})],e)}(),xi=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,Z.A11yModule,Q.SidebarModule,J.ScrollPanelModule,li],declarations:[yi],exports:[li,yi]})],e)}(),wi=function(){function e(){this.id="s-stats-card-"+n.nextId++,this.alwaysWithBorder=!1,this.lightVersion=!1,this.lightMode=!0,this.iconClass="fa fa-bar-chart",this.color="#339966",this.animateNumbers=!0,this.clickable=!1,this.tooltip="",this.onClick=new t.EventEmitter,this.ANIMATION_DURATION_MS=200,this.STEP_DURATION_MS=20,this.previousValue="0",this._value="0"}var n;return n=e,Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this.previousValue=this._value,this._value=String(e),this.animateNumbers?this.updateDisplayValue():this.displayValue=this.value},enumerable:!0,configurable:!0}),e.prototype.updateDisplayValue=function(){var e=this,t=new T.BigNumber(this.ANIMATION_DURATION_MS),n=new T.BigNumber(this.STEP_DURATION_MS),o=t.dividedBy(n),i=new T.BigNumber(this.previousValue.replace(/\D/g,"")),r=new T.BigNumber(this.value.replace(/\D/g,"")),a=r.minus(i).absoluteValue().dividedBy(o),s=i.isLessThan(r);clearInterval(this.intervalId),this.displayValue=this.replaceNumericPositions(this.value);var l=i;this.intervalId=setInterval((function(){s&&l.isLessThan(r)?(e.displayValue=e.replaceNumericPositions(e.displayValue,l),l=l.plus(a)):!s&&l.isGreaterThan(r)?(e.displayValue=e.replaceNumericPositions(e.displayValue,l),l=l.minus(a)):(e.displayValue=e.value,clearInterval(e.intervalId))}),this.STEP_DURATION_MS)},e.prototype.replaceNumericPositions=function(e,t){var n=e.replace(/[^\d]/g,""),o=(t?t.toString():"").toString().replace(/\D/g,"").padStart(n.length,"0"),i=0;return e.split("").map((function(e){return Number(e)||"0"===e?o[i++]:e})).join("")},e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"label",void 0),ae([t.Input()],e.prototype,"alwaysWithBorder",void 0),ae([t.Input()],e.prototype,"lightVersion",void 0),ae([t.Input()],e.prototype,"lightMode",void 0),ae([t.Input()],e.prototype,"iconClass",void 0),ae([t.Input()],e.prototype,"color",void 0),ae([t.Input()],e.prototype,"animateNumbers",void 0),ae([t.Input()],e.prototype,"clickable",void 0),ae([t.Input()],e.prototype,"value",null),ae([t.Input()],e.prototype,"tooltip",void 0),ae([t.Output()],e.prototype,"onClick",void 0),e=n=ae([t.Component({selector:"s-stats-card",template:'<div\n [id]="id"\n class="s-stats-card"\n [ngClass]="{\n \'s-stats-card--always-border\': alwaysWithBorder,\n \'s-stats-card--light\': lightMode,\n \'s-stats-card--color\': !lightMode,\n \'s-stats-card--light-version\': lightVersion,\n \'s-stats-card--clickable\': clickable\n }"\n (click)="clickable && onClick.next($event)">\n\n <div\n [id]="id + \'-background\'"\n class="s-stats-card-background"\n [ngStyle]="{ \'background-color\': !lightMode && color || \'\' }">\n </div>\n <div\n [id]="id + \'-overlay\'"\n class="s-stats-card-overlay">\n </div>\n\n <div\n [id]="id + \'-info-container\'"\n class="s-stats-card-info-container">\n <div class="s-stats-card-info-inner-container">\n <div\n [id]="id + \'-icon-container\'"\n class="s-stats-card-icon-container"\n [ngStyle]="{ \'background-color\': lightMode && color || \'\' }">\n <span\n [id]="id + \'-icon\'"\n [class]="iconClass"\n [ngClass]="{ \'s-stats-card-icon\': true }"\n [ngStyle]="{\'color\': !lightMode && color || \'\'}"\n aria-hidden="true"></span>\n </div>\n\n <div\n [id]="id + \'-text-container\'"\n class="s-stats-card-text-container">\n <h4\n [id]="id + \'-label\'"\n class="s-stats-card-label"\n [pTooltip]="label"\n tooltipPosition="top"\n showDelay="500">\n {{ label }}\n </h4>\n <span\n [id]="id + \'-value\'"\n class="s-stats-card-value"\n [pTooltip]="displayValue"\n tooltipPosition="top"\n showDelay="500">\n {{ displayValue }}\n </span>\n </div>\n </div>\n <div class="s-stats-card-content-inner-container">\n <div #content class="s-stats-card-content-container">\n <ng-content></ng-content>\n </div>\n <div\n *ngIf="content.children.length"\n class="s-stats-card-content-separator">\n </div>\n </div>\n <span\n *ngIf="tooltip"\n class="s-status-card-tooltip"\n [pTooltip]="tooltip"\n tooltipPosition="right">\n <i class="fa fa-info-circle s-status-card-tooltip-icon"></i>\n </span>\n </div>\n</div>\n',encapsulation:t.ViewEncapsulation.None,styles:["s-stats-card{display:block;height:auto;position:relative}s-stats-card .s-stats-card{border:1px solid transparent;min-width:120px;overflow:hidden;position:relative}s-stats-card .s-stats-card .s-stats-card-background,s-stats-card .s-stats-card .s-stats-card-overlay{height:calc(100% - 2px);left:1px;position:absolute;top:1px;width:calc(100% - 2px)}s-stats-card .s-stats-card .s-stats-card-background{background-color:#fff}s-stats-card .s-stats-card .s-stats-card-overlay{background-color:#000;opacity:0;transition:opacity .2s ease-out}s-stats-card .s-stats-card .s-stats-card-info-container{overflow:auto;padding:15px;position:relative}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container{overflow:hidden;position:relative}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container{float:left;font-size:24px;height:50px;line-height:50px;text-align:center;transition:width .2s ease-out;width:50px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container{color:#fff;float:left;height:50px;max-width:calc(100% - 65px);padding-left:15px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label{font-weight:400;width:100%}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{display:inline-block;font-size:20px;font-weight:700;width:100%}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container .s-stats-card-content-separator{border-top:1px solid #ccc;margin:15px 0;-ms-flex-order:1;order:1}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container .s-stats-card-content-container{-ms-flex-order:2;order:2}s-stats-card .s-stats-card .s-stats-card-info-container .s-status-card-tooltip{font-size:1rem;line-height:0;margin:.3rem;position:absolute;right:0;top:0}s-stats-card .s-stats-card .s-stats-card-info-container .s-status-card-tooltip .s-status-card-tooltip-icon{color:#fff}s-stats-card .s-stats-card.s-stats-card--color .s-stats-card-icon-container{background-color:#fff}s-stats-card .s-stats-card.s-stats-card--light *{color:#333}s-stats-card .s-stats-card.s-stats-card--light .s-stats-card-icon{color:#fff}s-stats-card .s-stats-card.s-stats-card--light * .s-status-card-tooltip .s-status-card-tooltip-icon,s-stats-card .s-stats-card.s-stats-card--light .s-stats-card-label{color:#999}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-icon-container{height:100%;left:0;position:absolute;right:0;width:10px}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-icon-container .s-stats-card-icon{display:none}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-text-container{height:auto;max-width:calc(100% - 25px);padding-left:25px}s-stats-card .s-stats-card.s-stats-card--clickable{cursor:pointer}s-stats-card .s-stats-card:hover .s-stats-card-overlay{opacity:.2}s-stats-card .s-stats-card.s-stats-card--light:hover .s-stats-card-overlay{opacity:.08}s-stats-card .s-stats-card.s-stats-card--light{border-color:#ccc}.s-sidebar-content .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border),.ui-dialog-content .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border),p-panel .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border){border-color:transparent}@media (max-width:767px){s-stats-card .s-stats-card{height:auto}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container{height:100%;left:0;position:absolute;right:0;width:10px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container .s-stats-card-icon{display:none}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container{height:auto;max-width:calc(100% - 25px);padding-left:25px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{overflow:visible;white-space:normal;word-break:break-all}}"]})],e)}(),Ci=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule],declarations:[wi],exports:[wi]})],e)}();(Qo=e.StepState||(e.StepState={})).Default="default",Qo.Success="success",Qo.Warning="warning";var Ii,_i,ki=function(){function n(){this.id="s-steps-"+o.nextId++,this.activeIndex=0,this.stepSelected=new t.EventEmitter}var o;return o=n,n.prototype.stepClick=function(e,t,n){e.disabled||t==this.activeIndex||this.stepSelected.emit({step:e,index:t,event:n})},Object.defineProperty(n.prototype,"stepState",{get:function(){return e.StepState},enumerable:!0,configurable:!0}),n.prototype.barAnimation=function(e,t){return e<t||e===t},n.prototype.afterBarAnimation=function(e,t){return e<t||e===t-1},Object.defineProperty(n.prototype,"visibledStep",{get:function(){return this.steps.filter((function(e){return!e.hidden}))},enumerable:!0,configurable:!0}),n.nextId=0,ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"steps",void 0),ae([t.Input()],n.prototype,"activeIndex",void 0),ae([t.Output()],n.prototype,"stepSelected",void 0),n=o=ae([t.Component({selector:"s-steps",template:'<div [id]="id" class="s-steps-container">\n <ng-container *ngFor="let step of visibledStep; let i = index; let isFirst = first; let isLast = last">\n <div *ngIf="!isFirst" class="s-step-progress-bar"\n [@activeDesative]="barAnimation(i, activeIndex) ? \'active\': \'desactive\'" [ngClass]="{\n \'s-step-success\': (step.state === stepState.Success),\n \'s-step-warning\': (step.state === stepState.Warning),\n \'s-step-disabled\': step.disabled,\n \'s-step-visited\': (i < activeIndex),\n \'s-step-active\': (i === activeIndex)\n }"></div>\n <div [id]="id + \'-step-\' + (step.id || i)" class="s-step-header" (click)="stepClick(step, i, $event)" role="tab"\n tabindex="0" [attr.aria-label]="step.ariaLabel || null" [attr.aria-controls]="step.ariaControls"\n [attr.aria-labelledby]="!step.ariaLabel ? \'step-label-\' + i : null" [attr.aria-posinset]="i + 1"\n [attr.aria-setsize]="visibledStep.length" [attr.aria-selected]="activeIndex == i" [ngClass]="{\n \'s-step-success\': (step.state === stepState.Success),\n \'s-step-warning\': (step.state === stepState.Warning),\n \'s-step-visited\': (i < activeIndex),\n \'s-step-active\': (i === activeIndex),\n \'s-step-previous\': (i === activeIndex - 1)\n }">\n <div *ngIf="!isFirst"\n [@beforeActiveDesative]="barAnimation(i, activeIndex) ? \'active\': \'desactive\'"\n class="s-step-progress-bar-before" [ngClass]="{\n \'s-step-success\': (step.state === stepState.Success),\n \'s-step-warning\': (step.state === stepState.Warning),\n \'s-step-disabled\': step.disabled,\n \'s-step-visited\': (i < activeIndex),\n \'s-step-active\': (i === activeIndex)\n }"></div>\n <div *ngIf="!isLast"\n [@afterActiveDesative]="afterBarAnimation(i, activeIndex) ? \'active\': \'desactive\'"\n class="s-step-progress-bar-after" [ngClass]="{\n \'s-step-success\': (step.state === stepState.Success),\n \'s-step-warning\': (step.state === stepState.Warning),\n \'s-step-disabled\': visibledStep[i + 1].disabled,\n \'s-step-visited\': ((i + 1) < activeIndex),\n \'s-step-active\': (i === (activeIndex - 1))\n }"></div>\n <div\n class="s-step-index"\n [ngClass]="{\'s-step-disabled\': step.disabled}"\n [pTooltip]="step.tooltip"\n tooltipPosition="top">\n <div class="s-step-index-content">\n <span\n *ngIf="step.state !== stepState.Warning && (step.state == stepState.Success || activeIndex > i)"\n class="fas fa-check"\n aria-hidden="true"\n [attr.aria-label]="i + 1"></span>\n <span\n *ngIf="step.state == stepState.Warning"\n class="fas fa-exclamation-triangle"\n aria-hidden="true"\n [attr.aria-label]="i + 1"></span>\n <span\n *ngIf="step.state != stepState.Success && step.state != stepState.Warning && activeIndex <= i">\n {{i + 1}}\n </span>\n </div>\n </div>\n <div\n [id]="\'step-label-\' + i"\n class="s-step-label"\n [ngClass]="{\'s-step-disabled\': step.disabled}">\n <span>\n {{step.label}}\n </span>\n </div>\n </div>\n </ng-container>\n</div>\n',host:{"aria-orientation":"horizontal",role:"tablist","tab-index":"0"},animations:[C.trigger("beforeActiveDesative",[C.state("active",C.style({"background-position":"left bottom"})),C.state("desactive",C.style({"background-position":"right bottom"})),C.transition("active => desactive",[C.animate("50ms 100ms linear")]),C.transition("desactive => active",[C.animate("50ms 250ms linear")])]),C.trigger("activeDesative",[C.state("active",C.style({"background-position":"left bottom"})),C.state("desactive",C.style({"background-position":"right bottom"})),C.transition("active => desactive",[C.animate("100ms 150ms linear")]),C.transition("desactive => active",[C.animate("100ms 150ms linear")])]),C.trigger("afterActiveDesative",[C.state("active",C.style({"background-position":"left bottom"})),C.state("desactive",C.style({"background-position":"right bottom"})),C.transition("active => desactive",[C.animate("50ms 250ms linear")]),C.transition("desactive => active",[C.animate("50ms 100ms linear")])])],styles:["@keyframes scale-up-center{0%{transform:scale(.5)}100%{transform:scale(1)}}.s-steps-container{display:-ms-flexbox;display:flex;white-space:nowrap;-ms-flex-align:start;align-items:flex-start;overflow:hidden;padding:15px 10px}.s-step-header{box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;cursor:pointer;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:66px}.s-step-header .s-step-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all;color:#999;font-size:14px;font-weight:400;padding-top:5px}.s-step-header .s-step-progress-bar-before{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;left:0}.s-step-header .s-step-progress-bar-before.s-step-active,.s-step-header .s-step-progress-bar-before.s-step-visited{background-position:left bottom}.s-step-header .s-step-progress-bar-after{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;right:0}.s-step-header .s-step-progress-bar-after.s-step-active,.s-step-header .s-step-progress-bar-after.s-step-visited{background-position:left bottom}.s-step-progress-bar{margin:0;position:relative;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:100%;background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%}.s-step-disabled{opacity:.5;filter:Alpha(Opacity=50)}.s-step-disabled,.s-step-disabled *{cursor:text!important}.s-step-active.s-step-disabled{opacity:1}.s-step-index{background-color:#fff;border:3px solid #ccc;border-radius:50%;color:#999;display:inline-block;font-weight:700;position:relative;transition:background-color .2s ease-out;height:40px;width:40px;-ms-flex:none;flex:none}.s-step-index .s-step-index-content{line-height:18px;font-size:18px;padding-top:8.5px;text-align:center;position:relative;cursor:pointer}.s-step-index:hover{background-color:#f7f7f7}.s-step-warning .s-step-index .s-step-index-content{padding-top:7px}.s-step-visited .s-step-index{border-color:#7892a1;animation:.1s ease-out alternate scale-up-center;background-color:#7892a1}.s-step-visited .s-step-index-content>span{color:#fff}.s-step-active.s-step-progress-bar,.s-step-visited.s-step-progress-bar{background-position:left bottom}.s-step-active .s-step-index{border-color:#7892a1;color:#7892a1;cursor:default}.s-step-active .s-step-label{color:#333;font-weight:700}@media (max-width:767px){.s-step-label{display:none}}"]})],n)}(),Ti=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule],declarations:[ki],exports:[ki]})],e)}(),Si=function(){function e(){this.direction="horizontal",this.collapsable=!0,this.counterLabel="items"}return Object.defineProperty(e.prototype,"items",{get:function(){return this._items},set:function(e){this._items=e,this.checkDuplicateIds()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this._innerWidth=window.innerWidth},e.prototype.onResize=function(e){this._innerWidth=window.innerWidth},e.prototype.changeToVertical=function(){return"vertical"===this.direction||this._innerWidth/this.items.length<200},e.prototype.checkDuplicateIds=function(){var e=this.items.map((function(e){return e.id}));if(new Set(e).size!==e.length)throw new Error("A duplicate id was found in the items list")},ae([t.Input()],e.prototype,"items",null),ae([t.Input()],e.prototype,"activeIndex",void 0),ae([t.Input()],e.prototype,"direction",void 0),ae([t.Input()],e.prototype,"collapsable",void 0),ae([t.Input()],e.prototype,"counterLabel",void 0),ae([t.HostListener("window:resize",["$event"])],e.prototype,"onResize",null),e=ae([t.Component({selector:"s-timeline",template:'<div *ngIf="changeToVertical(); then vertical else horizontal"></div>\n\n<ng-template #horizontal>\n <s-horizontal-timeline *ngIf="items?.length"\n [items]="items"\n [activeIndex]="activeIndex">\n </s-horizontal-timeline>\n</ng-template>\n\n<ng-template #vertical>\n <s-vertical-timeline *ngIf="items?.length"\n [items]="items"\n [activeIndex]="activeIndex"\n [counterLabel]="counterLabel"\n [collapsable]="collapsable">\n </s-vertical-timeline>\n</ng-template>'})],e)}(),Ei=function(){function e(){}return ae([t.Input()],e.prototype,"item",void 0),ae([t.Input()],e.prototype,"isActive",void 0),ae([t.Input()],e.prototype,"isComplete",void 0),e=ae([t.Component({selector:"s-timeline-icon-item",template:"<ng-container *ngIf=\"item\">\n <div\n class=\"timeline__icon-item\"\n [ngClass]=\"{\n 'timeline__icon-item--small': item.testSize('small'),\n 'timeline__icon-item--normal': item.testSize('normal'),\n 'timeline__icon-item--warning': item.testSeverity('warning'),\n 'timeline__icon-item--error': item.testSeverity('error'),\n 'timeline__icon-item--completed': isComplete,\n 'timeline__icon-item--active': isActive\n }\">\n <div\n class=\"timeline__icon-item__icon\"\n [pTooltip]=\"item.tooltip\"\n tooltipPosition=\"top\">\n <ng-content *ngIf=\"item.icon; then icon_content; else label_text_content\"></ng-content>\n <ng-template #icon_content>\n <span [ngClass]=\"item.icon\"></span>\n </ng-template>\n <ng-template #label_text_content>\n <span class=\"timeline__icon-item__icon__label\">\n {{ item.label }}\n </span>\n </ng-template>\n </div>\n </div>\n</ng-container>\n",styles:['.timeline__icon-item .timeline__icon-item__icon{-ms-flex-align:center;align-items:center;background-color:#697882;border-radius:50%;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:4px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.timeline__icon-item .timeline__icon-item__icon .timeline__icon-item__icon__label{font-family:"Open Sans",sans-serif}.timeline__icon-item.timeline__icon-item--small .timeline__icon-item__icon{font-size:0;height:16px;width:16px}.timeline__icon-item.timeline__icon-item--normal .timeline__icon-item__icon{font-size:10px;height:24px;padding:8px;width:24px}.timeline__icon-item.timeline__icon-item--normal .timeline__icon-item__icon .timeline__icon-item__icon__label{font-size:14px}.timeline__icon-item.timeline__icon-item--active .timeline__icon-item__icon{font-size:20px;height:40px;padding:10px;width:40px}.timeline__icon-item.timeline__icon-item--active .timeline__icon-item__icon .timeline__icon-item__icon__label{font-size:22px}.timeline__icon-item.timeline__icon-item--active .timeline__icon-item__icon,.timeline__icon-item.timeline__icon-item--completed .timeline__icon-item__icon{background-color:#0c9348}.timeline__icon-item.timeline__icon-item--warning.timeline__icon-item--active .timeline__icon-item__icon{background-color:#fcbf10;color:#333}.timeline__icon-item.timeline__icon-item--danger.timeline__icon-item--active .timeline__icon-item__icon{background-color:#f8931f;color:#333}.timeline__icon-item.timeline__icon-item--error.timeline__icon-item--active .timeline__icon-item__icon{background-color:#c13018}']})],e)}(),Fi=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule],declarations:[Ei],exports:[Ei]})],e)}(),Li=function(){function e(){this.activeIndex=0}return ae([t.Input()],e.prototype,"items",void 0),ae([t.Input()],e.prototype,"activeIndex",void 0),e=ae([t.Component({selector:"s-horizontal-timeline",template:'<div class="horizontal-timeline">\n <ng-container\n *ngFor="let item of items;\n let i = index;\n let isFirst = first;\n let isLast = last">\n <div\n class="horizontal-timeline__item"\n [ngClass]="{\n \'horizontal-timeline__item--small\': item.testSize(\'small\'),\n \'horizontal-timeline__item--normal\': item.testSize(\'normal\'),\n \'horizontal-timeline__item--warning\': item.testSeverity(\'warning\'),\n \'horizontal-timeline__item--error\': item.testSeverity(\'error\'),\n \'horizontal-timeline__item--completed\': i < activeIndex,\n \'horizontal-timeline__item--active\': i === activeIndex\n }">\n <div class="horizontal-timeline__item__icon-wrapper">\n <div\n class="horizontal-timeline__item__icon-wrapper__line horizontal-timeline__item__icon-wrapper__line--before"\n [ngStyle]="{ \'visibility\': isFirst ? \'hidden\' : \'visible\' }">\n </div>\n <s-timeline-icon-item\n [item]="item"\n [isActive]="i === activeIndex"\n [isComplete]="i < activeIndex">\n </s-timeline-icon-item>\n <div\n class="horizontal-timeline__item__icon-wrapper__line horizontal-timeline__item__icon-wrapper__line--after"\n [ngStyle]="{ \'visibility\': isLast ? \'hidden\' : \'visible\' }">\n </div>\n </div>\n <div class="horizontal-timeline__item__info">\n <div\n class="horizontal-timeline__item__info__title"\n [pTooltip]="item.title"\n tooltipPosition="top"\n [showDelay]="1000">\n {{ item.title }}\n </div>\n <div\n class="horizontal-timeline__item__info__description"\n [pTooltip]="item.description"\n tooltipPosition="top"\n [showDelay]="1000">\n {{ item.description }}\n </div>\n </div>\n </div>\n </ng-container>\n</div>',styles:['@keyframes scale-up-center{0%{transform:scale(.5)}100%{transform:scale(1)}}.horizontal-timeline{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.horizontal-timeline .horizontal-timeline__item{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__icon-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:56px;-ms-flex-pack:start;justify-content:flex-start;width:100%}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line{background-color:#697882;height:3px}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line--before{border-radius:0 2px 2px 0}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line--after{border-radius:2px 0 0 2px}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__info{width:20ch}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__info .horizontal-timeline__item__info__title{color:#333;font-family:"Open Sans",sans-serif;font-size:14px;font-weight:700;line-height:150%;max-width:100%;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__info .horizontal-timeline__item__info__description{color:#999;display:-webkit-box;font-family:"Open Sans",sans-serif;font-size:12px;font-weight:400;line-height:150%;max-height:calc(12px * 1.5 * 4);overflow:hidden;text-align:center;text-overflow:ellipsis;-webkit-line-clamp:4;-webkit-box-orient:vertical}.horizontal-timeline .horizontal-timeline__item.horizontal-timeline__item--small .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line{width:calc(50% - 4px - 8px)}.horizontal-timeline .horizontal-timeline__item.horizontal-timeline__item--normal .horizontal-timeline__item__icon-wrapper__line{width:calc(50% - 4px - 12px)}.horizontal-timeline .horizontal-timeline__item.horizontal-timeline__item--active .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line{width:calc(50% - 4px - 20px)}.horizontal-timeline .horizontal-timeline__item.horizontal-timeline__item--active .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line--before,.horizontal-timeline .horizontal-timeline__item.horizontal-timeline__item--completed .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line--after,.horizontal-timeline .horizontal-timeline__item.horizontal-timeline__item--completed .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line--before{background-color:#0c9348}']})],e)}(),Mi=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule,Fi],declarations:[Li],exports:[Li]})],e)}(),Oi=function(){function e(){this.isG1Collapsed=!0,this.isG2Collapsed=!0}return Object.defineProperty(e.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(e){this._activeIndex=e,this.groupItems()},enumerable:!0,configurable:!0}),e.prototype.onChangeG1=function(e){this.isG1Collapsed=e},e.prototype.onChangeG2=function(e){this.isG2Collapsed=e},e.prototype.groupItems=function(){this.firstItem=0===this.activeIndex?[]:[this.items[0]],this.g1Items=this.items.slice(1,this.activeIndex),this.activeItem=[this.items[this.activeIndex]],this.g2Items=this.items.slice(this.activeIndex+1,this.items.length-1),this.lastItem=this.activeIndex===this.items.length-1?[]:[this.items[this.items.length-1]]},e.nextId=0,ae([t.Input()],e.prototype,"activeIndex",null),ae([t.Input()],e.prototype,"items",void 0),ae([t.Input()],e.prototype,"counterLabel",void 0),ae([t.Input()],e.prototype,"collapsable",void 0),e=ae([t.Component({selector:"s-vertical-timeline",template:'<div class="vertical-timeline">\n <div\n *ngIf="firstItem.length"\n class="vertical-timeline__block">\n <div class="vertical-timeline__block__prefix"></div>\n <s-vertical-items\n [items]="firstItem"\n [isLast]="false"\n [isActive]="false"\n [isCompleted]="true">\n </s-vertical-items>\n </div>\n\n <div\n *ngIf="g1Items.length"\n class="vertical-timeline__block">\n <div class="vertical-timeline__block__prefix">\n <ng-container *ngIf="g1Items.length > 1 && !isG1Collapsed">\n <s-collapse-option\n *ngIf="collapsable"\n [isCollapsed]="isG1Collapsed"\n (change)="onChangeG1($event)">\n </s-collapse-option>\n <s-range-line class="vertical-timeline__block__prefix__line"></s-range-line>\n </ng-container>\n </div>\n\n <div *ngIf="isG1Collapsed && g1Items.length > 1 && collapsable; then g1_collapsed; else g1_items"></div>\n\n <ng-template #g1_collapsed>\n <s-collapsed-items\n [items]="g1Items"\n [(isCollapsed)]="isG1Collapsed"\n [isCompleted]="true"\n [counterLabel]="counterLabel">\n </s-collapsed-items>\n </ng-template>\n\n <ng-template #g1_items>\n <s-vertical-items\n [items]="g1Items"\n [isLast]="false"\n [isActive]="false"\n [isCompleted]="true">\n </s-vertical-items>\n </ng-template>\n </div>\n\n <div\n *ngIf="activeItem.length"\n class="vertical-timeline__block">\n <div class="vertical-timeline__block__prefix"></div>\n <s-vertical-items\n [items]="activeItem"\n [isLast]="!lastItem.length"\n [isActive]="true"\n [isCompleted]="false">\n </s-vertical-items>\n </div>\n\n <div\n *ngIf="g2Items.length"\n class="vertical-timeline__block">\n <div class="vertical-timeline__block__prefix">\n <ng-container *ngIf="g2Items.length > 1 && !isG2Collapsed">\n <s-collapse-option\n *ngIf="collapsable"\n [isCollapsed]="isG2Collapsed"\n (change)="onChangeG2($event)">\n </s-collapse-option>\n <s-range-line class="vertical-timeline__block__prefix__line"></s-range-line>\n </ng-container>\n </div>\n\n <div *ngIf="isG2Collapsed && g2Items.length > 1 && collapsable; then g2_collapsed; else g2_items"></div>\n\n <ng-template #g2_collapsed>\n <s-collapsed-items\n [items]="g2Items"\n [(isCollapsed)]="isG2Collapsed"\n [isCompleted]="false"\n [counterLabel]="counterLabel">\n </s-collapsed-items>\n </ng-template>\n\n <ng-template #g2_items>\n <s-vertical-items\n [items]="g2Items"\n [isLast]="false"\n [isActive]="false"\n [isCompleted]="false">\n </s-vertical-items>\n </ng-template>\n </div>\n\n <div\n *ngIf="lastItem.length"\n class="vertical-timeline__block">\n <div class="vertical-timeline__block__prefix"></div>\n <s-vertical-items\n [items]="lastItem"\n [isLast]="true"\n [isActive]="false"\n [isCompleted]="false">\n </s-vertical-items>\n </div>\n</div>',styles:[".vertical-timeline{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.vertical-timeline .vertical-timeline__block{display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch}.vertical-timeline .vertical-timeline__block .vertical-timeline__block__prefix{width:60px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0}.vertical-timeline .vertical-timeline__block .vertical-timeline__block__prefix .vertical-timeline__block__prefix__line{height:100%}"]})],e)}(),Ri=function(){function e(){}return e=ae([t.Component({selector:"s-range-line",template:'<div class="range-line">\n <div class="range-line__horizontal"></div>\n <div class="range-line__vertical"></div>\n <div class="range-line__horizontal"></div>\n</div>\n',styles:[".range-line{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:20px;height:100%}.range-line .range-line__horizontal{background-color:#ccc;height:3px;width:100%}.range-line .range-line__vertical{background-color:#ccc;height:100%;width:3px}s-range-line{background-color:#add8e6}"]})],e)}(),Di=function(){function e(){this.isCollapsed=!1,this.change=new t.EventEmitter}return e.prototype.onClick=function(){this.change.emit(!this.isCollapsed)},ae([t.Input()],e.prototype,"isCollapsed",void 0),ae([t.Output()],e.prototype,"change",void 0),e=ae([t.Component({selector:"s-collapse-option",template:'<div\n class="collapse-option"\n (click)="onClick()">\n <div class="collapse-option__icon">\n <span\n class="fas"\n [ngClass]="{\n \'fa-minus\': !isCollapsed,\n \'fa-plus\': isCollapsed\n }">\n </span>\n </div>\n</div>',styles:[".collapse-option{-ms-flex-align:center;align-items:center;background-color:#428bca;border-radius:50%;cursor:pointer;display:-ms-flexbox;display:flex;height:24px;-ms-flex-pack:center;justify-content:center;margin:4px;width:24px}.collapse-option .collapse-option__icon{color:#fff}"]})],e)}(),Ai=function(){function e(){this.isCollapsedChange=new t.EventEmitter}return e.prototype.onChange=function(e){this.isCollapsed=!this.isCollapsed,this.isCollapsedChange.emit(this.isCollapsed)},ae([t.Input()],e.prototype,"items",void 0),ae([t.Input()],e.prototype,"isCollapsed",void 0),ae([t.Input()],e.prototype,"isCompleted",void 0),ae([t.Input()],e.prototype,"counterLabel",void 0),ae([t.Output()],e.prototype,"isCollapsedChange",void 0),e=ae([t.Component({selector:"s-collapsed-items",template:'<div class="collapsed-items">\n <div\n class="collapsed-items__item"\n [ngClass]="{ \'collapsed-items__item--completed\' : isCompleted }">\n <div class="collapsed-items__item__icon-wrapper">\n <s-collapse-option\n [isCollapsed]="isCollapsed"\n (change)="onChange($event)">\n </s-collapse-option>\n <div class="collapsed-items__item__icon-wrapper__line"></div>\n </div>\n <div\n class="collapsed-items__item__info"\n (click)="onChange(!isCollapsed)">\n <div\n class="collapsed-items__item__info__description">\n {{ items.length }} {{ counterLabel }}\n </div>\n </div>\n </div>\n</div>',styles:['.collapsed-items .collapsed-items__item{-ms-flex-align:stretch;align-items:stretch;display:-ms-flexbox;display:flex}.collapsed-items .collapsed-items__item .collapsed-items__item__icon-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-negative:0;flex-shrink:0;-ms-flex-pack:center;justify-content:center;width:56px}.collapsed-items .collapsed-items__item .collapsed-items__item__icon-wrapper .collapsed-items__item__icon-wrapper__line{background-color:#697882;border-radius:2px;-ms-flex-positive:1;flex-grow:1;min-height:20px;width:3px}.collapsed-items .collapsed-items__item .collapsed-items__item__info{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;margin-bottom:20px;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.collapsed-items .collapsed-items__item .collapsed-items__item__info .collapsed-items__item__info__description{color:#428bca;font-family:"Open Sans",sans-serif;font-size:12px;font-weight:400;line-height:150%}.collapsed-items .collapsed-items__item.collapsed-items__item--completed .collapsed-items__item__icon-wrapper .collapsed-items__item__icon-wrapper__line{background-color:#0c9348}']})],e)}(),Pi=function(){function e(){}return ae([t.Input()],e.prototype,"items",void 0),ae([t.Input()],e.prototype,"isLast",void 0),ae([t.Input()],e.prototype,"isActive",void 0),ae([t.Input()],e.prototype,"isCompleted",void 0),e=ae([t.Component({selector:"s-vertical-items",template:'<div class="vertical-items">\n <ng-container *ngFor="let item of items; let index = index;">\n <div\n class="vertical-items__item"\n [ngClass]="{\n \'vertical-items__item--small\': item.testSize(\'small\'),\n \'vertical-items__item--normal\': item.testSize(\'normal\'),\n \'vertical-items__item--completed\': isCompleted,\n \'vertical-items__item--active\': isActive\n }">\n <div class="vertical-items__item__icon-wrapper">\n <s-timeline-icon-item\n [item]="item"\n [isComplete]="isCompleted"\n [isActive]="isActive">\n </s-timeline-icon-item>\n <div\n class="vertical-items__item__icon-wrapper__line"\n [ngStyle]="{ \'visibility\': isLast ? \'hidden\' : \'visible\' }">\n </div>\n </div>\n <div class="vertical-items__item__info">\n <div class="vertical-timeline__item__info__title">\n {{ item.title }}\n </div>\n <div class="vertical-items__item__info__description">\n {{ item.description }}\n </div>\n </div>\n </div>\n </ng-container>\n</div>',styles:['.vertical-items .vertical-items__item{-ms-flex-align:stretch;align-items:stretch;display:-ms-flexbox;display:flex;margin-right:50px}.vertical-items .vertical-items__item .vertical-items__item__collapsed-option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.vertical-items .vertical-items__item .vertical-items__item__collapsed-option .vertical-items__item__collapsed-option__line{width:3px;height:50px;background-color:#ccc}.vertical-items .vertical-items__item .vertical-items__item__icon-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-negative:0;flex-shrink:0;-ms-flex-pack:center;justify-content:center;width:56px}.vertical-items .vertical-items__item .vertical-items__item__icon-wrapper .vertical-items__item__icon-wrapper__line{background-color:#697882;border-radius:2px;-ms-flex-positive:1;flex-grow:1;min-height:20px;width:3px}.vertical-items .vertical-items__item .vertical-items__item__info{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;margin-bottom:12px}.vertical-items .vertical-items__item .vertical-items__item__info .vertical-items__item__info__title{color:#333;font-family:"Open Sans",sans-serif;font-size:14px;font-weight:700;line-height:150%}.vertical-items .vertical-items__item .vertical-items__item__info .vertical-items__item__info__description{color:#999;font-family:"Open Sans",sans-serif;font-size:12px;font-weight:400;line-height:150%}.vertical-items .vertical-items__item .vertical-items__item__info .vertical-items__item__info__description.vertical-items__item__info__description--link{color:#428bca}.vertical-items .vertical-items__item.vertical-items__item--small .vertical-items__item__icon-wrapper__line{height:calc(100% - 4px - 8px)}.vertical-items .vertical-items__item.vertical-items__item--medium .vertical-items__item__icon-wrapper__line{height:calc(100% - 4px - 12px)}.vertical-items .vertical-items__item.vertical-items__item--big .vertical-items__item__icon-wrapper__line{height:calc(50% - 4px - 20px)}.vertical-items .vertical-items__item.vertical-items__item--completed .vertical-items__item__icon-wrapper .vertical-items__item__icon-wrapper__line{background-color:#0c9348}']})],e)}(),Ni=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,Fi],declarations:[Oi,Ri,Di,Ai,Pi],exports:[Oi]})],e)}(),zi=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,Fi,Mi,Ni],declarations:[Si],exports:[Si]})],e)}();(Ii=e.TimelineItemSeverity||(e.TimelineItemSeverity={})).Normal="normal",Ii.Warning="warning",Ii.Error="error",(_i=e.TimelineItemSize||(e.TimelineItemSize={})).Normal="normal",_i.Small="small";var Vi,Bi=function(){function t(t){this.id=t.id,this.title=t.title,this.description=t.description,this.icon=t.icon,this.label=t.label,this.tooltip=t.tooltip,this.size=t.size||e.TimelineItemSize.Normal,this.severity=t.severity||e.TimelineItemSeverity.Normal,this.checkItemIconContent()}return t.prototype.checkItemIconContent=function(){var e;if(!this.icon&&!this.label)throw new Error("No icon or label string was passed for the item. Enter an icon or label text");if(this.icon&&this.label)throw new Error("An icon and label string were passed to the item. Enter an icon or label text");if((null===(e=this.label)||void 0===e?void 0:e.length)>2)throw new Error("Label text is expected to be a maximum of two characters long")},t.prototype.testSize=function(e){return this.size.valueOf()===e},t.prototype.testSeverity=function(e){var t;return(null===(t=this.severity)||void 0===t?void 0:t.valueOf())===e},t}(),Ui=function(){function e(){this.id="s-tile-"+n.nextId++,this.disabled=!1,this.tabIndex=0,this.onClick=new t.EventEmitter}var n;return n=e,Object.defineProperty(e.prototype,"initialLetter",{get:function(){var e="";if(this.label){var t=this.label.split(" ",2);e=t[0].charAt(0).toUpperCase(),t.length>1&&(e+=t[1].charAt(0).toUpperCase())}return e},enumerable:!0,configurable:!0}),e.prototype.onKeyDown=function(e){!this.disabled&&[13,32].includes(e.keyCode)&&this.onClick.emit()},e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"label",void 0),ae([t.Input()],e.prototype,"description",void 0),ae([t.Input()],e.prototype,"iconClass",void 0),ae([t.Input()],e.prototype,"imageSource",void 0),ae([t.Input()],e.prototype,"imageAlt",void 0),ae([t.Input()],e.prototype,"disabled",void 0),ae([t.Input()],e.prototype,"tabIndex",void 0),ae([t.Output()],e.prototype,"onClick",void 0),ae([t.HostListener("keydown",["$event"])],e.prototype,"onKeyDown",null),e=n=ae([t.Component({selector:"s-tile",template:'<div [id]="id" class="container" [attr.tabindex]="disabled ? undefined : tabIndex" [attr.aria-label]="label"\n [attr.aria-disabled]="disabled" role="button" [ngClass]="{\'disabled\': disabled}" (click)="!disabled && onClick.emit($event)">\n <div class="thumbnail-container" *ngIf="imageSource || iconClass">\n <s-thumbnail [id]="id + \'-thumbnail\'" *ngIf="imageSource" [imageSource]="imageSource" [imageAlt]="imageAlt || label"\n size="small" [isTile]="true"></s-thumbnail>\n\n <span [id]="id + \'-icon\'" *ngIf="!imageSource && iconClass" [class]="\'icon \' + iconClass" aria-hidden="true"></span>\n </div>\n <div class="first-letter-container" *ngIf="!iconClass && !imageSource">\n <div class="first-letter-span">\n <span>{{initialLetter}}</span>\n </div>\n </div>\n\n <div class="info-container">\n <span [id]="id + \'-label\'" class="label" [pTooltip]="label" tooltipPosition="top" showDelay="500">{{label}}</span>\n <span [id]="id + \'-description\'" class="description" [pTooltip]="description" tooltipPosition="top" showDelay="500">{{description}}</span>\n </div>\n</div>\n',styles:[":host{display:block}.container{position:relative;background-color:#fff;border:1px solid #ddd;padding:15px;-ms-flex-align:center;align-items:center;cursor:pointer;min-height:80px;overflow:hidden;display:-ms-flexbox;display:flex;transition:background-color .2s ease-out,border-color .2s ease-out}.container:focus:not(.disabled),.container:hover:not(.disabled){background-color:rgba(221,221,221,.2);outline:0}.container.disabled{opacity:.5;filter:Alpha(Opacity=50);background-image:none}.container.disabled,.container.disabled *{cursor:text!important}.thumbnail-container+.info-container{margin-left:15px}.info-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden}.info-container span{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.label{color:#428bca;font-size:12pt}.description{color:#999}.icon{color:#428bca;font-size:40px}.first-letter-container{position:relative;float:left;margin-right:10px;text-align:center}.first-letter-container .first-letter-span{margin:0 auto 5px;font-size:22px;line-height:1.8em;width:40px;height:40px;border-radius:100%;background-color:#428bca;color:#fff}"]})],e)}(),ji=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule,ni],declarations:[Ui],exports:[Ui,ni]})],e)}();(Vi=e.FileValidation||(e.FileValidation={})).MaxFileSize="maxFileSize",Vi.MaxFileLimit="maxFileLimit",Vi.TypeInvalid="typeInvalid",Vi.UnsupportedExtension="unsupportedExtension";var Hi,$i=function(){function n(e,n){this.imageCropperService=e,this.confirmationService=n,this.aspectRatio=1,this.removeButtonLabel="Remover",this.changeButtonLabel="Alterar foto",this.confirmationTexts={removalHeader:"Remover foto de perfil",removalMessage:"Deseja remover sua foto de perfil? Não pode ser revertida.",removalAcceptLabel:"Remover",removalRejectLabel:"Cancelar"},this.supportedExtensions=[],this.changedImage=new t.EventEmitter,this.removedImage=new t.EventEmitter,this.invalidFile=new t.EventEmitter}return n.prototype.ngOnInit=function(){this._normalizeSuportedExtensions()},n.prototype.onDragOver=function(e){e.preventDefault(),e.stopPropagation()},n.prototype.onDragLeave=function(e){e.preventDefault(),e.stopPropagation()},n.prototype.onDrop=function(e){e.preventDefault(),e.stopPropagation();for(var t=[],n=e.dataTransfer.files,o=0;o<n.length;o++)t.push(n.item(o));this._showImageCropper(t)},n.prototype.onResize=function(){if(this.uploadPicture&&this.info&&this.thumbnail){var e=this._getWidthElement(this.uploadPicture),t=this._getWidthElement(this.info);this._getWidthElement(this.thumbnail)+t>e?this.uploadPicture.nativeElement.classList.add("upload-picture--small"):this.uploadPicture.nativeElement.classList.remove("upload-picture--small")}},n.prototype.selectPhoto=function(){var e=this.fileInput.nativeElement;e.value="",e.click()},n.prototype.removePhoto=function(){var e=this;this.confirmationService.confirm({message:this.confirmationTexts.removalMessage,acceptLabel:this.confirmationTexts.removalAcceptLabel,rejectLabel:this.confirmationTexts.removalRejectLabel,header:this.confirmationTexts.removalHeader,accept:function(){e.fileInput.nativeElement.value="",e.image="",e.removedImage.emit()}})},n.prototype.photoSelected=function(e){this._showImageCropper(e.srcElement.files)},n.prototype._showImageCropper=function(e){var t=this;if(this._validateData(e)){var n=e[0],o=new FileReader;o.readAsDataURL(n),o.onloadend=function(e){t.imageCropperService.show(re({imageSource:e.target.result,croppedImage:function(e){t.image=e,t.changedImage.emit(e)},changeImage:function(){return t.selectPhoto()},allowSelectAnother:!1,aspectRatio:t.aspectRatio},t.cropperLabelsConfig))}}},n.prototype._normalizeSuportedExtensions=function(){this.supportedExtensions=this.supportedExtensions.map((function(e){return e.replace(".","").toLocaleLowerCase()}))},n.prototype._validateData=function(t){if(!t.length)return!1;if(t.length>1)return this.invalidFile.emit({file:null,validation:e.FileValidation.MaxFileLimit}),!1;var n=t[0];return n.type.includes("image")?this._validateFileExtension(n)?!!this._validateFileSize(n)||(this.invalidFile.emit({file:n,validation:e.FileValidation.MaxFileSize}),!1):(this.invalidFile.emit({file:n,validation:e.FileValidation.UnsupportedExtension}),!1):(this.invalidFile.emit({file:n,validation:e.FileValidation.TypeInvalid}),!1)},n.prototype._validateFileExtension=function(e){var t;if(null===(t=this.supportedExtensions)||void 0===t?void 0:t.length){var n=e.name.split(".").pop().toLowerCase();return this.supportedExtensions.includes(n)}return!0},n.prototype._validateFileSize=function(e){return!this.maxFileSize||e.size>this.maxFileSize},n.prototype._getWidthElement=function(e){var t=e.nativeElement.getBoundingClientRect(),n=t.left;return t.right-n},n.ctorParameters=function(){return[{type:di},{type:ee.ConfirmationService}]},ae([t.Input()],n.prototype,"simpleTitle",void 0),ae([t.Input()],n.prototype,"actionTitle",void 0),ae([t.Input()],n.prototype,"subtitle",void 0),ae([t.Input()],n.prototype,"aspectRatio",void 0),ae([t.Input()],n.prototype,"cropperLabelsConfig",void 0),ae([t.Input()],n.prototype,"removeButtonLabel",void 0),ae([t.Input()],n.prototype,"changeButtonLabel",void 0),ae([t.Input()],n.prototype,"confirmationTexts",void 0),ae([t.Input()],n.prototype,"maxFileSize",void 0),ae([t.Input()],n.prototype,"accept",void 0),ae([t.Input()],n.prototype,"supportedExtensions",void 0),ae([t.ViewChild("uploadPicture")],n.prototype,"uploadPicture",void 0),ae([t.ViewChild("info")],n.prototype,"info",void 0),ae([t.ViewChild("thumbnail",{read:t.ElementRef})],n.prototype,"thumbnail",void 0),ae([t.ViewChild("fileInput",{read:t.ElementRef})],n.prototype,"fileInput",void 0),ae([t.Output()],n.prototype,"changedImage",void 0),ae([t.Output()],n.prototype,"removedImage",void 0),ae([t.Output()],n.prototype,"invalidFile",void 0),ae([t.HostListener("dragover",["$event"])],n.prototype,"onDragOver",null),ae([t.HostListener("dragleave",["$event"])],n.prototype,"onDragLeave",null),ae([t.HostListener("drop",["$event"])],n.prototype,"onDrop",null),ae([t.HostListener("window:resize")],n.prototype,"onResize",null),n=ae([t.Component({selector:"s-profile-picture-picker",template:'<p-confirmDialog></p-confirmDialog>\n\n<input #fileInput [accept]="accept" class="file-input" type="file" (change)="photoSelected($event)">\n<div #uploadPicture class="upload-picture">\n <s-thumbnail\n #thumbnail\n iconClass="far fa-user"\n [imageSource]="image"\n [hasAction]="!image"\n (click)="selectPhoto()">\n </s-thumbnail>\n <div #info class="info">\n <ng-container *ngIf="image; then withImage; else noImage"></ng-container>\n <p class="subtitle">{{ subtitle }}</p>\n </div>\n</div>\n\n<ng-template #withImage>\n <div class="buttons">\n <s-button\n [label]="changeButtonLabel"\n priority="primary"\n (onClick)="selectPhoto()">\n </s-button>\n <s-button\n [label]="removeButtonLabel"\n priority="secondary"\n (onClick)="removePhoto()">\n </s-button>\n </div>\n</ng-template>\n\n<ng-template #noImage>\n <p class="title">\n {{ simpleTitle }}\n <span\n class="action-title"\n (click)="selectPhoto()">\n {{ actionTitle }}\n </span>\n </p>\n</ng-template>',styles:['.file-input{display:none}.upload-picture{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.upload-picture .info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:12px 20px;-ms-flex-align:start;align-items:flex-start}.upload-picture .info .title{font-family:"Open Sans",sans-serif;font-weight:700;font-size:.875rem;line-height:150%;color:#333}.upload-picture .info .title .action-title{cursor:pointer;color:#428bca}.upload-picture .info .buttons{display:-ms-flexbox;display:flex;gap:8px}.upload-picture .info .buttons s-button{margin:0}.upload-picture .info .subtitle{padding:6px 0;font-family:"Open Sans",sans-serif;font-weight:400;font-size:.75rem;line-height:150%;color:#697882;text-align:center}.upload-picture--small .info{-ms-flex-align:center;align-items:center}.upload-picture--small .info .subtitle,.upload-picture--small .info .title{text-align:center}.upload-picture--small .info .buttons{-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap}']})],n)}(),Gi=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,ye,ni,ci,te.ConfirmDialogModule],declarations:[$i],exports:[$i],providers:[di,ee.ConfirmationService]})],e)}(),qi=function(){function e(){this.showValue=!0}return e.prototype.ngOnInit=function(){this.validateValues()},e.prototype.validateValues=function(){if(this.value<0||this.value>100)throw new Error("Invalid value for value");if(this.targetValue<0||this.targetValue>100)throw new Error("Invalid value for targetValue")},ae([t.Input()],e.prototype,"value",void 0),ae([t.Input()],e.prototype,"targetValue",void 0),ae([t.Input()],e.prototype,"targetLabel",void 0),ae([t.Input()],e.prototype,"activeColor",void 0),ae([t.Input()],e.prototype,"showValue",void 0),e=ae([t.Component({selector:"s-progressbar",template:"<div class=\"progress-bar\">\n <div class=\"progress-bar-all\">\n <div\n class=\"progress-bar-active\"\n [ngClass]=\"{\n 'progress-bar-active--blue' : activeColor == 'blue',\n 'progress-bar-active--green': activeColor == 'green',\n 'progress-bar-active--red': activeColor == 'red',\n 'progress-bar-active--yellow': activeColor == 'yellow'\n }\"\n [ngStyle]=\"{ 'width': value + '%' }\">\n {{ showValue && value ? value + '%' : '' }}\n </div>\n </div>\n <div\n *ngIf=\"targetValue\"\n class=\"target\"\n [ngStyle]=\"{\n 'left': targetValue <= 50 ? targetValue + '%' : 'unset',\n 'right': targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start'\n }\">\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || value + '%' }}\n </span>\n </div>\n</div>\n",styles:['.progress-bar{position:relative}.progress-bar .progress-bar-all{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progress-bar .progress-bar-all .progress-bar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:"Open Sans",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progress-bar .progress-bar-all .progress-bar-active--blue{background-color:#428bca}.progress-bar .progress-bar-all .progress-bar-active--green{background-color:#0c9348}.progress-bar .progress-bar-all .progress-bar-active--red{background-color:#c13018}.progress-bar .progress-bar-all .progress-bar-active--yellow{background-color:#fcbf10}.progress-bar .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progress-bar .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progress-bar .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:"Open Sans",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}']})],e)}(),Wi=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[qi],exports:[qi]})],e)}();(Hi=e.ProgressBarColors||(e.ProgressBarColors={})).Blue="blue",Hi.Green="green",Hi.Red="red",Hi.Yellow="yellow",e.AngularComponentsModule=ze,e.AutocompleteField=Ct,e.BaseFieldComponent=hn,e.BignumberField=$t,e.BignumberInputDirective=Kn,e.BignumberInputModule=Yn,e.BooleanField=Wt,e.BooleanOptionsLabel=qt,e.BreadcrumbComponent=ge,e.BreadcrumbModule=be,e.Breakpoints=Sn,e.ButtonComponent=ve,e.ButtonModule=ye,e.CalendarField=Yt,e.CalendarLocaleOptions=It,e.CalendarMaskDirective=xe,e.CalendarMaskModule=we,e.ChipsField=Xt,e.CodeEditorModule=ft,e.CollapseLinkComponent=ht,e.CollapseLinkModule=gt,e.ControlErrorsComponent=bt,e.ControlErrorsModule=vt,e.CurrencyField=nn,e.CustomFieldsComponent=Go,e.CustomFieldsModule=Wo,e.CustomFieldsService=Ho,e.DEFAULT_CALENDAR_LOCALE_OPTIONS=Tt,e.DEFAULT_LOCALE_OPTIONS=Et,e.DEFAULT_NUMBER_LOCALE_OPTIONS=St,e.DoubleClickDirective=Po,e.DynamicConfig=wn,e.DynamicFormComponent=Cn,e.DynamicFormModule=jo,e.EditableOverlayDirective=Ko,e.EditableOverlayModule=Yo,e.EmptyStateComponent=In,e.EmptyStateModule=kn,e.ExportUtils=En,e.Field=wt,e.Fieldset=yn,e.FileUploadComponent=Fn,e.FileUploadModule=Ln,e.FormField=un,e.GlobalSearchComponent=ti,e.GlobalSearchDropdownItemComponent=ei,e.GlobalSearchModule=ri,e.HostProjectConfigsInjectionToken=Ne,e.ImageCropperComponent=pi,e.ImageCropperModule=ci,e.ImageCropperService=di,e.InfoSignDirective=Vn,e.InfoSignModule=Bn,e.LoadingStateComponent=Un,e.LoadingStateDirective=jn,e.LoadingStateModule=Hn,e.LocaleModule=Ht,e.LocaleOptions=kt,e.LocaleService=Lt,e.LocalizedCurrencyPipe=Dt,e.LocalizedCurrencyPipeOptions=Rt,e.LocalizedDateImpurePipe=zt,e.LocalizedDatePipe=Nt,e.LocalizedNumberInputDirective=$n,e.LocalizedNumberInputModule=Gn,e.LocalizedNumberPipe=Vt,e.LocalizedTimeImpurePipe=jt,e.LocalizedTimePipe=Ut,e.LongPressDirective=Ao,e.LookupComponent=fn,e.LookupField=on,e.MaskFormatterModule=Wn,e.MaskFormatterPipe=qn,e.MouseEventsModule=No,e.NavigationDirective=Jn,e.NumberField=en,e.NumberInputDirective=Jt,e.NumberInputModule=Qt,e.NumberLocaleOptions=_t,e.ObjectCardComponent=hi,e.ObjectCardFieldComponent=ui,e.ObjectCardMainComponent=mi,e.ObjectCardModule=gi,e.Option=mn,e.PasswordField=dn,e.PasswordStrengthModule=Uo,e.ProductHeaderComponent=bi,e.ProductHeaderModule=vi,e.ProfilePicturePickerComponent=$i,e.ProfilePicturePickerModule=Gi,e.ProgressBarComponent=qi,e.ProgressBarModule=Wi,e.RadioButtonField=rn,e.RationButtonOption=an,e.RowTogllerDirective=Qn,e.Section=xn,e.SelectField=sn,e.SelectOption=ln,e.SidebarComponent=yi,e.SidebarModule=xi,e.StatsCardComponent=wi,e.StatsCardModule=Ci,e.StepsComponent=ki,e.StepsModule=Ti,e.Structure=vn,e.TableFrozenPositionDirective=eo,e.TableHeaderCheckboxComponent=Xn,e.TableHeaderCheckboxModule=Zn,e.TableModule=so,e.TaxCalculationLanguageConfigs=Ze,e.TextAreaField=pn,e.TextField=cn,e.ThumbnailComponent=Jo,e.ThumbnailModule=ni,e.TileComponent=Ui,e.TileModule=ji,e.TimelineComponent=Si,e.TimelineItem=Bi,e.TimelineModule=zi,e.TokenListComponent=io,e.TokenListModule=ro,e.TooltipModule=Nn,Object.defineProperty(e,"__esModule",{value:!0})}));
16
+ var oe=function(e,t){return(oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function ie(e,t){function n(){this.constructor=e}oe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var re=function(){return(re=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function ae(e,t,n,o){var i,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(r<3?i(a):r>3?i(t,n,a):i(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a}function se(e,t){return function(n,o){t(n,o,e)}}function le(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{l(o.next(e))}catch(e){r(e)}}function s(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))}function pe(e,t){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function ce(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function de(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function ue(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(de(arguments[t]));return e}var me,fe,he,ge=function(){function e(e,t){var n=this;this.activatedRoute=e,this.router=t,this.targetHomeUrl="_self",this.ngUnsubscribe=new r.Subject,this.router.events.pipe(a.takeUntil(this.ngUnsubscribe),a.filter((function(e){return e instanceof i.NavigationEnd}))).subscribe((function(){return n.onNavigationEnd()}))}return e.prototype.onNavigationEnd=function(){var e=this.activatedRoute.root,t=this.getValidChildren(e);this.title=this.getCurrentTitle(t),this.home=this.getCurrentHome(t),this.items=this.getCurrentItems(t)},e.prototype.getValidChildren=function(e){var t=this,n=e.routeConfig&&e.routeConfig.path&&e.routeConfig.component&&e.outlet===i.PRIMARY_OUTLET;return e.children.reduce((function(e,n){return ue(e,t.getValidChildren(n))}),n?[e]:[])},e.prototype.getCurrentTitle=function(e){var t=e[e.length-1];if(t&&t.routeConfig)return this.getTitle(t)},e.prototype.getCurrentHome=function(e){var t;return this.homeUrl?t={url:this.homeUrl,icon:"fa fa-home",target:this.targetHomeUrl}:e.length&&(t=re(re({},this.getMenuItem(e[0],1===e.length)),{icon:"fa fa-home"})),t},e.prototype.getCurrentItems=function(e){var t=this;if(e.length){var n=this.homeUrl?e:e.slice(1);return n.length?n.map((function(n,o){return t.getMenuItem(n,o===e.length-1)})):void 0}},e.prototype.getMenuItem=function(e,t){void 0===t&&(t=!1);var n=this.getTitle(e),o=e.pathFromRoot;return{label:n,routerLink:o.slice(0,o.indexOf(e)+1).reduce((function(e,t){return ue(e,t.snapshot.url.map((function(e){return e.path})))}),["/"]),queryParams:e.snapshot.queryParams,routerLinkActiveOptions:{exact:!0},disabled:t}},e.prototype.getTitle=function(e){var t=e.snapshot,n=e.routeConfig,o=t.data.routeTitle;if(!o)throw new Error("No routeTitle defined for the route /"+n.path);return o},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},e.ctorParameters=function(){return[{type:i.ActivatedRoute},{type:i.Router}]},ae([t.Input()],e.prototype,"homeUrl",void 0),ae([t.Input()],e.prototype,"targetHomeUrl",void 0),e=ae([t.Component({selector:"s-breadcrumb",template:'<h1 class="sds-page-title">{{title}}</h1>\n<p-breadcrumb [home]="home" [model]="items"></p-breadcrumb>'})],e)}(),be=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,o.BreadcrumbModule,i.RouterModule],declarations:[ge],exports:[ge,i.RouterModule]})],e)}();(me=e.ButtonPriority||(e.ButtonPriority={})).Default="default",me.Primary="primary",me.Secondary="secondary",me.Link="link",(fe=e.ButtonSize||(e.ButtonSize={})).Default="default",fe.Small="small",function(e){e.rotate="rotate"}(he||(he={}));var ve,ye=function(){function n(){this.minWidth="40px",this.id="s-button-"+o.nextId++,this.caret=!0,this.baseZIndex=0,this.disabled=!1,this.auxiliary=!1,this.type="button",this.priority=e.ButtonPriority.Primary,this.model=[],this.size=e.ButtonSize.Default,this.onClick=new t.EventEmitter}var o;return o=n,n.prototype.ngOnInit=function(){var e=this;this.onClick.subscribe((function(t){e.model&&e.model.length&&(e.menu.model=e.model,e.menu.toggle(t))}))},n.prototype.validateSlideButton=function(){return this.slide&&(this.priority==e.ButtonPriority.Default||this.priority==e.ButtonPriority.Link)&&this.label.length},n.prototype.isOpen=function(){return this.model&&this.model.length&&this.menu.visible},n.prototype.ngOnChanges=function(e){var t=this.iconClass,n=this.label,o=this.model&&this.model.length;(n||t&&o)&&(this.minWidth="80px"),n&&t&&o&&(this.minWidth="100px")},n.prototype.updateTooltipZIndex=function(){this.tooltipZIndex=this.baseZIndex+ ++p.DomHandler.zindex},n.prototype.isRotateAnimation=function(){return this.animation===he.rotate},n.nextId=0,ae([t.HostBinding("style.min-width")],n.prototype,"minWidth",void 0),ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"label",void 0),ae([t.Input()],n.prototype,"tooltip",void 0),ae([t.Input()],n.prototype,"iconClass",void 0),ae([t.Input()],n.prototype,"rightIconClass",void 0),ae([t.Input()],n.prototype,"caret",void 0),ae([t.Input()],n.prototype,"styleClass",void 0),ae([t.Input()],n.prototype,"baseZIndex",void 0),ae([t.Input()],n.prototype,"disabled",void 0),ae([t.Input()],n.prototype,"auxiliary",void 0),ae([t.Input()],n.prototype,"type",void 0),ae([t.Input()],n.prototype,"priority",void 0),ae([t.Input()],n.prototype,"model",void 0),ae([t.Input()],n.prototype,"size",void 0),ae([t.Input()],n.prototype,"slide",void 0),ae([t.Input()],n.prototype,"animation",void 0),ae([t.Output()],n.prototype,"onClick",void 0),ae([t.ViewChild(s.TieredMenu,{static:!0})],n.prototype,"menu",void 0),n=o=ae([t.Component({selector:"s-button",template:'<p-tieredMenu [id]="id + \'-menu\'" [popup]="true" appendTo="body" [baseZIndex]="baseZIndex"></p-tieredMenu>\n\n<button\n [id]="id"\n [type]="type"\n [class]="styleClass"\n [ngClass]="{\n \'s-button-auxiliary\': auxiliary,\n \'s-button-with-icon\': iconClass,\n \'s-button-with-text\': label,\n \'s-button-empty\': !iconClass && !label,\n \'s-button-size-default\': size === \'default\',\n \'s-button-size-small\': size === \'small\',\n \'s-button-priority-default\': priority === \'default\',\n \'s-button-priority-primary\': priority === \'primary\',\n \'s-button-priority-secondary\': priority === \'secondary\',\n \'s-button-priority-link\': priority === \'link\',\n \'s-button-multiple\': (caret && (model && model.length)) || rightIconClass,\n \'s-button-active\': isOpen(),\n \'s-button--slide\': validateSlideButton(),\n \'s-button--rotate-animation\': isRotateAnimation()\n }"\n [disabled]="disabled"\n [pTooltip]="tooltip"\n tooltipPosition="top"\n showDelay="500"\n [tooltipZIndex]="tooltipZIndex"\n (click)="onClick.emit($event)"\n (mouseenter)="updateTooltipZIndex()"\n>\n <span \n *ngIf="iconClass" \n [class]="iconClass" \n [ngClass]="{ \n \'s-button-icon\': true,\n \'s-button-icon-margin-right\': !label && model && model.length\n }" \n aria-hidden="true">\n </span>\n <span \n *ngIf="label" \n class="s-button-text"\n [ngClass]="{\n \'s-button-icon-margin-right\': !!rightIconClass || (model && model.length),\n \'s-button-icon-margin-left\': !!iconClass\n }">\n {{ label }}\n </span>\n <ng-content></ng-content>\n <span \n *ngIf="rightIconClass" \n [class]="rightIconClass" \n [ngClass]="{ \'s-button-right-icon\': true }" \n aria-hidden="true">\n </span>\n <span\n *ngIf="caret && (model && model.length)" \n class="fa fa-fw fa-caret-down"\n aria-hidden="true">\n </span>\n</button>\n',styles:['button{-ms-flex-align:center;align-items:center;border-radius:4px;border:1px solid;cursor:pointer;font-family:"Open Sans",sans-serif;font-size:14px;height:34px;max-width:100%;min-width:40px;outline:0;overflow:visible;padding:5px 10px;position:relative;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;text-decoration:none;text-transform:none;vertical-align:bottom;transition:background-color .2s ease-out,color .2s ease-out,border-color .2s ease-out}button:disabled{opacity:.5;filter:Alpha(Opacity=50);background-image:none}button:disabled,button:disabled *{cursor:text!important}button.s-button-auxiliary{border-radius:20px}button.s-button-size-small{padding:0 20px;height:25px}button.s-button-with-icon.s-button-multiple,button.s-button-with-text{min-width:80px}button.s-button-with-icon.s-button-with-text.s-button-multiple{min-width:100px}button .s-button-icon,button .s-button-menu-icon,button .s-button-right-icon,button.s-button-with-icon.s-button-multiple:not(.s-button-with-text) .s-button-icon{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}button.s-button-multiple .s-button-text{display:-ms-flexbox;display:flex;-ms-flex-pack:left;justify-content:left;-ms-flex-align:left;align-items:left}button.s-button-with-icon .s-button-text{display:-ms-flexbox;display:flex;-ms-flex-pack:right;justify-content:right;-ms-flex-align:right;align-items:right}.s-button-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.s-button-menu-icon{right:10px;transition:transform .2s ease-out}.s-button-icon-margin-left{margin-left:10px}.s-button-icon-margin-right{margin-right:10px}.s-button-active .s-button-menu-icon{transform:rotateX(180deg)}button,button.s-button-priority-primary{background-color:#428bca;border-color:#428bca}button .s-button-icon,button .s-button-menu-icon,button .s-button-right-icon,button .s-button-text,button.s-button-priority-primary .s-button-icon,button.s-button-priority-primary .s-button-menu-icon,button.s-button-priority-primary .s-button-right-icon,button.s-button-priority-primary .s-button-text{color:#fff}button.s-button-priority-primary:hover,button:hover{background-color:#2a6496}button.s-button-priority-primary:focus,button:focus{background-color:#2a6496;border-color:#22dce6}button.s-button-active:not(:disabled),button.s-button-priority-primary.s-button-active:not(:disabled),button.s-button-priority-primary:active:not(:disabled),button:active:not(:disabled){background-color:#245682;border-color:#245682}button.s-button-priority-secondary{background-color:#7892a1;border-color:#7892a1}button.s-button-priority-secondary .s-button-icon,button.s-button-priority-secondary .s-button-menu-icon,button.s-button-priority-secondary .s-button-right-icon,button.s-button-priority-secondary .s-button-text{color:#fff}button.s-button-priority-secondary:hover{background-color:#546b79}button.s-button-priority-secondary:focus{background-color:#546b79;border-color:#22dce6}button.s-button-priority-secondary.s-button-active:not(:disabled),button.s-button-priority-secondary:active:not(:disabled){background-color:#495e6a;border-color:#495e6a}button.s-button-priority-default{background-color:#fff;border-color:#ccc}button.s-button-priority-default .s-button-icon,button.s-button-priority-default .s-button-menu-icon,button.s-button-priority-default .s-button-right-icon,button.s-button-priority-default .s-button-text{color:#333}button.s-button-priority-default:hover{background-color:#d9d9d9}button.s-button-priority-default:focus{background-color:#d9d9d9;border-color:#22dce6}button.s-button-priority-default.s-button-active:not(:disabled),button.s-button-priority-default:active:not(:disabled){background-color:#ccc;border-color:#ccc}button.s-button-priority-link{background-color:transparent;border-color:transparent}button.s-button-priority-link .s-button-icon,button.s-button-priority-link .s-button-menu-icon,button.s-button-priority-link .s-button-right-icon,button.s-button-priority-link .s-button-text{color:#428bca}button.s-button-priority-link:hover{background-color:transparent}button.s-button-priority-link:hover .s-button-icon,button.s-button-priority-link:hover .s-button-menu-icon,button.s-button-priority-link:hover .s-button-right-icon,button.s-button-priority-link:hover .s-button-text{color:#2a6496}button.s-button-priority-link:focus{border-color:#22dce6;background-color:transparent}button.s-button-priority-link:focus .s-button-icon,button.s-button-priority-link:focus .s-button-menu-icon,button.s-button-priority-link:focus .s-button-right-icon,button.s-button-priority-link:focus .s-button-text{color:#2a6496}button.s-button-priority-link.s-button-active:not(:disabled),button.s-button-priority-link:active:not(:disabled){background-color:transparent;border-color:transparent}button.s-button-priority-link.s-button-active:not(:disabled) .s-button-icon,button.s-button-priority-link.s-button-active:not(:disabled) .s-button-menu-icon,button.s-button-priority-link.s-button-active:not(:disabled) .s-button-right-icon,button.s-button-priority-link.s-button-active:not(:disabled) .s-button-text,button.s-button-priority-link:active:not(:disabled) .s-button-icon,button.s-button-priority-link:active:not(:disabled) .s-button-menu-icon,button.s-button-priority-link:active:not(:disabled) .s-button-right-icon,button.s-button-priority-link:active:not(:disabled) .s-button-text{color:#245682}.s-button--slide.s-button-with-icon.s-button-multiple,.s-button--slide.s-button-with-text{min-width:40px}.s-button--slide .s-button-text{position:absolute;opacity:0;width:0}.s-button--slide:hover .s-button-text{transition:1s;position:relative;opacity:1;width:auto}.s-button--slide:hover.s-button--rotate-animation .s-button-icon,.s-button--slide:hover.s-button--rotate-animation .s-button-right-icon{transition:1.5s;transform:rotate(360deg)}']})],n)}(),xe=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,i.RouterModule,s.TieredMenuModule,l.TooltipModule],declarations:[ye],exports:[ye]})],e)}(),we=function(){function e(e,t){this.host=e,this.renderer=t,this.SELECTORS='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',this.slotChar="_",this.autoClear=!1,this.firstTime=!0}return e.prototype.setListeners=function(){var e=this;this.input=this.host.inputfieldViewChild.nativeElement,this.value=this.input.value,this.focusListener=this.renderer.listen(this.input,"focus",(function(){e.onInputFocus()})),this.blurListener=this.renderer.listen(this.input,"blur",(function(t){e.onInputBlur(t)})),this.keydownListener=this.renderer.listen(this.input,"keydown",(function(t){e.onKeyDown(t)})),this.keypressListener=this.renderer.listen(this.input,"keypress",(function(t){e.onKeyPress(t)})),this.inputListener=this.renderer.listen(this.input,"input",(function(t){e.onInputChange(t)})),this.pasteListener=this.renderer.listen(this.input,"paste",(function(t){e.handleInputChange(t)}))},e.prototype.ngOnInit=function(){var e=navigator.userAgent;this.androidChrome=/chrome/i.test(e)&&/android/i.test(e),this.createMaskFromDateFormat(),this.initMask()},Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(e){this._mask=e,this.initMask(),this.writeValue("")},enumerable:!0,configurable:!0}),e.prototype.writeValue=function(e){this.value=e,this.input&&(null==this.value?this.input.value="":this.input.value=this.value,this.checkVal(),this.focusText=this.input.value,this.updateFilledState())},e.prototype.onInputBlur=function(e){if(this.checkVal(),this.updateFilledState(),this.value!=this.focusText){!this.input.disabled&&(void 0===this.value||null===this.value||this.value.indexOf(this.slotChar)>=0)&&(this.value="",e.target.value="",this.host.updateModel(null)),this.updateModel(e);var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1),this.input.dispatchEvent(t)}},e.prototype.onKeyDown=function(e){if(!this.host.readonlyInput){var t,n,o,i=e.which||e.keyCode,r=/iphone/i.test(navigator.userAgent);this.oldVal=this.input.value,8===i||46===i||r&&127===i?(n=(t=this.caret()).begin,(o=t.end)-n==0&&(n=46!==i?this.seekPrev(n):o=this.seekNext(n-1),o=46===i?this.seekNext(o):o),this.clearBuffer(n,o),this.shiftL(n,o-1),this.updateModel(e),e.preventDefault()):13===i?(this.onInputBlur(e),this.updateModel(e)):27===i&&(this.input.value=this.focusText,this.caret(0,this.checkVal()),this.updateModel(e),e.preventDefault())}},e.prototype.onKeyPress=function(e){var t=this;if(!this.host.readonlyInput){var n,o,i,r=e.which||e.keyCode,a=this.caret();if(!(e.ctrlKey||e.altKey||e.metaKey||r<32||r>34&&r<41)){if(r&&13!==r){if(a.end-a.begin!=0&&(this.clearBuffer(a.begin,a.end),this.shiftL(a.begin,a.end-1)),(n=this.seekNext(a.begin-1))<this.len&&(o=String.fromCharCode(r),this.tests[n].test(o)))if(this.shiftR(n),this.buffer[n]=o,this.writeBuffer(),i=this.seekNext(n),/android/i.test(navigator.userAgent)){setTimeout((function(){t.caret(i)}),0)}else this.caret(i);e.preventDefault()}this.updateModel(e),this.updateFilledState()}}},e.prototype.checkVal=function(e){var t,n,o=this.input.value,i=-1,r=0;for(t=0;t<this.len;t++)if(this.tests[t]){for(this.buffer[t]=this.getPlaceholder(t);r++<o.length;)if(n=o.charAt(r-1),this.tests[t].test(n)){this.buffer[t]=n,i=t;break}if(r>o.length){this.clearBuffer(t+1,this.len);break}}else this.buffer[t]===o.charAt(r)&&r++,t<this.partialPosition&&(i=t);return e?this.writeBuffer():i+1<this.partialPosition?this.autoClear||this.buffer.join("")===this.defaultBuffer?(this.input.value&&(this.input.value=""),this.clearBuffer(0,this.len)):this.writeBuffer():(this.writeBuffer(),this.input.value=this.input.value.substring(0,i+1)),this.partialPosition?t:this.firstNonMaskPos},e.prototype.onInputFocus=function(){var e,t=this;this.host.readonlyInput||(clearTimeout(this.caretTimeoutId),this.focusText=this.input.value,e=this.checkVal(),this.caretTimeoutId=setTimeout((function(){t.input===document.activeElement&&(t.writeBuffer(),e==t.mask.replace("?","").length?t.caret(0,e):t.caret(e))}),10))},e.prototype.onInputChange=function(e){this.androidChrome?this.handleAndroidInput(e):this.handleInputChange(e)},e.prototype.handleInputChange=function(e){var t=this;this.host.readonlyInput||setTimeout((function(){var n=t.checkVal(!0);t.caret(n),t.updateModel(e)}),0)},e.prototype.updateModel=function(e){var t=e.target.value;null===t&&void 0===t||(this.value=t,this.host.onUserInput(e))},e.prototype.updateFilledState=function(){this.filled=this.input&&""!=this.input.value},e.prototype.focus=function(){this.input.focus()},e.prototype.initMask=function(){this.tests=[],this.partialPosition=this.mask.length,this.len=this.mask.length,this.firstNonMaskPos=null,this.defs={9:"[0-9]"};for(var e=this.mask.split(""),t=0;t<e.length;t++){"?"==(n=e[t])?(this.len--,this.partialPosition=t):this.defs[n]?(this.tests.push(new RegExp(this.defs[n])),null===this.firstNonMaskPos&&(this.firstNonMaskPos=this.tests.length-1),t<this.partialPosition&&(this.lastRequiredNonMaskPos=this.tests.length-1)):this.tests.push(null)}this.buffer=[];for(t=0;t<e.length;t++){var n;"?"!=(n=e[t])&&(this.defs[n]?this.buffer.push(this.getPlaceholder(t)):this.buffer.push(n))}this.defaultBuffer=this.buffer.join("")},e.prototype.caret=function(e,t){var n,o,i;if(this.input.offsetParent&&this.input===document.activeElement)return"number"!=typeof e?(this.input.setSelectionRange?(o=this.input.selectionStart,i=this.input.selectionEnd):document.selection&&document.selection.createRange&&(i=(o=0-(n=document.selection.createRange()).duplicate().moveStart("character",-1e5))+n.text.length),{begin:o,end:i}):(o=e,i="number"==typeof t?t:o,void(this.input.setSelectionRange?this.input.setSelectionRange(o,i):this.input.createTextRange&&((n=this.input.createTextRange()).collapse(!0),n.moveEnd("character",i),n.moveStart("character",o),n.select())))},e.prototype.getPlaceholder=function(e){return e<this.slotChar.length?this.slotChar.charAt(e):this.slotChar.charAt(0)},e.prototype.seekNext=function(e){for(;++e<this.len&&!this.tests[e];);return e},e.prototype.seekPrev=function(e){for(;--e>=0&&!this.tests[e]&&!this.tests[e];);return e},e.prototype.shiftL=function(e,t){var n,o;if(!(e<0)){for(o=this.seekNext(t),n=e;n<this.len;n++)if(this.tests[n]){if(!(o<this.len&&this.tests[n].test(this.buffer[o])))break;this.buffer[n]=this.buffer[o],this.buffer[o]=this.getPlaceholder(o),o=this.seekNext(o)}this.writeBuffer(),this.caret(Math.max(this.firstNonMaskPos,e))}},e.prototype.shiftR=function(e){var t,n,o,i=this.getPlaceholder(e);for(t=e;t<this.len;t++)if(this.tests[t]){if(n=this.seekNext(t),o=this.buffer[t],this.buffer[t]=i,!(n<this.len&&this.tests[n].test(o)))break;i=o}},e.prototype.handleAndroidInput=function(e){var t=this,n=this.input.value,o=this.caret();if(this.oldVal&&this.oldVal.length&&this.oldVal.length>n.length){for(this.checkVal(!0);o.begin>0&&!this.tests[o.begin-1];)o.begin--;if(0===o.begin)for(;o.begin<this.firstNonMaskPos&&!this.tests[o.begin];)o.begin++;setTimeout((function(){if(t.caret(o.begin,o.begin),t.isCompleted()){var e=n.replace(t.slotChar,"");t.updateCalendarValue(e)}}),0)}else{for(this.checkVal(!0);o.begin<this.len&&!this.tests[o.begin];)o.begin++;setTimeout((function(){if(t.caret(o.begin,o.begin),t.isCompleted()){var e=n.replace(t.slotChar,"");t.updateCalendarValue(e)}}),0)}},e.prototype.updateCalendarValue=function(e){var t=this.host.parseValueFromString(e);this.host.isSelectable(t.getDate(),t.getMonth(),t.getFullYear(),!1)&&(this.host.updateModel(e),this.host.updateUI())},e.prototype.clearBuffer=function(e,t){var n;for(n=e;n<t&&n<this.len;n++)this.tests[n]&&(this.buffer[n]=this.getPlaceholder(n))},e.prototype.writeBuffer=function(){this.input.value=this.buffer.join("")},e.prototype.createMaskFromDateFormat=function(){var e=this.host,t=this.autoClear?"?":"";if(!e.timeOnly){var n=e.dateFormat;t+=(n=n.replace(/y/g,"yy")).replace(/[^/*,.\-+\[\]\\]/g,"9"),e.showTime&&(t+=" ")}(e.showTime||e.timeOnly)&&(t+="99:99",e.showSeconds&&(t+=":99")),this._mask=t,this.initMask()},e.prototype.isCompleted=function(){for(var e=this.firstNonMaskPos;e<=this.lastRequiredNonMaskPos;e++)if(this.tests[e]&&this.buffer[e]===this.getPlaceholder(e))return!1;return!0},e.prototype.ngAfterViewChecked=function(){this.host.inputfieldViewChild&&this.firstTime&&(this.firstTime=!1,this.setListeners(),this.input.type="tel")},e.prototype.ngOnDestroy=function(){this.focusListener&&this.focusListener(),this.blurListener&&this.blurListener(),this.keydownListener&&this.keydownListener(),this.keypressListener&&this.keypressListener(),this.inputListener&&this.inputListener(),this.pasteListener&&this.pasteListener()},e.prototype.onKeydownEventTest=function(e){var t=this;if("Tab"==e.key){var n,o=document.querySelectorAll(this.SELECTORS),i=!1,r=!0;o.forEach((function(o){if(!e.shiftKey&&i&&o.id)return t.focusableElement(o.id,r),i=!1,void e.preventDefault();var a=window.document.activeElement.tagName;if(e.shiftKey&&o.id&&"INPUT"===o.tagName&&"BUTTON"==a&&(n=o.id,r=!1),o.id===t.host.inputId){if(n)return t.focusableElement(n,r),e.preventDefault(),void(r=!0);i=!0}else e.shiftKey&&o.id&&(n=o.id)}))}},e.prototype.focusableElement=function(e,t){window.document.getElementById(e).focus(),t&&this.host.hideOverlay()},e.ctorParameters=function(){return[{type:c.Calendar},{type:t.Renderer2}]},ae([t.Input()],e.prototype,"slotChar",void 0),ae([t.Input()],e.prototype,"autoClear",void 0),ae([t.HostListener("keydown",["$event"])],e.prototype,"onKeydownEventTest",null),e=ae([t.Directive({selector:"p-calendar[sCalendarMask]"})],e)}(),Ce=function(){function e(){}return e=ae([t.NgModule({declarations:[we],imports:[n.CommonModule],exports:[we]})],e)}(),Ie=function(){function e(){this.buttonId="s-collapse-button-"+n.nextId++,this.expandedLabel="Mostrar menos",this.collapsedLabel="Mostrar mais",this.disabled=!1,this.collapse=!0,this.collapsed=!0}var n;return n=e,e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){e.collapse&&this.onCollapse(e.collapse.currentValue)},e.prototype.toggle=function(){this.animating||(this.animating=!0,this.collapsed=!this.collapsed)},e.prototype.onToggleDone=function(){this.animating=!1},e.prototype.onCollapse=function(e){this.animating||(this.animating=!0,this.collapsed=e)},e.nextId=0,ae([t.Input()],e.prototype,"buttonId",void 0),ae([t.Input()],e.prototype,"expandedLabel",void 0),ae([t.Input()],e.prototype,"collapsedLabel",void 0),ae([t.Input()],e.prototype,"disabled",void 0),ae([t.Input()],e.prototype,"collapse",void 0),e=n=ae([t.Component({selector:"s-collapse-link",template:'<div *ngIf="!collapsed" @collapseContent (@collapseContent.done)="onToggleDone()">\n <ng-content></ng-content>\n</div>\n\n<button [id]="buttonId" type="button" class="s-collapse-button" (click)="toggle()" [disabled]="disabled">\n <span class="s-button-icon fa" [ngClass]="{\'fa-caret-down\': collapsed, \'fa-caret-up\': !collapsed}"\n aria-hidden="true"></span>\n <span class="s-button-text">{{ collapsed ? collapsedLabel : expandedLabel }}</span>\n</button>\n',animations:[d.trigger("collapseContent",[d.state("void",d.style({height:0,opacity:0})),d.state("*",d.style({height:"*",opacity:1})),d.transition("void <=> *",d.animate("400ms cubic-bezier(0.86, 0, 0.07, 1)"))])],styles:['button.s-collapse-button{-ms-flex-align:center;align-items:center;cursor:pointer;font-family:"Open Sans",sans-serif;font-size:14px;height:34px;max-width:100%;min-width:40px;outline:0;overflow:visible;padding:5px 20px;position:relative;text-decoration:none;text-transform:none;vertical-align:bottom;background-color:transparent;border-color:transparent}button.s-collapse-button:disabled{opacity:.5;filter:Alpha(Opacity=50);background-image:none}button.s-collapse-button:disabled,button.s-collapse-button:disabled *{cursor:text!important}button.s-collapse-button:focus,button.s-collapse-button:hover{background-color:rgba(26,26,26,0);border-color:rgba(26,26,26,0)}button.s-collapse-button.s-button-active:not(:disabled),button.s-collapse-button:active:not(:disabled){background-color:rgba(0,0,0,0);border-color:transparent}button.s-collapse-button .s-button-icon{left:10px;margin-top:-.5em;position:absolute;top:50%;width:20px}button.s-collapse-button .s-button-icon,button.s-collapse-button .s-button-text{color:#428bca}button.s-collapse-button .s-button-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;margin-left:10px;margin-right:10px}']})],e)}(),_e=function(){function e(){}return e=ae([t.NgModule({declarations:[Ie],exports:[Ie],imports:[n.CommonModule]})],e)}(),ke=function(){function e(){this.id="s-control-errors-"+n.nextId++,this.errorMessages={}}var n;return n=e,e.prototype.getErrorMessagesList=function(){var e=this;return this.control&&this.control.dirty?Object.keys(this.control.errors||{}).map((function(t){return e.errorMessages[t]})):[]},e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"control",void 0),ae([t.Input()],e.prototype,"errorMessages",void 0),ae([t.Input()],e.prototype,"form",void 0),e=n=ae([t.Component({selector:"s-control-errors",template:'<ng-container *ngFor="let errorMessage of getErrorMessagesList()">\n <div *ngIf="errorMessage" class="error-message">{{ errorMessage }}</div>\n</ng-container>\n',styles:[".error-message{color:#c13018;margin-top:5px;font-size:12px}"]})],e)}(),Te=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,u.FormsModule,u.ReactiveFormsModule],declarations:[ke],exports:[ke]})],e)}();(ve=e.FieldType||(e.FieldType={})).Autocomplete="Autocomplete",ve.Binary="Binary",ve.Boolean="Boolean",ve.Chips="Chips",ve.Date="Date",ve.DateTime="DateTime",ve.LocalDateTime="LocalDateTime",ve.Double="Double",ve.Enum="Enum",ve.Blob="Blob",ve.Integer="Integer",ve.Lookup="Lookup",ve.Money="Money",ve.Radio="Radio",ve.String="String",ve.Text="Text",ve.Time="Time",ve.Number="Number",ve.Custom="Custom",ve.Password="Password";var Se,Ee=function(e){var t=e.sm,n=void 0===t?12:t,o=e.md,i=void 0===o?6:o,r=e.lg,a=void 0===r?6:r,s=e.xl,l=void 0===s?6:s;this.sm=n,this.md=i,this.lg=a,this.xl=l},Fe=function(e){var t=this;this.required=e.required||function(){return!1},this.visible=e.visible||function(){return!0},this.id=e.id,this.name=e.name,this.label=e.label,this.infoSign=e.infoSign,this.tooltip=e.tooltip,this.placeholder=e.placeholder||"",this.showClear=e.showClear||!1,this.type=e.type,this.size=new Ee(e.size||{}),this.errorMessages=e.errorMessages,this.bottomTemplate=e.bottomTemplate,this.gridClass=Object.keys(this.size).map((function(e){return"ui-"+e+"-"+t.size[e]})),this.defaultValue=e.defaultValue,this.representedBy=e.representedBy},Le=function(t){function n(n){var o=t.call(this,re(re({},n),{type:e.FieldType.Autocomplete}))||this;return o.suggestions=[],Object.assign(o,n),o.suggestionsObservable.subscribe((function(e){return o.suggestions=e})),o}return ie(n,t),n}(Fe),Me=function(e){var t=this;void 0===e&&(e={}),this.hourFormat="24",this.dateFormat="dd/mm/yy",this.firstDayOfWeek=0,this.today="Hoje",this.clear="Limpar",this.dayNames=["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],this.dayNamesShort=["Dom","Seg","Ter","Qua","Qui","Sex","Sab"],this.dayNamesMin=["D","S","T","Q","Q","S","S"],this.monthNamesShort=["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],this.monthNames=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],Object.keys(e).forEach((function(n){return t[n]=e[n]||t[n]}))},Oe=function(e){void 0===e&&(e={}),this.thousandsSeparator=".",this.decimalSeparator=",",this.currencySymbol="R$",Object.assign(this,e)},Re=function(e){var t=this;void 0===e&&(e={}),this.calendar=new Me,this.number=new Oe,Object.keys(e).forEach((function(n){return t[n]=e[n]||t[n]}))},De=new Me,Ae=new Oe,Pe=new Re,Ne=w,ze=function(){function e(e,t){this.http=e,this.cookieService=t,this.localeOptionsAddress="https://cdn.senior.com.br/primeng/locales",this.localeOptionsVersion="3.0.0"}return e.prototype.get=function(){var e=this;return this.localeOptions?r.of(this.localeOptions):this.getLocaleConfig().pipe(a.tap((function(t){return e.localeOptions=t})))},e.prototype.getLocale=function(){var e=this;return this.locale?r.of(this.locale):r.from(this.getUserData()).pipe(a.map((function(t){return e.locale=t.locale||t.tenantLocale||"pt-BR",e.locale})))},e.prototype.getUserData=function(){try{return r.of(JSON.parse(this.cookieService.get("com.senior.token")))}catch(e){return console.warn("Unable to obtain user locale from cookie, calling getUser"),x.user.getUserData()}},e.prototype.getLocaleConfig=function(){var e=this;return this.getLocale().pipe(a.switchMap((function(t){return Ne.locale(t),e.http.get(e.localeOptionsAddress+"/"+e.localeOptionsVersion+"/"+t+".json").pipe(a.map((function(e){return new Re(e)})))})),a.catchError((function(e){return console.warn("Error getting locale configuration. Using fallback.",e),r.of(new Re)})))},e.ctorParameters=function(){return[{type:m.HttpClient},{type:C.CookieService}]},e=ae([t.Injectable()],e)}(),Ve=function(){function e(e){this.localeService=e}return e.prototype.transform=function(e,t){return null!=e?this.applyMask(e,t):r.of(e)},e.prototype.applyMask=function(e,t){return this.localeService.get().pipe(a.map((function(n){var o,i,r,a,s,l,p,c,d,u,m,f={prefix:null!==(r=null!==(o=null==t?void 0:t.prefix)&&void 0!==o?o:null===(i=null==n?void 0:n.number)||void 0===i?void 0:i.currencySymbol)&&void 0!==r?r:"R$",thousandsSeparator:null!==(l=null!==(a=null==t?void 0:t.thousandsSeparator)&&void 0!==a?a:null===(s=null==n?void 0:n.number)||void 0===s?void 0:s.thousandsSeparator)&&void 0!==l?l:".",decimalSeparator:null!==(d=null!==(p=null==t?void 0:t.decimalSeparator)&&void 0!==p?p:null===(c=null==n?void 0:n.number)||void 0===c?void 0:c.decimalSeparator)&&void 0!==d?d:",",scale:null!==(u=null==t?void 0:t.scale)&&void 0!==u?u:2,allowNegative:null===(m=null==t?void 0:t.allowNegative)||void 0===m||m},h=!new ne(e).isNaN();return y.applyMask(e,f,h)})))},e.ctorParameters=function(){return[{type:ze}]},e=ae([t.Pipe({name:"localizedBignumber"})],e)}(),Be=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),n.prototype.transform=function(t,n){return e.prototype.transform.call(this,t,n)},n=ae([t.Pipe({name:"localizedBignumberImpure",pure:!1})],n)}(Ve),Ue=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.scale=2,n}return ie(t,e),t}(Oe),je=function(){function e(e){this.localeService=e}return e.prototype.transform=function(e,t){return t||(t=new Ue),null!=e?this.applyMask(e,t):r.of(e)},e.prototype.applyMask=function(e,t){return this.localeService.get().pipe(a.map((function(n){var o=re(re({},n.number),t),i=o.scale,r=o.currencySymbol,a=o.thousandsSeparator,s=o.decimalSeparator,l=Number(e).toFixed(i),p=l.replace(/[^0-9]/g,""),c=p.slice(0,p.length-i).replace(/^0*/g,"").replace(/\B(?=(\d{3})+(?!\d))/g,a)||"0",d=p.slice(p.length-i),u=i?c+s+d:c,m=!Number(p);return""+(l.includes("-")&&!m?"-":"")+r+u})))},e.ctorParameters=function(){return[{type:ze}]},e=ae([t.Pipe({name:"localizedCurrency"})],e)}(),He=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),n.prototype.transform=function(t,n){return void 0===n&&(n=new Ue),e.prototype.transform.call(this,t,n)},n=ae([t.Pipe({name:"localizedCurrencyImpure",pure:!1})],n)}(je),$e=w,Ge=function(){function e(e){this.localeService=e}return e.prototype.transform=function(e,t){return void 0===t&&(t="L LTS"),this.localeService.get().pipe(a.map((function(){return e?$e(e).format(t):e})))},e.ctorParameters=function(){return[{type:ze}]},e=ae([t.Pipe({name:"localizedDate"})],e)}(),qe=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),n=ae([t.Pipe({name:"localizedDateImpure",pure:!1})],n)}(Ge),We=function(){function e(e){this.localeService=e}return e.prototype.transform=function(e,t){return r.from(this.localeService.getLocale()).pipe(a.map((function(n){var o=Number(e);if(e||!isNaN(o))return new Intl.NumberFormat(n,{minimumFractionDigits:t||0}).format(Number(e))})))},e.ctorParameters=function(){return[{type:ze}]},e=ae([t.Pipe({name:"localizedNumber"})],e)}(),Ke=w,Ye=function(){function e(e){this.localeService=e}return e.prototype.transform=function(e,t){return void 0===t&&(t="LTS"),this.localeService.get().pipe(a.map((function(){return e?Ke(e,"HH:mm:ss").format(t):e})))},e.ctorParameters=function(){return[{type:ze}]},e=ae([t.Pipe({name:"localizedTime"})],e)}(),Xe=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),n=ae([t.Pipe({name:"localizedTimeImpure",pure:!1})],n)}(Ye),Ze=function(){function e(){}var o;return o=e,e.forRoot=function(){return{ngModule:o,providers:[ze,je,Ge,Ye,We,He,qe,Xe,Ve,Be]}},e.forChild=function(){return{ngModule:o}},e=o=ae([t.NgModule({imports:[n.CommonModule],exports:[je,Ge,Ye,We,He,qe,Xe,Ve,Be],declarations:[je,Ge,Ye,We,He,qe,Xe,Ve,Be]})],e)}(),Je=function(e){function t(t){var n,o,i=e.call(this,t)||this;return i.allowNegative=null===(n=t.allowNegative)||void 0===n||n,i.numberLocaleOptions=t.numberLocaleOptions||new Oe,i.browserAutocomplete=t.browserAutocomplete,i.precision=t.precision,i.scale=null!==(o=t.scale)&&void 0!==o?o:2,i.alignTo=i.scale?y.AlignmentOptions.RIGHT:y.AlignmentOptions.LEFT,i.mask=t.mask,i.leftAddon=t.leftAddon,i.rightAddon=t.rightAddon,i.onBlur=t.onBlur,i.onFocus=t.onFocus,i.onComplete=t.onComplete,i.onInput=t.onInput,i}return ie(t,e),t}(Fe),Qe=function(e){function t(t){var n=e.call(this,t)||this;return n.accept=t.accept,n.files=t.files||[],n.chooseLabel=t.chooseLabel,n.removeLabel=t.removeLabel,n.cancelLabel=t.cancelLabel,n.successTooltip=t.successTooltip,n.multiple=t.multiple,n.onUploadFile=t.onUploadFile,n.onRemoveFile=t.onRemoveFile,n.onCancelUpload=t.onCancelUpload,n.onDownloadFile=t.onDownloadFile,n}return ie(t,e),t}(Fe),et=function(e){this.true=e.true,this.false=e.false,this.empty=e.empty,this.clear=e.clear},tt=function(e){function t(t){var n=e.call(this,t)||this;return n.verticalAlignment=t.verticalAlignment,n.optionsLabel=new et(t.optionsLabel),n.representedBy="radio",n.onBlur=t.onBlur,n.onFocus=t.onFocus,n.onClick=t.onClick,n}return ie(t,e),t}(Fe),nt=function(e){function t(t){var n=e.call(this,t)||this;return n.onChange=t.onChange,n.representedBy="switch",n}return ie(t,e),t}(Fe),ot=function(t){function n(n){var o=t.call(this,n)||this;if(o.view=n.view||"date",o.minDate=n.minDate,o.maxDate=n.maxDate,o.defaultDate=n.defaultDate,o.appendTo=n.appendTo,o.showOnFocus="boolean"!=typeof n.showOnFocus||n.showOnFocus,o.calendarLocaleOptions=n.calendarLocaleOptions||new Me,o.onBlur=n.onBlur,o.onFocus=n.onFocus,o.onSelect=n.onSelect,o.onInput=n.onInput,o.onClose=n.onClose,o.onTodayClick=n.onTodayClick,o.onClearClick=n.onClearClick,o.onMonthChange=n.onMonthChange,o.onYearChange=n.onYearChange,o.selectionMode=n.selectionMode||"single",o.rangeSeparator=n.rangeSeparator||"-",o.showSeconds=n.showSeconds,null===o.showSeconds||void 0===o.showSeconds)switch(o.type){case e.FieldType.DateTime:case e.FieldType.LocalDateTime:case e.FieldType.Time:o.showSeconds=!0}return o}return ie(n,t),n}(Fe),it=function(e){function t(t){var n=e.call(this,t)||this;return n.keyFilter=t.keyFilter,n.onAdd=t.onAdd,n.onRemove=t.onRemove,n.onChipClick=t.onChipClick,n.onFocus=t.onFocus,n.onBlur=t.onBlur,n}return ie(t,e),t}(Fe);(Se=e.NumberAlignmentOption||(e.NumberAlignmentOption={})).RIGHT="right",Se.LEFT="left";var rt,at=function(n){function o(){var t=null!==n&&n.apply(this,arguments)||this;return t.precision=15,t.scale=0,t.decimalSeparator=",",t.thousandsSeparator=".",t.alignTo=e.NumberAlignmentOption.LEFT,t.allowNegative=!0,t.regex=/\d/,t}var i;return ie(o,n),i=o,o.prototype.ngOnInit=function(){this.updateVariables(),n.prototype.ngOnInit.call(this)},o.prototype.ngOnChanges=function(e){!(e.placeholder&&e.placeholder.currentValue)&&this.scale&&(this.placeholder="0"+this.decimalSeparator+"".padEnd(this.scale,"0")),(e.scale||e.decimalSeparator||e.thousandsSeparator||e.alignTo||e.precision||e.allowNegative)&&this.updateVariables()},o.prototype.updateVariables=function(){this.options={align:this.alignTo,decimal:this.decimalSeparator,thousands:this.thousandsSeparator,precision:this.scale||0,prefix:"",suffix:"",allowNegative:this.allowNegative},this.calculateMaxLength()},o.prototype.calculateMaxLength=function(){var e=this.decimalSeparator.length,t=this.thousandsSeparator.length,n=this.precision+(this.scale?e:0);n+=Math.ceil((this.precision-(this.scale?this.scale:0))/3-1)*t,this.maxLength=n},o.prototype.handleKeypress=function(e){var t=e.key;this.thousandsSeparator.includes(t)||this.decimalSeparator.includes(t)||"-".includes(t)||this.regex.test(t)||"Enter".toUpperCase()===t.toUpperCase()?n.prototype.handleKeypress.call(this,e):e.preventDefault()},ae([t.Input()],o.prototype,"precision",void 0),ae([t.Input()],o.prototype,"scale",void 0),ae([t.Input()],o.prototype,"decimalSeparator",void 0),ae([t.Input()],o.prototype,"thousandsSeparator",void 0),ae([t.Input()],o.prototype,"alignTo",void 0),ae([t.Input()],o.prototype,"allowNegative",void 0),ae([t.Input(),t.HostBinding("attr.placeholder")],o.prototype,"placeholder",void 0),ae([t.HostBinding("attr.maxLength")],o.prototype,"maxLength",void 0),o=i=ae([t.Directive({selector:"input[sNumberInput]",providers:[{provide:u.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return i})),multi:!0}]})],o)}(I.CurrencyMaskDirective),st=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[at],exports:[at]})],e)}(),lt=function(t){function n(n){var o=t.call(this,n)||this;return o.numberLocaleOptions=n.numberLocaleOptions||new Oe,o.browserAutocomplete=n.browserAutocomplete,o.precision=n.precision,o.alignTo=n.alignTo||e.NumberAlignmentOption.LEFT,o.mask=n.mask,o.leftAddon=n.leftAddon,o.rightAddon=n.rightAddon,o.onBlur=n.onBlur,o.onFocus=n.onFocus,o.onComplete=n.onComplete,o.onInput=n.onInput,o}return ie(n,t),n}(Fe),pt=function(t){function n(n){var o=t.call(this,n)||this;return o.numberLocaleOptions=n.numberLocaleOptions||new Oe,o.alignTo=n.alignTo||e.NumberAlignmentOption.RIGHT,o.scale=n.scale||0===n.scale?n.scale:2,o}return ie(n,t),n}(lt),ct=function(e){function t(t){var n=e.call(this,t)||this;return n.numberLocaleOptions=t.numberLocaleOptions||new Oe,n}return ie(t,e),t}(pt),dt=function(t){function n(n){var o=t.call(this,re(re({},n),{type:e.FieldType.Lookup}))||this;return o.multiple=!1,o.searchTitle="Pesquisa avançada",o.searchEmptyTitle="Nenhum registro encontrado",o.filterLabel="Filtrar",o.filterTitle="Filtros",o.clearLabel="Limpar",o.cancelLabel="Cancelar",o.selectLabel="Selecionar",o.recordLabel=" registro",o.recordsLabel=" registros",o.emptyFieldLabel="Não informado",o.autocompleteForceSelection=!0,o.onSelect=function(e){},o.onUnselect=function(e){},Object.assign(o,n),o.suggestionsObservable.subscribe((function(e){return o.lookupSuggestions=e})),o.searchObservable.pipe(a.delay(0)).subscribe((function(e){var t=e.totalRecords,n=e.gridData,i=e.searchTotalRecordsLabel;o._gridData=n,o._searchTotalRecords=t,o._searchTotalRecordsLabel=i})),o}return ie(n,t),Object.defineProperty(n.prototype,"gridData",{get:function(){return this._gridData},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"searchTotalRecords",{get:function(){return this._searchTotalRecords},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"searchTotalRecordsLabel",{get:function(){return this._searchTotalRecordsLabel},enumerable:!0,configurable:!0}),n}(Fe),ut=function(e){function t(t){var n=e.call(this,t)||this;return n.verticalAlignment=t.verticalAlignment,n.options=t.options,n.onBlur=t.onBlur,n.onFocus=t.onFocus,n.onClick=t.onClick,n}return ie(t,e),t}(Fe),mt=function(e){this.label=e.label,this.value=e.value},ft=function(e){function t(t){var n=e.call(this,t)||this;return n.appendTo=t.appendTo,n.dataKey=t.dataKey,n.optionLabel=t.optionLabel,n.autoDisplayFirst=t.autoDisplayFirst,n.options=t.options,n.multiple=t.multiple,n.multipleSelectedLabel=t.multipleSelectedLabel||"{0} registros selecionados",n.onClick=t.onClick,n.onChange=t.onChange,n.emptyMessage=t.emptyMessage,n}return ie(t,e),t}(Fe),ht=function(e){this.label=e.label,this.value=e.value},gt=function(e){function t(t){var n=e.call(this,t)||this;return n.cols=t.cols,n.rows=t.rows,n.keyFilter=t.keyFilter,n.style=t.style,n}return ie(t,e),t}(Fe),bt=function(e){function t(t){var n=e.call(this,t)||this;return n.mask=t.mask,n.inputType=t.inputType,n.keyFilter=t.keyFilter,n.leftAddon=t.leftAddon,n.rightAddon=t.rightAddon,n.maxLength=t.maxLength||9999999,n.browserAutocomplete=t.browserAutocomplete,n.style=t.style,n.onBlur=t.onBlur,n.onFocus=t.onFocus,n.onComplete=t.onComplete,n.onInput=t.onInput,n}return ie(t,e),t}(Fe),vt=function(e){function t(t){var n=e.call(this,t)||this;return n.inputType=t.inputType,n.keyFilter=t.keyFilter,n.leftAddon=t.leftAddon,n.rightAddon=t.rightAddon,n.maxLength=t.maxLength||9999999,n.passwordStrength=t.passwordStrength,n.passwordStrengthOptions=t.passwordStrengthOptions,n.style=t.style,n.onBlur=t.onBlur,n.onFocus=t.onFocus,n.onComplete=t.onComplete,n.onInput=t.onInput,n}return ie(t,e),t}(Fe),yt=function(t){switch(t.type){case e.FieldType.Enum:return new ft(t);case e.FieldType.Autocomplete:return new Le(t);case e.FieldType.Money:return new ct(t);case e.FieldType.Integer:return new lt(t);case e.FieldType.Double:return new pt(t);case e.FieldType.Number:return new Je(t);case e.FieldType.String:case e.FieldType.Binary:return new bt(t);case e.FieldType.Password:return new vt(t);case e.FieldType.Text:return new gt(t);case e.FieldType.Boolean:return"switch"===t.representedBy?new nt(t):new tt(t);case e.FieldType.Date:case e.FieldType.DateTime:case e.FieldType.LocalDateTime:case e.FieldType.Time:return new ot(t);case e.FieldType.Lookup:return new dt(t);case e.FieldType.Radio:return new ut(t);case e.FieldType.Chips:return new it(t);case e.FieldType.Blob:return new Qe(t);case e.FieldType.Custom:return new(0,t.CustomFieldClass)(function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(t,["CustomFieldClass"]))}},xt=function(e,t){this.label=e,this.value=t},wt=function(){function n(e){this.hotkeysService=e,this.id="s-lookup-"+o.nextId++,this.autocompleteForceSelection=!0,this.disabled=!1,this.showSearch=!0,this.lookupAppendTo="body",this.searchTitle="Pesquisa avançada",this.searchEmptyTitle="Nenhum registro encontrado",this.searchFields=[],this.filterTitle="Filtros",this.filterLabel="Filtrar",this.clearLabel="Limpar",this.cancelLabel="Cancelar",this.selectLabel="Selecionar",this.emptyFieldLabel="Não informado",this.recordLabel=" registro",this.recordsLabel=" registros",this.onLookupRequest=new t.EventEmitter,this.onSearchRequest=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.onKeyUp=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onUnselect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.dialogVisible=!1,this.collapsed=!1,this.selected=[],this.transitionOptions="400ms cubic-bezier(0.86, 0, 0.07, 1)",this.originalFormValues={},this.ngUnsubscribe=new r.Subject,this.defaultFilterLoaded=!1}var o;return o=n,n.prototype.ngOnInit=function(){var t=this;this.searchGridFields||(this.searchGridFields=this.searchFields.map((function(e){return new yt(re({},e))}))),this.searchFields=this.searchFields.map((function(e){return new yt(re(re({},e),{size:{sm:12,md:12,lg:12,xl:12}}))})),this.searchGridFields=this.searchGridFields.map((function(n){n.width=t.getColWidth(n.label);var o=new Me(re({},n.calendarLocaleOptions));if(null==o?void 0:o.dateFormat){switch(n.type){case e.FieldType.Date:o.dateFormat=t._convertToMomentDateFormat(o.dateFormat);break;case e.FieldType.Time:o.dateFormat=t._convertToMomentHourFormat(o.hourFormat,o.dateFormat)}n.calendarLocaleOptions=o}return n}));var n=this.searchFields.reduce((function(e,n){return e[n.name]=new u.FormControl(n.defaultValue),t.originalFormValues[n.name]=n.defaultValue,e}),{});this.formGroupDialog=new u.FormGroup(n),this.onSearchRequest.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){return t.loading=!0})),this.onSelect.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){return t.onChange(t.value)})),this.onUnselect.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){return t.onChange(t.value)})),this.onClear.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){!t.multiple&&t.value&&t.onChange(null)})),this.onFocus.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){t.onTouched()})),this.onBlur.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(e){var n=t.value&&t.value[t.lookupDisplayField],o=e.target.value;if(!t.multiple&&n&&n!=o){e.target.value="",t.onChange("")}}))},n.prototype._convertToMomentHourFormat=function(e,t){return"dd/mm/yy"===t?"LTS":"12"===e?t.replace(/\bH\b/,"h").replace(/\bHH\b/,"hh"):"24"===e?t.replace(/\bh\b/,"H").replace(/\bhh\b/,"HH"):t},n.prototype._convertToMomentDateFormat=function(e){return e.replace(/\bd\b/,"D").replace(/\bdd\b/,"DD").replace(/\bo\b/,"DDD").replace(/\boo\b/,"DDDD").replace(/\bM\b/,"MMM").replace(/\bMM\b/,"MMMM").replace(/\bm\b/,"M").replace(/\bmm\b/,"MM").replace(/\by\b/,"YY").replace(/\byy\b/,"YYYY")},n.prototype.ngAfterViewInit=function(){this.autocomplete.onOverlayAnimationDone=function(e){}},n.prototype.ngOnChanges=function(e){this.dialogVisible&&e.searchGridData&&(this.loading=!1),this._setFocusFilter()},n.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},n.prototype.getGridData=function(){return this.searchGridData},n.prototype.getLookupSuggestions=function(){return this.lookupSuggestions},n.prototype.makeSearchRequestParams=function(e){var t=this.formGroupDialog.getRawValue(),n=re(re({},e),{filterData:t}),o=e.multiSortMeta;return this.multiSortMeta=o||this.multiSortMeta,n},n.prototype.lazyLoadGrid=function(e){var t=this.makeSearchRequestParams(e);this.onSearchRequest.next(t)},n.prototype.lazyLoadLookup=function(e){this.onLookupRequest.next(e.query)},n.prototype.setDefaultFilters=function(){var e=this;if(this.defaultFilter&&!this.defaultFilterLoaded){var t={};this.defaultFilter.filter((function(t){return e.formGroupDialog.contains(t.field)})).forEach((function(e){var n;n=e.value instanceof Function?e.value():e.value,t[e.field]=n})),this.formGroupDialog.patchValue(t),this.defaultFilterLoaded=!0}},n.prototype.showDialog=function(){this.setDefaultFilters(),this.searchGridData=void 0,this.onTouched(),this.hotkeysService.pause(ue(this.hotkeysService.hotkeys)),this.setHotkeys();var e=[];this.multiple&&this.value?e=e.concat(this.value):this.value&&(e=[this.value]),this.selected=e,this.loading=!0,this.dialogVisible=!0},n.prototype.hideDialog=function(){var e=this.autocomplete,t=e.inputEL,n=e.multiInputEL;this.dialogVisible=!1,this.collapsed=!1,this.hotkeysService.unpause(ue(this.hotkeysService.pausedHotkeys)),this.multiple?n.nativeElement.focus():t.nativeElement.focus()},n.prototype.search=function(){this.resetTable(),this.collapsed=!0,this.dialog.moveOnTop()},n.prototype.clear=function(){this.formGroupDialog.reset(this.originalFormValues),this.resetTable()},n.prototype.resetTable=function(){this.table.reset()},n.prototype.select=function(){if(this.selected.length){var e=this.selected&&(this.multiple?this.selected:this.selected[0]);this.value=e,this.onSelect.next(e),this.hideDialog()}},n.prototype.onSelectionChange=function(e){e&&(Array.isArray(e)?this.selected=e:this.selected=[e])},n.prototype.registerOnChange=function(e){var t=this;this.onChange=function(n){t.writeValue(n),e(n)}},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.writeValue=function(e){this.value=e},n.prototype.setDisabledState=function(e){this.disabled=e},n.prototype.getFieldValue=function(e,t){return t.split(".").reduce((function(e,t){return void 0===e[t]?"":e[t]}),e)},n.prototype.getLabelForValue=function(e,t){if(!t)return e;var n=t.find((function(t){return t.value===e}));return n?n.label:e},n.prototype.isBooleanValue=function(e,t){var n=this.getFieldValue(e,t);return!0===n||!1===n},n.prototype.getBooleanLabel=function(e,t,n){var o=this.getFieldValue(e,t);return!0===o?n.true:!1===o?n.false:this.emptyFieldLabel},n.prototype.isNumber=function(e,t){return!new ne(this.getFieldValue(e,t)).isNaN()},n.prototype.setHotkeys=function(){var e=this;[this.newHotkey("alt+shift+l",this.clear.bind(this)),this.newHotkey("alt+shift+f",this.search.bind(this)),this.newHotkey("alt+shift+c",this.hideDialog.bind(this)),this.newHotkey("alt+shift+s",this.select.bind(this))].forEach((function(t){return e.hotkeysService.add(t)}))},n.prototype.newHotkey=function(e,t){return new f.Hotkey(e,(function(){return t(),!1}),["INPUT","SELECT","TEXTAREA"])},n.prototype.filterToggle=function(){this.animating||(this.animating=!0,this.collapsed=!this.collapsed)},n.prototype.onToggleDone=function(){this.animating=!1},n.prototype.getColWidth=function(e){var t=e.length;return t<14.286?"14.286em":t+"em"},n.prototype.getScale=function(e){return this.isFunction(e)?e():e},n.prototype.isFunction=function(e){return e instanceof Function},n.prototype.getIntegerMaskConfig=function(e){var t;return{scale:0,thousandsSeparator:null===(t=e.numberLocaleOptions)||void 0===t?void 0:t.thousandsSeparator,prefix:""}},n.prototype.getDoubleMaskConfig=function(e){var t,n;return{scale:this.getScale(e.scale),decimalSeparator:null===(t=e.numberLocaleOptions)||void 0===t?void 0:t.decimalSeparator,thousandsSeparator:null===(n=e.numberLocaleOptions)||void 0===n?void 0:n.thousandsSeparator,prefix:""}},n.prototype.getMoneyMaskConfig=function(e){var t,n,o;return{scale:this.getScale(e.scale),decimalSeparator:null===(t=e.numberLocaleOptions)||void 0===t?void 0:t.decimalSeparator,thousandsSeparator:null===(n=e.numberLocaleOptions)||void 0===n?void 0:n.thousandsSeparator,prefix:null===(o=e.numberLocaleOptions)||void 0===o?void 0:o.currencySymbol}},n.prototype.getNumberMaskConfig=function(e){var t,n,o;return{scale:this.getScale(e.scale),decimalSeparator:null===(t=e.numberLocaleOptions)||void 0===t?void 0:t.decimalSeparator,thousandsSeparator:null===(n=e.numberLocaleOptions)||void 0===n?void 0:n.thousandsSeparator,prefix:null===(o=e.numberLocaleOptions)||void 0===o?void 0:o.currencySymbol}},n.prototype.onTableRowDoubleClick=function(e){this.selected=[e],this.select()},n.prototype._setFocusFilter=function(){var e,t,n;if(this.dialogVisible&&!this.collapsed){var o=null===(n=null===(t=null===(e=this.dialog)||void 0===e?void 0:e.contentViewChild)||void 0===t?void 0:t.nativeElement)||void 0===n?void 0:n.getElementsByTagName("input")[0];o&&o.focus()}},n.nextId=0,n.ctorParameters=function(){return[{type:f.HotkeysService}]},ae([t.Input()],n.prototype,"formControlName",void 0),ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"autocompleteForceSelection",void 0),ae([t.Input()],n.prototype,"multiple",void 0),ae([t.Input()],n.prototype,"dataKey",void 0),ae([t.Input()],n.prototype,"required",void 0),ae([t.Input()],n.prototype,"disabled",void 0),ae([t.Input()],n.prototype,"showSearch",void 0),ae([t.Input()],n.prototype,"lookupSuggestions",void 0),ae([t.Input()],n.prototype,"lookupDisplayField",void 0),ae([t.Input()],n.prototype,"lookupDisplayFieldTooltip",void 0),ae([t.Input()],n.prototype,"lookupEmptyMessage",void 0),ae([t.Input()],n.prototype,"lookupAppendTo",void 0),ae([t.Input()],n.prototype,"searchTitle",void 0),ae([t.Input()],n.prototype,"searchEmptyTitle",void 0),ae([t.Input()],n.prototype,"searchEmptyDescription",void 0),ae([t.Input()],n.prototype,"searchGridData",void 0),ae([t.Input()],n.prototype,"searchTotalRecords",void 0),ae([t.Input()],n.prototype,"searchFields",void 0),ae([t.Input()],n.prototype,"searchGridFields",void 0),ae([t.Input()],n.prototype,"multiSortMeta",void 0),ae([t.Input()],n.prototype,"filterTitle",void 0),ae([t.Input()],n.prototype,"filterLabel",void 0),ae([t.Input()],n.prototype,"clearLabel",void 0),ae([t.Input()],n.prototype,"cancelLabel",void 0),ae([t.Input()],n.prototype,"selectLabel",void 0),ae([t.Input()],n.prototype,"emptyFieldLabel",void 0),ae([t.Input()],n.prototype,"recordLabel",void 0),ae([t.Input()],n.prototype,"recordsLabel",void 0),ae([t.Input()],n.prototype,"placeholder",void 0),ae([t.Input()],n.prototype,"searchTotalRecordsLabel",void 0),ae([t.Input()],n.prototype,"sortableColumnsDisabled",void 0),ae([t.Input()],n.prototype,"lookupRowProps",void 0),ae([t.Input()],n.prototype,"defaultFilter",void 0),ae([t.Output()],n.prototype,"onLookupRequest",void 0),ae([t.Output()],n.prototype,"onSearchRequest",void 0),ae([t.Output()],n.prototype,"onFocus",void 0),ae([t.Output()],n.prototype,"onBlur",void 0),ae([t.Output()],n.prototype,"onKeyUp",void 0),ae([t.Output()],n.prototype,"onSelect",void 0),ae([t.Output()],n.prototype,"onUnselect",void 0),ae([t.Output()],n.prototype,"onClear",void 0),ae([t.ViewChild(v.Table,{static:!1})],n.prototype,"table",void 0),ae([t.ViewChild(b.Dialog,{static:!1})],n.prototype,"dialog",void 0),ae([t.ViewChild(g.AutoComplete,{static:!1})],n.prototype,"autocomplete",void 0),n=o=ae([t.Component({selector:"s-lookup",template:'<div [ngClass]="{ inputgroup: showSearch }">\n <p-autoComplete\n #autocomplete\n [(ngModel)]="value"\n [disabled]="disabled"\n [dataKey]="dataKey"\n [multiple]="multiple"\n [inputId]="id + \'-autocomplete\'"\n [forceSelection]="autocompleteForceSelection"\n [suggestions]="getLookupSuggestions()"\n (completeMethod)="lazyLoadLookup($event)"\n (onSelect)="onSelect.next($event)"\n (onBlur)="onBlur.next($event)"\n (onFocus)="onFocus.next($event)"\n (onUnselect)="onUnselect.next($event)"\n (onClear)="onClear.next($event)"\n (onKeyUp)="onKeyUp.next($event)"\n [field]="lookupDisplayField"\n [emptyMessage]="lookupEmptyMessage"\n [dropdown]="!showSearch"\n [appendTo]="lookupAppendTo"\n [placeholder]="placeholder || \' \'"\n [autoHighlight]="true"\n inputStyleClass="mousetrap">\n <ng-template let-item pTemplate="selectedItem">\n <span\n class="ui-autocomplete-token-label ng-tns-c65-43 ng-star-inserted"\n [sTooltip]="lookupDisplayFieldTooltip ? item[lookupDisplayField] : null"\n tooltipPosition="top">\n {{item[lookupDisplayField]}}\n </span>\n </ng-template>\n </p-autoComplete>\n <button\n *ngIf="showSearch"\n pButton\n type="button"\n icon="fa fa-search"\n class="button-addon"\n [disabled]="disabled"\n (click)="showDialog()">\n </button>\n</div>\n<p-dialog\n appendTo="body"\n styleClass="s-lookup-modal"\n [header]="searchTitle"\n [(visible)]="dialogVisible"\n [modal]="true"\n (onHide)="hideDialog()"\n [blockScroll]="true"\n [focusOnShow]="true"\n [draggable]="false"\n [resizable]="false"\n #dialog>\n <div\n *ngIf="dialogVisible"\n class="s-lookup-modal-container">\n <div\n *ngIf="searchFields && searchFields.length"\n class="filter"\n [@collapseContent]="collapsed \n ? { value: \'hidden\', params: { transitionParams: transitionOptions } }\n : { value: \'visible\', params: { transitionParams: transitionOptions } }"\n (@collapseContent.done)="onToggleDone()">\n <form\n [formGroup]="formGroupDialog"\n novalidate\n autocomplete="off">\n <div\n *ngIf="!collapsed"\n class="form-content"\n [@childCollapseContent]="collapsed\n ? { value: \':leave\', params: { transitionParams: transitionOptions } }\n : { value: \':enter\', params: { transitionParams: transitionOptions } }">\n <div class="filter-title sds-section-title">{{ filterTitle }}</div>\n <div class="form-fields">\n <s-dynamic-form\n [fields]="searchFields"\n [form]="formGroupDialog">\n </s-dynamic-form>\n </div>\n <div class="ui-g">\n <div class="ui-g-12">\n <s-button\n [id]="id + \'-filter-button\'"\n type="submit"\n [label]="filterLabel"\n (onClick)="search()"\n sTooltip="(ALT + SHIFT + F)"\n tooltipPosition="top"\n showDelay="500">\n </s-button>\n <s-button\n [id]="id + \'-clear-button\'"\n type="button"\n [label]="clearLabel"\n (onClick)="clear()"\n priority="link"\n sTooltip="(ALT + SHIFT + L)"\n tooltipPosition="top"\n showDelay="500">\n </s-button>\n </div>\n </div>\n </div>\n </form>\n </div>\n <div\n *ngIf="searchFields && searchFields.length"\n class="filter-toggle">\n <div class="filter-toggle--start-border-mask"></div>\n <button\n [id]="id + \'-filter-toggle-button\'"\n type="button"\n (click)="filterToggle()">\n <span\n class="fa"\n [ngClass]="{\'fa-chevron-left\': !collapsed, \'fa-chevron-right\': collapsed}"\n aria-hidden="true">\n </span>\n </button>\n <div class="filter-toggle--end-border-mask"></div>\n </div>\n <div\n class="content"\n [ngClass]="{\'empty-content\': !searchTotalRecords && !loading}">\n <s-empty-state\n [id]="id + \'-empty-state\'"\n *ngIf="!searchTotalRecords && !loading"\n [title]="searchEmptyTitle"\n [description]="searchEmptyDescription"\n iconClass="fa fa-search">\n </s-empty-state>\n <p-table\n [dataKey]="dataKey"\n [value]="getGridData()"\n [columns]="searchGridFields"\n [lazy]="true"\n [scrollable]="true"\n [paginator]="true"\n sortMode="multiple"\n [totalRecords]="searchTotalRecords"\n [rows]="10"\n [selection]="selected"\n (onLazyLoad)="lazyLoadGrid($event)"\n *sLoadingState="loading"\n [multiSortMeta]="multiSortMeta"\n [attr.data-hidden]="!searchTotalRecords && !loading"\n [selectionMode]="multiple ? \'multiple\' : \'single\'"\n (selectionChange)="onSelectionChange($event)">\n <ng-template pTemplate="colgroup" let-columns>\n <colgroup>\n <col\n *ngIf="multiple"\n style="width: 50px" />\n <col\n *ngFor="let col of columns"\n [style.width]="col.width" />\n </colgroup>\n </ng-template>\n <ng-template pTemplate="header" let-columns>\n <tr>\n <th\n *ngIf="multiple"\n style="width: 50px">\n <s-table-header-checkbox\n [useAllObject]="lookupRowProps ? false : true"\n [rowProps]="lookupRowProps">\n </s-table-header-checkbox>\n </th>\n <th\n [style.width]="col.width"\n *ngFor="let col of columns"\n [pSortableColumn]="col.name"\n [pSortableColumnDisabled]="sortableColumnsDisabled?.includes(col.name)">\n <div class="senior-header">\n <span class="senior-header-title">{{ col.label }}</span>\n <p-sortIcon\n [field]="col.name"\n *ngIf="!sortableColumnsDisabled?.includes(col.name)">\n </p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template\n pTemplate="body"\n let-rowData\n let-columns\n let-rowIndex="rowIndex">\n <tr\n sNavigation\n [pSelectableRow]="rowData"\n [pSelectableRowIndex]="rowIndex"\n sDoubleClick (onDoubleClick)="onTableRowDoubleClick(rowData)">\n <td\n *ngIf="multiple"\n style="width: 50px"\n tabindex="0">\n <p-tableCheckbox\n [value]="rowData"\n [pSelectableRow]="rowData">\n </p-tableCheckbox>\n </td>\n <td\n [style.width]="col[\'width\']"\n *ngFor="let col of searchGridFields"\n [ngSwitch]="col.type"\n tabindex="0">\n <ng-container *ngSwitchCase="\'Boolean\'">\n <ng-container *ngIf="isBooleanValue(rowData, col.name); else emptyTemplate">\n <span>{{ getBooleanLabel(rowData, col.name, col.optionsLabel) }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Date\'">\n <ng-container *ngIf="getFieldValue(rowData, col.name); else emptyTemplate">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate: col.calendarLocaleOptions?.dateFormat || "L" | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'DateTime\'">\n <ng-container *ngIf="getFieldValue(rowData, col.name); else emptyTemplate">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'LocalDateTime\'">\n <ng-container *ngIf="getFieldValue(rowData, col.name); else emptyTemplate">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Time\'">\n <ng-container *ngIf="getFieldValue(rowData, col.name); else emptyTemplate">\n <span>{{ getFieldValue(rowData, col.name) | localizedTime: col.calendarLocaleOptions?.dateFormat || "LTS" | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Integer\'">\n <ng-container *ngIf="isNumber(rowData, col.name); else emptyTemplate">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getIntegerMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Double\'">\n <ng-container *ngIf="isNumber(rowData, col.name); else emptyTemplate">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getDoubleMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Money\'">\n <ng-container *ngIf="isNumber(rowData, col.name); else emptyTemplate">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getMoneyMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Number\'">\n <ng-container *ngIf="isNumber(rowData, col.name); else emptyTemplate">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getNumberMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Enum\'">\n <ng-container\n *ngIf="getLabelForValue(getFieldValue(rowData, col.name), col.options); else emptyTemplate"\n >\n <span> {{ getLabelForValue(getFieldValue(rowData, col.name), col.options) }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf="col.mask && col.mask()">\n <ng-container *ngIf="(isNumber(rowData, col.name) || getFieldValue(rowData, col.name))">\n <span>{{ getFieldValue(rowData, col.name) | sMaskFormatter: col.mask() }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf="!(col.mask && col.mask())">\n <ng-container *ngIf="(isNumber(rowData, col.name) || getFieldValue(rowData, col.name)); else emptyTemplate">\n <span>{{ getFieldValue(rowData, col.name) }}</span>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="paginatorright">\n <span [attr.data-hidden]="loading">\n {{\n searchTotalRecordsLabel ||\n searchTotalRecords?.toString() + (searchTotalRecords === 1 ? recordLabel : recordsLabel)\n }}\n </span>\n </ng-template>\n </p-table>\n </div>\n </div>\n <p-footer>\n <s-button\n [id]="id + \'-select-button\'"\n type="button"\n [label]="selectLabel"\n (onClick)="select()"\n sTooltip="(ALT + SHIFT + S)"\n tooltipPosition="top"\n showDelay="500"\n [disabled]="!selected?.length">\n </s-button>\n <s-button\n [id]="id + \'-cancel-button\'"\n type="button"\n priority="link"\n [label]="cancelLabel"\n (onClick)="hideDialog()"\n sTooltip="(ALT + SHIFT + C)"\n tooltipPosition="top"\n showDelay="500">\n </s-button>\n </p-footer>\n</p-dialog>\n<ng-template #emptyTemplate>\n <span [ngClass]="\'sds-empty-value\'">{{ emptyFieldLabel }}</span>\n</ng-template>\n',providers:[{provide:u.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return o})),multi:!0}],encapsulation:t.ViewEncapsulation.None,animations:[d.trigger("collapseContent",[d.state("hidden",d.style({width:"10px",padding:0})),d.state("visible",d.style({width:"*"})),d.transition("visible <=> hidden",[d.group([d.query("@childCollapseContent",d.animateChild()),d.animate("{{transitionParams}}")])])]),d.trigger("childCollapseContent",[d.state(":leave",d.style({opacity:0})),d.state(":enter",d.style({opacity:1})),d.transition("* <=> *",d.animate("{{transitionParams}}"))])],styles:["s-lookup.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-lookup .ui-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}s-lookup .inputgroup p-autocomplete+button,s-lookup p-autocomplete .ui-autocomplete-dropdown.ui-button{background-color:#fff;border-color:#ccc;border-width:1px 1px 1px 0;color:#333;min-height:34px;height:auto!important;min-width:auto;width:34px!important;overflow:hidden;border-top-left-radius:0;border-bottom-left-radius:0}.ui-fluid s-lookup .inputgroup,s-lookup p-autocomplete span.ui-autocomplete-multiple{display:-ms-flexbox;display:flex}.ui-fluid s-lookup .inputgroup p-autocomplete{display:inline-block}.ui-fluid s-lookup .inputgroup p-autocomplete,.ui-fluid s-lookup p-autocomplete .ui-autocomplete-input{width:calc(100% - 34px)}.ui-fluid s-lookup .inputgroup p-autocomplete .ui-autocomplete-input{width:100%}s-lookup .inputgroup p-autocomplete+button:enabled:hover,s-lookup .inputgroup p-autocomplete+button:focus{background-color:#e6e6e6;border-color:#ccc}s-lookup .inputgroup p-autocomplete .ui-widget .ui-inputtext{border-right-width:1px;border-right-style:solid}s-lookup .ui-autocomplete-input-token,s-lookup .ui-autocomplete-input-token input{width:100%}s-lookup .ui-autocomplete .ui-autocomplete-token{max-width:100%}s-lookup .ui-autocomplete .ui-autocomplete-token-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body .s-lookup-modal.ui-dialog .ui-dialog-content{padding:0;margin-bottom:0;max-height:none}s-lookup .ui-table-scrollable-body{min-width:100%}.s-lookup-modal{height:80%!important;max-width:100%!important;max-height:inherit!important;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column}.s-lookup-modal .ui-dialog-content{height:auto!important;-ms-flex:1;flex:1;overflow:auto}.s-lookup-modal .ui-dialog-footer,.s-lookup-modal .ui-dialog-header{-ms-flex-negative:0;flex-shrink:0;border-radius:0 0 4px 4px}.s-lookup-modal .s-lookup-modal-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%}.s-lookup-modal .s-lookup-modal-container .filter{position:relative;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;width:85%;background-color:rgba(229,234,234,.5);height:100%;padding:.571rem}.s-lookup-modal .s-lookup-modal-container .filter form{width:100%;height:100%}.s-lookup-modal .s-lookup-modal-container .filter form .form-content{height:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.s-lookup-modal .s-lookup-modal-container .filter form .form-content .filter-title{padding-left:.5rem}.s-lookup-modal .s-lookup-modal-container .filter form .form-content .form-fields{overflow-y:auto}.s-lookup-modal .s-lookup-modal-container .filter-toggle{-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;width:34px;border-radius:0 4px 4px 0}.s-lookup-modal .s-lookup-modal-container .filter-toggle button{-ms-flex-align:center;align-items:center;position:relative;background-color:rgba(229,234,234,.5);height:34px;width:100%;border:1px solid #e5eaea;outline:0;border-left:none;border-radius:0 4px 4px 0;cursor:pointer;text-decoration:none;text-transform:none;padding:7px;transition:background-color .2s ease-out,color .2s ease-out,border-color .2s ease-out}.s-lookup-modal .s-lookup-modal-container .filter-toggle button:focus,.s-lookup-modal .s-lookup-modal-container .filter-toggle button:hover{background-color:rgba(201,211,211,.5);border-color:#c9d3d3}.s-lookup-modal .s-lookup-modal-container .filter-toggle--start-border-mask{height:15px;border-left:1px solid #e5eaea}.s-lookup-modal .s-lookup-modal-container .filter-toggle--end-border-mask{height:calc(100% - 49px);border-left:1px solid #e5eaea}.s-lookup-modal .s-lookup-modal-container .content{-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:auto;flex-basis:auto;overflow-x:auto;padding:.5rem}.s-lookup-modal .s-lookup-modal-container .content.empty-content{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.s-lookup-modal .s-lookup-modal-container .content .s-loading-state-container,.s-lookup-modal .s-lookup-modal-container .content .s-loading-state-container .contents{height:100%}.s-lookup-modal .s-lookup-modal-container .content p-table{position:relative;height:100%}.s-lookup-modal .s-lookup-modal-container .content p-table .ui-table{height:100%}.s-lookup-modal .s-lookup-modal-container .content p-table .ui-table .ui-table-scrollable-wrapper{height:calc(100% - 60px)}.s-lookup-modal .s-lookup-modal-container .content p-table .ui-table .ui-table-scrollable-wrapper .ui-table-scrollable-view{height:100%}.s-lookup-modal .s-lookup-modal-container .content p-table .ui-table .ui-table-scrollable-wrapper .ui-table-scrollable-view .ui-table-scrollable-body{position:relative;height:calc(100% - 60px)}@media (max-width:767px){.s-lookup-modal{border:none!important;top:0!important;left:0!important;width:100%!important;height:100%!important}}@media (min-width:768px){.s-lookup-modal{width:80%!important}.s-lookup-modal .s-lookup-modal-container .filter{width:40%}}@media (min-width:1200px){.s-lookup-modal{width:60%!important}.s-lookup-modal .s-lookup-modal-container .filter{width:30%}}"]})],n)}(),Ct=function(){function e(){}return e.prototype.isFunction=function(e){return e instanceof Function},e.prototype.trigger=function(e){return e()},e}();(rt=e.DynamicType||(e.DynamicType={})).Autocomplete="Autocomplete",rt.Binary="Binary",rt.Boolean="Boolean",rt.Chips="Chips",rt.Date="Date",rt.DateTime="DateTime",rt.LocalDateTime="LocalDateTime",rt.Double="Double",rt.Enum="Enum",rt.Fieldset="Fieldset",rt.Integer="Integer",rt.Lookup="Lookup",rt.Money="Money",rt.Radio="Radio",rt.Row="Row",rt.Section="Section",rt.String="String",rt.Text="Text",rt.Time="Time",rt.Number="Number",rt.Password="Password";var It,_t=function(e){function t(t){return e.call(this,t)||this}return ie(t,e),t}((function(e){Object.assign(this,re({},e))})),kt=function(e){Object.assign(this,re({},e))},Tt=function(e){function t(t){var n=e.call(this,t)||this;return Object.assign(n,re({},t)),n}return ie(t,e),t}(kt),St=function(e){function t(t){return e.call(this,t)||this}return ie(t,e),t}(kt),Et=function(t){var n=t.type,o=t.representedBy;switch(n){case e.DynamicType.Autocomplete:return new Le(t);case e.DynamicType.Binary:case e.DynamicType.String:return new bt(t);case e.DynamicType.Password:return new vt(t);case e.DynamicType.Boolean:return"switch"===o?new nt(t):new tt(t);case e.DynamicType.Chips:return new it(t);case e.DynamicType.Date:case e.DynamicType.DateTime:case e.DynamicType.LocalDateTime:case e.DynamicType.Time:return new ot(t);case e.DynamicType.Double:return new pt(t);case e.DynamicType.Enum:return new ft(t);case e.DynamicType.Fieldset:return new Tt(t);case e.DynamicType.Integer:return new lt(t);case e.DynamicType.Number:return new Je(t);case e.DynamicType.Lookup:return new dt(t);case e.DynamicType.Money:return new ct(t);case e.DynamicType.Radio:return new ut(t);case e.DynamicType.Row:return new _t(t);case e.DynamicType.Section:return new St(t);case e.DynamicType.Text:return new gt(t)}},Ft=function(){function e(){this.errorMessages={}}return ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"configs",void 0),ae([t.Input()],e.prototype,"fields",void 0),ae([t.Input()],e.prototype,"form",void 0),ae([t.Input()],e.prototype,"errorMessages",void 0),e=ae([t.Component({selector:"s-dynamic-form",template:'<div *ngIf="configs; else templateFields">\n <ng-container *ngFor="let config of configs">\n <ng-container *sDynamicForm="{ id: id, config: config, group: form, errorMessages: errorMessages }"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #templateFields>\n <s-dynamic-field [id]="id" [fields]="fields" [form]="form" [errorMessages]="errorMessages"></s-dynamic-field>\n</ng-template>\n',encapsulation:t.ViewEncapsulation.None,styles:['label.required:after{content:" *";color:#c13018}']})],e)}(),Lt=function(){function e(){this.id="s-empty-state-"+n.nextId++,this.iconClass="fa fa-inbox",this.showPrimaryAction=!0,this.showSecondaryAction=!0,this.primaryModel=[],this.primaryAction=new t.EventEmitter,this.secondaryAction=new t.EventEmitter}var n;return n=e,e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"iconClass",void 0),ae([t.Input()],e.prototype,"title",void 0),ae([t.Input()],e.prototype,"description",void 0),ae([t.Input()],e.prototype,"showPrimaryAction",void 0),ae([t.Input()],e.prototype,"showSecondaryAction",void 0),ae([t.Input()],e.prototype,"primaryActionLabel",void 0),ae([t.Input()],e.prototype,"secondaryActionLabel",void 0),ae([t.Input()],e.prototype,"primaryModel",void 0),ae([t.Output()],e.prototype,"primaryAction",void 0),ae([t.Output()],e.prototype,"secondaryAction",void 0),e=n=ae([t.Component({selector:"s-empty-state",template:'<div [id]="id" class="container">\n <div [id]="id + \'-icon\'" class="icon">\n <i [attr.class]="iconClass ? iconClass : \'fa fa-cogs\'" aria-hidden="true"></i>\n </div>\n <div [id]="id + \'-title\'" class="title">{{title}}</div>\n <div [id]="id + \'-description\'" class="description" *ngIf="description">\n <p>{{description}}</p>\n </div>\n <div [id]="id + \'-actions\'" class="actions" *ngIf="showPrimaryAction && primaryActionLabel">\n <s-button [id]="id + \'-primary-action\'" type="button" [label]="primaryActionLabel"\n [model]="primaryModel" (click)="primaryAction.next()"></s-button>\n <s-button [id]="id + \'-secondary-action\'" *ngIf="showSecondaryAction && secondaryActionLabel" id="secondaryAction" type="button"\n [label]="secondaryActionLabel" priority="link" (click)="secondaryAction.next()"></s-button>\n </div>\n</div>',styles:[".container{width:100%;text-align:center}.title{font-weight:700;margin-bottom:10px}.description{margin-bottom:15px;color:#999;padding:0 20px;text-align:center}.description>p{margin:auto;max-width:400px;max-height:80px;overflow:hidden}.icon{color:#d8d8d8;font-size:6em}.actions{text-align:center;width:100%}"]})],e)}(),Mt=function(){function e(e){this.cookieService=e,this.iconClass="fa fa-exclamation-triangle"}return e.prototype.goBack=function(){var e=this.cookieService.get("com.senior.portal.url");window.open(e,"_top")},e.nextId=0,e.ctorParameters=function(){return[{type:C.CookieService}]},ae([t.Input()],e.prototype,"iconClass",void 0),ae([t.Input()],e.prototype,"title",void 0),ae([t.Input()],e.prototype,"description",void 0),ae([t.Input()],e.prototype,"primaryActionLabel",void 0),e=ae([t.Component({selector:"s-empty-state-go-back",template:'<s-empty-state \n [iconClass]="iconClass" \n [title]="title" \n [description]="description" \n (primaryAction)="goBack()"\n [primaryActionLabel]="primaryActionLabel">\n</s-empty-state>'})],e)}(),Ot=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,xe],providers:[C.CookieService],declarations:[Lt,Mt],exports:[Lt,Mt]})],e)}();(It=e.ValidateErrors||(e.ValidateErrors={})).MAX_FILE_SIZE="MAX_FILE_SIZE",It.MAX_FILE_LIMIT="MAX_FILE_LIMIT",It.UNSUPPORTED_EXTENSION="UNSUPPORTED_EXTENSION";var Rt,Dt={SM_MIN:0,SM_MAX:767,MD_MIN:768,MD_MAX:991,LG_MIN:992,LG_MAX:1199,XL_MIN:1200,XL_MAX:1/0},At=function(){function e(){throw new Error("Classe não deve ser instanciada.")}return e.addClass=function(e,t){e.nativeElement.className=e.nativeElement.className+" "+t},e.removeClass=function(e,t){e.nativeElement.className.includes(t)&&(e.nativeElement.className=e.nativeElement.className.replace(t,""))},e.exportCSV=function(e,t,n,o){var i=this;void 0===e&&(e=[]),void 0===t&&(t=[]),void 0===n&&(n=";"),void 0===o&&(o="download");var r="\ufeff";e.filter((function(e){return e.exportable&&e.field})).forEach((function(t,o){r+='"'+(t.header||t.field)+'"',o<e.length-1&&(r+=n)})),t.forEach((function(t){r+="\n",e.filter((function(e){return e.exportable&&e.field})).forEach((function(o,a){var s;Array.isArray(o.field)?s=o.field.map((function(e){return i.resolveFieldData(t,e)})).flat().filter((function(e){return null!=e})).join(o.separator):s=i.resolveFieldData(t,o.field);s=null!=s?String(s).replace(/"/g,'""'):"",r+='"'+s+'"',a<e.length-1&&(r+=n)}))}));var a=new Blob([r],{type:"text/csv;charset=utf-8;"});if(window.navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(a,o+".csv");else{var s=document.createElement("a");s.style.display="none",document.body.appendChild(s),void 0!==s.download?(s.setAttribute("href",URL.createObjectURL(a)),s.setAttribute("download",o+".csv"),s.click()):(r="data:text/csv;charset=utf-8,"+r,window.open(encodeURI(r))),document.body.removeChild(s)}},e.resolveFieldData=function(e,t){if(e&&t){if(this.isFunction(t))return t(e);if(-1==t.indexOf("."))return e[t];for(var n=t.split("."),o=e,i=0,r=n.length;i<r;++i){if(null==o)return null;o=o[n[i]]}return o}return null},e.isFunction=function(e){return!!(e&&e.constructor&&e.call&&e.apply)},e}(),Pt=function(){function n(e){this.sanitizer=e,this.id="s-file-upload-"+o.nextId++,this.chooseLabel="Anexar arquivos",this.removeLabel="Remover",this.cancelLabel="Cancelar",this.successTooltip="Arquivo anexado com sucesso",this.supportedExtensions=[],this.ariaLabelProgress="Carregando arquivo",this.disabled=!1,this.uploadHandler=new t.EventEmitter,this.removeFile=new t.EventEmitter,this.cancelUpload=new t.EventEmitter,this.downloadFile=new t.EventEmitter,this.validateErrors=new t.EventEmitter,this._files=[],this.ngUsubscribe=new r.Subject,this.inputValue=""}var o;return o=n,Object.defineProperty(n.prototype,"files",{get:function(){return this._files},set:function(e){var t=this;this._files=e.map((function(e){return t.isImage(e)&&(e.objectURL=t.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(e))),e}))},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){this.supportedExtensions=this.supportedExtensions.map((function(e){return e.replace(".","").toLowerCase()}))},n.prototype.ngOnDestroy=function(){this.ngUsubscribe.next(),this.ngUsubscribe.complete()},n.prototype.ngAfterContentInit=function(){this.update()},n.prototype.onResize=function(){this.update()},n.prototype.onFileSelect=function(t){var n,o,i=[];if(this.multiple||(this.files=[]),this.isFileLimitExceeded(t))return this.validateErrors.emit({files:t,validation:e.ValidateErrors.MAX_FILE_LIMIT}),void this.clearFileInput();try{for(var r=ce(t),a=r.next();!a.done;a=r.next()){var s=a.value;this.isUnsupportedFileExtension(s)?this.validateErrors.emit({files:[s],validation:e.ValidateErrors.UNSUPPORTED_EXTENSION}):this.isFileSizeExceeded(s)?this.validateErrors.emit({files:[s],validation:e.ValidateErrors.MAX_FILE_SIZE}):i.push(s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}i.length&&(this.files=this.files.concat(i),this.uploadHandler.emit({files:i})),this.clearFileInput()},n.prototype.onRemoveFile=function(e){var t=this.files.indexOf(e);this.files.splice(t,1).length&&this.removeFile.emit({file:e})},n.prototype.onCancelUpload=function(e){this.files.splice(e,1).length&&this.cancelUpload.emit(e),this.clearFileInput()},n.prototype.onDowloadFile=function(e){this.downloadFile.emit({index:e,anchor:this.anchor})},n.prototype.update=function(){var e=window.innerWidth;this.isSmallDevice=e<=Dt.SM_MAX},n.prototype.isImage=function(e){return/^image\//.test(e.type)},n.prototype.isFileLimitExceeded=function(e){return!!this.fileLimit&&this.files.length+e.length>this.fileLimit},n.prototype.isFileSizeExceeded=function(e){return!!this.maxFileSize&&e.size>this.maxFileSize},n.prototype.isUnsupportedFileExtension=function(e){var t;if(null===(t=this.supportedExtensions)||void 0===t?void 0:t.length){var n=e.name.split(".").pop().toLowerCase();return!this.supportedExtensions.includes(n)}return!1},n.prototype.clearFileInput=function(){this.inputUpload.nativeElement.value=null},n.nextId=0,n.ctorParameters=function(){return[{type:z.DomSanitizer}]},ae([t.ViewChild("inputUpload",{static:!1})],n.prototype,"inputUpload",void 0),ae([t.ViewChild("anchor",{static:!1})],n.prototype,"anchor",void 0),ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"chooseLabel",void 0),ae([t.Input()],n.prototype,"removeLabel",void 0),ae([t.Input()],n.prototype,"cancelLabel",void 0),ae([t.Input()],n.prototype,"successTooltip",void 0),ae([t.Input()],n.prototype,"multiple",void 0),ae([t.Input()],n.prototype,"accept",void 0),ae([t.Input()],n.prototype,"supportedExtensions",void 0),ae([t.Input()],n.prototype,"ariaLabelFileName",void 0),ae([t.Input()],n.prototype,"maxFileSize",void 0),ae([t.Input()],n.prototype,"fileLimit",void 0),ae([t.Input()],n.prototype,"ariaLabelProgress",void 0),ae([t.Input()],n.prototype,"ariaLabelSuccess",void 0),ae([t.Input()],n.prototype,"ariaLabelError",void 0),ae([t.Input()],n.prototype,"ariaLabelRemove",void 0),ae([t.Input()],n.prototype,"formGroup",void 0),ae([t.Input()],n.prototype,"disabled",void 0),ae([t.Input()],n.prototype,"files",null),ae([t.Output()],n.prototype,"uploadHandler",void 0),ae([t.Output()],n.prototype,"removeFile",void 0),ae([t.Output()],n.prototype,"cancelUpload",void 0),ae([t.Output()],n.prototype,"downloadFile",void 0),ae([t.Output()],n.prototype,"validateErrors",void 0),ae([t.HostListener("window:resize")],n.prototype,"onResize",null),n=o=ae([t.Component({selector:"s-file-upload",template:'<div\n [id]="id"\n class="s-fileupload">\n <div class="s-fileupload-choose">\n <input\n #inputUpload\n [id]="id+\'input-upload\'"\n type="file"\n name="file"\n [accept]="accept"\n [multiple]="multiple"\n (change)="onFileSelect($event.dataTransfer\n ? $event.dataTransfer.files\n : $event.target.files)"> \n <s-button\n [id]="id + \'upload-button\'"\n [label]="chooseLabel"\n (onClick)="inputUpload.click()"\n priority="primary"\n [disabled]="disabled || !!formGroup?.disabled"\n [auxiliary]="false">\n </s-button>\n </div>\n\n <section\n *ngIf="files.length" \n [id]="id + \'fileupload-list\'"\n class="s-fileupload-list"\n role="grid">\n <ng-container *ngFor="let file of files; let i = index">\n <div\n class="s-fileupload-list-file"\n role="row">\n <div\n [id]="id + \'-file-\' + i + \'-name\'"\n class="s-fileupload-list-file-name"\n role="gridcell">\n <ng-container *ngTemplateOutlet="file.savedFile || file.progress === 100\n ? descriptionUrl\n : description; context: {\n $implicit: file,\n index: i\n }">\n </ng-container>\n </div>\n <div\n class="s-fileupload-list-file-status"\n role="gridcell">\n <p-progressBar\n *ngIf="file.isUploading && !isSmallDevice"\n [style]="{ \'width\': \'250px\', \'background-color\': \'#d8d8d8\', \'border-radius\': \'0px\', \'height\': \'14px\'}"\n [value]="file.progress"\n [showValue]="false"\n role="alert"\n [attr.aria-label]="ariaLabelProgress">\n </p-progressBar>\n <span\n *ngIf="file.isUploading && isSmallDevice" \n [id]="id + \'-file-\' + i + \'-spin\'"\n class="fas fa-circle-notch fa-spin"\n [attr.aria-label]="ariaLabelProgress">\n </span>\n <span\n *ngIf="!file.isUploading && !file.error && file.progress === 100"\n [id]="id + \'-file-\' + i + \'-check\'"\n class="fas fa-check"\n role="alert"\n [attr.aria-label]="ariaLabelSuccess || successTooltip"\n [pTooltip]="successTooltip"\n tooltipPosition="top"\n showDelay="500"\n [appendTo]="\'body\'">\n </span>\n <span\n *ngIf="file.error?.message" \n [id]="id + \'-file-\' + i + \'-error\'"\n class="fas fa-times"\n role="alert"\n [pTooltip]="file.error?.message"\n tooltipPosition="top"\n showDelay="500"\n [appendTo]="\'body\'">\n </span>\n </div>\n <div\n class="s-fileupload-list-file-actions"\n role="gridcell">\n <a\n *ngIf="file.isUploading"\n [id]="id + \'-file-\' + i + \'-cancel\'"\n class="s-fileupload-list-file-actions-action"\n (click)="onCancelUpload(i)">\n {{cancelLabel}}\n </a>\n <a\n *ngIf="!file.isUploading && !(disabled || !!formGroup?.disabled)"\n role="button"\n tabindex="0"\n [id]="id + \'-file-\' + i + \'-remove\'"\n class="s-fileupload-list-file-actions-action"\n (click)="onRemoveFile(file)"\n [attr.aria-label]="ariaLabelRemove || removeLabel">\n {{removeLabel}}\n </a>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template\n #descriptionUrl\n let-file\n let-i = index>\n <a\n [id]="id + \'-file-\' + i + \'-name-link\'"\n tabindex="0"\n (click)="onDowloadFile(i)"\n [attr.aria-label]="ariaLabelFileName || file.name">{{file.name}}\n </a>\n <a\n style="display: none;"\n [href]="file.objectURL"\n target="_blank"\n download\n #anchor>\n </a>\n</ng-template>\n\n<ng-template\n #description\n let-file>\n <span\n tabindex="0"\n [attr.aria-label]="ariaLabelFileName || file.name">\n {{file.name}}\n </span>\n</ng-template>\n',styles:[".s-fileupload .s-fileupload-choose{position:relative;margin:15px 0;width:-webkit-max-content;width:max-content}.s-fileupload input[type=file]{display:none}.s-fileupload-list{border:1px solid #ccc}.s-fileupload-list-file:not(:first-child){border-top:1px solid #ccc}.s-fileupload-list .s-fileupload-list-file{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;padding:15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name>a{cursor:pointer;text-decoration:none}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.s-fileupload-list .s-fileupload-list-file .fas.fa-circle-notch{color:#d8d8d8;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-check{color:#0c9348;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-times{color:#c13018;font-size:12px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin-top:15px;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;width:100%}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action{text-decoration:none;color:#428bca}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :focus,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :visited,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action:hover{text-decoration:none}@media (min-width:768px){.s-fileupload-list .s-fileupload-list-file{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{width:auto;-ms-flex-positive:2;flex-grow:2}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{margin:0 15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin:0;width:auto}}"]})],n)}(),Nt=function(){function e(){}return e=ae([t.NgModule({declarations:[Pt],imports:[n.CommonModule,xe,l.TooltipModule,N.ProgressBarModule],exports:[Pt]})],e)}();(Rt=e.TooltipPosition||(e.TooltipPosition={})).Top="top",Rt.Bottom="bottom",Rt.Left="left",Rt.Right="right";var zt,Vt,Bt=function(){function n(){this.tooltip="",this.position=e.TooltipPosition.Top,this.left=0,this.top=0,this.visible=!1,this.escape=!1}return n=ae([t.Component({template:'<div\n class="tooltip"\n [ngClass]="[\'tooltip--\' + position]"\n [class.tooltip--visible]="visible"\n [ngStyle]="{\n \'left\': left + \'px\',\n \'top\': top + \'px\'\n }">\n <ng-template\n *ngIf="escape;\n then escapeTemplate;\n else noEscapeTemplate">\n </ng-template> \n</div>\n\n<ng-template #noEscapeTemplate>\n <span\n class="tooltip__content"\n [innerHTML]="tooltip">\n </span>\n</ng-template>\n\n<ng-template #escapeTemplate>\n <span class="tooltip__content">\n {{ tooltip }}\n </span>\n</ng-template>',styles:['.tooltip{background-color:#000;border-radius:2px;color:#fff;font-family:"Open Sans",sans-serif;font-size:14px;font-weight:400;line-height:21px;margin-top:5px;opacity:0;padding:8px;position:fixed;transform:translateX(-50%);text-align:center;max-width:150px;word-wrap:break-word;z-index:99999}.tooltip--visible{opacity:1;transition:opacity .3s}.tooltip::before{content:"";height:0;position:absolute;width:0}.tooltip--bottom{margin-top:8px;transform:translateX(-50%)}.tooltip--bottom::before{border:5px solid transparent;border-bottom:5px solid #000;left:calc(50% - 5px);top:-10px}.tooltip--top{margin-bottom:8px;transform:translate(-50%,-100%)}.tooltip--top::before{border:5px solid transparent;border-top:5px solid #000;left:calc(50% - 5px);bottom:-10px}.tooltip--left{margin-right:28px;transform:translate(calc(-100% - 7px),-50%)}.tooltip--left::before{border:5px solid transparent;border-left:5px solid #000;right:-10px;bottom:calc(50% - 5px)}.tooltip--right{margin-left:7px;transform:translateY(-50%)}.tooltip--right::before{border:5px solid transparent;border-right:5px solid #000;left:-10px;bottom:calc(50% - 5px)}']})],n)}();!function(e){e.Pressing="pressing",e.Tap="tap"}(zt||(zt={})),function(e){e.Focus="focus",e.Hover="hover"}(Vt||(Vt={}));var Ut,jt,Ht=function(){function n(t,n,o,i){this.elementRef=t,this.appRef=n,this.componentFactoryResolver=o,this.injector=i,this.position=e.TooltipPosition.Top,this.showDelay=500,this.tooltipEvent=Vt.Hover,this.escape=!1,this.visible=!0,this.mobileBehavior=zt.Pressing,this.componentRef=null}return n.prototype.ngOnInit=function(){this.validatePosition()},n.prototype.ngOnDestroy=function(){this.destroy()},n.prototype.onClick=function(){this.tooltipEvent!==Vt.Hover||navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/iPhone/i)||this.destroy()},n.prototype.onDocumentTouchStart=function(){this.tooltipEvent===Vt.Hover&&this.destroy()},n.prototype.onFocus=function(){this.tooltipEvent===Vt.Focus&&this.createTootip()},n.prototype.onBlur=function(){this.tooltipEvent===Vt.Focus&&this.destroy()},n.prototype.onMouseEnter=function(){this.tooltipEvent===Vt.Hover&&this.createTootip()},n.prototype.onMouseLeave=function(){this.tooltipEvent===Vt.Hover&&this.setHideTooltipTimeout()},n.prototype.onTouchStart=function(){this.tooltipEvent===Vt.Hover&&(window.clearTimeout(this.touchTimeout),this.touchTimeout=window.setTimeout(this.createTootip.bind(this),this.mobileBehavior===zt.Pressing?this.showDelay:0))},n.prototype.onTouchEnd=function(){this.tooltipEvent===Vt.Hover&&this.mobileBehavior===zt.Pressing&&(window.clearTimeout(this.touchTimeout),this.setHideTooltipTimeout())},n.prototype.validatePosition=function(){if(![e.TooltipPosition.Top,e.TooltipPosition.Right,e.TooltipPosition.Bottom,e.TooltipPosition.Left].includes(this.position))throw this.position=e.TooltipPosition.Top,new Error("Tooltip "+this.position+" position is unexpected")},n.prototype.setHideTooltipTimeout=function(){this.destroy()},n.prototype.createTootip=function(){var e;if(null===this.componentRef&&(null===(e=this.tooltip)||void 0===e?void 0:e.length)){var t=this.componentFactoryResolver.resolveComponentFactory(Bt);this.componentRef=t.create(this.injector),this.appRef.attachView(this.componentRef.hostView);var n=this.componentRef.hostView.rootNodes[0];document.body.appendChild(n),this.setTooltipComponentProperties(),this.showTimeout=window.setTimeout(this.showTooltip.bind(this),this.showDelay),this.displayTime&&window.setTimeout(this.destroy.bind(this),this.displayTime)}},n.prototype.showTooltip=function(){null!==this.componentRef&&(this.componentRef.instance.visible=!0)},n.prototype.setTooltipComponentProperties=function(){if(null!==this.componentRef){this.componentRef.instance.tooltip=this.tooltip,this.componentRef.instance.escape=this.escape;for(var t=this.elementRef.nativeElement.getBoundingClientRect(),n=t.left,o=t.right,i=t.top,r=t.bottom,a=r-i,s=o-n,l=!1,p=[];!l;){if(p.includes(e.TooltipPosition.Top)&&p.includes(e.TooltipPosition.Bottom)&&p.includes(e.TooltipPosition.Left)&&p.includes(e.TooltipPosition.Right))throw this.destroy(),new Error("No space to show tooltip");switch(this.position){case e.TooltipPosition.Top:if(p.includes(e.TooltipPosition.Top)){this.position=e.TooltipPosition.Left;break}if(i<=a+150){this.position=e.TooltipPosition.Bottom,p.push(e.TooltipPosition.Top),l=!1;break}this.componentRef.instance.left=Math.round(s/2+n),this.componentRef.instance.top=Math.round(i-20-5),l=!0;break;case e.TooltipPosition.Bottom:if(p.includes(e.TooltipPosition.Bottom)){this.position=e.TooltipPosition.Left;break}if(document.body.clientHeight-r<=a+150){this.position=e.TooltipPosition.Top,p.push(e.TooltipPosition.Bottom);break}this.componentRef.instance.left=Math.round(s/2+n),this.componentRef.instance.top=Math.round(r+20),l=!0;break;case e.TooltipPosition.Left:if(p.includes(e.TooltipPosition.Left)){this.position=e.TooltipPosition.Top;break}if(n<=s+150){this.position=e.TooltipPosition.Right,p.push(e.TooltipPosition.Left),l=!1;break}this.componentRef.instance.left=Math.round(n-20),this.componentRef.instance.top=Math.round(i+a/2-5),l=!0;break;case e.TooltipPosition.Right:if(p.includes(e.TooltipPosition.Right)){this.position=e.TooltipPosition.Top;break}if(document.body.clientWidth-o<=s+150){this.position=e.TooltipPosition.Left,p.push(e.TooltipPosition.Right),l=!1;break}this.componentRef.instance.left=Math.round(o+20),this.componentRef.instance.top=Math.round(i+a/2-5),l=!0}this.componentRef.instance.position=this.position}}},n.prototype.destroy=function(){null!==this.componentRef&&(window.clearTimeout(this.showTimeout),this.appRef.detachView(this.componentRef.hostView),this.componentRef.destroy(),this.componentRef=null)},n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ApplicationRef},{type:t.ComponentFactoryResolver},{type:t.Injector}]},ae([t.Input("sTooltip")],n.prototype,"tooltip",void 0),ae([t.Input("tooltipPosition")],n.prototype,"position",void 0),ae([t.Input()],n.prototype,"showDelay",void 0),ae([t.Input()],n.prototype,"displayTime",void 0),ae([t.Input()],n.prototype,"tooltipEvent",void 0),ae([t.Input()],n.prototype,"escape",void 0),ae([t.Input()],n.prototype,"visible",void 0),ae([t.Input()],n.prototype,"mobileBehavior",void 0),ae([t.HostListener("click"),t.HostListener("keydown")],n.prototype,"onClick",null),ae([t.HostListener("document:touchstart")],n.prototype,"onDocumentTouchStart",null),ae([t.HostListener("focus")],n.prototype,"onFocus",null),ae([t.HostListener("blur")],n.prototype,"onBlur",null),ae([t.HostListener("mouseenter")],n.prototype,"onMouseEnter",null),ae([t.HostListener("mouseleave")],n.prototype,"onMouseLeave",null),ae([t.HostListener("touchstart")],n.prototype,"onTouchStart",null),ae([t.HostListener("touchend")],n.prototype,"onTouchEnd",null),n=ae([t.Directive({selector:"[sTooltip]"})],n)}(),$t=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[Bt,Ht],exports:[Ht]})],e)}(),Gt=function(){function e(){}return e=ae([t.Component({selector:"s-info-sign-component",template:'<span class="info-sign">\n <span *ngTemplateOutlet="templateRef"></span>\n <i\n class="info-sign__icon fa fa-info-circle"\n aria-hidden="true"\n [sTooltip]="tooltip"\n [escape]="false"\n tooltipPosition="top"\n [displayTime]="5000"\n mobileBehavior="tap"\n showDelay="0">\n </i>\n</span>',styles:[".info-sign{-ms-flex-align:baseline;align-items:baseline;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start}.info-sign .info-sign__icon{padding:0 12px}"]})],e)}(),qt=function(){function e(e,t,n){this.templateRef=e,this.viewContainer=t,this.componentFactoryResolver=n}return e.prototype.ngOnInit=function(){if(!this.componentRef&&this.sInfoSign){this.viewContainer.clear();var e=this.componentFactoryResolver.resolveComponentFactory(Gt);this.componentRef=this.viewContainer.createComponent(e),this.componentRef.instance.templateRef=this.templateRef,this.componentRef.instance.tooltip=this.sInfoSign}else this.componentRef&&this.sInfoSign?this.componentRef.instance.tooltip=this.sInfoSign:(this.viewContainer.clear(),this.viewContainer.createEmbeddedView(this.templateRef))},e.prototype.ngOnDestroy=function(){this.componentRef&&this.componentRef.destroy()},e.ctorParameters=function(){return[{type:t.TemplateRef},{type:t.ViewContainerRef},{type:t.ComponentFactoryResolver}]},ae([t.Input()],e.prototype,"sInfoSign",void 0),e=ae([t.Directive({selector:"[sInfoSign]"})],e)}(),Wt=function(){function e(){}return e=ae([t.NgModule({imports:[$t,n.CommonModule],declarations:[qt,Gt],exports:[qt],entryComponents:[Gt]})],e)}(),Kt=function(){function e(){this.id="s-loading-state-"+n.nextId++,this.BLOCK_TIMEOUT_VALUE=300,this.UNBLOCK_TIMEOUT_VALUE=200}var n;return n=e,Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,e?this.block():this.unblock()},enumerable:!0,configurable:!0}),e.prototype.block=function(){var e=this;this.unblockTimeoutId&&(clearTimeout(this.unblockTimeoutId),this.unblockTimeoutId=void 0),this.blockTimeoutId||(this.blockTimeoutId=setTimeout((function(){e.blocking=!0,e.blockTimeoutId=void 0}),this.BLOCK_TIMEOUT_VALUE))},e.prototype.unblock=function(){var e=this;this.blockTimeoutId&&(clearTimeout(this.blockTimeoutId),this.blockTimeoutId=void 0),this.unblockTimeoutId||(this.unblockTimeoutId=setTimeout((function(){e.blocking=!1,e.unblockTimeoutId=void 0}),this.UNBLOCK_TIMEOUT_VALUE))},e.prototype.ngOnDestroy=function(){this.blockTimeoutId&&clearTimeout(this.blockTimeoutId),this.unblockTimeoutId&&clearTimeout(this.unblockTimeoutId)},e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"blockWindow",void 0),ae([t.Input()],e.prototype,"loading",null),e=n=ae([t.Component({selector:"s-loading-state",template:'<div\n [id]="id"\n class="s-loading-state-container"\n [ngClass]="{\'loading\': loading, \'blocking\': blocking, \'fullscreen\': blockWindow}">\n <div\n [id]="id + \'-loader\'"\n class="loader">\n <div\n [id]="id + \'-spinner\'"\n class="spinner">\n <div class="bounce bounce-1"></div>\n <div class="bounce bounce-2"></div>\n <div class="bounce bounce-3"></div>\n </div>\n <div\n [id]="id + \'-overlay\'"\n class="overlay">\n </div>\n </div>\n <div\n [id]="id + \'-contents\'"\n class="contents">\n <ng-container *ngTemplateOutlet="contents || originalContent"></ng-container>\n <ng-template #originalContent>\n <ng-content></ng-content>\n </ng-template>\n </div>\n</div>',styles:[".s-loading-state-container{position:relative}.s-loading-state-container>.loader{height:100%;opacity:0;position:absolute;transition:opacity .2s ease-out,display .2s ease-out;visibility:hidden;width:100%}.s-loading-state-container>.loader>.overlay{background-color:#fff;height:100%;opacity:.8;transition:opacity .2s ease-out,display .2s ease-out;width:100%}.s-loading-state-container>.loader>.spinner{display:table;left:50%;position:absolute;text-align:center;top:calc(50% - 9px);transform:translate(-50%);vertical-align:middle;z-index:2}.s-loading-state-container.blocking>.loader,.s-loading-state-container.loading>.loader{visibility:visible}.s-loading-state-container.blocking>.loader,.s-loading-state-container.blocking>.loader>.overlay,.s-loading-state-container.loading>.loader,.s-loading-state-container.loading>.loader>.overlay{cursor:wait;z-index:1}.s-loading-state-container.blocking>.contents,.s-loading-state-container.loading>.contents{z-index:0!important}.s-loading-state-container.loading>.loader>.spinner>.bounce{animation:1.2s ease-out infinite bounce;background-color:#333;border-radius:100%;display:inline-block;height:10px;width:10px}.s-loading-state-container.loading>.loader>.spinner>.bounce+.bounce{margin-left:15px}.s-loading-state-container.loading>.loader>.spinner>.bounce.bounce-1{animation-delay:0s}.s-loading-state-container.loading>.loader>.spinner>.bounce.bounce-2{animation-delay:.1s}.s-loading-state-container.loading>.loader>.spinner>.bounce.bounce-3{animation-delay:.2s}.s-loading-state-container.blocking.loading>.loader{opacity:1}.s-loading-state-container.fullscreen>.loader{left:0;position:fixed;top:0;z-index:1005}@keyframes bounce{100%,80%{transform:scale(1)}90%{transform:scale(1.8)}}::ng-deep .s-loading-state-container.loading.blocking s-loading-state .s-loading-state-container>.loader{opacity:0;visibility:hidden}::ng-deep .s-loading-state-container.loading.blocking s-loading-state .s-loading-state-container>.contents{z-index:0!important}"]})],e)}(),Yt=function(){function e(e,t,n,o){this.target=e,this.template=t,this.componentFactoryResolver=n,this.cdr=o,this._loading=!1}return Object.defineProperty(e.prototype,"sLoadingState",{get:function(){return this._loading},set:function(e){this._loading=e,this.loaderComponent&&(this.loaderComponent.instance.loading=e)},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.createComponent()},e.prototype.createComponent=function(){var e=this.componentFactoryResolver.resolveComponentFactory(Kt);this.loaderComponent=this.target.createComponent(e),this.loaderComponent.instance.contents=this.template,this.loaderComponent.instance.loading=this.sLoadingState,this.cdr.detectChanges()},e.prototype.ngOnDestroy=function(){this.loaderComponent.destroy()},e.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:t.ComponentFactoryResolver},{type:t.ChangeDetectorRef}]},ae([t.Input()],e.prototype,"sLoadingState",null),e=ae([t.Directive({selector:"[sLoadingState]"})],e)}(),Xt=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[Kt,Yt],exports:[Kt,Yt],entryComponents:[Kt]})],e)}(),Zt=function(){function e(){this.decimalSeparator=",",this.thousandsSeparator=".",this.precision=2}var n;return n=e,e.prototype.ngOnInit=function(){this.numberRegex="^((\\+?)|(-?))([0-9]{1,3})+((\\"+this.thousandsSeparator+"[0-9]{3,3})|((\\"+this.thousandsSeparator+"[0-9]{3,3})+(\\"+this.thousandsSeparator+"[0-9]{3,3}))|((\\"+this.thousandsSeparator+"[0-9]{3,3})+(\\"+this.decimalSeparator+"[0-9]{1,2}))|(\\"+this.decimalSeparator+"[0-9]{1,"+this.precision+"}))?$"},e.prototype.validate=function(e){return e.value&&!String(e.value).match(new RegExp(this.numberRegex,"g"))?{invalidNumber:!0}:null},ae([t.Input()],e.prototype,"decimalSeparator",void 0),ae([t.Input()],e.prototype,"thousandsSeparator",void 0),ae([t.Input()],e.prototype,"precision",void 0),e=n=ae([t.Directive({selector:"input[sLocalizedNumberInput]",providers:[{provide:u.NG_VALIDATORS,useExisting:t.forwardRef((function(){return n})),multi:!0}]})],e)}(),Jt=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[Zt],exports:[Zt]})],e)}(),Qt=function(){function e(){this.defs={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z]|[0-9]"}}return e.prototype.transform=function(e,t){for(var n,o=[],i=0,r=t.split(""),a=[],s=t.includes("?"),l=0;l<r.length;l++){var p=r[l];if("?"!=p)if(this.defs[p]){var c=this.defs[p],d=e.charAt(i);if(!new RegExp(c).test(d))throw new Error("Value doesn't match mask format");i<r.length&&(o.push(e.charAt(i)),i++)}else o.push(p),s&&l>n&&a.push(l);else n=l}if(o[o.length-1]!==e.charAt(e.length-1)&&a.length){var u=o.join(""),m=void 0,f=void 0,h=void 0,g=void 0;for(l=0;l<a.length;l++){var b=a[l];m=u.substr(0,b-1),f=u.substr(b-1,1),h=u.substr(b,1),g=u.substr(b+1),u=""+m+h+f+g}return""+u+e.substr(e.length-a.length)}return o.join("")},e=ae([t.Pipe({name:"sMaskFormatter"})],e)}(),en=function(){function e(){}return e=ae([t.NgModule({exports:[Qt],declarations:[Qt]})],e)}(),tn=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.precision=15,t.scale=0,t.decimalSeparator=",",t.alignTo=y.AlignmentOptions.LEFT,t.allowNegative=!0,t}var o;return ie(n,e),o=n,n.prototype.ngOnInit=function(){this.updateVariables(),e.prototype.ngOnInit.call(this)},n.prototype.ngOnChanges=function(e){!(e.placeholder&&e.placeholder.currentValue)&&this.scale&&(this.placeholder="0"+this.decimalSeparator+"".padEnd(this.scale,"0")),(e.scale||e.decimalSeparator||e.thousandsSeparator||e.alignTo||e.precision||e.allowNegative)&&this.updateVariables()},n.prototype.onKeypress=function(e){var t=e.code;"Minus"===t||"NumpadSubtract"===t?this.allowNegative&&(this.maxLength=this._maxLength+1):"Equal"!==t&&"NumpadAdd"!==t||(this.maxLength=this._maxLength)},n.prototype.updateVariables=function(){var e;this.options={align:this.alignTo,decimalSeparator:this.decimalSeparator,thousandsSeparator:null!==(e=this.thousandsSeparator)&&void 0!==e?e:".",scale:this.scale||0,prefix:"",suffix:"",allowNegative:this.allowNegative},this.calculateMaxLength()},n.prototype.calculateMaxLength=function(){var e,t,n=this.decimalSeparator.length,o=null!==(t=null===(e=this.thousandsSeparator)||void 0===e?void 0:e.length)&&void 0!==t?t:1,i=this.precision+(this.scale?n:0);i+=Math.ceil((this.precision-(this.scale?this.scale:0))/3-1)*o,this._maxLength=i,this.maxLength=i},ae([t.Input()],n.prototype,"precision",void 0),ae([t.Input()],n.prototype,"scale",void 0),ae([t.Input()],n.prototype,"decimalSeparator",void 0),ae([t.Input()],n.prototype,"thousandsSeparator",void 0),ae([t.Input()],n.prototype,"alignTo",void 0),ae([t.Input()],n.prototype,"allowNegative",void 0),ae([t.Input(),t.HostBinding("attr.placeholder")],n.prototype,"placeholder",void 0),ae([t.HostBinding("attr.maxLength")],n.prototype,"maxLength",void 0),ae([t.HostListener("keypress",["$event"])],n.prototype,"onKeypress",null),n=o=ae([t.Directive({selector:"input[sBignumberInput]",providers:[{provide:u.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return o})),multi:!0}]})],n)}(y.CurrencyMaskDirective),nn=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[tn],exports:[tn]})],e)}(),on=function(){function e(e,t){var o=this;this.table=e,this.tableService=t,this.id="s-table-header-checkbox-"+n.nextId++,this.ngUnsubscribe=new r.Subject,this.table.tableService.valueSource$.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){o.checked=o.updateCheckedState()})),this.table.tableService.selectionSource$.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(){o.checked=o.updateCheckedState()}))}var n;return n=e,e.prototype.ngOnInit=function(){this.checked=this.updateCheckedState()},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next()},e.prototype.onFocus=function(){this.hasFocus=!0},e.prototype.onBlur=function(){this.hasFocus=!1},e.prototype.isDisabled=function(){return this.disabled||!this.table.value||!this.table.value.length},e.prototype.onClick=function(){this.disabled||this.table.value&&this.table.value.length>0&&this.onToggleCheckbox(!this.checked)},e.prototype.updateCheckedState=function(){var e;return this.table.filteredValue?(e=this.table.filteredValue)&&e.length>0&&this.table.selection&&this.table.selection.length>0&&this.isAllFilteredValuesChecked():(e=this.table.value)&&e.length>0&&this.table.selection&&this.table.selection.length>0&&this.isAllValuesChecked()},e.prototype.onToggleCheckbox=function(e){var t=this,n=this.table,o=n.filteredValue,i=n.value,r=n.dataKey,a=e?o?o.slice():i.slice():[];if(e){var s=a.filter((function(e){return!t.table._selection.find((function(t){return e[r]===t[r]}))})).map((function(e){if(t.useAllObject)return e;var n={};return t.rowProps?t.rowProps.forEach((function(t){return n[t]=e[t]})):n[r]=e[r],n}));this.table._selection=ue(this.table._selection,s)}else i.forEach((function(e){t.table._selection=t.table._selection.filter((function(t){return t[r]!==e[r]}))}));this.table.updateSelectionKeys(),this.table.selectionChange.emit(this.table._selection),this.tableService.onSelectionChange(),this.table.isStateful()&&this.table.saveState()},e.prototype.isAllFilteredValuesChecked=function(){var e,t;if(this.table.filteredValue){try{for(var n=ce(this.table.filteredValue),o=n.next();!o.done;o=n.next()){var i=o.value;if(!this.table.isSelected(i))return!1}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return!0}return!1},e.prototype.isAllValuesChecked=function(){var e,t;if(this.table.value){try{for(var n=ce(this.table.value),o=n.next();!o.done;o=n.next()){var i=o.value;if(!this.table.isSelected(i))return!1}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return!0}return!1},e.nextId=0,e.ctorParameters=function(){return[{type:v.Table},{type:v.TableService}]},ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"disabled",void 0),ae([t.Input()],e.prototype,"rowProps",void 0),ae([t.Input()],e.prototype,"useAllObject",void 0),e=n=ae([t.Component({selector:"s-table-header-checkbox",template:'\n <div class="ui-chkbox ui-widget" (click)="onClick()">\n <div class="ui-helper-hidden-accessible">\n <input type="checkbox" [checked]="checked" (focus)="onFocus()" (blur)="onBlur()" [disabled]="isDisabled()">\n </div>\n <div [ngClass]="{\'ui-chkbox-box ui-widget ui-state-default\':true,\n \'ui-state-active\':checked, \'ui-state-disabled\': isDisabled(), \'ui-state-focus\': hasFocus}">\n <span [id]="id" class="ui-chkbox-icon ui-clickable" [ngClass]="{\'pi pi-check\':checked}"></span>\n </div>\n </div>\n '})],e)}(),rn=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],exports:[on],declarations:[on]})],e)}(),an=function(){function e(){}return e.prototype.onKeyDown=function(e){switch(e.key){case"Right":case"ArrowRight":this.isRow(e.target)?this.focusFirstColFromCurrentRow(e.target):this.isCol(e.target)&&this.focusNextSelectableCol(e.target),e.preventDefault();break;case"Left":case"ArrowLeft":this.isRow(e.target)?this.focusLastColFromPrevRow(e.target):this.isCol(e.target)&&this.focusPrevSelectableCol(e.target),e.preventDefault();break;case"Up":case"ArrowUp":this.isRow(e.target)?this.setPrevRowFocus(e.target):this.isCol(e.target)&&this.setAboveColFocus(e.target),e.preventDefault();break;case"Down":case"ArrowDown":this.isRow(e.target)?this.setNextRowFocus(e.target):this.isCol(e.target)&&this.setUnderColFocus(e.target),e.preventDefault()}},e.prototype.focusLastColFromPrevRow=function(e){var t=this.findPrevSelectableRow(e);t&&t.lastElementChild.focus()},e.prototype.focusFirstColFromCurrentRow=function(e){var t=e.firstElementChild;t&&t.focus()},e.prototype.focusNextSelectableCol=function(e){var t=e.nextElementSibling;if(!t){var n=e.parentElement;return this.setNextRowFocus(n)}t.focus()},e.prototype.focusPrevSelectableCol=function(e){var t=e.previousElementSibling;if(!t)return e.parentElement.focus();t.focus()},e.prototype.setAboveColFocus=function(e){var t=e.cellIndex,n=e.parentElement,o=this.findPrevSelectableRow(n);o&&o.cells[t].focus()},e.prototype.setUnderColFocus=function(e){var t=e.cellIndex,n=e.parentElement,o=this.findNextSelectableRow(n);o&&o.cells[t].focus()},e.prototype.setNextRowFocus=function(e){var t=this.findNextSelectableRow(e);t&&t.focus()},e.prototype.setPrevRowFocus=function(e){var t=this.findPrevSelectableRow(e);t&&t.focus()},e.prototype.isRow=function(e){return"tr"===e.tagName.toLocaleLowerCase()},e.prototype.isCol=function(e){return"td"===e.tagName.toLocaleLowerCase()},e.prototype.findPrevSelectableRow=function(e){var t=e.previousElementSibling;return t||null},e.prototype.findNextSelectableRow=function(e){var t=e.nextElementSibling;return t||null},ae([t.HostListener("keydown",["$event"])],e.prototype,"onKeyDown",null),e=ae([t.Directive({selector:"[sNavigation]"})],e)}(),sn=function(e){function n(t){var n=e.call(this,t)||this;return n.dt=t,n}return ie(n,e),n.prototype.onKeydown=function(e){if(this.isEnabled())switch(e.key){case"Enter":this.dt.toggleRow(this.data,e),e.preventDefault();break;default:e.preventDefault()}},n.ctorParameters=function(){return[{type:v.Table}]},ae([t.Input("sRowToggler")],n.prototype,"data",void 0),ae([t.HostListener("keydown",["$event"])],n.prototype,"onKeydown",null),n=ae([t.Directive({selector:"[sRowToggler]"})],n)}(v.RowToggler),ln=function(){function e(e,n){this.el=e,this.host=n,this.sTableFrozenPosition="left",this.isTableVisible=!1,this.onColumnsChanged=new t.EventEmitter,this.table=n,this.table.styleClass=(this.table.styleClass||"")+" s-table-frozen-position",this.setUpTableEvents(),window.addEventListener("resize",this.handleWindowResize.bind(this));var o=(new Date).getTime(),i=document.getElementsByTagName("head")[0];this.resetRowHeightClassName="resetTableRowsHeight_"+o;var r=document.createElement("style");r.innerHTML="."+this.resetRowHeightClassName+" tbody > tr, ."+this.resetRowHeightClassName+" thead > tr { height: auto; }",i.appendChild(r),this.fixBodyRowClassName="fixTableBodyRowsHeight_"+o,this.styleFixBodyRowHeight=document.createElement("style"),this.styleFixBodyRowHeight.innerHTML="."+this.fixBodyRowClassName+" tbody > tr { height: auto; }",i.appendChild(this.styleFixBodyRowHeight),this.fixHeadRowClassName="fixTableHeadRowsHeight_"+o,this.styleFixHeadRowHeight=document.createElement("style"),this.styleFixHeadRowHeight.innerHTML="."+this.fixHeadRowClassName+" thead > tr { height: auto; }",i.appendChild(this.styleFixHeadRowHeight);var a=document.createElement("style");a.innerHTML=".s-table-frozen-position .ui-table-frozen-view .sds-expanded-row > td { visibility: hidden; }",i.appendChild(a)}return Object.defineProperty(e.prototype,"sTableFrozenValue",{set:function(e){var t=this;setTimeout((function(){t.synchronizeRowHeight(),t.setUpRowResizeMonitoring()}))},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){"left"!==this.sTableFrozenPosition&&(this.applyStylesForTable(),this.setUpColumnMonitoring())},e.prototype.ngAfterContentChecked=function(){!this.isTableVisible&&this.table.el.nativeElement.offsetParent?(this.isTableVisible=!0,this.synchronizeRowHeight()):this.isTableVisible&&!this.table.el.nativeElement.offsetParent&&(this.isTableVisible=!1)},e.prototype.ngOnDestroy=function(){window.removeEventListener("resize",this.handleWindowResize.bind(this)),this.tableHeadObservable&&this.tableHeadObservable.disconnect(),this.rowExpandedObserver&&this.rowExpandedObserver.disconnect()},e.prototype.setUpTableEvents=function(){var e=this;this.table.onColResize.subscribe((function(){e.handleColResize()})),this.table.onRowExpand.subscribe((function(){e.setUpRowResizeMonitoring()}))},e.prototype.setUpRowResizeMonitoring=function(){var e=this;this.rowExpandedObserver&&this.rowExpandedObserver.disconnect(),this.rowExpandedObserver=new window.ResizeObserver((function(){e.applyHeightForExpandedRows()})),setTimeout((function(){var t=e.el.nativeElement.querySelectorAll(".ui-table-frozen-view .sds-expanded-row > td"),n=e.el.nativeElement.querySelectorAll(".ui-table-unfrozen-view .sds-expanded-row > td");t.forEach((function(t,o){var i=n[o],r=i.getBoundingClientRect().height;t.innerHTML='<div style="height: '+r+'px"></div>',t.style.padding="0px",e.rowExpandedObserver.observe(i)}))}))},e.prototype.setUpColumnMonitoring=function(){var e=this;this.tableHeadObservable=new MutationObserver((function(){e.synchronizeRowHeight(),e.onColumnsChanged.emit(null)})),ue(this.el.nativeElement.getElementsByTagName("thead")).forEach((function(t){e.tableHeadObservable.observe(t,{subtree:!0,childList:!0})}))},e.prototype.applyHeightForExpandedRows=function(){var e=this.el.nativeElement.querySelectorAll(".ui-table-frozen-view .sds-expanded-row > td"),t=this.el.nativeElement.querySelectorAll(".ui-table-unfrozen-view .sds-expanded-row > td");e.forEach((function(e,n){var o=t[n].getBoundingClientRect().height,i=e.getBoundingClientRect().height;Math.abs(o-i)>1&&(e.style.height=o+"px",e.innerHTML="<div></div>")}))},e.prototype.applyStylesForTable=function(){var e=this.el.nativeElement.querySelector(".ui-table-scrollable-wrapper");if(e){e.style.display="flex",e.style.flexDirection="row";var t=this.el.nativeElement.querySelector(".ui-table-frozen-view");if(t){t.style.order="1",t.style.borderRight="none",t.style.borderLeft="1px solid #dddddd",t.style.boxShadow="-5px 0 5px -5px #cccccc";var n=this.el.nativeElement.querySelector(".ui-table-unfrozen-view");n?n.style.position="unset":console.warn("Unable to find unfrozen element from table. Is the table configured with frozen template?")}else console.warn("Unable to find frozen element from table. Is the table configured with frozen template?")}else console.warn("Unable to find scroll-wrapper element from table. Is the table configured with frozen template?")},e.prototype.handleWindowResize=function(){this.synchronizeRowHeight()},e.prototype.handleColResize=function(){this.synchronizeRowHeight()},e.prototype.synchronizeRowHeight=function(){var e=ue(this.el.nativeElement.getElementsByClassName("ui-table-scrollable-body")).map((function(e){return ue(e.childNodes).find((function(e){return"TABLE"===e.tagName}))}));this.recalculateDefaultRowHeight(e),this.applyMaxRowHeight(e);var t=ue(this.el.nativeElement.getElementsByClassName("ui-table-scrollable-header-box")).map((function(e){return ue(e.childNodes).find((function(e){return"TABLE"===e.tagName}))}));this.recalculateDefaultRowHeight(t),this.applyMaxRowHeight(t,!0)},e.prototype.recalculateDefaultRowHeight=function(e){var t,n;try{for(var o=ce(e),i=o.next();!i.done;i=o.next()){var r=i.value;r.classList.remove(this.fixBodyRowClassName),r.classList.remove(this.fixHeadRowClassName),r.classList.add(this.resetRowHeightClassName)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.applyMaxRowHeight=function(e,t){var n,o,i,r,a,s,l,p;void 0===t&&(t=!1);var c=[];try{for(var d=ce(e),u=d.next();!u.done;u=d.next()){var m=u.value;try{for(var f=(i=void 0,ce(m.rows)),h=f.next();!h.done;h=f.next()){var g=h.value;g.classList.contains("sds-expanded-row")||c.push(g.getBoundingClientRect().height)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}if(c.length){var b=Math.max.apply(Math,ue(c));if(t){this.styleFixHeadRowHeight.innerHTML="."+this.fixHeadRowClassName+" thead > tr { height: "+b+"px; }";try{for(var v=ce(e),y=v.next();!y.done;y=v.next()){(m=y.value).classList.remove(this.resetRowHeightClassName),m.classList.add(this.fixHeadRowClassName)}}catch(e){a={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}}else{this.styleFixBodyRowHeight.innerHTML="."+this.fixBodyRowClassName+" tbody > tr { height: "+b+"px; }";try{for(var x=ce(e),w=x.next();!w.done;w=x.next()){(m=w.value).classList.remove(this.resetRowHeightClassName),m.classList.add(this.fixBodyRowClassName)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(p=x.return)&&p.call(x)}finally{if(l)throw l.error}}}}},e.ctorParameters=function(){return[{type:t.ElementRef},{type:v.Table}]},ae([t.Input()],e.prototype,"sTableFrozenPosition",void 0),ae([t.Input()],e.prototype,"sTableFrozenValue",null),e=ae([t.Directive({selector:"[sTableFrozenPosition]"})],e)}(),pn=new t.InjectionToken("hostProjectConfigs"),cn=function(){function e(){}var n;return n=e,e.forRoot=function(e){return{ngModule:n,providers:[{provide:pn,useValue:e}]}},e=n=ae([t.NgModule({})],e)}();(Ut=e.EnumColumnFieldType||(e.EnumColumnFieldType={})).STRING="STRING",Ut.NUMBER="NUMBER",Ut.BOOLEAN="BOOLEAN",Ut.DATE="DATE",Ut.CURRENCY="CURRENCY",Ut.ENUM="ENUM",Ut.LOOKUP="LOOKUP",Ut.LINK="LINK",Ut.TOKENS="TOKENS",(jt=e.EnumBadgeColors||(e.EnumBadgeColors={})).RED="sds-semantic-red",jt.ORANGE="sds-semantic-orange",jt.YELLOW="sds-semantic-yellow",jt.GREEN="sds-semantic-green",jt.BLUE="sds-semantic-blue";var dn,un,mn=function(){function n(e,t,n){this.viewContainerRef=e,this.translate=t,this.hostProjectConfigs=n,this.formattedColumns=[]}return n.prototype.ngOnChanges=function(e){this.validateComponentAttributes(e),this.createColumnsTemplate(e)},n.prototype.validateComponentAttributes=function(e){var t,n,o;if(!(null===(t=e.columns)||void 0===t?void 0:t.currentValue))throw new Error("The 'columns' attribute must be informed!");if(!(null===(n=e.rowValue)||void 0===n?void 0:n.currentValue))throw new Error("The 'rowValue' attribute must be informed!");if(!(null===(o=e.locale)||void 0===o?void 0:o.currentValue))throw new Error("The 'locale' attribute must be informed!")},n.prototype.createColumnsTemplate=function(e){var t=this;this.viewContainerRef.clear();var n=e.columns.currentValue,o=e.rowValue.currentValue,i=e.locale.currentValue;n.forEach((function(e){return t.formattedColumns.push(t.getColumnValue(e,o,i))})),this.viewContainerRef.createEmbeddedView(this.columnsTemplate)},n.prototype.getColumnSeparator=function(e){return e.separator?e.separator:" - "},n.prototype.getTranslationPrefix=function(e){return e.prefix?e.prefix:this.hostProjectConfigs.domain+"."+this.hostProjectConfigs.service+"."},n.prototype.isAttributeValueInvalid=function(e){return null==e||this.isArray(e)&&!e.length},n.prototype.getFormattedColumnValue=function(t,n,o,i,r){return r===t.attributes.length?i:t.type===e.EnumColumnFieldType.TOKENS?[].concat.apply([],n.filter((function(e){return e!==i}))):o},n.prototype.getAttributeValue=function(e,t){var n;return e.split("/").forEach((function(e){n||e.split(".").forEach((function(e,o){t&&(0===o?n=t[e]:n&&(n=n[e]))}))})),n},n.prototype.getNumberConfigs=function(e,t){return re(re({},t.number),{scale:null!==e.scale&&void 0!==e.scale?this.getColumnScale(e.scale):t.number.scale,prefix:t.number.currencySymbol+" "})},n.prototype.getDateFormat=function(e,t){return e.dateFormat?e.dateFormat:t.calendar.dateFormat},n.prototype.getColumnValue=function(t,n,o){var i=this,r=this.getTranslationPrefix(t),a=this.getColumnSeparator(t),s=this.translate.instant(r+"empty_label"),l=t.style,p={"sds-badge":!1},c=t.attributes.map((function(a){var l,c=i.getAttributeValue(a,n);if(i.isAttributeValueInvalid(c))return s;var d=i.getNumberConfigs(t,o);switch(t.type){case e.EnumColumnFieldType.ENUM:return(null===(l=t.badgeConfigs)||void 0===l?void 0:l.length)&&(p=i.getBadgeClass(c,t.badgeConfigs)),i.translate.instant(t.enumPrefix+c.toString().toLowerCase());case e.EnumColumnFieldType.CURRENCY:return y.applyMask(c,d,i.isNumber(c));case e.EnumColumnFieldType.DATE:var u=i.getDateFormat(t,o);return w(c).format(u);case e.EnumColumnFieldType.BOOLEAN:var m=c?"yes":"no";return i.translate.instant(r+m);case e.EnumColumnFieldType.NUMBER:return d.prefix="",y.applyMask(c,d,i.isNumber(c));case e.EnumColumnFieldType.TOKENS:return i.getTokens(c);default:return c}})),d=c.join(a),u=d.split(a).filter((function(e){return e===s})).length;return{style:l,columnValue:this.getFormattedColumnValue(t,c,d,s,u),badgeClass:p,separator:a,uninformed:s,type:t.type,tooltip:this.getColumnTooltip(t.tooltip),infoSign:this.getColumnInfoSign(t.infoSign),onLinkClick:t.onLinkClick,onColumnClick:t.onColumnClick}},n.prototype.getBadgeClass=function(e,t){var n,o={"sds-badge":!0};return o[null===(n=t.find((function(t){return t.enumValue===e})))||void 0===n?void 0:n.color.valueOf()]=!0,o},n.prototype.getColumnScale=function(e){return"function"==typeof e?e(this.rowValue):e},n.prototype.getColumnInfoSign=function(e){return null!=e?"function"==typeof e?e(this.rowValue):e:null},n.prototype.getColumnTooltip=function(e){return null!=e?"function"==typeof e?e(this.rowValue):e:""},n.prototype.isNumber=function(e){return!new ne(e).isNaN()},n.prototype.getTokens=function(e){if(!this.isArray(e))throw new Error("To use tokens an array must be informed");if(!this.isValidTokenArray(e))throw new Error("Not a valid token array. Must be a primitive values array or an objects with label attribute array");return this.isLabelObjectArray(e)?e:e.filter((function(e){return null!=e})).map((function(e){return{label:"symbol"==typeof e?e.toString():""+e}}))},n.prototype.isValidTokenArray=function(e){return this.isPrimitiveValuesArray(e)||this.isLabelObjectArray(e)},n.prototype.isPrimitiveValuesArray=function(e){return e.filter((function(e){return e!==Object(e)})).length===e.length},n.prototype.isLabelObjectArray=function(e){return e.filter((function(e){return null!==(null==e?void 0:e.label)&&void 0!==(null==e?void 0:e.label)})).length===e.length},n.prototype.isArray=function(e){return Array.isArray(e)},n.prototype.getSplittedString=function(e){var t=e.columnValue,n=e.separator,o=e.uninformed;if("string"==typeof t){var i=t.split(n);return i.map((function(e,t){var r=i.length-1===t;return{value:e,isUninformed:e===o,separator:r?"":n}}))}return null},n.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:V.TranslateService},{type:void 0,decorators:[{type:t.Inject,args:[pn]}]}]},ae([t.ViewChild("columnsTemplate",{static:!0})],n.prototype,"columnsTemplate",void 0),ae([t.Input()],n.prototype,"columns",void 0),ae([t.Input()],n.prototype,"rowValue",void 0),ae([t.Input()],n.prototype,"locale",void 0),n=ae([t.Component({template:'<ng-template #columnsTemplate>\n <td *ngFor="let column of formattedColumns"\n [ngStyle]="column.style"\n (click)="column.onColumnClick ? column.onColumnClick(rowValue) : null">\n\n <div *ngIf="column.type !== \'TOKENS\' || !isArray(column.columnValue); else tokensTemplate">\n <span *ngIf="column.type !== \'LINK\'"\n [sTooltip]="column.tooltip"\n [escape]="false"\n [ngClass]="column.badgeClass">\n <ng-container *ngTemplateOutlet="columnValueTemplate"></ng-container> \n </span>\n\n <a *ngIf="column.type === \'LINK\'"\n [sTooltip]="column.tooltip"\n [escape]="false"\n (click)="column.onLinkClick ? column.onLinkClick(rowValue) : null">\n <ng-container *ngTemplateOutlet="columnValueTemplate"></ng-container> \n </a>\n\n <ng-template #columnValueTemplate>\n <span *ngFor="let value of getSplittedString(column)">\n <span [ngClass]="{ \'sds-empty-value\': value.isUninformed }">{{value.value}}</span>\n <span>{{value.separator}}</span>\n </span>\n <ng-container *ngIf="!!column.infoSign">\n <span *sInfoSign="column.infoSign"></span>\n </ng-container>\n </ng-template>\n </div>\n\n <ng-template #tokensTemplate>\n <s-token-list\n [tokens]="column.columnValue"\n [hidePointerEvents]="true"\n >\n </s-token-list>\n <ng-container *ngIf="!!column.infoSign">\n <span *sInfoSign="column.infoSign"></span>\n </ng-container>\n </ng-template>\n </td>\n</ng-template>\n',selector:"s-table-columns",styles:[":host{display:none}"]}),se(2,t.Inject(pn))],n)}(),fn=function(){function e(){this.id="s-token-list-"+n.nextId++,this.removableTokens=!1,this.hidePointerEvents=!1,this.tokenSelected=new t.EventEmitter,this.tokenRemoved=new t.EventEmitter}var n;return n=e,e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"tokens",void 0),ae([t.Input()],e.prototype,"removableTokens",void 0),ae([t.Input()],e.prototype,"hidePointerEvents",void 0),ae([t.Output()],e.prototype,"tokenSelected",void 0),ae([t.Output()],e.prototype,"tokenRemoved",void 0),e=n=ae([t.Component({selector:"s-token-list",template:'<div\n [id]="id"\n class="token-list">\n <ng-container *ngFor="let token of tokens">\n <span\n [id]="token.id"\n class="token"\n [ngClass]="{ \'no-pointer-events\': hidePointerEvents }">\n <a\n [id]="(token.id || \'token\') + \'-label\'"\n class="token-label"\n (click)="tokenSelected.next(token)">\n {{ token.label }}\n </a>\n <span\n *ngIf="removableTokens && !token.notRemovable"\n [id]="token.id + \'-remove\'"\n class="token-icon fa fa-fw fa-close"\n (click)="tokenRemoved.next(token)">\n </span>\n </span>\n </ng-container>\n</div>',styles:['.no-pointer-events{pointer-events:none}.token-list{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:100%;padding:0 10px;text-transform:none}.token-list .token{-ms-flex-align:center;align-items:center;background-color:#ccc;border-radius:4px;color:#333;display:-ms-flexbox;display:flex;font:400 12px/150% "Open Sans",sans-serif;margin:2px 5px 0 0;max-width:100%;padding:2px 8px}.token-list .token-label{max-width:50ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.token-list .token:focus,.token-list .token:hover{background-color:#e5eaea}.token-list .token a{text-decoration:none;color:#333}']})],e)}(),hn=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[fn],exports:[fn]})],e)}(),gn=function(){function e(e,t){this.translate=e,this.hostProjectConfigs=t,this.enableExportSelectedRecords=!0}return e.prototype.ngOnChanges=function(e){var t;(null===(t=e.totalRecords)||void 0===t?void 0:t.currentValue)&&(this.totalRecordsText=this.translate.instant(this.getTranslatePrefix()+"total_records",{value:e.totalRecords.currentValue}))},e.prototype.getTranslatePrefix=function(){return this.hostProjectConfigs.domain+"."+this.hostProjectConfigs.service+"."},e.prototype.getTooltipText=function(){return this.translate.instant(this.getTranslatePrefix()+"export_to_csv")},e.prototype.getActions=function(){var e,t=this,n=[{id:"exportCurrentPage",label:this.translate.instant(this.getTranslatePrefix()+"export_current_page"),command:function(){return t.exportCurrentPage()}}];if(this.enableExportSelectedRecords&&n.push({id:"exportSelected",label:this.translate.instant(this.getTranslatePrefix()+"export_selected_records"),command:function(){return t.exportSelectedRecords()}}),this.loadAllRecords&&n.push({id:"exportAll",label:this.translate.instant(this.getTranslatePrefix()+"export_all_records"),command:function(){return t.exportAllRecords()}}),null===(e=this.customActions)||void 0===e?void 0:e.length){var o=this.customActions.map((function(e,t){return{id:"customAction_"+t,label:e.label,command:e.command}}));n.push.apply(n,ue(o))}return n},e.prototype.validateComponent=function(){if(!this.table)throw new Error("Table component not defined")},e.prototype.getColumnsToExport=function(){return ue(this.table.columns).map((function(e){var t,n={header:e.header,exportable:!0,field:e.field,separator:null!==(t=e.separator)&&void 0!==t?t:" - ",enumPrefix:e.enumPrefix};return!1===e.exportable&&(n.exportable=!1),e.attributes&&e.attributes.length&&(1===e.attributes.length?n.field=e.attributes[0]:n.field=e.attributes),n}))},e.prototype.getCurrentPageRowsToExport=function(e){return this.mapColumnsTranslations(e,this.table.value)},e.prototype.getSelectedRowsToExport=function(e){return this.mapColumnsTranslations(e,this.table.selection)},e.prototype.getPropertyValue=function(e,t){return t.split(".").reduce((function(e,t){return void 0===e[t]?void 0:e[t]}),e)},e.prototype.setPropertyValue=function(e,t,n){this.recursionSetValue(e,t.split("."),n)},e.prototype.recursionSetValue=function(e,t,n){var o=t[0];return 1===t.length?(e[o]=n,e):(e[o]=this.recursionSetValue((null==e?void 0:e[o])||{},t.slice(1),n),e)},e.prototype.mapColumnsTranslations=function(e,t){var n=this,o=e.filter((function(e){return e.enumPrefix}));return o.length?ue(t).map((function(e){var t=re({},e);return o.forEach((function(o){(Array.isArray(o.field)?o.field:[o.field]).forEach((function(i){var r=n.getPropertyValue(e,i);if(null!=r){var a=n.translateValue(o,r);n.setPropertyValue(t,i,a)}}))})),t})):t},e.prototype.translateValue=function(e,t){var n=t.toString().toLowerCase(),o=e.enumPrefix+n,i=this.translate.instant(o);if(o===i&&n.length>1&&(o=""+e.enumPrefix+n.substring(0,1)+"_"+n.substr(1),i=this.translate.instant(o)),o===i){var r=this.convertToSnakeCase(t.toString());o=""+e.enumPrefix+r,i=this.translate.instant(o)}return i},e.prototype.convertToSnakeCase=function(e){return e.replace(/([A-Z])/g,(function(e,t){return"_"+t.toLowerCase()})).replace(/^_/,"")},e.prototype.getExportFileName=function(){var e;return(null!==(e=this.exportFileName)&&void 0!==e?e:"download")+"_"+w(new Date).format("DD-MM-YYYY[_]HH:mm")},e.prototype.exportCurrentPage=function(){this.validateComponent();var e=this.getColumnsToExport(),t=this.getCurrentPageRowsToExport(e);At.exportCSV(e,t,void 0,this.getExportFileName())},e.prototype.exportSelectedRecords=function(){this.validateComponent();var e=this.getColumnsToExport(),t=this.getSelectedRowsToExport(e);At.exportCSV(e,t,void 0,this.getExportFileName())},e.prototype.exportAllRecords=function(){return le(this,void 0,void 0,(function(){var e,t,n;return pe(this,(function(o){switch(o.label){case 0:return this.validateComponent(),[4,this.loadAllRecords()];case 1:return e=o.sent(),t=this.getColumnsToExport(),n=this.mapColumnsTranslations(t,e),At.exportCSV(t,n,void 0,this.getExportFileName()),[2]}}))}))},e.ctorParameters=function(){return[{type:V.TranslateService},{type:void 0,decorators:[{type:t.Inject,args:[pn]}]}]},ae([t.Input()],e.prototype,"totalRecords",void 0),ae([t.Input()],e.prototype,"exportFileName",void 0),ae([t.Input()],e.prototype,"table",void 0),ae([t.Input()],e.prototype,"loadAllRecords",void 0),ae([t.Input()],e.prototype,"enableExportSelectedRecords",void 0),ae([t.Input()],e.prototype,"customActions",void 0),ae([t.Output()],e.prototype,"totalRecordsText",void 0),e=ae([t.Component({template:'<div class="paging-container">\n <span class="total-records">\n {{totalRecordsText}}\n </span>\n <s-button class="export-button" \n priority="default" \n iconClass="fa fa-fw fa-file-export" \n [disabled]="false" \n [auxiliary]="true" \n [tooltip]="getTooltipText()" \n [model]="getActions()"></s-button>\n</div>\n',selector:"s-table-paging",styles:[".paging-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.export-button{margin-left:6px}"]}),se(1,t.Inject(pn))],e)}(),bn=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,$t,hn,V.TranslateModule,xe,Wt],exports:[sn,an,mn,ln,gn],declarations:[sn,an,mn,ln,gn]})],e)}(),vn=function(){function e(){}return ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),e=ae([t.Component({template:'<div\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500">\n <s-lookup\n [id]="(field.id || field.name)"\n [multiple]="field.multiple"\n [formControl]="formControl"\n [placeholder]="field.placeholder"\n [lookupSuggestions]="field.suggestions"\n [dataKey]="field.dataKey"\n (onLookupRequest)="field.onSearch($event)"\n [lookupDisplayField]="field.displayField"\n [showSearch]="false"\n [lookupAppendTo]="field.appendTo"\n (onSelect)="field.onSelect ? field.onSelect($event) : null"\n (onUnselect)="field.onUnselect ? field.onUnselect($event) : null"\n (onClear)="field.onClear ? field.onClear($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n [lookupEmptyMessage]="field.emptyMessage">\n </s-lookup>\n</div>\n'})],e)}(),yn=function(){function e(){}return e.prototype.onClear=function(){this.formControl.reset()},ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),e=ae([t.Component({template:'<ng-container *ngIf="field.verticalAlignment;else horizontalAlignment">\n <div class="ui-g">\n <div class="ui-g-12">\n <p-radioButton\n [name]="field.name"\n [value]="true"\n [label]="field.optionsLabel.true"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-1\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton>\n </div>\n <div class="ui-g-12">\n <p-radioButton\n [name]="field.name"\n [value]="false"\n [label]="field.optionsLabel.false"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-2\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton>\n </div>\n <div\n *ngIf="!field.showClear && !field.required()"\n class="ui-g-12">\n <p-radioButton \n [name]="field.name"\n [value]="null"\n [label]="field.optionsLabel.empty"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-3\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton> \n </div>\n <div>\n <s-button\n *ngIf="field.showClear && !field.required() && !formControl.disabled"\n [label]="field.optionsLabel.clear || \'Clear selection\'"\n (onClick)="onClear()"\n priority="link">\n </s-button>\n </div>\n\n </div>\n</ng-container>\n\n<ng-template #horizontalAlignment>\n <div class="ui-g">\n <p-radioButton\n [name]="field.name"\n [value]="true"\n [label]="field.optionsLabel.true"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-1\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton>\n \n <p-radioButton\n [name]="field.name"\n [value]="false"\n [label]="field.optionsLabel.false"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-2\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton>\n\n <p-radioButton\n *ngIf="!field.showClear && !field.required()"\n [name]="field.name"\n [value]="null"\n [label]="field.optionsLabel.empty"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-3\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton>\n\n <s-button\n *ngIf="field.showClear && !field.required() && !formControl.disabled"\n style="margin-left: 40px;"\n [label]="field.optionsLabel.clear || \'Clear selection\'"\n (onClick)="onClear()"\n priority="link">\n </s-button>\n </div>\n</ng-template>\n'})],e)}(),xn=function(){function e(){}return ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),ae([t.Input()],e.prototype,"showTime",void 0),ae([t.Input()],e.prototype,"timeOnly",void 0),e=ae([t.Component({template:'<div\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500">\n \x3c!-- Remover as propriedades [showTransitionOptions] e [hideTransitionOptions] quando atualizar para o PrimeNG v10, esses atributos foram\n usados para remover um bug ocasionado pela animação do componente p-calendar, bug explicado nas issues: #ERPROM-5534, #ERPROM-8248 e #DSN-1045. --\x3e\n <p-calendar\n #calendar\n sCalendarMask\n [inputId]="(field.id || field.name)"\n [name]="field.name"\n [showIcon]="true"\n [timeOnly]="timeOnly"\n [selectionMode]="field.selectionMode"\n [rangeSeparator]="field.rangeSeparator"\n [showTime]="showTime"\n [showSeconds]="field.showSeconds"\n [showOnFocus]="field.showOnFocus"\n [formControl]="formControl"\n [icon]="timeOnly ? \'fa fa-clock\' : \'fa fa-calendar\'"\n [minDate]="field.minDate"\n [maxDate]="field.maxDate"\n [defaultDate]="field.defaultDate"\n [locale]="field.calendarLocaleOptions"\n [dateFormat]="field.calendarLocaleOptions.dateFormat"\n [hourFormat]="field.calendarLocaleOptions.hourFormat"\n [view]="field.view"\n [placeholder]="field.placeholder"\n inputStyleClass="mousetrap"\n [appendTo]="field.appendTo"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event): null"\n (onSelect)="field.onSelect ? field.onSelect($event) : null"\n (onClose)="field.onClose ? field.onClose($event) : null"\n (onTodayClick)="field.onTodayClick ? field.onTodayClick($event) : null"\n (onClearClick)="field.onClearClick ? field.onClearClick($event) : null"\n (onMonthChange)="field.onMonthChange ? field.onMonthChange($event) : null"\n (onYearChange)="field.onYearChange ? field.onYearChange($event) : null"\n [showTransitionOptions]="\'0ms\'"\n [hideTransitionOptions]="\'0ms\'">\n </p-calendar>\n</div>\n'})],e)}(),wn=function(){function e(){}return ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),e=ae([t.Component({template:'<p-chips\n *ngIf="field.keyFilter"\n [inputId]="(field.id || field.name)"\n [formControl]="formControl"\n [placeholder]="field.placeholder"\n [allowDuplicate]="false"\n [addOnTab]="true"\n [addOnBlur]="true"\n (onAdd)="field.onAdd ? field.onAdd($event) : null"\n (onRemove)="field.onRemove ? field.onRemove($event) : null"\n (onChipClick)="field.onChipClick ? field.onChipClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n [pKeyFilter]="field.keyFilter">\n</p-chips>\n\n<p-chips\n *ngIf="!field.keyFilter"\n [inputId]="(field.id || field.name)"\n [formControl]="formControl"\n [placeholder]="field.placeholder"\n [allowDuplicate]="false"\n [addOnTab]="true"\n [addOnBlur]="true"\n (onAdd)="field.onAdd ? field.onAdd($event) : null"\n (onRemove)="field.onRemove ? field.onRemove($event) : null"\n (onChipClick)="field.onChipClick ? field.onChipClick($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n</p-chips>\n'})],e)}(),Cn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),ae([t.Input()],n.prototype,"field",void 0),ae([t.Input()],n.prototype,"formControl",void 0),n=ae([t.Component({template:'<div class="ui-inputgroup">\n <span\n *ngIf="field.numberLocaleOptions.currencySymbol"\n class="ui-inputgroup-addon">\n {{ field.numberLocaleOptions.currencySymbol }}\n </span>\n <input\n *ngIf="!field.mask"\n type="text"\n [id]="(field.id || field.name)"\n [name]="field.name"\n [formControl]="formControl"\n sNumberInput\n [precision]="isFunction(field.precision) ? trigger(field.precision) : field.precision"\n [scale]="isFunction(field.scale) ? trigger(field.scale) : field.scale"\n [decimalSeparator]="field.numberLocaleOptions.decimalSeparator"\n [thousandsSeparator]="field.numberLocaleOptions.thousandsSeparator"\n [alignTo]="field.alignTo"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n pInputText\n [autocomplete]="field.browserAutocomplete ? \'on\' : \'off\'"\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="field.onFocus ? field.onFocus($event): null" />\n <p-inputMask\n *ngIf="field.mask"\n type="text"\n [inputId]="(field.id || field.name)"\n [name]="field.name"\n [formControl]="formControl"\n [mask]="field.mask"\n [placeholder]="field.placeholder"\n slotChar="_"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500"\n styleClass="mousetrap"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n (onFocus)="field.onFocus ? field.onFocus($event): null"\n (onComplete)="field.onComplete ? field.onComplete($event) : null"\n (onInput)="field.onInput ? field.onInput($event) : null" >\n </p-inputMask>\n</div>\n'})],n)}(Ct),In=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),ae([t.Input()],n.prototype,"field",void 0),ae([t.Input()],n.prototype,"formControl",void 0),n=ae([t.Component({template:'<s-file-upload [id]="(field.id || field.name)" [accept]="field.accept" [files]="field.files" [multiple]="field.multiple"\n [chooseLabel]="field.chooseLabel" [removeLabel]="field.removeLabel" [cancelLabel]="field.cancelLabel"\n [successTooltip]="field.successTooltip" (uploadHandler)="field.onUploadFile($event, field)"\n (removeFile)="field.onRemoveFile($event, field)" (cancelUpload)="field.onCancelUpload($event, field)"\n (downloadFile)="field.onDownloadFile($event, field)" [formGroup]="formControl"> \n</s-file-upload>\n'})],n)}(Ct),_n=function(){function e(){}return ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),e=ae([t.Component({template:'<div\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500">\n <s-lookup\n [id]="(field.id || field.name)"\n [multiple]="field.multiple"\n [formControl]="formControl"\n [lookupSuggestions]="field.lookupSuggestions"\n [dataKey]="field.dataKey"\n [placeholder]="field.placeholder"\n [searchFields]="field.searchFields"\n [searchGridFields]="field.searchGridFields"\n [searchGridData]="field.gridData"\n (onLookupRequest)="field.onLookupRequest($event)"\n (onSearchRequest)="field.onSearchRequest($event)"\n [lookupDisplayField]="field.lookupDisplayField"\n [searchTotalRecords]="field.searchTotalRecords"\n [searchTotalRecordsLabel]="field.searchTotalRecordsLabel"\n [searchTitle]="field.searchTitle"\n [selectLabel]="field.selectLabel"\n [searchEmptyTitle]="field.searchEmptyTitle"\n [filterLabel]="field.filterLabel"\n [filterTitle]="field.filterTitle"\n [clearLabel]="field.clearLabel"\n [cancelLabel]="field.cancelLabel"\n [emptyFieldLabel]="field.emptyFieldLabel "\n (onSelect)="field.onSelect($event)"\n (onUnselect)="field.onUnselect($event)"\n (onClear)="field.onClear ? field.onClear($event) : null"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n [lookupAppendTo]="field.appendTo"\n [lookupEmptyMessage]="field.emptyMessage"\n [recordLabel]="field.recordLabel"\n [recordsLabel]="field.recordsLabel"\n [defaultFilter]="field.defaultFilter"\n [autocompleteForceSelection]="field.autocompleteForceSelection">\n </s-lookup>\n</div>\n'})],e)}(),kn=function(n){function o(){var e=null!==n&&n.apply(this,arguments)||this;return e.onInput=new t.EventEmitter,e.onFocus=new t.EventEmitter,e.onComplete=new t.EventEmitter,e.ngUnsubscribe=new r.Subject,e}return ie(o,n),o.prototype.ngOnInit=function(){var e=this;this.onFocus.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onFocus&&e.field.onFocus(t)})),this.onInput.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onInput&&e.field.onInput(t)})),this.onComplete.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onComplete&&e.field.onComplete(t)}))},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},Object.defineProperty(o.prototype,"numberAlignmentOption",{get:function(){return e.NumberAlignmentOption},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"fieldType",{get:function(){return e.FieldType},enumerable:!0,configurable:!0}),ae([t.Input()],o.prototype,"field",void 0),ae([t.Input()],o.prototype,"formControl",void 0),ae([t.Output()],o.prototype,"onInput",void 0),ae([t.Output()],o.prototype,"onFocus",void 0),ae([t.Output()],o.prototype,"onComplete",void 0),o=ae([t.Component({template:'<p-inputMask\n *ngIf="field.mask; else noMask"\n type="text"\n [inputId]="(field.id || field.name)"\n [name]="field.name"\n [mask]="isFunction(field.mask) ? field.mask() : field.mask"\n [placeholder]="field.placeholder"\n slotChar="_"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500"\n styleClass="mousetrap"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n (onFocus)="onFocus.next($event)"\n (onComplete)="onComplete.next($event)"\n (onInput)="onInput.next($event)"\n [formControl]="formControl" >\n</p-inputMask>\n<ng-template #noMask>\n <ng-container>\n <div class="ui-inputgroup">\n <ng-container *ngIf="field.leftAddon">\n <span class="ui-inputgroup-addon">\n <span *ngIf="field.leftAddon.label">{{field.leftAddon.label}}</span>\n <span *ngIf="!field.leftAddon.label" [ngClass]="field.leftAddon.icon"></span>\n </span>\n </ng-container>\n\n <ng-container *ngTemplateOutlet="field.type === fieldType.Double && field.alignTo === numberAlignmentOption.LEFT ? localizedNumber : input"></ng-container>\n\n <ng-container *ngIf="field.rightAddon">\n <span class="ui-inputgroup-addon">\n <span *ngIf="field.rightAddon.label">{{field.rightAddon.label}}</span>\n <span *ngIf="!field.rightAddon.label" [ngClass]="field.rightAddon.icon"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n<ng-template #input>\n <input\n [id]="(field.id || field.name)"\n type="text"\n [name]="field.name"\n sNumberInput\n [precision]="isFunction(field.precision) ? trigger(field.precision) : field.precision"\n [scale]="isFunction(field.scale) ? trigger(field.scale) : field.scale"\n [decimalSeparator]="field.numberLocaleOptions.decimalSeparator"\n [thousandsSeparator]="field.numberLocaleOptions.thousandsSeparator"\n [alignTo]="field.alignTo"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n pInputText\n [autocomplete]="field.browserAutocomplete ? \'on\' : \'off\'"\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="onFocus.next($event)"\n [formControl]="formControl" />\n</ng-template>\n<ng-template #localizedNumber>\n <input\n [id]="(field.id || field.name)"\n type="text"\n [name]="field.name"\n sLocalizedNumberInput\n [precision]="isFunction(field.precision) ? trigger(field.precision) : field.precision"\n [decimalSeparator]="field.numberLocaleOptions.decimalSeparator"\n [thousandsSeparator]="field.numberLocaleOptions.thousandsSeparator"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n pInputText\n [autocomplete]="field.browserAutocomplete ? \'on\' : \'off\'"\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="onFocus.next($event)"\n [formControl]="formControl" />\n</ng-template>\n',encapsulation:t.ViewEncapsulation.None,styles:["s-number-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-number-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]})],o)}(Ct),Tn=function(){function e(){this.onClick=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.ngUnsubscribe=new r.Subject}return e.prototype.ngOnInit=function(){var e=this;this.onFocus.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onFocus&&e.field.onFocus(t)})),this.onClick.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onClick&&e.field.onClick(t)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),ae([t.Output()],e.prototype,"onClick",void 0),ae([t.Output()],e.prototype,"onFocus",void 0),e=ae([t.Component({template:'<ng-container *ngIf="field.verticalAlignment;else horizontalAlignment">\n <div class="ui-g">\n <div\n *ngFor="let option of field.options; let i = index"\n class="ui-g-12">\n <ng-container\n [ngTemplateOutlet]="radioButton"\n [ngTemplateOutletContext]="{option: option, index: i}">\n </ng-container>\n </div>\n </div>\n</ng-container>\n\n<ng-template #horizontalAlignment>\n <div class="ui-g">\n <ng-container\n *ngFor="let option of field.options; let i = index"\n [ngTemplateOutlet]="radioButton"\n [ngTemplateOutletContext]="{option: option, index: i}">\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #radioButton let-option="option" let-i="index">\n <p-radioButton\n [name]="field.name"\n [value]="option.value"\n [label]="option.label"\n [formControl]="formControl"\n [inputId]="(field.id || field.name) + \'-\' + i"\n [sTooltip]="field.tooltip"\n (onClick)="onClick.next($event)"\n (onFocus)="onFocus.next($event)"\n (onBlur)="field.onBlur ? field.onBlur($event) : null">\n </p-radioButton>\n</ng-template>\n'})],e)}(),Sn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ie(n,e),ae([t.Input()],n.prototype,"field",void 0),ae([t.Input()],n.prototype,"formControl",void 0),n=ae([t.Component({template:'<p-dropdown\n *ngIf="!field.multiple"\n [inputId]="(field.id || field.name)"\n [name]="field.name"\n [options]="isFunction(field.options) ? field.options() : field.options"\n [placeholder]="field.placeholder || \' \'"\n [formControl]="formControl"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500"\n [showClear]="field.showClear"\n dataKey="{{field.dataKey}}"\n optionLabel="{{field.optionLabel}}"\n [autoDisplayFirst]="field.autoDisplayFirst"\n [appendTo]="field.appendTo || \'body\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onChange)="field.onChange ? field.onChange($event) : null">\n</p-dropdown>\n<p-multiSelect\n *ngIf="field.multiple"\n [formControl]="formControl"\n [name]="field.name"\n [inputId]="(field.id || field.name)"\n [options]="isFunction(field.options) ? field.options() : field.options"\n [defaultLabel]="field.placeholder"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [emptyFilterMessage]="field.emptyMessage || \'Nenhum registro encontrado\'"\n [showDelay]="500"\n [selectedItemsLabel]="field.multipleSelectedLabel"\n [appendTo]="field.appendTo || \'body\'"\n (onClick)="field.onClick ? field.onClick($event) : null"\n (onChange)="field.onChange ? field.onChange($event) : null">\n</p-multiSelect>\n\n'})],n)}(Ct),En=function(){function e(){}return ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),e=ae([t.Component({template:'<textarea\n [id]="(field.id || field.name)"\n *ngIf="!field.keyFilter"\n pInputTextarea\n [rows]="field.rows"\n [cols]="field.cols"\n [formControl]="formControl"\n style="resize: vertical;"\n [ngStyle]="field.style"\n></textarea>\n<textarea\n [id]="(field.id || field.name)"\n *ngIf="field.keyFilter"\n pInputTextarea\n [rows]="field.rows"\n [cols]="field.cols"\n [formControl]="formControl"\n style="resize: vertical;"\n [pKeyFilter]="field.keyFilter"\n [ngStyle]="field.style"\n></textarea>\n'})],e)}(),Fn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.onInput=new t.EventEmitter,n.onFocus=new t.EventEmitter,n.onComplete=new t.EventEmitter,n.ngUnsubscribe=new r.Subject,n}return ie(n,e),n.prototype.ngOnInit=function(){var e=this;this.onFocus.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onFocus&&e.field.onFocus(t)})),this.onInput.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onInput&&e.field.onInput(t)})),this.onComplete.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onComplete&&e.field.onComplete(t)}))},n.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},ae([t.Input()],n.prototype,"field",void 0),ae([t.Input()],n.prototype,"formControl",void 0),ae([t.Output()],n.prototype,"onInput",void 0),ae([t.Output()],n.prototype,"onFocus",void 0),ae([t.Output()],n.prototype,"onComplete",void 0),n=ae([t.Component({template:'<p-inputMask\n *ngIf="field.mask; else noMask"\n [type]="field.inputType || \'text\'"\n [inputId]="(field.id || field.name)"\n [name]="field.name"\n [mask]="isFunction(field.mask) ? field.mask() : field.mask"\n [placeholder]="field.placeholder"\n slotChar="_"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500"\n styleClass="mousetrap"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n (onFocus)="onFocus.next($event)"\n (onComplete)="onComplete.next($event)"\n (onInput)="onInput.next($event)"\n [formControl]="formControl">\n</p-inputMask>\n<ng-template #noMask>\n <ng-container>\n <div class="ui-inputgroup">\n <ng-container *ngIf="field.leftAddon">\n <span class="ui-inputgroup-addon">\n <span *ngIf="field.leftAddon.label">{{field.leftAddon.label}}</span>\n <span *ngIf="!field.leftAddon.label" [ngClass]="field.leftAddon.icon"></span>\n </span>\n </ng-container>\n <ng-container *ngTemplateOutlet="field.keyFilter ? inputKeyFilter : input"></ng-container>\n <ng-container *ngIf="field.rightAddon">\n <span class="ui-inputgroup-addon">\n <span *ngIf="field.rightAddon.label">{{field.rightAddon.label}}</span>\n <span *ngIf="!field.rightAddon.label" [ngClass]="field.rightAddon.icon"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n<ng-template #input>\n <input\n [type]="field.inputType || \'text\'"\n [id]="(field.id || field.name)"\n [name]="field.name"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n [maxLength]="field.maxLength"\n pInputText\n [autocomplete]="field.browserAutocomplete ? \'on\' : \'off\'"\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="onFocus.next($event)"\n (input)="onInput.next($event)"\n [formControl]="formControl"\n [ngStyle]="field.style" />\n</ng-template>\n<ng-template #inputKeyFilter>\n <input\n #inputText\n [type]="field.inputType || \'text\'"\n [id]="(field.id || field.name)"\n [name]="field.name"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n [maxLength]="field.maxLength"\n pInputText\n [autocomplete]="field.browserAutocomplete ? \'on\' : \'off\'"\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="onFocus.next($event)"\n (input)="onInput.next($event)"\n [pKeyFilter]="field.keyFilter"\n [formControl]="formControl"\n [ngStyle]="field.style" />\n</ng-template>\n',encapsulation:t.ViewEncapsulation.None,styles:["s-text-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-text-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]})],n)}(Ct),Ln=function(){function e(){}return e.prototype.ngOnInit=function(){},e.prototype.getErrorMessages=function(e){return e?this.isFunction(e)?e():e:this.errorMessages},e.prototype.isFunction=function(e){return e instanceof Function},ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"config",void 0),ae([t.Input()],e.prototype,"group",void 0),ae([t.Input()],e.prototype,"errorMessages",void 0),e=ae([t.Component({template:'\n <div class="ui-fluid" [formGroup]="group">\n <div class="ui-g">\n <ng-container *ngFor="let field of config.fields">\n <div [ngClass]="field.gridClass" *ngIf="field.visible()">\n <label\n [for]="field.name"\n [ngClass]="{ \'required\': field.required() }"\n *sInfoSign="field.infoSign"\n >\n {{ field.label }}\n </label>\n <ng-container *sDynamicForm="{ id: id, config: field, group: group}"></ng-container>\n <s-control-errors [form]="group" [control]="group.controls[field.name]"\n [errorMessages]="getErrorMessages(field.errorMessages)"></s-control-errors>\n </div>\n </ng-container>\n </div>\n '})],e)}(),Mn=function(){function e(){}return ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"config",void 0),ae([t.Input()],e.prototype,"group",void 0),ae([t.Input()],e.prototype,"errorMessages",void 0),e=ae([t.Component({selector:"s-fieldset",template:'\n <p-fieldset [toggleable]="true" (onBeforeToggle)="config.beforeToggle ? config.beforeToggle($event) : \'null\'"\n (onAfterToggle)="config.afterToggle ? config.afterToggle($event) : \'null\'">\n <p-header>{{config.header}}</p-header>\n <ng-container *ngFor="let conf of config.configs">\n <ng-container *sDynamicForm="{ id: id, config: conf, group: group, errorMessages: errorMessages }"></ng-container>\n </ng-container>\n </p-fieldset>\n '})],e)}(),On=function(){function e(){}return ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"config",void 0),ae([t.Input()],e.prototype,"group",void 0),ae([t.Input()],e.prototype,"errorMessages",void 0),e=ae([t.Component({template:'\n <h3 class="sds-section-title">{{config.header}}</h3>\n <ng-container *ngFor="let conf of config.configs">\n <ng-container *sDynamicForm="{ id: id, config: conf, group: group, errorMessages: errorMessages }"></ng-container>\n </ng-container>\n '})],e)}(),Rn=function(){function e(){}return e.prototype.ngOnInit=function(){},e.prototype.getErrorMessages=function(e){return e?this.isFunction(e)?re(re({},this.errorMessages),e()):re(re({},this.errorMessages),e):this.errorMessages},e.prototype.isFunction=function(e){return e instanceof Function},ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"fields",void 0),ae([t.Input()],e.prototype,"form",void 0),ae([t.Input()],e.prototype,"errorMessages",void 0),e=ae([t.Component({selector:"s-dynamic-field",template:'\n <div class="ui-fluid" [formGroup]="form">\n <div class="ui-g">\n <ng-container *ngFor="let field of fields">\n <div [ngClass]="field.gridClass" *ngIf="field.visible()">\n <span *ngIf="field.label"><label [for]="field.name"\n [ngClass]="{ \'required\': field.required() }" *sInfoSign="field.infoSign">{{ field.label }}</label></span>\n <ng-container *sDynamicForm="{ id: id, config: field, group: form}"></ng-container>\n <s-control-errors [form]="form" [control]="form.controls[field.name]"\n [errorMessages]="getErrorMessages(field.errorMessages)"></s-control-errors>\n <ng-template *ngIf="field?.bottomTemplate" [ngTemplateOutlet]="field.bottomTemplate"></ng-template>\n </div>\n </ng-container>\n </div>\n </div>\n '})],e)}();!function(e){e.Row="Row"}(dn||(dn={})),function(e){e.Fieldset="Fieldset",e.Section="Section"}(un||(un={}));var Dn,An,Pn=function(n){function o(){var e=null!==n&&n.apply(this,arguments)||this;return e.onInput=new t.EventEmitter,e.onFocus=new t.EventEmitter,e.onComplete=new t.EventEmitter,e.ngUnsubscribe=new r.Subject,e}return ie(o,n),o.prototype.ngOnInit=function(){var e=this;this.onFocus.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onFocus&&e.field.onFocus(t)})),this.onInput.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onInput&&e.field.onInput(t)})),this.onComplete.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onComplete&&e.field.onComplete(t)}))},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},Object.defineProperty(o.prototype,"fieldType",{get:function(){return e.FieldType},enumerable:!0,configurable:!0}),ae([t.Input()],o.prototype,"field",void 0),ae([t.Input()],o.prototype,"formControl",void 0),ae([t.Output()],o.prototype,"onInput",void 0),ae([t.Output()],o.prototype,"onFocus",void 0),ae([t.Output()],o.prototype,"onComplete",void 0),o=ae([t.Component({template:'<p-inputMask\n *ngIf="field.mask; else noMask"\n type="text"\n [inputId]="(field.id || field.name)"\n [name]="field.name"\n [mask]="isFunction(field.mask) ? field.mask() : field.mask"\n [placeholder]="field.placeholder"\n slotChar="_"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [showDelay]="500"\n styleClass="mousetrap"\n (onBlur)="field.onBlur ? field.onBlur($event) : null"\n (onFocus)="onFocus.next($event)"\n (onComplete)="onComplete.next($event)"\n (onInput)="onInput.next($event)"\n [formControl]="formControl">\n</p-inputMask>\n\n<ng-template #noMask>\n <ng-container>\n <div class="ui-inputgroup">\n <ng-container *ngIf="field.leftAddon">\n <span class="ui-inputgroup-addon">\n <span *ngIf="field.leftAddon.label">{{field.leftAddon.label}}</span>\n <span *ngIf="!field.leftAddon.label" [ngClass]="field.leftAddon.icon"></span>\n </span>\n </ng-container>\n\n <input\n [id]="(field.id || field.name)"\n type="text"\n [name]="field.name"\n sBignumberInput\n [allowNegative]="field.allowNegative"\n [precision]="isFunction(field.precision) ? trigger(field.precision) : field.precision"\n [scale]="isFunction(field.scale) ? trigger(field.scale) : field.scale"\n [decimalSeparator]="field.numberLocaleOptions.decimalSeparator"\n [thousandsSeparator]="field.numberLocaleOptions.thousandsSeparator"\n [alignTo]="field.alignTo"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n pInputText\n [autocomplete]="field.browserAutocomplete ? \'on\' : \'off\'"\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="onFocus.next($event)"\n [formControl]="formControl" />\n <ng-container *ngIf="field.rightAddon">\n <span class="ui-inputgroup-addon">\n <span *ngIf="field.rightAddon.label">{{field.rightAddon.label}}</span>\n <span *ngIf="!field.rightAddon.label" [ngClass]="field.rightAddon.icon"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>',encapsulation:t.ViewEncapsulation.None,styles:["s-number-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-number-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]})],o)}(Ct),Nn=function(){function e(){}return ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),e=ae([t.Component({template:'<div class="ui-g">\n <p-inputSwitch\n [id]="(field.id || field.name)"\n [name]="field.name"\n [formControl]="formControl"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n (onChange)="field.onChange ? field.onChange($event) : null">\n </p-inputSwitch>\n</div>'})],e)}(),zn=function(){function e(){this.onInput=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.onComplete=new t.EventEmitter,this.ngUnsubscribe=new r.Subject}return e.prototype.ngOnInit=function(){var e=this;this.onFocus.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onFocus&&e.field.onFocus(t)})),this.onInput.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onInput&&e.field.onInput(t)})),this.onComplete.pipe(a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.field.onComplete&&e.field.onComplete(t)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},ae([t.Input()],e.prototype,"field",void 0),ae([t.Input()],e.prototype,"formControl",void 0),ae([t.Output()],e.prototype,"onInput",void 0),ae([t.Output()],e.prototype,"onFocus",void 0),ae([t.Output()],e.prototype,"onComplete",void 0),e=ae([t.Component({template:'<input\n type="password"\n [id]="(field.id || field.name)"\n [name]="field.name"\n [sTooltip]="field.tooltip"\n tooltipPosition="top"\n [placeholder]="field.placeholder"\n [showDelay]="500"\n [maxLength]="field.maxLength"\n pInputText\n [ngClass]="\'mousetrap\'"\n (blur)="field.onBlur ? field.onBlur($event) : null"\n (focus)="onFocus.next($event)"\n (input)="onInput.next($event)"\n [formControl]="formControl"\n [ngStyle]="field.style"\n [sPasswordStrength]="field.passwordStrength"\n [psDescription]="field.passwordStrengthOptions?.description"\n [psWeakTitle]="field.passwordStrengthOptions?.weakTitle"\n [psMediumTitle]="field.passwordStrengthOptions?.mediumTitle"\n [psStrongTitle]="field.passwordStrengthOptions?.strongTitle"\n [psValidation]="field.passwordStrengthOptions?.validation" />',encapsulation:t.ViewEncapsulation.None,styles:["s-text-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-text-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]})],e)}(),Vn=function(e){var t=e.group,n=e.errorMessages;this.group=t,this.errorMessages=n},Bn=function(t){function n(e){var n=e.group,o=e.field,i=e.errorMessages,r=t.call(this,{group:n,errorMessages:i})||this;return r.field=o,r.setFieldPropertiesByType(),r}return ie(n,t),n.prototype.setFieldPropertiesByType=function(){this.field.type!==e.FieldType.Integer&&this.field.type!==e.FieldType.Double||(this.field.numberLocaleOptions.currencySymbol="")},n.prototype.createComponent=function(e,t){var n=e.resolveComponentFactory(this.getComponent()),o=t.createComponent(n);return o.instance.field=this.field,o.instance.formControl=this.group.controls[this.field.name],o.instance.errorMessages=this.errorMessages,this.setVariablesByType(o),o},n.prototype.setVariablesByType=function(t){this.field.type==e.FieldType.Time&&(t.instance.timeOnly=!0),[e.FieldType.LocalDateTime,e.FieldType.DateTime,e.FieldType.Time].includes(this.field.type)&&(t.instance.showTime=!0)},n.prototype.updateVariables=function(e){e.instance.field=this.field,e.instance.formControl=this.group.controls[this.field.name],this.setVariablesByType(e)},n.prototype.getComponent=function(){switch(this.field.type){case e.FieldType.Autocomplete:return vn;case e.FieldType.Binary:case e.FieldType.String:return Fn;case e.FieldType.Boolean:return"switch"===this.field.representedBy?Nn:yn;case e.FieldType.Chips:return wn;case e.FieldType.Date:case e.FieldType.DateTime:case e.FieldType.LocalDateTime:case e.FieldType.Time:return xn;case e.FieldType.Number:case e.FieldType.Integer:case e.FieldType.Double:return Pn;case e.FieldType.Enum:return Sn;case e.FieldType.Lookup:return _n;case e.FieldType.Money:return Cn;case e.FieldType.Radio:return Tn;case e.FieldType.Text:return En;case e.FieldType.Password:return zn;case e.FieldType.Blob:return In;case e.FieldType.Custom:return this.field.CustomFieldComponentClass;default:throw new Error("Trying to use an unsupported type ("+this.field.type+").")}},n}(Vn),Un=function(e){function t(t){var n=t.group,o=t.config,i=t.errorMessages,r=e.call(this,{group:n,errorMessages:i})||this;return r.config=o,r}return ie(t,e),t.prototype.createComponent=function(e,t){var n=e.resolveComponentFactory(this.getComponent()),o=t.createComponent(n);return o.instance.config=this.config,o.instance.group=this.group,o},t.prototype.updateVariables=function(e){e.instance.structure=this.config,e.instance.group=this.group},t.prototype.getComponent=function(){switch(this.config.type){case un.Fieldset:return Mn;case un.Section:return On;default:throw new Error("Trying to use an unsupported type ("+this.config.type+").")}},t}(Vn),jn=function(e){function t(t){var n=t.group,o=t.config,i=t.errorMessages,r=e.call(this,{group:n,errorMessages:i})||this;return r.config=o,r}return ie(t,e),t.prototype.createComponent=function(e,t){var n=e.resolveComponentFactory(this.getComponent()),o=t.createComponent(n);return o.instance.config=this.config,o.instance.group=this.group,o.instance.errorMessages=this.errorMessages,o},t.prototype.updateVariables=function(e){e.instance.config=this.config,e.instance.group=this.group},t.prototype.getComponent=function(){switch(this.config.type){case dn.Row:return Ln;default:throw new Error("Trying to use an unsupported type ("+this.config.type+").")}},t}(Vn),Hn=function(){function n(e,t){this.resolver=e,this.container=t}return Object.defineProperty(n.prototype,"sDynamicForm",{set:function(e){var t=e.id,n=e.config,o=e.group,i=e.errorMessages;this.id=t,this.config=n,this.group=o,this.errorMessages=i},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){if(this.isField())!this.config.id&&this.id&&(this.config.id=this.id+"-"+this.config.name),this.directiveConfig=new Bn({group:this.group,field:this.config,errorMessages:this.errorMessages});else if(this.isStructure())this.directiveConfig=new Un({group:this.group,config:this.config,errorMessages:this.errorMessages});else{if(!this.isGrid())throw new Error("Trying to use an unsupported type ("+this.config.type+").");this.directiveConfig=new jn({group:this.group,config:this.config,errorMessages:this.errorMessages})}this.component=this.directiveConfig.createComponent(this.resolver,this.container),this.component.instance.id=this.id,this.component.instance.errorMessages=this.errorMessages},n.prototype.ngOnChanges=function(){this.component&&(this.directiveConfig.updateVariables(this.component),this.component.instance.errorMessages=this.errorMessages)},n.prototype.isField=function(){return e.FieldType[this.config.type]},n.prototype.isStructure=function(){return un[this.config.type]},n.prototype.isGrid=function(){return dn[this.config.type]},n.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ViewContainerRef}]},ae([t.Input()],n.prototype,"sDynamicForm",null),n=ae([t.Directive({selector:"[sDynamicForm]"})],n)}(),$n=function(){function e(){this.sLongPressDelay=500,this.sLongPress=new t.EventEmitter,this.mouseUp=new r.Subject,this.mouseDown=new r.Subject,this.ngUnsubscribe=new r.Subject}return e.prototype.onMouseUp=function(e){this.mouseUp.next(e)},e.prototype.onMouseDown=function(e){this.mouseDown.next(e)},e.prototype.ngOnInit=function(){var e=this;this.mouseDown.pipe(a.debounceTime(this.sLongPressDelay),a.takeUntil(this.mouseUp),a.repeat(),a.takeUntil(this.ngUnsubscribe)).subscribe((function(t){return e.sLongPress.emit(t)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},ae([t.Input()],e.prototype,"sLongPressDelay",void 0),ae([t.Output()],e.prototype,"sLongPress",void 0),ae([t.HostListener("mouseup",["$event"]),t.HostListener("touchend",["$event"])],e.prototype,"onMouseUp",null),ae([t.HostListener("mousedown",["$event"]),t.HostListener("touchstart",["$event"])],e.prototype,"onMouseDown",null),e=ae([t.Directive({selector:"[sLongPress]"})],e)}(),Gn=function(){function e(){this.onDoubleClick=new t.EventEmitter,this._timeout=null,this._DOUBLE_CLICK_DELAY=500}return e.prototype.onClick=function(e){this.handleOnClickEvent(e)},e.prototype.handleOnClickEvent=function(e){var t=this;this._timeout?(this.clearTimeout(),this.onDoubleClick.emit(e)):this._timeout=setTimeout((function(){return t.clearTimeout()}),this._DOUBLE_CLICK_DELAY)},e.prototype.clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},ae([t.Output()],e.prototype,"onDoubleClick",void 0),ae([t.HostListener("click",["$event"])],e.prototype,"onClick",null),e=ae([t.Directive({selector:"[sDoubleClick]"})],e)}(),qn=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[$n,Gn],exports:[$n,Gn]})],e)}();(Dn=e.PasswordStrengths||(e.PasswordStrengths={})).VeryWeak="Very_weak",Dn.Weak="weak",Dn.Medium="medium",Dn.Strong="strong",(An=e.PasswordStrengthPositions||(e.PasswordStrengthPositions={})).Top="top",An.Right="right",An.Left="left";var Wn,Kn=function(){function n(){this.weakTitle="Fraca",this.mediumTitle="Médio",this.strongTitle="Forte",this.position=e.PasswordStrengthPositions.Right,this.left=0,this.top=0,this.visible=!1}return n.prototype.ngOnInit=function(){this.title=this.weakTitle},n.prototype.setPasswordStrengthPosition=function(){var t=document.querySelector(".password-strength");switch(this.position){case e.PasswordStrengthPositions.Top:t.classList.add("password-strength--top");break;case e.PasswordStrengthPositions.Right:t.classList.add("password-strength--right");break;case e.PasswordStrengthPositions.Left:t.classList.add("password-strength--left")}},n.prototype.updateIndicators=function(t){var n,o=document.querySelector("#strength-indicator-1"),i=document.querySelector("#strength-indicator-2"),r=document.querySelector("#strength-indicator-3"),a=[],s=[o,i,r];switch(t){case e.PasswordStrengths.VeryWeak:this.title=this.weakTitle;break;case e.PasswordStrengths.Weak:this.title=this.weakTitle,n="strength-indicator--weak",a.push(o);break;case e.PasswordStrengths.Medium:this.title=this.mediumTitle,n="strength-indicator--medium",a.push(o),a.push(i);break;case e.PasswordStrengths.Strong:this.title=this.strongTitle,n="strength-indicator--strong",a.push(o),a.push(i),a.push(r)}s.forEach((function(e){e.classList.remove("strength-indicator--weak","strength-indicator--medium","strength-indicator--strong")})),a.forEach((function(e){e.classList.add(n)}))},ae([t.Input()],n.prototype,"weakTitle",void 0),ae([t.Input()],n.prototype,"mediumTitle",void 0),ae([t.Input()],n.prototype,"strongTitle",void 0),ae([t.Input()],n.prototype,"description",void 0),n=ae([t.Component({template:'<div\n class="password-strength"\n [ngStyle]="{\n \'left\': left + \'px\',\n \'top\': top + \'px\'\n }"\n [ngClass]="[\'password-strength--\' + position]">\n <span class="title">{{ title }}</span>\n <div class="strength-indicators">\n <span class="strength-indicator" id="strength-indicator-1"></span>\n <span class="strength-indicator" id="strength-indicator-2"></span>\n <span class="strength-indicator" id="strength-indicator-3"></span>\n </div>\n <span class="content">{{ description }}</span>\n</div>',styles:['.password-strength{position:fixed;transform:translateX(-50%);background-color:#fff;border-radius:2px;box-shadow:0 0 5px 1px #ccc;padding:10px;width:232px;z-index:99999}.password-strength::after{content:"";position:absolute}.password-strength .title{font-family:"Open Sans",sans-serif;font-size:14px;font-weight:700;line-height:150%}.password-strength .strength-indicators{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:10px 0}.password-strength .strength-indicators .strength-indicator{background-color:#ccc;border-radius:2px;display:inline-block;height:3px;width:64px}.password-strength .strength-indicators .strength-indicator--weak{background-color:#c13018}.password-strength .strength-indicators .strength-indicator--medium{background-color:#fcbf10}.password-strength .strength-indicators .strength-indicator--strong{background-color:#0c9348}.password-strength .content{font-family:"Open Sans",sans-serif;font-size:12px;font-weight:400;line-height:150%}.password-strength--top{transform:translate(-50%,-100%)}.password-strength--top::after{top:100%;right:calc(50% - 4px);border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #fff}.password-strength--right{transform:translateY(-50%)}.password-strength--right::after{bottom:calc(50% - 8px);left:-8px;border-top:8px solid transparent;border-right:8px solid #fff;border-bottom:8px solid transparent}.password-strength--left{transform:translate(-100%,-50%)}.password-strength--left::after{bottom:calc(50% - 8px);right:-8px;border-top:8px solid transparent;border-left:8px solid #fff;border-bottom:8px solid transparent}']})],n)}(),Yn=function(){function n(t,n,o,i){this.elementRef=t,this.appRef=n,this.componentFactoryResolver=o,this.injector=i,this.enabled=!0,this.position=e.PasswordStrengthPositions.Right,this.componentRef=null}return n.prototype.ngOnInit=function(){this.validateProperties()},n.prototype.onFocus=function(){var t,n,o,i=null!==(t=this.elementRef.nativeElement.value)&&void 0!==t?t:"";i?(this.createPasswordStrength(),null===(n=this.componentRef)||void 0===n||n.instance.updateIndicators(this.validation(i))):null===(o=this.componentRef)||void 0===o||o.instance.updateIndicators(e.PasswordStrengths.VeryWeak)},n.prototype.onBlur=function(){this.destroyPasswordStrength()},n.prototype.createPasswordStrength=function(){if(this.enabled&&null===this.componentRef){var e=this.componentFactoryResolver.resolveComponentFactory(Kn);this.componentRef=e.create(this.injector),this.appRef.attachView(this.componentRef.hostView);var t=this.componentRef.hostView.rootNodes[0];document.body.appendChild(t),this.setPasswordStrengthComponentProperties(),this.showPasswordStrength()}},n.prototype.showPasswordStrength=function(){null!==this.componentRef&&(this.componentRef.instance.visible=!0)},n.prototype.setPasswordStrengthComponentProperties=function(){if(null!=this.componentRef){this.componentRef.instance.position=this.position,this.componentRef.instance.weakTitle=this.weakTitle,this.componentRef.instance.mediumTitle=this.mediumTitle,this.componentRef.instance.strongTitle=this.strongTitle,this.componentRef.instance.description=this.description;for(var t=this.elementRef.nativeElement.getBoundingClientRect(),n=t.top,o=t.right,i=t.bottom,r=t.left,a=i-n,s=o-r,l=!1,p=[];!l;){if(p.includes(e.PasswordStrengthPositions.Top)&&p.includes(e.PasswordStrengthPositions.Right)&&p.includes(e.PasswordStrengthPositions.Left))throw this.destroyPasswordStrength(),new Error("No space to show password strength");switch(this.position){case e.PasswordStrengthPositions.Top:var c=n,d=document.body.clientWidth-o,u=r;if(c<=a+150||d<50||u<50){this.position=e.PasswordStrengthPositions.Right,p.push(e.PasswordStrengthPositions.Top);break}this.componentRef.instance.top=Math.round(n-20),this.componentRef.instance.left=Math.round(s/2+r),l=!0;break;case e.PasswordStrengthPositions.Right:if((d=document.body.clientWidth-o)<=s+150){this.position=e.PasswordStrengthPositions.Left,p.push(e.PasswordStrengthPositions.Right);break}this.componentRef.instance.top=Math.round(n+a/2),this.componentRef.instance.left=Math.round(o+20),l=!0;break;case e.PasswordStrengthPositions.Left:if((u=r)<=s+150){this.position=e.PasswordStrengthPositions.Top,p.push(e.PasswordStrengthPositions.Left);break}this.componentRef.instance.top=Math.round(n+a/2),this.componentRef.instance.left=Math.round(r-20),l=!0}this.componentRef.instance.position=this.position}}},n.prototype.validateProperties=function(){if(this.validation=this.validation||this.defaultValidator,!this.description)throw new Error("Description is required")},n.prototype.destroyPasswordStrength=function(){null!==this.componentRef&&(this.appRef.detachView(this.componentRef.hostView),this.componentRef.destroy(),this.componentRef=null)},n.prototype.defaultValidator=function(t){var n=0,o=[new RegExp("(?=.*\\d)"),new RegExp("(?=.*[a-z])"),new RegExp("(?=.*[A-Z])"),new RegExp("(?=.*[!@#$%&*.\\-=+^~])")];return t.length>=6&&n++,o.forEach((function(e){e.test(t)&&n++})),n<1?e.PasswordStrengths.VeryWeak:n<4?e.PasswordStrengths.Weak:n<5?e.PasswordStrengths.Medium:e.PasswordStrengths.Strong},n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ApplicationRef},{type:t.ComponentFactoryResolver},{type:t.Injector}]},ae([t.Input("sPasswordStrength")],n.prototype,"enabled",void 0),ae([t.Input("psValidation")],n.prototype,"validation",void 0),ae([t.Input("psPosition")],n.prototype,"position",void 0),ae([t.Input("psWeakTitle")],n.prototype,"weakTitle",void 0),ae([t.Input("psMediumTitle")],n.prototype,"mediumTitle",void 0),ae([t.Input("psStrongTitle")],n.prototype,"strongTitle",void 0),ae([t.Input("psDescription")],n.prototype,"description",void 0),ae([t.HostListener("keyup"),t.HostListener("focus")],n.prototype,"onFocus",null),ae([t.HostListener("blur")],n.prototype,"onBlur",null),n=ae([t.Directive({selector:"[sPasswordStrength]"})],n)}(),Xn=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[Kn,Yn],exports:[Yn]})],e)}(),Zn=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,u.FormsModule,u.ReactiveFormsModule,$t,L.InputTextModule,k.CheckboxModule,c.CalendarModule,F.InputMaskModule,S.DropdownModule,st,nn,Jt,Te,Ze,g.AutoCompleteModule,R.MultiSelectModule,_.ButtonModule,xe,A.PanelModule,b.DialogModule,P.RadioButtonModule,v.TableModule,Ot,Xt,f.HotkeyModule,T.ChipsModule,Ce,M.InputTextareaModule,P.RadioButtonModule,O.KeyFilterModule,E.FieldsetModule,rn,Nt,bn,Wt,en,f.HotkeyModule.forRoot(),qn,D.InputSwitchModule,Xn],declarations:[vn,yn,xn,wn,Cn,Ft,Rn,Hn,Mn,In,wt,_n,kn,Pn,Tn,Ln,On,Sn,En,Fn,Nn,zn],exports:[Ft,wt],entryComponents:[vn,yn,xn,wn,Cn,Mn,In,_n,kn,Pn,Tn,Ln,On,Sn,En,Fn,zn,Nn],providers:[f.HotkeysService]})],e)}(),Jn=function(){function e(e){this.http=e}return e.prototype.getCustomFields=function(e,t,n,o){var i={entityId:{domain_:e,service_:t,id:n}};return this.http.post(o,i)},e.prototype.getFileLocationUrl=function(e,t){return this.http.post(t,e)},e.prototype.uploadTempFile=function(e,t){return this.http.put(e,t,{reportProgress:!0,observe:"events",headers:{"Content-Type":t.type}})},e.prototype.requestAccess=function(e,t){return this.http.post(t,{objectId:e})},e.prototype.getFile=function(e){return this.http.get(e,{responseType:"blob"})},e.ctorParameters=function(){return[{type:m.HttpClient}]},e=ae([t.Injectable()],e)}();!function(e){e.String="String",e.Boolean="Boolean",e.Integer="Integer",e.Double="Double",e.Date="Date",e.DateTime="DateTime",e.LocalDateTime="LocalDateTime",e.Time="Time",e.Money="Money",e.Blob="Blob",e.Binary="Binary",e.Any="Any",e.Enum="Enum"}(Wn||(Wn={}));var Qn=w,eo=function(){function n(e,t,n,o,i){this.customFieldsService=e,this.localeService=t,this.sanitizer=n,this.translateService=o,this.controlContainer=i,this.customFieldsEndpoint="platform/field_customization/queries/getEntity",this.fileLocationEndpoint="platform/field_customization/actions/requestUpload",this.requestAccessEndpoint="platform/field_customization/actions/requestAccess",this.fields=[],this.ready=!1,this.ngUsubscribe=new r.Subject}var o;return o=n,Object.defineProperty(n.prototype,"parentForm",{get:function(){return this.controlContainer.control},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentControl",{get:function(){return this.parentForm.get("custom")},enumerable:!0,configurable:!0}),n.prototype.registerOnChange=function(e){var t=this;this.onChange=e,this.formGroup.valueChanges.subscribe((function(){return t.onChange(t.parseFieldsValues())}))},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.writeValue=function(e){if(this.ready){var t=this.parseValuesForFields(e);this.formGroup.patchValue(t),this.value=t,this.createFilesIfSetFormValuesAfterInit()}else this.formGroup.patchValue(e||{}),this.value=e},n.prototype.setDisabledState=function(e){e?this.formGroup.disable():this.formGroup.enable()},n.prototype.getCustomFields=function(){return this.entityObject&&this.entityObject.entity_?r.of(this.entityObject):this.customFieldsService.getCustomFields(this.domain,this.service,this.entity,this.customFieldsEndpoint)},n.prototype.ngOnInit=function(){var e=this;if(!this.domain)throw new Error("You need to specify the custom-fields domain!");if(!this.service)throw new Error("You need to specify the custom-fields service!");if(!this.entity)throw new Error("You need to specify the custom-fields entity!");this.formGroup=new u.FormGroup({});var t=[this.getCustomFields(),this.localeService.get()];r.forkJoin(t).pipe(a.takeUntil(this.ngUsubscribe),a.finalize((function(){e.formGroup.markAsPristine(),e.parentControl.markAsPristine()}))).subscribe((function(t){var n=de(t,2),o=n[0],i=n[1],r={};if(r[Wn.String]={},r[Wn.Boolean]={defaultValue:!1},r[Wn.Integer]={},r[Wn.Double]={defaultMask:""},r[Wn.Money]={},r[Wn.Date]={},r[Wn.DateTime]={},r[Wn.LocalDateTime]={},r[Wn.Time]={},r[Wn.Blob]={},r[Wn.Enum]={},r[Wn.Binary]={},r[Wn.Any]={},o&&o.entity_){var a=o.entity_,s=a.active,l=a.fields;s&&(l.filter((function(e){return e.customizable&&e.customization&&e.customization.active})).forEach((function(t){var n=e.getFormField(t,i),o=t.type;t.type===Wn.Blob&&e.value&&e.value[n.name]&&e.createBlobToFileUpload(n);var a=t.customization.validationRegex,s=[Wn.Boolean,Wn.Money,Wn.Date,Wn.DateTime,Wn.LocalDateTime,Wn.Time],l=[];a&&!s.includes(o)&&l.push(u.Validators.pattern(a)),o!==Wn.Integer||n.mask||l.push(u.Validators.pattern(/^\-?\d*$/)),n.required()&&l.push(u.Validators.required);var p=new u.FormControl({value:r[o].defaultValue,disabled:e.formGroup.disabled},l);e.formGroup.addControl(n.name,p),e.fields.push(n)})),e.createFieldCustomization(l),e.formGroup.patchValue(e.parseValuesForFields(e.value)),e.ready=!0)}}))},n.prototype.ngOnDestroy=function(){this.ngUsubscribe.next(),this.ngUsubscribe.complete()},n.prototype.validate=function(){var e=this,t={};return Object.keys(this.formGroup.controls).forEach((function(n){var o=e.formGroup.get(n).errors;o&&(t[n]=o)})),t},n.prototype.parseValuesForFields=function(t){var n=re({},t);return this.fields.forEach((function(o){var i=o.type,r=o.name,a=t&&t[r];if(i===e.FieldType.Boolean){var s="string"==typeof a,l=!s&&"boolean"!=typeof a;n[r]=l?null:s?"true"===a:a}if(a)switch(i){case e.FieldType.Date:case e.FieldType.DateTime:n[r]=Qn(a).toDate();break;case e.FieldType.LocalDateTime:n[r]=Qn(a,"YYYY-MM-DD[T]HH:mm:ss.SSS").toDate();break;case e.FieldType.Time:n[r]=Qn(a,"HH:mm:ss").toDate()}})),n},n.prototype.createFilesIfSetFormValuesAfterInit=function(){var t=this;this.hasUploaded||this.fields.filter((function(t){return t.type===e.FieldType.Blob})).forEach((function(e){t.formGroup.get(e.name).value&&t.createBlobToFileUpload(e)}))},n.prototype.parseFieldsValues=function(){var t=this,n={};return this.fields.forEach((function(o){var i=o.type,r=o.name,a=o.mask,s=o.scale,l=t.formGroup.get(r).value;if(l)switch(i){case e.FieldType.Number:a&&(l=new ne(l).toFixed(s).toString());break;case e.FieldType.Date:l=Qn(l).format("YYYY-MM-DD");break;case e.FieldType.DateTime:l=Qn(l).format();break;case e.FieldType.LocalDateTime:l=Qn(l).format("YYYY-MM-DD[T]HH:mm:ss.SSS");break;case e.FieldType.Time:l=Qn(l).format("HH:mm:ss")}null===l||Number.isNaN(l)?t.isTypeNumberOrEnum(i)&&(n[r]=o.multiple?[]:null):n[r]=l})),this.hasBlob&&(n.fieldCustomization=this.formGroup.get("fieldCustomization").value),n},n.prototype.isTypeNumberOrEnum=function(t){return[e.FieldType.Number,e.FieldType.Enum].includes(t)},n.prototype.getFormField=function(t,n){var o,i,r;switch(t.type){case Wn.Blob:r=this.getBlobParameters();break;case Wn.Boolean:r=this.getBooleanParameters();break;case"Enumeration":case Wn.Enum:t.type=e.FieldType.Enum,r=this.getEnumParameters(t);break;case Wn.Money:r={type:e.FieldType.Number,leftAddon:{label:null!==(i=null===(o=null==n?void 0:n.number)||void 0===o?void 0:o.currencySymbol)&&void 0!==i?i:"R$"}};break;case Wn.Double:r={type:e.FieldType.Number};break;case Wn.Integer:r={type:e.FieldType.Number,scale:0};break;default:r={}}return new yt(re({name:t.id,label:t.customization.label,tooltip:t.customization.tooltip,infoSign:t.customization.infoSign,type:t.type,mask:t.customization.mask,required:function(){return t.customization.mandatory},calendarOptions:n.calendar,currencyOptions:n.number},r))},n.prototype.getEnumParameters=function(e){return{showClear:!0,multiple:e.customization.customEnumeration.multiple,options:e.customization.customEnumeration.values.map((function(e){return{label:e.value,value:e.key}}))}},n.prototype.getBooleanParameters=function(){return{optionsLabel:{true:this.getTranslateLabel("true_label"),false:this.getTranslateLabel("false_label"),empty:this.getTranslateLabel("empty_label")}}},n.prototype.getBlobParameters=function(){var e=this;return{size:{sm:12,md:12,lg:12,xl:12},accept:"image/*, application/*, text/*",chooseLabel:this.getTranslateLabel("choose_label"),removeLabel:this.getTranslateLabel("remove_label"),cancelLabel:this.getTranslateLabel("cancel_label"),successTooltip:this.getTranslateLabel("success_tooltip"),multiple:!1,onUploadFile:function(t,n){e.hasUploaded=!0,e.uploadFile(t,n)},onRemoveFile:function(t,n){e.removeFile(t,n)},onCancelUpload:function(t,n){e.cancelUpload(t,n)},onDownloadFile:function(t,n){e.downloadFile(t,n)}}},n.prototype.createFieldCustomization=function(e){this.hasBlob=!!e.filter((function(e){return e.type===Wn.Blob})).length,this.hasBlob&&this.formGroup.addControl("fieldCustomization",new u.FormArray([new u.FormGroup({domain:new u.FormControl(this.domain),service:new u.FormControl(this.service),entity:new u.FormControl(this.entity),toDelete:new u.FormControl({value:{},disabled:!1}),toInsert:new u.FormControl({value:{},disabled:!1})})]))},n.prototype.createBlobToFileUpload=function(e){var t=this.value[e.name]?this.value[e.name]:this.formGroup.get(e.name).value,n={name:t.substring(t.lastIndexOf("/")+1),objectId:t,savedFile:!0};e.files=[n]},n.prototype.downloadFile=function(e,t){var n=this,o=e.index,i=e.anchor,r=t.files[o];r.objectURL?i.nativeElement.click():this.customFieldsService.requestAccess(r.objectId,this.requestAccessEndpoint).pipe(a.takeUntil(this.ngUsubscribe)).subscribe((function(e){var s=e.fileName,l=e.uri;n.customFieldsService.getFile(l).pipe(a.takeUntil(n.ngUsubscribe)).subscribe((function(e){var a=new File([e],s);a.objectURL=n.sanitizer.bypassSecurityTrustUrl(l),i.nativeElement.setAttribute("href",l),a.objectId=r.objectId,a.savedFile=!0,t.files[o]=a,t.files=ue(t.files),i.nativeElement.click()}))}))},n.prototype.uploadFile=function(e,t){var n=this,o=e.files,i=this.fields.find((function(e){return e.name===t.name}));i.files&&i.files.length&&this.removeFile({file:i.files[0]},i),i.files=o;for(var s=function(e){var t=o[e];t.savedFile||t.progress||(t.isUploading=!0,l.formGroup.get(i.name).setValidators(function(e){return function(){return e.isUploading?{isUploading:!0}:null}}(t)),l.formGroup.get(i.name).updateValueAndValidity(),l.customFieldsService.getFileLocationUrl({domain:l.domain,service:l.service,entityName:l.entity,field:i.name,fileName:t.name},l.fileLocationEndpoint).pipe(a.takeUntil(l.ngUsubscribe),a.catchError((function(t){return r.of(n.defaltCatchError(i,t,e))}))).subscribe((function(o){var s=o.location,l=o.version,p=o.objectId;t.version=l,t.objectId=p,t.uploadSubscribe=n.customFieldsService.uploadTempFile(s,t).pipe(a.takeUntil(n.ngUsubscribe),a.catchError((function(t){return r.of(n.defaltCatchError(i,t,e))})),a.finalize((function(){t.isUploading=!1}))).subscribe((function(e){var o,r=e.type;if(n.uploadCanceled)n.uploadCanceled&&r===m.HttpEventType.Response&&(n.uploadCanceled=!1);else if(r===m.HttpEventType.UploadProgress)t.progress=100*Math.round(e.loaded/e.total);else if(r===m.HttpEventType.Response){t.objectURL=n.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(t));var a={objectId:p,name:t.name,version:t.version},s=n.formGroup.get("fieldCustomization").value[0].toInsert;n.formGroup.get("fieldCustomization").value[0].toInsert=re(re({},s),((o={})[i.name]=a,o)),n.formGroup.get(i.name).setValue(t.objectId+"/"+t.name),n.formGroup.get(i.name).clearValidators(),n.formGroup.get(i.name).updateValueAndValidity(),i.files=[t]}})),i.files=[t]})))},l=this,p=0;p<o.length;p++)s(p)},n.prototype.removeFile=function(e,t){var n,o=e.file,i=this.fields.find((function(e){return e.name===t.name}));if(i.files=[],o.objectId){var r=o.savedFile?""+o.objectId:o.objectId+"/"+o.name,a=this.formGroup.get("fieldCustomization").value[0].toDelete;delete this.formGroup.get("fieldCustomization").value[0].toInsert[i.name],this.formGroup.get("fieldCustomization").value[0].toDelete=re(re({},a),((n={})[i.name]=ue(a[i.name]||[],[r]),n))}this.formGroup.get(i.name).clearValidators(),this.formGroup.get(i.name).setValue(""),this.formGroup.get(i.name).updateValueAndValidity()},n.prototype.cancelUpload=function(e,t){this.uploadCanceled=!0;var n=this.fields.find((function(e){return e.name===t.name}));n.files[e].uploadSubscribe.unsubscribe(),n.files=[],delete this.formGroup.get("fieldCustomization").value[0].toInsert[n.name],this.formGroup.get(n.name).clearValidators(),this.formGroup.get(n.name).setValue(""),this.formGroup.get(n.name).updateValueAndValidity()},n.prototype.defaltCatchError=function(e,t,n){var o,i=e.files;return i[n].error=t,i[n].isUploading=!1,e.files=ue(i),this.formGroup.get(e.name).setValidators([(o=i[n],function(){return o.error?{uploadError:!0}:null})]),this.formGroup.get(e.name).updateValueAndValidity(),r.throwError(new Error("error in upload file. Details: "+t.message))},n.prototype.getTranslateLabel=function(e){return this.translateService.instant(this.domain+"."+this.service+"."+e)},n.ctorParameters=function(){return[{type:Jn},{type:ze},{type:z.DomSanitizer},{type:V.TranslateService},{type:u.ControlContainer,decorators:[{type:t.Optional}]}]},ae([t.Input()],n.prototype,"domain",void 0),ae([t.Input()],n.prototype,"service",void 0),ae([t.Input()],n.prototype,"entity",void 0),ae([t.Input()],n.prototype,"invalidErrorLabel",void 0),ae([t.Input()],n.prototype,"entityObject",void 0),ae([t.Input()],n.prototype,"customFieldsEndpoint",void 0),ae([t.Input()],n.prototype,"fileLocationEndpoint",void 0),ae([t.Input()],n.prototype,"requestAccessEndpoint",void 0),ae([t.Input()],n.prototype,"requiredErrorMessage",void 0),n=o=ae([t.Component({selector:"s-custom-fields",template:'<s-dynamic-form [fields]="fields" [form]="formGroup" [errorMessages]="{pattern: invalidErrorLabel, required: requiredErrorMessage}"></s-dynamic-form>',providers:[{provide:u.NG_VALUE_ACCESSOR,useExisting:o,multi:!0},{provide:u.NG_VALIDATORS,useExisting:o,multi:!0}]}),se(4,t.Optional())],n)}();var to,no=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,u.FormsModule,u.ReactiveFormsModule,m.HttpClientModule,Ze,Zn,V.TranslateModule],declarations:[eo],exports:[eo],providers:[Jn,V.TranslateService]})],e)}(),oo=function(){function e(){}return e.prototype.ngAfterViewInit=function(){this.table.bindDocumentEditListener=this.bindDocument.bind(this)},e.prototype.isFromOverlayTrigger=function(e){return e.path.some((function(e){return e.className&&e.className.includes("ng-trigger-overlayAnimation")}))},e.prototype.isFromModal=function(e){return e.path.some((function(e){return e.className&&e.className.includes("s-lookup")}))},e.prototype.bindDocument=function(){var e=this;this.table.documentEditListener||(this.table.documentEditListener=function(t){e.isFromOverlayTrigger(t)||e.isFromModal(t)||!e.table.editingCell||e.table.editingCellClick||!e.table.isEditingCellValid()||(p.DomHandler.removeClass(e.table.editingCell,"ui-editing-cell"),e.table.editingCell=null,e.table.unbindDocumentEditListener()),e.table.editingCellClick=!1},document.addEventListener("click",this.table.documentEditListener))},ae([t.Input()],e.prototype,"table",void 0),e=ae([t.Directive({selector:"p-table[sEditableOverlay]"})],e)}(),io=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[oo],exports:[oo]})],e)}(),ro=function(){function e(){}return e=ae([t.Component({selector:"s-header",template:"<ng-content></ng-content>"})],e)}(),ao=function(){function e(){}return e=ae([t.Component({selector:"s-footer",template:"<ng-content></ng-content>"})],e)}(),so=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[ro,ao],exports:[ro,ao]})],e)}(),lo=function(){function e(){this.id="s-image-cropper-"+n.nextId++,this.visible=!1,this.header="Recortar imagem",this.cropLabel="Recortar",this.selectAnotherLabel="Trocar",this.removeLabel="Remover",this.cancelLabel="Cancelar",this.emptyStateTitle="Selecione uma foto, em seguida você poderá ajustá-la",this.emptyStateActionLabel="Escolher imagem",this.emptyStateIconClass="fa fa-picture-o",this.aspectRatio=NaN,this.rounded=!1,this.allowSelectAnother=!0,this.allowRemove=!0,this.allowCancel=!0,this.visibleChange=new t.EventEmitter,this.changeImage=new t.EventEmitter,this.croppedImage=new t.EventEmitter,this.croppedCanvas=new t.EventEmitter,this.removedImage=new t.EventEmitter,this.cancel=new t.EventEmitter}var n;return n=e,e.prototype.ngOnInit=function(){this.imageSource&&this.initCropper()},e.prototype.ngOnChanges=function(e){e.imageSource&&e.imageSource.currentValue&&this.initCropper()},e.prototype.initCropper=function(){this.cropper&&this.cropper.destroy(),this.image.nativeElement.src=this.imageSource,this.cropper=new B(this.image.nativeElement,{aspectRatio:this.rounded?1:this.aspectRatio,guides:!1,dragMode:"move",minCropBoxHeight:2,minCropBoxWidth:2,toggleDragModeOnDblclick:!1})},e.prototype.getRoundedCanvas=function(e){var t=document.createElement("canvas"),n=t.getContext("2d"),o=e.width,i=e.height;return t.width=o,t.height=i,n.imageSmoothingEnabled=!0,n.drawImage(e,0,0,o,i),n.globalCompositeOperation="destination-in",n.beginPath(),n.arc(o/2,i/2,Math.min(o,i)/2,0,2*Math.PI,!0),n.fill(),t},e.prototype.onCropImage=function(){if(this.imageSource){var e=this.rounded?this.getRoundedCanvas(this.cropper.getCroppedCanvas()):this.cropper.getCroppedCanvas();this.croppedCanvas.emit(e),this.croppedImage.emit(e.toDataURL())}else this.croppedImage.emit(),this.croppedCanvas.emit();this.visibleChange.emit(!1)},e.prototype.onChangeImage=function(){this.changeImage.emit()},e.prototype.onRemoveImage=function(){this.imageSource=void 0,this.removedImage.emit()},e.prototype.onCancel=function(){this.visibleChange.emit(!1),this.cancel.emit()},e.prototype.onModalVisibleChange=function(e){e||this.onCancel(),this.visibleChange.emit(e)},e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"visible",void 0),ae([t.Input()],e.prototype,"header",void 0),ae([t.Input()],e.prototype,"cropLabel",void 0),ae([t.Input()],e.prototype,"selectAnotherLabel",void 0),ae([t.Input()],e.prototype,"removeLabel",void 0),ae([t.Input()],e.prototype,"cancelLabel",void 0),ae([t.Input()],e.prototype,"emptyStateTitle",void 0),ae([t.Input()],e.prototype,"emptyStateActionLabel",void 0),ae([t.Input()],e.prototype,"emptyStateIconClass",void 0),ae([t.Input()],e.prototype,"aspectRatio",void 0),ae([t.Input()],e.prototype,"rounded",void 0),ae([t.Input()],e.prototype,"allowSelectAnother",void 0),ae([t.Input()],e.prototype,"allowRemove",void 0),ae([t.Input()],e.prototype,"allowCancel",void 0),ae([t.Input()],e.prototype,"imageSource",void 0),ae([t.Output()],e.prototype,"visibleChange",void 0),ae([t.Output()],e.prototype,"changeImage",void 0),ae([t.Output()],e.prototype,"croppedImage",void 0),ae([t.Output()],e.prototype,"croppedCanvas",void 0),ae([t.Output()],e.prototype,"removedImage",void 0),ae([t.Output()],e.prototype,"cancel",void 0),ae([t.ViewChild("image",{static:!0})],e.prototype,"image",void 0),ae([t.ContentChild(ro,{static:!0})],e.prototype,"headerSection",void 0),ae([t.ContentChild(ao,{static:!0})],e.prototype,"footerSection",void 0),e=n=ae([t.Component({selector:"s-image-cropper",template:'<div [id]="id">\n <p-dialog\n styleClass="s-image-cropper {{rounded ? \'s-image-cropper--rounded\' : \'\'}}"\n [header]="headerSection ? \'\' : header"\n [visible]="visible"\n (visibleChange)="onModalVisibleChange($event)"\n [modal]="true"\n [blockScroll]="true"\n [draggable]="false"\n [resizable]="false"\n [closeOnEscape]="allowCancel"\n [closable]="allowCancel"\n appendTo="body">\n\n <p-header *ngIf="headerSection">\n <ng-content select="s-header"></ng-content>\n </p-header>\n\n <s-empty-state\n [id]="id + \'-empty-state\'"\n *ngIf="!imageSource"\n [title]="emptyStateTitle"\n [iconClass]="emptyStateIconClass"\n [primaryActionLabel]="emptyStateActionLabel"\n (primaryAction)="onChangeImage()">\n </s-empty-state>\n\n <div [attr.data-hidden]="!imageSource" class="image-container">\n <img\n [id]="id + \'-cropper\'"\n #image\n [src]="imageSource || \'\'"\n alt="cropped image"/>\n </div>\n\n <p-footer>\n <div class="ui-fluid" *ngIf="!footerSection">\n <div class="ui-g button-container">\n\n <div *ngIf="allowCancel" class="ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2">\n <s-button\n [id]="id + \'-cancel-button\'"\n type="button"\n priority="link"\n [label]="cancelLabel"\n (onClick)="onCancel()">\n </s-button>\n </div>\n\n <div *ngIf="imageSource && allowRemove" class="ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2">\n <s-button\n [id]="id + \'-remove-button\'"\n type="button"\n priority="secondary"\n [label]="removeLabel"\n (onClick)="onRemoveImage()">\n </s-button>\n </div>\n\n <div *ngIf="imageSource && allowSelectAnother" class="ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2">\n <s-button\n [id]="id + \'-select-another-button\'"\n type="button"\n priority="secondary"\n [label]="selectAnotherLabel"\n (onClick)="onChangeImage()">\n </s-button>\n </div>\n\n <div class="ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2">\n <s-button\n [id]="id + \'-crop-button\'"\n type="button"\n [label]="cropLabel"\n (onClick)="onCropImage()">\n </s-button>\n </div>\n </div>\n </div>\n\n <ng-content select="s-footer" *ngIf="footerSection"></ng-content>\n </p-footer>\n </p-dialog>\n</div>',encapsulation:t.ViewEncapsulation.None,styles:['/*!\n * Cropper.js v1.4.1\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2018-07-15T09:54:43.167Z\n */.cropper-container{-moz-user-select:none;-ms-touch-action:none;-ms-user-select:none;-webkit-user-select:none;direction:ltr;font-size:0;line-height:0;position:relative;touch-action:none;user-select:none}.cropper-container img{display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:rgba(51,153,255,.75) solid 1px;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.33333%;left:0;top:33.33333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.33333%;top:0;width:33.33333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}','.s-image-cropper{border-radius:0!important;height:80%!important;max-width:100%!important;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column}.s-image-cropper .ui-dialog-content{overflow:hidden;height:auto!important;-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.s-image-cropper .ui-dialog-footer,.s-image-cropper .ui-dialog-header{-ms-flex-negative:0;flex-shrink:0;direction:ltr}.s-image-cropper .image-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100%}.s-image-cropper img{max-width:100%;max-height:100%}.s-image-cropper .button-container{-ms-flex-flow:wrap-reverse;flex-flow:wrap-reverse;-ms-flex-pack:end;justify-content:flex-end}.s-image-cropper .cropper-view-box{outline:#fff dashed 2px}.s-image-cropper .cropper-line{opacity:0}.s-image-cropper .cropper-point{background-color:#fff;opacity:1;height:15px;width:15px;border-radius:50%}.s-image-cropper .cropper-point.point-e{right:-8.5px;top:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-n{top:-8.5px;left:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-w{left:-8.5px;top:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-s{bottom:-8.5px;left:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-ne{right:-8.5px;top:-8.5px}.s-image-cropper .cropper-point.point-nw{left:-8.5px;top:-8.5px}.s-image-cropper .cropper-point.point-sw{left:-8.5px;bottom:-8.5px}.s-image-cropper .cropper-point.point-se{right:-8.5px;bottom:-8.5px}.s-image-cropper--rounded .cropper-face,.s-image-cropper--rounded .cropper-view-box{border-radius:50%}.s-image-cropper--rounded .cropper-view-box{outline:rgba(255,255,255,.3) dashed 1px}.s-image-cropper--rounded .cropper-view-box:after{border:2px dashed #fff;border-radius:50%;content:"";height:100%;left:0;position:absolute;top:0;width:100%}@media (max-width:767px){.s-image-cropper{border:none!important;top:0!important;left:0!important;width:100%!important;height:100%!important}}@media (min-width:768px){.s-image-cropper{width:80%!important}}@media (min-width:1200px){.s-image-cropper{width:60%!important}}']})],e)}(),po=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,b.DialogModule,xe,Ot,so],declarations:[lo],exports:[lo,so],entryComponents:[lo]})],e)}(),co=function(){function e(e,t,n){this.componentFactoryResolver=e,this.appRef=t,this.injector=n}return e.prototype.show=function(e){var t=this;this.activeCropper&&this.destroy(this.activeCropper);var n={componentRef:this.componentFactoryResolver.resolveComponentFactory(lo).create(this.injector),ngUnsubscribe:new r.Subject};this.activeCropper=n,this.appRef.attachView(n.componentRef.hostView);var o=n.componentRef.hostView.rootNodes[0];document.body.appendChild(o),this.configureInstance(n,e),n.componentRef.instance.visible=!0,n.componentRef.instance.visibleChange.pipe(a.takeUntil(this.activeCropper.ngUnsubscribe),a.delay(1e3)).subscribe((function(e){e||t.destroy(n)}))},e.prototype.configureInstance=function(e,t){var n=e.componentRef.instance;t&&Object.keys(t).forEach((function(o){var i=t[o];"function"!=typeof i?n[o]=i:"function"==typeof i&&n[o].pipe(a.takeUntil(e.ngUnsubscribe)).subscribe((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t[o].apply(t,ue(e))}))})),n.visibleChange.pipe(a.takeUntil(e.ngUnsubscribe)).subscribe((function(e){return n.visible=e}))},e.prototype.destroy=function(e){e.ngUnsubscribe.next(),e.ngUnsubscribe.complete(),this.appRef.detachView(e.componentRef.hostView),e.componentRef.destroy()},e.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ApplicationRef},{type:t.Injector}]},e=ae([t.Injectable()],e)}();(to=e.ThumbnailSize||(e.ThumbnailSize={})).Small="small",to.Medium="medium",to.Large="large";var uo,mo=function(){function e(){}return e.prototype.getBinaryFile=function(e){var t=this;return new Promise((function(n){var o=t.getOrientation.bind(t),i=new XMLHttpRequest;i.addEventListener("load",(function(){if(4===i.readyState&&(200==i.status||0===i.status)){var e=o(i.response);i=null,n(e)}})),i.addEventListener("error",(function(){throw i=null,new Error("Não foi possível carregar a imagem")})),i.open("GET",e.src,!0),i.responseType="arraybuffer",i.send(null)}))},e.prototype.getOrientation=function(e){var t=new DataView(e);if(65496!=t.getUint16(0,!1))return-2;for(var n=t.byteLength,o=2;o<n;){var i=t.getUint16(o,!1);if(o+=2,65505==i){if(1165519206!=t.getUint32(o+=2,!1))return-1;var r=18761==t.getUint16(o+=6,!1);o+=t.getUint32(o+4,r);var a=t.getUint16(o,r);o+=2;for(var s=0;s<a;s++)if(274==t.getUint16(o+12*s,r))return t.getUint16(o+12*s+8,r)}else{if(65280!=(65280&i))break;o+=t.getUint16(o,!1)}}return-1},e=ae([t.Injectable()],e)}(),fo=function(){function n(t){this.thumbnailService=t,this.fallback=!1,this.id="s-thumbnail-"+o.nextId++,this.size=e.ThumbnailSize.Medium,this.iconClass="far fa-image",this.hasAction=!1,this.actionIconClass="fas fa-camera",this.isTile=!1,this.isBrand=!1,this.ngUnsubscribe=new r.Subject}var o;return o=n,n.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},n.prototype.ngAfterViewInit=function(){var e=this;this.imgEl&&this.imgEl.nativeElement.addEventListener("load",(function(){r.from(e.thumbnailService.getBinaryFile(e.imgEl.nativeElement)).pipe(a.takeUntil(e.ngUnsubscribe)).subscribe((function(t){return e.orientation=t}))}))},n.nextId=0,n.ctorParameters=function(){return[{type:mo}]},ae([t.ViewChild("img",{static:!1})],n.prototype,"imgEl",void 0),ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"size",void 0),ae([t.Input()],n.prototype,"imageSource",void 0),ae([t.Input()],n.prototype,"imageFallback",void 0),ae([t.Input()],n.prototype,"imageAlt",void 0),ae([t.Input()],n.prototype,"iconClass",void 0),ae([t.Input()],n.prototype,"hasAction",void 0),ae([t.Input()],n.prototype,"actionIconClass",void 0),ae([t.Input()],n.prototype,"isTile",void 0),ae([t.Input()],n.prototype,"isBrand",void 0),n=o=ae([t.Component({selector:"s-thumbnail",template:'<div\n [id]="id"\n class="thumbnail-container thumbnail-container--{{size}}"\n [ngClass]="{\n \'thumbnail-container--with-action\': hasAction,\n \'thumbnail-container--brand\': isBrand\n }">\n <div\n [id]="id + \'-image-container\'"\n *ngIf="imageSource || imageFallback"\n class="image-container"\n [ngClass]="{\n \'image-container--rounded\': !isBrand\n }">\n <img\n #img\n [id]="id + \'-image\'"\n (error)="fallback = true"\n [src]="imageSource"\n [alt]="imageAlt"\n *ngIf="!fallback"\n [ngClass]="{\n \'smallThumbnail\': isTile,\n \'exif-orientation-2\': orientation == 2,\n \'exif-orientation-3\': orientation == 3,\n \'exif-orientation-4\': orientation == 4,\n \'exif-orientation-5\': orientation == 5,\n \'exif-orientation-6\': orientation == 6,\n \'exif-orientation-7\': orientation == 7,\n \'exif-orientation-8\': orientation == 8\n }"/>\n\n <img\n #img\n [id]="id + \'-image-fallback\'"\n (error)="imageFallback = undefined"\n [src]="imageFallback"\n [alt]="imageAlt"\n *ngIf="fallback && imageFallback"\n [ngClass]="{\n \'smallThumbnail\': isTile,\n \'exif-orientation-2\': orientation == 2,\n \'exif-orientation-3\': orientation == 3,\n \'exif-orientation-4\': orientation == 4,\n \'exif-orientation-5\': orientation == 5,\n \'exif-orientation-6\': orientation == 6,\n \'exif-orientation-7\': orientation == 7,\n \'exif-orientation-8\': orientation == 8\n }"/>\n\n <i\n *ngIf="fallback && !imageFallback"\n ngClass="far fa-image"\n class="fallback-img-color">\n </i>\n </div>\n <div\n [id]="id + \'-action-icon-container\'"\n *ngIf="hasAction"\n class="action-icon-container action-icon-container--{{size}}">\n <span\n [id]="id + \'-action-icon\'"\n [class]="actionIconClass"\n aria-hidden="true">\n </span>\n </div>\n <div\n [id]="id + \'-icon-container\'"\n *ngIf="!imageSource && !imageFallback"\n class="icon-container icon-container--{{size}}"\n [ngClass]="{\'image-container--rounded\': !isBrand}">\n <span\n [id]="id + \'-icon\'"\n [class]="iconClass"\n aria-hidden="true">\n </span>\n </div>\n\n <ng-content></ng-content>\n</div>\n',styles:[":host{display:inline-block}.thumbnail-container{color:#fff;position:relative;text-align:center}.thumbnail-container--large{font-size:50px;height:100px;width:100px}.thumbnail-container--large.thumbnail-container--brand{width:200px}.thumbnail-container--medium{font-size:40px;height:70px;width:70px}.thumbnail-container--medium.thumbnail-container--brand{width:140px}.thumbnail-container--small{font-size:22px;height:40px;width:40px}.thumbnail-container--small.thumbnail-container--brand{width:80px}.thumbnail-container--with-action{cursor:pointer}.action-icon-container{background-color:#428bca;border-radius:50%;bottom:0;position:absolute;right:0}.action-icon-container--large,.action-icon-container--medium{font-size:10pt;height:25px;padding:3px;width:25px}.action-icon-container--small{font-size:6pt;height:16px;padding:2px;width:16px}.icon-container,.image-container{-ms-flex-align:center;align-items:center;height:100%;overflow:hidden;width:100%}.icon-container--rounded,.image-container--rounded{border-radius:50%}.smallThumbnail{height:40px!important}.icon-container{background-color:#ccc;color:#fff}.icon-container--large{line-height:98px}.icon-container--medium{line-height:68px}.icon-container--small{line-height:38px}.image-container{-ms-flex-align:center;align-items:center;background-color:#ccc;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.image-container img{width:100%}.image-container img.exif-orientation-2{transform:rotateY(180deg)}.image-container img.exif-orientation-3{transform:rotate(180deg)}.image-container img.exif-orientation-4{transform:rotate(180deg) rotateY(180deg)}.image-container img.exif-orientation-5{transform:rotate(270deg) rotateY(180deg)}.image-container img.exif-orientation-6{transform:rotate(90deg)}.image-container img.exif-orientation-7{transform:rotate(90deg) rotateY(180deg)}.image-container img.exif-orientation-8{transform:rotate(270deg)}.fallback-img-color{color:#fff}"]})],n)}(),ho=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[fo],exports:[fo],providers:[mo]})],e)}(),go=function(){function e(){this.id="s-object-card-field-"+n.nextId++,this.buttonClick=new t.EventEmitter}var n;return n=e,e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"imageSource",void 0),ae([t.Input()],e.prototype,"imageAlt",void 0),ae([t.Input()],e.prototype,"iconClass",void 0),ae([t.Input()],e.prototype,"label",void 0),ae([t.Input()],e.prototype,"description",void 0),ae([t.Input()],e.prototype,"buttonLabel",void 0),ae([t.Input()],e.prototype,"buttonModel",void 0),ae([t.Output()],e.prototype,"buttonClick",void 0),ae([t.ContentChild(fo,{static:!0})],e.prototype,"thumbnailComponent",void 0),ae([t.ViewChild(t.TemplateRef,{static:!0})],e.prototype,"content",void 0),e=n=ae([t.Component({selector:"s-object-card-field",template:'<ng-template>\n <div class="container">\n <ng-content select="s-thumbnail"></ng-content>\n <s-thumbnail\n [id]="id + \'-thumbnail\'"\n *ngIf="!thumbnailComponent && (imageSource || iconClass)"\n [imageSource]="imageSource"\n [imageAlt]="imageAlt || label"\n [iconClass]="iconClass"\n size="small"\n ></s-thumbnail>\n\n <div class="info-container">\n <div #labelTemplate><ng-content select="[labelTemplate]"></ng-content></div>\n <span\n [id]="id + \'-label\'"\n *ngIf="!labelTemplate.children.length"\n class="label"\n [pTooltip]="label"\n tooltipPosition="top"\n showDelay="500"\n >{{ label }}</span\n >\n\n <div #descriptionTemplate><ng-content select="[descriptionTemplate]"></ng-content></div>\n <span\n [id]="id + \'-description\'"\n *ngIf="!descriptionTemplate.children.length"\n class="description"\n [pTooltip]="description"\n tooltipPosition="top"\n showDelay="500"\n >{{ description }}</span\n >\n\n <s-button\n [id]="id + \'-button\'"\n *ngIf="buttonLabel"\n styleClass="object-card-button"\n priority="link"\n [label]="buttonLabel"\n [model]="buttonModel"\n size="small"\n (onClick)="buttonClick.emit($event)"\n ></s-button>\n </div>\n </div>\n</ng-template>\n',styles:[".container{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:100%}.info-container{margin-left:10px}.info-container,.info-container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.info-container .label{color:#999;display:block}.info-container .description{display:block}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.info-container{-ms-flex:1;flex:1}}@media (max-width:767px){.info-container,.info-container span{white-space:normal}}.info-container:only-child{margin-left:0}"]})],e)}(),bo=function(){function n(){this.id="s-object-card-main-"+o.nextId++,this.iconClass="fa fa-picture-o",this.hasThumbnail=!0,this.hasDescription=!0,this.isBrand=!1,this.buttonClick=new t.EventEmitter,this._thumbnailSize=e.ThumbnailSize.Medium}var o;return o=n,Object.defineProperty(n.prototype,"thumbnailSize",{get:function(){return this._thumbnailSize},set:function(e){this._thumbnailSize=e,this.thumbnailComponent&&(this.thumbnailComponent.size=e)},enumerable:!0,configurable:!0}),n.prototype.onResize=function(){this.update()},n.prototype.ngAfterContentInit=function(){this.update()},n.prototype.update=function(){var t=window.innerWidth;this.thumbnailSize=t<=Dt.SM_MAX?e.ThumbnailSize.Small:e.ThumbnailSize.Medium},n.nextId=0,ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"imageSource",void 0),ae([t.Input()],n.prototype,"imageFallback",void 0),ae([t.Input()],n.prototype,"imageAlt",void 0),ae([t.Input()],n.prototype,"iconClass",void 0),ae([t.Input()],n.prototype,"hasThumbnail",void 0),ae([t.Input()],n.prototype,"hasDescription",void 0),ae([t.Input()],n.prototype,"isBrand",void 0),ae([t.Input()],n.prototype,"label",void 0),ae([t.Input()],n.prototype,"description",void 0),ae([t.Input()],n.prototype,"buttonLabel",void 0),ae([t.Input()],n.prototype,"buttonModel",void 0),ae([t.Output()],n.prototype,"buttonClick",void 0),ae([t.ContentChild(fo,{static:!0})],n.prototype,"thumbnailComponent",void 0),ae([t.HostListener("window:resize")],n.prototype,"onResize",null),n=o=ae([t.Component({selector:"s-object-card-main",template:'<ng-container *ngIf="hasThumbnail">\n <ng-content select="s-thumbnail"></ng-content>\n <s-thumbnail\n [id]="id + \'-thumbnail\'"\n [imageSource]="imageSource"\n [imageFallback]="imageFallback"\n [imageAlt]="imageAlt || label"\n [iconClass]="iconClass"\n [size]="thumbnailSize"\n *ngIf="!thumbnailComponent"\n [isBrand]="isBrand"\n ></s-thumbnail>\n</ng-container>\n\n<ng-container *ngIf="hasDescription">\n <div class="info-container">\n <div #labelTemplate><ng-content select="[labelTemplate]"></ng-content></div>\n <span\n [id]="id + \'-label\'"\n *ngIf="!labelTemplate.children.length"\n class="label"\n [pTooltip]="label"\n tooltipPosition="top"\n showDelay="500"\n >{{ label }}</span\n >\n\n <div #descriptionTemplate><ng-content select="[descriptionTemplate]"></ng-content></div>\n <span\n [id]="id + \'-description\'"\n *ngIf="!descriptionTemplate.children.length"\n class="description"\n [pTooltip]="description"\n tooltipPosition="top"\n showDelay="500"\n >{{ description }}</span\n >\n <s-button\n [id]="id + \'-button\'"\n *ngIf="buttonLabel"\n styleClass="object-card-button"\n priority="link"\n [label]="buttonLabel"\n [model]="buttonModel"\n size="small"\n (onClick)="buttonClick.emit($event)"\n ></s-button>\n </div>\n</ng-container>\n',styles:[":host{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;min-height:70px}.info-container{margin-left:10px;-ms-flex:1;flex:1}.info-container,.info-container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.info-container .label{display:block;font-weight:700}.info-container .description{color:#999;display:block}@media (max-width:767px){.info-container,.info-container span{white-space:normal}}"]})],n)}(),vo=U,yo=function(){function e(e,o){this.cdr=e,this.elementRef=o,this.id="s-object-card-"+n.nextId++,this.expanded=!1,this.expandTooltip="Abrir painel",this.collapseTooltip="Fechar painel",this.fieldsMinWidth=200,this.expandedChange=new t.EventEmitter,this.maxVisibleFields=0}var n;return n=e,e.prototype.ngAfterViewInit=function(){var e=this;this.update(),this.cdr.detectChanges(),this.fields.changes.subscribe((function(){e.update()})),vo({strategy:"scroll"}).listenTo(this.elementRef.nativeElement,(function(){return e.update()}))},e.prototype.update=function(){var e,t,n,o=window.innerWidth,i=this.elementRef.nativeElement.offsetWidth,r=.3*i>260?.3*i:260,a=this.fieldsMinWidth,s=this.elementRef.nativeElement.getElementsByClassName("s-object-card-field");try{for(var l=ce(s),p=l.next();!p.done;p=l.next()){p.value.style.minWidth=this.fieldsMinWidth+"px"}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}(n=o<=Dt.SM_MAX?0:Math.floor((i-r)/a))&&n<this.fields.length&&(n=Math.floor((i-r-50)/a)),this.maxVisibleFields=n,n>=this.fields.length&&this.expanded&&this.collapse()},e.prototype.toggle=function(){this.expanded?this.collapse():this.expand()},e.prototype.expand=function(){this.expanded=!0,this.expandedChange.emit(this.expanded)},e.prototype.collapse=function(){this.expanded=!1,this.expandedChange.emit(this.expanded)},e.prototype.getExpandedFieldWidth=function(){var e=this.elementRef.nativeElement.offsetWidth;return 12/(e<=Dt.SM_MAX?1:e<=Dt.MD_MAX?2:e<=Dt.LG_MAX?4:6)},e.nextId=0,e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:t.ElementRef}]},ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"expanded",void 0),ae([t.Input()],e.prototype,"expandTooltip",void 0),ae([t.Input()],e.prototype,"collapseTooltip",void 0),ae([t.Input()],e.prototype,"fieldsMinWidth",void 0),ae([t.Output()],e.prototype,"expandedChange",void 0),ae([t.ContentChild(bo,{static:!0})],e.prototype,"main",void 0),ae([t.ContentChildren(go,{descendants:!0})],e.prototype,"fields",void 0),e=n=ae([t.Component({selector:"s-object-card",template:'<div [id]="id" class="container">\n <div\n [id]="id + \'-main-container\'"\n class="main-container"\n [ngClass]="{\n \'with-hidden-fields\': fields.length > maxVisibleFields,\n \'with-visible-fields\': fields.length && maxVisibleFields\n }"\n >\n <div class="object-content">\n <div class="s-object-card-main"><ng-content select="s-object-card-main"></ng-content></div>\n\n <div class="divider" *ngIf="maxVisibleFields && fields.length"></div>\n\n <div *ngFor="let field of (fields.toArray() | slice: 0:maxVisibleFields)" class="s-object-card-field">\n <ng-container *ngTemplateOutlet="field.content"></ng-container>\n </div>\n </div>\n\n <div\n [id]="id + \'-expand-icon-container\'"\n class="expand-icon-container"\n (click)="toggle()"\n [pTooltip]="expanded ? collapseTooltip : expandTooltip"\n tooltipPosition="top"\n [showDelay]="500"\n >\n <span [id]="id + \'-expand-icon\'" class="expand-icon fa" [ngClass]="{ \'fa-minus\': expanded, \'fa-plus\': !expanded }"></span>\n </div>\n </div>\n\n <div [id]="id + \'-expandable-container\'" [@expandableContent]="expanded" class="expandable-container">\n <div class="ui-g ui-g-12">\n <ng-container *ngFor="let field of (fields.toArray() | slice: maxVisibleFields:fields.length)">\n <div class="ui-g-{{getExpandedFieldWidth()}}">\n <div class="s-object-card-field"><ng-container *ngTemplateOutlet="field.content"></ng-container></div>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n',animations:[d.trigger("expandableContent",[d.state("*",d.style({height:"0"})),d.state("false",d.style({height:"0"})),d.state("true",d.style({height:"*"})),d.transition("* => true",d.animate("200ms ease-out")),d.transition("false <=> true",d.animate("200ms ease-out"))])],styles:[":host{display:block}.container{margin-bottom:20px}.main-container{display:-ms-flexbox;display:flex}.expandable-container,.main-container{background-color:#fff;border:1px solid #ccc;position:relative;overflow:hidden;width:100%}.expandable-container{border-top:none;box-shadow:inset 0 6px 4px -4px #ddd;margin-top:-1px}.expand-icon-container{display:none;text-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;width:25px;position:absolute;right:15px;height:25px;top:calc(50% - 12px)}.expand-icon{-ms-flex:1;flex:1}.object-content{display:-ms-flexbox;display:flex;width:100%}.s-object-card-main{-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:1;flex-grow:1;overflow:hidden;padding:15px}.main-container.with-visible-fields .s-object-card-main{max-width:30%}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.main-container.with-visible-fields .s-object-card-main{width:20%}}.s-object-card-field{overflow:hidden;height:100%}.main-container .s-object-card-field{padding:15px}.main-container .divider{width:1px;-ms-flex-negative:0;flex-shrink:0;background-color:#ccc;margin:15px -1px 15px 0}.main-container.with-hidden-fields .object-content{width:calc(100% - 35px)}.main-container.with-hidden-fields .expand-icon-container{display:-ms-flexbox;display:flex}::ng-deep .object-card-button{padding-left:0!important;padding-right:10px!important;border:none!important;height:auto!important;min-width:auto!important;text-align:left!important}@media (max-width:767px){.s-object-card-main{max-width:calc(100% - 50px)}}"]})],e)}(),xo=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule,ho,xe],declarations:[yo,bo,go],exports:[ho,yo,bo,go]})],e)}(),wo=function(){function e(){this.id="s-product-header-"+n.nextId++,this.baseZIndex=0}var n;return n=e,e.prototype.ngAfterViewInit=function(){this.container.nativeElement.style.zIndex=String(this.baseZIndex+ ++p.DomHandler.zindex)},e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"header",void 0),ae([t.Input()],e.prototype,"baseZIndex",void 0),ae([t.ViewChild("headerContainer",{static:!1})],e.prototype,"container",void 0),e=n=ae([t.Component({selector:"s-product-header",template:'<div [id]="id" class="box">\n <div #headerContainer class="sds-container header">\n <h1 class="title">{{header}}</h1>\n <div class="content">\n <ng-content></ng-content>\n </div>\n </div>\n</div>',styles:[".box{position:relative;width:100%;height:70px}.header{padding-top:15px;padding-bottom:15px;position:fixed;width:100%;top:0;left:0;height:70px;background-color:#fff;border-bottom:1px solid #ddd;box-shadow:0 1px 2px #ddd;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}.title{color:#999;font-weight:400;font-size:16pt;margin-right:15px;min-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content{display:-ms-flexbox;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]})],e)}(),Co=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule,ho],declarations:[wo],exports:[wo,ho]})],e)}(),Io=function(){function e(e){this.focusTrapFactory=e,this.id="s-sidebar-"+n.nextId++,this.visible=!1,this.baseZIndex=0,this.largeSized=!1,this.visibleChange=new t.EventEmitter}var n;return n=e,e.prototype.onShow=function(){p.DomHandler.addClass(document.body,"ui-overflow-hidden-sidebar"),this.focusTrapFactory.create(this.innerSidebar.containerViewChild.nativeElement,!1).focusInitialElementWhenReady()},e.prototype.onHide=function(){p.DomHandler.removeClass(document.body,"ui-overflow-hidden-sidebar")},e.prototype.close=function(e){p.DomHandler.removeClass(document.body,"ui-overflow-hidden-sidebar"),this.visibleChange.emit(!1),e.preventDefault()},e.nextId=0,e.ctorParameters=function(){return[{type:j.FocusTrapFactory}]},ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"visible",void 0),ae([t.Input()],e.prototype,"header",void 0),ae([t.Input()],e.prototype,"baseZIndex",void 0),ae([t.Input()],e.prototype,"largeSized",void 0),ae([t.Output()],e.prototype,"visibleChange",void 0),ae([t.ViewChild($.Sidebar,{static:!0})],e.prototype,"innerSidebar",void 0),ae([t.ContentChild(ro,{static:!0})],e.prototype,"headerSection",void 0),ae([t.ContentChild(ao,{static:!0})],e.prototype,"footerSection",void 0),e=n=ae([t.Component({selector:"s-sidebar",template:'<p-sidebar [id]="id" [visible]="visible" (visibleChange)="visibleChange.emit($event)" [blockScroll]="true" [baseZIndex]="baseZIndex"\n [modal]="true" [dismissible]="false" [showCloseIcon]="false" position="right" appendTo="body"\n [styleClass]="largeSized ? \'s-sidebar-panel s-sidebar-panel-lg\' : \'s-sidebar-panel\'" (onShow)="onShow()" (onHide)="onHide()">\n\n <div [id]="id + \'-container\'" class="s-sidebar-container">\n\n <a href="#" role="button" class="s-sidebar-close" (click)="close($event)"><span class="fa fa-times" aria-hidden="true"></span></a>\n\n <div [id]="id + \'-header\'" class="s-sidebar-header" *ngIf="header && !headerSection">\n <s-header>\n <h2 class="sds-panel-title">{{header}}</h2>\n </s-header>\n </div>\n\n <div [id]="id + \'-header\'" class="s-sidebar-header" *ngIf="headerSection">\n <ng-content select="s-header"></ng-content>\n </div>\n\n <p-scrollPanel [id]="id + \'-content-container\'" class="s-sidebar-content-container" styleClass="s-sidebar-content">\n <ng-content></ng-content>\n </p-scrollPanel>\n\n <div [id]="id + \'-footer\'" class="s-sidebar-footer" *ngIf="footerSection">\n <ng-content select="s-footer"></ng-content>\n </div>\n\n </div>\n\n</p-sidebar>\n',encapsulation:t.ViewEncapsulation.None,styles:[".ui-overflow-hidden-sidebar{overflow:hidden}body .ui-sidebar.s-sidebar-panel{width:50%;padding:0}@media (max-width:767px){body .ui-sidebar.s-sidebar-panel{width:100%}}@media (min-width:768px){body .ui-sidebar.s-sidebar-panel{width:75%}}@media (min-width:992px){body .ui-sidebar.s-sidebar-panel{width:50%}body .ui-sidebar.s-sidebar-panel.s-sidebar-panel-lg{width:75%}}body .ui-sidebar.s-sidebar-panel .s-sidebar-container{height:100%;width:100%;padding:20px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column}body .ui-sidebar.s-sidebar-panel .s-sidebar-close{position:absolute;right:20px;top:20px;color:#333}body .ui-sidebar.s-sidebar-panel .s-sidebar-header{border-bottom:1px solid #ccc;padding-bottom:15px;padding-right:20px;margin-bottom:15px;-ms-flex-negative:0;flex-shrink:0}body .ui-sidebar.s-sidebar-panel .s-sidebar-content-container{-ms-flex:1;flex:1;overflow:hidden}body .ui-sidebar.s-sidebar-panel .s-sidebar-content{height:100%}body .ui-sidebar.s-sidebar-panel .s-sidebar-footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;-ms-flex-negative:0;flex-shrink:0}body .ui-sidebar.s-sidebar-panel p-scrollpanel{padding-top:30px}body .ui-sidebar.s-sidebar-panel .s-sidebar-header+p-scrollpanel{padding-top:0}p-scrollPanel{display:block}"]})],e)}(),_o=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,j.A11yModule,$.SidebarModule,H.ScrollPanelModule,so],declarations:[Io],exports:[so,Io]})],e)}(),ko=function(){function e(){this.id="s-stats-card-"+n.nextId++,this.alwaysWithBorder=!1,this.lightVersion=!1,this.lightMode=!0,this.iconClass="fa fa-bar-chart",this.color="#339966",this.animateNumbers=!0,this.clickable=!1,this.tooltip="",this.onClick=new t.EventEmitter,this.ANIMATION_DURATION_MS=200,this.STEP_DURATION_MS=20,this.previousValue="0",this._value="0"}var n;return n=e,Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this.previousValue=this._value,this._value=String(e),this.animateNumbers?this.updateDisplayValue():this.displayValue=this.value},enumerable:!0,configurable:!0}),e.prototype.updateDisplayValue=function(){var e=this,t=new h.BigNumber(this.ANIMATION_DURATION_MS),n=new h.BigNumber(this.STEP_DURATION_MS),o=t.dividedBy(n),i=new h.BigNumber(this.previousValue.replace(/\D/g,"")),r=new h.BigNumber(this.value.replace(/\D/g,"")),a=r.minus(i).absoluteValue().dividedBy(o),s=i.isLessThan(r);clearInterval(this.intervalId),this.displayValue=this.replaceNumericPositions(this.value);var l=i;this.intervalId=setInterval((function(){s&&l.isLessThan(r)?(e.displayValue=e.replaceNumericPositions(e.displayValue,l),l=l.plus(a)):!s&&l.isGreaterThan(r)?(e.displayValue=e.replaceNumericPositions(e.displayValue,l),l=l.minus(a)):(e.displayValue=e.value,clearInterval(e.intervalId))}),this.STEP_DURATION_MS)},e.prototype.replaceNumericPositions=function(e,t){var n=e.replace(/[^\d]/g,""),o=(t?t.toString():"").toString().replace(/\D/g,"").padStart(n.length,"0"),i=0;return e.split("").map((function(e){return Number(e)||"0"===e?o[i++]:e})).join("")},e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"label",void 0),ae([t.Input()],e.prototype,"alwaysWithBorder",void 0),ae([t.Input()],e.prototype,"lightVersion",void 0),ae([t.Input()],e.prototype,"lightMode",void 0),ae([t.Input()],e.prototype,"iconClass",void 0),ae([t.Input()],e.prototype,"color",void 0),ae([t.Input()],e.prototype,"animateNumbers",void 0),ae([t.Input()],e.prototype,"clickable",void 0),ae([t.Input()],e.prototype,"value",null),ae([t.Input()],e.prototype,"tooltip",void 0),ae([t.Output()],e.prototype,"onClick",void 0),e=n=ae([t.Component({selector:"s-stats-card",template:'<div\n [id]="id"\n class="s-stats-card"\n [ngClass]="{\n \'s-stats-card--always-border\': alwaysWithBorder,\n \'s-stats-card--light\': lightMode,\n \'s-stats-card--color\': !lightMode,\n \'s-stats-card--light-version\': lightVersion,\n \'s-stats-card--clickable\': clickable\n }"\n (click)="clickable && onClick.next($event)">\n\n <div\n [id]="id + \'-background\'"\n class="s-stats-card-background"\n [ngStyle]="{ \'background-color\': !lightMode && color || \'\' }">\n </div>\n <div\n [id]="id + \'-overlay\'"\n class="s-stats-card-overlay">\n </div>\n\n <div\n [id]="id + \'-info-container\'"\n class="s-stats-card-info-container">\n <div class="s-stats-card-info-inner-container">\n <div\n [id]="id + \'-icon-container\'"\n class="s-stats-card-icon-container"\n [ngStyle]="{ \'background-color\': lightMode && color || \'\' }">\n <span\n [id]="id + \'-icon\'"\n [class]="iconClass"\n [ngClass]="{ \'s-stats-card-icon\': true }"\n [ngStyle]="{\'color\': !lightMode && color || \'\'}"\n aria-hidden="true"></span>\n </div>\n\n <div\n [id]="id + \'-text-container\'"\n class="s-stats-card-text-container">\n <h4\n [id]="id + \'-label\'"\n class="s-stats-card-label"\n [pTooltip]="label"\n tooltipPosition="top"\n showDelay="500">\n {{ label }}\n </h4>\n <span\n [id]="id + \'-value\'"\n class="s-stats-card-value"\n [pTooltip]="displayValue"\n tooltipPosition="top"\n showDelay="500">\n {{ displayValue }}\n </span>\n </div>\n </div>\n <div class="s-stats-card-content-inner-container">\n <div #content class="s-stats-card-content-container">\n <ng-content></ng-content>\n </div>\n <div\n *ngIf="content.children.length"\n class="s-stats-card-content-separator">\n </div>\n </div>\n <span\n *ngIf="tooltip"\n class="s-status-card-tooltip"\n [pTooltip]="tooltip"\n tooltipPosition="right">\n <i class="fa fa-info-circle s-status-card-tooltip-icon"></i>\n </span>\n </div>\n</div>\n',encapsulation:t.ViewEncapsulation.None,styles:["s-stats-card{display:block;height:auto;position:relative}s-stats-card .s-stats-card{border:1px solid transparent;min-width:120px;overflow:hidden;position:relative}s-stats-card .s-stats-card .s-stats-card-background,s-stats-card .s-stats-card .s-stats-card-overlay{height:calc(100% - 2px);left:1px;position:absolute;top:1px;width:calc(100% - 2px)}s-stats-card .s-stats-card .s-stats-card-background{background-color:#fff}s-stats-card .s-stats-card .s-stats-card-overlay{background-color:#000;opacity:0;transition:opacity .2s ease-out}s-stats-card .s-stats-card .s-stats-card-info-container{overflow:auto;padding:15px;position:relative}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container{overflow:hidden;position:relative}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container{float:left;font-size:24px;height:50px;line-height:50px;text-align:center;transition:width .2s ease-out;width:50px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container{color:#fff;float:left;height:50px;max-width:calc(100% - 65px);padding-left:15px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label{font-weight:400;width:100%}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{display:inline-block;font-size:20px;font-weight:700;width:100%}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container .s-stats-card-content-separator{border-top:1px solid #ccc;margin:15px 0;-ms-flex-order:1;order:1}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container .s-stats-card-content-container{-ms-flex-order:2;order:2}s-stats-card .s-stats-card .s-stats-card-info-container .s-status-card-tooltip{font-size:1rem;line-height:0;margin:.3rem;position:absolute;right:0;top:0}s-stats-card .s-stats-card .s-stats-card-info-container .s-status-card-tooltip .s-status-card-tooltip-icon{color:#fff}s-stats-card .s-stats-card.s-stats-card--color .s-stats-card-icon-container{background-color:#fff}s-stats-card .s-stats-card.s-stats-card--light *{color:#333}s-stats-card .s-stats-card.s-stats-card--light .s-stats-card-icon{color:#fff}s-stats-card .s-stats-card.s-stats-card--light * .s-status-card-tooltip .s-status-card-tooltip-icon,s-stats-card .s-stats-card.s-stats-card--light .s-stats-card-label{color:#999}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-icon-container{height:100%;left:0;position:absolute;right:0;width:10px}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-icon-container .s-stats-card-icon{display:none}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-text-container{height:auto;max-width:calc(100% - 25px);padding-left:25px}s-stats-card .s-stats-card.s-stats-card--clickable{cursor:pointer}s-stats-card .s-stats-card:hover .s-stats-card-overlay{opacity:.2}s-stats-card .s-stats-card.s-stats-card--light:hover .s-stats-card-overlay{opacity:.08}s-stats-card .s-stats-card.s-stats-card--light{border-color:#ccc}.s-sidebar-content .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border),.ui-dialog-content .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border),p-panel .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border){border-color:transparent}@media (max-width:767px){s-stats-card .s-stats-card{height:auto}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container{height:100%;left:0;position:absolute;right:0;width:10px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container .s-stats-card-icon{display:none}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container{height:auto;max-width:calc(100% - 25px);padding-left:25px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{overflow:visible;white-space:normal;word-break:break-all}}"]})],e)}(),To=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule],declarations:[ko],exports:[ko]})],e)}();(uo=e.StepState||(e.StepState={})).Default="default",uo.Success="success",uo.Warning="warning";var So,Eo,Fo=function(){function n(){this.id="s-steps-"+o.nextId++,this.activeIndex=0,this.stepSelected=new t.EventEmitter}var o;return o=n,n.prototype.stepClick=function(e,t,n){e.disabled||t==this.activeIndex||this.stepSelected.emit({step:e,index:t,event:n})},Object.defineProperty(n.prototype,"stepState",{get:function(){return e.StepState},enumerable:!0,configurable:!0}),n.prototype.barAnimation=function(e,t){return e<t||e===t},n.prototype.afterBarAnimation=function(e,t){return e<t||e===t-1},Object.defineProperty(n.prototype,"visibledStep",{get:function(){return this.steps.filter((function(e){return!e.hidden}))},enumerable:!0,configurable:!0}),n.nextId=0,ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"steps",void 0),ae([t.Input()],n.prototype,"activeIndex",void 0),ae([t.Output()],n.prototype,"stepSelected",void 0),n=o=ae([t.Component({selector:"s-steps",template:'<div [id]="id" class="s-steps-container">\n <ng-container *ngFor="let step of visibledStep; let i = index; let isFirst = first; let isLast = last">\n <div *ngIf="!isFirst" class="s-step-progress-bar"\n [@activeDesative]="barAnimation(i, activeIndex) ? \'active\': \'desactive\'" [ngClass]="{\n \'s-step-success\': (step.state === stepState.Success),\n \'s-step-warning\': (step.state === stepState.Warning),\n \'s-step-disabled\': step.disabled,\n \'s-step-visited\': (i < activeIndex),\n \'s-step-active\': (i === activeIndex)\n }"></div>\n <div [id]="id + \'-step-\' + (step.id || i)" class="s-step-header" (click)="stepClick(step, i, $event)" role="tab"\n tabindex="0" [attr.aria-label]="step.ariaLabel || null" [attr.aria-controls]="step.ariaControls"\n [attr.aria-labelledby]="!step.ariaLabel ? \'step-label-\' + i : null" [attr.aria-posinset]="i + 1"\n [attr.aria-setsize]="visibledStep.length" [attr.aria-selected]="activeIndex == i" [ngClass]="{\n \'s-step-success\': (step.state === stepState.Success),\n \'s-step-warning\': (step.state === stepState.Warning),\n \'s-step-visited\': (i < activeIndex),\n \'s-step-active\': (i === activeIndex),\n \'s-step-previous\': (i === activeIndex - 1)\n }">\n <div *ngIf="!isFirst"\n [@beforeActiveDesative]="barAnimation(i, activeIndex) ? \'active\': \'desactive\'"\n class="s-step-progress-bar-before" [ngClass]="{\n \'s-step-success\': (step.state === stepState.Success),\n \'s-step-warning\': (step.state === stepState.Warning),\n \'s-step-disabled\': step.disabled,\n \'s-step-visited\': (i < activeIndex),\n \'s-step-active\': (i === activeIndex)\n }"></div>\n <div *ngIf="!isLast"\n [@afterActiveDesative]="afterBarAnimation(i, activeIndex) ? \'active\': \'desactive\'"\n class="s-step-progress-bar-after" [ngClass]="{\n \'s-step-success\': (step.state === stepState.Success),\n \'s-step-warning\': (step.state === stepState.Warning),\n \'s-step-disabled\': visibledStep[i + 1].disabled,\n \'s-step-visited\': ((i + 1) < activeIndex),\n \'s-step-active\': (i === (activeIndex - 1))\n }"></div>\n <div\n class="s-step-index"\n [ngClass]="{\'s-step-disabled\': step.disabled}"\n [pTooltip]="step.tooltip"\n tooltipPosition="top">\n <div class="s-step-index-content">\n <span\n *ngIf="step.state !== stepState.Warning && (step.state == stepState.Success || activeIndex > i)"\n class="fas fa-check"\n aria-hidden="true"\n [attr.aria-label]="i + 1"></span>\n <span\n *ngIf="step.state == stepState.Warning"\n class="fas fa-exclamation-triangle"\n aria-hidden="true"\n [attr.aria-label]="i + 1"></span>\n <span\n *ngIf="step.state != stepState.Success && step.state != stepState.Warning && activeIndex <= i">\n {{i + 1}}\n </span>\n </div>\n </div>\n <div\n [id]="\'step-label-\' + i"\n class="s-step-label"\n [ngClass]="{\'s-step-disabled\': step.disabled}">\n <span>\n {{step.label}}\n </span>\n </div>\n </div>\n </ng-container>\n</div>\n',host:{"aria-orientation":"horizontal",role:"tablist","tab-index":"0"},animations:[d.trigger("beforeActiveDesative",[d.state("active",d.style({"background-position":"left bottom"})),d.state("desactive",d.style({"background-position":"right bottom"})),d.transition("active => desactive",[d.animate("50ms 100ms linear")]),d.transition("desactive => active",[d.animate("50ms 250ms linear")])]),d.trigger("activeDesative",[d.state("active",d.style({"background-position":"left bottom"})),d.state("desactive",d.style({"background-position":"right bottom"})),d.transition("active => desactive",[d.animate("100ms 150ms linear")]),d.transition("desactive => active",[d.animate("100ms 150ms linear")])]),d.trigger("afterActiveDesative",[d.state("active",d.style({"background-position":"left bottom"})),d.state("desactive",d.style({"background-position":"right bottom"})),d.transition("active => desactive",[d.animate("50ms 250ms linear")]),d.transition("desactive => active",[d.animate("50ms 100ms linear")])])],styles:["@keyframes scale-up-center{0%{transform:scale(.5)}100%{transform:scale(1)}}.s-steps-container{display:-ms-flexbox;display:flex;white-space:nowrap;-ms-flex-align:start;align-items:flex-start;overflow:hidden;padding:15px 10px}.s-step-header{box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;cursor:pointer;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:66px}.s-step-header .s-step-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all;color:#999;font-size:14px;font-weight:400;padding-top:5px}.s-step-header .s-step-progress-bar-before{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;left:0}.s-step-header .s-step-progress-bar-before.s-step-active,.s-step-header .s-step-progress-bar-before.s-step-visited{background-position:left bottom}.s-step-header .s-step-progress-bar-after{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;right:0}.s-step-header .s-step-progress-bar-after.s-step-active,.s-step-header .s-step-progress-bar-after.s-step-visited{background-position:left bottom}.s-step-progress-bar{margin:0;position:relative;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:100%;background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%}.s-step-disabled{opacity:.5;filter:Alpha(Opacity=50)}.s-step-disabled,.s-step-disabled *{cursor:text!important}.s-step-active.s-step-disabled{opacity:1}.s-step-index{background-color:#fff;border:3px solid #ccc;border-radius:50%;color:#999;display:inline-block;font-weight:700;position:relative;transition:background-color .2s ease-out;height:40px;width:40px;-ms-flex:none;flex:none}.s-step-index .s-step-index-content{line-height:18px;font-size:18px;padding-top:8.5px;text-align:center;position:relative;cursor:pointer}.s-step-index:hover{background-color:#f7f7f7}.s-step-warning .s-step-index .s-step-index-content{padding-top:7px}.s-step-visited .s-step-index{border-color:#7892a1;animation:.1s ease-out alternate scale-up-center;background-color:#7892a1}.s-step-visited .s-step-index-content>span{color:#fff}.s-step-active.s-step-progress-bar,.s-step-visited.s-step-progress-bar{background-position:left bottom}.s-step-active .s-step-index{border-color:#7892a1;color:#7892a1;cursor:default}.s-step-active .s-step-label{color:#333;font-weight:700}@media (max-width:767px){.s-step-label{display:none}}"]})],n)}(),Lo=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule],declarations:[Fo],exports:[Fo]})],e)}(),Mo=function(){function e(){this.direction="horizontal",this.collapsable=!0,this.counterLabel="items"}return Object.defineProperty(e.prototype,"items",{get:function(){return this._items},set:function(e){this._items=e,this.checkDuplicateIds()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this._innerWidth=window.innerWidth},e.prototype.onResize=function(e){this._innerWidth=window.innerWidth},e.prototype.changeToVertical=function(){return"vertical"===this.direction||this._innerWidth/this.items.length<200},e.prototype.checkDuplicateIds=function(){var e=this.items.map((function(e){return e.id}));if(new Set(e).size!==e.length)throw new Error("A duplicate id was found in the items list")},ae([t.Input()],e.prototype,"items",null),ae([t.Input()],e.prototype,"activeIndex",void 0),ae([t.Input()],e.prototype,"direction",void 0),ae([t.Input()],e.prototype,"collapsable",void 0),ae([t.Input()],e.prototype,"counterLabel",void 0),ae([t.HostListener("window:resize",["$event"])],e.prototype,"onResize",null),e=ae([t.Component({selector:"s-timeline",template:'<div *ngIf="changeToVertical(); then vertical else horizontal"></div>\n\n<ng-template #horizontal>\n <s-horizontal-timeline *ngIf="items?.length"\n [items]="items"\n [activeIndex]="activeIndex">\n </s-horizontal-timeline>\n</ng-template>\n\n<ng-template #vertical>\n <s-vertical-timeline *ngIf="items?.length"\n [items]="items"\n [activeIndex]="activeIndex"\n [counterLabel]="counterLabel"\n [collapsable]="collapsable">\n </s-vertical-timeline>\n</ng-template>'})],e)}(),Oo=function(){function e(){}return ae([t.Input()],e.prototype,"item",void 0),ae([t.Input()],e.prototype,"isActive",void 0),ae([t.Input()],e.prototype,"isComplete",void 0),e=ae([t.Component({selector:"s-timeline-icon-item",template:"<ng-container *ngIf=\"item\">\n <div\n class=\"timeline__icon-item\"\n [ngClass]=\"{\n 'timeline__icon-item--small': item.testSize('small'),\n 'timeline__icon-item--normal': item.testSize('normal'),\n 'timeline__icon-item--warning': item.testSeverity('warning'),\n 'timeline__icon-item--error': item.testSeverity('error'),\n 'timeline__icon-item--completed': isComplete,\n 'timeline__icon-item--active': isActive\n }\">\n <div\n class=\"timeline__icon-item__icon\"\n [pTooltip]=\"item.tooltip\"\n tooltipPosition=\"top\">\n <ng-content *ngIf=\"item.icon; then icon_content; else label_text_content\"></ng-content>\n <ng-template #icon_content>\n <span [ngClass]=\"item.icon\"></span>\n </ng-template>\n <ng-template #label_text_content>\n <span class=\"timeline__icon-item__icon__label\">\n {{ item.label }}\n </span>\n </ng-template>\n </div>\n </div>\n</ng-container>\n",styles:['.timeline__icon-item .timeline__icon-item__icon{-ms-flex-align:center;align-items:center;background-color:#697882;border-radius:50%;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:4px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.timeline__icon-item .timeline__icon-item__icon .timeline__icon-item__icon__label{font-family:"Open Sans",sans-serif}.timeline__icon-item.timeline__icon-item--small .timeline__icon-item__icon{font-size:0;height:16px;width:16px}.timeline__icon-item.timeline__icon-item--normal .timeline__icon-item__icon{font-size:10px;height:24px;padding:8px;width:24px}.timeline__icon-item.timeline__icon-item--normal .timeline__icon-item__icon .timeline__icon-item__icon__label{font-size:14px}.timeline__icon-item.timeline__icon-item--active .timeline__icon-item__icon{font-size:20px;height:40px;padding:10px;width:40px}.timeline__icon-item.timeline__icon-item--active .timeline__icon-item__icon .timeline__icon-item__icon__label{font-size:22px}.timeline__icon-item.timeline__icon-item--active .timeline__icon-item__icon,.timeline__icon-item.timeline__icon-item--completed .timeline__icon-item__icon{background-color:#0c9348}.timeline__icon-item.timeline__icon-item--warning.timeline__icon-item--active .timeline__icon-item__icon{background-color:#fcbf10;color:#333}.timeline__icon-item.timeline__icon-item--danger.timeline__icon-item--active .timeline__icon-item__icon{background-color:#f8931f;color:#333}.timeline__icon-item.timeline__icon-item--error.timeline__icon-item--active .timeline__icon-item__icon{background-color:#c13018}']})],e)}(),Ro=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule],declarations:[Oo],exports:[Oo]})],e)}(),Do=function(){function e(){this.activeIndex=0}return ae([t.Input()],e.prototype,"items",void 0),ae([t.Input()],e.prototype,"activeIndex",void 0),e=ae([t.Component({selector:"s-horizontal-timeline",template:'<div class="horizontal-timeline">\n <ng-container\n *ngFor="let item of items;\n let i = index;\n let isFirst = first;\n let isLast = last">\n <div\n class="horizontal-timeline__item"\n [ngClass]="{\n \'horizontal-timeline__item--small\': item.testSize(\'small\'),\n \'horizontal-timeline__item--normal\': item.testSize(\'normal\'),\n \'horizontal-timeline__item--warning\': item.testSeverity(\'warning\'),\n \'horizontal-timeline__item--error\': item.testSeverity(\'error\'),\n \'horizontal-timeline__item--completed\': i < activeIndex,\n \'horizontal-timeline__item--active\': i === activeIndex\n }">\n <div class="horizontal-timeline__item__icon-wrapper">\n <div\n class="horizontal-timeline__item__icon-wrapper__line horizontal-timeline__item__icon-wrapper__line--before"\n [ngStyle]="{ \'visibility\': isFirst ? \'hidden\' : \'visible\' }">\n </div>\n <s-timeline-icon-item\n [item]="item"\n [isActive]="i === activeIndex"\n [isComplete]="i < activeIndex">\n </s-timeline-icon-item>\n <div\n class="horizontal-timeline__item__icon-wrapper__line horizontal-timeline__item__icon-wrapper__line--after"\n [ngStyle]="{ \'visibility\': isLast ? \'hidden\' : \'visible\' }">\n </div>\n </div>\n <div class="horizontal-timeline__item__info">\n <div\n class="horizontal-timeline__item__info__title"\n [pTooltip]="item.title"\n tooltipPosition="top"\n [showDelay]="1000">\n {{ item.title }}\n </div>\n <div\n class="horizontal-timeline__item__info__description"\n [pTooltip]="item.description"\n tooltipPosition="top"\n [showDelay]="1000">\n {{ item.description }}\n </div>\n </div>\n </div>\n </ng-container>\n</div>',styles:['@keyframes scale-up-center{0%{transform:scale(.5)}100%{transform:scale(1)}}.horizontal-timeline{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.horizontal-timeline .horizontal-timeline__item{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__icon-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:56px;-ms-flex-pack:start;justify-content:flex-start;width:100%}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line{background-color:#697882;height:3px}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line--before{border-radius:0 2px 2px 0}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line--after{border-radius:2px 0 0 2px}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__info{width:20ch}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__info .horizontal-timeline__item__info__title{color:#333;font-family:"Open Sans",sans-serif;font-size:14px;font-weight:700;line-height:150%;max-width:100%;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.horizontal-timeline .horizontal-timeline__item .horizontal-timeline__item__info .horizontal-timeline__item__info__description{color:#999;display:-webkit-box;font-family:"Open Sans",sans-serif;font-size:12px;font-weight:400;line-height:150%;max-height:calc(12px * 1.5 * 4);overflow:hidden;text-align:center;text-overflow:ellipsis;-webkit-line-clamp:4;-webkit-box-orient:vertical}.horizontal-timeline .horizontal-timeline__item.horizontal-timeline__item--small .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line{width:calc(50% - 4px - 8px)}.horizontal-timeline .horizontal-timeline__item.horizontal-timeline__item--normal .horizontal-timeline__item__icon-wrapper__line{width:calc(50% - 4px - 12px)}.horizontal-timeline .horizontal-timeline__item.horizontal-timeline__item--active .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line{width:calc(50% - 4px - 20px)}.horizontal-timeline .horizontal-timeline__item.horizontal-timeline__item--active .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line--before,.horizontal-timeline .horizontal-timeline__item.horizontal-timeline__item--completed .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line--after,.horizontal-timeline .horizontal-timeline__item.horizontal-timeline__item--completed .horizontal-timeline__item__icon-wrapper .horizontal-timeline__item__icon-wrapper__line--before{background-color:#0c9348}']})],e)}(),Ao=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule,Ro],declarations:[Do],exports:[Do]})],e)}(),Po=function(){function e(){this.isG1Collapsed=!0,this.isG2Collapsed=!0}return Object.defineProperty(e.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(e){this._activeIndex=e,this.groupItems()},enumerable:!0,configurable:!0}),e.prototype.onChangeG1=function(e){this.isG1Collapsed=e},e.prototype.onChangeG2=function(e){this.isG2Collapsed=e},e.prototype.groupItems=function(){this.firstItem=0===this.activeIndex?[]:[this.items[0]],this.g1Items=this.items.slice(1,this.activeIndex),this.activeItem=[this.items[this.activeIndex]],this.g2Items=this.items.slice(this.activeIndex+1,this.items.length-1),this.lastItem=this.activeIndex===this.items.length-1?[]:[this.items[this.items.length-1]]},e.nextId=0,ae([t.Input()],e.prototype,"activeIndex",null),ae([t.Input()],e.prototype,"items",void 0),ae([t.Input()],e.prototype,"counterLabel",void 0),ae([t.Input()],e.prototype,"collapsable",void 0),e=ae([t.Component({selector:"s-vertical-timeline",template:'<div class="vertical-timeline">\n <div\n *ngIf="firstItem.length"\n class="vertical-timeline__block">\n <div class="vertical-timeline__block__prefix"></div>\n <s-vertical-items\n [items]="firstItem"\n [isLast]="false"\n [isActive]="false"\n [isCompleted]="true">\n </s-vertical-items>\n </div>\n\n <div\n *ngIf="g1Items.length"\n class="vertical-timeline__block">\n <div class="vertical-timeline__block__prefix">\n <ng-container *ngIf="g1Items.length > 1 && !isG1Collapsed">\n <s-collapse-option\n *ngIf="collapsable"\n [isCollapsed]="isG1Collapsed"\n (change)="onChangeG1($event)">\n </s-collapse-option>\n <s-range-line class="vertical-timeline__block__prefix__line"></s-range-line>\n </ng-container>\n </div>\n\n <div *ngIf="isG1Collapsed && g1Items.length > 1 && collapsable; then g1_collapsed; else g1_items"></div>\n\n <ng-template #g1_collapsed>\n <s-collapsed-items\n [items]="g1Items"\n [(isCollapsed)]="isG1Collapsed"\n [isCompleted]="true"\n [counterLabel]="counterLabel">\n </s-collapsed-items>\n </ng-template>\n\n <ng-template #g1_items>\n <s-vertical-items\n [items]="g1Items"\n [isLast]="false"\n [isActive]="false"\n [isCompleted]="true">\n </s-vertical-items>\n </ng-template>\n </div>\n\n <div\n *ngIf="activeItem.length"\n class="vertical-timeline__block">\n <div class="vertical-timeline__block__prefix"></div>\n <s-vertical-items\n [items]="activeItem"\n [isLast]="!lastItem.length"\n [isActive]="true"\n [isCompleted]="false">\n </s-vertical-items>\n </div>\n\n <div\n *ngIf="g2Items.length"\n class="vertical-timeline__block">\n <div class="vertical-timeline__block__prefix">\n <ng-container *ngIf="g2Items.length > 1 && !isG2Collapsed">\n <s-collapse-option\n *ngIf="collapsable"\n [isCollapsed]="isG2Collapsed"\n (change)="onChangeG2($event)">\n </s-collapse-option>\n <s-range-line class="vertical-timeline__block__prefix__line"></s-range-line>\n </ng-container>\n </div>\n\n <div *ngIf="isG2Collapsed && g2Items.length > 1 && collapsable; then g2_collapsed; else g2_items"></div>\n\n <ng-template #g2_collapsed>\n <s-collapsed-items\n [items]="g2Items"\n [(isCollapsed)]="isG2Collapsed"\n [isCompleted]="false"\n [counterLabel]="counterLabel">\n </s-collapsed-items>\n </ng-template>\n\n <ng-template #g2_items>\n <s-vertical-items\n [items]="g2Items"\n [isLast]="false"\n [isActive]="false"\n [isCompleted]="false">\n </s-vertical-items>\n </ng-template>\n </div>\n\n <div\n *ngIf="lastItem.length"\n class="vertical-timeline__block">\n <div class="vertical-timeline__block__prefix"></div>\n <s-vertical-items\n [items]="lastItem"\n [isLast]="true"\n [isActive]="false"\n [isCompleted]="false">\n </s-vertical-items>\n </div>\n</div>',styles:[".vertical-timeline{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.vertical-timeline .vertical-timeline__block{display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch}.vertical-timeline .vertical-timeline__block .vertical-timeline__block__prefix{width:60px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0}.vertical-timeline .vertical-timeline__block .vertical-timeline__block__prefix .vertical-timeline__block__prefix__line{height:100%}"]})],e)}(),No=function(){function e(){}return e=ae([t.Component({selector:"s-range-line",template:'<div class="range-line">\n <div class="range-line__horizontal"></div>\n <div class="range-line__vertical"></div>\n <div class="range-line__horizontal"></div>\n</div>\n',styles:[".range-line{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:20px;height:100%}.range-line .range-line__horizontal{background-color:#ccc;height:3px;width:100%}.range-line .range-line__vertical{background-color:#ccc;height:100%;width:3px}s-range-line{background-color:#add8e6}"]})],e)}(),zo=function(){function e(){this.isCollapsed=!1,this.change=new t.EventEmitter}return e.prototype.onClick=function(){this.change.emit(!this.isCollapsed)},ae([t.Input()],e.prototype,"isCollapsed",void 0),ae([t.Output()],e.prototype,"change",void 0),e=ae([t.Component({selector:"s-collapse-option",template:'<div\n class="collapse-option"\n (click)="onClick()">\n <div class="collapse-option__icon">\n <span\n class="fas"\n [ngClass]="{\n \'fa-minus\': !isCollapsed,\n \'fa-plus\': isCollapsed\n }">\n </span>\n </div>\n</div>',styles:[".collapse-option{-ms-flex-align:center;align-items:center;background-color:#428bca;border-radius:50%;cursor:pointer;display:-ms-flexbox;display:flex;height:24px;-ms-flex-pack:center;justify-content:center;margin:4px;width:24px}.collapse-option .collapse-option__icon{color:#fff}"]})],e)}(),Vo=function(){function e(){this.isCollapsedChange=new t.EventEmitter}return e.prototype.onChange=function(e){this.isCollapsed=!this.isCollapsed,this.isCollapsedChange.emit(this.isCollapsed)},ae([t.Input()],e.prototype,"items",void 0),ae([t.Input()],e.prototype,"isCollapsed",void 0),ae([t.Input()],e.prototype,"isCompleted",void 0),ae([t.Input()],e.prototype,"counterLabel",void 0),ae([t.Output()],e.prototype,"isCollapsedChange",void 0),e=ae([t.Component({selector:"s-collapsed-items",template:'<div class="collapsed-items">\n <div\n class="collapsed-items__item"\n [ngClass]="{ \'collapsed-items__item--completed\' : isCompleted }">\n <div class="collapsed-items__item__icon-wrapper">\n <s-collapse-option\n [isCollapsed]="isCollapsed"\n (change)="onChange($event)">\n </s-collapse-option>\n <div class="collapsed-items__item__icon-wrapper__line"></div>\n </div>\n <div\n class="collapsed-items__item__info"\n (click)="onChange(!isCollapsed)">\n <div\n class="collapsed-items__item__info__description">\n {{ items.length }} {{ counterLabel }}\n </div>\n </div>\n </div>\n</div>',styles:['.collapsed-items .collapsed-items__item{-ms-flex-align:stretch;align-items:stretch;display:-ms-flexbox;display:flex}.collapsed-items .collapsed-items__item .collapsed-items__item__icon-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-negative:0;flex-shrink:0;-ms-flex-pack:center;justify-content:center;width:56px}.collapsed-items .collapsed-items__item .collapsed-items__item__icon-wrapper .collapsed-items__item__icon-wrapper__line{background-color:#697882;border-radius:2px;-ms-flex-positive:1;flex-grow:1;min-height:20px;width:3px}.collapsed-items .collapsed-items__item .collapsed-items__item__info{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;margin-bottom:20px;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.collapsed-items .collapsed-items__item .collapsed-items__item__info .collapsed-items__item__info__description{color:#428bca;font-family:"Open Sans",sans-serif;font-size:12px;font-weight:400;line-height:150%}.collapsed-items .collapsed-items__item.collapsed-items__item--completed .collapsed-items__item__icon-wrapper .collapsed-items__item__icon-wrapper__line{background-color:#0c9348}']})],e)}(),Bo=function(){function e(){}return ae([t.Input()],e.prototype,"items",void 0),ae([t.Input()],e.prototype,"isLast",void 0),ae([t.Input()],e.prototype,"isActive",void 0),ae([t.Input()],e.prototype,"isCompleted",void 0),e=ae([t.Component({selector:"s-vertical-items",template:'<div class="vertical-items">\n <ng-container *ngFor="let item of items; let index = index;">\n <div\n class="vertical-items__item"\n [ngClass]="{\n \'vertical-items__item--small\': item.testSize(\'small\'),\n \'vertical-items__item--normal\': item.testSize(\'normal\'),\n \'vertical-items__item--completed\': isCompleted,\n \'vertical-items__item--active\': isActive\n }">\n <div class="vertical-items__item__icon-wrapper">\n <s-timeline-icon-item\n [item]="item"\n [isComplete]="isCompleted"\n [isActive]="isActive">\n </s-timeline-icon-item>\n <div\n class="vertical-items__item__icon-wrapper__line"\n [ngStyle]="{ \'visibility\': isLast ? \'hidden\' : \'visible\' }">\n </div>\n </div>\n <div class="vertical-items__item__info">\n <div class="vertical-timeline__item__info__title">\n {{ item.title }}\n </div>\n <div class="vertical-items__item__info__description">\n {{ item.description }}\n </div>\n </div>\n </div>\n </ng-container>\n</div>',styles:['.vertical-items .vertical-items__item{-ms-flex-align:stretch;align-items:stretch;display:-ms-flexbox;display:flex;margin-right:50px}.vertical-items .vertical-items__item .vertical-items__item__collapsed-option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.vertical-items .vertical-items__item .vertical-items__item__collapsed-option .vertical-items__item__collapsed-option__line{width:3px;height:50px;background-color:#ccc}.vertical-items .vertical-items__item .vertical-items__item__icon-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-negative:0;flex-shrink:0;-ms-flex-pack:center;justify-content:center;width:56px}.vertical-items .vertical-items__item .vertical-items__item__icon-wrapper .vertical-items__item__icon-wrapper__line{background-color:#697882;border-radius:2px;-ms-flex-positive:1;flex-grow:1;min-height:20px;width:3px}.vertical-items .vertical-items__item .vertical-items__item__info{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;margin-bottom:12px}.vertical-items .vertical-items__item .vertical-items__item__info .vertical-items__item__info__title{color:#333;font-family:"Open Sans",sans-serif;font-size:14px;font-weight:700;line-height:150%}.vertical-items .vertical-items__item .vertical-items__item__info .vertical-items__item__info__description{color:#999;font-family:"Open Sans",sans-serif;font-size:12px;font-weight:400;line-height:150%}.vertical-items .vertical-items__item .vertical-items__item__info .vertical-items__item__info__description.vertical-items__item__info__description--link{color:#428bca}.vertical-items .vertical-items__item.vertical-items__item--small .vertical-items__item__icon-wrapper__line{height:calc(100% - 4px - 8px)}.vertical-items .vertical-items__item.vertical-items__item--medium .vertical-items__item__icon-wrapper__line{height:calc(100% - 4px - 12px)}.vertical-items .vertical-items__item.vertical-items__item--big .vertical-items__item__icon-wrapper__line{height:calc(50% - 4px - 20px)}.vertical-items .vertical-items__item.vertical-items__item--completed .vertical-items__item__icon-wrapper .vertical-items__item__icon-wrapper__line{background-color:#0c9348}']})],e)}(),Uo=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,Ro],declarations:[Po,No,zo,Vo,Bo],exports:[Po]})],e)}(),jo=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,Ro,Ao,Uo],declarations:[Mo],exports:[Mo]})],e)}();(So=e.TimelineItemSeverity||(e.TimelineItemSeverity={})).Normal="normal",So.Warning="warning",So.Error="error",(Eo=e.TimelineItemSize||(e.TimelineItemSize={})).Normal="normal",Eo.Small="small";var Ho,$o=function(){function t(t){this.id=t.id,this.title=t.title,this.description=t.description,this.icon=t.icon,this.label=t.label,this.tooltip=t.tooltip,this.size=t.size||e.TimelineItemSize.Normal,this.severity=t.severity||e.TimelineItemSeverity.Normal,this.checkItemIconContent()}return t.prototype.checkItemIconContent=function(){var e;if(!this.icon&&!this.label)throw new Error("No icon or label string was passed for the item. Enter an icon or label text");if(this.icon&&this.label)throw new Error("An icon and label string were passed to the item. Enter an icon or label text");if((null===(e=this.label)||void 0===e?void 0:e.length)>2)throw new Error("Label text is expected to be a maximum of two characters long")},t.prototype.testSize=function(e){return this.size.valueOf()===e},t.prototype.testSeverity=function(e){var t;return(null===(t=this.severity)||void 0===t?void 0:t.valueOf())===e},t}(),Go=function(){function e(){this.id="s-tile-"+n.nextId++,this.disabled=!1,this.tabIndex=0,this.onClick=new t.EventEmitter}var n;return n=e,Object.defineProperty(e.prototype,"initialLetter",{get:function(){var e="";if(this.label){var t=this.label.split(" ",2);e=t[0].charAt(0).toUpperCase(),t.length>1&&(e+=t[1].charAt(0).toUpperCase())}return e},enumerable:!0,configurable:!0}),e.prototype.onKeyDown=function(e){!this.disabled&&[13,32].includes(e.keyCode)&&this.onClick.emit()},e.nextId=0,ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"label",void 0),ae([t.Input()],e.prototype,"description",void 0),ae([t.Input()],e.prototype,"iconClass",void 0),ae([t.Input()],e.prototype,"imageSource",void 0),ae([t.Input()],e.prototype,"imageAlt",void 0),ae([t.Input()],e.prototype,"disabled",void 0),ae([t.Input()],e.prototype,"tabIndex",void 0),ae([t.Output()],e.prototype,"onClick",void 0),ae([t.HostListener("keydown",["$event"])],e.prototype,"onKeyDown",null),e=n=ae([t.Component({selector:"s-tile",template:'<div [id]="id" class="container" [attr.tabindex]="disabled ? undefined : tabIndex" [attr.aria-label]="label"\n [attr.aria-disabled]="disabled" role="button" [ngClass]="{\'disabled\': disabled}" (click)="!disabled && onClick.emit($event)">\n <div class="thumbnail-container" *ngIf="imageSource || iconClass">\n <s-thumbnail [id]="id + \'-thumbnail\'" *ngIf="imageSource" [imageSource]="imageSource" [imageAlt]="imageAlt || label"\n size="small" [isTile]="true"></s-thumbnail>\n\n <span [id]="id + \'-icon\'" *ngIf="!imageSource && iconClass" [class]="\'icon \' + iconClass" aria-hidden="true"></span>\n </div>\n <div class="first-letter-container" *ngIf="!iconClass && !imageSource">\n <div class="first-letter-span">\n <span>{{initialLetter}}</span>\n </div>\n </div>\n\n <div class="info-container">\n <span [id]="id + \'-label\'" class="label" [pTooltip]="label" tooltipPosition="top" showDelay="500">{{label}}</span>\n <span [id]="id + \'-description\'" class="description" [pTooltip]="description" tooltipPosition="top" showDelay="500">{{description}}</span>\n </div>\n</div>\n',styles:[":host{display:block}.container{position:relative;background-color:#fff;border:1px solid #ddd;padding:15px;-ms-flex-align:center;align-items:center;cursor:pointer;min-height:80px;overflow:hidden;display:-ms-flexbox;display:flex;transition:background-color .2s ease-out,border-color .2s ease-out}.container:focus:not(.disabled),.container:hover:not(.disabled){background-color:rgba(221,221,221,.2);outline:0}.container.disabled{opacity:.5;filter:Alpha(Opacity=50);background-image:none}.container.disabled,.container.disabled *{cursor:text!important}.thumbnail-container+.info-container{margin-left:15px}.info-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden}.info-container span{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.label{color:#428bca;font-size:12pt}.description{color:#999}.icon{color:#428bca;font-size:40px}.first-letter-container{position:relative;float:left;margin-right:10px;text-align:center}.first-letter-container .first-letter-span{margin:0 auto 5px;font-size:22px;line-height:1.8em;width:40px;height:40px;border-radius:100%;background-color:#428bca;color:#fff}"]})],e)}(),qo=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,l.TooltipModule,ho],declarations:[Go],exports:[Go,ho]})],e)}();(Ho=e.FileValidation||(e.FileValidation={})).MaxFileSize="maxFileSize",Ho.MaxFileLimit="maxFileLimit",Ho.TypeInvalid="typeInvalid",Ho.UnsupportedExtension="unsupportedExtension";var Wo,Ko=function(){function n(e,n){this.imageCropperService=e,this.confirmationService=n,this.aspectRatio=1,this.removeButtonLabel="Remover",this.changeButtonLabel="Alterar foto",this.confirmationTexts={removalHeader:"Remover foto de perfil",removalMessage:"Deseja remover sua foto de perfil? Não pode ser revertida.",removalAcceptLabel:"Remover",removalRejectLabel:"Cancelar"},this.supportedExtensions=[],this.changedImage=new t.EventEmitter,this.removedImage=new t.EventEmitter,this.invalidFile=new t.EventEmitter}return n.prototype.ngOnInit=function(){this._normalizeSuportedExtensions()},n.prototype.onDragOver=function(e){e.preventDefault(),e.stopPropagation()},n.prototype.onDragLeave=function(e){e.preventDefault(),e.stopPropagation()},n.prototype.onDrop=function(e){e.preventDefault(),e.stopPropagation();for(var t=[],n=e.dataTransfer.files,o=0;o<n.length;o++)t.push(n.item(o));this._showImageCropper(t)},n.prototype.onResize=function(){if(this.uploadPicture&&this.info&&this.thumbnail){var e=this._getWidthElement(this.uploadPicture),t=this._getWidthElement(this.info);this._getWidthElement(this.thumbnail)+t>e?this.uploadPicture.nativeElement.classList.add("upload-picture--small"):this.uploadPicture.nativeElement.classList.remove("upload-picture--small")}},n.prototype.selectPhoto=function(){var e=this.fileInput.nativeElement;e.value="",e.click()},n.prototype.removePhoto=function(){var e=this;this.confirmationService.confirm({message:this.confirmationTexts.removalMessage,acceptLabel:this.confirmationTexts.removalAcceptLabel,rejectLabel:this.confirmationTexts.removalRejectLabel,header:this.confirmationTexts.removalHeader,accept:function(){e.fileInput.nativeElement.value="",e.image="",e.removedImage.emit()}})},n.prototype.photoSelected=function(e){this._showImageCropper(e.srcElement.files)},n.prototype._showImageCropper=function(e){var t=this;if(this._validateData(e)){var n=e[0],o=new FileReader;o.readAsDataURL(n),o.onloadend=function(e){t.imageCropperService.show(re({imageSource:e.target.result,croppedImage:function(e){t.image=e,t.changedImage.emit(e)},changeImage:function(){return t.selectPhoto()},allowSelectAnother:!1,aspectRatio:t.aspectRatio},t.cropperLabelsConfig))}}},n.prototype._normalizeSuportedExtensions=function(){this.supportedExtensions=this.supportedExtensions.map((function(e){return e.replace(".","").toLocaleLowerCase()}))},n.prototype._validateData=function(t){if(!t.length)return!1;if(t.length>1)return this.invalidFile.emit({file:null,validation:e.FileValidation.MaxFileLimit}),!1;var n=t[0];return n.type.includes("image")?this._validateFileExtension(n)?!!this._validateFileSize(n)||(this.invalidFile.emit({file:n,validation:e.FileValidation.MaxFileSize}),!1):(this.invalidFile.emit({file:n,validation:e.FileValidation.UnsupportedExtension}),!1):(this.invalidFile.emit({file:n,validation:e.FileValidation.TypeInvalid}),!1)},n.prototype._validateFileExtension=function(e){var t;if(null===(t=this.supportedExtensions)||void 0===t?void 0:t.length){var n=e.name.split(".").pop().toLowerCase();return this.supportedExtensions.includes(n)}return!0},n.prototype._validateFileSize=function(e){return!this.maxFileSize||e.size>this.maxFileSize},n.prototype._getWidthElement=function(e){var t=e.nativeElement.getBoundingClientRect(),n=t.left;return t.right-n},n.ctorParameters=function(){return[{type:co},{type:G.ConfirmationService}]},ae([t.Input()],n.prototype,"simpleTitle",void 0),ae([t.Input()],n.prototype,"actionTitle",void 0),ae([t.Input()],n.prototype,"subtitle",void 0),ae([t.Input()],n.prototype,"aspectRatio",void 0),ae([t.Input()],n.prototype,"cropperLabelsConfig",void 0),ae([t.Input()],n.prototype,"removeButtonLabel",void 0),ae([t.Input()],n.prototype,"changeButtonLabel",void 0),ae([t.Input()],n.prototype,"confirmationTexts",void 0),ae([t.Input()],n.prototype,"maxFileSize",void 0),ae([t.Input()],n.prototype,"accept",void 0),ae([t.Input()],n.prototype,"supportedExtensions",void 0),ae([t.ViewChild("uploadPicture")],n.prototype,"uploadPicture",void 0),ae([t.ViewChild("info")],n.prototype,"info",void 0),ae([t.ViewChild("thumbnail",{read:t.ElementRef})],n.prototype,"thumbnail",void 0),ae([t.ViewChild("fileInput",{read:t.ElementRef})],n.prototype,"fileInput",void 0),ae([t.Output()],n.prototype,"changedImage",void 0),ae([t.Output()],n.prototype,"removedImage",void 0),ae([t.Output()],n.prototype,"invalidFile",void 0),ae([t.HostListener("dragover",["$event"])],n.prototype,"onDragOver",null),ae([t.HostListener("dragleave",["$event"])],n.prototype,"onDragLeave",null),ae([t.HostListener("drop",["$event"])],n.prototype,"onDrop",null),ae([t.HostListener("window:resize")],n.prototype,"onResize",null),n=ae([t.Component({selector:"s-profile-picture-picker",template:'<p-confirmDialog></p-confirmDialog>\n\n<input #fileInput [accept]="accept" class="file-input" type="file" (change)="photoSelected($event)">\n<div #uploadPicture class="upload-picture">\n <s-thumbnail\n #thumbnail\n iconClass="far fa-user"\n [imageSource]="image"\n [hasAction]="!image"\n (click)="selectPhoto()">\n </s-thumbnail>\n <div #info class="info">\n <ng-container *ngIf="image; then withImage; else noImage"></ng-container>\n <p class="subtitle">{{ subtitle }}</p>\n </div>\n</div>\n\n<ng-template #withImage>\n <div class="buttons">\n <s-button\n [label]="changeButtonLabel"\n priority="primary"\n (onClick)="selectPhoto()">\n </s-button>\n <s-button\n [label]="removeButtonLabel"\n priority="secondary"\n (onClick)="removePhoto()">\n </s-button>\n </div>\n</ng-template>\n\n<ng-template #noImage>\n <p class="title">\n {{ simpleTitle }}\n <span\n class="action-title"\n (click)="selectPhoto()">\n {{ actionTitle }}\n </span>\n </p>\n</ng-template>',styles:['.file-input{display:none}.upload-picture{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.upload-picture .info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:12px 20px;-ms-flex-align:start;align-items:flex-start}.upload-picture .info .title{font-family:"Open Sans",sans-serif;font-weight:700;font-size:.875rem;line-height:150%;color:#333}.upload-picture .info .title .action-title{cursor:pointer;color:#428bca}.upload-picture .info .buttons{display:-ms-flexbox;display:flex;gap:8px}.upload-picture .info .buttons s-button{margin:0}.upload-picture .info .subtitle{padding:6px 0;font-family:"Open Sans",sans-serif;font-weight:400;font-size:.75rem;line-height:150%;color:#697882;text-align:center}.upload-picture--small .info{-ms-flex-align:center;align-items:center}.upload-picture--small .info .subtitle,.upload-picture--small .info .title{text-align:center}.upload-picture--small .info .buttons{-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap}']})],n)}(),Yo=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,xe,ho,po,q.ConfirmDialogModule],declarations:[Ko],exports:[Ko],providers:[co,G.ConfirmationService]})],e)}();(Wo=e.GlobalSearchSizeEnum||(e.GlobalSearchSizeEnum={})).STANDARD="STANDARD",Wo.MEDIUM="MEDIUM",Wo.SMALL="SMALL";var Xo=function(){function n(){this.id="s-global-search-dropdown-item-"+o.nextId++,this.size=e.GlobalSearchSizeEnum.STANDARD,this.buttonClick=new t.EventEmitter}var o;return o=n,n.prototype.isStandardSize=function(){return this.size===e.GlobalSearchSizeEnum.STANDARD},n.prototype.isMediumSize=function(){return this.size===e.GlobalSearchSizeEnum.MEDIUM},n.prototype.isSmallSize=function(){return this.size===e.GlobalSearchSizeEnum.SMALL},n.prototype.getImageSize=function(){return this.isStandardSize()?"medium":"small"},n.nextId=0,ae([t.Input()],n.prototype,"id",void 0),ae([t.Input()],n.prototype,"primaryLabel",void 0),ae([t.Input()],n.prototype,"secondaryEmptyLabel",void 0),ae([t.Input()],n.prototype,"tertiaryEmptyLabel",void 0),ae([t.Input()],n.prototype,"imageSource",void 0),ae([t.Input()],n.prototype,"imageAlt",void 0),ae([t.Input()],n.prototype,"iconClass",void 0),ae([t.Input()],n.prototype,"secondaryLabel",void 0),ae([t.Input()],n.prototype,"tertiaryLabel",void 0),ae([t.Input()],n.prototype,"size",void 0),ae([t.Input()],n.prototype,"template",void 0),ae([t.Output()],n.prototype,"buttonClick",void 0),ae([t.ContentChild(fo,{static:!0})],n.prototype,"thumbnailComponent",void 0),ae([t.ViewChild(t.TemplateRef,{static:!0})],n.prototype,"content",void 0),n=o=ae([t.Component({selector:"s-global-search-dropdown-item",template:'<ng-template>\n <div class="{{isSmallSize() ? \'ui-g container\' : \'container\'}}">\n <ng-content select="s-thumbnail"></ng-content>\n <s-thumbnail [id]="id + \'-thumbnail\'"\n *ngIf="!thumbnailComponent && (imageSource || iconClass) && !isSmallSize()" [imageSource]="imageSource"\n [imageAlt]="imageAlt || primaryLabel" [iconClass]="iconClass" [size]="getImageSize()"></s-thumbnail>\n\n <div class="global-search-item__container {{!isSmallSize() ? \'global-search-item__container--width-60\' : \'\'}}">\n <div #titleTemplate>\n <ng-content select="[titleTemplate]"></ng-content>\n </div>\n <s-button styleClass="no-padding" class="{{isSmallSize() ? \'ui-g-6 no-padding\' : \'\'}}" [id]="id + \'-title\'"\n *ngIf="!titleTemplate.children.length" priority="link" [pTooltip]="primaryLabel" [label]="primaryLabel"\n size="small" (onClick)="buttonClick.emit($event)">\n </s-button>\n\n <div #labelTemplate>\n <ng-content select="[labelTemplate]"></ng-content>\n </div>\n <span [id]="id + \'-label\'" [ngClass]="{\'ui-g-6 global-search-item__text-align--right\': isSmallSize(), \'global-search-item__italic\' : !secondaryLabel}"\n class="label" *ngIf="!labelTemplate.children.length"\n [pTooltip]="secondaryLabel" tooltipPosition="top" showDelay="500">{{ secondaryLabel ? secondaryLabel : secondaryEmptyLabel }}</span>\n\n <div #descriptionTemplate>\n <ng-content select="[descriptionTemplate]"></ng-content>\n </div>\n <span [id]="id + \'-description\'" class="description"\n [ngClass]="{\'global-search-item__italic\' : !secondaryLabel}"\n *ngIf=" !descriptionTemplate.children.length && !isMediumSize() && !isSmallSize()"\n [pTooltip]="tertiaryLabel" tooltipPosition="top" showDelay="500">{{ tertiaryLabel ? tertiaryLabel : tertiaryEmptyLabel }}</span>\n </div>\n <div class="global-search-item__container--width-40 global-search__dropdown--template" *ngIf="!isSmallSize()">\n <ng-container *ngTemplateOutlet="template"></ng-container>\n </div>\n </div>\n</ng-template>\n',styles:[".container{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:100%;border-bottom:1px solid #ccc;padding:15px 5px;margin:0 10px}::ng-deep .no-padding{padding:0!important;min-width:0!important}::ng-deep .s-button-with-text{min-width:0!important}.global-search-item__italic{font-style:italic}.global-search-item__container{margin-left:10px;width:100%}.global-search-item__container,.global-search-item__container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.global-search-item__container .label{color:#333;display:block}.global-search-item__container .description{color:#999;display:block}.global-search-item__container--width-60{width:60%}.global-search-item__container--width-40{width:40%}.global-search-item__text-align--right{text-align:right;padding:2px 0 0 15px}.global-search__dropdown--template{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:right!important}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.global-search-item__container{-ms-flex:1;flex:1}}@media (max-width:767px){.global-search-item__container,.global-search-item__container span{white-space:normal}}.global-search-item__container:only-child{margin-left:0}"]})],n)}(),Zo=function(){function e(e){this.cdr=e,this.id="s-global-search-"+Xo.nextId++,this.delay=500,this.isLoading=!1,this.showFooter=!0,this.onSearch=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.onShowMore=new t.EventEmitter,this.wasSearched=!1,this.isModalLoading=!1,this.expanded=!0}return e.prototype.onChange=function(){var e=this,t=this.search;setTimeout((function(){e.search===t&&(e.canShowGlobalSearchActive(),e.onSearch.emit(e.search))}),this.delay)},e.prototype.focusIn=function(){this.onFocus.emit(!0)},e.prototype.focusOut=function(){this.onFocus.emit(!1)},e.prototype.showMore=function(){this.onShowMore.emit()},e.prototype.removeActiveClassByGlobalSearch=function(){At.removeClass(this.globalSearch,"global-search__input-active")},e.prototype.close=function(){this.search=null,this.wasSearched=!1,this.dropdownItens=null,this.isModalLoading=!1,this.removeActiveClassByGlobalSearch()},e.prototype.canShowGlobalSearchActive=function(){this.wasSearched=!!this.search,this.search?At.addClass(this.globalSearch,"global-search__input-active"):(this.removeActiveClassByGlobalSearch(),this.close()),this.cdr.detectChanges()},e.nextId=0,e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},ae([t.ViewChild("globalSearch",{static:!1})],e.prototype,"globalSearch",void 0),ae([t.Input()],e.prototype,"id",void 0),ae([t.Input()],e.prototype,"delay",void 0),ae([t.Input()],e.prototype,"totalItensLabel",void 0),ae([t.Input()],e.prototype,"showMoreLabel",void 0),ae([t.Input()],e.prototype,"placeholder",void 0),ae([t.Input()],e.prototype,"isLoading",void 0),ae([t.Input()],e.prototype,"totalElements",void 0),ae([t.Input()],e.prototype,"emptyTitle",void 0),ae([t.Input()],e.prototype,"emptyDescription",void 0),ae([t.Input()],e.prototype,"emptyIcon",void 0),ae([t.Input()],e.prototype,"showFooter",void 0),ae([t.ContentChildren(Xo)],e.prototype,"dropdownItens",void 0),ae([t.Output()],e.prototype,"onSearch",void 0),ae([t.Output()],e.prototype,"onFocus",void 0),ae([t.Output()],e.prototype,"onShowMore",void 0),e=ae([t.Component({selector:"s-global-search",template:'<div class="ui-inputgroup">\n <input #globalSearch class="global-search__input" [(ngModel)]="search" (ngModelChange)="onChange()" pInputText\n [placeholder]="placeholder" (focus)="focusIn()" (blur)="focusOut()">\n <span class="ui-inputgroup-addon global-search__span"><em class="fas fa-search"></em></span>\n <div class="global-search__modal" *ngIf="wasSearched">\n <div *sLoadingState="isLoading && !isModalLoading" class="global-search__loader">\n <div class="global-search__container" *ngIf="dropdownItens && dropdownItens.length > 0 || isLoading">\n <div *ngIf="dropdownItens && dropdownItens.length > 0">\n <div class="global-search__modal--total-itens-title">\n <span class="ui-g-11 no-space">{{totalItensLabel}}</span>\n <span class="ui-g-1 no-space global-search__modal--total-itens-title-icon" (click)="close()"><em\n class="fas fa-times"></em></span>\n </div>\n <div class="no-space global-search__dropdown--itens"\n [@expandableContent]="expanded">\n <ng-container *ngFor="let item of dropdownItens">\n <div class="s-object-card-field no-space global-search__dropdown--itens-container">\n <ng-container *ngTemplateOutlet="item.content"></ng-container>\n </div>\n </ng-container>\n </div>\n <div *ngIf="showFooter" class="ui-g-12 global-search__modal--footer">\n <s-button class="global-search__show-more" (click)="showMore()" priority="link">\n {{showMoreLabel}}\n </s-button>\n </div>\n </div>\n </div>\n <s-empty-state *ngIf="(!dropdownItens || dropdownItens.length==0) && !isLoading" [title]="emptyTitle"\n [description]="emptyDescription" ngClass="global-search__empty-state--icon"\n [iconClass]="(emptyIcon ? emptyIcon : \'fas fa-search\')">\n </s-empty-state>\n </div>\n </div>\n <div *ngIf="wasSearched" class="global-search__background" (click)="close()"></div>\n</div>\n',animations:[d.trigger("expandableContent",[d.state("*",d.style({height:"0"})),d.state("false",d.style({height:"0"})),d.state("true",d.style({height:"*"})),d.transition("* => true",d.animate("200ms ease-out")),d.transition("false <=> true",d.animate("200ms ease-out"))])],styles:[".global-search__input{border-radius:20px 0 0 20px;width:136px;cursor:pointer;padding:0 0 0 15px;transition:.3s}.ui-inputtext{min-height:25px!important;height:25px!important}.global-search__span{transition:.3s;background:0 0!important;border-left:none;border-radius:0 20px 20px 0!important;padding:1px 15px 0 0!important;height:25px!important}.global-search__input:active,.global-search__input:focus{width:466px;cursor:default;transition:.3s;border-top:1px solid #428bca;border-left:1px solid #428bca;border-bottom:1px solid #428bca}.global-search__input:active,.global-search__input:focus+.global-search__span{transition:.3s;border-left:none;border-top:1px solid #428bca!important;border-right:1px solid #428bca!important;border-bottom:1px solid #428bca!important}.global-search__input-active{width:466px;cursor:default;transition:.3s}.global-search__modal{box-shadow:0 2px 8px 0 rgba(0,0,0,.4);border-radius:5px;width:500px;background:#fff;position:absolute;margin-top:60px;z-index:6;min-height:50px}::ng-deep .global-search__loader{border-radius:5px!important;width:100%}.global-search__container{min-height:50px;width:100%}.global-search__modal--total-itens-title{padding:15px;color:#333;border-bottom:1px solid #ccc;font-weight:600;height:50px}.global-search__modal--footer{height:50px;border-top:1px solid #ccc}.global-search__dropdown--itens{max-height:510px;overflow:auto}.global-search__dropdown--itens-container:hover{background:#dbe0e4}.global-search__modal--total-itens-title-icon{text-align:right;cursor:pointer}.global-search__background{background:rgba(0,0,0,.4);width:100%;height:calc(100vh - 70px);position:absolute;left:0;margin-top:50px;z-index:5;cursor:pointer}.no-space{padding:0;margin:0}.global-search__show-more{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}body .global-search__show-more--button{color:#428bca!important}.modal{position:absolute;left:1%;width:98%;height:calc(100vh - 90px)}.global-search__empty-state--icon{margin:42px 134px}::ng-deep .global-search__empty-state--icon .container .icon{font-size:40px}::ng-deep .s-button-priority-link{color:#428bca}@media all and (max-width:900px){.global-search__modal{top:20px;width:98%;left:1%}.global-search__input-active,.global-search__input:active,.global-search__input:focus{position:absolute;width:calc(100% - 70px);left:2%}body .global-search__dropdown--itens{max-height:100%;overflow:auto}}@media all and (max-width:767px){.global-search__modal{top:15px}.global-search__input-active,.global-search__input:active,.global-search__input:focus{width:calc(100% - 55px)}}@media all and (max-width:600px){.global-search__modal--itens{height:calc(100vh - 100px);background:#fff}.global-search__input-active,.global-search__input:active,.global-search__input:focus{position:absolute;width:calc(100% - 53px);left:2%}body .global-search__dropdown--itens{max-height:100%;overflow:auto}.global-search__dropdown--itens{max-height:100%;background:#fff}.global-search__modal--footer{background:#fff;height:50px}.global-search__modal{top:17px;border-radius:0;margin-top:55px;box-shadow:none;left:0;width:100%}}"]})],e)}(),Jo=function(){function e(e){this.el=e,this.onScroll=new t.EventEmitter}return e.prototype.scroll=function(){this.el.nativeElement.scrollTop>this.el.nativeElement.scrollHeight-this.el.nativeElement.offsetHeight-2&&this.onScroll.emit()},e.ctorParameters=function(){return[{type:t.ElementRef}]},ae([t.Output()],e.prototype,"onScroll",void 0),ae([t.HostListener("scroll")],e.prototype,"scroll",null),e=ae([t.Directive({selector:"[sInfiniteScroll]"})],e)}(),Qo=function(){function e(){}return e=ae([t.NgModule({declarations:[Jo],imports:[n.CommonModule],exports:[Jo]})],e)}(),ei=function(){function e(){}return e=ae([t.NgModule({declarations:[Zo,Xo],imports:[n.CommonModule,L.InputTextModule,u.FormsModule,u.ReactiveFormsModule,l.TooltipModule,ho,xe,Xt,Qo,Ot],exports:[Zo,Xo,l.TooltipModule,ho,xe,Xt,Ot],entryComponents:[Zo,Xo]})],e)}();(e.Languages||(e.Languages={})).TaxCalculation="TaxCalculation",(e.Themes||(e.Themes={})).SDSLight="SDSLight";var ti,ni,oi,ii,ri,ai,si=function(){function e(){}return e.getLinter=function(t){var n=e._LINTERS.get(t);if(n)return n()},e._LINTERS=new Map([]),e}(),li=function(){function t(){this.$onCoreFinishLoad=new r.ReplaySubject(1),this.$onCodeChange=new r.Subject,this.$onCodeValidityChange=new r.Subject,this._completionItems=[],this._lastCodeEmitted=""}return t.prototype.changeEditorOptions=function(e){if(e){if("object"!=typeof e)throw new Error("Editor's options must be an EditorOptions object");this.validateLanguage(e.language),this.validateTheme(e.theme),this.setLinter(e.language),this.setCoreEditorOptions(e)}},t.prototype.changeCode=function(e){var t=this.getSafeCode(e);t!==this._lastCodeEmitted&&this.setCode(t)},t.prototype.getOnCoreFinishLoadObservable=function(){return this.$onCoreFinishLoad.asObservable()},t.prototype.getOnCodeChangeObservable=function(){return this.$onCodeChange.asObservable()},t.prototype.getOnCodeValidityChangeObservable=function(){return this.$onCodeValidityChange.asObservable()},t.prototype.notifyCoreFinishLoad=function(){this.$onCoreFinishLoad.next()},t.prototype.notifyCodeChange=function(e){var t=this.getSafeCode(e);t!==this._lastCodeEmitted&&(this._lastCodeEmitted=t,this.$onCodeChange.next(t),this.validateCode(t))},t.prototype.updateCompletionItems=function(e){this._completionItems=e||[],this.validateCode(this._lastCodeEmitted)},t.prototype.setLinter=function(e){this._linter=si.getLinter(e)},t.prototype.validateCode=function(e){return le(this,void 0,void 0,(function(){var t;return pe(this,(function(n){switch(n.label){case 0:return this._linter?[4,this._linter.lint(e,this._completionItems)]:[3,2];case 1:t=n.sent(),this.highlightCode(t),this.notifyCodeValidityChange(!t.length),n.label=2;case 2:return[2]}}))}))},t.prototype.notifyCodeValidityChange=function(e){e!==this._lastCodeValidityEmitted&&(this._lastCodeValidityEmitted=e,this.$onCodeValidityChange.next(e))},t.prototype.validateLanguage=function(t){var n=Object.values(e.Languages);if(t&&!n.includes(t))throw new Error('The informed language "'+t+'" is not supported')},t.prototype.validateTheme=function(t){var n=Object.values(e.Themes);if(t&&!n.includes(t))throw new Error('The informed theme "'+t+'" is not supported')},t.prototype.getSafeCode=function(e){return"string"==typeof e?e:""},t}(),pi=function(){function e(e){this.coreFacade=e,this._ngUnsubscribe=new r.Subject,this.codeChange=new t.EventEmitter,this.isCodeValidChange=new t.EventEmitter,this.onCodeChange=new t.EventEmitter,this.onComponentFinishLoad=new t.EventEmitter}return Object.defineProperty(e.prototype,"editorOptions",{set:function(e){this.coreFacade.changeEditorOptions(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"code",{set:function(e){this.coreFacade.changeCode(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.coreFacade.initCore(),this.setupCoreListeners()},e.prototype.ngAfterViewInit=function(){this.setCoreWrapperElement()},e.prototype.ngOnDestroy=function(){this.coreFacade.destroyCore(),this._ngUnsubscribe.next(),this._ngUnsubscribe.complete()},e.prototype.setCoreWrapperElement=function(){this.coreFacade.setCoreWrapperElement(this.coreWrapperElement.nativeElement)},e.prototype.setupCoreListeners=function(){var e=this;this.coreFacade.getOnCoreFinishLoadObservable().pipe(a.take(1)).subscribe((function(){return e.onComponentFinishLoad.emit()})),this.coreFacade.getOnCodeChangeObservable().pipe(a.takeUntil(this._ngUnsubscribe)).subscribe((function(t){e.codeChange.emit(t),e.onCodeChange.emit(t)})),this.coreFacade.getOnCodeValidityChangeObservable().pipe(a.takeUntil(this._ngUnsubscribe)).subscribe((function(t){e.isCodeValidChange.emit(t)}))},e.ctorParameters=function(){return[{type:li}]},ae([t.ViewChild("coreWrapper")],e.prototype,"coreWrapperElement",void 0),ae([t.Input()],e.prototype,"editorOptions",null),ae([t.Input()],e.prototype,"code",null),ae([t.Output()],e.prototype,"codeChange",void 0),ae([t.Input()],e.prototype,"isCodeValid",void 0),ae([t.Output()],e.prototype,"isCodeValidChange",void 0),ae([t.Output()],e.prototype,"onCodeChange",void 0),ae([t.Output()],e.prototype,"onComponentFinishLoad",void 0),e=ae([t.Component({selector:"s-code-editor",template:'<div #coreWrapper class="core-wrapper"></div>',styles:[".core-wrapper{height:100%}"]})],e)}();!function(e){e.ASC="ASC",e.DESC="DESC"}(ti||(ti={})),function(e){e.ENTITY="ENTITY",e.STRING="STRING",e.INTEGER="INTEGER",e.DOUBLE="DOUBLE",e.LONG="LONG",e.BIGDECIMAL="BIGDECIMAL",e.UUID="UUID",e.DATE="DATE",e.DATETIME="DATETIME",e.LOCALDATETIME="LOCALDATETIME",e.TIME="TIME",e.BOOLEAN="BOOLEAN",e.LIST="LIST",e.ENUM="ENUM",e.CUSTOM_EXPRESSION="CUSTOM_EXPRESSION",e.PUBLIC_EXPRESSION="PUBLIC_EXPRESSION"}(ni||(ni={})),function(e){e[e.ListContextMetadataById=0]="ListContextMetadataById",e[e.ListExpressionMetadata=1]="ListExpressionMetadata",e[e.ListFacadeMetadataNames=2]="ListFacadeMetadataNames",e[e.GetFacadeMetadataByPath=3]="GetFacadeMetadataByPath"}(oi||(oi={})),function(e){e.Keyword="keyword",e.Context="context",e.Expression="expression",e.UserExpression="userExpression",e.Entity="entity",e.FinalValue="finalValue"}(ii||(ii={})),function(e){e.SE="SE",e.SENAO="SENAO",e.CONTENHA="CONTENHA",e.ENTAO="ENTAO",e.FIM_SE="FIM_SE",e.NAO="NAO",e.E="E",e.OU="OU"}(ri||(ri={}));var ci=X.LRLanguage.define({parser:Z.buildParser('\n@top Script { statement+ }\n\nstatement[@isGroup=Statement] {\n Keyword |\n String |\n Number\n}\n\n@tokens {\n String { \'"\' (![\\n"])* \'"\'? }\n\n Number { std.digit+ }\n\n identifierChar { std.asciiLetter | $[_$¡-􏿿] }\n\n word { identifierChar (identifierChar | std.digit)* }\n\n identifier { word }\n}\n\nKeyword {\n kw<"SE">\n kw<"ENTAO">\n kw<"FIM_SE">\n kw<"SENAO">\n kw<"NAO">\n kw<"CONTENHA">\n kw<"OU">\n kw<"E">\n}\n\nkw<term> { @specialize[@name={term}]<identifier, term> }\n\n@detectDelim\n').configure({props:[J.styleTags((ai={},ai[Object.values(ri).join(" ")]=J.tags.keyword,ai.String=J.tags.string,ai.Number=J.tags.number,ai))]})});function di(e){return le(this,void 0,void 0,(function(){return pe(this,(function(t){return[2,e.json()]}))}))}function ui(e){return le(this,void 0,void 0,(function(){var t;return pe(this,(function(n){switch(n.label){case 0:return[4,e.blob()];case 1:return[4,n.sent().text()];case 2:return t=n.sent(),[2,JSON.parse(t)]}}))}))}var mi,fi=function(){function e(){}return e.GET=function(e,t){return void 0===t&&(t={}),le(this,void 0,void 0,(function(){var n;return pe(this,(function(o){switch(o.label){case 0:return[4,this.interceptRequest(e,re(re({},t),{method:"GET"}))];case 1:return n=o.sent(),[2,this.formatResponse(n)]}}))}))},e.POST=function(e,t,n){return void 0===n&&(n={}),le(this,void 0,void 0,(function(){var o,i;return pe(this,(function(r){switch(r.label){case 0:return(o=new Headers(n.headers)).append("Content-Type","application/json"),o.append("Accept","application/json"),[4,this.interceptRequest(e,re(re({},n),{method:"POST",body:JSON.stringify(t),headers:o}))];case 1:return i=r.sent(),[2,this.formatResponse(i)]}}))}))},e.interceptRequest=function(e,t){return void 0===t&&(t={}),le(this,void 0,void 0,(function(){var n,o,i,r,a;return pe(this,(function(s){switch(s.label){case 0:return s.trys.push([0,4,,5]),e.includes("://")?[3,3]:[4,x.service.getRestUrl()];case 1:return n=s.sent(),[4,x.user.getAuthHeader()];case 2:return o=s.sent(),(i=new Headers(t.headers)).append("Authorization",o),r=new Request(n+e,re(re({},t),{headers:i})),[2,fetch(r)];case 3:return[2,fetch(e,t)];case 4:throw a=s.sent(),new Error("Error fetching requested URL: "+a);case 5:return[2]}}))}))},e.formatResponse=function(t){return le(this,void 0,void 0,(function(){var n,o,i,r;return pe(this,(function(a){switch(a.label){case 0:return n=t.headers.get("content-type"),(o=e._responseFormatterMap.get(n))?[4,o(t)]:[3,2];case 1:return r=a.sent(),[3,3];case 2:r={},a.label=3;case 3:if(i=r,t.ok)return[2,i];throw new Error(JSON.stringify(i))}}))}))},e._responseFormatterMap=new Map([["application/json",di],["application/octet-stream",ui]]),e}(),hi=function(){function e(){}return e.translate=function(t){var n,o;if(null==t)return"";var i=""+e._TRANSLATION_PREFIX+t;return null!==(o=(null!==(n=Object.values(e._translations)[0])&&void 0!==n?n:{})[i])&&void 0!==o?o:i},e.setTranslations=function(t){e._translations=null!=t?t:{}},e.setTranslationsPrefix=function(t){var n=null!=t?t:{},o=n.domain+"."+n.service+".";e._TRANSLATION_PREFIX=o},e._translations={},e._TRANSLATION_PREFIX="",e}(),gi=function(){function e(e,t){this.translate=e,this.hostProjectConfigs=t,this.factoryTranslations(this.translate,this.hostProjectConfigs)}return e.prototype.factoryTranslations=function(e,t){hi.setTranslations(e.translations),hi.setTranslationsPrefix(t)},e.ctorParameters=function(){return[{type:V.TranslateService},{type:void 0,decorators:[{type:t.Inject,args:[pn]}]}]},e=ae([t.NgModule(),se(1,t.Inject(pn))],e)}();!function(e){e[e.Error=0]="Error",e[e.Info=1]="Info",e[e.Warning=2]="Warning"}(mi||(mi={}));var bi=new Map([[mi.Error,"error"],[mi.Info,"info"],[mi.Warning,"warning"]]);var vi=function(){function e(){}return e.listContextMetadataById=function(t,n){return le(this,void 0,void 0,(function(){return pe(this,(function(o){return[2,fi.POST(e.BASE_URL+"/queries/listContextMetadataById",t,{signal:n})]}))}))},e.listExpressionMetadata=function(t,n){return le(this,void 0,void 0,(function(){return pe(this,(function(o){return[2,fi.POST(e.BASE_URL+"/queries/listExpressionMetadata",t,{signal:n})]}))}))},e.listFacadeMetadataNames=function(t,n){return le(this,void 0,void 0,(function(){return pe(this,(function(o){return[2,fi.POST(e.BASE_URL+"/queries/listFacadeMetadataNames",t,{signal:n})]}))}))},e.getFacadeMetadataByPath=function(t,n){return le(this,void 0,void 0,(function(){return pe(this,(function(o){return[2,fi.POST(e.BASE_URL+"/queries/getFacadeMetadataByPath",t,{signal:n})]}))}))},e.BASE_URL="platform/rule_metadata",e}();var yi,xi,wi=null;function Ci(){return[K.StateField.define({create:_i,update:function(e,t){return _i(t.state)},provide:function(e){return ee.showTooltip.compute([e],(function(t){return t.field(e)}))}}),W.EditorView.theme({".s-code-editor-taxCalculation-autocomplete-ul":{padding:".75rem !important"},".s-code-editor-taxCalculation-autocomplete-li":{cursor:"default !important","line-height":"1.375em !important"}})]}function Ii(e){wi=e,$i.updateEditorView()}function _i(e){if(wi){var t=wi.outerHTML,n={pos:e.selection.ranges[0].head,create:function(){return{dom:ki(t)}}};return wi=null,n}}function ki(e){var t=document.createElement("div");return t.className="cm-tooltip-autocomplete cm-tooltip",t.innerHTML='\n <ul class="s-code-editor-taxCalculation-autocomplete-ul">\n <li class="s-code-editor-taxCalculation-autocomplete-li">\n '+e+"\n </li>\n </ul>\n\n ",t}function Ti(){var e;yi||((e=document.createElement("span")).innerText=hi.translate("core_language_tax_calculation_fetching_suggestions"),yi=e),Ii(yi)}function Si(){var e;xi||((e=document.createElement("span")).innerText=hi.translate("core_language_tax_calculation_no_suggestions"),xi=e),Ii(xi)}var Ei=function(){function e(){}return e.setConfigs=function(t){e.CONFIGS=JSON.parse(JSON.stringify(t))},e.getConfigs=function(){return e.CONFIGS},e.CONFIGS={contexts:[]},e}();function Fi(e){return'"\\'+e+'"'}var Li,Mi="core_language_tax_calculation";function Oi(e){if(!function(e){var t;return((null===(t=e.match(/"/g))||void 0===t?void 0:t.length)||0)%2!=0}(e.state.doc.toString().substring(0,e.pos))){if(Li){var t=re({},Li),n=e.state.doc.toString().length;return t.from=t.from>n?n:t.from,Li=null,t}!function(e){var t=new AbortController;setTimeout((function(){t.signal.aborted||(Ti(),function(e,t){var n,o,i,r;le(this,void 0,void 0,(function(){var a,s,l,p;return pe(this,(function(c){return a=null!==(r=null===(o=null===(n=null==e?void 0:e.state)||void 0===n?void 0:n.doc)||void 0===o?void 0:o.toString().substring(0,null!==(i=null==e?void 0:e.pos)&&void 0!==i?i:0))&&void 0!==r?r:"",s=function(e){var t,n;return null==e?"":(null!==(n=null===(t=e.match(/(#|\.|)\w*$/))||void 0===t?void 0:t[0])&&void 0!==n?n:"").replace(".","").trim()}(a),l=function(e,t){var n,o;if(null==e)return"";var i=e.substring(0,e.length-t);return(null!==(o=null===(n=i.match(/(\w*\.)*$/))||void 0===n?void 0:n[0])&&void 0!==o?o:"").replace(/\.$/,"")}(a,s.length),p=function(e,t,n){var o,i=function(){var e,t=Ei.getConfigs();if(!(null===(e=t.contexts)||void 0===e?void 0:e.length))throw new Error("In order to use the TaxCalculation Language's autocomplete, one must inform at least one context by using the 'TaxCalculationLanguageConfigs.setConfigs()'");return t}(),r=[];if(""===e)r.push({requestType:oi.ListContextMetadataById,request:vi.listContextMetadataById({id:i.contexts},n)}),r.push({requestType:oi.ListExpressionMetadata,request:vi.listExpressionMetadata({context:i.contexts,subcontext:null!==(o=i.subContexts)&&void 0!==o?o:[],name:t,pageRequest:{offset:0,size:20}},n)});else if(e.includes(".")){var a=e.split(".");r.push({requestType:oi.GetFacadeMetadataByPath,request:vi.getFacadeMetadataByPath({context:a[0],entityName:a[1],fields:void 0===a[2]?void 0:a.slice(2)},n)})}else r.push({requestType:oi.ListFacadeMetadataNames,request:vi.listFacadeMetadataNames({context:[e],name:t,pageRequest:{offset:0,size:30}},n)});return r.map((function(e){return function(e){return le(this,void 0,void 0,(function(){var t,n;return pe(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=[re({},e)],n={},[4,e.request];case 1:return[2,re.apply(void 0,t.concat([(n.response=o.sent(),n)]))];case 2:return o.sent(),[3,3];case 3:return[2]}}))}))}(e)}))}(l,s,t.signal),Promise.all(p).then((function(n){if(!t.signal.aborted){var o=function(e,t){return e.filter((function(e){return e.label.toLowerCase().startsWith(t.toLowerCase())}))}([].concat(function(e){return""!==e?[]:[{label:ri.SE,apply:"SE ()\nENTAO\n\tacao\nFIM_SE"},{label:ri.SENAO,apply:"SENAO\n\tacao"},{label:ri.CONTENHA,apply:"CONTENHA(condicao)"},{label:ri.ENTAO,apply:"ENTAO\n\tacao"},{label:ri.FIM_SE,apply:"FIM_SE "},{label:ri.NAO,apply:"NAO "},{label:ri.E,apply:"E "},{label:ri.OU,apply:"OU "}].map((function(e){return re(re({},e),{detail:hi.translate(Mi+"_keyword"),type:ii.Keyword})}))}(l),function(e){var t,n,o=e.find((function(e){return(null==e?void 0:e.requestType)===oi.ListContextMetadataById}));if(o)return(null!==(n=null===(t=o.response)||void 0===t?void 0:t.contextMetadata)&&void 0!==n?n:[]).map((function(e){return{label:e.name,detail:hi.translate(Mi+"_context"),apply:e.name,type:ii.Context}}));return[]}(n),function(e){var t,n,o=e.find((function(e){return(null==e?void 0:e.requestType)===oi.ListExpressionMetadata}));if(o)return(null!==(n=null===(t=o.response)||void 0===t?void 0:t.expressionMetadata)&&void 0!==n?n:[]).map((function(e){return{label:e.name,detail:hi.translate(Mi+"_"+(e.type===ni.PUBLIC_EXPRESSION?"senior_expression":"user_expression")),apply:e.name,info:e.description,type:e.type===ni.PUBLIC_EXPRESSION?ii.Expression:ii.UserExpression}}));return[]}(n),function(e){var t,n,o,i,r,a=e.find((function(e){return(null==e?void 0:e.requestType)===oi.ListFacadeMetadataNames}));if(a)return(null!==(n=null===(t=a.response)||void 0===t?void 0:t.facadeMetadataNames)&&void 0!==n?n:[]).map((function(e){return{label:e.name,detail:hi.translate(Mi+"_entity"),apply:e.name,type:ii.Entity}}));var s=e.find((function(e){return(null==e?void 0:e.requestType)===oi.GetFacadeMetadataByPath}));if(s)return(null!==(r=null===(i=null===(o=s.response)||void 0===o?void 0:o.facadeMetadata)||void 0===i?void 0:i.fields)&&void 0!==r?r:[]).map((function(e){return{label:e.name,detail:hi.translate(Mi+"_"+(e.type===ni.ENTITY?"entity":"field")),apply:e.name,type:e.type===ni.ENTITY?ii.Entity:ii.FinalValue}}));return[]}(n)),s);if(o.length){var i=function(e){return e.sort((function(e,t){return Pi.indexOf(e.type)-Pi.indexOf(t.type)}))}(function(e,t){return e.map((function(e){return re(re({},e),{apply:Ai(t,""+e.apply)})}))}(o,s));Li={from:e.pos,filter:!1,options:i},Q.startCompletion($i.getEditorView())}else Si()}})),[2]}))}))}(e,t))}),500),Ri=$i.getEditorView().contentDOM,Di=function(){Ri.removeEventListener("keydown",Di),Ri.removeEventListener("click",Di),t.abort()},Ri.addEventListener("keydown",Di),Ri.addEventListener("click",Di)}(e)}}var Ri,Di=function(){};function Ai(e,t){return function(n,o,i,r){var a=i-e.length;n.dispatch({changes:{from:a,to:r,insert:t},selection:{anchor:a+t.length},userEvent:"input.complete",annotations:Q.pickedCompletion.of(o)})}}var Pi=[ii.Keyword,ii.Context,ii.UserExpression,ii.Expression,ii.Entity,ii.FinalValue];function Ni(){return new X.LanguageSupport(ci,[[Q.autocompletion({override:[Oi]}),[Ci()],[Ci()],W.EditorView.theme({".cm-completionIcon":{"font-family":"'Font Awesome 5 Pro'","font-weight":"900"},".cm-completionIcon-keyword::after":{content:Fi("f084")},".cm-completionIcon-context::after":{content:Fi("f466")},".cm-completionIcon-expression::after":{content:Fi("f505")},".cm-completionIcon-userExpression::after":{content:Fi("f4ff")},".cm-completionIcon-entity::after":{content:Fi("f126")},".cm-completionIcon-finalValue::after":{content:Fi("f192")}})]])}var zi=function(){function t(){}return t.getLanguage=function(e){var n=t._LANGUAGES.get(e);return n?n():[]},t._LANGUAGES=new Map([[e.Languages.TaxCalculation,Ni]]),t}();var Vi=J.HighlightStyle.define([{tag:J.tags.keyword,color:"#008080"},{tag:J.tags.string,color:"#9C3A3A"},{tag:J.tags.number,color:"#400753"}]);var Bi={"font-family":"'Noto Sans Mono', 'sans-serif'","font-style":"normal","font-size":"1rem"};function Ui(){return[[W.EditorView.theme({"&.cm-editor.cm-focused":{outline:"none"}}),[W.EditorView.baseTheme({"&.cm-editor":{height:"100%"}})],[W.EditorView.theme({".cm-scroller":re(re({},Bi),{"letter-spacing":"0","line-height":"1.5em","font-variation-settings":"'wght' 400",color:"#333333"}),".cm-tooltip.cm-tooltip-autocomplete > ul":re(re({},Bi),{"font-variation-settings":"'wght' 300",color:"#697882"}),".cm-tooltip.cm-tooltip-autocomplete > ul .cm-completionLabel":{"line-height":"1.5em","font-variation-settings":"'wght' 500"},".cm-tooltip.cm-tooltip-autocomplete > ul .cm-completionDetail":{"font-size":"0.875em","font-style":"normal","margin-left":"0.75rem"}})],[te.lineNumbers(),W.EditorView.theme({".cm-gutters":{"background-color":"#fff",color:"#428BCA","border-right":"none"},".cm-gutter":{padding:"0 2rem 0 2rem"}})],[W.EditorView.baseTheme({".cm-tooltip":{border:"none !important","border-radius":"4px","background-color":"#E5EAEA !important"},".cm-tooltip.cm-tooltip-autocomplete > ul[role='listbox']":{padding:"1rem"},".cm-tooltip.cm-tooltip-autocomplete > ul .cm-completionDetail":{"margin-left":".75rem"},".cm-tooltip.cm-tooltip-autocomplete > ul .cm-completionDetail::before":{content:"'[ '"},".cm-tooltip.cm-tooltip-autocomplete > ul .cm-completionDetail::after":{content:"' ]'"},".cm-tooltip.cm-tooltip-autocomplete > ul .cm-completionIcon":{"padding-right":0,"margin-right":".475rem",width:"1rem"},".cm-tooltip-autocomplete ul li[aria-selected]":{"border-radius":"4px","background-color":"#5D96A2 !important",color:"#fff !important"},".cm-tooltip.cm-completionInfo.cm-completionInfo-right":{"border-radius":"3px","box-shadow":"0 2px 4px -1px rgb(0 0 0 / 20%), 0 4px 5px 0 rgb(0 0 0 / 14%), 0 1px 10px 0 rgb(0 0 0 / 12%)",background:"#495057 !important",color:"#fff",padding:".5rem",left:"101.6%"},".cm-tooltip.cm-completionInfo.cm-completionInfo-right::before":{content:"''",position:"absolute",width:0,height:0,top:".8125rem",left:"-.25rem","margin-top":"-.25rem","border-color":"transparent","border-style":"solid","border-right-color":"#495057","border-width":".25rem .25rem .25rem 0"}})]],Vi]}var ji,Hi=function(){function t(){}return t.getTheme=function(e){var n=t._THEMES.get(e);return n?n():[]},t._THEMES=new Map([[e.Themes.SDSLight,Ui]]),t}(),$i=function(e){function t(){var t=e.call(this)||this;return t._codeReceivedBeforeViewCreation="",t._editorOptionsReceivedBeforeViewCreation=[],t}return ie(t,e),t.getEditorView=function(){return t._editorView},t.updateEditorView=function(){for(var e,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];(e=t._editorView).dispatch.apply(e,ue(n))},t.prototype.setCoreWrapperElement=function(e){this.createEditorView(e)},t.prototype.setCode=function(e){this.changeEditorContent(e)},t.prototype.initCore=function(){this.setObservablesListeners()},t.prototype.destroyCore=function(){this._codeReceivedBeforeViewCreation="",t._editorView=null,t._ngUnsubscribe.next(),t._ngUnsubscribe.complete()},t.prototype.setCoreEditorOptions=function(e){var n=zi.getLanguage(e.language),o=Hi.getTheme(e.theme);t._editorView?t.updateEditorView({effects:K.StateEffect.reconfigure.of([n,o,this.getCodeChangeListenerExtension()])}):this._editorOptionsReceivedBeforeViewCreation=[n,o]},t.prototype.highlightCode=function(e){var n=function(e,t){return e.map((function(e){var n,o;return{from:e.start||0,to:e.end||t,message:null!==(n=e.message)&&void 0!==n?n:"",severity:null!==(o=bi.get(e.severity))&&void 0!==o?o:"error"}}))}(e,t._editorView.state.doc.length);t.updateEditorView(Y.setDiagnostics(t._editorView.state,n))},t.prototype.setObservablesListeners=function(){var e=this;t.$onCompletionItemsUpdate.pipe(a.takeUntil(t._ngUnsubscribe)).subscribe((function(t){return e.updateCompletionItems(t)}))},t.prototype.createEditorView=function(e){t._editorView=new W.EditorView({parent:e,state:K.EditorState.create({doc:this._codeReceivedBeforeViewCreation,extensions:[this._editorOptionsReceivedBeforeViewCreation,this.getCodeChangeListenerExtension()]})}),this.notifyCoreFinishLoad()},t.prototype.getCodeChangeListenerExtension=function(){var e=this;return W.EditorView.updateListener.of((function(t){return t.docChanged&&e.notifyCodeChange(t.state.doc.toString())}))},t.prototype.changeEditorContent=function(e){t._editorView?t.updateEditorView({changes:{from:0,to:t._editorView.state.doc.length,insert:e}}):this._codeReceivedBeforeViewCreation=e},t.$onCompletionItemsUpdate=new r.Subject,t._ngUnsubscribe=new r.Subject,t._editorView=null,t}(li),Gi=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule,gi],declarations:[pi],exports:[pi],providers:[{provide:li,useClass:$i}]})],e)}(),qi=function(){function e(){this.showValue=!0}return e.prototype.ngOnInit=function(){this.validateValues()},e.prototype.validateValues=function(){if(this.value<0||this.value>100)throw new Error("Invalid value for value");if(this.targetValue<0||this.targetValue>100)throw new Error("Invalid value for targetValue")},ae([t.Input()],e.prototype,"value",void 0),ae([t.Input()],e.prototype,"targetValue",void 0),ae([t.Input()],e.prototype,"targetLabel",void 0),ae([t.Input()],e.prototype,"activeColor",void 0),ae([t.Input()],e.prototype,"showValue",void 0),e=ae([t.Component({selector:"s-progressbar",template:"<div class=\"progress-bar\">\n <div class=\"progress-bar-all\">\n <div\n class=\"progress-bar-active\"\n [ngClass]=\"{\n 'progress-bar-active--blue' : activeColor == 'blue',\n 'progress-bar-active--green': activeColor == 'green',\n 'progress-bar-active--red': activeColor == 'red',\n 'progress-bar-active--yellow': activeColor == 'yellow'\n }\"\n [ngStyle]=\"{ 'width': value + '%' }\">\n {{ showValue && value ? value + '%' : '' }}\n </div>\n </div>\n <div\n *ngIf=\"targetValue\"\n class=\"target\"\n [ngStyle]=\"{\n 'left': targetValue <= 50 ? targetValue + '%' : 'unset',\n 'right': targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start'\n }\">\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || value + '%' }}\n </span>\n </div>\n</div>\n",styles:['.progress-bar{position:relative}.progress-bar .progress-bar-all{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progress-bar .progress-bar-all .progress-bar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:"Open Sans",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progress-bar .progress-bar-all .progress-bar-active--blue{background-color:#428bca}.progress-bar .progress-bar-all .progress-bar-active--green{background-color:#0c9348}.progress-bar .progress-bar-all .progress-bar-active--red{background-color:#c13018}.progress-bar .progress-bar-all .progress-bar-active--yellow{background-color:#fcbf10}.progress-bar .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progress-bar .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progress-bar .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:"Open Sans",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}']})],e)}(),Wi=function(){function e(){}return e=ae([t.NgModule({imports:[n.CommonModule],declarations:[qi],exports:[qi]})],e)}();(ji=e.ProgressBarColors||(e.ProgressBarColors={})).Blue="blue",ji.Green="green",ji.Red="red",ji.Yellow="yellow",e.AngularComponentsModule=cn,e.AutocompleteField=Le,e.BaseFieldComponent=Ct,e.BignumberField=Je,e.BignumberInputDirective=tn,e.BignumberInputModule=nn,e.BooleanField=tt,e.BooleanOptionsLabel=et,e.BreadcrumbComponent=ge,e.BreadcrumbModule=be,e.Breakpoints=Dt,e.ButtonComponent=ye,e.ButtonModule=xe,e.CalendarField=ot,e.CalendarLocaleOptions=Me,e.CalendarMaskDirective=we,e.CalendarMaskModule=Ce,e.ChipsField=it,e.CodeEditorModule=Gi,e.CollapseLinkComponent=Ie,e.CollapseLinkModule=_e,e.ControlErrorsComponent=ke,e.ControlErrorsModule=Te,e.CurrencyField=ct,e.CustomFieldsComponent=eo,e.CustomFieldsModule=no,e.CustomFieldsService=Jn,e.DEFAULT_CALENDAR_LOCALE_OPTIONS=De,e.DEFAULT_LOCALE_OPTIONS=Pe,e.DEFAULT_NUMBER_LOCALE_OPTIONS=Ae,e.DoubleClickDirective=Gn,e.DynamicConfig=Et,e.DynamicFormComponent=Ft,e.DynamicFormModule=Zn,e.EditableOverlayDirective=oo,e.EditableOverlayModule=io,e.EmptyStateComponent=Lt,e.EmptyStateModule=Ot,e.ExportUtils=At,e.Field=Fe,e.Fieldset=Tt,e.FileUploadComponent=Pt,e.FileUploadModule=Nt,e.FormField=yt,e.GlobalSearchComponent=Zo,e.GlobalSearchDropdownItemComponent=Xo,e.GlobalSearchModule=ei,e.HostProjectConfigsInjectionToken=pn,e.ImageCropperComponent=lo,e.ImageCropperModule=po,e.ImageCropperService=co,e.InfoSignDirective=qt,e.InfoSignModule=Wt,e.LoadingStateComponent=Kt,e.LoadingStateDirective=Yt,e.LoadingStateModule=Xt,e.LocaleModule=Ze,e.LocaleOptions=Re,e.LocaleService=ze,e.LocalizedCurrencyPipe=je,e.LocalizedCurrencyPipeOptions=Ue,e.LocalizedDateImpurePipe=qe,e.LocalizedDatePipe=Ge,e.LocalizedNumberInputDirective=Zt,e.LocalizedNumberInputModule=Jt,e.LocalizedNumberPipe=We,e.LocalizedTimeImpurePipe=Xe,e.LocalizedTimePipe=Ye,e.LongPressDirective=$n,e.LookupComponent=wt,e.LookupField=dt,e.MaskFormatterModule=en,e.MaskFormatterPipe=Qt,e.MouseEventsModule=qn,e.NavigationDirective=an,e.NumberField=lt,e.NumberInputDirective=at,e.NumberInputModule=st,e.NumberLocaleOptions=Oe,e.ObjectCardComponent=yo,e.ObjectCardFieldComponent=go,e.ObjectCardMainComponent=bo,e.ObjectCardModule=xo,e.Option=xt,e.PasswordField=vt,e.PasswordStrengthComponent=Kn,e.PasswordStrengthDirective=Yn,e.PasswordStrengthModule=Xn,e.ProductHeaderComponent=wo,e.ProductHeaderModule=Co,e.ProfilePicturePickerComponent=Ko,e.ProfilePicturePickerModule=Yo,e.ProgressBarComponent=qi,e.ProgressBarModule=Wi,e.RadioButtonField=ut,e.RationButtonOption=mt,e.RowTogllerDirective=sn,e.Section=St,e.SelectField=ft,e.SelectOption=ht,e.SidebarComponent=Io,e.SidebarModule=_o,e.StatsCardComponent=ko,e.StatsCardModule=To,e.StepsComponent=Fo,e.StepsModule=Lo,e.Structure=kt,e.TableFrozenPositionDirective=ln,e.TableHeaderCheckboxComponent=on,e.TableHeaderCheckboxModule=rn,e.TableModule=bn,e.TaxCalculationLanguageConfigs=Ei,e.TextAreaField=gt,e.TextField=bt,e.ThumbnailComponent=fo,e.ThumbnailModule=ho,e.TileComponent=Go,e.TileModule=qo,e.TimelineComponent=Mo,e.TimelineItem=$o,e.TimelineModule=jo,e.TokenListComponent=fn,e.TokenListModule=hn,e.TooltipModule=$t,e.ɵa=He,e.ɵb=Ve,e.ɵba=Fn,e.ɵbb=Nn,e.ɵbc=zn,e.ɵbe=pt,e.ɵbf=so,e.ɵbg=ro,e.ɵbh=ao,e.ɵbi=Oe,e.ɵbj=mo,e.ɵbk=Ro,e.ɵbl=Oo,e.ɵbm=Ao,e.ɵbn=Do,e.ɵbo=Uo,e.ɵbp=Po,e.ɵbq=No,e.ɵbr=zo,e.ɵbs=Vo,e.ɵbt=Bo,e.ɵbu=Qo,e.ɵbv=Jo,e.ɵbw=gi,e.ɵbx=pi,e.ɵby=li,e.ɵbz=$i,e.ɵc=Be,e.ɵd=Bt,e.ɵe=Ht,e.ɵf=Mt,e.ɵg=Gt,e.ɵh=mn,e.ɵi=gn,e.ɵj=vn,e.ɵk=yn,e.ɵl=xn,e.ɵm=wn,e.ɵn=Cn,e.ɵo=Rn,e.ɵp=Hn,e.ɵq=Mn,e.ɵr=In,e.ɵs=_n,e.ɵt=kn,e.ɵu=Pn,e.ɵv=Tn,e.ɵw=Ln,e.ɵx=On,e.ɵy=Sn,e.ɵz=En,Object.defineProperty(e,"__esModule",{value:!0})}));
17
17
  //# sourceMappingURL=seniorsistemas-angular-components.umd.min.js.map