!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/platform-browser"),require("@fortawesome/fontawesome-svg-core")):"function"==typeof define&&define.amd?define("@fortawesome/angular-fontawesome",["exports","@angular/core","@angular/platform-browser","@fortawesome/fontawesome-svg-core"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).fortawesome=t.fortawesome||{},t.fortawesome["angular-fontawesome"]={}),t.ng.core,t.ng.platformBrowser,t.fontawesomeSvgCore)}(this,(function(t,e,n,r){"use strict"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};Object.create;function i(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function a(){for(var t=[],e=0;e....')},t}();u.decorators=[{type:e.Directive,args:[{selector:"fa-icon[stackItemSize],fa-duotone-icon[stackItemSize]"}]}],u.propDecorators={stackItemSize:[{type:e.Input}],size:[{type:e.Input}]};var f=function(){function t(t,e){this.renderer=t,this.elementRef=e}return t.prototype.ngOnInit=function(){this.renderer.addClass(this.elementRef.nativeElement,"fa-stack")},t.prototype.ngOnChanges=function(t){"size"in t&&(null!=t.size.currentValue&&this.renderer.addClass(this.elementRef.nativeElement,"fa-"+t.size.currentValue),null!=t.size.previousValue&&this.renderer.removeClass(this.elementRef.nativeElement,"fa-"+t.size.previousValue))},t}();f.decorators=[{type:e.Component,args:[{selector:"fa-stack",template:""}]}],f.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},f.propDecorators={size:[{type:e.Input}]};var y=function(){function t(t,e,n,r,o){this.sanitizer=t,this.config=e,this.iconLibrary=n,this.stackItem=r,this.classes=[],null!=o&&null==r&&console.error('FontAwesome: fa-icon and fa-duotone-icon elements must specify stackItemSize attribute when wrapped into fa-stack. Example: .')}return t.prototype.ngOnChanges=function(t){if(null==this.icon&&null==this.config.fallbackIcon)return function(){throw new Error("Property `icon` is required for `fa-icon`/`fa-duotone-icon` components.")}();var e=null;if(e=null==this.icon?this.config.fallbackIcon:this.icon,t){var n=this.findIconDefinition(e);if(null!=n){var r=this.buildParams();this.renderIcon(n,r)}}},t.prototype.render=function(){this.ngOnChanges({})},t.prototype.findIconDefinition=function(t){var e=function(t,e){return void 0!==(n=t).prefix&&void 0!==n.iconName?t:Array.isArray(t)&&2===t.length?{prefix:t[0],iconName:t[1]}:"string"==typeof t?{prefix:e,iconName:t}:void 0;var n}(t,this.config.defaultPrefix);if("icon"in e)return e;var n=this.iconLibrary.getIconDefinition(e.prefix,e.iconName);if(null!=n)return n;var o=r.findIconDefinition(e);if(null!=o){var i="Global icon library is deprecated. Consult https://github.com/FortAwesome/angular-fontawesome/blob/master/UPGRADING.md for the migration instructions.";if("unset"===this.config.globalLibrary)console.error("FontAwesome: "+i);else if(!this.config.globalLibrary)throw new Error(i);return o}return function(t){throw new Error("Could not find icon with iconName="+t.iconName+" and prefix="+t.prefix+" in the icon library.")}(e),null},t.prototype.buildParams=function(){var t={flip:this.flip,spin:this.spin,pulse:this.pulse,border:this.border,inverse:this.inverse,size:this.size||null,pull:this.pull||null,rotate:this.rotate||null,fixedWidth:"boolean"==typeof this.fixedWidth?this.fixedWidth:this.config.fixedWidth,stackItemSize:null!=this.stackItem?this.stackItem.stackItemSize:null},e="string"==typeof this.transform?r.parse.transform(this.transform):this.transform;return{title:this.title,transform:e,classes:a(c(t),this.classes),mask:null!=this.mask?this.findIconDefinition(this.mask):null,styles:null!=this.styles?this.styles:{},symbol:this.symbol,attributes:{role:this.a11yRole}}},t.prototype.renderIcon=function(t,e){var n=r.icon(t,e);this.renderedIconHTML=this.sanitizer.bypassSecurityTrustHtml(n.html.join("\n"))},t}();y.decorators=[{type:e.Component,args:[{selector:"fa-icon",template:"",host:{class:"ng-fa-icon","[attr.title]":"title"}}]}],y.ctorParameters=function(){return[{type:n.DomSanitizer},{type:l},{type:p},{type:u,decorators:[{type:e.Optional}]},{type:f,decorators:[{type:e.Optional}]}]},y.propDecorators={icon:[{type:e.Input}],title:[{type:e.Input}],spin:[{type:e.Input}],pulse:[{type:e.Input}],mask:[{type:e.Input}],styles:[{type:e.Input}],flip:[{type:e.Input}],size:[{type:e.Input}],pull:[{type:e.Input}],border:[{type:e.Input}],inverse:[{type:e.Input}],symbol:[{type:e.Input}],rotate:[{type:e.Input}],fixedWidth:[{type:e.Input}],classes:[{type:e.Input}],transform:[{type:e.Input}],a11yRole:[{type:e.Input}],renderedIconHTML:[{type:e.HostBinding,args:["innerHTML"]}]};var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.findIconDefinition=function(e){var n=t.prototype.findIconDefinition.call(this,e);if(null!=n&&!Array.isArray(n.icon[4]))throw new Error("The specified icon does not appear to be a Duotone icon. Check that you specified the correct style: or use: instead.');return n},e.prototype.buildParams=function(){var e=t.prototype.buildParams.call(this);return!0!==this.swapOpacity&&"true"!==this.swapOpacity||e.classes.push("fa-swap-opacity"),null!=this.primaryOpacity&&(e.styles["--fa-primary-opacity"]=this.primaryOpacity.toString()),null!=this.secondaryOpacity&&(e.styles["--fa-secondary-opacity"]=this.secondaryOpacity.toString()),null!=this.primaryColor&&(e.styles["--fa-primary-color"]=this.primaryColor),null!=this.secondaryColor&&(e.styles["--fa-secondary-color"]=this.secondaryColor),e},e}(y);h.decorators=[{type:e.Component,args:[{selector:"fa-duotone-icon",template:""}]}],h.propDecorators={swapOpacity:[{type:e.Input}],primaryOpacity:[{type:e.Input}],secondaryOpacity:[{type:e.Input}],primaryColor:[{type:e.Input}],secondaryColor:[{type:e.Input}]};var d=function(t,e,n){if(!t)throw new Error(n+" should be used as child of "+e+" only.")},m=function(){function t(t,e,n){this.renderer=t,this.elementRef=e,this.config=n}return t.prototype.ngOnInit=function(){this.renderer.addClass(this.elementRef.nativeElement,"fa-layers"),this.fixedWidth="boolean"==typeof this.fixedWidth?this.fixedWidth:this.config.fixedWidth},t.prototype.ngOnChanges=function(t){"size"in t&&(null!=t.size.currentValue&&this.renderer.addClass(this.elementRef.nativeElement,"fa-"+t.size.currentValue),null!=t.size.previousValue&&this.renderer.removeClass(this.elementRef.nativeElement,"fa-"+t.size.previousValue))},t}();m.decorators=[{type:e.Component,args:[{selector:"fa-layers",template:""}]}],m.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:l}]},m.propDecorators={size:[{type:e.Input}],fixedWidth:[{type:e.Input},{type:e.HostBinding,args:["class.fa-fw"]}]};var I=function(){function t(t,e){this.parent=t,this.sanitizer=e,this.classes=[],d(this.parent,"FaLayersComponent",this.constructor.name)}return t.prototype.ngOnChanges=function(t){if(t){var e=this.buildParams();this.updateContent(e)}},t.prototype.buildParams=function(){return{title:this.title,classes:this.classes,styles:this.styles}},t.prototype.updateContent=function(t){this.renderedHTML=this.sanitizer.bypassSecurityTrustHtml(r.counter(this.content||"",t).html.join(""))},t}();I.decorators=[{type:e.Component,args:[{selector:"fa-layers-counter",template:"",host:{class:"ng-fa-layers-counter"}}]}],I.ctorParameters=function(){return[{type:m,decorators:[{type:e.Optional}]},{type:n.DomSanitizer}]},I.propDecorators={content:[{type:e.Input}],title:[{type:e.Input}],styles:[{type:e.Input}],classes:[{type:e.Input}],renderedHTML:[{type:e.HostBinding,args:["innerHTML"]}]};var g=function(){function t(t,e){this.parent=t,this.sanitizer=e,this.classes=[],d(this.parent,"FaLayersComponent",this.constructor.name)}return t.prototype.ngOnChanges=function(t){if(t){var e=this.buildParams();this.updateContent(e)}},t.prototype.buildParams=function(){var t={flip:this.flip,spin:this.spin,pulse:this.pulse,border:this.border,inverse:this.inverse,size:this.size||null,pull:this.pull||null,rotate:this.rotate||null,fixedWidth:this.fixedWidth};return{transform:"string"==typeof this.transform?r.parse.transform(this.transform):this.transform,classes:a(c(t),this.classes),title:this.title,styles:this.styles}},t.prototype.updateContent=function(t){this.renderedHTML=this.sanitizer.bypassSecurityTrustHtml(r.text(this.content||"",t).html.join("\n"))},t}();g.decorators=[{type:e.Component,args:[{selector:"fa-layers-text",template:"",host:{class:"ng-fa-layers-text"}}]}],g.ctorParameters=function(){return[{type:m,decorators:[{type:e.Optional}]},{type:n.DomSanitizer}]},g.propDecorators={content:[{type:e.Input}],title:[{type:e.Input}],styles:[{type:e.Input}],classes:[{type:e.Input}],spin:[{type:e.Input}],pulse:[{type:e.Input}],flip:[{type:e.Input}],size:[{type:e.Input}],pull:[{type:e.Input}],border:[{type:e.Input}],inverse:[{type:e.Input}],rotate:[{type:e.Input}],fixedWidth:[{type:e.Input}],transform:[{type:e.Input}],renderedHTML:[{type:e.HostBinding,args:["innerHTML"]}]};var v=function(){};v.decorators=[{type:e.NgModule,args:[{declarations:[y,h,m,g,I,f,u],exports:[y,h,m,g,I,f,u]}]}],t.FaConfig=l,t.FaDuotoneIconComponent=h,t.FaIconComponent=y,t.FaIconLibrary=p,t.FaLayersComponent=m,t.FaLayersCounterComponent=I,t.FaLayersTextComponent=g,t.FaStackComponent=f,t.FaStackItemSizeDirective=u,t.FontAwesomeModule=v,Object.defineProperty(t,"__esModule",{value:!0})})); //# sourceMappingURL=angular-fontawesome.umd.min.js.map